@wix/editor-react-components 1.2332.0 → 1.2334.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/site/components/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/site/components/Dropdown/component.js +89 -42
- package/dist/site/components/Dropdown/component.preview.d.ts +7 -2
- package/dist/site/components/Dropdown/components/DropdownList.d.ts +2 -1
- package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +3 -2
- package/dist/site/components/Dropdown/constants.d.ts +93 -1
- package/dist/site/components/Dropdown/css.css +15 -8
- package/dist/site/components/Dropdown/manifest.js +264 -22
- package/dist/site/components/Repeater/component.js +1 -1
- package/dist/site/components/Repeater/types.d.ts +1 -1
- package/dist/site/components/chunks/constants32.js +74 -8
- package/package.json +2 -2
|
@@ -79,6 +79,8 @@ export type DropdownProps = Omit<SdkFunctionChangeableProps, 'onChange'> & SdkFu
|
|
|
79
79
|
isDisabled?: boolean;
|
|
80
80
|
/** Controls whether the option list is open. No effect in `inline` mode. */
|
|
81
81
|
open?: boolean;
|
|
82
|
+
/** Preview-only: forces the option list open while the List part is being designed. */
|
|
83
|
+
previewList?: boolean;
|
|
82
84
|
/** Writing direction applied to the root. */
|
|
83
85
|
direction?: Direction;
|
|
84
86
|
/** Accessibility attributes. `ariaLabel` labels the dropdown for assistive tech. */
|
|
@@ -10,7 +10,7 @@ import { f as formatClassNames } from "../chunks/classNames.js";
|
|
|
10
10
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
11
11
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
12
12
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
13
|
-
import { A as ALL_VALUE,
|
|
13
|
+
import { A as ALL_VALUE, s as selectors, a as semanticClassNames, T as TestIds, d as defaultValues, b as TriggerModeValues, c as ARIA_LABEL_NAMESPACE, e as AriaLabels } from "../chunks/constants32.js";
|
|
14
14
|
import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
|
|
15
15
|
import { D as DismissSmall_default } from "../chunks/DismissSmall.js";
|
|
16
16
|
import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
|
|
@@ -219,11 +219,11 @@ const readOptionValue = (item) => {
|
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
};
|
|
222
|
-
const toOptionItems = (options) => options.filter((option2) => ((option2 == null ? void 0 : option2.label) ?? "").trim() !== "").map((option2, index) =>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
})
|
|
222
|
+
const toOptionItems = (options) => options.filter((option2) => ((option2 == null ? void 0 : option2.label) ?? "").trim() !== "").map((option2, index) => {
|
|
223
|
+
const label2 = (option2 == null ? void 0 : option2.label) ?? "";
|
|
224
|
+
const value2 = (option2 == null ? void 0 : option2.value) ?? "";
|
|
225
|
+
return { key: `option-${index}`, value: value2 || label2, label: label2 };
|
|
226
|
+
});
|
|
227
227
|
const readSelectedValues = (rawValue, isMultiple) => {
|
|
228
228
|
let list2;
|
|
229
229
|
if (!isMultiple) {
|
|
@@ -397,35 +397,47 @@ const DropdownChips = ({
|
|
|
397
397
|
const chipsRef = useRef(null);
|
|
398
398
|
const visible = useChipOverflow(chipsRef, items.length);
|
|
399
399
|
const hidden = items.length - visible;
|
|
400
|
-
return /* @__PURE__ */ jsxs(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
400
|
+
return /* @__PURE__ */ jsxs(
|
|
401
|
+
Combobox.Chips,
|
|
402
|
+
{
|
|
403
|
+
ref: chipsRef,
|
|
404
|
+
className: clsx(
|
|
405
|
+
styles.chips,
|
|
406
|
+
formatClassNames(semanticClassNames.chips)
|
|
407
|
+
),
|
|
408
|
+
children: [
|
|
409
|
+
items.slice(0, visible).map((item, index) => /* @__PURE__ */ jsxs(
|
|
410
|
+
Combobox.Chip,
|
|
411
|
+
{
|
|
412
|
+
"data-chip": "",
|
|
413
|
+
className: clsx(
|
|
414
|
+
styles.chip,
|
|
415
|
+
selectors.chip,
|
|
416
|
+
formatClassNames(semanticClassNames.chip),
|
|
417
|
+
index === visible - 1 && styles.chipShrink
|
|
418
|
+
),
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx("span", { className: styles.chipLabel, children: item.label }),
|
|
421
|
+
/* @__PURE__ */ jsx(
|
|
422
|
+
Combobox.ChipRemove,
|
|
423
|
+
{
|
|
424
|
+
className: styles.chipRemove,
|
|
425
|
+
"aria-label": removeItemLabel,
|
|
426
|
+
children: /* @__PURE__ */ jsx(DismissSmall_default, { "aria-hidden": "true" })
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
item.key
|
|
432
|
+
)),
|
|
433
|
+
hidden > 0 && /* @__PURE__ */ jsxs("span", { className: styles.chipsOverflow, children: [
|
|
434
|
+
"+",
|
|
435
|
+
hidden
|
|
436
|
+
] }),
|
|
437
|
+
inputControl
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
);
|
|
429
441
|
};
|
|
430
442
|
const DropdownTrigger = ({
|
|
431
443
|
isMultiple,
|
|
@@ -435,6 +447,7 @@ const DropdownTrigger = ({
|
|
|
435
447
|
selectedItems,
|
|
436
448
|
placeholder,
|
|
437
449
|
ariaLabel,
|
|
450
|
+
labelId,
|
|
438
451
|
clearLabel,
|
|
439
452
|
removeItemLabel,
|
|
440
453
|
descriptionId,
|
|
@@ -443,12 +456,22 @@ const DropdownTrigger = ({
|
|
|
443
456
|
}) => {
|
|
444
457
|
const triggerClassName = clsx(
|
|
445
458
|
styles.trigger,
|
|
459
|
+
selectors.trigger,
|
|
446
460
|
formatClassNames(semanticClassNames.trigger)
|
|
447
461
|
);
|
|
462
|
+
const inputGroupClassName = clsx(
|
|
463
|
+
styles.trigger,
|
|
464
|
+
selectors.input,
|
|
465
|
+
formatClassNames(semanticClassNames.input)
|
|
466
|
+
);
|
|
448
467
|
const clearControl = clearable ? /* @__PURE__ */ jsx(
|
|
449
468
|
Combobox.Clear,
|
|
450
469
|
{
|
|
451
|
-
className:
|
|
470
|
+
className: clsx(
|
|
471
|
+
styles.clear,
|
|
472
|
+
selectors.clear,
|
|
473
|
+
formatClassNames(semanticClassNames.clear)
|
|
474
|
+
),
|
|
452
475
|
"aria-label": clearLabel,
|
|
453
476
|
"data-testid": TestIds.clear,
|
|
454
477
|
children: /* @__PURE__ */ jsx(DismissSmall_default, { "aria-hidden": "true" })
|
|
@@ -462,13 +485,14 @@ const DropdownTrigger = ({
|
|
|
462
485
|
readOnly: !isSearchable,
|
|
463
486
|
placeholder: isMultiple && selectedItems.length > 0 ? "" : placeholder,
|
|
464
487
|
"aria-label": ariaLabel,
|
|
488
|
+
"aria-labelledby": labelId,
|
|
465
489
|
"aria-describedby": descriptionId,
|
|
466
490
|
onFocus,
|
|
467
491
|
onBlur
|
|
468
492
|
}
|
|
469
493
|
);
|
|
470
494
|
if (isMultiple) {
|
|
471
|
-
return /* @__PURE__ */ jsxs(Combobox.InputGroup, { className:
|
|
495
|
+
return /* @__PURE__ */ jsxs(Combobox.InputGroup, { className: inputGroupClassName, children: [
|
|
472
496
|
/* @__PURE__ */ jsx(
|
|
473
497
|
DropdownChips,
|
|
474
498
|
{
|
|
@@ -481,7 +505,7 @@ const DropdownTrigger = ({
|
|
|
481
505
|
] });
|
|
482
506
|
}
|
|
483
507
|
if (isSearchable) {
|
|
484
|
-
return /* @__PURE__ */ jsxs(Combobox.InputGroup, { className:
|
|
508
|
+
return /* @__PURE__ */ jsxs(Combobox.InputGroup, { className: inputGroupClassName, children: [
|
|
485
509
|
inputControl,
|
|
486
510
|
clearControl
|
|
487
511
|
] });
|
|
@@ -508,6 +532,7 @@ const DropdownList = ({
|
|
|
508
532
|
inputValue,
|
|
509
533
|
limit,
|
|
510
534
|
isGrid,
|
|
535
|
+
isSearchable,
|
|
511
536
|
columns,
|
|
512
537
|
inline,
|
|
513
538
|
isMultiple,
|
|
@@ -517,13 +542,16 @@ const DropdownList = ({
|
|
|
517
542
|
}) => {
|
|
518
543
|
const optionClassName = clsx(
|
|
519
544
|
styles.option,
|
|
545
|
+
selectors.option,
|
|
520
546
|
formatClassNames(semanticClassNames.option)
|
|
521
547
|
);
|
|
522
548
|
const renderItem = (item) => /* @__PURE__ */ jsxs(Combobox.Item, { value: item, className: optionClassName, children: [
|
|
523
549
|
item.label,
|
|
524
550
|
isMultiple && /* @__PURE__ */ jsx(Combobox.ItemIndicator, { className: styles.itemIndicator, children: /* @__PURE__ */ jsx(ConfirmSmall_default, { "aria-hidden": "true" }) })
|
|
525
551
|
] }, item.key);
|
|
526
|
-
const gridItems = optionItems.filter(
|
|
552
|
+
const gridItems = optionItems.filter(
|
|
553
|
+
(item) => filterItem(item, isSearchable ? inputValue : "")
|
|
554
|
+
);
|
|
527
555
|
const gridVisible = limit > 0 ? gridItems.slice(0, limit) : gridItems;
|
|
528
556
|
const gridStyle = { "--columns": columns };
|
|
529
557
|
const listChildren = isGrid ? chunk(gridVisible, columns).map((row, rowIndex) => /* @__PURE__ */ jsx(Combobox.Row, { className: styles.gridRow, children: row.map(renderItem) }, `row-${rowIndex}`)) : renderItem;
|
|
@@ -540,6 +568,7 @@ const DropdownList = ({
|
|
|
540
568
|
{
|
|
541
569
|
className: clsx(
|
|
542
570
|
styles.inlineList,
|
|
571
|
+
selectors.list,
|
|
543
572
|
formatClassNames(semanticClassNames.listbox)
|
|
544
573
|
),
|
|
545
574
|
"data-testid": TestIds.listbox,
|
|
@@ -555,6 +584,7 @@ const DropdownList = ({
|
|
|
555
584
|
{
|
|
556
585
|
className: clsx(
|
|
557
586
|
styles.popup,
|
|
587
|
+
selectors.list,
|
|
558
588
|
formatClassNames(semanticClassNames.listbox)
|
|
559
589
|
),
|
|
560
590
|
"data-testid": TestIds.listbox,
|
|
@@ -591,6 +621,7 @@ function Dropdown(props) {
|
|
|
591
621
|
name = defaultValues.name,
|
|
592
622
|
triggerMode = defaultValues.triggerMode,
|
|
593
623
|
applyButtonLabel = defaultValues.applyButtonLabel,
|
|
624
|
+
previewList,
|
|
594
625
|
direction,
|
|
595
626
|
a11y,
|
|
596
627
|
onChange = noop,
|
|
@@ -651,7 +682,7 @@ function Dropdown(props) {
|
|
|
651
682
|
inline
|
|
652
683
|
});
|
|
653
684
|
const t = translate(ARIA_LABEL_NAMESPACE);
|
|
654
|
-
const ariaLabel = t(AriaLabels.root.key) || (a11y == null ? void 0 : a11y.ariaLabel) || AriaLabels.root.default;
|
|
685
|
+
const ariaLabel = label2 ? void 0 : t(AriaLabels.root.key) || (a11y == null ? void 0 : a11y.ariaLabel) || AriaLabels.root.default;
|
|
655
686
|
const clearLabel = t(AriaLabels.clear.key) || AriaLabels.clear.default;
|
|
656
687
|
const removeItemLabel = t(AriaLabels.removeItem.key) || AriaLabels.removeItem.default;
|
|
657
688
|
const rootClassName = clsx(
|
|
@@ -662,9 +693,11 @@ function Dropdown(props) {
|
|
|
662
693
|
!direction && directionStyles.fallbackDirection
|
|
663
694
|
);
|
|
664
695
|
const descriptionId = description2 ? `${id}-description` : void 0;
|
|
696
|
+
const comboboxId = `${id}-combobox`;
|
|
697
|
+
const labelId = label2 ? `${comboboxId}-label` : void 0;
|
|
665
698
|
const fieldName = name || void 0;
|
|
666
699
|
const hasInput = isMultiple || isSearchable;
|
|
667
|
-
const popupOpen = isMultiple || !isSearchable ? isOpen : isOpen && hasQuery;
|
|
700
|
+
const popupOpen = previewList === true || (isMultiple || !isSearchable ? isOpen : isOpen && hasQuery);
|
|
668
701
|
const triggerRegion = /* @__PURE__ */ jsx(
|
|
669
702
|
DropdownTrigger,
|
|
670
703
|
{
|
|
@@ -675,6 +708,7 @@ function Dropdown(props) {
|
|
|
675
708
|
selectedItems,
|
|
676
709
|
placeholder,
|
|
677
710
|
ariaLabel,
|
|
711
|
+
labelId,
|
|
678
712
|
clearLabel,
|
|
679
713
|
removeItemLabel,
|
|
680
714
|
descriptionId,
|
|
@@ -690,6 +724,7 @@ function Dropdown(props) {
|
|
|
690
724
|
inputValue,
|
|
691
725
|
limit,
|
|
692
726
|
isGrid,
|
|
727
|
+
isSearchable,
|
|
693
728
|
columns,
|
|
694
729
|
inline,
|
|
695
730
|
isMultiple,
|
|
@@ -701,6 +736,7 @@ function Dropdown(props) {
|
|
|
701
736
|
const field = /* @__PURE__ */ jsxs(
|
|
702
737
|
Combobox.Root,
|
|
703
738
|
{
|
|
739
|
+
id: comboboxId,
|
|
704
740
|
multiple: isMultiple,
|
|
705
741
|
value: isMultiple ? selectedItems : selectedItems[0] ?? null,
|
|
706
742
|
onValueChange: (next) => {
|
|
@@ -730,7 +766,18 @@ function Dropdown(props) {
|
|
|
730
766
|
...inline ? {} : { open: popupOpen, onOpenChange: setIsOpen },
|
|
731
767
|
...isSearchable ? { inputValue, onInputValueChange: handleInputValueChange } : {},
|
|
732
768
|
children: [
|
|
733
|
-
label2 && /* @__PURE__ */ jsx(
|
|
769
|
+
label2 && /* @__PURE__ */ jsx(
|
|
770
|
+
Combobox.Label,
|
|
771
|
+
{
|
|
772
|
+
className: clsx(
|
|
773
|
+
styles.label,
|
|
774
|
+
selectors.label,
|
|
775
|
+
formatClassNames(semanticClassNames.label)
|
|
776
|
+
),
|
|
777
|
+
"data-testid": TestIds.label,
|
|
778
|
+
children: label2
|
|
779
|
+
}
|
|
780
|
+
),
|
|
734
781
|
triggerRegion,
|
|
735
782
|
list2
|
|
736
783
|
]
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ResolveManifestOverrides } from '../../../utils/ResolveManifestOverrides';
|
|
2
|
-
import {
|
|
3
|
-
|
|
3
|
+
import { DropdownProps } from './Dropdown.types';
|
|
4
|
+
type DropdownPreviewProps = DropdownProps & {
|
|
5
|
+
previewChips?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default function DropdownPreview(props: DropdownPreviewProps): React.JSX.Element;
|
|
4
8
|
export declare const resolveManifestOverrides: ResolveManifestOverrides;
|
|
9
|
+
export {};
|
|
@@ -6,6 +6,7 @@ type DropdownListProps = {
|
|
|
6
6
|
inputValue: string;
|
|
7
7
|
limit: number;
|
|
8
8
|
isGrid: boolean;
|
|
9
|
+
isSearchable: boolean;
|
|
9
10
|
columns: number;
|
|
10
11
|
inline: boolean;
|
|
11
12
|
isMultiple: boolean;
|
|
@@ -13,5 +14,5 @@ type DropdownListProps = {
|
|
|
13
14
|
hasQuery: boolean;
|
|
14
15
|
popoverContainer: HTMLDivElement | null;
|
|
15
16
|
};
|
|
16
|
-
export declare const DropdownList: ({ optionItems, filterItem, inputValue, limit, isGrid, columns, inline, isMultiple, hasInput, hasQuery, popoverContainer, }: DropdownListProps) => React.ReactElement;
|
|
17
|
+
export declare const DropdownList: ({ optionItems, filterItem, inputValue, limit, isGrid, isSearchable, columns, inline, isMultiple, hasInput, hasQuery, popoverContainer, }: DropdownListProps) => React.ReactElement;
|
|
17
18
|
export {};
|
|
@@ -7,12 +7,13 @@ type DropdownTriggerProps = {
|
|
|
7
7
|
selectedLabel: string;
|
|
8
8
|
selectedItems: Array<DropdownItem>;
|
|
9
9
|
placeholder: string;
|
|
10
|
-
ariaLabel: string;
|
|
10
|
+
ariaLabel: string | undefined;
|
|
11
|
+
labelId: string | undefined;
|
|
11
12
|
clearLabel: string;
|
|
12
13
|
removeItemLabel: string;
|
|
13
14
|
descriptionId: string | undefined;
|
|
14
15
|
onFocus: (event: React.FocusEvent) => void;
|
|
15
16
|
onBlur: (event: React.FocusEvent) => void;
|
|
16
17
|
};
|
|
17
|
-
export declare const DropdownTrigger: ({ isMultiple, isSearchable, clearable, selectedLabel, selectedItems, placeholder, ariaLabel, clearLabel, removeItemLabel, descriptionId, onFocus, onBlur, }: DropdownTriggerProps) => React.ReactElement;
|
|
18
|
+
export declare const DropdownTrigger: ({ isMultiple, isSearchable, clearable, selectedLabel, selectedItems, placeholder, ariaLabel, labelId, clearLabel, removeItemLabel, descriptionId, onFocus, onBlur, }: DropdownTriggerProps) => React.ReactElement;
|
|
18
19
|
export {};
|
|
@@ -9,6 +9,73 @@ export declare const DesignStates: {
|
|
|
9
9
|
readonly className: "dropdown--disabled";
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
+
readonly input: {
|
|
13
|
+
readonly hover: {
|
|
14
|
+
readonly displayName: "Hover";
|
|
15
|
+
readonly className: "dropdown__input--hover";
|
|
16
|
+
};
|
|
17
|
+
readonly focus: {
|
|
18
|
+
readonly displayName: "Focus";
|
|
19
|
+
readonly className: "dropdown__input--focus";
|
|
20
|
+
};
|
|
21
|
+
readonly disabled: {
|
|
22
|
+
readonly displayName: "Disabled";
|
|
23
|
+
readonly className: "dropdown__input--disabled";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
readonly trigger: {
|
|
27
|
+
readonly hover: {
|
|
28
|
+
readonly displayName: "Hover";
|
|
29
|
+
readonly className: "dropdown__trigger--hover";
|
|
30
|
+
};
|
|
31
|
+
readonly selected: {
|
|
32
|
+
readonly displayName: "Selected";
|
|
33
|
+
readonly className: "dropdown__trigger--selected";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly clearButton: {
|
|
37
|
+
readonly hover: {
|
|
38
|
+
readonly displayName: "Hover";
|
|
39
|
+
readonly className: "dropdown__clear--hover";
|
|
40
|
+
};
|
|
41
|
+
readonly selected: {
|
|
42
|
+
readonly displayName: "Selected";
|
|
43
|
+
readonly className: "dropdown__clear--selected";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly option: {
|
|
47
|
+
readonly hover: {
|
|
48
|
+
readonly displayName: "Hover";
|
|
49
|
+
readonly className: "dropdown__option--hover";
|
|
50
|
+
};
|
|
51
|
+
readonly selected: {
|
|
52
|
+
readonly displayName: "Selected";
|
|
53
|
+
readonly className: "dropdown__option--selected";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly chip: {
|
|
57
|
+
readonly hover: {
|
|
58
|
+
readonly displayName: "Hover";
|
|
59
|
+
readonly className: "dropdown__chip--hover";
|
|
60
|
+
};
|
|
61
|
+
readonly selected: {
|
|
62
|
+
readonly displayName: "Selected";
|
|
63
|
+
readonly className: "dropdown__chip--selected";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const ElementKeys: {
|
|
68
|
+
readonly label: "label";
|
|
69
|
+
readonly input: "input";
|
|
70
|
+
readonly trigger: "trigger";
|
|
71
|
+
readonly clearButton: "clearButton";
|
|
72
|
+
readonly list: "list";
|
|
73
|
+
readonly option: "option";
|
|
74
|
+
readonly chip: "chip";
|
|
75
|
+
};
|
|
76
|
+
export declare const FunctionalStateKeys: {
|
|
77
|
+
readonly previewList: "previewList";
|
|
78
|
+
readonly previewChips: "previewChips";
|
|
12
79
|
};
|
|
13
80
|
export declare const DisplayNames: {
|
|
14
81
|
root: {
|
|
@@ -56,6 +123,7 @@ export declare const DisplayNames: {
|
|
|
56
123
|
paddingInlineStart: string;
|
|
57
124
|
paddingInlineEnd: string;
|
|
58
125
|
gap: string;
|
|
126
|
+
boxShadow: string;
|
|
59
127
|
textAlign: string;
|
|
60
128
|
font: string;
|
|
61
129
|
textColor: string;
|
|
@@ -65,6 +133,18 @@ export declare const DisplayNames: {
|
|
|
65
133
|
helperColor: string;
|
|
66
134
|
optionTextColor: string;
|
|
67
135
|
optionHoverBackgroundColor: string;
|
|
136
|
+
placeholderColor: string;
|
|
137
|
+
chipBackgroundColor: string;
|
|
138
|
+
chipTextColor: string;
|
|
139
|
+
};
|
|
140
|
+
elements: {
|
|
141
|
+
label: string;
|
|
142
|
+
input: string;
|
|
143
|
+
trigger: string;
|
|
144
|
+
clearButton: string;
|
|
145
|
+
list: string;
|
|
146
|
+
option: string;
|
|
147
|
+
chip: string;
|
|
68
148
|
};
|
|
69
149
|
displayGroups: {
|
|
70
150
|
optionsGroup: string;
|
|
@@ -87,7 +167,7 @@ export declare const defaultValues: {
|
|
|
87
167
|
readonly openOnInputClick: true;
|
|
88
168
|
readonly inline: false;
|
|
89
169
|
readonly grid: false;
|
|
90
|
-
readonly columns:
|
|
170
|
+
readonly columns: 2;
|
|
91
171
|
readonly limit: -1;
|
|
92
172
|
readonly label: "";
|
|
93
173
|
readonly required: false;
|
|
@@ -115,12 +195,24 @@ export declare const TestIds: {
|
|
|
115
195
|
};
|
|
116
196
|
export declare const selectors: {
|
|
117
197
|
readonly root: "dropdown";
|
|
198
|
+
readonly label: "dropdown-label";
|
|
199
|
+
readonly input: "dropdown-input";
|
|
200
|
+
readonly trigger: "dropdown-trigger";
|
|
201
|
+
readonly clear: "dropdown-clear";
|
|
202
|
+
readonly list: "dropdown-list";
|
|
203
|
+
readonly option: "dropdown-option";
|
|
204
|
+
readonly chip: "dropdown-chip";
|
|
118
205
|
};
|
|
119
206
|
export declare const semanticClassNames: {
|
|
120
207
|
readonly root: "dropdown";
|
|
208
|
+
readonly label: "dropdown__label";
|
|
209
|
+
readonly input: "dropdown__input";
|
|
121
210
|
readonly trigger: "dropdown__trigger";
|
|
211
|
+
readonly clear: "dropdown__clear";
|
|
122
212
|
readonly listbox: "dropdown__listbox";
|
|
123
213
|
readonly option: "dropdown__option";
|
|
214
|
+
readonly chips: "dropdown__chips";
|
|
215
|
+
readonly chip: "dropdown__chip";
|
|
124
216
|
readonly applyButton: "dropdown__apply-button";
|
|
125
217
|
};
|
|
126
218
|
export declare const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
.root__WnTks {
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: inline-flex;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
gap: 8px;
|
|
6
7
|
min-width: var(--minWidth, 240px);
|
|
7
8
|
max-width: var(--maxWidth, 100%);
|
|
8
9
|
}
|
|
@@ -31,8 +32,9 @@
|
|
|
31
32
|
padding-inline-end: var(--paddingInlineEnd);
|
|
32
33
|
color: var(--textColor, var(--wst-paragraph-2-color, #000));
|
|
33
34
|
font: var(--font, var(--wst-paragraph-2-font));
|
|
35
|
+
box-shadow: var(--boxShadow, none);
|
|
34
36
|
}
|
|
35
|
-
.root__WnTks .trigger__J7jn7:focus-within {
|
|
37
|
+
.root__WnTks .trigger__J7jn7:focus-within, .root__WnTks .trigger__J7jn7.dropdown__input--focus {
|
|
36
38
|
border-color: var(--borderColor, var(--wst-system-line-1-color, #000));
|
|
37
39
|
}
|
|
38
40
|
.root__WnTks .option__QJeiF {
|
|
@@ -45,10 +47,10 @@
|
|
|
45
47
|
color: var(--optionTextColor, var(--wst-paragraph-2-color, #000));
|
|
46
48
|
font: var(--font, var(--wst-paragraph-2-font));
|
|
47
49
|
}
|
|
48
|
-
.root__WnTks .option__QJeiF[data-highlighted] {
|
|
50
|
+
.root__WnTks .option__QJeiF[data-highlighted], .root__WnTks .option__QJeiF.dropdown__option--hover {
|
|
49
51
|
background-color: var(--optionHoverBackgroundColor, color-mix(in srgb, var(--wst-paragraph-2-color, #000) 6%, transparent));
|
|
50
52
|
}
|
|
51
|
-
.root__WnTks .option__QJeiF[data-selected] {
|
|
53
|
+
.root__WnTks .option__QJeiF[data-selected], .root__WnTks .option__QJeiF.dropdown__option--selected {
|
|
52
54
|
background-color: color-mix(in srgb, var(--wst-paragraph-2-color, #000) 12%, transparent);
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -61,12 +63,13 @@
|
|
|
61
63
|
min-width: 0;
|
|
62
64
|
display: flex;
|
|
63
65
|
flex-direction: column;
|
|
64
|
-
gap: 4px;
|
|
66
|
+
gap: var(--gap, 4px);
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
.label__Q7fZH {
|
|
68
70
|
font: var(--labelFont, var(--wst-paragraph-2-font));
|
|
69
71
|
color: var(--labelColor, var(--wst-paragraph-2-color, #000));
|
|
72
|
+
overflow-wrap: break-word;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
.description__77blZ {
|
|
@@ -118,7 +121,8 @@
|
|
|
118
121
|
border-start-end-radius: var(--borderStartEndRadius);
|
|
119
122
|
border-end-start-radius: var(--borderEndStartRadius);
|
|
120
123
|
border-end-end-radius: var(--borderEndEndRadius);
|
|
121
|
-
background-color: color-mix(in srgb, var(--wst-paragraph-2-color, #000) 8%, transparent);
|
|
124
|
+
background-color: var(--chipBackgroundColor, color-mix(in srgb, var(--wst-paragraph-2-color, #000) 8%, transparent));
|
|
125
|
+
color: var(--chipTextColor, inherit);
|
|
122
126
|
font: var(--font, var(--wst-paragraph-2-font));
|
|
123
127
|
line-height: 1.4;
|
|
124
128
|
}
|
|
@@ -194,7 +198,7 @@
|
|
|
194
198
|
|
|
195
199
|
.gridRow__9DEae {
|
|
196
200
|
display: grid;
|
|
197
|
-
grid-template-columns: repeat(var(--columns,
|
|
201
|
+
grid-template-columns: repeat(var(--columns, 2), minmax(0, 1fr));
|
|
198
202
|
gap: 4px;
|
|
199
203
|
}
|
|
200
204
|
|
|
@@ -220,6 +224,9 @@
|
|
|
220
224
|
color: inherit;
|
|
221
225
|
font: inherit;
|
|
222
226
|
}
|
|
227
|
+
.value__pqgtJ::placeholder {
|
|
228
|
+
color: var(--placeholderColor, color-mix(in srgb, var(--wst-paragraph-2-color, #000) 65%, transparent));
|
|
229
|
+
}
|
|
223
230
|
|
|
224
231
|
.arrow__Q2E2Y {
|
|
225
232
|
flex: none;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateType, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { D as DesignStates, f as DisplayNames, d as defaultValues,
|
|
1
|
+
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateType, E as ELEMENTS, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
+
import { D as DesignStates, f as DisplayNames, d as defaultValues, F as FunctionalStateKeys, s as selectors } from "../chunks/constants32.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
5
|
import { m as manifestFocusable, b as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
@@ -23,8 +23,8 @@ const manifest = {
|
|
|
23
23
|
displayName: DisplayNames.root.elementDisplayName,
|
|
24
24
|
archetype: Archetype.Dropdown,
|
|
25
25
|
layout: {
|
|
26
|
-
resizeDirection: LAYOUT.RESIZE_DIRECTION.
|
|
27
|
-
contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.
|
|
26
|
+
resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontalAndVertical,
|
|
27
|
+
contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.vertical,
|
|
28
28
|
disableStretching: true,
|
|
29
29
|
disablePositioning: false
|
|
30
30
|
},
|
|
@@ -54,7 +54,262 @@ const manifest = {
|
|
|
54
54
|
className: DesignStates.root.disabled.className,
|
|
55
55
|
pseudoClass: NativeStateType.disabled,
|
|
56
56
|
props: { isDisabled: true }
|
|
57
|
-
})
|
|
57
|
+
}),
|
|
58
|
+
// Display-less functional states: force hidden parts visible while their
|
|
59
|
+
// element is designed (referenced by the elements' visibleState).
|
|
60
|
+
[FunctionalStateKeys.previewList]: {
|
|
61
|
+
props: { previewList: true }
|
|
62
|
+
},
|
|
63
|
+
[FunctionalStateKeys.previewChips]: {
|
|
64
|
+
props: { previewChips: true }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
displayFilters: {
|
|
68
|
+
states: {
|
|
69
|
+
hide: [
|
|
70
|
+
FunctionalStateKeys.previewList,
|
|
71
|
+
FunctionalStateKeys.previewChips
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
elements: {
|
|
76
|
+
label: {
|
|
77
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
78
|
+
inlineElement: {
|
|
79
|
+
displayName: DisplayNames.root.elements.label,
|
|
80
|
+
selector: getSelector(selectors.label),
|
|
81
|
+
behaviors: {
|
|
82
|
+
selectable: false,
|
|
83
|
+
removable: false
|
|
84
|
+
},
|
|
85
|
+
cssCustomProperties: {
|
|
86
|
+
labelFont: {
|
|
87
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
88
|
+
displayName: DisplayNames.root.cssCustomProperties.labelFont,
|
|
89
|
+
defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
|
|
90
|
+
},
|
|
91
|
+
labelColor: {
|
|
92
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
93
|
+
displayName: DisplayNames.root.cssCustomProperties.labelColor
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
input: {
|
|
99
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
100
|
+
inlineElement: {
|
|
101
|
+
displayName: DisplayNames.root.elements.input,
|
|
102
|
+
selector: getSelector(selectors.input),
|
|
103
|
+
behaviors: {
|
|
104
|
+
selectable: false,
|
|
105
|
+
removable: false
|
|
106
|
+
},
|
|
107
|
+
// Same var names as the root's — element-scoped overrides.
|
|
108
|
+
cssCustomProperties: {
|
|
109
|
+
backgroundColor: {
|
|
110
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
|
|
111
|
+
displayName: DisplayNames.root.cssCustomProperties.backgroundColor
|
|
112
|
+
},
|
|
113
|
+
borderColor: {
|
|
114
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
|
|
115
|
+
displayName: DisplayNames.root.cssCustomProperties.borderColor
|
|
116
|
+
},
|
|
117
|
+
textColor: {
|
|
118
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
119
|
+
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
120
|
+
},
|
|
121
|
+
placeholderColor: {
|
|
122
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
123
|
+
displayName: DisplayNames.root.cssCustomProperties.placeholderColor
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
states: {
|
|
127
|
+
hover: withSpec({
|
|
128
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
129
|
+
displayName: DesignStates.input.hover.displayName,
|
|
130
|
+
className: DesignStates.input.hover.className,
|
|
131
|
+
pseudoClass: NativeStateType.hover
|
|
132
|
+
}),
|
|
133
|
+
focus: withSpec({
|
|
134
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
135
|
+
displayName: DesignStates.input.focus.displayName,
|
|
136
|
+
className: DesignStates.input.focus.className,
|
|
137
|
+
pseudoClass: NativeStateType.focus
|
|
138
|
+
}),
|
|
139
|
+
disabled: withSpec({
|
|
140
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
141
|
+
displayName: DesignStates.input.disabled.displayName,
|
|
142
|
+
className: DesignStates.input.disabled.className,
|
|
143
|
+
pseudoClass: NativeStateType.disabled,
|
|
144
|
+
props: { isDisabled: true }
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
trigger: {
|
|
150
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
151
|
+
inlineElement: {
|
|
152
|
+
displayName: DisplayNames.root.elements.trigger,
|
|
153
|
+
selector: getSelector(selectors.trigger),
|
|
154
|
+
behaviors: {
|
|
155
|
+
selectable: false,
|
|
156
|
+
removable: false
|
|
157
|
+
},
|
|
158
|
+
cssCustomProperties: {
|
|
159
|
+
backgroundColor: {
|
|
160
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
|
|
161
|
+
displayName: DisplayNames.root.cssCustomProperties.backgroundColor
|
|
162
|
+
},
|
|
163
|
+
borderColor: {
|
|
164
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
|
|
165
|
+
displayName: DisplayNames.root.cssCustomProperties.borderColor
|
|
166
|
+
},
|
|
167
|
+
textColor: {
|
|
168
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
169
|
+
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
states: {
|
|
173
|
+
hover: withSpec({
|
|
174
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
175
|
+
displayName: DesignStates.trigger.hover.displayName,
|
|
176
|
+
className: DesignStates.trigger.hover.className,
|
|
177
|
+
pseudoClass: NativeStateType.hover
|
|
178
|
+
}),
|
|
179
|
+
selected: withSpec({
|
|
180
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
181
|
+
displayName: DesignStates.trigger.selected.displayName,
|
|
182
|
+
className: DesignStates.trigger.selected.className
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
clearButton: {
|
|
188
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
189
|
+
inlineElement: {
|
|
190
|
+
displayName: DisplayNames.root.elements.clearButton,
|
|
191
|
+
selector: getSelector(selectors.clear),
|
|
192
|
+
behaviors: {
|
|
193
|
+
selectable: false,
|
|
194
|
+
removable: false
|
|
195
|
+
},
|
|
196
|
+
states: {
|
|
197
|
+
hover: withSpec({
|
|
198
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
199
|
+
displayName: DesignStates.clearButton.hover.displayName,
|
|
200
|
+
className: DesignStates.clearButton.hover.className,
|
|
201
|
+
pseudoClass: NativeStateType.hover
|
|
202
|
+
}),
|
|
203
|
+
selected: withSpec({
|
|
204
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
205
|
+
displayName: DesignStates.clearButton.selected.displayName,
|
|
206
|
+
className: DesignStates.clearButton.selected.className
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
list: {
|
|
212
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
213
|
+
inlineElement: {
|
|
214
|
+
displayName: DisplayNames.root.elements.list,
|
|
215
|
+
selector: getSelector(selectors.list),
|
|
216
|
+
behaviors: {
|
|
217
|
+
selectable: false,
|
|
218
|
+
removable: false
|
|
219
|
+
},
|
|
220
|
+
cssProperties: {
|
|
221
|
+
background: {},
|
|
222
|
+
borderTop: {},
|
|
223
|
+
borderBottom: {},
|
|
224
|
+
borderInlineStart: {},
|
|
225
|
+
borderInlineEnd: {},
|
|
226
|
+
borderStartStartRadius: {},
|
|
227
|
+
borderStartEndRadius: {},
|
|
228
|
+
borderEndStartRadius: {},
|
|
229
|
+
borderEndEndRadius: {}
|
|
230
|
+
},
|
|
231
|
+
visibleState: {
|
|
232
|
+
stateKey: FunctionalStateKeys.previewList,
|
|
233
|
+
elementPath: ".root"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
option: {
|
|
238
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
239
|
+
inlineElement: {
|
|
240
|
+
displayName: DisplayNames.root.elements.option,
|
|
241
|
+
selector: getSelector(selectors.option),
|
|
242
|
+
behaviors: {
|
|
243
|
+
selectable: false,
|
|
244
|
+
removable: false
|
|
245
|
+
},
|
|
246
|
+
cssCustomProperties: {
|
|
247
|
+
optionTextColor: {
|
|
248
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
249
|
+
displayName: DisplayNames.root.cssCustomProperties.optionTextColor
|
|
250
|
+
},
|
|
251
|
+
optionHoverBackgroundColor: {
|
|
252
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
253
|
+
displayName: DisplayNames.root.cssCustomProperties.optionHoverBackgroundColor
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
states: {
|
|
257
|
+
hover: withSpec({
|
|
258
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
259
|
+
displayName: DesignStates.option.hover.displayName,
|
|
260
|
+
className: DesignStates.option.hover.className,
|
|
261
|
+
pseudoClass: NativeStateType.hover
|
|
262
|
+
}),
|
|
263
|
+
selected: withSpec({
|
|
264
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
265
|
+
displayName: DesignStates.option.selected.displayName,
|
|
266
|
+
className: DesignStates.option.selected.className
|
|
267
|
+
})
|
|
268
|
+
},
|
|
269
|
+
visibleState: {
|
|
270
|
+
stateKey: FunctionalStateKeys.previewList,
|
|
271
|
+
elementPath: ".root"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
chip: {
|
|
276
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
277
|
+
inlineElement: {
|
|
278
|
+
displayName: DisplayNames.root.elements.chip,
|
|
279
|
+
selector: getSelector(selectors.chip),
|
|
280
|
+
behaviors: {
|
|
281
|
+
selectable: false,
|
|
282
|
+
removable: false
|
|
283
|
+
},
|
|
284
|
+
cssCustomProperties: {
|
|
285
|
+
chipBackgroundColor: {
|
|
286
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
287
|
+
displayName: DisplayNames.root.cssCustomProperties.chipBackgroundColor
|
|
288
|
+
},
|
|
289
|
+
chipTextColor: {
|
|
290
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
291
|
+
displayName: DisplayNames.root.cssCustomProperties.chipTextColor
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
states: {
|
|
295
|
+
hover: withSpec({
|
|
296
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
297
|
+
displayName: DesignStates.chip.hover.displayName,
|
|
298
|
+
className: DesignStates.chip.hover.className,
|
|
299
|
+
pseudoClass: NativeStateType.hover
|
|
300
|
+
}),
|
|
301
|
+
selected: withSpec({
|
|
302
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
303
|
+
displayName: DesignStates.chip.selected.displayName,
|
|
304
|
+
className: DesignStates.chip.selected.className
|
|
305
|
+
})
|
|
306
|
+
},
|
|
307
|
+
visibleState: {
|
|
308
|
+
stateKey: FunctionalStateKeys.previewChips,
|
|
309
|
+
elementPath: ".root"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
58
313
|
},
|
|
59
314
|
data: {
|
|
60
315
|
options: {
|
|
@@ -347,6 +602,10 @@ const manifest = {
|
|
|
347
602
|
displayName: DisplayNames.root.cssCustomProperties.paddingInlineEnd,
|
|
348
603
|
defaultValue: "12px"
|
|
349
604
|
},
|
|
605
|
+
boxShadow: {
|
|
606
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.boxShadow,
|
|
607
|
+
displayName: DisplayNames.root.cssCustomProperties.boxShadow
|
|
608
|
+
},
|
|
350
609
|
gap: {
|
|
351
610
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.gap,
|
|
352
611
|
displayName: DisplayNames.root.cssCustomProperties.gap,
|
|
@@ -366,15 +625,6 @@ const manifest = {
|
|
|
366
625
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
367
626
|
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
368
627
|
},
|
|
369
|
-
labelFont: {
|
|
370
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
371
|
-
displayName: DisplayNames.root.cssCustomProperties.labelFont,
|
|
372
|
-
defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
|
|
373
|
-
},
|
|
374
|
-
labelColor: {
|
|
375
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
376
|
-
displayName: DisplayNames.root.cssCustomProperties.labelColor
|
|
377
|
-
},
|
|
378
628
|
helperFont: {
|
|
379
629
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
380
630
|
displayName: DisplayNames.root.cssCustomProperties.helperFont,
|
|
@@ -383,14 +633,6 @@ const manifest = {
|
|
|
383
633
|
helperColor: {
|
|
384
634
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
385
635
|
displayName: DisplayNames.root.cssCustomProperties.helperColor
|
|
386
|
-
},
|
|
387
|
-
optionTextColor: {
|
|
388
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
389
|
-
displayName: DisplayNames.root.cssCustomProperties.optionTextColor
|
|
390
|
-
},
|
|
391
|
-
optionHoverBackgroundColor: {
|
|
392
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
393
|
-
displayName: DisplayNames.root.cssCustomProperties.optionHoverBackgroundColor
|
|
394
636
|
}
|
|
395
637
|
}
|
|
396
638
|
},
|
|
@@ -8,7 +8,7 @@ export interface RepeaterProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
direction?: Direction;
|
|
10
10
|
a11y?: A11y;
|
|
11
|
-
renderItem?: (itemId: string, itemIndex: number) => React.JSX.Element;
|
|
11
|
+
renderItem?: (itemId: string, itemIndex: number, itemLength: number) => React.JSX.Element;
|
|
12
12
|
items?: Array<string>;
|
|
13
13
|
onLoadMore?: () => Promise<void>;
|
|
14
14
|
emptyState?: EmptyState;
|
|
@@ -2,8 +2,48 @@ const DesignStates = {
|
|
|
2
2
|
root: {
|
|
3
3
|
hover: { displayName: "Hover", className: "dropdown--hover" },
|
|
4
4
|
disabled: { displayName: "Disabled", className: "dropdown--disabled" }
|
|
5
|
+
},
|
|
6
|
+
input: {
|
|
7
|
+
hover: { displayName: "Hover", className: "dropdown__input--hover" },
|
|
8
|
+
focus: { displayName: "Focus", className: "dropdown__input--focus" },
|
|
9
|
+
disabled: {
|
|
10
|
+
displayName: "Disabled",
|
|
11
|
+
className: "dropdown__input--disabled"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
trigger: {
|
|
15
|
+
hover: { displayName: "Hover", className: "dropdown__trigger--hover" },
|
|
16
|
+
selected: {
|
|
17
|
+
displayName: "Selected",
|
|
18
|
+
className: "dropdown__trigger--selected"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
clearButton: {
|
|
22
|
+
hover: { displayName: "Hover", className: "dropdown__clear--hover" },
|
|
23
|
+
selected: {
|
|
24
|
+
displayName: "Selected",
|
|
25
|
+
className: "dropdown__clear--selected"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
option: {
|
|
29
|
+
hover: { displayName: "Hover", className: "dropdown__option--hover" },
|
|
30
|
+
selected: {
|
|
31
|
+
displayName: "Selected",
|
|
32
|
+
className: "dropdown__option--selected"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
chip: {
|
|
36
|
+
hover: { displayName: "Hover", className: "dropdown__chip--hover" },
|
|
37
|
+
selected: {
|
|
38
|
+
displayName: "Selected",
|
|
39
|
+
className: "dropdown__chip--selected"
|
|
40
|
+
}
|
|
5
41
|
}
|
|
6
42
|
};
|
|
43
|
+
const FunctionalStateKeys = {
|
|
44
|
+
previewList: "previewList",
|
|
45
|
+
previewChips: "previewChips"
|
|
46
|
+
};
|
|
7
47
|
const DisplayNames = {
|
|
8
48
|
root: {
|
|
9
49
|
elementDisplayName: "Dropdown",
|
|
@@ -50,6 +90,7 @@ const DisplayNames = {
|
|
|
50
90
|
paddingInlineStart: "Padding start",
|
|
51
91
|
paddingInlineEnd: "Padding end",
|
|
52
92
|
gap: "Spacing",
|
|
93
|
+
boxShadow: "Shadow",
|
|
53
94
|
textAlign: "Value alignment",
|
|
54
95
|
font: "Value font",
|
|
55
96
|
textColor: "Value color",
|
|
@@ -58,7 +99,19 @@ const DisplayNames = {
|
|
|
58
99
|
helperFont: "Helper text font",
|
|
59
100
|
helperColor: "Helper text color",
|
|
60
101
|
optionTextColor: "Option text color",
|
|
61
|
-
optionHoverBackgroundColor: "Option hover background"
|
|
102
|
+
optionHoverBackgroundColor: "Option hover background",
|
|
103
|
+
placeholderColor: "Placeholder color",
|
|
104
|
+
chipBackgroundColor: "Chip background",
|
|
105
|
+
chipTextColor: "Chip text color"
|
|
106
|
+
},
|
|
107
|
+
elements: {
|
|
108
|
+
label: "Label",
|
|
109
|
+
input: "Input",
|
|
110
|
+
trigger: "Button",
|
|
111
|
+
clearButton: "Clear button",
|
|
112
|
+
list: "List",
|
|
113
|
+
option: "Option",
|
|
114
|
+
chip: "Chip"
|
|
62
115
|
},
|
|
63
116
|
displayGroups: {
|
|
64
117
|
optionsGroup: "Manage options",
|
|
@@ -81,7 +134,7 @@ const defaultValues = {
|
|
|
81
134
|
openOnInputClick: true,
|
|
82
135
|
inline: false,
|
|
83
136
|
grid: false,
|
|
84
|
-
columns:
|
|
137
|
+
columns: 2,
|
|
85
138
|
limit: -1,
|
|
86
139
|
label: "",
|
|
87
140
|
required: false,
|
|
@@ -108,13 +161,25 @@ const TestIds = {
|
|
|
108
161
|
description: "dropdown-description"
|
|
109
162
|
};
|
|
110
163
|
const selectors = {
|
|
111
|
-
root: "dropdown"
|
|
164
|
+
root: "dropdown",
|
|
165
|
+
label: "dropdown-label",
|
|
166
|
+
input: "dropdown-input",
|
|
167
|
+
trigger: "dropdown-trigger",
|
|
168
|
+
clear: "dropdown-clear",
|
|
169
|
+
list: "dropdown-list",
|
|
170
|
+
option: "dropdown-option",
|
|
171
|
+
chip: "dropdown-chip"
|
|
112
172
|
};
|
|
113
173
|
const semanticClassNames = {
|
|
114
174
|
root: "dropdown",
|
|
175
|
+
label: "dropdown__label",
|
|
176
|
+
input: "dropdown__input",
|
|
115
177
|
trigger: "dropdown__trigger",
|
|
178
|
+
clear: "dropdown__clear",
|
|
116
179
|
listbox: "dropdown__listbox",
|
|
117
180
|
option: "dropdown__option",
|
|
181
|
+
chips: "dropdown__chips",
|
|
182
|
+
chip: "dropdown__chip",
|
|
118
183
|
applyButton: "dropdown__apply-button"
|
|
119
184
|
};
|
|
120
185
|
const ARIA_LABEL_NAMESPACE = "ariaLabels";
|
|
@@ -126,12 +191,13 @@ const AriaLabels = {
|
|
|
126
191
|
export {
|
|
127
192
|
ALL_VALUE as A,
|
|
128
193
|
DesignStates as D,
|
|
194
|
+
FunctionalStateKeys as F,
|
|
129
195
|
TestIds as T,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
196
|
+
semanticClassNames as a,
|
|
197
|
+
TriggerModeValues as b,
|
|
198
|
+
ARIA_LABEL_NAMESPACE as c,
|
|
133
199
|
defaultValues as d,
|
|
134
|
-
|
|
200
|
+
AriaLabels as e,
|
|
135
201
|
DisplayNames as f,
|
|
136
|
-
|
|
202
|
+
selectors as s
|
|
137
203
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2334.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -197,5 +197,5 @@
|
|
|
197
197
|
"registry": "https://registry.npmjs.org/",
|
|
198
198
|
"access": "public"
|
|
199
199
|
},
|
|
200
|
-
"falconPackageHash": "
|
|
200
|
+
"falconPackageHash": "641aaf72a7073bed42b46ffb59d7524219b5c6cf59dba5d1e4a87bbd"
|
|
201
201
|
}
|