@wistia/ui 0.10.2-beta.6ea9f134.e1e41c3 → 0.10.2
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/index.cjs +1 -242
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -33
- package/dist/index.d.ts +1 -33
- package/dist/index.mjs +1 -249
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -3
package/dist/index.d.mts
CHANGED
|
@@ -3303,36 +3303,4 @@ declare const List: {
|
|
|
3303
3303
|
displayName: string;
|
|
3304
3304
|
};
|
|
3305
3305
|
|
|
3306
|
-
type
|
|
3307
|
-
/**
|
|
3308
|
-
* If true, the combox will fill the width of its parent
|
|
3309
|
-
*/
|
|
3310
|
-
fullWidth?: boolean;
|
|
3311
|
-
/**
|
|
3312
|
-
* The options to display in the combobox
|
|
3313
|
-
*/
|
|
3314
|
-
children: ReactNode;
|
|
3315
|
-
/**
|
|
3316
|
-
* The placeholder text for the combobox input
|
|
3317
|
-
*/
|
|
3318
|
-
placeholder?: string;
|
|
3319
|
-
/**
|
|
3320
|
-
* The function to call when the search value changes.
|
|
3321
|
-
*/
|
|
3322
|
-
onSearchValueChange: (value: string) => void;
|
|
3323
|
-
/**
|
|
3324
|
-
* The search value of the combobox input
|
|
3325
|
-
*/
|
|
3326
|
-
searchValue: string;
|
|
3327
|
-
/**
|
|
3328
|
-
* vent that fires when a value is selected
|
|
3329
|
-
*/
|
|
3330
|
-
onChange: (value: string[]) => void;
|
|
3331
|
-
/**
|
|
3332
|
-
* The selected values of the combobox
|
|
3333
|
-
*/
|
|
3334
|
-
value: string[];
|
|
3335
|
-
};
|
|
3336
|
-
declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchValueChange, children, fullWidth, }: ComboboxProps) => react_jsx_runtime.JSX.Element;
|
|
3337
|
-
|
|
3338
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, type ComboboxProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFocusTrap, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
|
3306
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFocusTrap, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
package/dist/index.d.ts
CHANGED
|
@@ -3303,36 +3303,4 @@ declare const List: {
|
|
|
3303
3303
|
displayName: string;
|
|
3304
3304
|
};
|
|
3305
3305
|
|
|
3306
|
-
type
|
|
3307
|
-
/**
|
|
3308
|
-
* If true, the combox will fill the width of its parent
|
|
3309
|
-
*/
|
|
3310
|
-
fullWidth?: boolean;
|
|
3311
|
-
/**
|
|
3312
|
-
* The options to display in the combobox
|
|
3313
|
-
*/
|
|
3314
|
-
children: ReactNode;
|
|
3315
|
-
/**
|
|
3316
|
-
* The placeholder text for the combobox input
|
|
3317
|
-
*/
|
|
3318
|
-
placeholder?: string;
|
|
3319
|
-
/**
|
|
3320
|
-
* The function to call when the search value changes.
|
|
3321
|
-
*/
|
|
3322
|
-
onSearchValueChange: (value: string) => void;
|
|
3323
|
-
/**
|
|
3324
|
-
* The search value of the combobox input
|
|
3325
|
-
*/
|
|
3326
|
-
searchValue: string;
|
|
3327
|
-
/**
|
|
3328
|
-
* vent that fires when a value is selected
|
|
3329
|
-
*/
|
|
3330
|
-
onChange: (value: string[]) => void;
|
|
3331
|
-
/**
|
|
3332
|
-
* The selected values of the combobox
|
|
3333
|
-
*/
|
|
3334
|
-
value: string[];
|
|
3335
|
-
};
|
|
3336
|
-
declare const Combobox: ({ placeholder, value, onChange, searchValue, onSearchValueChange, children, fullWidth, }: ComboboxProps) => react_jsx_runtime.JSX.Element;
|
|
3337
|
-
|
|
3338
|
-
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Combobox, type ComboboxProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFocusTrap, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
|
3306
|
+
export { ActionButton, type ActionButtonProps, Avatar, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonProps, Card, type CardProps, Center, type CenterProps, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, type ClickRegionProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, DataCard, type DataCardProps, DataCardTrend, type DataCardTrendProps, DataCards, type DataCardsProps, Divider, EditableHeading, type EditableHeadingProps, Ellipsis, type EllipsisProps, Form, FormErrorSummary, FormField, type FormFieldProps, FormGroup, type FormGroupProps, type FormProps, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Image, type ImageProps, Input, InputClickToCopy, type InputClickToCopyProps, type InputProps, type KeyboardKeys, KeyboardShortcut, Label, type LabelProps, Link, type LinkProps, List, type ListProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Modal, type ModalProps, Popover, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, RadioGroup, RadioMenuItem, type RadioProps, ScreenReaderOnly, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, Select, SelectOption, SelectOptionGroup, type SelectOptionGroupProps, type SelectOptionProps, type SelectProps, Stack, SubMenu, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableFoot, type TableFootProps, TableHead, type TableHeadProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Text, type TextProps, Thumbnail, ThumbnailBadge, type ThumbnailBadgeProps, ThumbnailCollage, type ThumbnailCollageProps, type ThumbnailProps, Tooltip, type TooltipProps, UIProvider, type UseToastProps, WistiaLogo, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFocusTrap, useForceUpdate, useFormState, useIsHovered, useKey, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.10.2
|
|
3
|
+
* @license @wistia/ui v0.10.2
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -13597,253 +13597,6 @@ var List = ({
|
|
|
13597
13597
|
return null;
|
|
13598
13598
|
};
|
|
13599
13599
|
List.displayName = "List";
|
|
13600
|
-
|
|
13601
|
-
// src/components/Combobox/Combobox.tsx
|
|
13602
|
-
import * as Ariakit from "@ariakit/react";
|
|
13603
|
-
import {
|
|
13604
|
-
useMemo as useMemo11,
|
|
13605
|
-
useRef as useRef17,
|
|
13606
|
-
useState as useState18,
|
|
13607
|
-
useTransition,
|
|
13608
|
-
useEffect as useEffect13,
|
|
13609
|
-
Children as Children6,
|
|
13610
|
-
isValidElement as isValidElement2
|
|
13611
|
-
} from "react";
|
|
13612
|
-
import { matchSorter } from "match-sorter";
|
|
13613
|
-
import styled78 from "styled-components";
|
|
13614
|
-
import { jsx as jsx277, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
13615
|
-
var ComboboxWapper = styled78.div`
|
|
13616
|
-
${inputCss};
|
|
13617
|
-
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
13618
|
-
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
13619
|
-
background-color: var(--wui-input-color-bg);
|
|
13620
|
-
border: none;
|
|
13621
|
-
outline: 1px solid var(--wui-input-color-border);
|
|
13622
|
-
outline-offset: -1px;
|
|
13623
|
-
border-radius: var(--wui-input-border-radius);
|
|
13624
|
-
font-size: var(--wui-input-font-size);
|
|
13625
|
-
line-height: var(--wui-input-line-height);
|
|
13626
|
-
font-weight: var(--wui-input-font-weight);
|
|
13627
|
-
color: var(--wui-input-color-text);
|
|
13628
|
-
display: inline-flex;
|
|
13629
|
-
flex-wrap: wrap;
|
|
13630
|
-
gap: var(--wui-space-01);
|
|
13631
|
-
|
|
13632
|
-
> * {
|
|
13633
|
-
width: min-content !important;
|
|
13634
|
-
}
|
|
13635
|
-
|
|
13636
|
-
&:focus-within {
|
|
13637
|
-
outline: 2px solid var(--wui-input-color-border-focus);
|
|
13638
|
-
outline-offset: -2px;
|
|
13639
|
-
}
|
|
13640
|
-
|
|
13641
|
-
input {
|
|
13642
|
-
outline: 0 none;
|
|
13643
|
-
border: 0 none;
|
|
13644
|
-
|
|
13645
|
-
&::placeholder {
|
|
13646
|
-
color: var(--wui-input-placeholder);
|
|
13647
|
-
opacity: 1;
|
|
13648
|
-
}
|
|
13649
|
-
|
|
13650
|
-
&:focus {
|
|
13651
|
-
outline: 0;
|
|
13652
|
-
}
|
|
13653
|
-
|
|
13654
|
-
&[aria-invalid='true'] {
|
|
13655
|
-
outline-color: var(--wui-input-color-border-error);
|
|
13656
|
-
}
|
|
13657
|
-
|
|
13658
|
-
&:disabled {
|
|
13659
|
-
outline-color: var(--wui-color-border-disabled);
|
|
13660
|
-
background-color: var(--wui-color-bg-surface-disabled);
|
|
13661
|
-
}
|
|
13662
|
-
}
|
|
13663
|
-
`;
|
|
13664
|
-
var ComboboxInput = styled78(Ariakit.Combobox)`
|
|
13665
|
-
appearance: none;
|
|
13666
|
-
padding: 0;
|
|
13667
|
-
width: 100%;
|
|
13668
|
-
border: 0 none;
|
|
13669
|
-
flex: 1;
|
|
13670
|
-
|
|
13671
|
-
&[data-focus-visible] {
|
|
13672
|
-
outline-style: solid;
|
|
13673
|
-
}
|
|
13674
|
-
|
|
13675
|
-
&[data-active-item] {
|
|
13676
|
-
outline-width: 2px;
|
|
13677
|
-
}
|
|
13678
|
-
`;
|
|
13679
|
-
var ComboboxPopover = styled78(Ariakit.Popover)`
|
|
13680
|
-
--wui-combobox-content-border: var(--wui-color-border);
|
|
13681
|
-
--wui-combobox-content-bg: var(--wui-color-bg-surface);
|
|
13682
|
-
--wui-combobox-content-border-radius: var(--wui-border-radius-02);
|
|
13683
|
-
--wui-combobox-option-padding: var(--wui-space-02);
|
|
13684
|
-
--wui-combobox-option-inner-gap: var(--wui-space-03);
|
|
13685
|
-
--wui-combobox-option-bg-hover: var(--wui-color-bg-surface-hover);
|
|
13686
|
-
|
|
13687
|
-
border-radius: var(--wui-border-radius-02);
|
|
13688
|
-
padding: var(--wui-space-04);
|
|
13689
|
-
max-height: var(--wui-popover-max-height, 300px);
|
|
13690
|
-
background-color: var(--wui-color-bg-surface);
|
|
13691
|
-
box-shadow: var(--wui-elevation-01);
|
|
13692
|
-
border: 1px solid var(--wui-color-border);
|
|
13693
|
-
position: relative;
|
|
13694
|
-
z-index: 50;
|
|
13695
|
-
display: flex;
|
|
13696
|
-
flex-direction: column;
|
|
13697
|
-
overflow: auto;
|
|
13698
|
-
overscroll-behavior: contain;
|
|
13699
|
-
|
|
13700
|
-
&[aria-busy='true'] {
|
|
13701
|
-
--item-opacity: 0.5;
|
|
13702
|
-
}
|
|
13703
|
-
`;
|
|
13704
|
-
var ComboboxItem2 = styled78(Ariakit.ComboboxItem)`
|
|
13705
|
-
${variantStyleMap2.body3};
|
|
13706
|
-
display: flex;
|
|
13707
|
-
padding: var(--wui-combobox-option-padding);
|
|
13708
|
-
gap: var(--wui-combobox-option-inner-gap);
|
|
13709
|
-
font-size: var(--font-size);
|
|
13710
|
-
font-weight: var(--font-weight);
|
|
13711
|
-
border-radius: var(--wui-border-radius-01);
|
|
13712
|
-
align-items: center;
|
|
13713
|
-
cursor: pointer;
|
|
13714
|
-
|
|
13715
|
-
&:hover,
|
|
13716
|
-
&:focus-visible {
|
|
13717
|
-
background-color: var(--wui-combobox-option-bg-hover);
|
|
13718
|
-
outline: none;
|
|
13719
|
-
}
|
|
13720
|
-
|
|
13721
|
-
&[aria-disabled='true'] {
|
|
13722
|
-
color: var(--wui-color-text-disabled);
|
|
13723
|
-
}
|
|
13724
|
-
|
|
13725
|
-
&[aria-disabled='true']:hover {
|
|
13726
|
-
background-color: transparent;
|
|
13727
|
-
}
|
|
13728
|
-
`;
|
|
13729
|
-
var NoResults = styled78.div`
|
|
13730
|
-
gap: var(--wui-space-02);
|
|
13731
|
-
`;
|
|
13732
|
-
var POPOVER_WIDTH_OFFSET = 20;
|
|
13733
|
-
var extractOptions = (children) => {
|
|
13734
|
-
const options = {};
|
|
13735
|
-
Children6.forEach(children, (child) => {
|
|
13736
|
-
if (isValidElement2(child) && "value" in child.props && "children" in child.props) {
|
|
13737
|
-
options[child.props.value] = child.props.children ?? child.props.value;
|
|
13738
|
-
}
|
|
13739
|
-
});
|
|
13740
|
-
return options;
|
|
13741
|
-
};
|
|
13742
|
-
var Combobox2 = ({
|
|
13743
|
-
placeholder,
|
|
13744
|
-
value = [],
|
|
13745
|
-
onChange,
|
|
13746
|
-
searchValue,
|
|
13747
|
-
onSearchValueChange,
|
|
13748
|
-
children,
|
|
13749
|
-
fullWidth = true
|
|
13750
|
-
}) => {
|
|
13751
|
-
const [isPending, startTransition] = useTransition();
|
|
13752
|
-
const [wrapperWidth, setWrapperWidth] = useState18("auto");
|
|
13753
|
-
const comboboxWrapperRef = useRef17(null);
|
|
13754
|
-
const options = useMemo11(() => extractOptions(children), [children]);
|
|
13755
|
-
useEffect13(() => {
|
|
13756
|
-
const comboboxWrapper = comboboxWrapperRef.current;
|
|
13757
|
-
if (comboboxWrapper) {
|
|
13758
|
-
const updateWidthVariable = () => {
|
|
13759
|
-
const { width } = comboboxWrapper.getBoundingClientRect();
|
|
13760
|
-
setWrapperWidth(`${width - POPOVER_WIDTH_OFFSET}px`);
|
|
13761
|
-
};
|
|
13762
|
-
updateWidthVariable();
|
|
13763
|
-
window.addEventListener("resize", updateWidthVariable);
|
|
13764
|
-
return () => {
|
|
13765
|
-
window.removeEventListener("resize", updateWidthVariable);
|
|
13766
|
-
};
|
|
13767
|
-
}
|
|
13768
|
-
return () => null;
|
|
13769
|
-
}, []);
|
|
13770
|
-
const handleRemoveValue = (valueToRemove) => {
|
|
13771
|
-
onChange(value.filter((val) => val !== valueToRemove));
|
|
13772
|
-
};
|
|
13773
|
-
const matches = useMemo11(() => {
|
|
13774
|
-
return matchSorter(Object.keys(options), searchValue);
|
|
13775
|
-
}, [options, searchValue]);
|
|
13776
|
-
return /* @__PURE__ */ jsxs50(
|
|
13777
|
-
Ariakit.ComboboxProvider,
|
|
13778
|
-
{
|
|
13779
|
-
selectedValue: value,
|
|
13780
|
-
setSelectedValue: onChange,
|
|
13781
|
-
setValue: (nextValue) => {
|
|
13782
|
-
startTransition(() => {
|
|
13783
|
-
onSearchValueChange(nextValue);
|
|
13784
|
-
});
|
|
13785
|
-
},
|
|
13786
|
-
children: [
|
|
13787
|
-
/* @__PURE__ */ jsxs50(
|
|
13788
|
-
ComboboxWapper,
|
|
13789
|
-
{
|
|
13790
|
-
ref: comboboxWrapperRef,
|
|
13791
|
-
$fullWidth: fullWidth,
|
|
13792
|
-
children: [
|
|
13793
|
-
value.map((selectedValue) => /* @__PURE__ */ jsx277(
|
|
13794
|
-
Tag,
|
|
13795
|
-
{
|
|
13796
|
-
href: "https://example.com",
|
|
13797
|
-
label: selectedValue,
|
|
13798
|
-
onClickRemove: () => handleRemoveValue(selectedValue),
|
|
13799
|
-
onClickRemoveLabel: `Remove ${selectedValue}`
|
|
13800
|
-
},
|
|
13801
|
-
selectedValue
|
|
13802
|
-
)),
|
|
13803
|
-
/* @__PURE__ */ jsx277(ComboboxInput, { placeholder })
|
|
13804
|
-
]
|
|
13805
|
-
}
|
|
13806
|
-
),
|
|
13807
|
-
/* @__PURE__ */ jsxs50(
|
|
13808
|
-
ComboboxPopover,
|
|
13809
|
-
{
|
|
13810
|
-
"aria-busy": isPending,
|
|
13811
|
-
gutter: 8,
|
|
13812
|
-
sameWidth: false,
|
|
13813
|
-
style: {
|
|
13814
|
-
width: wrapperWidth
|
|
13815
|
-
},
|
|
13816
|
-
children: [
|
|
13817
|
-
matches.map((match) => /* @__PURE__ */ jsxs50(
|
|
13818
|
-
ComboboxItem2,
|
|
13819
|
-
{
|
|
13820
|
-
className: "combobox-item",
|
|
13821
|
-
focusOnHover: true,
|
|
13822
|
-
value: match,
|
|
13823
|
-
children: [
|
|
13824
|
-
/* @__PURE__ */ jsx277(
|
|
13825
|
-
Icon,
|
|
13826
|
-
{
|
|
13827
|
-
size: "sm",
|
|
13828
|
-
style: {
|
|
13829
|
-
opacity: value.includes(match) ? 1 : 0
|
|
13830
|
-
},
|
|
13831
|
-
type: "checkmark"
|
|
13832
|
-
}
|
|
13833
|
-
),
|
|
13834
|
-
options[match]
|
|
13835
|
-
]
|
|
13836
|
-
},
|
|
13837
|
-
match
|
|
13838
|
-
)),
|
|
13839
|
-
!matches.length && /* @__PURE__ */ jsx277(NoResults, { children: "No results found" })
|
|
13840
|
-
]
|
|
13841
|
-
}
|
|
13842
|
-
)
|
|
13843
|
-
]
|
|
13844
|
-
}
|
|
13845
|
-
);
|
|
13846
|
-
};
|
|
13847
13600
|
export {
|
|
13848
13601
|
ActionButton,
|
|
13849
13602
|
Avatar,
|
|
@@ -13863,7 +13616,6 @@ export {
|
|
|
13863
13616
|
CollapsibleContent,
|
|
13864
13617
|
CollapsibleTrigger,
|
|
13865
13618
|
ColorSchemeWrapper,
|
|
13866
|
-
Combobox2 as Combobox,
|
|
13867
13619
|
DataCard,
|
|
13868
13620
|
DataCardTrend,
|
|
13869
13621
|
DataCards,
|