@bitrise/bitkit-v2 0.3.226 → 0.3.227
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/components/BitkitBreadcrumb/BitkitBreadcrumb.js +2 -1
- package/dist/components/BitkitBreadcrumb/BitkitBreadcrumb.js.map +1 -1
- package/dist/components/BitkitCombobox/BitkitCombobox.d.ts +13 -5
- package/dist/components/BitkitCombobox/BitkitCombobox.js +8 -5
- package/dist/components/BitkitCombobox/BitkitCombobox.js.map +1 -1
- package/dist/components/BitkitDialog/BitkitDialog.js +2 -1
- package/dist/components/BitkitDialog/BitkitDialog.js.map +1 -1
- package/dist/components/BitkitList/BitkitList.js +2 -1
- package/dist/components/BitkitList/BitkitList.js.map +1 -1
- package/dist/components/BitkitMultiselect/BitkitMultiselect.d.ts +13 -5
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js +7 -5
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.d.ts +6 -3
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js +3 -2
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js.map +1 -1
- package/dist/components/BitkitPageFooter/BitkitPageFooter.js +2 -1
- package/dist/components/BitkitPageFooter/BitkitPageFooter.js.map +1 -1
- package/dist/components/BitkitSegmentedControl/BitkitSegmentedControl.js +2 -1
- package/dist/components/BitkitSegmentedControl/BitkitSegmentedControl.js.map +1 -1
- package/dist/components/BitkitSelect/BitkitSelect.d.ts +13 -5
- package/dist/components/BitkitSelect/BitkitSelect.js +22 -14
- package/dist/components/BitkitSelect/BitkitSelect.js.map +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +6 -6
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js +3 -2
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js.map +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenuAction.d.ts +32 -0
- package/dist/components/BitkitSelectMenu/BitkitSelectMenuAction.js +49 -0
- package/dist/components/BitkitSelectMenu/BitkitSelectMenuAction.js.map +1 -0
- package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +8 -5
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js +63 -73
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js.map +1 -1
- package/dist/components/BitkitSelectableTag/BitkitSelectableTag.js +2 -1
- package/dist/components/BitkitSelectableTag/BitkitSelectableTag.js.map +1 -1
- package/dist/components/BitkitSettingsCard/BitkitSettingsCard.js +2 -1
- package/dist/components/BitkitSettingsCard/BitkitSettingsCard.js.map +1 -1
- package/dist/components/BitkitSidebar/BitkitSidebar.js +2 -1
- package/dist/components/BitkitSidebar/BitkitSidebar.js.map +1 -1
- package/dist/components/BitkitSplitButton/BitkitSplitButton.js +2 -1
- package/dist/components/BitkitSplitButton/BitkitSplitButton.js.map +1 -1
- package/dist/components/BitkitSteps/BitkitSteps.js +2 -1
- package/dist/components/BitkitSteps/BitkitSteps.js.map +1 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js +2 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js.map +1 -1
- package/dist/components/BitkitTreeView/BitkitTreeView.js +2 -1
- package/dist/components/BitkitTreeView/BitkitTreeView.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/main.js +5 -4
- package/dist/theme/slot-recipes/Combobox.recipe.d.ts +10 -0
- package/dist/theme/slot-recipes/Combobox.recipe.js +23 -14
- package/dist/theme/slot-recipes/Combobox.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Select.recipe.d.ts +11 -3
- package/dist/theme/slot-recipes/Select.recipe.js +106 -87
- package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +22 -4
- package/dist/utilities/withSubComponents.d.ts +11 -0
- package/dist/utilities/withSubComponents.js +16 -0
- package/dist/utilities/withSubComponents.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SelectRootProps, SelectTriggerProps } from '@chakra-ui/react/select';
|
|
2
2
|
import { BitkitFieldProps } from '../BitkitField/BitkitField.tsx';
|
|
3
|
-
import {
|
|
3
|
+
import { BitkitSelectMenuEmptyStateProps, BitkitSelectMenuItemProps, BitkitSelectMenuSearchProps } from '../BitkitSelectMenu/BitkitSelectMenu.tsx';
|
|
4
|
+
import { BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction.tsx';
|
|
4
5
|
export type BitkitSelectTriggerProps = SelectTriggerProps;
|
|
5
6
|
export type BitkitSelectProps = Omit<BitkitFieldProps, 'children' | 'state'> & {
|
|
7
|
+
children?: BitkitSelectMenuActionChild;
|
|
6
8
|
defaultValue?: string;
|
|
7
9
|
isLoading?: boolean;
|
|
8
10
|
items: Array<BitkitSelectMenuItemProps>;
|
|
@@ -13,8 +15,9 @@ export type BitkitSelectProps = Omit<BitkitFieldProps, 'children' | 'state'> & {
|
|
|
13
15
|
state?: 'disabled' | 'error' | 'readOnly' | 'warning';
|
|
14
16
|
triggerProps?: BitkitSelectTriggerProps;
|
|
15
17
|
value?: string;
|
|
16
|
-
} &
|
|
17
|
-
declare const
|
|
18
|
+
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps;
|
|
19
|
+
declare const _default: import('react').ForwardRefExoticComponent<Omit<BitkitFieldProps, "children" | "state"> & {
|
|
20
|
+
children?: BitkitSelectMenuActionChild;
|
|
18
21
|
defaultValue?: string;
|
|
19
22
|
isLoading?: boolean;
|
|
20
23
|
items: Array<BitkitSelectMenuItemProps>;
|
|
@@ -25,5 +28,10 @@ declare const BitkitSelect: import('react').ForwardRefExoticComponent<Omit<Bitki
|
|
|
25
28
|
state?: "disabled" | "error" | "readOnly" | "warning";
|
|
26
29
|
triggerProps?: BitkitSelectTriggerProps;
|
|
27
30
|
value?: string;
|
|
28
|
-
} &
|
|
29
|
-
|
|
31
|
+
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
32
|
+
Action: {
|
|
33
|
+
(props: import('../index.ts').BitkitSelectMenuActionProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import AssetSelectChevron from "../../utilities/AssetSelectChevron.js";
|
|
2
2
|
import IconErrorCircleFilled from "../../icons/IconErrorCircleFilled.js";
|
|
3
3
|
import IconWarningYellow from "../../icons/IconWarningYellow.js";
|
|
4
|
+
import { withSubComponents } from "../../utilities/withSubComponents.js";
|
|
5
|
+
import BitkitSelectMenuAction from "../BitkitSelectMenu/BitkitSelectMenuAction.js";
|
|
4
6
|
import BitkitSelectMenu from "../BitkitSelectMenu/BitkitSelectMenu.js";
|
|
5
7
|
import BitkitField from "../BitkitField/BitkitField.js";
|
|
6
|
-
import {
|
|
8
|
+
import { Text } from "@chakra-ui/react/text";
|
|
7
9
|
import { forwardRef } from "react";
|
|
8
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
11
|
import { Portal } from "@chakra-ui/react/portal";
|
|
@@ -15,18 +17,23 @@ var SelectValue = ({ placeholder, state, size }) => {
|
|
|
15
17
|
const Icon = items[0]?.icon;
|
|
16
18
|
const label = items[0]?.label;
|
|
17
19
|
const iconSize = size === "md" ? "16" : "24";
|
|
18
|
-
return items[0] ? /* @__PURE__ */
|
|
19
|
-
placeholder: placeholder
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return items[0] ? /* @__PURE__ */ jsxs(Select.ValueText, {
|
|
21
|
+
placeholder: placeholder ?? (state === "readOnly" ? "(not selected)" : "Select an option"),
|
|
22
|
+
children: [Icon && /* @__PURE__ */ jsx(Icon, {
|
|
23
|
+
size: iconSize,
|
|
24
|
+
flexShrink: 0
|
|
25
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
26
|
+
as: "span",
|
|
27
|
+
overflow: "hidden",
|
|
28
|
+
textOverflow: "ellipsis",
|
|
29
|
+
whiteSpace: "nowrap",
|
|
30
|
+
minWidth: 0,
|
|
31
|
+
children: label
|
|
32
|
+
})]
|
|
26
33
|
}) : /* @__PURE__ */ jsx(Select.ValueText, { placeholder: placeholder ?? (state === "readOnly" ? "(not selected)" : "Select an option") });
|
|
27
34
|
};
|
|
28
35
|
var BitkitSelect = forwardRef((props, ref) => {
|
|
29
|
-
const {
|
|
36
|
+
const { children, defaultValue, emptyHelperText, emptyLabel, isLoading, items, onSearchChange, onValueChange, searchValue, placeholder, selectProps, size, state, triggerProps, value, ...fieldProps } = props;
|
|
30
37
|
const collection = createListCollection({
|
|
31
38
|
items,
|
|
32
39
|
groupBy: (item) => item.group || "",
|
|
@@ -43,6 +50,7 @@ var BitkitSelect = forwardRef((props, ref) => {
|
|
|
43
50
|
...selectProps,
|
|
44
51
|
defaultValue: defaultValue ? [defaultValue] : void 0,
|
|
45
52
|
disabled: state === "disabled",
|
|
53
|
+
hasStatusIcon: state === "error" || state === "warning",
|
|
46
54
|
invalid: isInvalid,
|
|
47
55
|
onValueChange: (newVal) => onValueChange?.(newVal.value[0]),
|
|
48
56
|
readOnly: state === "readOnly",
|
|
@@ -73,21 +81,21 @@ var BitkitSelect = forwardRef((props, ref) => {
|
|
|
73
81
|
}),
|
|
74
82
|
/* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
|
|
75
83
|
collection,
|
|
76
|
-
createItemLabel,
|
|
77
84
|
emptyHelperText,
|
|
78
85
|
emptyLabel,
|
|
79
86
|
isLoading,
|
|
80
|
-
onCreateItem,
|
|
81
87
|
onSearchChange,
|
|
82
88
|
searchValue,
|
|
83
|
-
size
|
|
89
|
+
size,
|
|
90
|
+
children
|
|
84
91
|
}) }) })
|
|
85
92
|
]
|
|
86
93
|
})
|
|
87
94
|
});
|
|
88
95
|
});
|
|
89
96
|
BitkitSelect.displayName = "BitkitSelect";
|
|
97
|
+
var BitkitSelect_default = withSubComponents(BitkitSelect, { Action: BitkitSelectMenuAction });
|
|
90
98
|
//#endregion
|
|
91
|
-
export {
|
|
99
|
+
export { BitkitSelect_default as default };
|
|
92
100
|
|
|
93
101
|
//# sourceMappingURL=BitkitSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSelect.js","names":[],"sources":["../../../lib/components/BitkitSelect/BitkitSelect.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"BitkitSelect.js","names":[],"sources":["../../../lib/components/BitkitSelect/BitkitSelect.tsx"],"sourcesContent":["import { createListCollection } from '@chakra-ui/react/collection';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectRootProps, type SelectTriggerProps, useSelectContext } from '@chakra-ui/react/select';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { IconErrorCircleFilled, IconWarningYellow } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron.tsx';\nimport { withSubComponents } from '../../utilities/withSubComponents.ts';\nimport BitkitField, { type BitkitFieldProps } from '../BitkitField/BitkitField.tsx';\nimport BitkitSelectMenu, {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuItemProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu.tsx';\nimport BitkitSelectMenuAction, {\n type BitkitSelectMenuActionChild,\n} from '../BitkitSelectMenu/BitkitSelectMenuAction.tsx';\n\nexport type BitkitSelectTriggerProps = SelectTriggerProps;\n\nexport type BitkitSelectProps = Omit<BitkitFieldProps, 'children' | 'state'> & {\n children?: BitkitSelectMenuActionChild;\n defaultValue?: string;\n isLoading?: boolean;\n items: Array<BitkitSelectMenuItemProps>;\n onValueChange?: (newVal: string) => void;\n placeholder?: string;\n selectProps?: Omit<SelectRootProps, 'collection' | 'defaultValue' | 'onValueChange' | 'value'>;\n size?: 'md' | 'lg';\n state?: 'disabled' | 'error' | 'readOnly' | 'warning';\n triggerProps?: BitkitSelectTriggerProps;\n value?: string;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuEmptyStateProps;\n\ntype SelectValueProps = {\n placeholder?: string;\n size: BitkitSelectProps['size'];\n state?: BitkitSelectProps['state'];\n};\n\nconst SelectValue = ({ placeholder, state, size }: SelectValueProps) => {\n const select = useSelectContext();\n const items = select.selectedItems as Array<BitkitSelectMenuItemProps>;\n\n const Icon = items[0]?.icon;\n const label = items[0]?.label;\n\n const iconSize = size === 'md' ? '16' : '24';\n\n return items[0] ? (\n <Select.ValueText placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')}>\n {Icon && <Icon size={iconSize} flexShrink={0} />}\n <Text as=\"span\" overflow=\"hidden\" textOverflow=\"ellipsis\" whiteSpace=\"nowrap\" minWidth={0}>\n {label}\n </Text>\n </Select.ValueText>\n ) : (\n <Select.ValueText placeholder={placeholder ?? (state === 'readOnly' ? '(not selected)' : 'Select an option')} />\n );\n};\n\nconst BitkitSelect = forwardRef<HTMLDivElement, BitkitSelectProps>((props: BitkitSelectProps, ref) => {\n const {\n children,\n defaultValue,\n emptyHelperText,\n emptyLabel,\n isLoading,\n items,\n onSearchChange,\n onValueChange,\n searchValue,\n placeholder,\n selectProps,\n size,\n state,\n triggerProps,\n value,\n ...fieldProps\n } = props;\n\n const collection = createListCollection({\n items,\n groupBy: (item) => item.group || '',\n isItemDisabled: (item) => !!item.disabled,\n });\n\n const isInvalid = state === 'error' || !!fieldProps.errorText;\n\n return (\n <BitkitField ref={ref} state={state} {...fieldProps}>\n <Select.Root\n collection={collection}\n size={size}\n {...selectProps}\n defaultValue={defaultValue ? [defaultValue] : undefined}\n disabled={state === 'disabled'}\n hasStatusIcon={state === 'error' || state === 'warning'}\n invalid={isInvalid}\n onValueChange={(newVal) => onValueChange?.(newVal.value[0])}\n readOnly={state === 'readOnly'}\n // Bypass Zag's isScrollable(contentEl) gate — our Content is overflow:hidden flex\n // column, so the real scroll container is itemList. See BitkitMultiselect for why.\n scrollToIndexFn={({ getElement }) => getElement()?.scrollIntoView({ block: 'nearest' })}\n value={value ? [value] : undefined}\n >\n <Select.HiddenSelect />\n <Select.Control className=\"group\">\n <Select.Trigger {...triggerProps}>\n <SelectValue placeholder={placeholder} size={size} state={state} />\n </Select.Trigger>\n <Select.IndicatorGroup>\n {state === 'error' && (\n <Select.Indicator>\n <IconErrorCircleFilled size={size === 'lg' ? '24' : '16'} color=\"icon/negative\" />\n </Select.Indicator>\n )}\n {state === 'warning' && (\n <Select.Indicator>\n <IconWarningYellow size={size === 'lg' ? '24' : '16'} />\n </Select.Indicator>\n )}\n <Select.Indicator asChild>\n <AssetSelectChevron />\n </Select.Indicator>\n </Select.IndicatorGroup>\n </Select.Control>\n <Portal>\n <Select.Positioner>\n <BitkitSelectMenu\n collection={collection}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n isLoading={isLoading}\n onSearchChange={onSearchChange}\n searchValue={searchValue}\n size={size}\n >\n {children}\n </BitkitSelectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n </BitkitField>\n );\n});\n\nBitkitSelect.displayName = 'BitkitSelect';\n\nexport default withSubComponents(BitkitSelect, { Action: BitkitSelectMenuAction });\n"],"mappings":";;;;;;;;;;;;;;AA0CA,IAAM,eAAe,EAAE,aAAa,OAAO,WAA6B;CAEtE,MAAM,QADS,iBACD,EAAO;CAErB,MAAM,OAAO,MAAM,IAAI;CACvB,MAAM,QAAQ,MAAM,IAAI;CAExB,MAAM,WAAW,SAAS,OAAO,OAAO;CAExC,OAAO,MAAM,KACX,qBAAC,OAAO,WAAR;EAAkB,aAAa,gBAAgB,UAAU,aAAa,mBAAmB;YAAzF,CACG,QAAQ,oBAAC,MAAD;GAAM,MAAM;GAAU,YAAY;EAAI,CAAA,GAC/C,oBAAC,MAAD;GAAM,IAAG;GAAO,UAAS;GAAS,cAAa;GAAW,YAAW;GAAS,UAAU;aACrF;EACG,CAAA,CACU;MAElB,oBAAC,OAAO,WAAR,EAAkB,aAAa,gBAAgB,UAAU,aAAa,mBAAmB,oBAAsB,CAAA;AAEnH;AAEA,IAAM,eAAe,YAA+C,OAA0B,QAAQ;CACpG,MAAM,EACJ,UACA,cACA,iBACA,YACA,WACA,OACA,gBACA,eACA,aACA,aACA,aACA,MACA,OACA,cACA,OACA,GAAG,eACD;CAEJ,MAAM,aAAa,qBAAqB;EACtC;EACA,UAAU,SAAS,KAAK,SAAS;EACjC,iBAAiB,SAAS,CAAC,CAAC,KAAK;CACnC,CAAC;CAED,MAAM,YAAY,UAAU,WAAW,CAAC,CAAC,WAAW;CAEpD,OACE,oBAAC,aAAD;EAAkB;EAAY;EAAO,GAAI;YACvC,qBAAC,OAAO,MAAR;GACc;GACN;GACN,GAAI;GACJ,cAAc,eAAe,CAAC,YAAY,IAAI,KAAA;GAC9C,UAAU,UAAU;GACpB,eAAe,UAAU,WAAW,UAAU;GAC9C,SAAS;GACT,gBAAgB,WAAW,gBAAgB,OAAO,MAAM,EAAE;GAC1D,UAAU,UAAU;GAGpB,kBAAkB,EAAE,iBAAiB,WAAW,GAAG,eAAe,EAAE,OAAO,UAAU,CAAC;GACtF,OAAO,QAAQ,CAAC,KAAK,IAAI,KAAA;aAb3B;IAeE,oBAAC,OAAO,cAAR,CAAsB,CAAA;IACtB,qBAAC,OAAO,SAAR;KAAgB,WAAU;eAA1B,CACE,oBAAC,OAAO,SAAR;MAAgB,GAAI;gBAClB,oBAAC,aAAD;OAA0B;OAAmB;OAAa;MAAQ,CAAA;KACpD,CAAA,GAChB,qBAAC,OAAO,gBAAR,EAAA,UAAA;MACG,UAAU,WACT,oBAAC,OAAO,WAAR,EAAA,UACE,oBAAC,uBAAD;OAAuB,MAAM,SAAS,OAAO,OAAO;OAAM,OAAM;MAAiB,CAAA,EACjE,CAAA;MAEnB,UAAU,aACT,oBAAC,OAAO,WAAR,EAAA,UACE,oBAAC,mBAAD,EAAmB,MAAM,SAAS,OAAO,OAAO,KAAO,CAAA,EACvC,CAAA;MAEpB,oBAAC,OAAO,WAAR;OAAkB,SAAA;iBAChB,oBAAC,oBAAD,CAAqB,CAAA;MACL,CAAA;KACG,EAAA,CAAA,CACT;;IAChB,oBAAC,QAAD,EAAA,UACE,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;KACc;KACK;KACL;KACD;KACK;KACH;KACP;KAEL;IACe,CAAA,EACD,CAAA,EACb,CAAA;GACG;;CACF,CAAA;AAEjB,CAAC;AAED,aAAa,cAAc;AAE3B,IAAA,uBAAe,kBAAkB,cAAc,EAAE,QAAQ,uBAAuB,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ListCollection } from '@chakra-ui/react/collection';
|
|
2
2
|
import { SelectContentProps } from '@chakra-ui/react/select';
|
|
3
3
|
import { BitkitIconComponent } from '../../icons';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onCreateItem?: () => void;
|
|
7
|
-
};
|
|
4
|
+
import { BitkitSelectMenuActionChild } from './BitkitSelectMenuAction';
|
|
5
|
+
export { type BitkitSelectMenuActionProps } from './BitkitSelectMenuAction';
|
|
8
6
|
export type BitkitSelectMenuSearchProps = {
|
|
9
7
|
/** When provided, a search input is rendered above the menu items. `searchValue` is required alongside. */
|
|
10
8
|
onSearchChange?: (searchText: string) => void;
|
|
@@ -25,6 +23,7 @@ export type BitkitSelectMenuEmptyStateProps = {
|
|
|
25
23
|
emptyHelperText?: string;
|
|
26
24
|
};
|
|
27
25
|
export type BitkitSelectMenuProps = {
|
|
26
|
+
children?: BitkitSelectMenuActionChild;
|
|
28
27
|
collection: ListCollection<BitkitSelectMenuItemProps>;
|
|
29
28
|
/** Forwarded to the underlying Select/Combobox.Content. Kept for internal callers
|
|
30
29
|
* (e.g. BitkitCalendar's in-grid selects that need to tweak max-height / width). The
|
|
@@ -33,8 +32,9 @@ export type BitkitSelectMenuProps = {
|
|
|
33
32
|
isLoading?: boolean;
|
|
34
33
|
size?: 'md' | 'lg';
|
|
35
34
|
variant?: 'select' | 'combobox';
|
|
36
|
-
} &
|
|
35
|
+
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps;
|
|
37
36
|
declare const BitkitSelectMenu: import('react').ForwardRefExoticComponent<{
|
|
37
|
+
children?: BitkitSelectMenuActionChild;
|
|
38
38
|
collection: ListCollection<BitkitSelectMenuItemProps>;
|
|
39
39
|
/** Forwarded to the underlying Select/Combobox.Content. Kept for internal callers
|
|
40
40
|
* (e.g. BitkitCalendar's in-grid selects that need to tweak max-height / width). The
|
|
@@ -43,5 +43,5 @@ declare const BitkitSelectMenu: import('react').ForwardRefExoticComponent<{
|
|
|
43
43
|
isLoading?: boolean;
|
|
44
44
|
size?: "md" | "lg";
|
|
45
45
|
variant?: "select" | "combobox";
|
|
46
|
-
} &
|
|
46
|
+
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
47
47
|
export default BitkitSelectMenu;
|
|
@@ -11,7 +11,7 @@ import { Select } from "@chakra-ui/react/select";
|
|
|
11
11
|
import { Combobox } from "@chakra-ui/react/combobox";
|
|
12
12
|
//#region lib/components/BitkitSelectMenu/BitkitSelectMenu.tsx
|
|
13
13
|
var BitkitSelectMenu = forwardRef((props, ref) => {
|
|
14
|
-
const { collection, variant = "select", size, ...shellProps } = props;
|
|
14
|
+
const { children, collection, variant = "select", size, ...shellProps } = props;
|
|
15
15
|
const NS = variant === "combobox" ? Combobox : Select;
|
|
16
16
|
const styles = useSlotRecipe({ key: "select" })({ size });
|
|
17
17
|
const iconSize = size === "md" ? "16" : "24";
|
|
@@ -28,7 +28,8 @@ var BitkitSelectMenu = forwardRef((props, ref) => {
|
|
|
28
28
|
}, item.value),
|
|
29
29
|
size,
|
|
30
30
|
styles,
|
|
31
|
-
...shellProps
|
|
31
|
+
...shellProps,
|
|
32
|
+
children
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
BitkitSelectMenu.displayName = "BitkitSelectMenu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSelectMenu.js","names":[],"sources":["../../../lib/components/BitkitSelectMenu/BitkitSelectMenu.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { type ListCollection } from '@chakra-ui/react/collection';\nimport { Combobox } from '@chakra-ui/react/combobox';\nimport { Select, type SelectContentProps } from '@chakra-ui/react/select';\nimport { Spinner } from '@chakra-ui/react/spinner';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent, IconCheck } from '../../icons';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport { SelectMenuShell } from './SelectMenuShell';\n\nexport type
|
|
1
|
+
{"version":3,"file":"BitkitSelectMenu.js","names":[],"sources":["../../../lib/components/BitkitSelectMenu/BitkitSelectMenu.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { type ListCollection } from '@chakra-ui/react/collection';\nimport { Combobox } from '@chakra-ui/react/combobox';\nimport { Select, type SelectContentProps } from '@chakra-ui/react/select';\nimport { Spinner } from '@chakra-ui/react/spinner';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent, IconCheck } from '../../icons';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport { type BitkitSelectMenuActionChild } from './BitkitSelectMenuAction';\nimport { SelectMenuShell } from './SelectMenuShell';\n\nexport { type BitkitSelectMenuActionProps } from './BitkitSelectMenuAction';\n\nexport type BitkitSelectMenuSearchProps = {\n /** When provided, a search input is rendered above the menu items. `searchValue` is required alongside. */\n onSearchChange?: (searchText: string) => void;\n searchValue?: string;\n};\n\nexport type BitkitSelectMenuItemProps = {\n value: string;\n label: string;\n group?: string;\n icon?: BitkitIconComponent;\n avatar?: string;\n helperText?: string;\n disabled?: boolean;\n loading?: boolean;\n};\n\nexport type BitkitSelectMenuEmptyStateProps = {\n emptyLabel?: string;\n emptyHelperText?: string;\n};\n\nexport type BitkitSelectMenuProps = {\n children?: BitkitSelectMenuActionChild;\n collection: ListCollection<BitkitSelectMenuItemProps>;\n /** Forwarded to the underlying Select/Combobox.Content. Kept for internal callers\n * (e.g. BitkitCalendar's in-grid selects that need to tweak max-height / width). The\n * public components (BitkitSelect, BitkitCombobox) do not expose this escape hatch. */\n contentProps?: SelectContentProps;\n isLoading?: boolean;\n size?: 'md' | 'lg';\n variant?: 'select' | 'combobox';\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuEmptyStateProps;\n\nconst BitkitSelectMenu = forwardRef<HTMLDivElement, BitkitSelectMenuProps>((props, ref) => {\n const { children, collection, variant = 'select', size, ...shellProps } = props;\n const NS = variant === 'combobox' ? Combobox : Select;\n const recipe = useSlotRecipe({ key: 'select' });\n const styles = recipe({ size });\n const iconSize = size === 'md' ? '16' : '24';\n\n return (\n <SelectMenuShell\n NS={NS}\n collection={collection}\n contentRef={ref}\n iconSize={iconSize}\n renderItem={(item) => <SelectMenuItem key={item.value} NS={NS} item={item} iconSize={iconSize} styles={styles} />}\n size={size}\n styles={styles}\n {...shellProps}\n >\n {children}\n </SelectMenuShell>\n );\n});\n\nBitkitSelectMenu.displayName = 'BitkitSelectMenu';\n\ntype SelectMenuItemRenderProps = {\n NS: typeof Select | typeof Combobox;\n item: BitkitSelectMenuItemProps;\n iconSize: '16' | '24';\n styles: Record<string, SystemStyleObject>;\n};\n\nconst SelectMenuItem = ({ NS, item, iconSize, styles }: SelectMenuItemRenderProps) => {\n const Icon = item.icon;\n\n if (item.loading) {\n // Rendered as a plain Box, not NS.Item — Zag's state machine won't track it as\n // an option, so keyboard nav skips it and it can't be selected.\n return (\n <Box css={styles.item}>\n <Spinner variant=\"purple\" css={styles.itemLoading} />\n <Text css={styles.itemLoadingLabel}>Loading...</Text>\n </Box>\n );\n }\n\n return (\n <NS.Item css={styles.item} item={item}>\n {item.avatar && (\n <Box data-slot=\"avatar\" css={{ '[data-disabled] &': { opacity: 0.5 } }}>\n <BitkitAvatar variant=\"image\" src={item.avatar} name={item.label} size={iconSize === '24' ? '32' : '24'} />\n </Box>\n )}\n <Box css={styles.itemContent}>\n <Box display=\"flex\" alignItems=\"center\" gap=\"8\">\n {Icon && !item.avatar && <Icon color=\"icon/primary\" size={iconSize} />}\n <Text css={styles.itemLabel}>{item.label}</Text>\n </Box>\n {item.helperText && <Text css={styles.itemHelperText}>{item.helperText}</Text>}\n </Box>\n <NS.ItemIndicator asChild>\n <IconCheck size={iconSize} css={styles.itemIndicator} />\n </NS.ItemIndicator>\n </NS.Item>\n );\n};\n\nexport default BitkitSelectMenu;\n"],"mappings":";;;;;;;;;;;;AAmDA,IAAM,mBAAmB,YAAmD,OAAO,QAAQ;CACzF,MAAM,EAAE,UAAU,YAAY,UAAU,UAAU,MAAM,GAAG,eAAe;CAC1E,MAAM,KAAK,YAAY,aAAa,WAAW;CAE/C,MAAM,SADS,cAAc,EAAE,KAAK,SAAS,CAC9B,EAAO,EAAE,KAAK,CAAC;CAC9B,MAAM,WAAW,SAAS,OAAO,OAAO;CAExC,OACE,oBAAC,iBAAD;EACM;EACQ;EACZ,YAAY;EACF;EACV,aAAa,SAAS,oBAAC,gBAAD;GAAqC;GAAU;GAAgB;GAAkB;EAAS,GAArE,KAAK,KAAgE;EAC1G;EACE;EACR,GAAI;EAEH;CACc,CAAA;AAErB,CAAC;AAED,iBAAiB,cAAc;AAS/B,IAAM,kBAAkB,EAAE,IAAI,MAAM,UAAU,aAAwC;CACpF,MAAM,OAAO,KAAK;CAElB,IAAI,KAAK,SAGP,OACE,qBAAC,KAAD;EAAK,KAAK,OAAO;YAAjB,CACE,oBAAC,SAAD;GAAS,SAAQ;GAAS,KAAK,OAAO;EAAc,CAAA,GACpD,oBAAC,MAAD;GAAM,KAAK,OAAO;aAAkB;EAAgB,CAAA,CACjD;;CAIT,OACE,qBAAC,GAAG,MAAJ;EAAS,KAAK,OAAO;EAAY;YAAjC;GACG,KAAK,UACJ,oBAAC,KAAD;IAAK,aAAU;IAAS,KAAK,EAAE,qBAAqB,EAAE,SAAS,GAAI,EAAE;cACnE,oBAAC,cAAD;KAAc,SAAQ;KAAQ,KAAK,KAAK;KAAQ,MAAM,KAAK;KAAO,MAAM,aAAa,OAAO,OAAO;IAAO,CAAA;GACvG,CAAA;GAEP,qBAAC,KAAD;IAAK,KAAK,OAAO;cAAjB,CACE,qBAAC,KAAD;KAAK,SAAQ;KAAO,YAAW;KAAS,KAAI;eAA5C,CACG,QAAQ,CAAC,KAAK,UAAU,oBAAC,MAAD;MAAM,OAAM;MAAe,MAAM;KAAW,CAAA,GACrE,oBAAC,MAAD;MAAM,KAAK,OAAO;gBAAY,KAAK;KAAY,CAAA,CAC5C;QACJ,KAAK,cAAc,oBAAC,MAAD;KAAM,KAAK,OAAO;eAAiB,KAAK;IAAiB,CAAA,CAC1E;;GACL,oBAAC,GAAG,eAAJ;IAAkB,SAAA;cAChB,oBAAC,WAAD;KAAW,MAAM;KAAU,KAAK,OAAO;IAAgB,CAAA;GACvC,CAAA;EACX;;AAEb"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SystemStyleObject } from '@chakra-ui/react/styled-system';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { BitkitIconComponent } from '../../icons';
|
|
4
|
+
type BitkitSelectMenuActionCommonProps = {
|
|
5
|
+
icon: BitkitIconComponent;
|
|
6
|
+
label: string;
|
|
7
|
+
};
|
|
8
|
+
export type BitkitSelectMenuActionAsButtonProps = BitkitSelectMenuActionCommonProps & {
|
|
9
|
+
href?: undefined;
|
|
10
|
+
isExternal?: undefined;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
export type BitkitSelectMenuActionAsAnchorProps = BitkitSelectMenuActionCommonProps & {
|
|
14
|
+
href: string;
|
|
15
|
+
isExternal?: boolean;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
rel?: string;
|
|
18
|
+
target?: string;
|
|
19
|
+
};
|
|
20
|
+
export type BitkitSelectMenuActionProps = BitkitSelectMenuActionAsButtonProps | BitkitSelectMenuActionAsAnchorProps;
|
|
21
|
+
export type BitkitSelectMenuActionChild = ReactElement<BitkitSelectMenuActionProps> | false | null;
|
|
22
|
+
type SelectMenuShellContext = {
|
|
23
|
+
iconSize: '16' | '24';
|
|
24
|
+
styles: Record<string, SystemStyleObject>;
|
|
25
|
+
};
|
|
26
|
+
declare const SelectMenuShellContextProvider: import('react').Provider<SelectMenuShellContext>;
|
|
27
|
+
export { SelectMenuShellContextProvider };
|
|
28
|
+
declare const BitkitSelectMenuAction: {
|
|
29
|
+
(props: BitkitSelectMenuActionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export default BitkitSelectMenuAction;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Box } from "@chakra-ui/react/box";
|
|
2
|
+
import { chakra } from "@chakra-ui/react/styled-system";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { createContext } from "@chakra-ui/react";
|
|
5
|
+
//#region lib/components/BitkitSelectMenu/BitkitSelectMenuAction.tsx
|
|
6
|
+
var [SelectMenuShellContextProvider, useSelectMenuShellContext] = createContext({
|
|
7
|
+
name: "SelectMenuShellContext",
|
|
8
|
+
hookName: "useSelectMenuShellContext",
|
|
9
|
+
providerName: "<BitkitSelectMenu />, <BitkitMultiselectMenu />, <BitkitSelect />, <BitkitMultiselect />, or <BitkitCombobox />"
|
|
10
|
+
});
|
|
11
|
+
var stopMenuSelectionKeys = (event) => {
|
|
12
|
+
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
13
|
+
};
|
|
14
|
+
var BitkitSelectMenuAction = (props) => {
|
|
15
|
+
const { href, icon: Icon, label, onClick } = props;
|
|
16
|
+
const { iconSize, styles } = useSelectMenuShellContext();
|
|
17
|
+
if (href !== void 0) {
|
|
18
|
+
const { isExternal, rel, target } = props;
|
|
19
|
+
const effectiveTarget = isExternal ? "_blank" : target;
|
|
20
|
+
const effectiveRel = isExternal ? rel ? `${rel} noreferrer noopener` : "noreferrer noopener" : rel;
|
|
21
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
22
|
+
css: styles.actionContainer,
|
|
23
|
+
children: /* @__PURE__ */ jsxs(chakra.a, {
|
|
24
|
+
href,
|
|
25
|
+
target: effectiveTarget,
|
|
26
|
+
rel: effectiveRel,
|
|
27
|
+
css: styles.action,
|
|
28
|
+
onClick,
|
|
29
|
+
onKeyDown: stopMenuSelectionKeys,
|
|
30
|
+
children: [/* @__PURE__ */ jsx(Icon, { size: iconSize }), label]
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
35
|
+
css: styles.actionContainer,
|
|
36
|
+
children: /* @__PURE__ */ jsxs(chakra.button, {
|
|
37
|
+
type: "button",
|
|
38
|
+
css: styles.action,
|
|
39
|
+
onClick,
|
|
40
|
+
onKeyDown: stopMenuSelectionKeys,
|
|
41
|
+
children: [/* @__PURE__ */ jsx(Icon, { size: iconSize }), label]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
BitkitSelectMenuAction.displayName = "BitkitSelectMenu.Action";
|
|
46
|
+
//#endregion
|
|
47
|
+
export { SelectMenuShellContextProvider, BitkitSelectMenuAction as default };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=BitkitSelectMenuAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitkitSelectMenuAction.js","names":[],"sources":["../../../lib/components/BitkitSelectMenu/BitkitSelectMenuAction.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Box } from '@chakra-ui/react/box';\nimport { chakra, type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { type KeyboardEvent as ReactKeyboardEvent, type ReactElement } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\n\ntype BitkitSelectMenuActionCommonProps = {\n icon: BitkitIconComponent;\n label: string;\n};\n\nexport type BitkitSelectMenuActionAsButtonProps = BitkitSelectMenuActionCommonProps & {\n href?: undefined;\n isExternal?: undefined;\n onClick: () => void;\n};\n\nexport type BitkitSelectMenuActionAsAnchorProps = BitkitSelectMenuActionCommonProps & {\n href: string;\n isExternal?: boolean;\n onClick?: () => void;\n rel?: string;\n target?: string;\n};\n\nexport type BitkitSelectMenuActionProps = BitkitSelectMenuActionAsButtonProps | BitkitSelectMenuActionAsAnchorProps;\n\nexport type BitkitSelectMenuActionChild = ReactElement<BitkitSelectMenuActionProps> | false | null;\n\ntype SelectMenuShellContext = {\n iconSize: '16' | '24';\n styles: Record<string, SystemStyleObject>;\n};\n\nconst [SelectMenuShellContextProvider, useSelectMenuShellContext] = createContext<SelectMenuShellContext>({\n name: 'SelectMenuShellContext',\n hookName: 'useSelectMenuShellContext',\n providerName:\n '<BitkitSelectMenu />, <BitkitMultiselectMenu />, <BitkitSelect />, <BitkitMultiselect />, or <BitkitCombobox />',\n});\n\nexport { SelectMenuShellContextProvider };\n\nconst stopMenuSelectionKeys = (event: ReactKeyboardEvent) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.stopPropagation();\n }\n};\n\nconst BitkitSelectMenuAction = (props: BitkitSelectMenuActionProps) => {\n const { href, icon: Icon, label, onClick } = props;\n const { iconSize, styles } = useSelectMenuShellContext();\n\n if (href !== undefined) {\n const { isExternal, rel, target } = props;\n const effectiveTarget = isExternal ? '_blank' : target;\n const effectiveRel = isExternal ? (rel ? `${rel} noreferrer noopener` : 'noreferrer noopener') : rel;\n\n return (\n <Box css={styles.actionContainer}>\n <chakra.a\n href={href}\n target={effectiveTarget}\n rel={effectiveRel}\n css={styles.action}\n onClick={onClick}\n onKeyDown={stopMenuSelectionKeys}\n >\n <Icon size={iconSize} />\n {label}\n </chakra.a>\n </Box>\n );\n }\n\n return (\n <Box css={styles.actionContainer}>\n <chakra.button type=\"button\" css={styles.action} onClick={onClick} onKeyDown={stopMenuSelectionKeys}>\n <Icon size={iconSize} />\n {label}\n </chakra.button>\n </Box>\n );\n};\n\nBitkitSelectMenuAction.displayName = 'BitkitSelectMenu.Action';\n\nexport default BitkitSelectMenuAction;\n"],"mappings":";;;;;AAoCA,IAAM,CAAC,gCAAgC,6BAA6B,cAAsC;CACxG,MAAM;CACN,UAAU;CACV,cACE;AACJ,CAAC;AAID,IAAM,yBAAyB,UAA8B;CAC3D,IAAI,MAAM,QAAQ,WAAW,MAAM,QAAQ,KACzC,MAAM,gBAAgB;AAE1B;AAEA,IAAM,0BAA0B,UAAuC;CACrE,MAAM,EAAE,MAAM,MAAM,MAAM,OAAO,YAAY;CAC7C,MAAM,EAAE,UAAU,WAAW,0BAA0B;CAEvD,IAAI,SAAS,KAAA,GAAW;EACtB,MAAM,EAAE,YAAY,KAAK,WAAW;EACpC,MAAM,kBAAkB,aAAa,WAAW;EAChD,MAAM,eAAe,aAAc,MAAM,GAAG,IAAI,wBAAwB,wBAAyB;EAEjG,OACE,oBAAC,KAAD;GAAK,KAAK,OAAO;aACf,qBAAC,OAAO,GAAR;IACQ;IACN,QAAQ;IACR,KAAK;IACL,KAAK,OAAO;IACH;IACT,WAAW;cANb,CAQE,oBAAC,MAAD,EAAM,MAAM,SAAW,CAAA,GACtB,KACO;;EACP,CAAA;CAET;CAEA,OACE,oBAAC,KAAD;EAAK,KAAK,OAAO;YACf,qBAAC,OAAO,QAAR;GAAe,MAAK;GAAS,KAAK,OAAO;GAAiB;GAAS,WAAW;aAA9E,CACE,oBAAC,MAAD,EAAM,MAAM,SAAW,CAAA,GACtB,KACY;;CACZ,CAAA;AAET;AAEA,uBAAuB,cAAc"}
|
|
@@ -3,17 +3,20 @@ import { Combobox } from '@chakra-ui/react/combobox';
|
|
|
3
3
|
import { Select, SelectContentProps } from '@chakra-ui/react/select';
|
|
4
4
|
import { SystemStyleObject } from '@chakra-ui/react/styled-system';
|
|
5
5
|
import { ReactNode, Ref } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { BitkitSelectMenuEmptyStateProps, BitkitSelectMenuSearchProps } from './BitkitSelectMenu';
|
|
7
|
+
import { BitkitSelectMenuActionChild } from './BitkitSelectMenuAction';
|
|
7
8
|
/**
|
|
8
9
|
* Internal shared shell for BitkitSelectMenu and BitkitMultiselectMenu.
|
|
9
|
-
* Handles Content wrapper, search, loading, empty state, groups, and
|
|
10
|
-
* the caller only provides per-item rendering via renderItem
|
|
10
|
+
* Handles Content wrapper, search, loading, empty state, groups, and the action slot —
|
|
11
|
+
* the caller only provides per-item rendering via renderItem and any sub-components
|
|
12
|
+
* (e.g. <BitkitSelectMenu.Action />) via children.
|
|
11
13
|
*/
|
|
12
14
|
export type SelectMenuShellProps<T extends {
|
|
13
15
|
value: string;
|
|
14
16
|
group?: string;
|
|
15
17
|
}> = {
|
|
16
18
|
NS: typeof Select | typeof Combobox;
|
|
19
|
+
children?: BitkitSelectMenuActionChild;
|
|
17
20
|
collection: ListCollection<T>;
|
|
18
21
|
contentProps?: SelectContentProps;
|
|
19
22
|
contentRef?: Ref<HTMLDivElement>;
|
|
@@ -22,8 +25,8 @@ export type SelectMenuShellProps<T extends {
|
|
|
22
25
|
renderItem: (item: T) => ReactNode;
|
|
23
26
|
size?: 'md' | 'lg';
|
|
24
27
|
styles: Record<string, SystemStyleObject>;
|
|
25
|
-
} &
|
|
28
|
+
} & BitkitSelectMenuSearchProps & BitkitSelectMenuEmptyStateProps;
|
|
26
29
|
export declare const SelectMenuShell: <T extends {
|
|
27
30
|
value: string;
|
|
28
31
|
group?: string;
|
|
29
|
-
}>({ NS, collection, contentProps, contentRef,
|
|
32
|
+
}>({ NS, children, collection, contentProps, contentRef, emptyHelperText, emptyLabel, iconSize, isLoading, onSearchChange, renderItem, searchValue, size, styles, }: SelectMenuShellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,88 +1,78 @@
|
|
|
1
1
|
import IconCross from "../../icons/IconCross.js";
|
|
2
2
|
import IconMagnifier from "../../icons/IconMagnifier.js";
|
|
3
|
-
import IconPlus from "../../icons/IconPlus.js";
|
|
4
3
|
import BitkitGroupHeading from "../BitkitGroupHeading/BitkitGroupHeading.js";
|
|
4
|
+
import { SelectMenuShellContextProvider } from "./BitkitSelectMenuAction.js";
|
|
5
5
|
import { Box } from "@chakra-ui/react/box";
|
|
6
6
|
import { chakra } from "@chakra-ui/react/styled-system";
|
|
7
7
|
import { Text } from "@chakra-ui/react/text";
|
|
8
|
+
import { isValidElement } from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { Spinner } from "@chakra-ui/react/spinner";
|
|
10
11
|
//#region lib/components/BitkitSelectMenu/SelectMenuShell.tsx
|
|
11
|
-
var SelectMenuShell = ({ NS, collection, contentProps, contentRef,
|
|
12
|
+
var SelectMenuShell = ({ NS, children, collection, contentProps, contentRef, emptyHelperText, emptyLabel = "No matching options", iconSize, isLoading = false, onSearchChange, renderItem, searchValue, size, styles }) => {
|
|
12
13
|
const isEmpty = collection.size === 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
})
|
|
74
|
-
]
|
|
14
|
+
const hasAction = isValidElement(children);
|
|
15
|
+
return /* @__PURE__ */ jsx(SelectMenuShellContextProvider, {
|
|
16
|
+
value: {
|
|
17
|
+
iconSize,
|
|
18
|
+
styles
|
|
19
|
+
},
|
|
20
|
+
children: /* @__PURE__ */ jsxs(NS.Content, {
|
|
21
|
+
css: styles.content,
|
|
22
|
+
ref: contentRef,
|
|
23
|
+
...contentProps,
|
|
24
|
+
children: [
|
|
25
|
+
!onSearchChange && hasAction && /* @__PURE__ */ jsx("span", {
|
|
26
|
+
"data-autofocus": "",
|
|
27
|
+
tabIndex: -1,
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}),
|
|
30
|
+
onSearchChange && /* @__PURE__ */ jsx(SelectMenuSearch, {
|
|
31
|
+
iconSize,
|
|
32
|
+
styles,
|
|
33
|
+
value: searchValue ?? "",
|
|
34
|
+
onSearchChange
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
37
|
+
css: styles.itemList,
|
|
38
|
+
children: [
|
|
39
|
+
isLoading && /* @__PURE__ */ jsxs(Box, {
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
gap: "12",
|
|
43
|
+
justifyContent: "left",
|
|
44
|
+
css: styles.item,
|
|
45
|
+
children: [/* @__PURE__ */ jsx(Spinner, { variant: "purple" }), /* @__PURE__ */ jsx(Text, {
|
|
46
|
+
color: "text/secondary",
|
|
47
|
+
textStyle: size === "md" ? "body/md/regular" : "body/lg/regular",
|
|
48
|
+
children: "Loading..."
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
!isLoading && isEmpty && /* @__PURE__ */ jsxs(Box, {
|
|
52
|
+
css: styles.emptyState,
|
|
53
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
54
|
+
css: styles.itemLabel,
|
|
55
|
+
children: emptyLabel
|
|
56
|
+
}), emptyHelperText && /* @__PURE__ */ jsx(Text, {
|
|
57
|
+
css: styles.itemHelperText,
|
|
58
|
+
children: emptyHelperText
|
|
59
|
+
})]
|
|
60
|
+
}),
|
|
61
|
+
!isLoading && !isEmpty && collection.group().map(([type, group]) => /* @__PURE__ */ jsxs(NS.ItemGroup, { children: [type && /* @__PURE__ */ jsx(NS.ItemGroupLabel, {
|
|
62
|
+
asChild: true,
|
|
63
|
+
children: /* @__PURE__ */ jsx(BitkitGroupHeading, {
|
|
64
|
+
label: type,
|
|
65
|
+
paddingBlock: "12",
|
|
66
|
+
paddingInline: "16"
|
|
67
|
+
})
|
|
68
|
+
}), group.map(renderItem)] }, type))
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
children
|
|
72
|
+
]
|
|
73
|
+
})
|
|
75
74
|
});
|
|
76
75
|
};
|
|
77
|
-
/**
|
|
78
|
-
* Zag's Select.Content keyDown handler fires ITEM.CLICK and preventDefaults on Enter/Space
|
|
79
|
-
* regardless of which descendant is focused. For the create row (a real <button> sibling of
|
|
80
|
-
* the items list), that hijacks its native activation. Stopping propagation at the element
|
|
81
|
-
* keeps its own onClick firing via the browser's native keyboard-activation path.
|
|
82
|
-
*/
|
|
83
|
-
var stopMenuSelectionKeys = (event) => {
|
|
84
|
-
if (event.key === "Enter" || event.key === " ") event.stopPropagation();
|
|
85
|
-
};
|
|
86
76
|
var SelectMenuSearch = ({ iconSize, onSearchChange, styles, value }) => /* @__PURE__ */ jsxs(Box, {
|
|
87
77
|
css: styles.searchInputGroup,
|
|
88
78
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMenuShell.js","names":[],"sources":["../../../lib/components/BitkitSelectMenu/SelectMenuShell.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { type ListCollection } from '@chakra-ui/react/collection';\nimport { type Combobox } from '@chakra-ui/react/combobox';\nimport { type Select, type SelectContentProps } from '@chakra-ui/react/select';\nimport { Spinner } from '@chakra-ui/react/spinner';\nimport { chakra, type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { type ChangeEvent,
|
|
1
|
+
{"version":3,"file":"SelectMenuShell.js","names":[],"sources":["../../../lib/components/BitkitSelectMenu/SelectMenuShell.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { type ListCollection } from '@chakra-ui/react/collection';\nimport { type Combobox } from '@chakra-ui/react/combobox';\nimport { type Select, type SelectContentProps } from '@chakra-ui/react/select';\nimport { Spinner } from '@chakra-ui/react/spinner';\nimport { chakra, type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { type ChangeEvent, isValidElement, type ReactNode, type Ref } from 'react';\n\nimport { IconCross, IconMagnifier } from '../../icons';\nimport BitkitGroupHeading from '../BitkitGroupHeading/BitkitGroupHeading';\nimport { type BitkitSelectMenuEmptyStateProps, type BitkitSelectMenuSearchProps } from './BitkitSelectMenu';\nimport { type BitkitSelectMenuActionChild, SelectMenuShellContextProvider } from './BitkitSelectMenuAction';\n\n/**\n * Internal shared shell for BitkitSelectMenu and BitkitMultiselectMenu.\n * Handles Content wrapper, search, loading, empty state, groups, and the action slot —\n * the caller only provides per-item rendering via renderItem and any sub-components\n * (e.g. <BitkitSelectMenu.Action />) via children.\n */\nexport type SelectMenuShellProps<T extends { value: string; group?: string }> = {\n NS: typeof Select | typeof Combobox;\n children?: BitkitSelectMenuActionChild;\n collection: ListCollection<T>;\n contentProps?: SelectContentProps;\n contentRef?: Ref<HTMLDivElement>;\n iconSize: '16' | '24';\n isLoading?: boolean;\n renderItem: (item: T) => ReactNode;\n size?: 'md' | 'lg';\n styles: Record<string, SystemStyleObject>;\n} & BitkitSelectMenuSearchProps &\n BitkitSelectMenuEmptyStateProps;\n\nexport const SelectMenuShell = <T extends { value: string; group?: string }>({\n NS,\n children,\n collection,\n contentProps,\n contentRef,\n emptyHelperText,\n emptyLabel = 'No matching options',\n iconSize,\n isLoading = false,\n onSearchChange,\n renderItem,\n searchValue,\n size,\n styles,\n}: SelectMenuShellProps<T>) => {\n const isEmpty = collection.size === 0;\n const hasAction = isValidElement(children);\n\n return (\n <SelectMenuShellContextProvider value={{ iconSize, styles }}>\n <NS.Content css={styles.content} ref={contentRef} {...contentProps}>\n {/*\n Without a search input, Zag's getInitialFocus (see @zag-js/dom-query) picks the first\n tabbable descendant as the menu's initial focus target — which would be the action\n slot, visually confusing. A hidden [data-autofocus] span wins over tabbables in\n getInitialFocus's querySelector, so we focus an invisible element instead and Zag's\n aria-activedescendant drives the highlight like a normal Select would.\n */}\n {!onSearchChange && hasAction && <span data-autofocus=\"\" tabIndex={-1} aria-hidden=\"true\" />}\n {onSearchChange && (\n <SelectMenuSearch\n iconSize={iconSize}\n styles={styles}\n value={searchValue ?? ''}\n onSearchChange={onSearchChange}\n />\n )}\n <Box css={styles.itemList}>\n {isLoading && (\n <Box display=\"flex\" alignItems=\"center\" gap=\"12\" justifyContent=\"left\" css={styles.item}>\n <Spinner variant=\"purple\" />\n <Text color=\"text/secondary\" textStyle={size === 'md' ? 'body/md/regular' : 'body/lg/regular'}>\n Loading...\n </Text>\n </Box>\n )}\n {!isLoading && isEmpty && (\n <Box css={styles.emptyState}>\n <Text css={styles.itemLabel}>{emptyLabel}</Text>\n {emptyHelperText && <Text css={styles.itemHelperText}>{emptyHelperText}</Text>}\n </Box>\n )}\n {!isLoading &&\n !isEmpty &&\n collection.group().map(([type, group]) => (\n <NS.ItemGroup key={type}>\n {type && (\n <NS.ItemGroupLabel asChild>\n <BitkitGroupHeading label={type} paddingBlock=\"12\" paddingInline=\"16\" />\n </NS.ItemGroupLabel>\n )}\n {group.map(renderItem)}\n </NS.ItemGroup>\n ))}\n </Box>\n {children}\n </NS.Content>\n </SelectMenuShellContextProvider>\n );\n};\n\ntype SelectMenuSearchProps = {\n iconSize: '16' | '24';\n onSearchChange: (searchText: string) => void;\n styles: Record<string, SystemStyleObject>;\n value: string;\n};\n\nconst SelectMenuSearch = ({ iconSize, onSearchChange, styles, value }: SelectMenuSearchProps) => (\n <Box css={styles.searchInputGroup}>\n <IconMagnifier size={iconSize} color=\"icon/tertiary\" />\n <chakra.input\n aria-label=\"Search\"\n css={styles.searchInput}\n placeholder=\"Search...\"\n value={value}\n onChange={(event: ChangeEvent<HTMLInputElement>) => onSearchChange(event.target.value)}\n onKeyDown={(event) => {\n // Zag's Select.Content keyDown listener fires ITEM.CLICK + preventDefault on Space\n // regardless of which descendant is focused. That would eat the space before the\n // input can type it. Enter is left alone so \"type-then-Enter-to-select\" still works.\n if (event.key === ' ') event.stopPropagation();\n }}\n />\n {value && (\n <chakra.button\n type=\"button\"\n css={styles.searchClear}\n aria-label=\"Clear search\"\n onClick={() => onSearchChange('')}\n >\n <IconCross size={iconSize} />\n </chakra.button>\n )}\n </Box>\n);\n"],"mappings":";;;;;;;;;;;AAkCA,IAAa,mBAAgE,EAC3E,IACA,UACA,YACA,cACA,YACA,iBACA,aAAa,uBACb,UACA,YAAY,OACZ,gBACA,YACA,aACA,MACA,aAC6B;CAC7B,MAAM,UAAU,WAAW,SAAS;CACpC,MAAM,YAAY,eAAe,QAAQ;CAEzC,OACE,oBAAC,gCAAD;EAAgC,OAAO;GAAE;GAAU;EAAO;YACxD,qBAAC,GAAG,SAAJ;GAAY,KAAK,OAAO;GAAS,KAAK;GAAY,GAAI;aAAtD;IAQG,CAAC,kBAAkB,aAAa,oBAAC,QAAD;KAAM,kBAAe;KAAG,UAAU;KAAI,eAAY;IAAQ,CAAA;IAC1F,kBACC,oBAAC,kBAAD;KACY;KACF;KACR,OAAO,eAAe;KACN;IACjB,CAAA;IAEH,qBAAC,KAAD;KAAK,KAAK,OAAO;eAAjB;MACG,aACC,qBAAC,KAAD;OAAK,SAAQ;OAAO,YAAW;OAAS,KAAI;OAAK,gBAAe;OAAO,KAAK,OAAO;iBAAnF,CACE,oBAAC,SAAD,EAAS,SAAQ,SAAU,CAAA,GAC3B,oBAAC,MAAD;QAAM,OAAM;QAAiB,WAAW,SAAS,OAAO,oBAAoB;kBAAmB;OAEzF,CAAA,CACH;;MAEN,CAAC,aAAa,WACb,qBAAC,KAAD;OAAK,KAAK,OAAO;iBAAjB,CACE,oBAAC,MAAD;QAAM,KAAK,OAAO;kBAAY;OAAiB,CAAA,GAC9C,mBAAmB,oBAAC,MAAD;QAAM,KAAK,OAAO;kBAAiB;OAAsB,CAAA,CAC1E;;MAEN,CAAC,aACA,CAAC,WACD,WAAW,MAAM,EAAE,KAAK,CAAC,MAAM,WAC7B,qBAAC,GAAG,WAAJ,EAAA,UAAA,CACG,QACC,oBAAC,GAAG,gBAAJ;OAAmB,SAAA;iBACjB,oBAAC,oBAAD;QAAoB,OAAO;QAAM,cAAa;QAAK,eAAc;OAAM,CAAA;MACtD,CAAA,GAEpB,MAAM,IAAI,UAAU,CACT,EAAA,GAPK,IAOL,CACf;KACA;;IACJ;GACS;;CACkB,CAAA;AAEpC;AASA,IAAM,oBAAoB,EAAE,UAAU,gBAAgB,QAAQ,YAC5D,qBAAC,KAAD;CAAK,KAAK,OAAO;WAAjB;EACE,oBAAC,eAAD;GAAe,MAAM;GAAU,OAAM;EAAiB,CAAA;EACtD,oBAAC,OAAO,OAAR;GACE,cAAW;GACX,KAAK,OAAO;GACZ,aAAY;GACL;GACP,WAAW,UAAyC,eAAe,MAAM,OAAO,KAAK;GACrF,YAAY,UAAU;IAIpB,IAAI,MAAM,QAAQ,KAAK,MAAM,gBAAgB;GAC/C;EACD,CAAA;EACA,SACC,oBAAC,OAAO,QAAR;GACE,MAAK;GACL,KAAK,OAAO;GACZ,cAAW;GACX,eAAe,eAAe,EAAE;aAEhC,oBAAC,WAAD,EAAW,MAAM,SAAW,CAAA;EACf,CAAA;CAEd"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { withSubComponents } from "../../utilities/withSubComponents.js";
|
|
1
2
|
import { useRecipe } from "@chakra-ui/react/styled-system";
|
|
2
3
|
import { forwardRef } from "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -35,7 +36,7 @@ var BitkitSelectableTagItem = forwardRef((props, ref) => {
|
|
|
35
36
|
});
|
|
36
37
|
});
|
|
37
38
|
BitkitSelectableTagItem.displayName = "BitkitSelectableTagItem";
|
|
38
|
-
var BitkitSelectableTag_default =
|
|
39
|
+
var BitkitSelectableTag_default = withSubComponents(BitkitSelectableTag, { Item: BitkitSelectableTagItem });
|
|
39
40
|
//#endregion
|
|
40
41
|
export { BitkitSelectableTag_default as default };
|
|
41
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSelectableTag.js","names":[],"sources":["../../../lib/components/BitkitSelectableTag/BitkitSelectableTag.tsx"],"sourcesContent":["import { Checkbox, type CheckboxCheckedChangeDetails, type CheckboxGroupProps } from '@chakra-ui/react/checkbox';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\n\n// --- Root (Group) ---\n\nexport interface BitkitSelectableTagProps extends Omit<CheckboxGroupProps, 'disabled'> {\n state?: 'disabled';\n}\n\nconst BitkitSelectableTag = forwardRef<HTMLDivElement, BitkitSelectableTagProps>((props, ref) => {\n const { children, state, ...rest } = props;\n const disabled = state === 'disabled';\n\n return (\n <Checkbox.Group ref={ref} disabled={disabled} gap=\"8\" flexDirection=\"row\" flexWrap=\"wrap\" {...rest}>\n {children}\n </Checkbox.Group>\n );\n});\n\nBitkitSelectableTag.displayName = 'BitkitSelectableTag';\n\n// --- Item ---\n\nexport interface BitkitSelectableTagItemProps {\n children: string;\n defaultChecked?: boolean;\n disabled?: boolean;\n icon?: BitkitIconComponent;\n onCheckedChange?: (details: CheckboxCheckedChangeDetails) => void;\n value: string;\n}\n\nconst BitkitSelectableTagItem = forwardRef<HTMLInputElement, BitkitSelectableTagItemProps>((props, ref) => {\n const { children, defaultChecked, disabled, icon: Icon, onCheckedChange, value } = props;\n const style = useRecipe({ key: 'selectableTag' })();\n\n return (\n <Checkbox.Root\n css={style}\n defaultChecked={defaultChecked}\n disabled={disabled}\n onCheckedChange={onCheckedChange}\n unstyled\n value={value}\n >\n <Checkbox.HiddenInput ref={ref} />\n {!!Icon && <Icon size=\"16\" />}\n {children}\n </Checkbox.Root>\n );\n});\n\nBitkitSelectableTagItem.displayName = 'BitkitSelectableTagItem';\n\nexport default
|
|
1
|
+
{"version":3,"file":"BitkitSelectableTag.js","names":[],"sources":["../../../lib/components/BitkitSelectableTag/BitkitSelectableTag.tsx"],"sourcesContent":["import { Checkbox, type CheckboxCheckedChangeDetails, type CheckboxGroupProps } from '@chakra-ui/react/checkbox';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport { withSubComponents } from '../../utilities/withSubComponents';\n\n// --- Root (Group) ---\n\nexport interface BitkitSelectableTagProps extends Omit<CheckboxGroupProps, 'disabled'> {\n state?: 'disabled';\n}\n\nconst BitkitSelectableTag = forwardRef<HTMLDivElement, BitkitSelectableTagProps>((props, ref) => {\n const { children, state, ...rest } = props;\n const disabled = state === 'disabled';\n\n return (\n <Checkbox.Group ref={ref} disabled={disabled} gap=\"8\" flexDirection=\"row\" flexWrap=\"wrap\" {...rest}>\n {children}\n </Checkbox.Group>\n );\n});\n\nBitkitSelectableTag.displayName = 'BitkitSelectableTag';\n\n// --- Item ---\n\nexport interface BitkitSelectableTagItemProps {\n children: string;\n defaultChecked?: boolean;\n disabled?: boolean;\n icon?: BitkitIconComponent;\n onCheckedChange?: (details: CheckboxCheckedChangeDetails) => void;\n value: string;\n}\n\nconst BitkitSelectableTagItem = forwardRef<HTMLInputElement, BitkitSelectableTagItemProps>((props, ref) => {\n const { children, defaultChecked, disabled, icon: Icon, onCheckedChange, value } = props;\n const style = useRecipe({ key: 'selectableTag' })();\n\n return (\n <Checkbox.Root\n css={style}\n defaultChecked={defaultChecked}\n disabled={disabled}\n onCheckedChange={onCheckedChange}\n unstyled\n value={value}\n >\n <Checkbox.HiddenInput ref={ref} />\n {!!Icon && <Icon size=\"16\" />}\n {children}\n </Checkbox.Root>\n );\n});\n\nBitkitSelectableTagItem.displayName = 'BitkitSelectableTagItem';\n\nexport default withSubComponents(BitkitSelectableTag, {\n Item: BitkitSelectableTagItem,\n});\n"],"mappings":";;;;;;AAaA,IAAM,sBAAsB,YAAsD,OAAO,QAAQ;CAC/F,MAAM,EAAE,UAAU,OAAO,GAAG,SAAS;CACrC,MAAM,WAAW,UAAU;CAE3B,OACE,oBAAC,SAAS,OAAV;EAAqB;EAAe;EAAU,KAAI;EAAI,eAAc;EAAM,UAAS;EAAO,GAAI;EAC3F;CACa,CAAA;AAEpB,CAAC;AAED,oBAAoB,cAAc;AAalC,IAAM,0BAA0B,YAA4D,OAAO,QAAQ;CACzG,MAAM,EAAE,UAAU,gBAAgB,UAAU,MAAM,MAAM,iBAAiB,UAAU;CACnF,MAAM,QAAQ,UAAU,EAAE,KAAK,gBAAgB,CAAC,EAAE;CAElD,OACE,qBAAC,SAAS,MAAV;EACE,KAAK;EACW;EACN;EACO;EACjB,UAAA;EACO;YANT;GAQE,oBAAC,SAAS,aAAV,EAA2B,IAAM,CAAA;GAChC,CAAC,CAAC,QAAQ,oBAAC,MAAD,EAAM,MAAK,KAAM,CAAA;GAC3B;EACY;;AAEnB,CAAC;AAED,wBAAwB,cAAc;AAEtC,IAAA,8BAAe,kBAAkB,qBAAqB,EACpD,MAAM,wBACR,CAAC"}
|