@lumx/react 4.2.0 → 4.2.1-alpha.1
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/index.d.ts +74 -42
- package/index.js +1284 -877
- package/index.js.map +1 -1
- package/package.json +5 -4
- package/utils/index.d.ts +64 -3
- package/utils/index.js +89 -3
- package/utils/index.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasis as Emphasis$1, Theme as Theme$1, AspectRatio, ColorVariant, DIALOG_TRANSITION_DURATION, Orientation
|
|
1
|
+
import { Kind as Kind$1, Size as Size$1, ColorPalette as ColorPalette$1, Emphasis as Emphasis$1, Theme as Theme$1, AspectRatio, ColorVariant, DIALOG_TRANSITION_DURATION, Orientation as Orientation$1, Alignment, NOTIFICATION_TRANSITION_DURATION, TOOLTIP_LONG_PRESS_DELAY, TOOLTIP_HOVER_DELAY } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
export * from '@lumx/core/js/types';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -7,9 +7,6 @@ import { mdiAlert } from '@lumx/icons/esm/alert';
|
|
|
7
7
|
import { mdiAlertCircle } from '@lumx/icons/esm/alert-circle';
|
|
8
8
|
import { mdiCheckCircle } from '@lumx/icons/esm/check-circle';
|
|
9
9
|
import { mdiInformation } from '@lumx/icons/esm/information';
|
|
10
|
-
import isBoolean from 'lodash/isBoolean';
|
|
11
|
-
import isEmpty from 'lodash/isEmpty';
|
|
12
|
-
import kebabCase from 'lodash/kebabCase';
|
|
13
10
|
import { classNames, onEnterPressed, onEscapePressed, onButtonPressed, detectHorizontalSwipe } from '@lumx/core/js/utils';
|
|
14
11
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
12
|
import last from 'lodash/last';
|
|
@@ -20,6 +17,7 @@ import dropRight from 'lodash/dropRight';
|
|
|
20
17
|
import partition from 'lodash/partition';
|
|
21
18
|
import reduce from 'lodash/reduce';
|
|
22
19
|
import { u as useDisabledStateContext, P as Portal, C as ClickAwayProvider } from './_internal/DpdvhbTO.js';
|
|
20
|
+
import isEmpty from 'lodash/isEmpty';
|
|
23
21
|
import { getDisabledState } from '@lumx/core/js/utils/disabledState';
|
|
24
22
|
import { mdiCloseCircle } from '@lumx/icons/esm/close-circle';
|
|
25
23
|
import memoize from 'lodash/memoize';
|
|
@@ -53,147 +51,6 @@ import { mdiArrowDown } from '@lumx/icons/esm/arrow-down';
|
|
|
53
51
|
import { mdiArrowUp } from '@lumx/icons/esm/arrow-up';
|
|
54
52
|
import set from 'lodash/set';
|
|
55
53
|
|
|
56
|
-
function getDefaultExportFromCjs (x) {
|
|
57
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var classnames$1 = {exports: {}};
|
|
61
|
-
|
|
62
|
-
/*!
|
|
63
|
-
Copyright (c) 2018 Jed Watson.
|
|
64
|
-
Licensed under the MIT License (MIT), see
|
|
65
|
-
http://jedwatson.github.io/classnames
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
var hasRequiredClassnames;
|
|
69
|
-
|
|
70
|
-
function requireClassnames () {
|
|
71
|
-
if (hasRequiredClassnames) return classnames$1.exports;
|
|
72
|
-
hasRequiredClassnames = 1;
|
|
73
|
-
(function (module) {
|
|
74
|
-
/* global define */
|
|
75
|
-
|
|
76
|
-
(function () {
|
|
77
|
-
|
|
78
|
-
var hasOwn = {}.hasOwnProperty;
|
|
79
|
-
|
|
80
|
-
function classNames() {
|
|
81
|
-
var classes = [];
|
|
82
|
-
|
|
83
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
84
|
-
var arg = arguments[i];
|
|
85
|
-
if (!arg) continue;
|
|
86
|
-
|
|
87
|
-
var argType = typeof arg;
|
|
88
|
-
|
|
89
|
-
if (argType === 'string' || argType === 'number') {
|
|
90
|
-
classes.push(arg);
|
|
91
|
-
} else if (Array.isArray(arg)) {
|
|
92
|
-
if (arg.length) {
|
|
93
|
-
var inner = classNames.apply(null, arg);
|
|
94
|
-
if (inner) {
|
|
95
|
-
classes.push(inner);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
} else if (argType === 'object') {
|
|
99
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
100
|
-
classes.push(arg.toString());
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
for (var key in arg) {
|
|
105
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
106
|
-
classes.push(key);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return classes.join(' ');
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (module.exports) {
|
|
116
|
-
classNames.default = classNames;
|
|
117
|
-
module.exports = classNames;
|
|
118
|
-
} else {
|
|
119
|
-
window.classNames = classNames;
|
|
120
|
-
}
|
|
121
|
-
}());
|
|
122
|
-
} (classnames$1));
|
|
123
|
-
return classnames$1.exports;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
var classnamesExports = requireClassnames();
|
|
127
|
-
var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Get the basic CSS class for the given type.
|
|
131
|
-
*
|
|
132
|
-
* @param prefix The class name prefix for the generated CSS class.
|
|
133
|
-
* @param type The type of CSS class we want to generate (e.g.: 'color', 'variant', ...).
|
|
134
|
-
* @param value The value of the type of the CSS class (e.g.: 'primary', 'button', ...).
|
|
135
|
-
* @return The basic CSS class.
|
|
136
|
-
*/
|
|
137
|
-
function getBasicClass({
|
|
138
|
-
prefix,
|
|
139
|
-
type,
|
|
140
|
-
value
|
|
141
|
-
}) {
|
|
142
|
-
if (isBoolean(value)) {
|
|
143
|
-
if (!value) {
|
|
144
|
-
// False value should not return a class.
|
|
145
|
-
return '';
|
|
146
|
-
}
|
|
147
|
-
const booleanPrefixes = ['has', 'is'];
|
|
148
|
-
if (booleanPrefixes.some(booleanPrefix => type.toString().startsWith(booleanPrefix))) {
|
|
149
|
-
return `${prefix}--${kebabCase(type)}`;
|
|
150
|
-
}
|
|
151
|
-
return `${prefix}--is-${kebabCase(type)}`;
|
|
152
|
-
}
|
|
153
|
-
return `${prefix}--${kebabCase(type)}-${value}`;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Enhance isEmpty method to also works with numbers.
|
|
158
|
-
*
|
|
159
|
-
* @param value The value to check.
|
|
160
|
-
* @return Whether the input value is empty or != 0.
|
|
161
|
-
*/
|
|
162
|
-
const _isEmpty = value => {
|
|
163
|
-
if (typeof value === 'number') {
|
|
164
|
-
return value === 0;
|
|
165
|
-
}
|
|
166
|
-
return isEmpty(value);
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Return all basic LumX CSS classes which are available for every components.
|
|
171
|
-
*
|
|
172
|
-
* @see {@link /src/components/index.d.ts} for the possible values of each parameter.
|
|
173
|
-
*
|
|
174
|
-
* @param prefix The class name prefix for the generated CSS class.
|
|
175
|
-
* @param props All the other props you want to generate a class.
|
|
176
|
-
* The rule of thumb: the key is the name of the prop in the class, the value a string that will
|
|
177
|
-
* be used in the classname to represent the value of the given prop.
|
|
178
|
-
* @return All LumX basic CSS classes.
|
|
179
|
-
*/
|
|
180
|
-
function handleBasicClasses({
|
|
181
|
-
prefix,
|
|
182
|
-
...props
|
|
183
|
-
}) {
|
|
184
|
-
const otherClasses = {};
|
|
185
|
-
if (!isEmpty(props)) {
|
|
186
|
-
Object.keys(props).forEach(prop => {
|
|
187
|
-
otherClasses[getBasicClass({
|
|
188
|
-
prefix,
|
|
189
|
-
type: prop,
|
|
190
|
-
value: props[prop]
|
|
191
|
-
})] = isBoolean(props[prop]) ? props[prop] : !_isEmpty(props[prop]);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
return classnames(prefix, otherClasses);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
54
|
let i = 0;
|
|
198
55
|
|
|
199
56
|
/**
|
|
@@ -244,6 +101,9 @@ const COMPONENT_NAME$1k = 'AlertDialog';
|
|
|
244
101
|
* Component default class name and class prefix.
|
|
245
102
|
*/
|
|
246
103
|
const CLASSNAME$1i = 'lumx-alert-dialog';
|
|
104
|
+
const {
|
|
105
|
+
block: block$13
|
|
106
|
+
} = classNames.bem(CLASSNAME$1i);
|
|
247
107
|
|
|
248
108
|
/**
|
|
249
109
|
* Component default props.
|
|
@@ -311,9 +171,8 @@ const AlertDialog = forwardRef((props, ref) => {
|
|
|
311
171
|
'aria-describedby': descriptionId,
|
|
312
172
|
...dialogProps
|
|
313
173
|
},
|
|
314
|
-
className: classNames.join(className,
|
|
315
|
-
kind
|
|
316
|
-
prefix: CLASSNAME$1i
|
|
174
|
+
className: classNames.join(className, block$13({
|
|
175
|
+
[`kind-${kind}`]: Boolean(kind)
|
|
317
176
|
})),
|
|
318
177
|
...forwardedProps,
|
|
319
178
|
children: [/*#__PURE__*/jsx("header", {
|
|
@@ -701,6 +560,10 @@ const COMPONENT_NAME$1h = 'Avatar';
|
|
|
701
560
|
* Component default class name and class prefix.
|
|
702
561
|
*/
|
|
703
562
|
const CLASSNAME$1f = 'lumx-avatar';
|
|
563
|
+
const {
|
|
564
|
+
block: block$12,
|
|
565
|
+
element: element$M
|
|
566
|
+
} = classNames.bem(CLASSNAME$1f);
|
|
704
567
|
|
|
705
568
|
/**
|
|
706
569
|
* Component default props.
|
|
@@ -736,15 +599,14 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
736
599
|
return /*#__PURE__*/jsxs("div", {
|
|
737
600
|
ref: ref,
|
|
738
601
|
...forwardedProps,
|
|
739
|
-
className: classNames.join(className,
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
theme
|
|
602
|
+
className: classNames.join(className, block$12({
|
|
603
|
+
[`size-${size}`]: Boolean(size),
|
|
604
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
743
605
|
})),
|
|
744
606
|
children: [/*#__PURE__*/jsx(Thumbnail, {
|
|
745
607
|
linkProps: linkProps,
|
|
746
608
|
linkAs: linkAs,
|
|
747
|
-
className:
|
|
609
|
+
className: element$M('thumbnail'),
|
|
748
610
|
onClick: onClick,
|
|
749
611
|
onKeyPress: onKeyPress,
|
|
750
612
|
...thumbnailProps,
|
|
@@ -754,10 +616,10 @@ const Avatar = forwardRef((props, ref) => {
|
|
|
754
616
|
alt: alt,
|
|
755
617
|
theme: theme
|
|
756
618
|
}), actions && /*#__PURE__*/jsx("div", {
|
|
757
|
-
className:
|
|
619
|
+
className: element$M('actions'),
|
|
758
620
|
children: actions
|
|
759
621
|
}), badge && /*#__PURE__*/jsx("div", {
|
|
760
|
-
className:
|
|
622
|
+
className: element$M('badge'),
|
|
761
623
|
children: badge
|
|
762
624
|
})]
|
|
763
625
|
});
|
|
@@ -775,6 +637,9 @@ const COMPONENT_NAME$1g = 'Badge';
|
|
|
775
637
|
* Component default class name and class prefix.
|
|
776
638
|
*/
|
|
777
639
|
const CLASSNAME$1e = 'lumx-badge';
|
|
640
|
+
const {
|
|
641
|
+
block: block$11
|
|
642
|
+
} = classNames.bem(CLASSNAME$1e);
|
|
778
643
|
|
|
779
644
|
/**
|
|
780
645
|
* Component default props.
|
|
@@ -800,9 +665,8 @@ const Badge = forwardRef((props, ref) => {
|
|
|
800
665
|
return /*#__PURE__*/jsx("div", {
|
|
801
666
|
ref: ref,
|
|
802
667
|
...forwardedProps,
|
|
803
|
-
className: classNames.join(className,
|
|
804
|
-
|
|
805
|
-
color
|
|
668
|
+
className: classNames.join(className, block$11({
|
|
669
|
+
[`color-${color}`]: Boolean(color)
|
|
806
670
|
})),
|
|
807
671
|
children: children
|
|
808
672
|
});
|
|
@@ -815,6 +679,10 @@ Badge.defaultProps = DEFAULT_PROPS$12;
|
|
|
815
679
|
* Component default class name and class prefix.
|
|
816
680
|
*/
|
|
817
681
|
const CLASSNAME$1d = 'lumx-badge-wrapper';
|
|
682
|
+
const {
|
|
683
|
+
block: block$10,
|
|
684
|
+
element: element$L
|
|
685
|
+
} = classNames.bem(CLASSNAME$1d);
|
|
818
686
|
const BadgeWrapper = forwardRef((props, ref) => {
|
|
819
687
|
const {
|
|
820
688
|
badge,
|
|
@@ -825,9 +693,9 @@ const BadgeWrapper = forwardRef((props, ref) => {
|
|
|
825
693
|
return /*#__PURE__*/jsxs("div", {
|
|
826
694
|
ref: ref,
|
|
827
695
|
...forwardedProps,
|
|
828
|
-
className: classNames.join(className,
|
|
696
|
+
className: classNames.join(className, block$10()),
|
|
829
697
|
children: [children, badge && /*#__PURE__*/jsx("div", {
|
|
830
|
-
className:
|
|
698
|
+
className: element$L('badge'),
|
|
831
699
|
children: badge
|
|
832
700
|
})]
|
|
833
701
|
});
|
|
@@ -849,10 +717,31 @@ const Size = {
|
|
|
849
717
|
m: 'm',
|
|
850
718
|
xl: 'xl',
|
|
851
719
|
xxl: 'xxl'};
|
|
720
|
+
const Orientation = {
|
|
721
|
+
horizontal: 'horizontal'};
|
|
852
722
|
const Emphasis = {
|
|
853
723
|
low: 'low',
|
|
854
724
|
high: 'high'
|
|
855
725
|
};
|
|
726
|
+
/**
|
|
727
|
+
* List of typographies that can't be customized.
|
|
728
|
+
*/
|
|
729
|
+
const TypographyInterface = {
|
|
730
|
+
overline: 'overline',
|
|
731
|
+
caption: 'caption',
|
|
732
|
+
body1: 'body1',
|
|
733
|
+
body2: 'body2',
|
|
734
|
+
subtitle1: 'subtitle1',
|
|
735
|
+
subtitle2: 'subtitle2',
|
|
736
|
+
title: 'title',
|
|
737
|
+
headline: 'headline',
|
|
738
|
+
display1: 'display1'
|
|
739
|
+
};
|
|
740
|
+
/**
|
|
741
|
+
* List of all typographies.
|
|
742
|
+
*/
|
|
743
|
+
const Typography = {
|
|
744
|
+
...TypographyInterface};
|
|
856
745
|
/**
|
|
857
746
|
* Semantic info about the purpose of the component
|
|
858
747
|
*/
|
|
@@ -867,12 +756,88 @@ const Kind = {
|
|
|
867
756
|
*/
|
|
868
757
|
const ColorPalette = {
|
|
869
758
|
primary: 'primary',
|
|
759
|
+
blue: 'blue',
|
|
870
760
|
dark: 'dark',
|
|
761
|
+
green: 'green',
|
|
871
762
|
yellow: 'yellow',
|
|
763
|
+
red: 'red',
|
|
872
764
|
light: 'light'};
|
|
873
765
|
|
|
874
766
|
/** ColorPalette with all possible color variant combination */
|
|
875
767
|
|
|
768
|
+
function getDefaultExportFromCjs (x) {
|
|
769
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
var classnames$1 = {exports: {}};
|
|
773
|
+
|
|
774
|
+
/*!
|
|
775
|
+
Copyright (c) 2018 Jed Watson.
|
|
776
|
+
Licensed under the MIT License (MIT), see
|
|
777
|
+
http://jedwatson.github.io/classnames
|
|
778
|
+
*/
|
|
779
|
+
|
|
780
|
+
var hasRequiredClassnames;
|
|
781
|
+
|
|
782
|
+
function requireClassnames () {
|
|
783
|
+
if (hasRequiredClassnames) return classnames$1.exports;
|
|
784
|
+
hasRequiredClassnames = 1;
|
|
785
|
+
(function (module) {
|
|
786
|
+
/* global define */
|
|
787
|
+
|
|
788
|
+
(function () {
|
|
789
|
+
|
|
790
|
+
var hasOwn = {}.hasOwnProperty;
|
|
791
|
+
|
|
792
|
+
function classNames() {
|
|
793
|
+
var classes = [];
|
|
794
|
+
|
|
795
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
796
|
+
var arg = arguments[i];
|
|
797
|
+
if (!arg) continue;
|
|
798
|
+
|
|
799
|
+
var argType = typeof arg;
|
|
800
|
+
|
|
801
|
+
if (argType === 'string' || argType === 'number') {
|
|
802
|
+
classes.push(arg);
|
|
803
|
+
} else if (Array.isArray(arg)) {
|
|
804
|
+
if (arg.length) {
|
|
805
|
+
var inner = classNames.apply(null, arg);
|
|
806
|
+
if (inner) {
|
|
807
|
+
classes.push(inner);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
} else if (argType === 'object') {
|
|
811
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
812
|
+
classes.push(arg.toString());
|
|
813
|
+
continue;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
for (var key in arg) {
|
|
817
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
818
|
+
classes.push(key);
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
return classes.join(' ');
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
if (module.exports) {
|
|
828
|
+
classNames.default = classNames;
|
|
829
|
+
module.exports = classNames;
|
|
830
|
+
} else {
|
|
831
|
+
window.classNames = classNames;
|
|
832
|
+
}
|
|
833
|
+
}());
|
|
834
|
+
} (classnames$1));
|
|
835
|
+
return classnames$1.exports;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
var classnamesExports = requireClassnames();
|
|
839
|
+
var classnames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
840
|
+
|
|
876
841
|
/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */
|
|
877
842
|
function resolveColorWithVariants(colorWithVariants, colorVariant) {
|
|
878
843
|
if (!colorWithVariants) return [undefined, colorVariant];
|
|
@@ -923,6 +888,108 @@ function typography(typo) {
|
|
|
923
888
|
return `lumx-typography-${typo}`;
|
|
924
889
|
}
|
|
925
890
|
|
|
891
|
+
/**
|
|
892
|
+
* Modifier
|
|
893
|
+
* @example { 'is-disabled': true, 'is-selected': false }
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Generates BEM modifier class names.
|
|
898
|
+
*
|
|
899
|
+
* @param baseName The base BEM class to attach modifiers to.
|
|
900
|
+
* @param modifiers Map of modifier names to boolean values.
|
|
901
|
+
* @returns Combined modifier class names string.
|
|
902
|
+
*
|
|
903
|
+
* @example
|
|
904
|
+
* modifier('button', { active: true }); // 'button--active'
|
|
905
|
+
* modifier('button', { active: true, disabled: false }); // 'button--active'
|
|
906
|
+
*/
|
|
907
|
+
function modifier$1(baseName, modifiers) {
|
|
908
|
+
const modifierClasses = [];
|
|
909
|
+
for (const [key, value] of Object.entries(modifiers)) {
|
|
910
|
+
if (value) modifierClasses.push(`${baseName}--${key}`);
|
|
911
|
+
}
|
|
912
|
+
return modifierClasses.join(' ');
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Generates a BEM block + modifier class name string.
|
|
917
|
+
* Combines a base class with optional modifiers and additional classes.
|
|
918
|
+
*
|
|
919
|
+
* @param baseName The base BEM class
|
|
920
|
+
* @param modifier Optional modifiers
|
|
921
|
+
* @returns Combined class name string
|
|
922
|
+
*
|
|
923
|
+
* @example
|
|
924
|
+
* block('button'); // 'button'
|
|
925
|
+
* block('button', { active: true, disabled: false }); // 'button button--active'
|
|
926
|
+
*/
|
|
927
|
+
|
|
928
|
+
function block$$(baseName, modifiersOrAdditionalClasses, additionalClasses) {
|
|
929
|
+
let modifiers;
|
|
930
|
+
let classes;
|
|
931
|
+
if (Array.isArray(modifiersOrAdditionalClasses)) {
|
|
932
|
+
classes = modifiersOrAdditionalClasses;
|
|
933
|
+
} else {
|
|
934
|
+
modifiers = modifiersOrAdditionalClasses;
|
|
935
|
+
classes = additionalClasses;
|
|
936
|
+
}
|
|
937
|
+
if (!modifiers && !classes) {
|
|
938
|
+
return baseName;
|
|
939
|
+
}
|
|
940
|
+
return classnames(
|
|
941
|
+
// Additional classes
|
|
942
|
+
classes,
|
|
943
|
+
// Base class
|
|
944
|
+
baseName,
|
|
945
|
+
// Modifier(s)
|
|
946
|
+
modifiers ? modifier$1(baseName, modifiers) : null);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Creates a BEM element class generator function for the given base class.
|
|
951
|
+
* Returns a function that generates BEM element class names with optional modifiers.
|
|
952
|
+
*
|
|
953
|
+
* @param baseClass The base BEM block class name (e.g., 'button', 'card')
|
|
954
|
+
* @param elem The BEM element name (e.g., 'icon', 'title')
|
|
955
|
+
* @param modifier Optional BEM modifier ()
|
|
956
|
+
* @returns combined BEM element class name
|
|
957
|
+
*
|
|
958
|
+
* @example
|
|
959
|
+
* element('my-button', 'icon'); // 'my-button__icon'
|
|
960
|
+
* element('my-button', 'icon', { active: true }); // 'my-button__icon my-button__icon--active'
|
|
961
|
+
*/
|
|
962
|
+
|
|
963
|
+
function element$K(baseClass, elem, modifiersOrAdditionalClasses, additionalClasses) {
|
|
964
|
+
if (Array.isArray(modifiersOrAdditionalClasses)) {
|
|
965
|
+
return block$$(`${baseClass}__${elem}`, modifiersOrAdditionalClasses);
|
|
966
|
+
}
|
|
967
|
+
return block$$(`${baseClass}__${elem}`, modifiersOrAdditionalClasses, additionalClasses);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Setup BEM block & element generation for a given base name.
|
|
972
|
+
*/
|
|
973
|
+
function bem(baseName) {
|
|
974
|
+
function blockFn(modifiersOrAdditionalClasses, additionalClasses) {
|
|
975
|
+
if (Array.isArray(modifiersOrAdditionalClasses)) {
|
|
976
|
+
return block$$(baseName, modifiersOrAdditionalClasses);
|
|
977
|
+
}
|
|
978
|
+
return block$$(baseName, modifiersOrAdditionalClasses, additionalClasses);
|
|
979
|
+
}
|
|
980
|
+
function elementFn(elem, modifiersOrAdditionalClasses, additionalClasses) {
|
|
981
|
+
if (Array.isArray(modifiersOrAdditionalClasses)) {
|
|
982
|
+
return element$K(baseName, elem, modifiersOrAdditionalClasses);
|
|
983
|
+
}
|
|
984
|
+
return element$K(baseName, elem, modifiersOrAdditionalClasses, additionalClasses);
|
|
985
|
+
}
|
|
986
|
+
return {
|
|
987
|
+
block: blockFn,
|
|
988
|
+
element: elementFn,
|
|
989
|
+
modifier: modifiers => modifier$1(baseName, modifiers)
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
|
|
926
993
|
/**
|
|
927
994
|
* Render clickable element (link, button or custom element)
|
|
928
995
|
* (also does some basic disabled state handling)
|
|
@@ -971,7 +1038,13 @@ const RawClickable$1 = props => {
|
|
|
971
1038
|
*/
|
|
972
1039
|
const COMPONENT_NAME$1f = 'ButtonRoot';
|
|
973
1040
|
const BUTTON_WRAPPER_CLASSNAME = `lumx-button-wrapper`;
|
|
1041
|
+
const {
|
|
1042
|
+
block: buttonWrapperBlock
|
|
1043
|
+
} = bem(BUTTON_WRAPPER_CLASSNAME);
|
|
974
1044
|
const BUTTON_CLASSNAME = `lumx-button`;
|
|
1045
|
+
const {
|
|
1046
|
+
block: buttonBlock
|
|
1047
|
+
} = bem(BUTTON_CLASSNAME);
|
|
975
1048
|
|
|
976
1049
|
/**
|
|
977
1050
|
* Render a button wrapper with the ButtonRoot inside.
|
|
@@ -987,12 +1060,11 @@ const renderButtonWrapper = props => {
|
|
|
987
1060
|
fullWidth
|
|
988
1061
|
} = props;
|
|
989
1062
|
const adaptedColor = emphasis === Emphasis.low && (color === ColorPalette.light ? ColorPalette.dark : ColorPalette.light);
|
|
990
|
-
const wrapperClassName =
|
|
991
|
-
color: adaptedColor,
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
}));
|
|
1063
|
+
const wrapperClassName = buttonWrapperBlock({
|
|
1064
|
+
[`color-${adaptedColor}`]: Boolean(adaptedColor),
|
|
1065
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
1066
|
+
'is-full-width': fullWidth
|
|
1067
|
+
});
|
|
996
1068
|
const buttonProps = {
|
|
997
1069
|
...props,
|
|
998
1070
|
hasBackground: false
|
|
@@ -1039,19 +1111,18 @@ const ButtonRoot = props => {
|
|
|
1039
1111
|
color: adaptedColor
|
|
1040
1112
|
});
|
|
1041
1113
|
}
|
|
1042
|
-
const buttonClassName = classnames(className,
|
|
1043
|
-
color: adaptedColor,
|
|
1044
|
-
emphasis,
|
|
1045
|
-
isSelected,
|
|
1046
|
-
|
|
1047
|
-
isActive,
|
|
1048
|
-
isFocused,
|
|
1049
|
-
isHovered,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
fullWidth
|
|
1114
|
+
const buttonClassName = classnames(className, buttonBlock({
|
|
1115
|
+
[`color-${adaptedColor}`]: Boolean(adaptedColor),
|
|
1116
|
+
[`emphasis-${emphasis}`]: Boolean(emphasis),
|
|
1117
|
+
'is-selected': isSelected,
|
|
1118
|
+
'is-disabled': Boolean(props.isDisabled || props['aria-disabled']),
|
|
1119
|
+
'is-active': isActive,
|
|
1120
|
+
'is-focused': isFocused,
|
|
1121
|
+
'is-hovered': isHovered,
|
|
1122
|
+
[`size-${size}`]: Boolean(size),
|
|
1123
|
+
[`theme-${theme}`]: Boolean(emphasis === Emphasis.high && theme),
|
|
1124
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
1125
|
+
'is-full-width': fullWidth
|
|
1055
1126
|
}));
|
|
1056
1127
|
return RawClickable$1({
|
|
1057
1128
|
as: linkAs || (forwardedProps.href ? 'a' : 'button'),
|
|
@@ -1079,6 +1150,9 @@ const COMPONENT_NAME$1e = 'Button';
|
|
|
1079
1150
|
* Component default class name and class prefix.
|
|
1080
1151
|
*/
|
|
1081
1152
|
const CLASSNAME$1c = 'lumx-button';
|
|
1153
|
+
const {
|
|
1154
|
+
modifier
|
|
1155
|
+
} = bem(CLASSNAME$1c);
|
|
1082
1156
|
|
|
1083
1157
|
/**
|
|
1084
1158
|
* Component default props.
|
|
@@ -1103,14 +1177,9 @@ const Button$1 = props => {
|
|
|
1103
1177
|
size = DEFAULT_PROPS$11.size,
|
|
1104
1178
|
...forwardedProps
|
|
1105
1179
|
} = props;
|
|
1106
|
-
const buttonClassName = classnames(className,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
value: !isEmpty(leftIcon)
|
|
1110
|
-
}), getBasicClass({
|
|
1111
|
-
prefix: CLASSNAME$1c,
|
|
1112
|
-
type: 'hasRightIcon',
|
|
1113
|
-
value: !isEmpty(rightIcon)
|
|
1180
|
+
const buttonClassName = classnames(className, modifier({
|
|
1181
|
+
'has-left-icon': Boolean(leftIcon),
|
|
1182
|
+
'has-right-icon': Boolean(rightIcon)
|
|
1114
1183
|
}));
|
|
1115
1184
|
return ButtonRoot({
|
|
1116
1185
|
emphasis,
|
|
@@ -1200,6 +1269,9 @@ const IconClassName = 'lumx-icon';
|
|
|
1200
1269
|
*/
|
|
1201
1270
|
|
|
1202
1271
|
const CLASSNAME$1b = IconClassName;
|
|
1272
|
+
const {
|
|
1273
|
+
block: block$_
|
|
1274
|
+
} = bem(CLASSNAME$1b);
|
|
1203
1275
|
|
|
1204
1276
|
/**
|
|
1205
1277
|
* Component default props.
|
|
@@ -1253,15 +1325,17 @@ const Icon$1 = props => {
|
|
|
1253
1325
|
return /*#__PURE__*/jsx("i", {
|
|
1254
1326
|
ref: ref,
|
|
1255
1327
|
...forwardedProps,
|
|
1256
|
-
className: classnames(className,
|
|
1257
|
-
color: iconColor,
|
|
1258
|
-
|
|
1259
|
-
hasShape,
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1328
|
+
className: classnames(className, block$_({
|
|
1329
|
+
[`color-${iconColor}`]: Boolean(iconColor),
|
|
1330
|
+
[`color-variant-${iconColorVariant}`]: Boolean(iconColorVariant),
|
|
1331
|
+
'has-shape': hasShape,
|
|
1332
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
1333
|
+
[`size-${iconSize}`]: Boolean(iconSize),
|
|
1334
|
+
'no-shape': !hasShape,
|
|
1335
|
+
'has-dark-layer': Boolean(!hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle),
|
|
1336
|
+
path: true,
|
|
1337
|
+
'vertical-align-middle': verticalAlign === 'middle'
|
|
1338
|
+
})),
|
|
1265
1339
|
children: /*#__PURE__*/jsx("svg", {
|
|
1266
1340
|
"aria-hidden": alt ? undefined : 'true',
|
|
1267
1341
|
role: alt ? 'img' : undefined,
|
|
@@ -1393,8 +1467,7 @@ const DEFAULT_PROPS$_ = {};
|
|
|
1393
1467
|
* ButtonGroup component.
|
|
1394
1468
|
*
|
|
1395
1469
|
* @param props Component props.
|
|
1396
|
-
* @
|
|
1397
|
-
* @return React element.
|
|
1470
|
+
* @return JSX element.
|
|
1398
1471
|
*/
|
|
1399
1472
|
const ButtonGroup$1 = props => {
|
|
1400
1473
|
const {
|
|
@@ -1444,6 +1517,10 @@ const COMPONENT_NAME$1a = 'Checkbox';
|
|
|
1444
1517
|
* Component default class name and class prefix.
|
|
1445
1518
|
*/
|
|
1446
1519
|
const CLASSNAME$18 = 'lumx-checkbox';
|
|
1520
|
+
const {
|
|
1521
|
+
block: block$Z,
|
|
1522
|
+
element: element$J
|
|
1523
|
+
} = classNames.bem(CLASSNAME$18);
|
|
1447
1524
|
|
|
1448
1525
|
/**
|
|
1449
1526
|
* Component default props.
|
|
@@ -1495,21 +1572,20 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
1495
1572
|
return /*#__PURE__*/jsxs("div", {
|
|
1496
1573
|
ref: ref,
|
|
1497
1574
|
...forwardedProps,
|
|
1498
|
-
className: classNames.join(className,
|
|
1575
|
+
className: classNames.join(className, block$Z({
|
|
1499
1576
|
// Whether state is intermediate class name will "-checked"
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
theme
|
|
1577
|
+
'is-checked': intermediateState ? true : isChecked,
|
|
1578
|
+
'is-disabled': isAnyDisabled,
|
|
1579
|
+
'is-unchecked': !isChecked,
|
|
1580
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
1505
1581
|
})),
|
|
1506
1582
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1507
|
-
className:
|
|
1583
|
+
className: element$J('input-wrapper'),
|
|
1508
1584
|
children: [/*#__PURE__*/jsx("input", {
|
|
1509
1585
|
ref: useMergeRefs(inputRef, localInputRef),
|
|
1510
1586
|
type: "checkbox",
|
|
1511
1587
|
id: inputId,
|
|
1512
|
-
className:
|
|
1588
|
+
className: element$J('input-native'),
|
|
1513
1589
|
...disabledStateProps,
|
|
1514
1590
|
name: name,
|
|
1515
1591
|
value: value,
|
|
@@ -1520,26 +1596,26 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
1520
1596
|
readOnly: inputProps.readOnly || disabledStateProps['aria-disabled'],
|
|
1521
1597
|
...inputProps
|
|
1522
1598
|
}), /*#__PURE__*/jsxs("div", {
|
|
1523
|
-
className:
|
|
1599
|
+
className: element$J('input-placeholder'),
|
|
1524
1600
|
children: [/*#__PURE__*/jsx("div", {
|
|
1525
|
-
className:
|
|
1601
|
+
className: element$J('input-background')
|
|
1526
1602
|
}), /*#__PURE__*/jsx("div", {
|
|
1527
|
-
className:
|
|
1603
|
+
className: element$J('input-indicator'),
|
|
1528
1604
|
children: /*#__PURE__*/jsx(Icon, {
|
|
1529
1605
|
icon: intermediateState ? mdiMinus : mdiCheck
|
|
1530
1606
|
})
|
|
1531
1607
|
})]
|
|
1532
1608
|
})]
|
|
1533
1609
|
}), /*#__PURE__*/jsxs("div", {
|
|
1534
|
-
className:
|
|
1610
|
+
className: element$J('content'),
|
|
1535
1611
|
children: [label && /*#__PURE__*/jsx(InputLabel, {
|
|
1536
1612
|
htmlFor: inputId,
|
|
1537
|
-
className:
|
|
1613
|
+
className: element$J('label'),
|
|
1538
1614
|
theme: theme,
|
|
1539
1615
|
children: label
|
|
1540
1616
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
1541
1617
|
id: `${inputId}-helper`,
|
|
1542
|
-
className:
|
|
1618
|
+
className: element$J('helper'),
|
|
1543
1619
|
theme: theme,
|
|
1544
1620
|
children: helper
|
|
1545
1621
|
})]
|
|
@@ -1575,6 +1651,10 @@ const COMPONENT_NAME$19 = 'Chip';
|
|
|
1575
1651
|
* Component default class name and class prefix.
|
|
1576
1652
|
*/
|
|
1577
1653
|
const CLASSNAME$17 = 'lumx-chip';
|
|
1654
|
+
const {
|
|
1655
|
+
block: block$Y,
|
|
1656
|
+
element: element$I
|
|
1657
|
+
} = classNames.bem(CLASSNAME$17);
|
|
1578
1658
|
|
|
1579
1659
|
/**
|
|
1580
1660
|
* Component default props.
|
|
@@ -1640,17 +1720,16 @@ const Chip = forwardRef((props, ref) => {
|
|
|
1640
1720
|
...forwardedProps,
|
|
1641
1721
|
href: !disabledStateProps.disabled ? href : undefined,
|
|
1642
1722
|
ref: ref,
|
|
1643
|
-
className: classNames.join(className,
|
|
1644
|
-
clickable: isClickable,
|
|
1645
|
-
color: chipColor,
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
highlighted: Boolean(isHighlighted),
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
unselected: Boolean(!isSelected)
|
|
1723
|
+
className: classNames.join(className, block$Y({
|
|
1724
|
+
'is-clickable': isClickable,
|
|
1725
|
+
[`color-${chipColor}`]: Boolean(chipColor),
|
|
1726
|
+
'is-disabled': isAnyDisabled,
|
|
1727
|
+
'has-after': Boolean(after),
|
|
1728
|
+
'has-before': Boolean(before),
|
|
1729
|
+
'is-highlighted': Boolean(isHighlighted),
|
|
1730
|
+
'is-selected': Boolean(isSelected),
|
|
1731
|
+
[`size-${size}`]: Boolean(size),
|
|
1732
|
+
'is-unselected': Boolean(!isSelected)
|
|
1654
1733
|
})),
|
|
1655
1734
|
"aria-disabled": isClickable && isAnyDisabled || undefined,
|
|
1656
1735
|
onClick: hasOnClick ? onClick : undefined,
|
|
@@ -1659,20 +1738,20 @@ const Chip = forwardRef((props, ref) => {
|
|
|
1659
1738
|
/*#__PURE__*/
|
|
1660
1739
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
1661
1740
|
jsx("div", {
|
|
1662
|
-
className:
|
|
1663
|
-
|
|
1741
|
+
className: element$I('before', {
|
|
1742
|
+
'is-clickable': hasBeforeClick
|
|
1664
1743
|
}),
|
|
1665
1744
|
onClick: handleOnBeforeClick,
|
|
1666
1745
|
children: before
|
|
1667
1746
|
}), /*#__PURE__*/jsx("div", {
|
|
1668
|
-
className:
|
|
1747
|
+
className: element$I('label'),
|
|
1669
1748
|
children: children
|
|
1670
1749
|
}), after &&
|
|
1671
1750
|
/*#__PURE__*/
|
|
1672
1751
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
1673
1752
|
jsx("div", {
|
|
1674
|
-
className:
|
|
1675
|
-
|
|
1753
|
+
className: element$I('after', {
|
|
1754
|
+
'is-clickable': hasAfterClick
|
|
1676
1755
|
}),
|
|
1677
1756
|
onClick: handleOnAfterClick,
|
|
1678
1757
|
children: after
|
|
@@ -1799,6 +1878,10 @@ const COMPONENT_NAME$17 = 'CommentBlock';
|
|
|
1799
1878
|
* Component default class name and class prefix.
|
|
1800
1879
|
*/
|
|
1801
1880
|
const CLASSNAME$15 = 'lumx-comment-block';
|
|
1881
|
+
const {
|
|
1882
|
+
block: block$X,
|
|
1883
|
+
element: element$H
|
|
1884
|
+
} = classNames.bem(CLASSNAME$15);
|
|
1802
1885
|
|
|
1803
1886
|
/**
|
|
1804
1887
|
* Component default props.
|
|
@@ -1839,64 +1922,63 @@ const CommentBlock = forwardRef((props, ref) => {
|
|
|
1839
1922
|
const hasChildren = Children.count(children) > 0;
|
|
1840
1923
|
return /*#__PURE__*/jsxs("div", {
|
|
1841
1924
|
ref: ref,
|
|
1842
|
-
className: classNames.join(className,
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
isRelevant,
|
|
1847
|
-
|
|
1848
|
-
theme
|
|
1925
|
+
className: classNames.join(className, block$X({
|
|
1926
|
+
'has-children': hasChildren && isOpen,
|
|
1927
|
+
'has-indented-children': hasChildren && variant === CommentBlockVariant.indented,
|
|
1928
|
+
'has-linear-children': hasChildren && variant === CommentBlockVariant.linear,
|
|
1929
|
+
'is-relevant': isRelevant,
|
|
1930
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
1849
1931
|
})),
|
|
1850
1932
|
...forwardedProps,
|
|
1851
1933
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1852
|
-
className:
|
|
1934
|
+
className: element$H('wrapper'),
|
|
1853
1935
|
children: [/*#__PURE__*/jsx("div", {
|
|
1854
|
-
className:
|
|
1936
|
+
className: element$H('avatar'),
|
|
1855
1937
|
children: /*#__PURE__*/jsx(Avatar, {
|
|
1856
1938
|
...avatarProps,
|
|
1857
1939
|
size: Size$1.m,
|
|
1858
1940
|
onClick: onClick
|
|
1859
1941
|
})
|
|
1860
1942
|
}), /*#__PURE__*/jsxs("div", {
|
|
1861
|
-
className:
|
|
1943
|
+
className: element$H('container'),
|
|
1862
1944
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1863
|
-
className:
|
|
1945
|
+
className: element$H('content'),
|
|
1864
1946
|
children: [/*#__PURE__*/jsxs("div", {
|
|
1865
|
-
className:
|
|
1947
|
+
className: element$H('meta'),
|
|
1866
1948
|
children: [name &&
|
|
1867
1949
|
/*#__PURE__*/
|
|
1868
1950
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
1869
1951
|
jsx("span", {
|
|
1870
|
-
className:
|
|
1952
|
+
className: element$H('name'),
|
|
1871
1953
|
onClick: onClick,
|
|
1872
1954
|
onMouseEnter: onMouseEnter,
|
|
1873
1955
|
onMouseLeave: onMouseLeave,
|
|
1874
1956
|
children: name
|
|
1875
1957
|
}), headerActions && /*#__PURE__*/jsx("span", {
|
|
1876
|
-
className:
|
|
1958
|
+
className: element$H('header-actions'),
|
|
1877
1959
|
children: headerActions
|
|
1878
1960
|
})]
|
|
1879
1961
|
}), /*#__PURE__*/jsx("div", {
|
|
1880
|
-
className:
|
|
1962
|
+
className: element$H('text'),
|
|
1881
1963
|
children: text
|
|
1882
1964
|
}), date && (fullDate ? /*#__PURE__*/jsx(Tooltip, {
|
|
1883
1965
|
label: fullDate,
|
|
1884
1966
|
placement: "top",
|
|
1885
1967
|
children: /*#__PURE__*/jsx("span", {
|
|
1886
|
-
className:
|
|
1968
|
+
className: element$H('date'),
|
|
1887
1969
|
children: date
|
|
1888
1970
|
})
|
|
1889
1971
|
}) : /*#__PURE__*/jsx("span", {
|
|
1890
|
-
className:
|
|
1972
|
+
className: element$H('date'),
|
|
1891
1973
|
children: date
|
|
1892
1974
|
}))]
|
|
1893
1975
|
}), hasActions && /*#__PURE__*/jsx("div", {
|
|
1894
|
-
className:
|
|
1976
|
+
className: element$H('actions'),
|
|
1895
1977
|
children: actions
|
|
1896
1978
|
})]
|
|
1897
1979
|
})]
|
|
1898
1980
|
}), hasChildren && isOpen && /*#__PURE__*/jsx("div", {
|
|
1899
|
-
className:
|
|
1981
|
+
className: element$H('children'),
|
|
1900
1982
|
children: children
|
|
1901
1983
|
})]
|
|
1902
1984
|
});
|
|
@@ -2146,6 +2228,14 @@ function formatDayNumber(locale, date) {
|
|
|
2146
2228
|
return formattedDate;
|
|
2147
2229
|
}
|
|
2148
2230
|
|
|
2231
|
+
const {
|
|
2232
|
+
element: element$G
|
|
2233
|
+
} = classNames.bem(CLASSNAME$14);
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* Defines the props of the component.
|
|
2237
|
+
*/
|
|
2238
|
+
|
|
2149
2239
|
/**
|
|
2150
2240
|
* Component display name.
|
|
2151
2241
|
*/
|
|
@@ -2237,7 +2327,7 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2237
2327
|
className: `${CLASSNAME$14}`,
|
|
2238
2328
|
style: style,
|
|
2239
2329
|
children: [/*#__PURE__*/jsx(Toolbar, {
|
|
2240
|
-
className:
|
|
2330
|
+
className: element$G('toolbar'),
|
|
2241
2331
|
after: /*#__PURE__*/jsx(IconButton, {
|
|
2242
2332
|
...nextButtonProps,
|
|
2243
2333
|
emphasis: Emphasis$1.low,
|
|
@@ -2257,7 +2347,7 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2257
2347
|
dir: "auto",
|
|
2258
2348
|
children: monthYear
|
|
2259
2349
|
}), onMonthChange && /*#__PURE__*/jsx(FlexBox, {
|
|
2260
|
-
className:
|
|
2350
|
+
className: element$G('month'),
|
|
2261
2351
|
orientation: "horizontal",
|
|
2262
2352
|
hAlign: "center",
|
|
2263
2353
|
gap: "regular",
|
|
@@ -2272,7 +2362,7 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2272
2362
|
min: 0,
|
|
2273
2363
|
onBlur: updateYear,
|
|
2274
2364
|
onKeyPress: updateYearOnEnterPressed,
|
|
2275
|
-
className:
|
|
2365
|
+
className: element$G('year')
|
|
2276
2366
|
}, "year") : /*#__PURE__*/jsx(Text, {
|
|
2277
2367
|
as: "p",
|
|
2278
2368
|
children: part
|
|
@@ -2280,17 +2370,17 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2280
2370
|
})]
|
|
2281
2371
|
})
|
|
2282
2372
|
}), /*#__PURE__*/jsxs("div", {
|
|
2283
|
-
className:
|
|
2373
|
+
className: element$G('calendar'),
|
|
2284
2374
|
children: [/*#__PURE__*/jsx("div", {
|
|
2285
|
-
className:
|
|
2375
|
+
className: classNames.join(element$G('week-days'), element$G('days-wrapper')),
|
|
2286
2376
|
children: weekDays.map(({
|
|
2287
2377
|
letter,
|
|
2288
2378
|
number,
|
|
2289
2379
|
long
|
|
2290
2380
|
}) => /*#__PURE__*/jsxs("div", {
|
|
2291
|
-
className:
|
|
2381
|
+
className: element$G('day-wrapper'),
|
|
2292
2382
|
children: [/*#__PURE__*/jsx("span", {
|
|
2293
|
-
className:
|
|
2383
|
+
className: element$G('week-day'),
|
|
2294
2384
|
"aria-hidden": true,
|
|
2295
2385
|
children: letter.toLocaleUpperCase()
|
|
2296
2386
|
}), /*#__PURE__*/jsx("span", {
|
|
@@ -2299,7 +2389,7 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2299
2389
|
})]
|
|
2300
2390
|
}, number))
|
|
2301
2391
|
}), /*#__PURE__*/jsx("div", {
|
|
2302
|
-
className:
|
|
2392
|
+
className: classNames.join(element$G('month-days'), element$G('days-wrapper')),
|
|
2303
2393
|
children: weeks.flatMap((week, weekIndex) => {
|
|
2304
2394
|
return weekDays.map((weekDay, dayIndex) => {
|
|
2305
2395
|
const {
|
|
@@ -2310,11 +2400,11 @@ const DatePickerControlled = forwardRef((props, ref) => {
|
|
|
2310
2400
|
const isToday = !isOutOfRange && date && isSameDay(date, new Date());
|
|
2311
2401
|
const isSelected = date && value && isSameDay(value, date);
|
|
2312
2402
|
return /*#__PURE__*/jsx("div", {
|
|
2313
|
-
className:
|
|
2403
|
+
className: element$G('day-wrapper'),
|
|
2314
2404
|
children: date && /*#__PURE__*/jsxs(Button, {
|
|
2315
2405
|
ref: isSelected || !value && isToday ? todayOrSelectedDateRef : null,
|
|
2316
|
-
className:
|
|
2317
|
-
|
|
2406
|
+
className: element$G('month-day', {
|
|
2407
|
+
'is-today': isToday
|
|
2318
2408
|
}),
|
|
2319
2409
|
disabled: isOutOfRange,
|
|
2320
2410
|
isSelected: isSelected,
|
|
@@ -2997,6 +3087,10 @@ const COMPONENT_NAME$13 = 'Dialog';
|
|
|
2997
3087
|
* Component default class name and class prefix.
|
|
2998
3088
|
*/
|
|
2999
3089
|
const CLASSNAME$13 = 'lumx-dialog';
|
|
3090
|
+
const {
|
|
3091
|
+
block: block$W,
|
|
3092
|
+
element: element$F
|
|
3093
|
+
} = classNames.bem(CLASSNAME$13);
|
|
3000
3094
|
|
|
3001
3095
|
/**
|
|
3002
3096
|
* Component default props.
|
|
@@ -3107,24 +3201,23 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
3107
3201
|
children: /*#__PURE__*/jsxs("div", {
|
|
3108
3202
|
ref: mergeRefs(rootRef, ref),
|
|
3109
3203
|
...forwardedProps,
|
|
3110
|
-
className: classNames.join(className,
|
|
3111
|
-
|
|
3112
|
-
isLoading,
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
size
|
|
3204
|
+
className: classNames.join(className, block$W({
|
|
3205
|
+
'is-hidden': !isOpen,
|
|
3206
|
+
'is-loading': isLoading,
|
|
3207
|
+
'is-shown': isOpen || isVisible,
|
|
3208
|
+
[`size-${size}`]: Boolean(size)
|
|
3116
3209
|
})),
|
|
3117
3210
|
style: {
|
|
3118
3211
|
zIndex
|
|
3119
3212
|
},
|
|
3120
3213
|
children: [/*#__PURE__*/jsx("div", {
|
|
3121
|
-
className:
|
|
3214
|
+
className: element$F('overlay')
|
|
3122
3215
|
}), /*#__PURE__*/jsx(HeadingLevelProvider, {
|
|
3123
3216
|
level: 2,
|
|
3124
3217
|
children: /*#__PURE__*/jsx(ThemeProvider, {
|
|
3125
3218
|
value: undefined,
|
|
3126
3219
|
children: /*#__PURE__*/jsx("div", {
|
|
3127
|
-
className:
|
|
3220
|
+
className: element$F('container'),
|
|
3128
3221
|
role: "dialog",
|
|
3129
3222
|
"aria-modal": "true",
|
|
3130
3223
|
...dialogProps,
|
|
@@ -3133,28 +3226,36 @@ const Dialog = forwardRef((props, ref) => {
|
|
|
3133
3226
|
childrenRefs: clickAwayRefs,
|
|
3134
3227
|
parentRef: rootRef,
|
|
3135
3228
|
children: /*#__PURE__*/jsxs("section", {
|
|
3136
|
-
className:
|
|
3229
|
+
className: element$F('wrapper'),
|
|
3137
3230
|
ref: wrapperRef,
|
|
3138
3231
|
children: [(header || headerChildContent) && /*#__PURE__*/jsxs("header", {
|
|
3139
3232
|
...headerChildProps,
|
|
3140
|
-
className: classNames.join(
|
|
3233
|
+
className: classNames.join(element$F('header', {
|
|
3234
|
+
'has-divider': Boolean(forceHeaderDivider || hasTopIntersection)
|
|
3235
|
+
}), headerChildProps?.className),
|
|
3141
3236
|
children: [header, headerChildContent]
|
|
3142
3237
|
}), /*#__PURE__*/jsxs("div", {
|
|
3143
3238
|
ref: mergeRefs(contentRef, localContentRef),
|
|
3144
|
-
className:
|
|
3239
|
+
className: element$F('content'),
|
|
3145
3240
|
children: [/*#__PURE__*/jsx("div", {
|
|
3146
|
-
className:
|
|
3241
|
+
className: element$F('sentinel', {
|
|
3242
|
+
top: true
|
|
3243
|
+
}),
|
|
3147
3244
|
ref: setSentinelTop
|
|
3148
3245
|
}), content, /*#__PURE__*/jsx("div", {
|
|
3149
|
-
className:
|
|
3246
|
+
className: element$F('sentinel', {
|
|
3247
|
+
bottom: true
|
|
3248
|
+
}),
|
|
3150
3249
|
ref: setSentinelBottom
|
|
3151
3250
|
})]
|
|
3152
3251
|
}), (footer || footerChildContent) && /*#__PURE__*/jsxs("footer", {
|
|
3153
3252
|
...footerChildProps,
|
|
3154
|
-
className: classNames.join(
|
|
3253
|
+
className: classNames.join(element$F('footer', {
|
|
3254
|
+
'has-divider': Boolean(forceFooterDivider || hasBottomIntersection)
|
|
3255
|
+
}), footerChildProps?.className),
|
|
3155
3256
|
children: [footer, footerChildContent]
|
|
3156
3257
|
}), isLoading && /*#__PURE__*/jsx("div", {
|
|
3157
|
-
className:
|
|
3258
|
+
className: element$F('progress-overlay'),
|
|
3158
3259
|
children: /*#__PURE__*/jsx(Progress, {
|
|
3159
3260
|
variant: ProgressVariant.circular
|
|
3160
3261
|
})
|
|
@@ -3180,6 +3281,9 @@ const COMPONENT_NAME$12 = 'Divider';
|
|
|
3180
3281
|
* Component default class name and class prefix.
|
|
3181
3282
|
*/
|
|
3182
3283
|
const CLASSNAME$12 = 'lumx-divider';
|
|
3284
|
+
const {
|
|
3285
|
+
block: block$V
|
|
3286
|
+
} = classNames.bem(CLASSNAME$12);
|
|
3183
3287
|
|
|
3184
3288
|
/**
|
|
3185
3289
|
* Component default props.
|
|
@@ -3203,9 +3307,8 @@ const Divider = forwardRef((props, ref) => {
|
|
|
3203
3307
|
return /*#__PURE__*/jsx("hr", {
|
|
3204
3308
|
ref: ref,
|
|
3205
3309
|
...forwardedProps,
|
|
3206
|
-
className: classNames.join(className,
|
|
3207
|
-
|
|
3208
|
-
theme
|
|
3310
|
+
className: classNames.join(className, block$V({
|
|
3311
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
3209
3312
|
}))
|
|
3210
3313
|
});
|
|
3211
3314
|
});
|
|
@@ -3222,6 +3325,9 @@ const COMPONENT_NAME$11 = 'DragHandle';
|
|
|
3222
3325
|
* Component default class name and class prefix.
|
|
3223
3326
|
*/
|
|
3224
3327
|
const CLASSNAME$11 = 'lumx-drag-handle';
|
|
3328
|
+
const {
|
|
3329
|
+
block: block$U
|
|
3330
|
+
} = classNames.bem(CLASSNAME$11);
|
|
3225
3331
|
|
|
3226
3332
|
/**
|
|
3227
3333
|
* DragHandle component.
|
|
@@ -3240,9 +3346,8 @@ const DragHandle = forwardRef((props, ref) => {
|
|
|
3240
3346
|
return /*#__PURE__*/jsx("div", {
|
|
3241
3347
|
ref: ref,
|
|
3242
3348
|
...forwardedProps,
|
|
3243
|
-
className: classNames.join(className,
|
|
3244
|
-
|
|
3245
|
-
theme
|
|
3349
|
+
className: classNames.join(className, block$U({
|
|
3350
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
3246
3351
|
})),
|
|
3247
3352
|
children: /*#__PURE__*/jsx(Icon, {
|
|
3248
3353
|
icon: mdiDragVertical,
|
|
@@ -3427,6 +3532,9 @@ const COMPONENT_NAME$10 = 'List';
|
|
|
3427
3532
|
* Component default class name and class prefix.
|
|
3428
3533
|
*/
|
|
3429
3534
|
const CLASSNAME$10 = 'lumx-list';
|
|
3535
|
+
const {
|
|
3536
|
+
block: block$T
|
|
3537
|
+
} = classNames.bem(CLASSNAME$10);
|
|
3430
3538
|
|
|
3431
3539
|
/**
|
|
3432
3540
|
* Component default props.
|
|
@@ -3453,11 +3561,11 @@ const InternalList = forwardRef((props, ref) => {
|
|
|
3453
3561
|
tabIndex = DEFAULT_PROPS$T.tabIndex,
|
|
3454
3562
|
...forwardedProps
|
|
3455
3563
|
} = props;
|
|
3564
|
+
const adjustedItemPadding = itemPadding ?? (isClickable ? Size$1.big : undefined);
|
|
3456
3565
|
return /*#__PURE__*/jsx("ul", {
|
|
3457
3566
|
...forwardedProps,
|
|
3458
|
-
className: classNames.join(className,
|
|
3459
|
-
|
|
3460
|
-
itemPadding: itemPadding ?? (isClickable ? Size$1.big : undefined)
|
|
3567
|
+
className: classNames.join(className, block$T({
|
|
3568
|
+
[`item-padding-${adjustedItemPadding}`]: Boolean(adjustedItemPadding)
|
|
3461
3569
|
})),
|
|
3462
3570
|
tabIndex: tabIndex,
|
|
3463
3571
|
ref: ref,
|
|
@@ -5903,6 +6011,10 @@ const COMPONENT_NAME$$ = 'Popover';
|
|
|
5903
6011
|
* Component default class name and class prefix.
|
|
5904
6012
|
*/
|
|
5905
6013
|
const CLASSNAME$$ = 'lumx-popover';
|
|
6014
|
+
const {
|
|
6015
|
+
block: block$S,
|
|
6016
|
+
element: element$E
|
|
6017
|
+
} = classNames.bem(CLASSNAME$$);
|
|
5906
6018
|
|
|
5907
6019
|
/**
|
|
5908
6020
|
* Component default props.
|
|
@@ -5977,17 +6089,17 @@ const _InnerPopover = forwardRef((props, ref) => {
|
|
|
5977
6089
|
useFocusTrap(withFocusTrap && isOpen && focusZoneElement, focusElement?.current);
|
|
5978
6090
|
const clickAwayRefs = useRef([popoverRef, anchorRef]);
|
|
5979
6091
|
const mergedRefs = useMergeRefs(setPopperElement, ref, popoverRef);
|
|
6092
|
+
const adjustedElevation = Math.min(elevation || 0, 5);
|
|
5980
6093
|
return isOpen ? /*#__PURE__*/jsx(Portal, {
|
|
5981
6094
|
enabled: usePortal,
|
|
5982
6095
|
children: /*#__PURE__*/jsxs(Component, {
|
|
5983
6096
|
...forwardedProps,
|
|
5984
6097
|
ref: mergedRefs,
|
|
5985
|
-
className: classNames.join(className,
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
isInitializing: !styles.popover?.transform
|
|
6098
|
+
className: classNames.join(className, block$S({
|
|
6099
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
6100
|
+
[`elevation-${adjustedElevation}`]: Boolean(adjustedElevation),
|
|
6101
|
+
[`position-${position}`]: Boolean(position),
|
|
6102
|
+
'is-initializing': !styles.popover?.transform
|
|
5991
6103
|
})),
|
|
5992
6104
|
style: styles.popover,
|
|
5993
6105
|
...attributes.popper,
|
|
@@ -5996,7 +6108,7 @@ const _InnerPopover = forwardRef((props, ref) => {
|
|
|
5996
6108
|
childrenRefs: clickAwayRefs,
|
|
5997
6109
|
children: [hasArrow && /*#__PURE__*/jsx("div", {
|
|
5998
6110
|
ref: setArrowElement,
|
|
5999
|
-
className:
|
|
6111
|
+
className: element$E('arrow'),
|
|
6000
6112
|
style: styles.arrow,
|
|
6001
6113
|
children: /*#__PURE__*/jsx("svg", {
|
|
6002
6114
|
viewBox: "0 0 14 14",
|
|
@@ -6079,6 +6191,10 @@ const COMPONENT_NAME$_ = 'Dropdown';
|
|
|
6079
6191
|
* Component default class name and class prefix.
|
|
6080
6192
|
*/
|
|
6081
6193
|
const CLASSNAME$_ = 'lumx-dropdown';
|
|
6194
|
+
const {
|
|
6195
|
+
block: block$R,
|
|
6196
|
+
element: element$D
|
|
6197
|
+
} = classNames.bem(CLASSNAME$_);
|
|
6082
6198
|
|
|
6083
6199
|
/**
|
|
6084
6200
|
* Component default props.
|
|
@@ -6142,7 +6258,7 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
6142
6258
|
...forwardedProps,
|
|
6143
6259
|
focusAnchorOnClose: focusAnchorOnClose,
|
|
6144
6260
|
anchorRef: anchorRef,
|
|
6145
|
-
className: classNames.join(className,
|
|
6261
|
+
className: classNames.join(className, block$R()),
|
|
6146
6262
|
elevation: 0,
|
|
6147
6263
|
closeOnClickAway: closeOnClickAway,
|
|
6148
6264
|
closeOnEscape: closeOnEscape,
|
|
@@ -6155,7 +6271,7 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
6155
6271
|
placement: placement,
|
|
6156
6272
|
zIndex: zIndex,
|
|
6157
6273
|
children: /*#__PURE__*/jsx("div", {
|
|
6158
|
-
className:
|
|
6274
|
+
className: element$D('menu'),
|
|
6159
6275
|
ref: innerRef,
|
|
6160
6276
|
children: popperElement
|
|
6161
6277
|
})
|
|
@@ -6174,6 +6290,10 @@ const COMPONENT_NAME$Z = 'ExpansionPanel';
|
|
|
6174
6290
|
* Component default class name and class prefix.
|
|
6175
6291
|
*/
|
|
6176
6292
|
const CLASSNAME$Z = 'lumx-expansion-panel';
|
|
6293
|
+
const {
|
|
6294
|
+
block: block$Q,
|
|
6295
|
+
element: element$C
|
|
6296
|
+
} = classNames.bem(CLASSNAME$Z);
|
|
6177
6297
|
|
|
6178
6298
|
/**
|
|
6179
6299
|
* Component default props.
|
|
@@ -6217,7 +6337,7 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
6217
6337
|
// Either take the header in children or create one with the label.
|
|
6218
6338
|
const headerProps = /*#__PURE__*/React__default.isValidElement(header) ? header.props : {};
|
|
6219
6339
|
const headerContent = !isEmpty(headerProps.children) ? headerProps.children : /*#__PURE__*/jsx("span", {
|
|
6220
|
-
className:
|
|
6340
|
+
className: element$C('label'),
|
|
6221
6341
|
children: label
|
|
6222
6342
|
});
|
|
6223
6343
|
const toggleOpen = event => {
|
|
@@ -6233,15 +6353,14 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
6233
6353
|
}
|
|
6234
6354
|
};
|
|
6235
6355
|
const color = theme === Theme$1.dark ? ColorPalette$1.light : ColorPalette$1.dark;
|
|
6236
|
-
const rootClassName = classNames.join(className,
|
|
6237
|
-
hasBackground,
|
|
6238
|
-
|
|
6239
|
-
hasHeaderDivider,
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
isOpen,
|
|
6243
|
-
|
|
6244
|
-
theme
|
|
6356
|
+
const rootClassName = classNames.join(className, block$Q({
|
|
6357
|
+
'has-background': hasBackground,
|
|
6358
|
+
'has-header': Boolean(!isEmpty(headerProps.children)),
|
|
6359
|
+
'has-header-divider': hasHeaderDivider,
|
|
6360
|
+
'is-close': !isOpen,
|
|
6361
|
+
'is-draggable': Boolean(dragHandle),
|
|
6362
|
+
'is-open': isOpen,
|
|
6363
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
6245
6364
|
}));
|
|
6246
6365
|
const wrapperRef = useRef(null);
|
|
6247
6366
|
|
|
@@ -6277,17 +6396,17 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
6277
6396
|
...forwardedProps,
|
|
6278
6397
|
className: rootClassName,
|
|
6279
6398
|
children: [/*#__PURE__*/jsxs("header", {
|
|
6280
|
-
className:
|
|
6399
|
+
className: element$C('header'),
|
|
6281
6400
|
onClick: toggleOpen,
|
|
6282
6401
|
children: [dragHandle && /*#__PURE__*/jsx("div", {
|
|
6283
|
-
className:
|
|
6402
|
+
className: element$C('header-drag'),
|
|
6284
6403
|
children: dragHandle
|
|
6285
6404
|
}), /*#__PURE__*/jsx("div", {
|
|
6286
6405
|
...headerProps,
|
|
6287
|
-
className:
|
|
6406
|
+
className: element$C('header-content'),
|
|
6288
6407
|
children: headerContent
|
|
6289
6408
|
}), /*#__PURE__*/jsx("div", {
|
|
6290
|
-
className:
|
|
6409
|
+
className: element$C('header-toggle'),
|
|
6291
6410
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
6292
6411
|
...toggleButtonProps,
|
|
6293
6412
|
color: color,
|
|
@@ -6297,15 +6416,15 @@ const ExpansionPanel = forwardRef((props, ref) => {
|
|
|
6297
6416
|
})
|
|
6298
6417
|
})]
|
|
6299
6418
|
}), /*#__PURE__*/jsx("div", {
|
|
6300
|
-
className:
|
|
6419
|
+
className: element$C('wrapper'),
|
|
6301
6420
|
ref: wrapperRef,
|
|
6302
6421
|
children: (isOpen || isChildrenVisible) && /*#__PURE__*/jsxs("div", {
|
|
6303
|
-
className:
|
|
6422
|
+
className: element$C('container'),
|
|
6304
6423
|
children: [/*#__PURE__*/jsx("div", {
|
|
6305
|
-
className:
|
|
6424
|
+
className: element$C('content'),
|
|
6306
6425
|
children: content
|
|
6307
6426
|
}), footer && /*#__PURE__*/jsx("div", {
|
|
6308
|
-
className:
|
|
6427
|
+
className: element$C('footer'),
|
|
6309
6428
|
children: footer
|
|
6310
6429
|
})]
|
|
6311
6430
|
})
|
|
@@ -6319,52 +6438,78 @@ ExpansionPanel.defaultProps = DEFAULT_PROPS$Q;
|
|
|
6319
6438
|
const COMPONENT_NAME$Y = 'Flag';
|
|
6320
6439
|
const CLASSNAME$Y = 'lumx-flag';
|
|
6321
6440
|
const DEFAULT_PROPS$P = {};
|
|
6441
|
+
const {
|
|
6442
|
+
block: block$P,
|
|
6443
|
+
element: element$B
|
|
6444
|
+
} = bem(CLASSNAME$Y);
|
|
6322
6445
|
|
|
6323
6446
|
/**
|
|
6324
6447
|
* Flag component.
|
|
6325
6448
|
*
|
|
6326
6449
|
* @param props Component props.
|
|
6327
|
-
* @
|
|
6328
|
-
* @return React element.
|
|
6450
|
+
* @return JSX element.
|
|
6329
6451
|
*/
|
|
6330
|
-
const Flag =
|
|
6331
|
-
const defaultTheme = useTheme() || Theme$1.light;
|
|
6452
|
+
const Flag$1 = (props, nestedComponents) => {
|
|
6332
6453
|
const {
|
|
6333
|
-
|
|
6454
|
+
Text
|
|
6455
|
+
} = nestedComponents || {};
|
|
6456
|
+
const {
|
|
6457
|
+
children,
|
|
6334
6458
|
icon,
|
|
6335
6459
|
color,
|
|
6336
6460
|
className,
|
|
6337
|
-
theme
|
|
6461
|
+
theme,
|
|
6338
6462
|
truncate,
|
|
6339
6463
|
...forwardedProps
|
|
6340
6464
|
} = props;
|
|
6341
|
-
const flagColor = color || (theme === Theme
|
|
6465
|
+
const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);
|
|
6342
6466
|
const isTruncated = !!truncate;
|
|
6343
6467
|
return /*#__PURE__*/jsxs("div", {
|
|
6344
6468
|
...forwardedProps,
|
|
6345
|
-
className:
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
isTruncated
|
|
6469
|
+
className: classnames(className, block$P({
|
|
6470
|
+
[`color-${flagColor}`]: Boolean(flagColor),
|
|
6471
|
+
'is-truncated': isTruncated
|
|
6349
6472
|
})),
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
className: `${CLASSNAME$Y}__icon`
|
|
6473
|
+
children: [icon && Icon$1({
|
|
6474
|
+
icon,
|
|
6475
|
+
size: Size.xxs,
|
|
6476
|
+
className: element$B('icon')
|
|
6355
6477
|
}), /*#__PURE__*/jsx(Text, {
|
|
6356
6478
|
as: "span",
|
|
6357
|
-
truncate:
|
|
6479
|
+
truncate: !!props.truncate,
|
|
6358
6480
|
typography: "overline",
|
|
6359
|
-
className:
|
|
6360
|
-
children:
|
|
6481
|
+
className: element$B('label'),
|
|
6482
|
+
children: children
|
|
6361
6483
|
})]
|
|
6362
6484
|
});
|
|
6485
|
+
};
|
|
6486
|
+
|
|
6487
|
+
/**
|
|
6488
|
+
* Flag component.
|
|
6489
|
+
*
|
|
6490
|
+
* @param props Component props.
|
|
6491
|
+
* @param ref Component ref.
|
|
6492
|
+
* @return React element.
|
|
6493
|
+
*/
|
|
6494
|
+
const Flag = forwardRef((props, ref) => {
|
|
6495
|
+
const defaultTheme = useTheme() || Theme$1.light;
|
|
6496
|
+
return Flag$1({
|
|
6497
|
+
...props,
|
|
6498
|
+
theme: props.theme || defaultTheme,
|
|
6499
|
+
ref,
|
|
6500
|
+
children: props.label
|
|
6501
|
+
}, {
|
|
6502
|
+
Text
|
|
6503
|
+
});
|
|
6363
6504
|
});
|
|
6364
6505
|
Flag.displayName = COMPONENT_NAME$Y;
|
|
6365
6506
|
Flag.className = CLASSNAME$Y;
|
|
6366
6507
|
Flag.defaultProps = DEFAULT_PROPS$P;
|
|
6367
6508
|
|
|
6509
|
+
/**
|
|
6510
|
+
* Defines the props of the component.
|
|
6511
|
+
*/
|
|
6512
|
+
|
|
6368
6513
|
/**
|
|
6369
6514
|
* Component display name.
|
|
6370
6515
|
*/
|
|
@@ -6374,39 +6519,61 @@ const COMPONENT_NAME$X = 'FlexBox';
|
|
|
6374
6519
|
* Component default class name and class prefix.
|
|
6375
6520
|
*/
|
|
6376
6521
|
const CLASSNAME$X = 'lumx-flex-box';
|
|
6522
|
+
const {
|
|
6523
|
+
block: block$O
|
|
6524
|
+
} = bem(CLASSNAME$X);
|
|
6377
6525
|
|
|
6378
6526
|
/**
|
|
6379
|
-
* FlexBox component.
|
|
6527
|
+
* Get FlexBox component props (className computation).
|
|
6380
6528
|
*
|
|
6381
6529
|
* @param props Component props.
|
|
6382
|
-
* @
|
|
6383
|
-
* @return React element.
|
|
6530
|
+
* @return Computed props with className.
|
|
6384
6531
|
*/
|
|
6385
|
-
|
|
6532
|
+
function getFlexBoxProps(props) {
|
|
6386
6533
|
const {
|
|
6387
|
-
as: Component = 'div',
|
|
6388
|
-
children,
|
|
6389
6534
|
className,
|
|
6390
6535
|
fillSpace,
|
|
6391
6536
|
gap,
|
|
6392
6537
|
hAlign,
|
|
6393
6538
|
marginAuto,
|
|
6394
6539
|
noShrink,
|
|
6395
|
-
orientation,
|
|
6396
6540
|
vAlign,
|
|
6397
6541
|
wrap,
|
|
6542
|
+
orientation,
|
|
6543
|
+
...forwardedProps
|
|
6544
|
+
} = props;
|
|
6545
|
+
const adjustedOrientation = orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null);
|
|
6546
|
+
return {
|
|
6547
|
+
...forwardedProps,
|
|
6548
|
+
className: classnames(className, block$O({
|
|
6549
|
+
[`orientation-${adjustedOrientation}`]: Boolean(adjustedOrientation),
|
|
6550
|
+
[`v-align-${vAlign}`]: Boolean(vAlign),
|
|
6551
|
+
[`h-align-${hAlign}`]: Boolean(hAlign),
|
|
6552
|
+
[`gap-${gap}`]: Boolean(gap),
|
|
6553
|
+
wrap: Boolean(wrap),
|
|
6554
|
+
'fill-space': fillSpace,
|
|
6555
|
+
'no-shrink': noShrink,
|
|
6556
|
+
...Object.fromEntries(castArray(marginAuto).filter(Boolean).map(align => [`margin-auto-${align}`, true]))
|
|
6557
|
+
}))
|
|
6558
|
+
};
|
|
6559
|
+
}
|
|
6560
|
+
|
|
6561
|
+
/**
|
|
6562
|
+
* FlexBox component.
|
|
6563
|
+
*
|
|
6564
|
+
* @param props Component props.
|
|
6565
|
+
* @param ref Component ref.
|
|
6566
|
+
* @return React element.
|
|
6567
|
+
*/
|
|
6568
|
+
const FlexBox = forwardRef((props, ref) => {
|
|
6569
|
+
const {
|
|
6570
|
+
as: Component = 'div',
|
|
6571
|
+
children,
|
|
6398
6572
|
...forwardedProps
|
|
6399
6573
|
} = props;
|
|
6400
6574
|
return /*#__PURE__*/jsx(Component, {
|
|
6401
6575
|
ref: ref,
|
|
6402
|
-
...forwardedProps,
|
|
6403
|
-
className: classNames.join(className, handleBasicClasses({
|
|
6404
|
-
prefix: CLASSNAME$X,
|
|
6405
|
-
orientation: orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null),
|
|
6406
|
-
vAlign,
|
|
6407
|
-
hAlign,
|
|
6408
|
-
gap
|
|
6409
|
-
}), wrap && `${CLASSNAME$X}--wrap`, fillSpace && `${CLASSNAME$X}--fill-space`, noShrink && `${CLASSNAME$X}--no-shrink`, marginAuto && castArray(marginAuto).map(align => `${CLASSNAME$X}--margin-auto-${align}`)),
|
|
6576
|
+
...getFlexBoxProps(forwardedProps),
|
|
6410
6577
|
children: children
|
|
6411
6578
|
});
|
|
6412
6579
|
});
|
|
@@ -6422,13 +6589,17 @@ const COMPONENT_NAME$W = 'GenericBlock';
|
|
|
6422
6589
|
* Component default class name and class prefix.
|
|
6423
6590
|
*/
|
|
6424
6591
|
const CLASSNAME$W = 'lumx-generic-block';
|
|
6592
|
+
const {
|
|
6593
|
+
block: block$N,
|
|
6594
|
+
element: element$A
|
|
6595
|
+
} = classNames.bem(CLASSNAME$W);
|
|
6425
6596
|
|
|
6426
6597
|
/**
|
|
6427
6598
|
* Component default props.
|
|
6428
6599
|
*/
|
|
6429
6600
|
const DEFAULT_PROPS$O = {
|
|
6430
6601
|
gap: Size$1.big,
|
|
6431
|
-
orientation: Orientation.horizontal
|
|
6602
|
+
orientation: Orientation$1.horizontal
|
|
6432
6603
|
};
|
|
6433
6604
|
const Figure = noop.bind({});
|
|
6434
6605
|
const isFigure = isComponentType(Figure);
|
|
@@ -6476,7 +6647,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
6476
6647
|
}, [children]);
|
|
6477
6648
|
return /*#__PURE__*/jsxs(FlexBox, {
|
|
6478
6649
|
ref: ref,
|
|
6479
|
-
className: classNames.join(className,
|
|
6650
|
+
className: classNames.join(className, block$N()),
|
|
6480
6651
|
gap: gap,
|
|
6481
6652
|
orientation: orientation,
|
|
6482
6653
|
...forwardedProps,
|
|
@@ -6486,17 +6657,17 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
6486
6657
|
hAlign: forwardedProps.hAlign,
|
|
6487
6658
|
...figureProps,
|
|
6488
6659
|
...sections.figureChildProps,
|
|
6489
|
-
className: classNames.join(figureProps?.className, sections.figureChildProps?.className,
|
|
6660
|
+
className: classNames.join(figureProps?.className, sections.figureChildProps?.className, element$A('figure')),
|
|
6490
6661
|
children: [figure, sections.figureChildProps?.children]
|
|
6491
6662
|
}), (sections.contentChildProps?.children || sections.otherChildren.length > 0) && /*#__PURE__*/jsxs(FlexBox, {
|
|
6492
6663
|
ref: sections.contentChild?.ref,
|
|
6493
|
-
orientation: Orientation.vertical,
|
|
6664
|
+
orientation: Orientation$1.vertical,
|
|
6494
6665
|
fillSpace: true,
|
|
6495
6666
|
vAlign: forwardedProps.vAlign,
|
|
6496
6667
|
hAlign: forwardedProps.hAlign,
|
|
6497
6668
|
...contentProps,
|
|
6498
6669
|
...sections.contentChildProps,
|
|
6499
|
-
className: classNames.join(contentProps?.className, sections.contentChildProps?.className,
|
|
6670
|
+
className: classNames.join(contentProps?.className, sections.contentChildProps?.className, element$A('content')),
|
|
6500
6671
|
children: [sections.contentChildProps?.children, sections.otherChildren]
|
|
6501
6672
|
}), (actions || sections.actionsChildProps?.children) && /*#__PURE__*/jsxs(FlexBox, {
|
|
6502
6673
|
ref: sections.actionsChild?.ref,
|
|
@@ -6504,7 +6675,7 @@ const BaseGenericBlock = forwardRef((props, ref) => {
|
|
|
6504
6675
|
hAlign: forwardedProps.hAlign,
|
|
6505
6676
|
...actionsProps,
|
|
6506
6677
|
...sections.actionsChildProps,
|
|
6507
|
-
className: classNames.join(actionsProps?.className, sections.actionsChildProps?.className,
|
|
6678
|
+
className: classNames.join(actionsProps?.className, sections.actionsChildProps?.className, element$A('actions')),
|
|
6508
6679
|
children: [actions, sections.actionsChildProps?.children]
|
|
6509
6680
|
})]
|
|
6510
6681
|
});
|
|
@@ -6523,6 +6694,67 @@ const GenericBlock = Object.assign(BaseGenericBlock, {
|
|
|
6523
6694
|
*/
|
|
6524
6695
|
const GenericBlockGapSize = pick(Size$1, ['tiny', 'regular', 'medium', 'big', 'huge']);
|
|
6525
6696
|
|
|
6697
|
+
/** The maximum authorized heading level. */
|
|
6698
|
+
const MAX_HEADING_LEVEL = 6;
|
|
6699
|
+
|
|
6700
|
+
/**
|
|
6701
|
+
* Typography to use by default depending on the heading level.
|
|
6702
|
+
*/
|
|
6703
|
+
const DEFAULT_TYPOGRAPHY_BY_LEVEL = {
|
|
6704
|
+
h1: Typography.display1,
|
|
6705
|
+
h2: Typography.headline,
|
|
6706
|
+
h3: Typography.title,
|
|
6707
|
+
h4: Typography.subtitle2,
|
|
6708
|
+
h5: Typography.subtitle1,
|
|
6709
|
+
h6: Typography.body2
|
|
6710
|
+
};
|
|
6711
|
+
const defaultContext = {
|
|
6712
|
+
level: 1,
|
|
6713
|
+
headingElement: 'h1'
|
|
6714
|
+
};
|
|
6715
|
+
|
|
6716
|
+
/**
|
|
6717
|
+
* Defines the props of the component.
|
|
6718
|
+
*/
|
|
6719
|
+
|
|
6720
|
+
/**
|
|
6721
|
+
* Component display name.
|
|
6722
|
+
*/
|
|
6723
|
+
const COMPONENT_NAME$V = 'Heading';
|
|
6724
|
+
|
|
6725
|
+
/**
|
|
6726
|
+
* Component default class name and class prefix.
|
|
6727
|
+
*/
|
|
6728
|
+
const CLASSNAME$V = 'lumx-heading';
|
|
6729
|
+
|
|
6730
|
+
/**
|
|
6731
|
+
* Component default props.
|
|
6732
|
+
*/
|
|
6733
|
+
const DEFAULT_PROPS$N = {};
|
|
6734
|
+
|
|
6735
|
+
/**
|
|
6736
|
+
* Get Heading component common props
|
|
6737
|
+
*
|
|
6738
|
+
* @param props Component props.
|
|
6739
|
+
* @param contextHeadingElement Heading element from context.
|
|
6740
|
+
* @return Common Props
|
|
6741
|
+
*/
|
|
6742
|
+
const getHeadingProps = (props, contextHeadingElement) => {
|
|
6743
|
+
const {
|
|
6744
|
+
as,
|
|
6745
|
+
className,
|
|
6746
|
+
typography,
|
|
6747
|
+
...otherProps
|
|
6748
|
+
} = props;
|
|
6749
|
+
const computedHeadingElement = as || contextHeadingElement || 'h1';
|
|
6750
|
+
return {
|
|
6751
|
+
...otherProps,
|
|
6752
|
+
as: computedHeadingElement,
|
|
6753
|
+
className: classnames(className, CLASSNAME$V),
|
|
6754
|
+
typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement]
|
|
6755
|
+
};
|
|
6756
|
+
};
|
|
6757
|
+
|
|
6526
6758
|
const DEFAULT_VALUE = {};
|
|
6527
6759
|
|
|
6528
6760
|
/**
|
|
@@ -6586,17 +6818,20 @@ function wrapChildrenIconWithSpaces(children) {
|
|
|
6586
6818
|
/**
|
|
6587
6819
|
* Component display name.
|
|
6588
6820
|
*/
|
|
6589
|
-
const COMPONENT_NAME$
|
|
6821
|
+
const COMPONENT_NAME$U = 'Text';
|
|
6590
6822
|
|
|
6591
6823
|
/**
|
|
6592
6824
|
* Component default class name and class prefix.
|
|
6593
6825
|
*/
|
|
6594
|
-
const CLASSNAME$
|
|
6826
|
+
const CLASSNAME$U = 'lumx-text';
|
|
6827
|
+
const {
|
|
6828
|
+
block: block$M
|
|
6829
|
+
} = bem(CLASSNAME$U);
|
|
6595
6830
|
|
|
6596
6831
|
/**
|
|
6597
6832
|
* Component default props.
|
|
6598
6833
|
*/
|
|
6599
|
-
const DEFAULT_PROPS$
|
|
6834
|
+
const DEFAULT_PROPS$M = {};
|
|
6600
6835
|
|
|
6601
6836
|
/**
|
|
6602
6837
|
* Text component common props
|
|
@@ -6632,11 +6867,11 @@ const getTextProps = props => {
|
|
|
6632
6867
|
'--lumx-text-white-space': whiteSpace
|
|
6633
6868
|
};
|
|
6634
6869
|
return {
|
|
6635
|
-
className: classnames(className,
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
}), typography$1 && typography(typography$1), color && font(color, colorVariant)
|
|
6870
|
+
className: classnames(className, block$M({
|
|
6871
|
+
'is-truncated': isTruncated && !isTruncatedMultiline,
|
|
6872
|
+
'is-truncated-multiline': isTruncatedMultiline,
|
|
6873
|
+
'no-wrap': noWrap
|
|
6874
|
+
}), typography$1 && typography(typography$1), color && font(color, colorVariant)),
|
|
6640
6875
|
style: {
|
|
6641
6876
|
...truncateLinesStyle,
|
|
6642
6877
|
...whiteSpaceStyle,
|
|
@@ -6681,29 +6916,10 @@ const Text = forwardRef((props, ref) => {
|
|
|
6681
6916
|
children: wrapChildrenIconWithSpaces(children)
|
|
6682
6917
|
});
|
|
6683
6918
|
});
|
|
6684
|
-
Text.displayName = COMPONENT_NAME$
|
|
6685
|
-
Text.className = CLASSNAME$
|
|
6686
|
-
Text.defaultProps = DEFAULT_PROPS$
|
|
6687
|
-
|
|
6688
|
-
/** The maximum authorized heading level. */
|
|
6689
|
-
const MAX_HEADING_LEVEL = 6;
|
|
6919
|
+
Text.displayName = COMPONENT_NAME$U;
|
|
6920
|
+
Text.className = CLASSNAME$U;
|
|
6921
|
+
Text.defaultProps = DEFAULT_PROPS$M;
|
|
6690
6922
|
|
|
6691
|
-
/**
|
|
6692
|
-
* Typography to use by default depending on the heading level.
|
|
6693
|
-
*/
|
|
6694
|
-
const DEFAULT_TYPOGRAPHY_BY_LEVEL = {
|
|
6695
|
-
h1: Typography.display1,
|
|
6696
|
-
h2: Typography.headline,
|
|
6697
|
-
h3: Typography.title,
|
|
6698
|
-
h4: Typography.subtitle2,
|
|
6699
|
-
h5: Typography.subtitle1,
|
|
6700
|
-
h6: Typography.body2
|
|
6701
|
-
};
|
|
6702
|
-
|
|
6703
|
-
const defaultContext = {
|
|
6704
|
-
level: 1,
|
|
6705
|
-
headingElement: 'h1'
|
|
6706
|
-
};
|
|
6707
6923
|
const HeadingLevelContext = /*#__PURE__*/createContext(defaultContext);
|
|
6708
6924
|
|
|
6709
6925
|
const useHeadingLevel = () => {
|
|
@@ -6717,21 +6933,6 @@ const useHeadingLevel = () => {
|
|
|
6717
6933
|
};
|
|
6718
6934
|
};
|
|
6719
6935
|
|
|
6720
|
-
/**
|
|
6721
|
-
* Component display name.
|
|
6722
|
-
*/
|
|
6723
|
-
const COMPONENT_NAME$U = 'Heading';
|
|
6724
|
-
|
|
6725
|
-
/**
|
|
6726
|
-
* Component default class name and class prefix.
|
|
6727
|
-
*/
|
|
6728
|
-
const CLASSNAME$U = 'lumx-heading';
|
|
6729
|
-
|
|
6730
|
-
/**
|
|
6731
|
-
* Component default props.
|
|
6732
|
-
*/
|
|
6733
|
-
const DEFAULT_PROPS$M = {};
|
|
6734
|
-
|
|
6735
6936
|
/**
|
|
6736
6937
|
* Renders a heading component.
|
|
6737
6938
|
* Extends the `Text` Component with the heading level automatically computed based on
|
|
@@ -6740,26 +6941,33 @@ const DEFAULT_PROPS$M = {};
|
|
|
6740
6941
|
const Heading = forwardRef((props, ref) => {
|
|
6741
6942
|
const {
|
|
6742
6943
|
children,
|
|
6743
|
-
|
|
6744
|
-
className,
|
|
6745
|
-
...forwardedProps
|
|
6944
|
+
...otherProps
|
|
6746
6945
|
} = props;
|
|
6747
6946
|
const {
|
|
6748
6947
|
headingElement
|
|
6749
6948
|
} = useHeadingLevel();
|
|
6750
|
-
const
|
|
6949
|
+
const headingProps = getHeadingProps(otherProps, headingElement);
|
|
6751
6950
|
return /*#__PURE__*/jsx(Text, {
|
|
6752
6951
|
ref: ref,
|
|
6753
|
-
|
|
6754
|
-
as: computedHeadingElement,
|
|
6755
|
-
typography: DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement],
|
|
6756
|
-
...forwardedProps,
|
|
6952
|
+
...headingProps,
|
|
6757
6953
|
children: children
|
|
6758
6954
|
});
|
|
6759
6955
|
});
|
|
6760
|
-
Heading.displayName = COMPONENT_NAME$
|
|
6761
|
-
Heading.className = CLASSNAME$
|
|
6762
|
-
Heading.defaultProps = DEFAULT_PROPS$
|
|
6956
|
+
Heading.displayName = COMPONENT_NAME$V;
|
|
6957
|
+
Heading.className = CLASSNAME$V;
|
|
6958
|
+
Heading.defaultProps = DEFAULT_PROPS$N;
|
|
6959
|
+
|
|
6960
|
+
/**
|
|
6961
|
+
* Computes the next heading level based on the optional prop level or the parent context level.
|
|
6962
|
+
*
|
|
6963
|
+
* @param levelProp - The explicit level provided via props (optional).
|
|
6964
|
+
* @param parentLevel - The level from the parent context.
|
|
6965
|
+
* @returns The calculated heading level, clamped to the maximum allowed level.
|
|
6966
|
+
*/
|
|
6967
|
+
const computeHeadingLevel = (levelProp, parentLevel) => {
|
|
6968
|
+
const nextLevel = levelProp || parentLevel + 1;
|
|
6969
|
+
return nextLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : nextLevel;
|
|
6970
|
+
};
|
|
6763
6971
|
|
|
6764
6972
|
/**
|
|
6765
6973
|
* Provide a new heading level context.
|
|
@@ -6771,9 +6979,7 @@ const HeadingLevelProvider = ({
|
|
|
6771
6979
|
const {
|
|
6772
6980
|
level: contextLevel
|
|
6773
6981
|
} = useHeadingLevel();
|
|
6774
|
-
const
|
|
6775
|
-
/** Don't allow a level beyond the maximum level. */
|
|
6776
|
-
const nextLevel = incrementedLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : incrementedLevel;
|
|
6982
|
+
const nextLevel = computeHeadingLevel(level, contextLevel);
|
|
6777
6983
|
const headingElement = `h${nextLevel}`;
|
|
6778
6984
|
return /*#__PURE__*/jsx(HeadingLevelContext.Provider, {
|
|
6779
6985
|
value: {
|
|
@@ -6793,12 +6999,15 @@ const COMPONENT_NAME$T = 'Grid';
|
|
|
6793
6999
|
* Component default class name and class prefix.
|
|
6794
7000
|
*/
|
|
6795
7001
|
const CLASSNAME$T = 'lumx-grid';
|
|
7002
|
+
const {
|
|
7003
|
+
block: block$L
|
|
7004
|
+
} = classNames.bem(CLASSNAME$T);
|
|
6796
7005
|
|
|
6797
7006
|
/**
|
|
6798
7007
|
* Component default props.
|
|
6799
7008
|
*/
|
|
6800
7009
|
const DEFAULT_PROPS$L = {
|
|
6801
|
-
orientation: Orientation.horizontal,
|
|
7010
|
+
orientation: Orientation$1.horizontal,
|
|
6802
7011
|
wrap: 'nowrap'
|
|
6803
7012
|
};
|
|
6804
7013
|
|
|
@@ -6823,15 +7032,12 @@ const Grid = forwardRef((props, ref) => {
|
|
|
6823
7032
|
return /*#__PURE__*/jsx("div", {
|
|
6824
7033
|
ref: ref,
|
|
6825
7034
|
...forwardedProps,
|
|
6826
|
-
className: classNames.join(className, `${CLASSNAME$T}-container
|
|
6827
|
-
[
|
|
6828
|
-
|
|
6829
|
-
[
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
orientation,
|
|
6833
|
-
wrap,
|
|
6834
|
-
gutter
|
|
7035
|
+
className: classNames.join(className, classNames.bem(`${CLASSNAME$T}-container`).block(), block$L({
|
|
7036
|
+
[`h-align-${hAlign}`]: Boolean(hAlign),
|
|
7037
|
+
[`v-align-${vAlign}`]: Boolean(vAlign),
|
|
7038
|
+
[`orientation-${orientation}`]: Boolean(orientation),
|
|
7039
|
+
[`wrap-${wrap}`]: Boolean(wrap),
|
|
7040
|
+
[`gutter-${gutter}`]: Boolean(gutter)
|
|
6835
7041
|
})),
|
|
6836
7042
|
children: children
|
|
6837
7043
|
});
|
|
@@ -6849,6 +7055,9 @@ const COMPONENT_NAME$S = 'GridItem';
|
|
|
6849
7055
|
* Component default class name and class prefix.
|
|
6850
7056
|
*/
|
|
6851
7057
|
const CLASSNAME$S = 'lumx-grid-item';
|
|
7058
|
+
const {
|
|
7059
|
+
block: block$K
|
|
7060
|
+
} = classNames.bem(CLASSNAME$S);
|
|
6852
7061
|
|
|
6853
7062
|
/**
|
|
6854
7063
|
* GridItem component.
|
|
@@ -6869,11 +7078,10 @@ const GridItem = forwardRef((props, ref) => {
|
|
|
6869
7078
|
return /*#__PURE__*/jsx("div", {
|
|
6870
7079
|
ref: ref,
|
|
6871
7080
|
...forwardedProps,
|
|
6872
|
-
className: classNames.join(className,
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
align
|
|
7081
|
+
className: classNames.join(className, block$K({
|
|
7082
|
+
[`width-${width}`]: Boolean(width),
|
|
7083
|
+
[`order-${order}`]: Boolean(order),
|
|
7084
|
+
[`align-${align}`]: Boolean(align)
|
|
6877
7085
|
})),
|
|
6878
7086
|
children: children
|
|
6879
7087
|
});
|
|
@@ -7041,6 +7249,10 @@ const COMPONENT_NAME$Q = 'ImageBlock';
|
|
|
7041
7249
|
* Component default class name and class prefix.
|
|
7042
7250
|
*/
|
|
7043
7251
|
const CLASSNAME$Q = 'lumx-image-block';
|
|
7252
|
+
const {
|
|
7253
|
+
block: block$J,
|
|
7254
|
+
element: element$z
|
|
7255
|
+
} = classNames.bem(CLASSNAME$Q);
|
|
7044
7256
|
|
|
7045
7257
|
/**
|
|
7046
7258
|
* Component default props.
|
|
@@ -7081,16 +7293,16 @@ const ImageBlock = forwardRef((props, ref) => {
|
|
|
7081
7293
|
return /*#__PURE__*/jsxs("figure", {
|
|
7082
7294
|
ref: ref,
|
|
7083
7295
|
...forwardedProps,
|
|
7084
|
-
className: classNames.join(className,
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
})
|
|
7296
|
+
className: classNames.join(className, block$J({
|
|
7297
|
+
[`caption-position-${captionPosition}`]: Boolean(captionPosition),
|
|
7298
|
+
[`align-${align}`]: Boolean(align),
|
|
7299
|
+
[`size-${size}`]: Boolean(size),
|
|
7300
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
7301
|
+
'fill-height': fillHeight
|
|
7302
|
+
})),
|
|
7091
7303
|
children: [/*#__PURE__*/jsx(Thumbnail, {
|
|
7092
7304
|
...thumbnailProps,
|
|
7093
|
-
className: classNames.join(
|
|
7305
|
+
className: classNames.join(element$z('image'), thumbnailProps?.className),
|
|
7094
7306
|
fillHeight: fillHeight,
|
|
7095
7307
|
align: align,
|
|
7096
7308
|
image: image,
|
|
@@ -7110,7 +7322,7 @@ const ImageBlock = forwardRef((props, ref) => {
|
|
|
7110
7322
|
align: align,
|
|
7111
7323
|
truncate: captionPosition === 'over'
|
|
7112
7324
|
}), actions && /*#__PURE__*/jsx("div", {
|
|
7113
|
-
className:
|
|
7325
|
+
className: element$z('actions'),
|
|
7114
7326
|
children: actions
|
|
7115
7327
|
})]
|
|
7116
7328
|
});
|
|
@@ -7371,6 +7583,9 @@ function useAnimateScroll(scrollAreaRef) {
|
|
|
7371
7583
|
}, [scrollAreaRef]);
|
|
7372
7584
|
}
|
|
7373
7585
|
|
|
7586
|
+
const {
|
|
7587
|
+
element: element$y
|
|
7588
|
+
} = classNames.bem(CLASSNAME$P);
|
|
7374
7589
|
/** Internal image slide component for ImageLightbox */
|
|
7375
7590
|
const ImageSlide = /*#__PURE__*/React__default.memo(props => {
|
|
7376
7591
|
const {
|
|
@@ -7437,12 +7652,12 @@ const ImageSlide = /*#__PURE__*/React__default.memo(props => {
|
|
|
7437
7652
|
// Make it accessible to keyboard nav when the zone is scrollable
|
|
7438
7653
|
,
|
|
7439
7654
|
tabIndex: isScrollable ? 0 : undefined,
|
|
7440
|
-
className:
|
|
7655
|
+
className: element$y('image-slide'),
|
|
7441
7656
|
children: /*#__PURE__*/jsx(Thumbnail, {
|
|
7442
7657
|
imgRef: useMergeRefs(imgRef, propImgRef),
|
|
7443
7658
|
image: image,
|
|
7444
7659
|
alt: alt,
|
|
7445
|
-
className:
|
|
7660
|
+
className: element$y('thumbnail'),
|
|
7446
7661
|
imgProps: {
|
|
7447
7662
|
...imgProps,
|
|
7448
7663
|
style: {
|
|
@@ -7460,6 +7675,9 @@ const ImageSlide = /*#__PURE__*/React__default.memo(props => {
|
|
|
7460
7675
|
});
|
|
7461
7676
|
}, isEqual);
|
|
7462
7677
|
|
|
7678
|
+
const {
|
|
7679
|
+
element: element$x
|
|
7680
|
+
} = classNames.bem(CLASSNAME$P);
|
|
7463
7681
|
/** Internal image slideshow component for ImageLightbox */
|
|
7464
7682
|
const ImageSlideshow = ({
|
|
7465
7683
|
activeImageIndex,
|
|
@@ -7580,12 +7798,12 @@ const ImageSlideshow = ({
|
|
|
7580
7798
|
})
|
|
7581
7799
|
}), (metadata || slideShowControls || zoomControls) && /*#__PURE__*/jsxs(FlexBox, {
|
|
7582
7800
|
ref: footerRef,
|
|
7583
|
-
className:
|
|
7801
|
+
className: element$x('footer'),
|
|
7584
7802
|
orientation: "vertical",
|
|
7585
7803
|
vAlign: "center",
|
|
7586
7804
|
gap: "big",
|
|
7587
7805
|
children: [metadata, /*#__PURE__*/jsxs(FlexBox, {
|
|
7588
|
-
className:
|
|
7806
|
+
className: element$x('footer-actions'),
|
|
7589
7807
|
orientation: "horizontal",
|
|
7590
7808
|
gap: "regular",
|
|
7591
7809
|
children: [slideShowControls, zoomControls]
|
|
@@ -7863,6 +8081,10 @@ const COMPONENT_NAME$O = 'InlineList';
|
|
|
7863
8081
|
* Component default class name and class prefix.
|
|
7864
8082
|
*/
|
|
7865
8083
|
const CLASSNAME$O = 'lumx-inline-list';
|
|
8084
|
+
const {
|
|
8085
|
+
block: block$I,
|
|
8086
|
+
element: element$w
|
|
8087
|
+
} = classNames.bem(CLASSNAME$O);
|
|
7866
8088
|
|
|
7867
8089
|
/**
|
|
7868
8090
|
* Component default props.
|
|
@@ -7892,7 +8114,9 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
7892
8114
|
jsx("ul", {
|
|
7893
8115
|
...forwardedProps,
|
|
7894
8116
|
ref: ref,
|
|
7895
|
-
className: classNames.join(className,
|
|
8117
|
+
className: classNames.join(className, block$I({
|
|
8118
|
+
wrap: Boolean(wrap)
|
|
8119
|
+
}), color && classNames.font(color, colorVariant), typography && classNames.typography(typography))
|
|
7896
8120
|
// Lists with removed bullet style can lose their a11y list role on some browsers
|
|
7897
8121
|
,
|
|
7898
8122
|
role: "list",
|
|
@@ -7904,9 +8128,9 @@ const InlineList = forwardRef((props, ref) => {
|
|
|
7904
8128
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
7905
8129
|
jsxs("li", {
|
|
7906
8130
|
role: "listitem",
|
|
7907
|
-
className:
|
|
8131
|
+
className: element$w('item'),
|
|
7908
8132
|
children: [index !== 0 && /*#__PURE__*/jsx("span", {
|
|
7909
|
-
className:
|
|
8133
|
+
className: element$w('item-separator'),
|
|
7910
8134
|
"aria-hidden": "true",
|
|
7911
8135
|
children: '\u00A0•\u00A0'
|
|
7912
8136
|
}), child]
|
|
@@ -7940,6 +8164,9 @@ const InputHelperClassName = 'lumx-input-helper';
|
|
|
7940
8164
|
*/
|
|
7941
8165
|
|
|
7942
8166
|
const CLASSNAME$N = InputHelperClassName;
|
|
8167
|
+
const {
|
|
8168
|
+
block: block$H
|
|
8169
|
+
} = bem(CLASSNAME$N);
|
|
7943
8170
|
|
|
7944
8171
|
/**
|
|
7945
8172
|
* Component default props.
|
|
@@ -7966,10 +8193,9 @@ function InputHelper$1(props) {
|
|
|
7966
8193
|
return /*#__PURE__*/jsx("p", {
|
|
7967
8194
|
ref: ref,
|
|
7968
8195
|
...forwardedProps,
|
|
7969
|
-
className: classnames(className,
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
theme
|
|
8196
|
+
className: classnames(className, block$H({
|
|
8197
|
+
[`color-${color}`]: Boolean(color),
|
|
8198
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
7973
8199
|
})),
|
|
7974
8200
|
children: children
|
|
7975
8201
|
});
|
|
@@ -8000,6 +8226,9 @@ InputHelper.defaultProps = InputHelper$1.defaultProps;
|
|
|
8000
8226
|
const COMPONENT_NAME$M = 'InputLabel';
|
|
8001
8227
|
const InputLabelClassName = 'lumx-input-label';
|
|
8002
8228
|
const CLASSNAME$M = InputLabelClassName;
|
|
8229
|
+
const {
|
|
8230
|
+
block: block$G
|
|
8231
|
+
} = bem(CLASSNAME$M);
|
|
8003
8232
|
const DEFAULT_PROPS$G = {};
|
|
8004
8233
|
|
|
8005
8234
|
/**
|
|
@@ -8020,11 +8249,10 @@ function InputLabel$1(props) {
|
|
|
8020
8249
|
ref: ref,
|
|
8021
8250
|
...forwardedProps,
|
|
8022
8251
|
htmlFor: htmlFor,
|
|
8023
|
-
className: classnames(className,
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
hasCustomTypography: Boolean(typography$1)
|
|
8252
|
+
className: classnames(className, block$G({
|
|
8253
|
+
'is-required': isRequired,
|
|
8254
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
8255
|
+
'has-custom-typography': Boolean(typography$1)
|
|
8028
8256
|
}), typography$1 && typography(typography$1)),
|
|
8029
8257
|
children: children
|
|
8030
8258
|
});
|
|
@@ -8061,6 +8289,10 @@ const COMPONENT_NAME$L = 'Lightbox';
|
|
|
8061
8289
|
* Component default class name and class prefix.
|
|
8062
8290
|
*/
|
|
8063
8291
|
const CLASSNAME$L = 'lumx-lightbox';
|
|
8292
|
+
const {
|
|
8293
|
+
block: block$F,
|
|
8294
|
+
element: element$v
|
|
8295
|
+
} = classNames.bem(CLASSNAME$L);
|
|
8064
8296
|
|
|
8065
8297
|
/**
|
|
8066
8298
|
* Lightbox component.
|
|
@@ -8144,17 +8376,16 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
8144
8376
|
"aria-modal": "true",
|
|
8145
8377
|
role: "dialog",
|
|
8146
8378
|
tabIndex: -1,
|
|
8147
|
-
className: classNames.join(className,
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
theme
|
|
8379
|
+
className: classNames.join(className, block$F({
|
|
8380
|
+
'is-hidden': !isOpen,
|
|
8381
|
+
'is-shown': isOpen || isVisible,
|
|
8382
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
8152
8383
|
})),
|
|
8153
8384
|
style: {
|
|
8154
8385
|
zIndex
|
|
8155
8386
|
},
|
|
8156
8387
|
children: [closeButtonProps && /*#__PURE__*/jsx("div", {
|
|
8157
|
-
className:
|
|
8388
|
+
className: element$v('close'),
|
|
8158
8389
|
children: /*#__PURE__*/jsx(IconButton, {
|
|
8159
8390
|
...closeButtonProps,
|
|
8160
8391
|
ref: closeButtonRef,
|
|
@@ -8174,7 +8405,7 @@ const Lightbox = forwardRef((props, ref) => {
|
|
|
8174
8405
|
childrenRefs: clickAwayRefs,
|
|
8175
8406
|
children: /*#__PURE__*/jsx("div", {
|
|
8176
8407
|
ref: childrenRef,
|
|
8177
|
-
className:
|
|
8408
|
+
className: element$v('wrapper'),
|
|
8178
8409
|
role: "presentation",
|
|
8179
8410
|
children: children
|
|
8180
8411
|
})
|
|
@@ -8210,6 +8441,10 @@ const COMPONENT_NAME$K = 'Link';
|
|
|
8210
8441
|
* Component default class name and class prefix.
|
|
8211
8442
|
*/
|
|
8212
8443
|
const CLASSNAME$K = 'lumx-link';
|
|
8444
|
+
const {
|
|
8445
|
+
block: block$E,
|
|
8446
|
+
element: element$u
|
|
8447
|
+
} = classNames.bem(CLASSNAME$K);
|
|
8213
8448
|
|
|
8214
8449
|
/**
|
|
8215
8450
|
* Link component.
|
|
@@ -8240,22 +8475,21 @@ const Link = forwardRef((props, ref) => {
|
|
|
8240
8475
|
as: linkAs || (forwardedProps.href ? 'a' : 'button'),
|
|
8241
8476
|
...forwardedProps,
|
|
8242
8477
|
...disabledStateProps,
|
|
8243
|
-
className: classNames.join(className,
|
|
8244
|
-
|
|
8245
|
-
color,
|
|
8246
|
-
|
|
8247
|
-
hasTypography: !!typography
|
|
8478
|
+
className: classNames.join(className, block$E({
|
|
8479
|
+
[`color-${color}`]: Boolean(color),
|
|
8480
|
+
[`color-variant-${colorVariant}`]: Boolean(colorVariant),
|
|
8481
|
+
'has-typography': !!typography
|
|
8248
8482
|
}), typography && classNames.typography(typography)),
|
|
8249
8483
|
children: wrapChildrenIconWithSpaces(/*#__PURE__*/jsxs(Fragment, {
|
|
8250
8484
|
children: [leftIcon && /*#__PURE__*/jsx(Icon, {
|
|
8251
8485
|
icon: leftIcon,
|
|
8252
|
-
className:
|
|
8486
|
+
className: element$u('left-icon')
|
|
8253
8487
|
}), children && /*#__PURE__*/jsx("span", {
|
|
8254
|
-
className:
|
|
8488
|
+
className: element$u('content'),
|
|
8255
8489
|
children: children
|
|
8256
8490
|
}), rightIcon && /*#__PURE__*/jsx(Icon, {
|
|
8257
8491
|
icon: rightIcon,
|
|
8258
|
-
className:
|
|
8492
|
+
className: element$u('right-icon')
|
|
8259
8493
|
})]
|
|
8260
8494
|
}))
|
|
8261
8495
|
});
|
|
@@ -8272,6 +8506,10 @@ const COMPONENT_NAME$J = 'LinkPreview';
|
|
|
8272
8506
|
* Component default class name and class prefix.
|
|
8273
8507
|
*/
|
|
8274
8508
|
const CLASSNAME$J = 'lumx-link-preview';
|
|
8509
|
+
const {
|
|
8510
|
+
block: block$D,
|
|
8511
|
+
element: element$t
|
|
8512
|
+
} = classNames.bem(CLASSNAME$J);
|
|
8275
8513
|
|
|
8276
8514
|
/**
|
|
8277
8515
|
* Component default props.
|
|
@@ -8305,18 +8543,18 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
8305
8543
|
} = props;
|
|
8306
8544
|
// Use title heading as title wrapper (see DEFAULT_PROPS for the default value).
|
|
8307
8545
|
const TitleHeading = titleHeading;
|
|
8546
|
+
const adjustedSize = size === Size$1.big && thumbnailProps ? Size$1.big : Size$1.regular;
|
|
8308
8547
|
return /*#__PURE__*/jsx("article", {
|
|
8309
8548
|
ref: ref,
|
|
8310
8549
|
...forwardedProps,
|
|
8311
|
-
className: classNames.join(className,
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
theme
|
|
8550
|
+
className: classNames.join(className, block$D({
|
|
8551
|
+
[`size-${adjustedSize}`]: Boolean(adjustedSize),
|
|
8552
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
8315
8553
|
})),
|
|
8316
8554
|
children: /*#__PURE__*/jsxs("div", {
|
|
8317
|
-
className:
|
|
8555
|
+
className: element$t('wrapper'),
|
|
8318
8556
|
children: [thumbnailProps && /*#__PURE__*/jsx("div", {
|
|
8319
|
-
className:
|
|
8557
|
+
className: element$t('thumbnail'),
|
|
8320
8558
|
children: /*#__PURE__*/jsx(Thumbnail, {
|
|
8321
8559
|
...thumbnailProps,
|
|
8322
8560
|
linkAs: linkAs,
|
|
@@ -8331,9 +8569,9 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
8331
8569
|
fillHeight: true
|
|
8332
8570
|
})
|
|
8333
8571
|
}), /*#__PURE__*/jsxs("div", {
|
|
8334
|
-
className:
|
|
8572
|
+
className: element$t('container'),
|
|
8335
8573
|
children: [title && /*#__PURE__*/jsx(TitleHeading, {
|
|
8336
|
-
className:
|
|
8574
|
+
className: element$t('title'),
|
|
8337
8575
|
children: /*#__PURE__*/jsx(Link, {
|
|
8338
8576
|
...linkProps,
|
|
8339
8577
|
linkAs: linkAs,
|
|
@@ -8344,14 +8582,14 @@ const LinkPreview = forwardRef((props, ref) => {
|
|
|
8344
8582
|
children: title
|
|
8345
8583
|
})
|
|
8346
8584
|
}), description && /*#__PURE__*/jsx("p", {
|
|
8347
|
-
className:
|
|
8585
|
+
className: element$t('description'),
|
|
8348
8586
|
children: description
|
|
8349
8587
|
}), /*#__PURE__*/jsx("div", {
|
|
8350
|
-
className:
|
|
8588
|
+
className: element$t('link'),
|
|
8351
8589
|
children: /*#__PURE__*/jsx(Link, {
|
|
8352
8590
|
...linkProps,
|
|
8353
8591
|
linkAs: linkAs,
|
|
8354
|
-
className: classNames.join(
|
|
8592
|
+
className: classNames.join(element$t('link'), linkProps?.className),
|
|
8355
8593
|
target: "_blank",
|
|
8356
8594
|
href: link,
|
|
8357
8595
|
color: theme === Theme$1.light ? ColorPalette$1.primary : ColorPalette$1.light,
|
|
@@ -8393,6 +8631,10 @@ const COMPONENT_NAME$I = 'ListItem';
|
|
|
8393
8631
|
* Component default class name and class prefix.
|
|
8394
8632
|
*/
|
|
8395
8633
|
const CLASSNAME$I = 'lumx-list-item';
|
|
8634
|
+
const {
|
|
8635
|
+
block: block$C,
|
|
8636
|
+
element: element$s
|
|
8637
|
+
} = classNames.bem(CLASSNAME$I);
|
|
8396
8638
|
|
|
8397
8639
|
/**
|
|
8398
8640
|
* Component default props.
|
|
@@ -8447,22 +8689,21 @@ const ListItem = forwardRef((props, ref) => {
|
|
|
8447
8689
|
}, [role, onItemSelected]);
|
|
8448
8690
|
const content = /*#__PURE__*/jsxs(Fragment, {
|
|
8449
8691
|
children: [before && /*#__PURE__*/jsx("div", {
|
|
8450
|
-
className:
|
|
8692
|
+
className: element$s('before'),
|
|
8451
8693
|
children: before
|
|
8452
8694
|
}), /*#__PURE__*/jsx("div", {
|
|
8453
|
-
className:
|
|
8695
|
+
className: element$s('content'),
|
|
8454
8696
|
children: children
|
|
8455
8697
|
}), after && /*#__PURE__*/jsx("div", {
|
|
8456
|
-
className:
|
|
8698
|
+
className: element$s('after'),
|
|
8457
8699
|
children: after
|
|
8458
8700
|
})]
|
|
8459
8701
|
});
|
|
8460
8702
|
return /*#__PURE__*/jsx("li", {
|
|
8461
8703
|
ref: ref,
|
|
8462
8704
|
...forwardedProps,
|
|
8463
|
-
className: classNames.join(className,
|
|
8464
|
-
|
|
8465
|
-
size
|
|
8705
|
+
className: classNames.join(className, block$C({
|
|
8706
|
+
[`size-${size}`]: Boolean(size)
|
|
8466
8707
|
})),
|
|
8467
8708
|
children: isClickable({
|
|
8468
8709
|
linkProps,
|
|
@@ -8475,11 +8716,10 @@ const ListItem = forwardRef((props, ref) => {
|
|
|
8475
8716
|
'aria-disabled': isAnyDisabled,
|
|
8476
8717
|
...linkProps,
|
|
8477
8718
|
href: isAnyDisabled ? undefined : linkProps.href,
|
|
8478
|
-
className: classNames.join(
|
|
8479
|
-
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
isDisabled: isAnyDisabled
|
|
8719
|
+
className: classNames.join(element$s('link', {
|
|
8720
|
+
'is-highlighted': isHighlighted,
|
|
8721
|
+
'is-selected': isSelected,
|
|
8722
|
+
'is-disabled': isAnyDisabled
|
|
8483
8723
|
})),
|
|
8484
8724
|
onClick: isAnyDisabled ? undefined : onItemSelected,
|
|
8485
8725
|
onKeyDown: isAnyDisabled ? undefined : onKeyDown,
|
|
@@ -8488,7 +8728,7 @@ const ListItem = forwardRef((props, ref) => {
|
|
|
8488
8728
|
/*#__PURE__*/
|
|
8489
8729
|
/* Non clickable list item */
|
|
8490
8730
|
jsx("div", {
|
|
8491
|
-
className:
|
|
8731
|
+
className: element$s('wrapper'),
|
|
8492
8732
|
children: content
|
|
8493
8733
|
})
|
|
8494
8734
|
});
|
|
@@ -8570,25 +8810,29 @@ const COMPONENT_NAME$F = 'Message';
|
|
|
8570
8810
|
* Component default class name and class prefix.
|
|
8571
8811
|
*/
|
|
8572
8812
|
const CLASSNAME$F = 'lumx-message';
|
|
8813
|
+
const {
|
|
8814
|
+
block: block$B,
|
|
8815
|
+
element: element$r
|
|
8816
|
+
} = bem(CLASSNAME$F);
|
|
8573
8817
|
|
|
8574
8818
|
/**
|
|
8575
8819
|
* Associative map from message kind to color and icon.
|
|
8576
8820
|
*/
|
|
8577
8821
|
const CONFIG = {
|
|
8578
|
-
[Kind
|
|
8579
|
-
color: ColorPalette
|
|
8822
|
+
[Kind.error]: {
|
|
8823
|
+
color: ColorPalette.red,
|
|
8580
8824
|
icon: mdiAlert
|
|
8581
8825
|
},
|
|
8582
|
-
[Kind
|
|
8583
|
-
color: ColorPalette
|
|
8826
|
+
[Kind.info]: {
|
|
8827
|
+
color: ColorPalette.blue,
|
|
8584
8828
|
icon: mdiInformation
|
|
8585
8829
|
},
|
|
8586
|
-
[Kind
|
|
8587
|
-
color: ColorPalette
|
|
8830
|
+
[Kind.success]: {
|
|
8831
|
+
color: ColorPalette.green,
|
|
8588
8832
|
icon: mdiCheckCircle
|
|
8589
8833
|
},
|
|
8590
|
-
[Kind
|
|
8591
|
-
color: ColorPalette
|
|
8834
|
+
[Kind.warning]: {
|
|
8835
|
+
color: ColorPalette.yellow,
|
|
8592
8836
|
icon: mdiAlertCircle
|
|
8593
8837
|
}
|
|
8594
8838
|
};
|
|
@@ -8597,10 +8841,9 @@ const CONFIG = {
|
|
|
8597
8841
|
* Message component.
|
|
8598
8842
|
*
|
|
8599
8843
|
* @param props Component props.
|
|
8600
|
-
* @
|
|
8601
|
-
* @return React element.
|
|
8844
|
+
* @return JSX element.
|
|
8602
8845
|
*/
|
|
8603
|
-
const Message =
|
|
8846
|
+
const Message$1 = props => {
|
|
8604
8847
|
const {
|
|
8605
8848
|
children,
|
|
8606
8849
|
className,
|
|
@@ -8620,29 +8863,43 @@ const Message = forwardRef((props, ref) => {
|
|
|
8620
8863
|
} = closeButtonProps || {};
|
|
8621
8864
|
const isCloseButtonDisplayed = hasBackground && kind === 'info' && onClick && closeButtonLabel;
|
|
8622
8865
|
return /*#__PURE__*/jsxs("div", {
|
|
8623
|
-
ref: ref,
|
|
8624
|
-
className: classNames.join(className, handleBasicClasses({
|
|
8625
|
-
color,
|
|
8626
|
-
hasBackground,
|
|
8627
|
-
prefix: CLASSNAME$F
|
|
8628
|
-
})),
|
|
8629
8866
|
...forwardedProps,
|
|
8630
|
-
|
|
8631
|
-
|
|
8867
|
+
className: classnames(className, block$B({
|
|
8868
|
+
[`color-${color}`]: Boolean(color),
|
|
8869
|
+
'has-background': hasBackground
|
|
8870
|
+
})),
|
|
8871
|
+
children: [(customIcon || icon) && Icon$1({
|
|
8872
|
+
className: element$r('icon'),
|
|
8632
8873
|
icon: customIcon || icon,
|
|
8633
|
-
size: Size
|
|
8634
|
-
color
|
|
8874
|
+
size: Size.xs,
|
|
8875
|
+
color
|
|
8635
8876
|
}), /*#__PURE__*/jsx("div", {
|
|
8636
|
-
className:
|
|
8877
|
+
className: element$r('text'),
|
|
8637
8878
|
children: children
|
|
8638
|
-
}), isCloseButtonDisplayed &&
|
|
8639
|
-
className:
|
|
8879
|
+
}), isCloseButtonDisplayed && IconButton$1({
|
|
8880
|
+
className: element$r('close-button'),
|
|
8640
8881
|
icon: mdiClose,
|
|
8641
|
-
onClick
|
|
8882
|
+
onClick,
|
|
8642
8883
|
label: closeButtonLabel,
|
|
8643
|
-
emphasis: Emphasis
|
|
8884
|
+
emphasis: Emphasis.low
|
|
8644
8885
|
})]
|
|
8645
8886
|
});
|
|
8887
|
+
};
|
|
8888
|
+
Message$1.displayName = COMPONENT_NAME$F;
|
|
8889
|
+
Message$1.className = CLASSNAME$F;
|
|
8890
|
+
|
|
8891
|
+
/**
|
|
8892
|
+
* Message component.
|
|
8893
|
+
*
|
|
8894
|
+
* @param props Component props.
|
|
8895
|
+
* @param ref Component ref.
|
|
8896
|
+
* @return React element.
|
|
8897
|
+
*/
|
|
8898
|
+
const Message = forwardRef((props, ref) => {
|
|
8899
|
+
return Message$1({
|
|
8900
|
+
...props,
|
|
8901
|
+
ref
|
|
8902
|
+
});
|
|
8646
8903
|
});
|
|
8647
8904
|
Message.displayName = COMPONENT_NAME$F;
|
|
8648
8905
|
Message.className = CLASSNAME$F;
|
|
@@ -8656,6 +8913,10 @@ const COMPONENT_NAME$E = 'Mosaic';
|
|
|
8656
8913
|
* Component default class name and class prefix.
|
|
8657
8914
|
*/
|
|
8658
8915
|
const CLASSNAME$E = 'lumx-mosaic';
|
|
8916
|
+
const {
|
|
8917
|
+
block: block$A,
|
|
8918
|
+
element: element$q
|
|
8919
|
+
} = classNames.bem(CLASSNAME$E);
|
|
8659
8920
|
|
|
8660
8921
|
/**
|
|
8661
8922
|
* Component default props.
|
|
@@ -8688,17 +8949,15 @@ const Mosaic = forwardRef((props, ref) => {
|
|
|
8688
8949
|
return /*#__PURE__*/jsx("div", {
|
|
8689
8950
|
ref: ref,
|
|
8690
8951
|
...forwardedProps,
|
|
8691
|
-
className: classNames.join(className,
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
[`${CLASSNAME$E}--has-4-thumbnails`]: thumbnails?.length >= 4
|
|
8699
|
-
}),
|
|
8952
|
+
className: classNames.join(className, block$A({
|
|
8953
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
8954
|
+
'has-1-thumbnail': thumbnails?.length === 1,
|
|
8955
|
+
'has-2-thumbnails': thumbnails?.length === 2,
|
|
8956
|
+
'has-3-thumbnails': thumbnails?.length === 3,
|
|
8957
|
+
'has-4-thumbnails': thumbnails?.length >= 4
|
|
8958
|
+
})),
|
|
8700
8959
|
children: /*#__PURE__*/jsx("div", {
|
|
8701
|
-
className:
|
|
8960
|
+
className: element$q('wrapper'),
|
|
8702
8961
|
children: take(thumbnails, 4).map((thumbnail, index) => {
|
|
8703
8962
|
const {
|
|
8704
8963
|
image,
|
|
@@ -8707,7 +8966,7 @@ const Mosaic = forwardRef((props, ref) => {
|
|
|
8707
8966
|
...thumbnailProps
|
|
8708
8967
|
} = thumbnail;
|
|
8709
8968
|
return /*#__PURE__*/jsxs("div", {
|
|
8710
|
-
className:
|
|
8969
|
+
className: element$q('thumbnail'),
|
|
8711
8970
|
children: [/*#__PURE__*/jsx(Thumbnail, {
|
|
8712
8971
|
...thumbnailProps,
|
|
8713
8972
|
align: align || Alignment.left,
|
|
@@ -8717,7 +8976,7 @@ const Mosaic = forwardRef((props, ref) => {
|
|
|
8717
8976
|
fillHeight: true,
|
|
8718
8977
|
onClick: handleImageClick?.(index, onClick) || onClick
|
|
8719
8978
|
}), thumbnails.length > 4 && index === 3 && /*#__PURE__*/jsx("div", {
|
|
8720
|
-
className:
|
|
8979
|
+
className: element$q('overlay'),
|
|
8721
8980
|
children: /*#__PURE__*/jsxs("span", {
|
|
8722
8981
|
children: ["+", thumbnails.length - 4]
|
|
8723
8982
|
})
|
|
@@ -8732,7 +8991,7 @@ Mosaic.className = CLASSNAME$E;
|
|
|
8732
8991
|
Mosaic.defaultProps = DEFAULT_PROPS$D;
|
|
8733
8992
|
|
|
8734
8993
|
const NavigationContext = /*#__PURE__*/createContext({
|
|
8735
|
-
orientation: Orientation.vertical
|
|
8994
|
+
orientation: Orientation$1.vertical
|
|
8736
8995
|
});
|
|
8737
8996
|
|
|
8738
8997
|
/**
|
|
@@ -8754,6 +9013,14 @@ const COMPONENT_NAME$D = 'NavigationSection';
|
|
|
8754
9013
|
* Component default class name and class prefix.
|
|
8755
9014
|
*/
|
|
8756
9015
|
const CLASSNAME$D = 'lumx-navigation-section';
|
|
9016
|
+
const {
|
|
9017
|
+
block: sectionBlock,
|
|
9018
|
+
element: sectionElement
|
|
9019
|
+
} = classNames.bem(CLASSNAME$D);
|
|
9020
|
+
const {
|
|
9021
|
+
block: itemBlock,
|
|
9022
|
+
element: itemElement
|
|
9023
|
+
} = classNames.bem(ITEM_CLASSNAME);
|
|
8757
9024
|
const NavigationSection = forwardRef((props, ref) => {
|
|
8758
9025
|
const {
|
|
8759
9026
|
children,
|
|
@@ -8769,11 +9036,10 @@ const NavigationSection = forwardRef((props, ref) => {
|
|
|
8769
9036
|
orientation
|
|
8770
9037
|
} = useContext(NavigationContext) || {};
|
|
8771
9038
|
const theme = useTheme();
|
|
8772
|
-
const isDropdown = orientation === Orientation.horizontal;
|
|
9039
|
+
const isDropdown = orientation === Orientation$1.horizontal;
|
|
8773
9040
|
return /*#__PURE__*/jsxs("li", {
|
|
8774
|
-
className: classNames.join(className,
|
|
8775
|
-
|
|
8776
|
-
theme
|
|
9041
|
+
className: classNames.join(className, sectionBlock(), itemBlock({
|
|
9042
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
8777
9043
|
})),
|
|
8778
9044
|
ref: ref,
|
|
8779
9045
|
children: [/*#__PURE__*/jsxs(RawClickable, {
|
|
@@ -8781,24 +9047,24 @@ const NavigationSection = forwardRef((props, ref) => {
|
|
|
8781
9047
|
...forwardedProps,
|
|
8782
9048
|
"aria-controls": sectionId,
|
|
8783
9049
|
"aria-expanded": isOpen,
|
|
8784
|
-
className:
|
|
9050
|
+
className: itemElement('link'),
|
|
8785
9051
|
ref: buttonRef,
|
|
8786
9052
|
onClick: event => {
|
|
8787
9053
|
setIsOpen(!isOpen);
|
|
8788
9054
|
event.stopPropagation();
|
|
8789
9055
|
},
|
|
8790
9056
|
children: [icon ? /*#__PURE__*/jsx(Icon, {
|
|
8791
|
-
className:
|
|
9057
|
+
className: itemElement('icon'),
|
|
8792
9058
|
icon: icon,
|
|
8793
9059
|
size: Size$1.xs
|
|
8794
9060
|
}) : null, /*#__PURE__*/jsx(Text, {
|
|
8795
9061
|
as: "span",
|
|
8796
9062
|
truncate: true,
|
|
8797
|
-
className:
|
|
9063
|
+
className: itemElement('label'),
|
|
8798
9064
|
ref: ref,
|
|
8799
9065
|
children: label
|
|
8800
9066
|
}), /*#__PURE__*/jsx(Icon, {
|
|
8801
|
-
className: classNames.join(
|
|
9067
|
+
className: classNames.join(itemElement('icon'), sectionElement('chevron')),
|
|
8802
9068
|
icon: isOpen ? mdiChevronUp : mdiChevronDown
|
|
8803
9069
|
})]
|
|
8804
9070
|
}), isOpen && (isDropdown ? /*#__PURE__*/jsx(Popover, {
|
|
@@ -8814,18 +9080,20 @@ const NavigationSection = forwardRef((props, ref) => {
|
|
|
8814
9080
|
children: /*#__PURE__*/jsx(ThemeProvider, {
|
|
8815
9081
|
value: Theme$1.light,
|
|
8816
9082
|
children: /*#__PURE__*/jsx("ul", {
|
|
8817
|
-
className:
|
|
9083
|
+
className: sectionElement('drawer', {
|
|
9084
|
+
popover: true
|
|
9085
|
+
}),
|
|
8818
9086
|
id: sectionId,
|
|
8819
9087
|
children: /*#__PURE__*/jsx(NavigationContext.Provider, {
|
|
8820
9088
|
value: {
|
|
8821
|
-
orientation: Orientation.vertical
|
|
9089
|
+
orientation: Orientation$1.vertical
|
|
8822
9090
|
},
|
|
8823
9091
|
children: children
|
|
8824
9092
|
})
|
|
8825
9093
|
})
|
|
8826
9094
|
})
|
|
8827
9095
|
}) : /*#__PURE__*/jsx("ul", {
|
|
8828
|
-
className:
|
|
9096
|
+
className: sectionElement('drawer'),
|
|
8829
9097
|
id: sectionId,
|
|
8830
9098
|
children: children
|
|
8831
9099
|
}))]
|
|
@@ -8834,6 +9102,15 @@ const NavigationSection = forwardRef((props, ref) => {
|
|
|
8834
9102
|
NavigationSection.displayName = COMPONENT_NAME$D;
|
|
8835
9103
|
NavigationSection.className = CLASSNAME$D;
|
|
8836
9104
|
|
|
9105
|
+
const {
|
|
9106
|
+
block: block$z,
|
|
9107
|
+
element: element$p
|
|
9108
|
+
} = classNames.bem(ITEM_CLASSNAME);
|
|
9109
|
+
|
|
9110
|
+
/**
|
|
9111
|
+
* Navigation item props
|
|
9112
|
+
*/
|
|
9113
|
+
|
|
8837
9114
|
const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
8838
9115
|
const {
|
|
8839
9116
|
className,
|
|
@@ -8849,31 +9126,29 @@ const NavigationItem = Object.assign(forwardRefPolymorphic((props, ref) => {
|
|
|
8849
9126
|
labelRef
|
|
8850
9127
|
} = useOverflowTooltipLabel(label);
|
|
8851
9128
|
return /*#__PURE__*/jsx("li", {
|
|
8852
|
-
className: classNames.join(className,
|
|
8853
|
-
|
|
8854
|
-
theme
|
|
9129
|
+
className: classNames.join(className, block$z({
|
|
9130
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
8855
9131
|
})),
|
|
8856
9132
|
children: /*#__PURE__*/jsx(Tooltip, {
|
|
8857
9133
|
label: tooltipLabel,
|
|
8858
9134
|
placement: Placement.TOP,
|
|
8859
9135
|
children: /*#__PURE__*/jsxs(RawClickable, {
|
|
8860
9136
|
as: Element,
|
|
8861
|
-
className:
|
|
8862
|
-
|
|
8863
|
-
isSelected: isCurrentPage
|
|
9137
|
+
className: element$p('link', {
|
|
9138
|
+
'is-selected': isCurrentPage
|
|
8864
9139
|
}),
|
|
8865
9140
|
ref: ref,
|
|
8866
9141
|
"aria-current": isCurrentPage ? 'page' : undefined,
|
|
8867
9142
|
...forwardedProps,
|
|
8868
9143
|
children: [icon ? /*#__PURE__*/jsx(Icon, {
|
|
8869
|
-
className:
|
|
9144
|
+
className: element$p('icon'),
|
|
8870
9145
|
icon: icon,
|
|
8871
9146
|
size: Size$1.xs,
|
|
8872
9147
|
theme: theme
|
|
8873
9148
|
}) : null, /*#__PURE__*/jsx(Text, {
|
|
8874
9149
|
as: "span",
|
|
8875
9150
|
truncate: true,
|
|
8876
|
-
className:
|
|
9151
|
+
className: element$p('label'),
|
|
8877
9152
|
ref: labelRef,
|
|
8878
9153
|
children: label
|
|
8879
9154
|
})]
|
|
@@ -8894,12 +9169,16 @@ const COMPONENT_NAME$C = 'Navigation';
|
|
|
8894
9169
|
* Component default class name and class prefix.
|
|
8895
9170
|
*/
|
|
8896
9171
|
const CLASSNAME$C = 'lumx-navigation';
|
|
9172
|
+
const {
|
|
9173
|
+
block: block$y,
|
|
9174
|
+
element: element$o
|
|
9175
|
+
} = classNames.bem(CLASSNAME$C);
|
|
8897
9176
|
|
|
8898
9177
|
/**
|
|
8899
9178
|
* Component default props
|
|
8900
9179
|
*/
|
|
8901
9180
|
const DEFAULT_PROPS$C = {
|
|
8902
|
-
orientation: Orientation.vertical
|
|
9181
|
+
orientation: Orientation$1.vertical
|
|
8903
9182
|
};
|
|
8904
9183
|
const Navigation = forwardRef((props, ref) => {
|
|
8905
9184
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
@@ -8913,10 +9192,9 @@ const Navigation = forwardRef((props, ref) => {
|
|
|
8913
9192
|
return /*#__PURE__*/jsx(ThemeProvider, {
|
|
8914
9193
|
value: theme,
|
|
8915
9194
|
children: /*#__PURE__*/jsx("nav", {
|
|
8916
|
-
className: classNames.join(className,
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
orientation
|
|
9195
|
+
className: classNames.join(className, block$y({
|
|
9196
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
9197
|
+
[`orientation-${orientation}`]: Boolean(orientation)
|
|
8920
9198
|
})),
|
|
8921
9199
|
ref: ref,
|
|
8922
9200
|
...forwardedProps,
|
|
@@ -8925,7 +9203,7 @@ const Navigation = forwardRef((props, ref) => {
|
|
|
8925
9203
|
orientation
|
|
8926
9204
|
},
|
|
8927
9205
|
children: /*#__PURE__*/jsx("ul", {
|
|
8928
|
-
className:
|
|
9206
|
+
className: element$o('list'),
|
|
8929
9207
|
children: children
|
|
8930
9208
|
})
|
|
8931
9209
|
})
|
|
@@ -8971,6 +9249,10 @@ const COMPONENT_NAME$B = 'Notification';
|
|
|
8971
9249
|
* Component default class name and class prefix.
|
|
8972
9250
|
*/
|
|
8973
9251
|
const CLASSNAME$B = 'lumx-notification';
|
|
9252
|
+
const {
|
|
9253
|
+
block: block$x,
|
|
9254
|
+
element: element$n
|
|
9255
|
+
} = classNames.bem(CLASSNAME$B);
|
|
8974
9256
|
|
|
8975
9257
|
/**
|
|
8976
9258
|
* Component default props.
|
|
@@ -9030,11 +9312,10 @@ const Notification = forwardRef((props, ref) => {
|
|
|
9030
9312
|
ref: mergeRefs(ref, rootRef),
|
|
9031
9313
|
role: "alert",
|
|
9032
9314
|
...forwardedProps,
|
|
9033
|
-
className: classNames.join(className,
|
|
9034
|
-
color,
|
|
9035
|
-
hasAction,
|
|
9036
|
-
|
|
9037
|
-
prefix: CLASSNAME$B
|
|
9315
|
+
className: classNames.join(className, block$x({
|
|
9316
|
+
[`color-${color}`]: Boolean(color),
|
|
9317
|
+
'has-action': hasAction,
|
|
9318
|
+
'is-hidden': !isOpen
|
|
9038
9319
|
})),
|
|
9039
9320
|
onClick: onClick,
|
|
9040
9321
|
style: {
|
|
@@ -9042,16 +9323,16 @@ const Notification = forwardRef((props, ref) => {
|
|
|
9042
9323
|
zIndex
|
|
9043
9324
|
},
|
|
9044
9325
|
children: [/*#__PURE__*/jsx("div", {
|
|
9045
|
-
className:
|
|
9326
|
+
className: element$n('icon'),
|
|
9046
9327
|
children: /*#__PURE__*/jsx(Icon, {
|
|
9047
9328
|
icon: icon,
|
|
9048
9329
|
size: Size$1.s
|
|
9049
9330
|
})
|
|
9050
9331
|
}), /*#__PURE__*/jsx("div", {
|
|
9051
|
-
className:
|
|
9332
|
+
className: element$n('content'),
|
|
9052
9333
|
children: content
|
|
9053
9334
|
}), hasAction && /*#__PURE__*/jsx("div", {
|
|
9054
|
-
className:
|
|
9335
|
+
className: element$n('action'),
|
|
9055
9336
|
children: /*#__PURE__*/jsx(Button, {
|
|
9056
9337
|
emphasis: Emphasis$1.medium,
|
|
9057
9338
|
theme: theme,
|
|
@@ -9135,12 +9416,16 @@ const COMPONENT_NAME$z = 'PostBlock';
|
|
|
9135
9416
|
* Component default class name and class prefix.
|
|
9136
9417
|
*/
|
|
9137
9418
|
const CLASSNAME$z = 'lumx-post-block';
|
|
9419
|
+
const {
|
|
9420
|
+
block: block$w,
|
|
9421
|
+
element: element$m
|
|
9422
|
+
} = classNames.bem(CLASSNAME$z);
|
|
9138
9423
|
|
|
9139
9424
|
/**
|
|
9140
9425
|
* Component default props.
|
|
9141
9426
|
*/
|
|
9142
9427
|
const DEFAULT_PROPS$z = {
|
|
9143
|
-
orientation: Orientation.horizontal
|
|
9428
|
+
orientation: Orientation$1.horizontal
|
|
9144
9429
|
};
|
|
9145
9430
|
|
|
9146
9431
|
/**
|
|
@@ -9169,51 +9454,50 @@ const PostBlock = forwardRef((props, ref) => {
|
|
|
9169
9454
|
} = props;
|
|
9170
9455
|
return /*#__PURE__*/jsxs("div", {
|
|
9171
9456
|
ref: ref,
|
|
9172
|
-
className: classNames.join(className,
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
theme
|
|
9457
|
+
className: classNames.join(className, block$w({
|
|
9458
|
+
[`orientation-${orientation}`]: Boolean(orientation),
|
|
9459
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
9176
9460
|
})),
|
|
9177
9461
|
...forwardedProps,
|
|
9178
9462
|
children: [thumbnailProps && /*#__PURE__*/jsx("div", {
|
|
9179
|
-
className:
|
|
9463
|
+
className: element$m('thumbnail'),
|
|
9180
9464
|
children: /*#__PURE__*/jsx(Thumbnail, {
|
|
9181
9465
|
...thumbnailProps,
|
|
9182
9466
|
theme: theme,
|
|
9183
9467
|
variant: ThumbnailVariant.rounded
|
|
9184
9468
|
})
|
|
9185
9469
|
}), /*#__PURE__*/jsxs("div", {
|
|
9186
|
-
className:
|
|
9470
|
+
className: element$m('wrapper'),
|
|
9187
9471
|
children: [author && /*#__PURE__*/jsx("div", {
|
|
9188
|
-
className:
|
|
9472
|
+
className: element$m('author'),
|
|
9189
9473
|
children: author
|
|
9190
9474
|
}), title && /*#__PURE__*/jsx("button", {
|
|
9191
9475
|
type: "button",
|
|
9192
|
-
className:
|
|
9476
|
+
className: element$m('title'),
|
|
9193
9477
|
onClick: onClick,
|
|
9194
9478
|
children: title
|
|
9195
9479
|
}), meta && /*#__PURE__*/jsx("span", {
|
|
9196
|
-
className:
|
|
9480
|
+
className: element$m('meta'),
|
|
9197
9481
|
children: meta
|
|
9198
9482
|
}), typeof text === 'string' ? /*#__PURE__*/jsx("p", {
|
|
9199
|
-
className:
|
|
9483
|
+
className: element$m('text'),
|
|
9200
9484
|
children: text
|
|
9201
9485
|
}) :
|
|
9202
9486
|
/*#__PURE__*/
|
|
9203
9487
|
// eslint-disable-next-line react/no-danger
|
|
9204
9488
|
jsx("p", {
|
|
9205
9489
|
dangerouslySetInnerHTML: text,
|
|
9206
|
-
className:
|
|
9490
|
+
className: element$m('text')
|
|
9207
9491
|
}), attachments && /*#__PURE__*/jsx("div", {
|
|
9208
|
-
className:
|
|
9492
|
+
className: element$m('attachments'),
|
|
9209
9493
|
children: attachments
|
|
9210
9494
|
}), (tags || actions) && /*#__PURE__*/jsxs("div", {
|
|
9211
|
-
className:
|
|
9495
|
+
className: element$m('toolbar'),
|
|
9212
9496
|
children: [tags && /*#__PURE__*/jsx("div", {
|
|
9213
|
-
className:
|
|
9497
|
+
className: element$m('tags'),
|
|
9214
9498
|
children: tags
|
|
9215
9499
|
}), actions && /*#__PURE__*/jsx("div", {
|
|
9216
|
-
className:
|
|
9500
|
+
className: element$m('actions'),
|
|
9217
9501
|
children: actions
|
|
9218
9502
|
})]
|
|
9219
9503
|
})]
|
|
@@ -9233,6 +9517,10 @@ const COMPONENT_NAME$y = 'ProgressLinear';
|
|
|
9233
9517
|
* Component default class name and class prefix.
|
|
9234
9518
|
*/
|
|
9235
9519
|
const CLASSNAME$y = 'lumx-progress-linear';
|
|
9520
|
+
const {
|
|
9521
|
+
block: block$v,
|
|
9522
|
+
element: element$l
|
|
9523
|
+
} = classNames.bem(CLASSNAME$y);
|
|
9236
9524
|
|
|
9237
9525
|
/**
|
|
9238
9526
|
* Component default props.
|
|
@@ -9256,14 +9544,13 @@ const ProgressLinear = forwardRef((props, ref) => {
|
|
|
9256
9544
|
return /*#__PURE__*/jsxs("div", {
|
|
9257
9545
|
ref: ref,
|
|
9258
9546
|
...forwardedProps,
|
|
9259
|
-
className: classNames.join(className,
|
|
9260
|
-
|
|
9261
|
-
theme
|
|
9547
|
+
className: classNames.join(className, block$v({
|
|
9548
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
9262
9549
|
})),
|
|
9263
9550
|
children: [/*#__PURE__*/jsx("div", {
|
|
9264
|
-
className:
|
|
9551
|
+
className: element$l('line1')
|
|
9265
9552
|
}), /*#__PURE__*/jsx("div", {
|
|
9266
|
-
className:
|
|
9553
|
+
className: element$l('line2')
|
|
9267
9554
|
})]
|
|
9268
9555
|
});
|
|
9269
9556
|
});
|
|
@@ -9280,6 +9567,10 @@ const COMPONENT_NAME$x = 'ProgressCircular';
|
|
|
9280
9567
|
* Component default class name and class prefix.
|
|
9281
9568
|
*/
|
|
9282
9569
|
const CLASSNAME$x = 'lumx-progress-circular';
|
|
9570
|
+
const {
|
|
9571
|
+
block: block$u,
|
|
9572
|
+
element: element$k
|
|
9573
|
+
} = classNames.bem(CLASSNAME$x);
|
|
9283
9574
|
|
|
9284
9575
|
/**
|
|
9285
9576
|
* Component default props.
|
|
@@ -9309,21 +9600,20 @@ const ProgressCircular = forwardRef((props, ref) => {
|
|
|
9309
9600
|
return /*#__PURE__*/jsxs(Element, {
|
|
9310
9601
|
ref: ref,
|
|
9311
9602
|
...forwardedProps,
|
|
9312
|
-
className: classNames.join(className,
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
display
|
|
9603
|
+
className: classNames.join(className, block$u({
|
|
9604
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
9605
|
+
[`size-${size}`]: Boolean(size),
|
|
9606
|
+
[`display-${display}`]: Boolean(display)
|
|
9317
9607
|
})),
|
|
9318
9608
|
children: [/*#__PURE__*/jsx(Element, {
|
|
9319
|
-
className:
|
|
9609
|
+
className: element$k('double-bounce1')
|
|
9320
9610
|
}), /*#__PURE__*/jsx(Element, {
|
|
9321
|
-
className:
|
|
9611
|
+
className: element$k('double-bounce2')
|
|
9322
9612
|
}), /*#__PURE__*/jsx("svg", {
|
|
9323
|
-
className:
|
|
9613
|
+
className: element$k('svg'),
|
|
9324
9614
|
viewBox: "25 25 50 50",
|
|
9325
9615
|
children: /*#__PURE__*/jsx("circle", {
|
|
9326
|
-
className:
|
|
9616
|
+
className: element$k('path'),
|
|
9327
9617
|
cx: "50",
|
|
9328
9618
|
cy: "50",
|
|
9329
9619
|
r: "20",
|
|
@@ -9355,6 +9645,9 @@ const COMPONENT_NAME$w = 'Progress';
|
|
|
9355
9645
|
* Component default class name and class prefix.
|
|
9356
9646
|
*/
|
|
9357
9647
|
const CLASSNAME$w = 'lumx-progress';
|
|
9648
|
+
const {
|
|
9649
|
+
block: block$t
|
|
9650
|
+
} = classNames.bem(CLASSNAME$w);
|
|
9358
9651
|
|
|
9359
9652
|
/**
|
|
9360
9653
|
* Component default props.
|
|
@@ -9382,10 +9675,9 @@ const Progress = forwardRef((props, ref) => {
|
|
|
9382
9675
|
return /*#__PURE__*/jsxs("div", {
|
|
9383
9676
|
ref: ref,
|
|
9384
9677
|
...forwardedProps,
|
|
9385
|
-
className: classNames.join(className,
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
variant
|
|
9678
|
+
className: classNames.join(className, block$t({
|
|
9679
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
9680
|
+
[`variant-${variant}`]: Boolean(variant)
|
|
9389
9681
|
})),
|
|
9390
9682
|
children: [variant === ProgressVariant.circular && /*#__PURE__*/jsx(ProgressCircular, {
|
|
9391
9683
|
theme: theme
|
|
@@ -9659,6 +9951,10 @@ const COMPONENT_NAME$v = 'ProgressTracker';
|
|
|
9659
9951
|
* Component default class name and class prefix.
|
|
9660
9952
|
*/
|
|
9661
9953
|
const CLASSNAME$v = 'lumx-progress-tracker';
|
|
9954
|
+
const {
|
|
9955
|
+
block: block$s,
|
|
9956
|
+
element: element$j
|
|
9957
|
+
} = classNames.bem(CLASSNAME$v);
|
|
9662
9958
|
|
|
9663
9959
|
/**
|
|
9664
9960
|
* Component default props.
|
|
@@ -9695,20 +9991,20 @@ const ProgressTracker = forwardRef((props, ref) => {
|
|
|
9695
9991
|
return /*#__PURE__*/jsxs("div", {
|
|
9696
9992
|
ref: mergeRefs(ref, stepListRef),
|
|
9697
9993
|
...forwardedProps,
|
|
9698
|
-
className: classNames.join(className,
|
|
9994
|
+
className: classNames.join(className, block$s()),
|
|
9699
9995
|
children: [/*#__PURE__*/jsx("div", {
|
|
9700
|
-
className:
|
|
9996
|
+
className: element$j('steps'),
|
|
9701
9997
|
role: "tablist",
|
|
9702
9998
|
"aria-label": ariaLabel,
|
|
9703
9999
|
children: children
|
|
9704
10000
|
}), /*#__PURE__*/jsx("div", {
|
|
9705
|
-
className:
|
|
10001
|
+
className: element$j('background-bar'),
|
|
9706
10002
|
style: {
|
|
9707
10003
|
left: `${backgroundPosition}%`,
|
|
9708
10004
|
right: `${backgroundPosition}%`
|
|
9709
10005
|
}
|
|
9710
10006
|
}), /*#__PURE__*/jsx("div", {
|
|
9711
|
-
className:
|
|
10007
|
+
className: element$j('foreground-bar'),
|
|
9712
10008
|
style: {
|
|
9713
10009
|
left: `${backgroundPosition}%`,
|
|
9714
10010
|
right: `${backgroundPosition}%`,
|
|
@@ -9730,6 +10026,10 @@ const COMPONENT_NAME$u = 'ProgressTrackerStep';
|
|
|
9730
10026
|
* Component default class name and class prefix.
|
|
9731
10027
|
*/
|
|
9732
10028
|
const CLASSNAME$u = 'lumx-progress-tracker-step';
|
|
10029
|
+
const {
|
|
10030
|
+
block: block$r,
|
|
10031
|
+
element: element$i
|
|
10032
|
+
} = classNames.bem(CLASSNAME$u);
|
|
9733
10033
|
|
|
9734
10034
|
/**
|
|
9735
10035
|
* Component default props.
|
|
@@ -9798,12 +10098,11 @@ const ProgressTrackerStep = forwardRef((props, ref) => {
|
|
|
9798
10098
|
...forwardedProps,
|
|
9799
10099
|
type: "button",
|
|
9800
10100
|
id: state?.tabId,
|
|
9801
|
-
className: classNames.join(className,
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
isComplete
|
|
10101
|
+
className: classNames.join(className, block$r({
|
|
10102
|
+
'has-error': hasError,
|
|
10103
|
+
'is-active': isActive,
|
|
10104
|
+
'is-clickable': state && !isAnyDisabled,
|
|
10105
|
+
'is-complete': isComplete
|
|
9807
10106
|
})),
|
|
9808
10107
|
onClick: changeToCurrentTab,
|
|
9809
10108
|
onKeyPress: handleKeyPress,
|
|
@@ -9814,16 +10113,16 @@ const ProgressTrackerStep = forwardRef((props, ref) => {
|
|
|
9814
10113
|
"aria-selected": isActive,
|
|
9815
10114
|
"aria-controls": state?.tabPanelId,
|
|
9816
10115
|
children: [/*#__PURE__*/jsx(Icon, {
|
|
9817
|
-
className:
|
|
10116
|
+
className: element$i('state'),
|
|
9818
10117
|
icon: getIcon(),
|
|
9819
10118
|
size: Size$1.s
|
|
9820
10119
|
}), /*#__PURE__*/jsx(InputLabel, {
|
|
9821
10120
|
htmlFor: state?.tabId || '',
|
|
9822
|
-
className:
|
|
10121
|
+
className: element$i('label'),
|
|
9823
10122
|
children: label
|
|
9824
10123
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
9825
10124
|
kind: hasError ? Kind$1.error : Kind$1.info,
|
|
9826
|
-
className:
|
|
10125
|
+
className: element$i('helper'),
|
|
9827
10126
|
children: helper
|
|
9828
10127
|
})]
|
|
9829
10128
|
});
|
|
@@ -9841,6 +10140,9 @@ const COMPONENT_NAME$t = 'ProgressTrackerStepPanel';
|
|
|
9841
10140
|
* Component default class name and class prefix.
|
|
9842
10141
|
*/
|
|
9843
10142
|
const CLASSNAME$t = `lumx-step-panel`;
|
|
10143
|
+
const {
|
|
10144
|
+
block: block$q
|
|
10145
|
+
} = classNames.bem(CLASSNAME$t);
|
|
9844
10146
|
|
|
9845
10147
|
/**
|
|
9846
10148
|
* Component default props.
|
|
@@ -9870,9 +10172,8 @@ const ProgressTrackerStepPanel = forwardRef((props, ref) => {
|
|
|
9870
10172
|
ref: ref,
|
|
9871
10173
|
...forwardedProps,
|
|
9872
10174
|
id: state?.tabPanelId,
|
|
9873
|
-
className: classNames.join(className,
|
|
9874
|
-
|
|
9875
|
-
isActive
|
|
10175
|
+
className: classNames.join(className, block$q({
|
|
10176
|
+
'is-active': isActive
|
|
9876
10177
|
})),
|
|
9877
10178
|
role: "tabpanel",
|
|
9878
10179
|
tabIndex: isActive ? 0 : -1,
|
|
@@ -9893,6 +10194,10 @@ const COMPONENT_NAME$s = 'RadioButton';
|
|
|
9893
10194
|
* Component default class name and class prefix.
|
|
9894
10195
|
*/
|
|
9895
10196
|
const CLASSNAME$s = 'lumx-radio-button';
|
|
10197
|
+
const {
|
|
10198
|
+
block: block$p,
|
|
10199
|
+
element: element$h
|
|
10200
|
+
} = classNames.bem(CLASSNAME$s);
|
|
9896
10201
|
|
|
9897
10202
|
/**
|
|
9898
10203
|
* Component default props.
|
|
@@ -9938,18 +10243,17 @@ const RadioButton = forwardRef((props, ref) => {
|
|
|
9938
10243
|
return /*#__PURE__*/jsxs("div", {
|
|
9939
10244
|
ref: ref,
|
|
9940
10245
|
...forwardedProps,
|
|
9941
|
-
className: classNames.join(className,
|
|
9942
|
-
isChecked,
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
theme
|
|
10246
|
+
className: classNames.join(className, block$p({
|
|
10247
|
+
'is-checked': isChecked,
|
|
10248
|
+
'is-disabled': isAnyDisabled,
|
|
10249
|
+
'is-unchecked': !isChecked,
|
|
10250
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
9947
10251
|
})),
|
|
9948
10252
|
children: [/*#__PURE__*/jsxs("div", {
|
|
9949
|
-
className:
|
|
10253
|
+
className: element$h('input-wrapper'),
|
|
9950
10254
|
children: [/*#__PURE__*/jsx("input", {
|
|
9951
10255
|
ref: inputRef,
|
|
9952
|
-
className:
|
|
10256
|
+
className: element$h('input-native'),
|
|
9953
10257
|
...disabledStateProps,
|
|
9954
10258
|
id: inputId,
|
|
9955
10259
|
type: "radio",
|
|
@@ -9961,24 +10265,24 @@ const RadioButton = forwardRef((props, ref) => {
|
|
|
9961
10265
|
"aria-describedby": helper ? `${inputId}-helper` : undefined,
|
|
9962
10266
|
...inputProps
|
|
9963
10267
|
}), /*#__PURE__*/jsxs("div", {
|
|
9964
|
-
className:
|
|
10268
|
+
className: element$h('input-placeholder'),
|
|
9965
10269
|
children: [/*#__PURE__*/jsx("div", {
|
|
9966
|
-
className:
|
|
10270
|
+
className: element$h('input-background')
|
|
9967
10271
|
}), /*#__PURE__*/jsx("div", {
|
|
9968
|
-
className:
|
|
10272
|
+
className: element$h('input-indicator')
|
|
9969
10273
|
})]
|
|
9970
10274
|
})]
|
|
9971
10275
|
}), /*#__PURE__*/jsxs("div", {
|
|
9972
|
-
className:
|
|
10276
|
+
className: element$h('content'),
|
|
9973
10277
|
children: [label && /*#__PURE__*/jsx(InputLabel, {
|
|
9974
10278
|
htmlFor: inputId,
|
|
9975
10279
|
theme: theme,
|
|
9976
|
-
className:
|
|
10280
|
+
className: element$h('label'),
|
|
9977
10281
|
children: label
|
|
9978
10282
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
9979
10283
|
id: `${inputId}-helper`,
|
|
9980
10284
|
theme: theme,
|
|
9981
|
-
className:
|
|
10285
|
+
className: element$h('helper'),
|
|
9982
10286
|
children: helper
|
|
9983
10287
|
})]
|
|
9984
10288
|
})]
|
|
@@ -10047,6 +10351,10 @@ function useListenFocus(ref) {
|
|
|
10047
10351
|
|
|
10048
10352
|
/** The default class name and classes prefix for this component. */
|
|
10049
10353
|
const CLASSNAME$q = 'lumx-select';
|
|
10354
|
+
const {
|
|
10355
|
+
block: block$o,
|
|
10356
|
+
element: element$g
|
|
10357
|
+
} = classNames.bem(CLASSNAME$q);
|
|
10050
10358
|
const WithSelectContext = (SelectElement, props, ref) => {
|
|
10051
10359
|
const defaultTheme = useTheme() || Theme$1.light;
|
|
10052
10360
|
const {
|
|
@@ -10099,18 +10407,17 @@ const WithSelectContext = (SelectElement, props, ref) => {
|
|
|
10099
10407
|
useFocusTrap(isOpen && dropdownRef.current, focusElement?.current);
|
|
10100
10408
|
return /*#__PURE__*/jsxs("div", {
|
|
10101
10409
|
ref: mergeRefs(ref, selectRef),
|
|
10102
|
-
className: classNames.join(className,
|
|
10103
|
-
hasError,
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
isDisabled,
|
|
10108
|
-
isEmpty,
|
|
10109
|
-
isFocus,
|
|
10110
|
-
isOpen,
|
|
10111
|
-
isValid,
|
|
10112
|
-
|
|
10113
|
-
theme: theme === Theme$1.light ? Theme$1.light : Theme$1.dark
|
|
10410
|
+
className: classNames.join(className, block$o({
|
|
10411
|
+
'has-error': hasError,
|
|
10412
|
+
'has-label': Boolean(label),
|
|
10413
|
+
'has-placeholder': Boolean(placeholder),
|
|
10414
|
+
'has-value': !isEmpty,
|
|
10415
|
+
'is-disabled': isDisabled,
|
|
10416
|
+
'is-empty': isEmpty,
|
|
10417
|
+
'is-focus': isFocus,
|
|
10418
|
+
'is-open': isOpen,
|
|
10419
|
+
'is-valid': isValid,
|
|
10420
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
10114
10421
|
})),
|
|
10115
10422
|
children: [/*#__PURE__*/jsx(SelectElement, {
|
|
10116
10423
|
...forwardedProps,
|
|
@@ -10142,12 +10449,12 @@ const WithSelectContext = (SelectElement, props, ref) => {
|
|
|
10142
10449
|
ref: dropdownRef,
|
|
10143
10450
|
children: children
|
|
10144
10451
|
}), hasError && error && /*#__PURE__*/jsx(InputHelper, {
|
|
10145
|
-
className:
|
|
10452
|
+
className: element$g('helper'),
|
|
10146
10453
|
kind: Kind$1.error,
|
|
10147
10454
|
theme: theme,
|
|
10148
10455
|
children: error
|
|
10149
10456
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
10150
|
-
className:
|
|
10457
|
+
className: element$g('helper'),
|
|
10151
10458
|
theme: theme,
|
|
10152
10459
|
children: helper
|
|
10153
10460
|
})]
|
|
@@ -10167,6 +10474,10 @@ const COMPONENT_NAME$q = 'Select';
|
|
|
10167
10474
|
|
|
10168
10475
|
/** The default class name and classes prefix for this component. */
|
|
10169
10476
|
const CLASSNAME$p = 'lumx-select';
|
|
10477
|
+
const {
|
|
10478
|
+
block: block$n,
|
|
10479
|
+
element: element$f
|
|
10480
|
+
} = classNames.bem(CLASSNAME$p);
|
|
10170
10481
|
|
|
10171
10482
|
/** The default value of props. */
|
|
10172
10483
|
const DEFAULT_PROPS$q = {
|
|
@@ -10206,10 +10517,10 @@ const SelectField = props => {
|
|
|
10206
10517
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
10207
10518
|
children: [variant === SelectVariant.input && /*#__PURE__*/jsxs(Fragment, {
|
|
10208
10519
|
children: [label && /*#__PURE__*/jsx("div", {
|
|
10209
|
-
className:
|
|
10520
|
+
className: element$f('header'),
|
|
10210
10521
|
children: /*#__PURE__*/jsx(InputLabel, {
|
|
10211
10522
|
htmlFor: id,
|
|
10212
|
-
className:
|
|
10523
|
+
className: element$f('label'),
|
|
10213
10524
|
isRequired: isRequired,
|
|
10214
10525
|
theme: theme,
|
|
10215
10526
|
children: label
|
|
@@ -10217,33 +10528,35 @@ const SelectField = props => {
|
|
|
10217
10528
|
}), /*#__PURE__*/jsxs("div", {
|
|
10218
10529
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10219
10530
|
id: id,
|
|
10220
|
-
className:
|
|
10531
|
+
className: element$f('wrapper'),
|
|
10221
10532
|
onClick: onInputClick,
|
|
10222
10533
|
onKeyDown: handleKeyboardNav,
|
|
10223
10534
|
tabIndex: isDisabled ? undefined : 0,
|
|
10224
10535
|
"aria-disabled": isDisabled || undefined,
|
|
10225
10536
|
...forwardedProps,
|
|
10226
10537
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
10227
|
-
className:
|
|
10538
|
+
className: element$f('input-icon'),
|
|
10228
10539
|
color: theme === Theme$1.dark ? 'light' : undefined,
|
|
10229
10540
|
icon: icon,
|
|
10230
10541
|
size: Size$1.xs
|
|
10231
10542
|
}), /*#__PURE__*/jsxs("div", {
|
|
10232
|
-
className:
|
|
10543
|
+
className: element$f('input-native', {
|
|
10544
|
+
placeholder: isEmpty && placeholder
|
|
10545
|
+
}),
|
|
10233
10546
|
children: [!isEmpty && /*#__PURE__*/jsx("span", {
|
|
10234
10547
|
children: selectedValueRender?.(value)
|
|
10235
10548
|
}), isEmpty && placeholder && /*#__PURE__*/jsx("span", {
|
|
10236
10549
|
children: placeholder
|
|
10237
10550
|
})]
|
|
10238
10551
|
}), (isValid || hasError) && /*#__PURE__*/jsx("div", {
|
|
10239
|
-
className:
|
|
10552
|
+
className: element$f('input-validity'),
|
|
10240
10553
|
children: /*#__PURE__*/jsx(Icon, {
|
|
10241
10554
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
10242
10555
|
size: Size$1.xxs
|
|
10243
10556
|
})
|
|
10244
10557
|
}), hasInputClear && clearButtonProps && /*#__PURE__*/jsx(IconButton, {
|
|
10245
10558
|
...clearButtonProps,
|
|
10246
|
-
className:
|
|
10559
|
+
className: element$f('input-clear'),
|
|
10247
10560
|
icon: mdiCloseCircle,
|
|
10248
10561
|
emphasis: Emphasis$1.low,
|
|
10249
10562
|
size: Size$1.s,
|
|
@@ -10251,7 +10564,7 @@ const SelectField = props => {
|
|
|
10251
10564
|
onClick: onClear,
|
|
10252
10565
|
onKeyDown: stopPropagation
|
|
10253
10566
|
}), /*#__PURE__*/jsx("div", {
|
|
10254
|
-
className:
|
|
10567
|
+
className: element$f('input-indicator'),
|
|
10255
10568
|
children: /*#__PURE__*/jsx(Icon, {
|
|
10256
10569
|
icon: mdiMenuDown,
|
|
10257
10570
|
size: Size$1.s
|
|
@@ -10292,10 +10605,9 @@ const Select = forwardRef((props, ref) => {
|
|
|
10292
10605
|
return WithSelectContext(SelectField, {
|
|
10293
10606
|
...DEFAULT_PROPS$q,
|
|
10294
10607
|
...props,
|
|
10295
|
-
className: classNames.join(props.className,
|
|
10296
|
-
hasInputClear,
|
|
10297
|
-
|
|
10298
|
-
prefix: CLASSNAME$p
|
|
10608
|
+
className: classNames.join(props.className, block$n({
|
|
10609
|
+
'has-input-clear': hasInputClear,
|
|
10610
|
+
'has-unique': !props.isEmpty
|
|
10299
10611
|
})),
|
|
10300
10612
|
hasInputClear,
|
|
10301
10613
|
isEmpty: isEmpty$1
|
|
@@ -10311,6 +10623,10 @@ const COMPONENT_NAME$p = 'Select';
|
|
|
10311
10623
|
|
|
10312
10624
|
/** The default class name and classes prefix for this component. */
|
|
10313
10625
|
const CLASSNAME$o = 'lumx-select';
|
|
10626
|
+
const {
|
|
10627
|
+
block: block$m,
|
|
10628
|
+
element: element$e
|
|
10629
|
+
} = classNames.bem(CLASSNAME$o);
|
|
10314
10630
|
|
|
10315
10631
|
/** The default value of props. */
|
|
10316
10632
|
const DEFAULT_PROPS$p = {
|
|
@@ -10359,10 +10675,10 @@ const SelectMultipleField = props => {
|
|
|
10359
10675
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
10360
10676
|
children: [variant === SelectVariant.input && /*#__PURE__*/jsxs(Fragment, {
|
|
10361
10677
|
children: [label && /*#__PURE__*/jsx("div", {
|
|
10362
|
-
className:
|
|
10678
|
+
className: element$e('header'),
|
|
10363
10679
|
children: /*#__PURE__*/jsx(InputLabel, {
|
|
10364
10680
|
htmlFor: id,
|
|
10365
|
-
className:
|
|
10681
|
+
className: element$e('label'),
|
|
10366
10682
|
isRequired: isRequired,
|
|
10367
10683
|
theme: theme,
|
|
10368
10684
|
children: label
|
|
@@ -10370,22 +10686,24 @@ const SelectMultipleField = props => {
|
|
|
10370
10686
|
}), /*#__PURE__*/jsxs("div", {
|
|
10371
10687
|
ref: mergeRefs(anchorRef, selectElementRef),
|
|
10372
10688
|
id: id,
|
|
10373
|
-
className:
|
|
10689
|
+
className: element$e('wrapper'),
|
|
10374
10690
|
onClick: onInputClick,
|
|
10375
10691
|
onKeyDown: handleKeyboardNav,
|
|
10376
10692
|
tabIndex: isDisabled ? undefined : 0,
|
|
10377
10693
|
"aria-disabled": isDisabled || undefined,
|
|
10378
10694
|
...forwardedProps,
|
|
10379
10695
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
10380
|
-
className:
|
|
10696
|
+
className: element$e('input-icon'),
|
|
10381
10697
|
color: theme === Theme$1.dark ? 'light' : undefined,
|
|
10382
10698
|
icon: icon,
|
|
10383
10699
|
size: Size$1.xs
|
|
10384
10700
|
}), /*#__PURE__*/jsx("div", {
|
|
10385
|
-
className:
|
|
10701
|
+
className: element$e('chips'),
|
|
10386
10702
|
children: !isEmpty && value.map((val, index) => selectedChipRender?.(val, index, onClear, isDisabled, theme))
|
|
10387
10703
|
}), isEmpty && placeholder && /*#__PURE__*/jsx("div", {
|
|
10388
|
-
className:
|
|
10704
|
+
className: element$e('input-native', {
|
|
10705
|
+
placeholder: true
|
|
10706
|
+
}),
|
|
10389
10707
|
children: /*#__PURE__*/jsx("span", {
|
|
10390
10708
|
children: placeholder
|
|
10391
10709
|
})
|
|
@@ -10439,9 +10757,8 @@ const SelectMultiple = forwardRef((props, ref) => {
|
|
|
10439
10757
|
return WithSelectContext(SelectMultipleField, {
|
|
10440
10758
|
...DEFAULT_PROPS$p,
|
|
10441
10759
|
...props,
|
|
10442
|
-
className: classNames.join(props.className,
|
|
10443
|
-
|
|
10444
|
-
prefix: CLASSNAME$o
|
|
10760
|
+
className: classNames.join(props.className, block$m({
|
|
10761
|
+
'has-multiple': !props.isEmpty
|
|
10445
10762
|
})),
|
|
10446
10763
|
isEmpty: props.value.length === 0,
|
|
10447
10764
|
isMultiple: true
|
|
@@ -10496,6 +10813,10 @@ const COMPONENT_NAME$n = 'SideNavigationItem';
|
|
|
10496
10813
|
* Component default class name and class prefix.
|
|
10497
10814
|
*/
|
|
10498
10815
|
const CLASSNAME$m = 'lumx-side-navigation-item';
|
|
10816
|
+
const {
|
|
10817
|
+
block: block$l,
|
|
10818
|
+
element: element$d
|
|
10819
|
+
} = classNames.bem(CLASSNAME$m);
|
|
10499
10820
|
|
|
10500
10821
|
/**
|
|
10501
10822
|
* Component default props.
|
|
@@ -10543,21 +10864,20 @@ const SideNavigationItem = forwardRef((props, ref) => {
|
|
|
10543
10864
|
return /*#__PURE__*/jsxs("li", {
|
|
10544
10865
|
ref: ref,
|
|
10545
10866
|
...forwardedProps,
|
|
10546
|
-
className: classNames.join(className,
|
|
10547
|
-
emphasis,
|
|
10548
|
-
|
|
10549
|
-
isSelected
|
|
10550
|
-
prefix: CLASSNAME$m
|
|
10867
|
+
className: classNames.join(className, block$l({
|
|
10868
|
+
[`emphasis-${emphasis}`]: Boolean(emphasis),
|
|
10869
|
+
'is-open': showChildren,
|
|
10870
|
+
'is-selected': isSelected
|
|
10551
10871
|
})),
|
|
10552
10872
|
children: [shouldSplitActions ? /*#__PURE__*/jsxs("div", {
|
|
10553
|
-
className:
|
|
10873
|
+
className: element$d('wrapper'),
|
|
10554
10874
|
children: [/*#__PURE__*/jsxs(RawClickable, {
|
|
10555
10875
|
as: linkAs || (linkProps?.href ? 'a' : 'button'),
|
|
10556
10876
|
...linkProps,
|
|
10557
|
-
className:
|
|
10877
|
+
className: element$d('link'),
|
|
10558
10878
|
onClick: onClick,
|
|
10559
10879
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
10560
|
-
className:
|
|
10880
|
+
className: element$d('icon'),
|
|
10561
10881
|
icon: icon,
|
|
10562
10882
|
size: Size$1.xs
|
|
10563
10883
|
}), /*#__PURE__*/jsx("span", {
|
|
@@ -10565,7 +10885,7 @@ const SideNavigationItem = forwardRef((props, ref) => {
|
|
|
10565
10885
|
})]
|
|
10566
10886
|
}), /*#__PURE__*/jsx(IconButton, {
|
|
10567
10887
|
...toggleButtonProps,
|
|
10568
|
-
className:
|
|
10888
|
+
className: element$d('toggle'),
|
|
10569
10889
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10570
10890
|
size: Size$1.m,
|
|
10571
10891
|
emphasis: Emphasis$1.low,
|
|
@@ -10575,22 +10895,22 @@ const SideNavigationItem = forwardRef((props, ref) => {
|
|
|
10575
10895
|
}) : /*#__PURE__*/jsxs(RawClickable, {
|
|
10576
10896
|
as: linkAs || (linkProps?.href ? 'a' : 'button'),
|
|
10577
10897
|
...linkProps,
|
|
10578
|
-
className:
|
|
10898
|
+
className: element$d('link'),
|
|
10579
10899
|
onClick: onClick,
|
|
10580
10900
|
...ariaProps,
|
|
10581
10901
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
10582
|
-
className:
|
|
10902
|
+
className: element$d('icon'),
|
|
10583
10903
|
icon: icon,
|
|
10584
10904
|
size: Size$1.xs
|
|
10585
10905
|
}), /*#__PURE__*/jsx("span", {
|
|
10586
10906
|
children: label
|
|
10587
10907
|
}), hasContent && /*#__PURE__*/jsx(Icon, {
|
|
10588
|
-
className:
|
|
10908
|
+
className: element$d('chevron'),
|
|
10589
10909
|
icon: isOpen ? mdiChevronUp : mdiChevronDown,
|
|
10590
10910
|
size: Size$1.xs
|
|
10591
10911
|
})]
|
|
10592
10912
|
}), (closeMode === 'hide' || showChildren) && /*#__PURE__*/jsx("ul", {
|
|
10593
|
-
className:
|
|
10913
|
+
className: element$d('children'),
|
|
10594
10914
|
id: contentId,
|
|
10595
10915
|
children: content
|
|
10596
10916
|
})]
|
|
@@ -10611,6 +10931,9 @@ const COMPONENT_NAME$m = 'SkeletonCircle';
|
|
|
10611
10931
|
* Component default class name and class prefix.
|
|
10612
10932
|
*/
|
|
10613
10933
|
const CLASSNAME$l = 'lumx-skeleton-circle';
|
|
10934
|
+
const {
|
|
10935
|
+
block: block$k
|
|
10936
|
+
} = classNames.bem(CLASSNAME$l);
|
|
10614
10937
|
|
|
10615
10938
|
/**
|
|
10616
10939
|
* SkeletonCircle component.
|
|
@@ -10631,11 +10954,10 @@ const SkeletonCircle = forwardRef((props, ref) => {
|
|
|
10631
10954
|
return /*#__PURE__*/jsx("div", {
|
|
10632
10955
|
ref: ref,
|
|
10633
10956
|
...forwardedProps,
|
|
10634
|
-
className: classNames.join(className,
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
theme
|
|
10957
|
+
className: classNames.join(className, block$k({
|
|
10958
|
+
[`size-${size}`]: Boolean(size),
|
|
10959
|
+
[`color-${color}`]: Boolean(color),
|
|
10960
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
10639
10961
|
}))
|
|
10640
10962
|
});
|
|
10641
10963
|
});
|
|
@@ -10666,6 +10988,10 @@ const COMPONENT_NAME$l = 'SkeletonRectangle';
|
|
|
10666
10988
|
* Component default class name and class prefix.
|
|
10667
10989
|
*/
|
|
10668
10990
|
const CLASSNAME$k = 'lumx-skeleton-rectangle';
|
|
10991
|
+
const {
|
|
10992
|
+
block: block$j,
|
|
10993
|
+
element: element$c
|
|
10994
|
+
} = classNames.bem(CLASSNAME$k);
|
|
10669
10995
|
|
|
10670
10996
|
/**
|
|
10671
10997
|
* SkeletonRectangle component.
|
|
@@ -10689,17 +11015,16 @@ const SkeletonRectangle = forwardRef((props, ref) => {
|
|
|
10689
11015
|
return /*#__PURE__*/jsx("div", {
|
|
10690
11016
|
ref: ref,
|
|
10691
11017
|
...forwardedProps,
|
|
10692
|
-
className: classNames.join(className,
|
|
10693
|
-
|
|
10694
|
-
aspectRatio,
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
color
|
|
11018
|
+
className: classNames.join(className, block$j({
|
|
11019
|
+
[`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),
|
|
11020
|
+
[`height-${height}`]: Boolean(aspectRatio ? undefined : height),
|
|
11021
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
11022
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
11023
|
+
[`width-${width}`]: Boolean(width),
|
|
11024
|
+
[`color-${color}`]: Boolean(color)
|
|
10700
11025
|
})),
|
|
10701
11026
|
children: /*#__PURE__*/jsx("div", {
|
|
10702
|
-
className:
|
|
11027
|
+
className: element$c('inner')
|
|
10703
11028
|
})
|
|
10704
11029
|
});
|
|
10705
11030
|
});
|
|
@@ -10718,6 +11043,10 @@ const COMPONENT_NAME$k = 'SkeletonTypography';
|
|
|
10718
11043
|
* Component default class name and class prefix.
|
|
10719
11044
|
*/
|
|
10720
11045
|
const CLASSNAME$j = 'lumx-skeleton-typography';
|
|
11046
|
+
const {
|
|
11047
|
+
block: block$i,
|
|
11048
|
+
element: element$b
|
|
11049
|
+
} = classNames.bem(CLASSNAME$j);
|
|
10721
11050
|
|
|
10722
11051
|
/**
|
|
10723
11052
|
* SkeletonTypography component.
|
|
@@ -10739,18 +11068,17 @@ const SkeletonTypography = forwardRef((props, ref) => {
|
|
|
10739
11068
|
return /*#__PURE__*/jsx("div", {
|
|
10740
11069
|
ref: ref,
|
|
10741
11070
|
...forwardedProps,
|
|
10742
|
-
className: classNames.join(className,
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
color
|
|
11071
|
+
className: classNames.join(className, block$i({
|
|
11072
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
11073
|
+
[`typography-${typography}`]: Boolean(typography),
|
|
11074
|
+
[`color-${color}`]: Boolean(color)
|
|
10747
11075
|
})),
|
|
10748
11076
|
style: {
|
|
10749
11077
|
...forwardedProps.style,
|
|
10750
11078
|
width
|
|
10751
11079
|
},
|
|
10752
11080
|
children: /*#__PURE__*/jsx("div", {
|
|
10753
|
-
className:
|
|
11081
|
+
className: element$b('inner')
|
|
10754
11082
|
})
|
|
10755
11083
|
});
|
|
10756
11084
|
});
|
|
@@ -10802,6 +11130,10 @@ const COMPONENT_NAME$j = 'Slider';
|
|
|
10802
11130
|
* Component default class name and class prefix.
|
|
10803
11131
|
*/
|
|
10804
11132
|
const CLASSNAME$i = 'lumx-slider';
|
|
11133
|
+
const {
|
|
11134
|
+
block: block$h,
|
|
11135
|
+
element: element$a
|
|
11136
|
+
} = classNames.bem(CLASSNAME$i);
|
|
10805
11137
|
|
|
10806
11138
|
/**
|
|
10807
11139
|
* Component default props.
|
|
@@ -10994,41 +11326,46 @@ const Slider = forwardRef((props, ref) => {
|
|
|
10994
11326
|
return /*#__PURE__*/jsxs("div", {
|
|
10995
11327
|
ref: ref,
|
|
10996
11328
|
...forwardedProps,
|
|
10997
|
-
className: classNames.join(className,
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
hasLabel: Boolean(label)
|
|
11329
|
+
className: classNames.join(className, block$h({
|
|
11330
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
11331
|
+
'has-label': Boolean(label)
|
|
11001
11332
|
})),
|
|
11002
11333
|
onMouseDown: handleMouseDown,
|
|
11003
11334
|
children: [label && /*#__PURE__*/jsx(InputLabel, {
|
|
11004
11335
|
id: sliderLabelId,
|
|
11005
11336
|
htmlFor: sliderId,
|
|
11006
|
-
className:
|
|
11337
|
+
className: element$a('label'),
|
|
11007
11338
|
theme: theme,
|
|
11008
11339
|
children: label
|
|
11009
11340
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
11010
|
-
className:
|
|
11341
|
+
className: element$a('helper'),
|
|
11011
11342
|
theme: theme,
|
|
11012
11343
|
children: helper
|
|
11013
11344
|
}), /*#__PURE__*/jsxs("div", {
|
|
11014
|
-
className:
|
|
11345
|
+
className: element$a('ui-wrapper'),
|
|
11015
11346
|
children: [!hideMinMaxLabel && /*#__PURE__*/jsx("span", {
|
|
11016
|
-
className:
|
|
11347
|
+
className: element$a('value-label', {
|
|
11348
|
+
min: true
|
|
11349
|
+
}),
|
|
11017
11350
|
children: min
|
|
11018
11351
|
}), /*#__PURE__*/jsxs("div", {
|
|
11019
|
-
className:
|
|
11352
|
+
className: element$a('wrapper'),
|
|
11020
11353
|
ref: sliderRef,
|
|
11021
11354
|
children: [/*#__PURE__*/jsx("div", {
|
|
11022
|
-
className:
|
|
11355
|
+
className: element$a('track', {
|
|
11356
|
+
background: true
|
|
11357
|
+
})
|
|
11023
11358
|
}), /*#__PURE__*/jsx("div", {
|
|
11024
|
-
className:
|
|
11359
|
+
className: element$a('track', {
|
|
11360
|
+
active: true
|
|
11361
|
+
}),
|
|
11025
11362
|
style: {
|
|
11026
11363
|
width: percentString
|
|
11027
11364
|
}
|
|
11028
11365
|
}), steps ? /*#__PURE__*/jsx("div", {
|
|
11029
|
-
className:
|
|
11366
|
+
className: element$a('ticks'),
|
|
11030
11367
|
children: availableSteps.map((step, idx) => /*#__PURE__*/jsx("div", {
|
|
11031
|
-
className:
|
|
11368
|
+
className: element$a('tick'),
|
|
11032
11369
|
style: {
|
|
11033
11370
|
left: `${step * 100}%`
|
|
11034
11371
|
}
|
|
@@ -11038,7 +11375,7 @@ const Slider = forwardRef((props, ref) => {
|
|
|
11038
11375
|
"aria-labelledby": sliderLabelId,
|
|
11039
11376
|
name: name,
|
|
11040
11377
|
id: sliderId,
|
|
11041
|
-
className:
|
|
11378
|
+
className: element$a('handle'),
|
|
11042
11379
|
style: {
|
|
11043
11380
|
left: percentString
|
|
11044
11381
|
},
|
|
@@ -11046,7 +11383,9 @@ const Slider = forwardRef((props, ref) => {
|
|
|
11046
11383
|
...disabledStateProps
|
|
11047
11384
|
})]
|
|
11048
11385
|
}), !hideMinMaxLabel && /*#__PURE__*/jsx("span", {
|
|
11049
|
-
className:
|
|
11386
|
+
className: element$a('value-label', {
|
|
11387
|
+
max: true
|
|
11388
|
+
}),
|
|
11050
11389
|
children: max
|
|
11051
11390
|
})]
|
|
11052
11391
|
})]
|
|
@@ -11653,6 +11992,10 @@ const COMPONENT_NAME$g = 'SlideshowControls';
|
|
|
11653
11992
|
* Component default class name and class prefix.
|
|
11654
11993
|
*/
|
|
11655
11994
|
const CLASSNAME$f = 'lumx-slideshow-controls';
|
|
11995
|
+
const {
|
|
11996
|
+
block: block$g,
|
|
11997
|
+
element: element$9
|
|
11998
|
+
} = classNames.bem(CLASSNAME$f);
|
|
11656
11999
|
|
|
11657
12000
|
/**
|
|
11658
12001
|
* Component default props.
|
|
@@ -11708,8 +12051,8 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
11708
12051
|
parentRef: paginationRef,
|
|
11709
12052
|
elementSelector: 'button',
|
|
11710
12053
|
keepTabIndex: true,
|
|
11711
|
-
onElementFocus:
|
|
11712
|
-
|
|
12054
|
+
onElementFocus: el => {
|
|
12055
|
+
el.click();
|
|
11713
12056
|
}
|
|
11714
12057
|
});
|
|
11715
12058
|
|
|
@@ -11723,24 +12066,22 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
11723
12066
|
return /*#__PURE__*/jsxs("div", {
|
|
11724
12067
|
ref: ref,
|
|
11725
12068
|
...forwardedProps,
|
|
11726
|
-
className: classNames.join(className,
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
}),
|
|
11730
|
-
[`${CLASSNAME$f}--has-infinite-pagination`]: slidesCount > PAGINATION_ITEMS_MAX
|
|
11731
|
-
}),
|
|
12069
|
+
className: classNames.join(className, block$g({
|
|
12070
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
12071
|
+
'has-infinite-pagination': slidesCount > PAGINATION_ITEMS_MAX
|
|
12072
|
+
})),
|
|
11732
12073
|
children: [/*#__PURE__*/jsx(IconButton, {
|
|
11733
12074
|
...previousButtonProps,
|
|
11734
12075
|
icon: mdiChevronLeft,
|
|
11735
|
-
className:
|
|
12076
|
+
className: element$9('navigation'),
|
|
11736
12077
|
color: theme === Theme$1.dark ? 'light' : 'dark',
|
|
11737
12078
|
emphasis: Emphasis$1.low,
|
|
11738
12079
|
onClick: onPreviousClick
|
|
11739
12080
|
}), /*#__PURE__*/jsx("div", {
|
|
11740
12081
|
ref: paginationRef,
|
|
11741
|
-
className:
|
|
12082
|
+
className: element$9('pagination'),
|
|
11742
12083
|
children: /*#__PURE__*/jsx("div", {
|
|
11743
|
-
className:
|
|
12084
|
+
className: element$9('pagination-items'),
|
|
11744
12085
|
style: wrapperStyle,
|
|
11745
12086
|
role: "tablist",
|
|
11746
12087
|
...paginationProps,
|
|
@@ -11755,11 +12096,10 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
11755
12096
|
} = paginationItemProps ? paginationItemProps(index) : {};
|
|
11756
12097
|
const ariaLabel = label || paginationItemLabel?.(index) || `${index + 1} / ${slidesCount}`;
|
|
11757
12098
|
return /*#__PURE__*/jsx("button", {
|
|
11758
|
-
className: classNames.join(
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
isOutRange
|
|
12099
|
+
className: classNames.join(element$9('pagination-item', {
|
|
12100
|
+
'is-active': isActive,
|
|
12101
|
+
'is-on-edge': isOnEdge,
|
|
12102
|
+
'is-out-range': isOutRange
|
|
11763
12103
|
}), itemClassName),
|
|
11764
12104
|
type: "button",
|
|
11765
12105
|
tabIndex: isActive ? undefined : -1,
|
|
@@ -11774,13 +12114,13 @@ const InternalSlideshowControls = forwardRef((props, ref) => {
|
|
|
11774
12114
|
}), playButtonProps ? /*#__PURE__*/jsx(IconButton, {
|
|
11775
12115
|
...playButtonProps,
|
|
11776
12116
|
icon: isAutoPlaying ? mdiPauseCircleOutline : mdiPlayCircleOutline,
|
|
11777
|
-
className:
|
|
12117
|
+
className: element$9('play'),
|
|
11778
12118
|
color: theme === Theme$1.dark ? 'light' : 'dark',
|
|
11779
12119
|
emphasis: Emphasis$1.low
|
|
11780
12120
|
}) : null, /*#__PURE__*/jsx(IconButton, {
|
|
11781
12121
|
...nextButtonProps,
|
|
11782
12122
|
icon: mdiChevronRight,
|
|
11783
|
-
className:
|
|
12123
|
+
className: element$9('navigation'),
|
|
11784
12124
|
color: theme === Theme$1.dark ? 'light' : 'dark',
|
|
11785
12125
|
emphasis: Emphasis$1.low,
|
|
11786
12126
|
onClick: onNextClick
|
|
@@ -11913,6 +12253,10 @@ const COMPONENT_NAME$f = 'Slideshow';
|
|
|
11913
12253
|
* Component default class name and class prefix.
|
|
11914
12254
|
*/
|
|
11915
12255
|
const CLASSNAME$e = 'lumx-slideshow';
|
|
12256
|
+
const {
|
|
12257
|
+
block: block$f,
|
|
12258
|
+
element: element$8
|
|
12259
|
+
} = classNames.bem(CLASSNAME$e);
|
|
11916
12260
|
|
|
11917
12261
|
/**
|
|
11918
12262
|
* Component default props.
|
|
@@ -11982,23 +12326,23 @@ const Slides = forwardRef((props, ref) => {
|
|
|
11982
12326
|
id: id,
|
|
11983
12327
|
ref: ref,
|
|
11984
12328
|
...forwardedProps,
|
|
11985
|
-
className: classNames.join(className,
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
[`${CLASSNAME$e}--group-by-${groupBy}`]: Boolean(groupBy)
|
|
11991
|
-
}),
|
|
12329
|
+
className: classNames.join(className, block$f({
|
|
12330
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
12331
|
+
'fill-height': fillHeight,
|
|
12332
|
+
[`group-by-${groupBy}`]: Boolean(groupBy)
|
|
12333
|
+
})),
|
|
11992
12334
|
"aria-roledescription": "carousel",
|
|
11993
12335
|
children: [/*#__PURE__*/jsx("div", {
|
|
11994
12336
|
id: slidesId,
|
|
11995
|
-
className:
|
|
12337
|
+
className: element$8('slides'),
|
|
11996
12338
|
onMouseEnter: toggleAutoPlay,
|
|
11997
12339
|
onMouseLeave: toggleAutoPlay,
|
|
11998
12340
|
"aria-live": isAutoPlaying ? 'off' : 'polite',
|
|
11999
12341
|
children: /*#__PURE__*/jsx("div", {
|
|
12000
12342
|
ref: wrapperRef,
|
|
12001
|
-
className:
|
|
12343
|
+
className: element$8('wrapper', {
|
|
12344
|
+
[`${slideMode}`]: isScrollSnapEnabled
|
|
12345
|
+
}),
|
|
12002
12346
|
...wrapperProps,
|
|
12003
12347
|
children: groups.map((group, index) => /*#__PURE__*/jsx(SlideshowItemGroup, {
|
|
12004
12348
|
id: slidesId && buildSlideShowGroupId(slidesId, index),
|
|
@@ -12023,6 +12367,10 @@ const COMPONENT_NAME$e = 'Switch';
|
|
|
12023
12367
|
* Component default class name and class prefix.
|
|
12024
12368
|
*/
|
|
12025
12369
|
const CLASSNAME$d = 'lumx-switch';
|
|
12370
|
+
const {
|
|
12371
|
+
block: block$e,
|
|
12372
|
+
element: element$7
|
|
12373
|
+
} = classNames.bem(CLASSNAME$d);
|
|
12026
12374
|
|
|
12027
12375
|
/**
|
|
12028
12376
|
* Component default props.
|
|
@@ -12070,21 +12418,20 @@ const Switch = forwardRef((props, ref) => {
|
|
|
12070
12418
|
return /*#__PURE__*/jsxs("div", {
|
|
12071
12419
|
ref: ref,
|
|
12072
12420
|
...forwardedProps,
|
|
12073
|
-
className: classNames.join(className,
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
isUnchecked: !isChecked
|
|
12421
|
+
className: classNames.join(className, block$e({
|
|
12422
|
+
'is-checked': isChecked,
|
|
12423
|
+
'is-disabled': isAnyDisabled,
|
|
12424
|
+
[`position-${position}`]: Boolean(position),
|
|
12425
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
12426
|
+
'is-unchecked': !isChecked
|
|
12080
12427
|
})),
|
|
12081
12428
|
children: [/*#__PURE__*/jsxs("div", {
|
|
12082
|
-
className:
|
|
12429
|
+
className: element$7('input-wrapper'),
|
|
12083
12430
|
children: [/*#__PURE__*/jsx("input", {
|
|
12084
12431
|
type: "checkbox",
|
|
12085
12432
|
role: "switch",
|
|
12086
12433
|
id: inputId,
|
|
12087
|
-
className:
|
|
12434
|
+
className: element$7('input-native'),
|
|
12088
12435
|
name: name,
|
|
12089
12436
|
value: value,
|
|
12090
12437
|
...disabledStateProps,
|
|
@@ -12095,24 +12442,24 @@ const Switch = forwardRef((props, ref) => {
|
|
|
12095
12442
|
"aria-describedby": helper ? `${inputId}-helper` : undefined,
|
|
12096
12443
|
...inputProps
|
|
12097
12444
|
}), /*#__PURE__*/jsxs("div", {
|
|
12098
|
-
className:
|
|
12445
|
+
className: element$7('input-placeholder'),
|
|
12099
12446
|
children: [/*#__PURE__*/jsx("div", {
|
|
12100
|
-
className:
|
|
12447
|
+
className: element$7('input-background')
|
|
12101
12448
|
}), /*#__PURE__*/jsx("div", {
|
|
12102
|
-
className:
|
|
12449
|
+
className: element$7('input-indicator')
|
|
12103
12450
|
})]
|
|
12104
12451
|
})]
|
|
12105
12452
|
}), Children.count(children) > 0 && /*#__PURE__*/jsxs("div", {
|
|
12106
|
-
className:
|
|
12453
|
+
className: element$7('content'),
|
|
12107
12454
|
children: [/*#__PURE__*/jsx(InputLabel, {
|
|
12108
12455
|
htmlFor: inputId,
|
|
12109
12456
|
theme: theme,
|
|
12110
|
-
className:
|
|
12457
|
+
className: element$7('label'),
|
|
12111
12458
|
children: children
|
|
12112
12459
|
}), !isEmpty(helper) && /*#__PURE__*/jsx(InputHelper, {
|
|
12113
12460
|
id: `${inputId}-helper`,
|
|
12114
12461
|
theme: theme,
|
|
12115
|
-
className:
|
|
12462
|
+
className: element$7('helper'),
|
|
12116
12463
|
children: helper
|
|
12117
12464
|
})]
|
|
12118
12465
|
})]
|
|
@@ -12132,6 +12479,14 @@ const COMPONENT_NAME$d = 'Table';
|
|
|
12132
12479
|
*/
|
|
12133
12480
|
const CLASSNAME$c = 'lumx-table';
|
|
12134
12481
|
|
|
12482
|
+
const {
|
|
12483
|
+
block: block$d
|
|
12484
|
+
} = classNames.bem(CLASSNAME$c);
|
|
12485
|
+
|
|
12486
|
+
/**
|
|
12487
|
+
* Defines the props of the component.
|
|
12488
|
+
*/
|
|
12489
|
+
|
|
12135
12490
|
/**
|
|
12136
12491
|
* Component default props.
|
|
12137
12492
|
*/
|
|
@@ -12157,11 +12512,10 @@ const Table = forwardRef((props, ref) => {
|
|
|
12157
12512
|
return /*#__PURE__*/jsx("table", {
|
|
12158
12513
|
ref: ref,
|
|
12159
12514
|
...forwardedProps,
|
|
12160
|
-
className: classNames.join(className,
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
theme
|
|
12515
|
+
className: classNames.join(className, block$d({
|
|
12516
|
+
'has-before': hasBefore,
|
|
12517
|
+
'has-dividers': hasDividers,
|
|
12518
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
12165
12519
|
})),
|
|
12166
12520
|
children: children
|
|
12167
12521
|
});
|
|
@@ -12228,6 +12582,9 @@ const COMPONENT_NAME$b = 'TableCell';
|
|
|
12228
12582
|
* Component default class name and class prefix.
|
|
12229
12583
|
*/
|
|
12230
12584
|
const CLASSNAME$a = `${CLASSNAME$c}__cell`;
|
|
12585
|
+
const {
|
|
12586
|
+
block: block$c
|
|
12587
|
+
} = classNames.bem(CLASSNAME$a);
|
|
12231
12588
|
|
|
12232
12589
|
/**
|
|
12233
12590
|
* Component default props.
|
|
@@ -12273,11 +12630,11 @@ const TableCell = forwardRef((props, ref) => {
|
|
|
12273
12630
|
children: [variant === TableCellVariant.head && /*#__PURE__*/jsx("th", {
|
|
12274
12631
|
ref: ref,
|
|
12275
12632
|
...forwardedProps,
|
|
12276
|
-
className: classNames.join(
|
|
12277
|
-
|
|
12278
|
-
isSortable,
|
|
12279
|
-
|
|
12280
|
-
})
|
|
12633
|
+
className: classNames.join(className, block$c({
|
|
12634
|
+
'is-sortable': isSortable,
|
|
12635
|
+
'is-sorted': isSortable && !!sortOrder,
|
|
12636
|
+
head: true
|
|
12637
|
+
})),
|
|
12281
12638
|
"aria-sort": ariaSort,
|
|
12282
12639
|
children: /*#__PURE__*/jsxs(Wrapper, {
|
|
12283
12640
|
className: `${CLASSNAME$a}-wrapper`,
|
|
@@ -12301,7 +12658,9 @@ const TableCell = forwardRef((props, ref) => {
|
|
|
12301
12658
|
})
|
|
12302
12659
|
}), variant === TableCellVariant.body && /*#__PURE__*/jsx("td", {
|
|
12303
12660
|
...forwardedProps,
|
|
12304
|
-
className: classNames.join(className,
|
|
12661
|
+
className: classNames.join(className, block$c({
|
|
12662
|
+
body: true
|
|
12663
|
+
})),
|
|
12305
12664
|
children: /*#__PURE__*/jsx("div", {
|
|
12306
12665
|
className: `${CLASSNAME$a}-content`,
|
|
12307
12666
|
children: children
|
|
@@ -12361,6 +12720,9 @@ const COMPONENT_NAME$9 = 'TableRow';
|
|
|
12361
12720
|
* Component default class name and class prefix.
|
|
12362
12721
|
*/
|
|
12363
12722
|
const CLASSNAME$8 = `${CLASSNAME$c}__row`;
|
|
12723
|
+
const {
|
|
12724
|
+
block: block$b
|
|
12725
|
+
} = classNames.bem(CLASSNAME$8);
|
|
12364
12726
|
|
|
12365
12727
|
/**
|
|
12366
12728
|
* Component default props.
|
|
@@ -12391,11 +12753,10 @@ const TableRow = forwardRef((props, ref) => {
|
|
|
12391
12753
|
ref: ref,
|
|
12392
12754
|
tabIndex: isClickable && !disabledStateProps.disabled ? 0 : -1,
|
|
12393
12755
|
...forwardedProps,
|
|
12394
|
-
className: classNames.join(className,
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
prefix: CLASSNAME$8
|
|
12756
|
+
className: classNames.join(className, block$b({
|
|
12757
|
+
'is-clickable': isClickable && !isAnyDisabled,
|
|
12758
|
+
'is-disabled': isAnyDisabled,
|
|
12759
|
+
'is-selected': isSelected && !isAnyDisabled
|
|
12399
12760
|
})),
|
|
12400
12761
|
"aria-disabled": isAnyDisabled,
|
|
12401
12762
|
children: children
|
|
@@ -12468,6 +12829,10 @@ TabProvider.defaultProps = DEFAULT_PROPS$b;
|
|
|
12468
12829
|
*/
|
|
12469
12830
|
const TABS_CLASSNAME = `lumx-tabs`;
|
|
12470
12831
|
|
|
12832
|
+
const {
|
|
12833
|
+
block: block$a,
|
|
12834
|
+
element: element$6
|
|
12835
|
+
} = classNames.bem(TABS_CLASSNAME);
|
|
12471
12836
|
let TabListLayout = /*#__PURE__*/function (TabListLayout) {
|
|
12472
12837
|
TabListLayout["clustered"] = "clustered";
|
|
12473
12838
|
TabListLayout["fixed"] = "fixed";
|
|
@@ -12521,14 +12886,13 @@ const TabList = forwardRef((props, ref) => {
|
|
|
12521
12886
|
return /*#__PURE__*/jsx("div", {
|
|
12522
12887
|
ref: mergeRefs(ref, tabListRef),
|
|
12523
12888
|
...forwardedProps,
|
|
12524
|
-
className: classNames.join(className,
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
theme
|
|
12889
|
+
className: classNames.join(className, block$a({
|
|
12890
|
+
[`layout-${layout}`]: Boolean(layout),
|
|
12891
|
+
[`position-${position}`]: Boolean(position),
|
|
12892
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
12529
12893
|
})),
|
|
12530
12894
|
children: /*#__PURE__*/jsx("div", {
|
|
12531
|
-
className:
|
|
12895
|
+
className: element$6('links'),
|
|
12532
12896
|
role: "tablist",
|
|
12533
12897
|
"aria-label": ariaLabel,
|
|
12534
12898
|
children: children
|
|
@@ -12548,6 +12912,9 @@ const COMPONENT_NAME$7 = 'Tab';
|
|
|
12548
12912
|
* Component default class name and class prefix.
|
|
12549
12913
|
*/
|
|
12550
12914
|
const CLASSNAME$7 = `${TABS_CLASSNAME}__link`;
|
|
12915
|
+
const {
|
|
12916
|
+
block: block$9
|
|
12917
|
+
} = classNames.bem(CLASSNAME$7);
|
|
12551
12918
|
|
|
12552
12919
|
/**
|
|
12553
12920
|
* Component default props.
|
|
@@ -12606,10 +12973,9 @@ const Tab = forwardRef((props, ref) => {
|
|
|
12606
12973
|
...forwardedProps,
|
|
12607
12974
|
type: "button",
|
|
12608
12975
|
id: state?.tabId,
|
|
12609
|
-
className: classNames.join(className,
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
isDisabled: isAnyDisabled
|
|
12976
|
+
className: classNames.join(className, block$9({
|
|
12977
|
+
'is-active': isActive,
|
|
12978
|
+
'is-disabled': isAnyDisabled
|
|
12613
12979
|
})),
|
|
12614
12980
|
onClick: changeToCurrentTab,
|
|
12615
12981
|
onKeyPress: handleKeyPress,
|
|
@@ -12643,6 +13009,9 @@ const COMPONENT_NAME$6 = 'TabPanel';
|
|
|
12643
13009
|
* Component default class name and class prefix.
|
|
12644
13010
|
*/
|
|
12645
13011
|
const CLASSNAME$6 = `lumx-tab-panel`;
|
|
13012
|
+
const {
|
|
13013
|
+
block: block$8
|
|
13014
|
+
} = classNames.bem(CLASSNAME$6);
|
|
12646
13015
|
|
|
12647
13016
|
/**
|
|
12648
13017
|
* Component default props.
|
|
@@ -12672,9 +13041,8 @@ const TabPanel = forwardRef((props, ref) => {
|
|
|
12672
13041
|
ref: ref,
|
|
12673
13042
|
...forwardedProps,
|
|
12674
13043
|
id: state?.tabPanelId,
|
|
12675
|
-
className: classNames.join(className,
|
|
12676
|
-
|
|
12677
|
-
isActive
|
|
13044
|
+
className: classNames.join(className, block$8({
|
|
13045
|
+
'is-active': isActive
|
|
12678
13046
|
})),
|
|
12679
13047
|
role: "tabpanel",
|
|
12680
13048
|
tabIndex: isActive ? 0 : -1,
|
|
@@ -12701,6 +13069,14 @@ const CLASSNAME$5 = 'lumx-text-field';
|
|
|
12701
13069
|
*/
|
|
12702
13070
|
const INPUT_NATIVE_CLASSNAME = `${CLASSNAME$5}__input-native`;
|
|
12703
13071
|
|
|
13072
|
+
const {
|
|
13073
|
+
block: block$7
|
|
13074
|
+
} = classNames.bem(INPUT_NATIVE_CLASSNAME);
|
|
13075
|
+
|
|
13076
|
+
/**
|
|
13077
|
+
* Defines the props of the component.
|
|
13078
|
+
*/
|
|
13079
|
+
|
|
12704
13080
|
/**
|
|
12705
13081
|
* Component default props.
|
|
12706
13082
|
*/
|
|
@@ -12732,10 +13108,10 @@ const RawInputText = forwardRef((props, ref) => {
|
|
|
12732
13108
|
name: name,
|
|
12733
13109
|
type: type,
|
|
12734
13110
|
ref: useMergeRefs(ref, textareaRef),
|
|
12735
|
-
className: classNames.join(className,
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
})
|
|
13111
|
+
className: classNames.join(className, block$7({
|
|
13112
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
13113
|
+
text: true
|
|
13114
|
+
})),
|
|
12739
13115
|
onChange: handleChange,
|
|
12740
13116
|
value: value
|
|
12741
13117
|
});
|
|
@@ -12782,6 +13158,14 @@ function useFitRowsToContent(minimumRows, textareaRef, value) {
|
|
|
12782
13158
|
return rows;
|
|
12783
13159
|
}
|
|
12784
13160
|
|
|
13161
|
+
const {
|
|
13162
|
+
block: block$6
|
|
13163
|
+
} = classNames.bem(INPUT_NATIVE_CLASSNAME);
|
|
13164
|
+
|
|
13165
|
+
/**
|
|
13166
|
+
* Defines the props of the component.
|
|
13167
|
+
*/
|
|
13168
|
+
|
|
12785
13169
|
/**
|
|
12786
13170
|
* Component default props.
|
|
12787
13171
|
*/
|
|
@@ -12812,10 +13196,10 @@ const RawInputTextarea = forwardRef((props, ref) => {
|
|
|
12812
13196
|
return /*#__PURE__*/jsx("textarea", {
|
|
12813
13197
|
...forwardedProps,
|
|
12814
13198
|
name: name,
|
|
12815
|
-
className: classNames.join(className,
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
})
|
|
13199
|
+
className: classNames.join(className, block$6({
|
|
13200
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
13201
|
+
textarea: true
|
|
13202
|
+
})),
|
|
12819
13203
|
ref: useMergeRefs(ref, textareaRef),
|
|
12820
13204
|
onChange: handleChange,
|
|
12821
13205
|
value: value,
|
|
@@ -12823,6 +13207,15 @@ const RawInputTextarea = forwardRef((props, ref) => {
|
|
|
12823
13207
|
});
|
|
12824
13208
|
});
|
|
12825
13209
|
|
|
13210
|
+
const {
|
|
13211
|
+
block: block$5,
|
|
13212
|
+
element: element$5
|
|
13213
|
+
} = classNames.bem(CLASSNAME$5);
|
|
13214
|
+
|
|
13215
|
+
/**
|
|
13216
|
+
* Defines the props of the component.
|
|
13217
|
+
*/
|
|
13218
|
+
|
|
12826
13219
|
/**
|
|
12827
13220
|
* Component default props.
|
|
12828
13221
|
*/
|
|
@@ -12949,33 +13342,32 @@ const TextField = forwardRef((props, ref) => {
|
|
|
12949
13342
|
});
|
|
12950
13343
|
return /*#__PURE__*/jsxs("div", {
|
|
12951
13344
|
ref: ref,
|
|
12952
|
-
className: classNames.join(className,
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
isValid,
|
|
12965
|
-
|
|
12966
|
-
theme
|
|
13345
|
+
className: classNames.join(className, block$5({
|
|
13346
|
+
'has-chips': Boolean(chips),
|
|
13347
|
+
'has-error': !isValid && hasError,
|
|
13348
|
+
'has-icon': Boolean(icon),
|
|
13349
|
+
'has-input': !multiline,
|
|
13350
|
+
'has-input-clear': Boolean(clearButtonProps && isNotEmpty),
|
|
13351
|
+
'has-label': Boolean(label),
|
|
13352
|
+
'has-placeholder': Boolean(placeholder),
|
|
13353
|
+
'has-textarea': multiline,
|
|
13354
|
+
'has-value': Boolean(value),
|
|
13355
|
+
'is-disabled': isAnyDisabled,
|
|
13356
|
+
'is-focus': isFocus || forceFocusStyle,
|
|
13357
|
+
'is-valid': isValid,
|
|
13358
|
+
[`theme-${theme}`]: Boolean(theme)
|
|
12967
13359
|
})),
|
|
12968
13360
|
children: [(label || maxLength) && /*#__PURE__*/jsxs("div", {
|
|
12969
|
-
className:
|
|
13361
|
+
className: element$5('header'),
|
|
12970
13362
|
children: [label && /*#__PURE__*/jsx(InputLabel, {
|
|
12971
13363
|
...labelProps,
|
|
12972
13364
|
htmlFor: textFieldId,
|
|
12973
|
-
className:
|
|
13365
|
+
className: element$5('label'),
|
|
12974
13366
|
isRequired: isRequired,
|
|
12975
13367
|
theme: theme,
|
|
12976
13368
|
children: label
|
|
12977
13369
|
}), maxLength && /*#__PURE__*/jsxs("div", {
|
|
12978
|
-
className:
|
|
13370
|
+
className: element$5('char-counter'),
|
|
12979
13371
|
children: [/*#__PURE__*/jsx("span", {
|
|
12980
13372
|
children: maxLength - valueLength
|
|
12981
13373
|
}), maxLength - valueLength === 0 && /*#__PURE__*/jsx(Icon, {
|
|
@@ -12984,27 +13376,27 @@ const TextField = forwardRef((props, ref) => {
|
|
|
12984
13376
|
})]
|
|
12985
13377
|
})]
|
|
12986
13378
|
}), /*#__PURE__*/jsxs("div", {
|
|
12987
|
-
className:
|
|
13379
|
+
className: element$5('wrapper'),
|
|
12988
13380
|
ref: textFieldRef,
|
|
12989
13381
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
12990
|
-
className:
|
|
13382
|
+
className: element$5('input-icon'),
|
|
12991
13383
|
color: theme === Theme$1.dark ? 'light' : undefined,
|
|
12992
13384
|
icon: icon,
|
|
12993
13385
|
size: Size$1.xs
|
|
12994
13386
|
}), chips ? /*#__PURE__*/jsxs("div", {
|
|
12995
|
-
className:
|
|
13387
|
+
className: element$5('chips'),
|
|
12996
13388
|
children: [chips, input]
|
|
12997
13389
|
}) : /*#__PURE__*/jsx("div", {
|
|
12998
|
-
className:
|
|
13390
|
+
className: element$5('input-wrapper'),
|
|
12999
13391
|
children: input
|
|
13000
13392
|
}), (isValid || hasError) && /*#__PURE__*/jsx(Icon, {
|
|
13001
|
-
className:
|
|
13393
|
+
className: element$5('input-validity'),
|
|
13002
13394
|
color: theme === Theme$1.dark ? 'light' : undefined,
|
|
13003
13395
|
icon: isValid ? mdiCheckCircle : mdiAlertCircle,
|
|
13004
13396
|
size: Size$1.xxs
|
|
13005
13397
|
}), clearButtonProps && isNotEmpty && !isAnyDisabled && /*#__PURE__*/jsx(IconButton, {
|
|
13006
13398
|
...clearButtonProps,
|
|
13007
|
-
className:
|
|
13399
|
+
className: element$5('input-clear'),
|
|
13008
13400
|
icon: mdiCloseCircle,
|
|
13009
13401
|
emphasis: Emphasis$1.low,
|
|
13010
13402
|
size: Size$1.s,
|
|
@@ -13012,17 +13404,17 @@ const TextField = forwardRef((props, ref) => {
|
|
|
13012
13404
|
onClick: handleClear,
|
|
13013
13405
|
type: "button"
|
|
13014
13406
|
}), afterElement && /*#__PURE__*/jsx("div", {
|
|
13015
|
-
className:
|
|
13407
|
+
className: element$5('after-element'),
|
|
13016
13408
|
children: afterElement
|
|
13017
13409
|
})]
|
|
13018
13410
|
}), hasError && error && /*#__PURE__*/jsx(InputHelper, {
|
|
13019
|
-
className:
|
|
13411
|
+
className: element$5('helper'),
|
|
13020
13412
|
kind: Kind$1.error,
|
|
13021
13413
|
theme: theme,
|
|
13022
13414
|
id: errorId,
|
|
13023
13415
|
children: error
|
|
13024
13416
|
}), helper && /*#__PURE__*/jsx(InputHelper, {
|
|
13025
|
-
className:
|
|
13417
|
+
className: element$5('helper'),
|
|
13026
13418
|
theme: theme,
|
|
13027
13419
|
id: helperId,
|
|
13028
13420
|
children: helper
|
|
@@ -13179,6 +13571,10 @@ const COMPONENT_NAME$4 = 'Thumbnail';
|
|
|
13179
13571
|
* Component default class name and class prefix.
|
|
13180
13572
|
*/
|
|
13181
13573
|
const CLASSNAME$4 = 'lumx-thumbnail';
|
|
13574
|
+
const {
|
|
13575
|
+
block: block$4,
|
|
13576
|
+
element: element$4
|
|
13577
|
+
} = classNames.bem(CLASSNAME$4);
|
|
13182
13578
|
|
|
13183
13579
|
/**
|
|
13184
13580
|
* Component default props.
|
|
@@ -13275,23 +13671,23 @@ const Thumbnail = forwardRef((props, ref) => {
|
|
|
13275
13671
|
return /*#__PURE__*/jsxs(Wrapper, {
|
|
13276
13672
|
...wrapperProps,
|
|
13277
13673
|
ref: ref,
|
|
13278
|
-
className: classNames.join(linkProps?.className, className,
|
|
13279
|
-
align,
|
|
13280
|
-
aspectRatio,
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
})
|
|
13674
|
+
className: classNames.join(linkProps?.className, className, block$4({
|
|
13675
|
+
[`align-${align}`]: Boolean(align),
|
|
13676
|
+
[`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),
|
|
13677
|
+
[`size-${size}`]: Boolean(size),
|
|
13678
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
13679
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
13680
|
+
'is-clickable': isClickable,
|
|
13681
|
+
'has-error': hasError,
|
|
13682
|
+
'has-icon-error-fallback': hasIconErrorFallback,
|
|
13683
|
+
'has-custom-error-fallback': hasCustomErrorFallback,
|
|
13684
|
+
'is-loading': isLoading,
|
|
13685
|
+
[`object-fit-${objectFit}`]: Boolean(objectFit),
|
|
13686
|
+
'has-badge': !!badge,
|
|
13687
|
+
'fill-height': fillHeight
|
|
13688
|
+
})),
|
|
13293
13689
|
children: [/*#__PURE__*/jsxs("span", {
|
|
13294
|
-
className:
|
|
13690
|
+
className: element$4('background'),
|
|
13295
13691
|
children: [/*#__PURE__*/jsx("img", {
|
|
13296
13692
|
// Use placeholder image size
|
|
13297
13693
|
width: loadingPlaceholderImage?.naturalWidth,
|
|
@@ -13306,17 +13702,16 @@ const Thumbnail = forwardRef((props, ref) => {
|
|
|
13306
13702
|
...loadingStyle
|
|
13307
13703
|
},
|
|
13308
13704
|
ref: useMergeRefs(setImgElement, propImgRef),
|
|
13309
|
-
className: classNames.join(
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
hasDefinedSize: Boolean(imgProps?.height && imgProps.width)
|
|
13705
|
+
className: classNames.join(element$4('image', {
|
|
13706
|
+
'is-loading': isLoading,
|
|
13707
|
+
'has-defined-size': Boolean(imgProps?.height && imgProps.width)
|
|
13313
13708
|
}), imgProps?.className),
|
|
13314
13709
|
crossOrigin: crossOrigin,
|
|
13315
13710
|
src: image,
|
|
13316
13711
|
alt: alt,
|
|
13317
13712
|
loading: loading
|
|
13318
13713
|
}), !isLoading && hasError && /*#__PURE__*/jsx("span", {
|
|
13319
|
-
className:
|
|
13714
|
+
className: element$4('fallback'),
|
|
13320
13715
|
children: hasIconErrorFallback ? /*#__PURE__*/jsx(Icon, {
|
|
13321
13716
|
icon: fallback,
|
|
13322
13717
|
size: Size$1.xxs,
|
|
@@ -13324,7 +13719,7 @@ const Thumbnail = forwardRef((props, ref) => {
|
|
|
13324
13719
|
}) : fallback
|
|
13325
13720
|
})]
|
|
13326
13721
|
}), badge && /*#__PURE__*/React__default.cloneElement(badge, {
|
|
13327
|
-
className: classNames.join(
|
|
13722
|
+
className: classNames.join(element$4('badge'), badge.props.className)
|
|
13328
13723
|
})]
|
|
13329
13724
|
});
|
|
13330
13725
|
});
|
|
@@ -13378,6 +13773,10 @@ const COMPONENT_NAME$3 = 'Toolbar';
|
|
|
13378
13773
|
* Component default class name and class prefix.
|
|
13379
13774
|
*/
|
|
13380
13775
|
const CLASSNAME$3 = 'lumx-toolbar';
|
|
13776
|
+
const {
|
|
13777
|
+
block: block$3,
|
|
13778
|
+
element: element$3
|
|
13779
|
+
} = classNames.bem(CLASSNAME$3);
|
|
13381
13780
|
|
|
13382
13781
|
/**
|
|
13383
13782
|
* Component default props.
|
|
@@ -13402,20 +13801,19 @@ const Toolbar = forwardRef((props, ref) => {
|
|
|
13402
13801
|
return /*#__PURE__*/jsxs("div", {
|
|
13403
13802
|
ref: ref,
|
|
13404
13803
|
...forwardedProps,
|
|
13405
|
-
className: classNames.join(className,
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
prefix: CLASSNAME$3
|
|
13804
|
+
className: classNames.join(className, block$3({
|
|
13805
|
+
'has-after': Boolean(after),
|
|
13806
|
+
'has-before': Boolean(before),
|
|
13807
|
+
'has-label': Boolean(label)
|
|
13410
13808
|
})),
|
|
13411
13809
|
children: [before && /*#__PURE__*/jsx("div", {
|
|
13412
|
-
className:
|
|
13810
|
+
className: element$3('before'),
|
|
13413
13811
|
children: before
|
|
13414
13812
|
}), label && /*#__PURE__*/jsx("div", {
|
|
13415
|
-
className:
|
|
13813
|
+
className: element$3('label'),
|
|
13416
13814
|
children: label
|
|
13417
13815
|
}), after && /*#__PURE__*/jsx("div", {
|
|
13418
|
-
className:
|
|
13816
|
+
className: element$3('after'),
|
|
13419
13817
|
children: after
|
|
13420
13818
|
})]
|
|
13421
13819
|
});
|
|
@@ -13620,6 +14018,10 @@ const COMPONENT_NAME$2 = 'Tooltip';
|
|
|
13620
14018
|
* Component default class name and class prefix.
|
|
13621
14019
|
*/
|
|
13622
14020
|
const CLASSNAME$2 = 'lumx-tooltip';
|
|
14021
|
+
const {
|
|
14022
|
+
block: block$2,
|
|
14023
|
+
element: element$2
|
|
14024
|
+
} = classNames.bem(CLASSNAME$2);
|
|
13623
14025
|
|
|
13624
14026
|
/**
|
|
13625
14027
|
* Component default props.
|
|
@@ -13710,10 +14112,9 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
13710
14112
|
...forwardedProps,
|
|
13711
14113
|
id: id,
|
|
13712
14114
|
role: "tooltip",
|
|
13713
|
-
className: classNames.join(className,
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
isInitializing: !styles.popper?.transform
|
|
14115
|
+
className: classNames.join(className, block$2({
|
|
14116
|
+
[`position-${position}`]: Boolean(position),
|
|
14117
|
+
'is-initializing': !styles.popper?.transform
|
|
13717
14118
|
}), isHidden && classNames.visuallyHidden()),
|
|
13718
14119
|
style: {
|
|
13719
14120
|
...(isHidden ? undefined : styles.popper),
|
|
@@ -13721,9 +14122,9 @@ const Tooltip = forwardRef((props, ref) => {
|
|
|
13721
14122
|
},
|
|
13722
14123
|
...attributes.popper,
|
|
13723
14124
|
children: [/*#__PURE__*/jsx("div", {
|
|
13724
|
-
className:
|
|
14125
|
+
className: element$2('arrow')
|
|
13725
14126
|
}), /*#__PURE__*/jsx("div", {
|
|
13726
|
-
className:
|
|
14127
|
+
className: element$2('inner'),
|
|
13727
14128
|
children: labelLines.map(line => /*#__PURE__*/jsx("p", {
|
|
13728
14129
|
children: line
|
|
13729
14130
|
}, line))
|
|
@@ -13763,6 +14164,10 @@ const COMPONENT_NAME$1 = 'Uploader';
|
|
|
13763
14164
|
* Component default class name and class prefix.
|
|
13764
14165
|
*/
|
|
13765
14166
|
const CLASSNAME$1 = 'lumx-uploader';
|
|
14167
|
+
const {
|
|
14168
|
+
block: block$1,
|
|
14169
|
+
element: element$1
|
|
14170
|
+
} = classNames.bem(CLASSNAME$1);
|
|
13766
14171
|
|
|
13767
14172
|
/**
|
|
13768
14173
|
* Component default props.
|
|
@@ -13836,31 +14241,30 @@ const Uploader = forwardRef((props, ref) => {
|
|
|
13836
14241
|
...wrapper.props,
|
|
13837
14242
|
...forwardedProps,
|
|
13838
14243
|
onClick: handleClick,
|
|
13839
|
-
className: classNames.join(className,
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13846
|
-
isDisabled: isAnyDisabled
|
|
14244
|
+
className: classNames.join(className, block$1({
|
|
14245
|
+
[`aspect-ratio-${adjustedAspectRatio}`]: Boolean(adjustedAspectRatio),
|
|
14246
|
+
[`size-${size}`]: Boolean(size),
|
|
14247
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
14248
|
+
[`variant-${variant}`]: Boolean(variant),
|
|
14249
|
+
'is-drag-hovering': isDragHovering,
|
|
14250
|
+
'is-disabled': isAnyDisabled
|
|
13847
14251
|
})),
|
|
13848
14252
|
children: [/*#__PURE__*/jsx("span", {
|
|
13849
|
-
className:
|
|
14253
|
+
className: element$1('background')
|
|
13850
14254
|
}), /*#__PURE__*/jsxs("span", {
|
|
13851
|
-
className:
|
|
14255
|
+
className: element$1('wrapper'),
|
|
13852
14256
|
children: [icon && /*#__PURE__*/jsx(Icon, {
|
|
13853
|
-
className:
|
|
14257
|
+
className: element$1('icon'),
|
|
13854
14258
|
icon: icon,
|
|
13855
14259
|
size: Size$1.s
|
|
13856
14260
|
}), label && /*#__PURE__*/jsx("span", {
|
|
13857
|
-
className:
|
|
14261
|
+
className: element$1('label'),
|
|
13858
14262
|
children: label
|
|
13859
14263
|
})]
|
|
13860
14264
|
}), fileInputProps && /*#__PURE__*/jsx("input", {
|
|
13861
14265
|
type: "file",
|
|
13862
14266
|
id: inputId,
|
|
13863
|
-
className:
|
|
14267
|
+
className: classNames.join(element$1('input'), classNames.visuallyHidden()),
|
|
13864
14268
|
...disabledStateProps,
|
|
13865
14269
|
...fileInputProps,
|
|
13866
14270
|
readOnly: isAnyDisabled,
|
|
@@ -13884,12 +14288,16 @@ const COMPONENT_NAME = 'UserBlock';
|
|
|
13884
14288
|
* Component default class name and class prefix.
|
|
13885
14289
|
*/
|
|
13886
14290
|
const CLASSNAME = 'lumx-user-block';
|
|
14291
|
+
const {
|
|
14292
|
+
block,
|
|
14293
|
+
element
|
|
14294
|
+
} = classNames.bem(CLASSNAME);
|
|
13887
14295
|
|
|
13888
14296
|
/**
|
|
13889
14297
|
* Component default props.
|
|
13890
14298
|
*/
|
|
13891
14299
|
const DEFAULT_PROPS = {
|
|
13892
|
-
orientation: Orientation.horizontal,
|
|
14300
|
+
orientation: Orientation$1.horizontal,
|
|
13893
14301
|
size: Size$1.m
|
|
13894
14302
|
};
|
|
13895
14303
|
|
|
@@ -13926,10 +14334,10 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
13926
14334
|
let componentSize = size;
|
|
13927
14335
|
|
|
13928
14336
|
// Special case - When using vertical orientation force the size to be Sizes.l.
|
|
13929
|
-
if (orientation === Orientation.vertical) {
|
|
14337
|
+
if (orientation === Orientation$1.vertical) {
|
|
13930
14338
|
componentSize = Size$1.l;
|
|
13931
14339
|
}
|
|
13932
|
-
const shouldDisplayActions = orientation === Orientation.vertical;
|
|
14340
|
+
const shouldDisplayActions = orientation === Orientation$1.vertical;
|
|
13933
14341
|
const isLink = Boolean(linkProps?.href || linkAs);
|
|
13934
14342
|
const isClickable = !!onClick || isLink;
|
|
13935
14343
|
const nameBlock = React__default.useMemo(() => {
|
|
@@ -13939,7 +14347,7 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
13939
14347
|
let NameComponent = 'span';
|
|
13940
14348
|
const nProps = {
|
|
13941
14349
|
...nameProps,
|
|
13942
|
-
className: classNames.join(
|
|
14350
|
+
className: classNames.join(element('name'), linkProps?.className, nameProps?.className)
|
|
13943
14351
|
};
|
|
13944
14352
|
if (isClickable) {
|
|
13945
14353
|
NameComponent = Link;
|
|
@@ -13964,22 +14372,21 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
13964
14372
|
}, [avatarProps, isClickable, linkAs, linkProps, name, nameProps, onClick]);
|
|
13965
14373
|
const shouldDisplayFields = componentSize !== Size$1.s && componentSize !== Size$1.xs;
|
|
13966
14374
|
const fieldsBlock = fields && shouldDisplayFields && /*#__PURE__*/jsx("div", {
|
|
13967
|
-
className:
|
|
14375
|
+
className: element('fields'),
|
|
13968
14376
|
children: fields.map((field, idx) => /*#__PURE__*/jsx(Text, {
|
|
13969
14377
|
as: "span",
|
|
13970
|
-
className:
|
|
14378
|
+
className: element('field'),
|
|
13971
14379
|
children: field
|
|
13972
14380
|
}, idx))
|
|
13973
14381
|
});
|
|
13974
14382
|
return /*#__PURE__*/jsxs("div", {
|
|
13975
14383
|
ref: ref,
|
|
13976
14384
|
...forwardedProps,
|
|
13977
|
-
className: classNames.join(className,
|
|
13978
|
-
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
isClickable
|
|
14385
|
+
className: classNames.join(className, block({
|
|
14386
|
+
[`orientation-${orientation}`]: Boolean(orientation),
|
|
14387
|
+
[`size-${componentSize}`]: Boolean(componentSize),
|
|
14388
|
+
[`theme-${theme}`]: Boolean(theme),
|
|
14389
|
+
'is-clickable': isClickable
|
|
13983
14390
|
})),
|
|
13984
14391
|
onMouseLeave: onMouseLeave,
|
|
13985
14392
|
onMouseEnter: onMouseEnter,
|
|
@@ -13988,21 +14395,21 @@ const UserBlock = forwardRef((props, ref) => {
|
|
|
13988
14395
|
linkProps: linkProps,
|
|
13989
14396
|
alt: "",
|
|
13990
14397
|
...avatarProps,
|
|
13991
|
-
className: classNames.join(
|
|
14398
|
+
className: classNames.join(element('avatar'), avatarProps.className),
|
|
13992
14399
|
size: componentSize,
|
|
13993
14400
|
onClick: onClick,
|
|
13994
14401
|
theme: theme
|
|
13995
14402
|
}), (fields || name || children || additionalFields) && /*#__PURE__*/jsxs("div", {
|
|
13996
|
-
className:
|
|
14403
|
+
className: element('wrapper'),
|
|
13997
14404
|
children: [children || nameBlock, fieldsBlock, shouldDisplayFields ? additionalFields : null]
|
|
13998
14405
|
}), shouldDisplayActions && simpleAction && /*#__PURE__*/jsx("div", {
|
|
13999
|
-
className:
|
|
14406
|
+
className: element('action'),
|
|
14000
14407
|
children: simpleAction
|
|
14001
14408
|
}), shouldDisplayActions && multipleActions && /*#__PURE__*/jsx("div", {
|
|
14002
|
-
className:
|
|
14409
|
+
className: element('actions'),
|
|
14003
14410
|
children: multipleActions
|
|
14004
14411
|
}), after ? /*#__PURE__*/jsx("div", {
|
|
14005
|
-
className:
|
|
14412
|
+
className: element('after'),
|
|
14006
14413
|
children: after
|
|
14007
14414
|
}) : null]
|
|
14008
14415
|
});
|