@momentum-design/components 0.121.8 → 0.122.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/dist/browser/index.js +409 -322
- package/dist/browser/index.js.map +4 -4
- package/dist/components/input/input.component.d.ts +4 -3
- package/dist/components/input/input.component.js +2 -1
- package/dist/components/searchfield/searchfield.component.d.ts +9 -1
- package/dist/components/searchfield/searchfield.component.js +8 -0
- package/dist/components/searchpopover/index.d.ts +11 -0
- package/dist/components/searchpopover/index.js +8 -0
- package/dist/components/searchpopover/searchpopover.component.d.ts +100 -0
- package/dist/components/searchpopover/searchpopover.component.js +208 -0
- package/dist/components/searchpopover/searchpopover.constants.d.ts +8 -0
- package/dist/components/searchpopover/searchpopover.constants.js +10 -0
- package/dist/components/searchpopover/searchpopover.styles.d.ts +2 -0
- package/dist/components/searchpopover/searchpopover.styles.js +23 -0
- package/dist/components/searchpopover/searchpopover.types.d.ts +8 -0
- package/dist/components/searchpopover/searchpopover.types.js +1 -0
- package/dist/custom-elements.json +5453 -3983
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +8 -7
- package/dist/react/index.js +8 -7
- package/dist/react/searchfield/index.d.ts +7 -0
- package/dist/react/searchfield/index.js +7 -0
- package/dist/react/searchpopover/index.d.ts +83 -0
- package/dist/react/searchpopover/index.js +89 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ import Radio from './components/radio';
|
|
|
56
56
|
import RadioGroup from './components/radiogroup';
|
|
57
57
|
import ScreenreaderAnnouncer from './components/screenreaderannouncer';
|
|
58
58
|
import Searchfield from './components/searchfield';
|
|
59
|
+
import Searchpopover from './components/searchpopover';
|
|
59
60
|
import Select from './components/select';
|
|
60
61
|
import SelectListbox from './components/selectlistbox';
|
|
61
62
|
import SideNavigation from './components/sidenavigation';
|
|
@@ -100,6 +101,6 @@ import type { TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, Texta
|
|
|
100
101
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
|
101
102
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
|
102
103
|
import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
|
|
103
|
-
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
|
|
104
|
+
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
|
|
104
105
|
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, };
|
|
105
106
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
|
package/dist/index.js
CHANGED
|
@@ -58,6 +58,7 @@ import Radio from './components/radio';
|
|
|
58
58
|
import RadioGroup from './components/radiogroup';
|
|
59
59
|
import ScreenreaderAnnouncer from './components/screenreaderannouncer';
|
|
60
60
|
import Searchfield from './components/searchfield';
|
|
61
|
+
import Searchpopover from './components/searchpopover';
|
|
61
62
|
import Select from './components/select';
|
|
62
63
|
import SelectListbox from './components/selectlistbox';
|
|
63
64
|
import SideNavigation from './components/sidenavigation';
|
|
@@ -90,6 +91,6 @@ import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, }
|
|
|
90
91
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
|
91
92
|
import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
|
|
92
93
|
// Components Exports
|
|
93
|
-
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
|
|
94
|
+
export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
|
|
94
95
|
// Constants / Utils Exports
|
|
95
96
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ export { default as Banner } from './banner';
|
|
|
12
12
|
export { default as Brandvisual } from './brandvisual';
|
|
13
13
|
export { default as Bullet } from './bullet';
|
|
14
14
|
export { default as Button } from './button';
|
|
15
|
-
export { default as ButtonGroup } from './buttongroup';
|
|
16
15
|
export { default as ButtonLink } from './buttonlink';
|
|
17
16
|
export { default as Buttonsimple } from './buttonsimple';
|
|
18
17
|
export { default as Card } from './card';
|
|
18
|
+
export { default as ButtonGroup } from './buttongroup';
|
|
19
19
|
export { default as CardButton } from './cardbutton';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
@@ -53,25 +53,26 @@ export { default as NavMenuItem } from './navmenuitem';
|
|
|
53
53
|
export { default as OptGroup } from './optgroup';
|
|
54
54
|
export { default as Option } from './option';
|
|
55
55
|
export { default as Password } from './password';
|
|
56
|
-
export { default as Popover } from './popover';
|
|
57
56
|
export { default as Presence } from './presence';
|
|
58
57
|
export { default as Progressbar } from './progressbar';
|
|
59
58
|
export { default as Progressspinner } from './progressspinner';
|
|
59
|
+
export { default as Popover } from './popover';
|
|
60
60
|
export { default as Radio } from './radio';
|
|
61
|
-
export { default as RadioGroup } from './radiogroup';
|
|
62
|
-
export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
|
|
63
61
|
export { default as Searchfield } from './searchfield';
|
|
62
|
+
export { default as Searchpopover } from './searchpopover';
|
|
63
|
+
export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
|
|
64
|
+
export { default as RadioGroup } from './radiogroup';
|
|
64
65
|
export { default as Select } from './select';
|
|
65
66
|
export { default as Selectlistbox } from './selectlistbox';
|
|
66
|
-
export { default as SideNavigation } from './sidenavigation';
|
|
67
67
|
export { default as Skeleton } from './skeleton';
|
|
68
68
|
export { default as Slider } from './slider';
|
|
69
|
+
export { default as SideNavigation } from './sidenavigation';
|
|
69
70
|
export { default as Spinner } from './spinner';
|
|
70
71
|
export { default as StaticCheckbox } from './staticcheckbox';
|
|
71
72
|
export { default as StaticChip } from './staticchip';
|
|
72
|
-
export { default as StaticRadio } from './staticradio';
|
|
73
73
|
export { default as StaticToggle } from './statictoggle';
|
|
74
74
|
export { default as Stepper } from './stepper';
|
|
75
|
+
export { default as StaticRadio } from './staticradio';
|
|
75
76
|
export { default as StepperConnector } from './stepperconnector';
|
|
76
77
|
export { default as StepperItem } from './stepperitem';
|
|
77
78
|
export { default as Tab } from './tab';
|
|
@@ -83,5 +84,5 @@ export { default as Toast } from './toast';
|
|
|
83
84
|
export { default as Toggle } from './toggle';
|
|
84
85
|
export { default as ToggleTip } from './toggletip';
|
|
85
86
|
export { default as Tooltip } from './tooltip';
|
|
86
|
-
export { default as VirtualizedList } from './virtualizedlist';
|
|
87
87
|
export { default as Typewriter } from './typewriter';
|
|
88
|
+
export { default as VirtualizedList } from './virtualizedlist';
|
package/dist/react/index.js
CHANGED
|
@@ -12,10 +12,10 @@ export { default as Banner } from './banner';
|
|
|
12
12
|
export { default as Brandvisual } from './brandvisual';
|
|
13
13
|
export { default as Bullet } from './bullet';
|
|
14
14
|
export { default as Button } from './button';
|
|
15
|
-
export { default as ButtonGroup } from './buttongroup';
|
|
16
15
|
export { default as ButtonLink } from './buttonlink';
|
|
17
16
|
export { default as Buttonsimple } from './buttonsimple';
|
|
18
17
|
export { default as Card } from './card';
|
|
18
|
+
export { default as ButtonGroup } from './buttongroup';
|
|
19
19
|
export { default as CardButton } from './cardbutton';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
@@ -53,25 +53,26 @@ export { default as NavMenuItem } from './navmenuitem';
|
|
|
53
53
|
export { default as OptGroup } from './optgroup';
|
|
54
54
|
export { default as Option } from './option';
|
|
55
55
|
export { default as Password } from './password';
|
|
56
|
-
export { default as Popover } from './popover';
|
|
57
56
|
export { default as Presence } from './presence';
|
|
58
57
|
export { default as Progressbar } from './progressbar';
|
|
59
58
|
export { default as Progressspinner } from './progressspinner';
|
|
59
|
+
export { default as Popover } from './popover';
|
|
60
60
|
export { default as Radio } from './radio';
|
|
61
|
-
export { default as RadioGroup } from './radiogroup';
|
|
62
|
-
export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
|
|
63
61
|
export { default as Searchfield } from './searchfield';
|
|
62
|
+
export { default as Searchpopover } from './searchpopover';
|
|
63
|
+
export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
|
|
64
|
+
export { default as RadioGroup } from './radiogroup';
|
|
64
65
|
export { default as Select } from './select';
|
|
65
66
|
export { default as Selectlistbox } from './selectlistbox';
|
|
66
|
-
export { default as SideNavigation } from './sidenavigation';
|
|
67
67
|
export { default as Skeleton } from './skeleton';
|
|
68
68
|
export { default as Slider } from './slider';
|
|
69
|
+
export { default as SideNavigation } from './sidenavigation';
|
|
69
70
|
export { default as Spinner } from './spinner';
|
|
70
71
|
export { default as StaticCheckbox } from './staticcheckbox';
|
|
71
72
|
export { default as StaticChip } from './staticchip';
|
|
72
|
-
export { default as StaticRadio } from './staticradio';
|
|
73
73
|
export { default as StaticToggle } from './statictoggle';
|
|
74
74
|
export { default as Stepper } from './stepper';
|
|
75
|
+
export { default as StaticRadio } from './staticradio';
|
|
75
76
|
export { default as StepperConnector } from './stepperconnector';
|
|
76
77
|
export { default as StepperItem } from './stepperitem';
|
|
77
78
|
export { default as Tab } from './tab';
|
|
@@ -83,5 +84,5 @@ export { default as Toast } from './toast';
|
|
|
83
84
|
export { default as Toggle } from './toggle';
|
|
84
85
|
export { default as ToggleTip } from './toggletip';
|
|
85
86
|
export { default as Tooltip } from './tooltip';
|
|
86
|
-
export { default as VirtualizedList } from './virtualizedlist';
|
|
87
87
|
export { default as Typewriter } from './typewriter';
|
|
88
|
+
export { default as VirtualizedList } from './virtualizedlist';
|
|
@@ -8,6 +8,13 @@ import type { Events as EventsInherited } from '../../components/input/input.typ
|
|
|
8
8
|
*
|
|
9
9
|
* This component is built by extending the `mdc-input` component.
|
|
10
10
|
*
|
|
11
|
+
* **Accessibility:**
|
|
12
|
+
*
|
|
13
|
+
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
14
|
+
* Search results should be shown permanently on the page if using this component.
|
|
15
|
+
*
|
|
16
|
+
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
17
|
+
*
|
|
11
18
|
* @tagname mdc-searchfield
|
|
12
19
|
*
|
|
13
20
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
@@ -9,6 +9,13 @@ import { TAG_NAME } from '../../components/searchfield/searchfield.constants';
|
|
|
9
9
|
*
|
|
10
10
|
* This component is built by extending the `mdc-input` component.
|
|
11
11
|
*
|
|
12
|
+
* **Accessibility:**
|
|
13
|
+
*
|
|
14
|
+
* NOTE: this component should not be used in combination with a Popover or Listbox component.
|
|
15
|
+
* Search results should be shown permanently on the page if using this component.
|
|
16
|
+
*
|
|
17
|
+
* For a search field that opens a Popover, use the `mdc-searchpopover` widget instead.
|
|
18
|
+
*
|
|
12
19
|
* @tagname mdc-searchfield
|
|
13
20
|
*
|
|
14
21
|
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type EventName } from '@lit/react';
|
|
2
|
+
import Component from '../../components/searchpopover';
|
|
3
|
+
import type { Events } from '../../components/searchpopover/searchpopover.types';
|
|
4
|
+
import type { Events as EventsInherited } from '../../components/input/input.types';
|
|
5
|
+
/**
|
|
6
|
+
* `mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure
|
|
7
|
+
* proper accessibility. This component should be used when search results or suggestions need to be displayed
|
|
8
|
+
* in a popover below the search input field, where the search results hold individual actions like navigating to a
|
|
9
|
+
* a different url etc.
|
|
10
|
+
*
|
|
11
|
+
* - Don't use this when search results are displayed inline on the page -> use Searchfield component instead.
|
|
12
|
+
* - Don't use this when a list of options is filtered based on the search input -> use Combobox component instead.
|
|
13
|
+
*
|
|
14
|
+
* It supports `mdc-inputchip` as filters.
|
|
15
|
+
*
|
|
16
|
+
* This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-searchpopover
|
|
19
|
+
*
|
|
20
|
+
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
21
|
+
* @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).
|
|
22
|
+
* @event focus - (React: onFocus) This event is dispatched when the input receives focus.
|
|
23
|
+
* @event blur - (React: onBlur) This event is dispatched when the input loses focus.
|
|
24
|
+
* @event clear - (React: onClear) This event is dispatched when the input text is cleared.
|
|
25
|
+
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
|
26
|
+
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
|
27
|
+
*
|
|
28
|
+
* @slot default - Default slot (=children) for the popover content
|
|
29
|
+
* @slot filters - Slot for input chips
|
|
30
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
31
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
32
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
33
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
|
34
|
+
* @slot input - Slot for the input element. If not provided, the input field will be rendered.
|
|
35
|
+
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
|
36
|
+
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
|
37
|
+
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
|
38
|
+
*
|
|
39
|
+
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
40
|
+
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
41
|
+
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
42
|
+
* @cssproperty --mdc-label-color - Color for the label text.
|
|
43
|
+
* @cssproperty --mdc-help-text-font-size - Font size for the help text.
|
|
44
|
+
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
45
|
+
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
46
|
+
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
47
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
48
|
+
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
49
|
+
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
50
|
+
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
51
|
+
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
|
52
|
+
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
|
53
|
+
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
|
54
|
+
* @cssproperty --mdc-searchpopover-width - Width of the searchpopover component
|
|
55
|
+
* @cssproperty --mdc-searchpopover-popover-width - Width of the popover within the searchpopover component
|
|
56
|
+
* @cssproperty --mdc-searchpopover-popover-height - Height of the popover within the searchpopover component
|
|
57
|
+
*
|
|
58
|
+
* @csspart label - The label element.
|
|
59
|
+
* @csspart label-text - The container for the label and required indicator elements.
|
|
60
|
+
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
61
|
+
* @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.
|
|
62
|
+
* @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.
|
|
63
|
+
* @csspart help-text - The helper/validation text element.
|
|
64
|
+
* @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.
|
|
65
|
+
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
66
|
+
* @csspart leading-icon - The leading icon element that is displayed before the input field.
|
|
67
|
+
* @csspart prefix-text - The prefix text element that is displayed before the input field.
|
|
68
|
+
* @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.
|
|
69
|
+
* @csspart input-section - The container for the input field, leading icon, and prefix text elements.
|
|
70
|
+
* @csspart input-text - The input field element.
|
|
71
|
+
* @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.
|
|
72
|
+
* @csspart popover-content - The popover content element.
|
|
73
|
+
*/
|
|
74
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
|
75
|
+
onShown: EventName<Events["onShownEvent"]>;
|
|
76
|
+
onHidden: EventName<Events["onHiddenEvent"]>;
|
|
77
|
+
onInput: EventName<EventsInherited["onInputEvent"]>;
|
|
78
|
+
onChange: EventName<EventsInherited["onChangeEvent"]>;
|
|
79
|
+
onFocus: EventName<EventsInherited["onFocusEvent"]>;
|
|
80
|
+
onBlur: EventName<EventsInherited["onBlurEvent"]>;
|
|
81
|
+
onClear: EventName<EventsInherited["onClearEvent"]>;
|
|
82
|
+
}>;
|
|
83
|
+
export default reactWrapper;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import Component from '../../components/searchpopover';
|
|
4
|
+
import { TAG_NAME } from '../../components/searchpopover/searchpopover.constants';
|
|
5
|
+
/**
|
|
6
|
+
* `mdc-searchpopover` widget is a combination of the Searchfield and Popover components, connected to ensure
|
|
7
|
+
* proper accessibility. This component should be used when search results or suggestions need to be displayed
|
|
8
|
+
* in a popover below the search input field, where the search results hold individual actions like navigating to a
|
|
9
|
+
* a different url etc.
|
|
10
|
+
*
|
|
11
|
+
* - Don't use this when search results are displayed inline on the page -> use Searchfield component instead.
|
|
12
|
+
* - Don't use this when a list of options is filtered based on the search input -> use Combobox component instead.
|
|
13
|
+
*
|
|
14
|
+
* It supports `mdc-inputchip` as filters.
|
|
15
|
+
*
|
|
16
|
+
* This component is built by extending the `mdc-searchfield` component & rendering the mdc-popover component inside.
|
|
17
|
+
*
|
|
18
|
+
* @tagname mdc-searchpopover
|
|
19
|
+
*
|
|
20
|
+
* @event input - (React: onInput) This event is dispatched when the value of the input field changes (every press).
|
|
21
|
+
* @event change - (React: onChange) This event is dispatched when the value of the input field changes (on blur).
|
|
22
|
+
* @event focus - (React: onFocus) This event is dispatched when the input receives focus.
|
|
23
|
+
* @event blur - (React: onBlur) This event is dispatched when the input loses focus.
|
|
24
|
+
* @event clear - (React: onClear) This event is dispatched when the input text is cleared.
|
|
25
|
+
* @event shown - (React: onShown) This event is dispatched when the popover is shown
|
|
26
|
+
* @event hidden - (React: onHidden) This event is dispatched when the popover is hidden
|
|
27
|
+
*
|
|
28
|
+
* @slot default - Default slot (=children) for the popover content
|
|
29
|
+
* @slot filters - Slot for input chips
|
|
30
|
+
* @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
|
|
31
|
+
* @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.
|
|
32
|
+
* @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
|
|
33
|
+
* @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
|
|
34
|
+
* @slot input - Slot for the input element. If not provided, the input field will be rendered.
|
|
35
|
+
* @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
|
|
36
|
+
* @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
|
|
37
|
+
* @slot trailing-button - Slot for the trailing button to clear the input field. If not provided, the clear button will be rendered when `trailingButton` property is set to true.
|
|
38
|
+
*
|
|
39
|
+
* @cssproperty --mdc-label-font-size - Font size for the label text.
|
|
40
|
+
* @cssproperty --mdc-label-font-weight - Font weight for the label text.
|
|
41
|
+
* @cssproperty --mdc-label-line-height - Line height for the label text.
|
|
42
|
+
* @cssproperty --mdc-label-color - Color for the label text.
|
|
43
|
+
* @cssproperty --mdc-help-text-font-size - Font size for the help text.
|
|
44
|
+
* @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
|
|
45
|
+
* @cssproperty --mdc-help-text-line-height - Line height for the help text.
|
|
46
|
+
* @cssproperty --mdc-help-text-color - Color for the help text.
|
|
47
|
+
* @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
|
|
48
|
+
* @cssproperty --mdc-input-text-color - Text color for the input field
|
|
49
|
+
* @cssproperty --mdc-input-border-color - Border color for the input container
|
|
50
|
+
* @cssproperty --mdc-input-background-color - Background color for the input field
|
|
51
|
+
* @cssproperty --mdc-input-support-text-color - Text color for the help text
|
|
52
|
+
* @cssproperty --mdc-input-selection-text-color - Text color for the selected text
|
|
53
|
+
* @cssproperty --mdc-input-selection-background-color - Background color for the selected text
|
|
54
|
+
* @cssproperty --mdc-searchpopover-width - Width of the searchpopover component
|
|
55
|
+
* @cssproperty --mdc-searchpopover-popover-width - Width of the popover within the searchpopover component
|
|
56
|
+
* @cssproperty --mdc-searchpopover-popover-height - Height of the popover within the searchpopover component
|
|
57
|
+
*
|
|
58
|
+
* @csspart label - The label element.
|
|
59
|
+
* @csspart label-text - The container for the label and required indicator elements.
|
|
60
|
+
* @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.
|
|
61
|
+
* @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.
|
|
62
|
+
* @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.
|
|
63
|
+
* @csspart help-text - The helper/validation text element.
|
|
64
|
+
* @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.
|
|
65
|
+
* @csspart help-text-container - The container for the helper/validation icon and text elements.
|
|
66
|
+
* @csspart leading-icon - The leading icon element that is displayed before the input field.
|
|
67
|
+
* @csspart prefix-text - The prefix text element that is displayed before the input field.
|
|
68
|
+
* @csspart input-container - The container for the input field, leading icon, prefix text, and trailing button elements.
|
|
69
|
+
* @csspart input-section - The container for the input field, leading icon, and prefix text elements.
|
|
70
|
+
* @csspart input-text - The input field element.
|
|
71
|
+
* @csspart trailing-button - The trailing button element that is displayed to clear the input field when the `trailingButton` property is set to true.
|
|
72
|
+
* @csspart popover-content - The popover content element.
|
|
73
|
+
*/
|
|
74
|
+
const reactWrapper = createComponent({
|
|
75
|
+
tagName: TAG_NAME,
|
|
76
|
+
elementClass: Component,
|
|
77
|
+
react: React,
|
|
78
|
+
events: {
|
|
79
|
+
onShown: 'shown',
|
|
80
|
+
onHidden: 'hidden',
|
|
81
|
+
onInput: 'input',
|
|
82
|
+
onChange: 'change',
|
|
83
|
+
onFocus: 'focus',
|
|
84
|
+
onBlur: 'blur',
|
|
85
|
+
onClear: 'clear',
|
|
86
|
+
},
|
|
87
|
+
displayName: 'Searchpopover',
|
|
88
|
+
});
|
|
89
|
+
export default reactWrapper;
|