@bitrise/bitkit-v2 0.3.469-beta.2976 → 0.3.469
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/BitkitCombobox/BitkitCombobox.d.ts +3 -3
- package/dist/components/BitkitCombobox/BitkitCombobox.js +2 -6
- package/dist/components/BitkitCombobox/BitkitCombobox.js.map +1 -1
- package/dist/components/BitkitMultiselect/BitkitMultiselect.d.ts +3 -3
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js +1 -4
- package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.d.ts +3 -3
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js.map +1 -1
- package/dist/components/BitkitSelect/BitkitSelect.d.ts +3 -3
- package/dist/components/BitkitSelect/BitkitSelect.js +1 -4
- package/dist/components/BitkitSelect/BitkitSelect.js.map +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +2 -7
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js.map +1 -1
- package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +3 -3
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js +29 -59
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js.map +1 -1
- package/dist/components/BitkitSteps/BitkitSteps.d.ts +11 -0
- package/dist/components/BitkitSteps/BitkitSteps.js +3 -6
- package/dist/components/BitkitSteps/BitkitSteps.js.map +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/main.js +1 -4
- package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +2 -14
- package/dist/theme/slot-recipes/Select.recipe.d.ts +5 -23
- package/dist/theme/slot-recipes/Select.recipe.js +3 -37
- package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/StepCard.recipe.js +12 -3
- package/dist/theme/slot-recipes/StepCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/Steps.recipe.d.ts +31 -45
- package/dist/theme/slot-recipes/Steps.recipe.js +48 -48
- package/dist/theme/slot-recipes/Steps.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +38 -195
- package/dist/theme/slot-recipes/index.js +1 -3
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/BitkitUISideNav/BitkitUISideNav.d.ts +0 -38
- package/dist/components/BitkitUISideNav/BitkitUISideNav.js +0 -167
- package/dist/components/BitkitUISideNav/BitkitUISideNav.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavBody.d.ts +0 -7
- package/dist/components/BitkitUISideNav/UISideNavBody.js +0 -20
- package/dist/components/BitkitUISideNav/UISideNavBody.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavContext.d.ts +0 -32
- package/dist/components/BitkitUISideNav/UISideNavContext.js +0 -28
- package/dist/components/BitkitUISideNav/UISideNavContext.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavFooter.d.ts +0 -16
- package/dist/components/BitkitUISideNav/UISideNavFooter.js +0 -28
- package/dist/components/BitkitUISideNav/UISideNavFooter.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.d.ts +0 -12
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js +0 -26
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavItem.d.ts +0 -26
- package/dist/components/BitkitUISideNav/UISideNavItem.js +0 -33
- package/dist/components/BitkitUISideNav/UISideNavItem.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavLink.d.ts +0 -30
- package/dist/components/BitkitUISideNav/UISideNavLink.js +0 -58
- package/dist/components/BitkitUISideNav/UISideNavLink.js.map +0 -1
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.d.ts +0 -55
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js +0 -127
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js.map +0 -1
- package/dist/theme/slot-recipes/UISideNav.recipe.d.ts +0 -119
- package/dist/theme/slot-recipes/UISideNav.recipe.js +0 -416
- package/dist/theme/slot-recipes/UISideNav.recipe.js.map +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Select, SelectTriggerProps } from '@chakra-ui/react/select';
|
|
2
|
-
import { BitkitSelectMenuEmptyStateProps, BitkitSelectMenuErrorStateProps, BitkitSelectMenuItemProps, BitkitSelectMenuScrollProps, BitkitSelectMenuSearchProps } from '../BitkitSelectMenu/BitkitSelectMenu';
|
|
3
|
-
import { BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';
|
|
4
|
-
export type BitkitUISideNavWorkspaceProps = Pick<BitkitSelectMenuItemProps, 'label' | 'value'> & {
|
|
5
|
-
/**
|
|
6
|
-
* The workspace's logo. Leave it off and the avatar falls back to the initials of `label` —
|
|
7
|
-
* a workspace always has one, unlike a plain menu item.
|
|
8
|
-
*/
|
|
9
|
-
avatar?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* The list length at which the design adds the search input. Below it the menu is short enough
|
|
13
|
-
* to read at a glance and a search field would only be in the way. Exported for the stories,
|
|
14
|
-
* which label each list by the side of this it falls on — not part of the package's surface.
|
|
15
|
-
*/
|
|
16
|
-
export declare const searchableFrom = 6;
|
|
17
|
-
export type BitkitUISideNavWorkspaceSelectorProps = Omit<SelectTriggerProps, 'children' | 'onChange'> & {
|
|
18
|
-
/**
|
|
19
|
-
* A single `BitkitSelectMenuAction` shown under the list, typically "Create workspace". Its
|
|
20
|
-
* presence is the toggle — there is no boolean for it.
|
|
21
|
-
*/
|
|
22
|
-
children?: BitkitSelectMenuActionChild;
|
|
23
|
-
isLoading?: boolean;
|
|
24
|
-
/** The small uppercase caption above the workspace name. */
|
|
25
|
-
label?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Fires when the menu opens and when it closes — where a list loaded on demand belongs. The
|
|
28
|
-
* menu also opens from the keyboard, which fires no click on the trigger.
|
|
29
|
-
*/
|
|
30
|
-
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
onValueChange?: (value: string) => void;
|
|
32
|
-
/** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */
|
|
33
|
-
value?: string;
|
|
34
|
-
workspaces: Array<BitkitUISideNavWorkspaceProps>;
|
|
35
|
-
} & Omit<BitkitSelectMenuSearchProps, 'searchPlaceholder'> & BitkitSelectMenuScrollProps & BitkitSelectMenuEmptyStateProps & BitkitSelectMenuErrorStateProps;
|
|
36
|
-
declare const UISideNavWorkspaceSelector: import('react').ForwardRefExoticComponent<Omit<Select.TriggerProps, "children" | "onChange"> & {
|
|
37
|
-
/**
|
|
38
|
-
* A single `BitkitSelectMenuAction` shown under the list, typically "Create workspace". Its
|
|
39
|
-
* presence is the toggle — there is no boolean for it.
|
|
40
|
-
*/
|
|
41
|
-
children?: BitkitSelectMenuActionChild;
|
|
42
|
-
isLoading?: boolean;
|
|
43
|
-
/** The small uppercase caption above the workspace name. */
|
|
44
|
-
label?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Fires when the menu opens and when it closes — where a list loaded on demand belongs. The
|
|
47
|
-
* menu also opens from the keyboard, which fires no click on the trigger.
|
|
48
|
-
*/
|
|
49
|
-
onOpenChange?: (open: boolean) => void;
|
|
50
|
-
onValueChange?: (value: string) => void;
|
|
51
|
-
/** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */
|
|
52
|
-
value?: string;
|
|
53
|
-
workspaces: Array<BitkitUISideNavWorkspaceProps>;
|
|
54
|
-
} & Omit<BitkitSelectMenuSearchProps, "searchPlaceholder"> & BitkitSelectMenuScrollProps & BitkitSelectMenuEmptyStateProps & BitkitSelectMenuErrorStateProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
55
|
-
export default UISideNavWorkspaceSelector;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import IconChevronDown from "../../icons/IconChevronDown.js";
|
|
2
|
-
import BitkitAvatar from "../BitkitAvatar/BitkitAvatar.js";
|
|
3
|
-
import BitkitSelectMenu from "../BitkitSelectMenu/BitkitSelectMenu.js";
|
|
4
|
-
import { useUISideNavContext } from "./UISideNavContext.js";
|
|
5
|
-
import { Box } from "@chakra-ui/react/box";
|
|
6
|
-
import { forwardRef, useId, useMemo, useRef, useState } from "react";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { Portal } from "@chakra-ui/react/portal";
|
|
9
|
-
import { Text } from "@chakra-ui/react/text";
|
|
10
|
-
import { useControllableState } from "@chakra-ui/react/hooks";
|
|
11
|
-
import { createListCollection } from "@chakra-ui/react/collection";
|
|
12
|
-
import { Select } from "@chakra-ui/react/select";
|
|
13
|
-
import { useFilter } from "@chakra-ui/react/locale";
|
|
14
|
-
var UISideNavWorkspaceSelector = forwardRef((props, ref) => {
|
|
15
|
-
const { children, css, emptyHelperText, emptyLabel, errorHelperText, errorLabel, isLoading, label = "Workspace", onOpenChange, onScrolledToBottom, onSearchChange, onValueChange, searchValue, value, workspaces, ...rest } = props;
|
|
16
|
-
const { isMobile, menuContainerRef, setMenuOpen, styles } = useUISideNavContext();
|
|
17
|
-
const id = useId();
|
|
18
|
-
const labelId = `${id}-label`;
|
|
19
|
-
const valueId = `${id}-value`;
|
|
20
|
-
const { contains } = useFilter({ sensitivity: "base" });
|
|
21
|
-
const [ownQuery, setOwnQuery] = useState("");
|
|
22
|
-
const [currentValue, setCurrentValue] = useControllableState({
|
|
23
|
-
defaultValue: void 0,
|
|
24
|
-
value
|
|
25
|
-
});
|
|
26
|
-
const isSearchDelegated = onSearchChange !== void 0;
|
|
27
|
-
const query = isSearchDelegated ? searchValue : ownQuery;
|
|
28
|
-
const hasSearch = isSearchDelegated || workspaces.length >= 6;
|
|
29
|
-
const collection = useMemo(() => {
|
|
30
|
-
const items = (ownQuery ? workspaces.filter((workspace) => contains(workspace.label, ownQuery)) : workspaces).map((workspace) => ({
|
|
31
|
-
...workspace,
|
|
32
|
-
avatar: workspace.avatar ?? null
|
|
33
|
-
}));
|
|
34
|
-
return createListCollection({ items });
|
|
35
|
-
}, [
|
|
36
|
-
contains,
|
|
37
|
-
ownQuery,
|
|
38
|
-
workspaces
|
|
39
|
-
]);
|
|
40
|
-
const lastSelected = useRef(void 0);
|
|
41
|
-
const matched = workspaces.find((workspace) => workspace.value === currentValue);
|
|
42
|
-
if (matched) lastSelected.current = matched;
|
|
43
|
-
const selected = matched ?? (lastSelected.current?.value === currentValue ? lastSelected.current : void 0);
|
|
44
|
-
return /* @__PURE__ */ jsxs(Select.Root, {
|
|
45
|
-
collection,
|
|
46
|
-
css: styles.workspaceRoot,
|
|
47
|
-
ids: { label: labelId },
|
|
48
|
-
onOpenChange: (details) => {
|
|
49
|
-
setMenuOpen(details.open);
|
|
50
|
-
if (!details.open) setOwnQuery("");
|
|
51
|
-
onOpenChange?.(details.open);
|
|
52
|
-
},
|
|
53
|
-
onValueChange: (details) => {
|
|
54
|
-
setCurrentValue(details.value[0]);
|
|
55
|
-
onValueChange?.(details.value[0]);
|
|
56
|
-
},
|
|
57
|
-
positioning: isMobile ? {
|
|
58
|
-
gutter: 0,
|
|
59
|
-
offset: { crossAxis: 16 },
|
|
60
|
-
overflowPadding: 16
|
|
61
|
-
} : {
|
|
62
|
-
gutter: -8,
|
|
63
|
-
offset: { crossAxis: 16 },
|
|
64
|
-
placement: "bottom-start"
|
|
65
|
-
},
|
|
66
|
-
size: "lg",
|
|
67
|
-
value: currentValue === void 0 ? [] : [currentValue],
|
|
68
|
-
children: [/* @__PURE__ */ jsxs(Select.Control, {
|
|
69
|
-
css: styles.workspaceControl,
|
|
70
|
-
children: [/* @__PURE__ */ jsx(Select.HiddenSelect, {}), /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
71
|
-
ref,
|
|
72
|
-
unstyled: true,
|
|
73
|
-
"aria-labelledby": `${labelId} ${valueId}`,
|
|
74
|
-
...rest,
|
|
75
|
-
css: [styles.workspace, css],
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx(BitkitAvatar, {
|
|
78
|
-
borderColor: "border/minimal",
|
|
79
|
-
borderWidth: "1",
|
|
80
|
-
name: selected?.label ?? "",
|
|
81
|
-
size: "40",
|
|
82
|
-
src: selected?.avatar ?? "",
|
|
83
|
-
variant: "image"
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ jsxs(Box, {
|
|
86
|
-
css: styles.workspaceTextBlock,
|
|
87
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
88
|
-
css: styles.workspaceLabel,
|
|
89
|
-
id: labelId,
|
|
90
|
-
children: label
|
|
91
|
-
}), /* @__PURE__ */ jsx(Text, {
|
|
92
|
-
css: styles.workspaceValue,
|
|
93
|
-
id: valueId,
|
|
94
|
-
children: selected?.label
|
|
95
|
-
})]
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ jsx(Select.Indicator, {
|
|
98
|
-
css: styles.workspaceChevron,
|
|
99
|
-
children: /* @__PURE__ */ jsx(IconChevronDown, {})
|
|
100
|
-
})
|
|
101
|
-
]
|
|
102
|
-
})]
|
|
103
|
-
}), /* @__PURE__ */ jsx(Portal, {
|
|
104
|
-
container: isMobile ? menuContainerRef : void 0,
|
|
105
|
-
children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
|
|
106
|
-
collection,
|
|
107
|
-
contentProps: { css: styles.workspaceMenu },
|
|
108
|
-
emptyHelperText,
|
|
109
|
-
emptyLabel,
|
|
110
|
-
errorHelperText,
|
|
111
|
-
errorLabel,
|
|
112
|
-
isLoading,
|
|
113
|
-
onScrolledToBottom,
|
|
114
|
-
onSearchChange: hasSearch ? onSearchChange ?? setOwnQuery : void 0,
|
|
115
|
-
searchPlaceholder: "Search your workspaces",
|
|
116
|
-
searchValue: query,
|
|
117
|
-
size: "lg",
|
|
118
|
-
children
|
|
119
|
-
}) })
|
|
120
|
-
})]
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
UISideNavWorkspaceSelector.displayName = "BitkitUISideNav.WorkspaceSelector";
|
|
124
|
-
//#endregion
|
|
125
|
-
export { UISideNavWorkspaceSelector as default };
|
|
126
|
-
|
|
127
|
-
//# sourceMappingURL=UISideNavWorkspaceSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UISideNavWorkspaceSelector.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavWorkspaceSelector.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { useControllableState } from '@chakra-ui/react/hooks';\nimport { useFilter } from '@chakra-ui/react/locale';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectTriggerProps } from '@chakra-ui/react/select';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, useId, useMemo, useRef, useState } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport BitkitSelectMenu, {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuErrorStateProps,\n type BitkitSelectMenuItemProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu';\nimport { type BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';\nimport { useUISideNavContext } from './UISideNavContext';\n\nexport type BitkitUISideNavWorkspaceProps = Pick<BitkitSelectMenuItemProps, 'label' | 'value'> & {\n /**\n * The workspace's logo. Leave it off and the avatar falls back to the initials of `label` —\n * a workspace always has one, unlike a plain menu item.\n */\n avatar?: string;\n};\n\n/**\n * The list length at which the design adds the search input. Below it the menu is short enough\n * to read at a glance and a search field would only be in the way. Exported for the stories,\n * which label each list by the side of this it falls on — not part of the package's surface.\n */\nexport const searchableFrom = 6;\n\nexport type BitkitUISideNavWorkspaceSelectorProps = Omit<SelectTriggerProps, 'children' | 'onChange'> & {\n /**\n * A single `BitkitSelectMenuAction` shown under the list, typically \"Create workspace\". Its\n * presence is the toggle — there is no boolean for it.\n */\n children?: BitkitSelectMenuActionChild;\n isLoading?: boolean;\n /** The small uppercase caption above the workspace name. */\n label?: string;\n /**\n * Fires when the menu opens and when it closes — where a list loaded on demand belongs. The\n * menu also opens from the keyboard, which fires no click on the trigger.\n */\n onOpenChange?: (open: boolean) => void;\n onValueChange?: (value: string) => void;\n /** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */\n value?: string;\n workspaces: Array<BitkitUISideNavWorkspaceProps>;\n // The copy is the design's, not the consumer's, so the placeholder is not on the way through.\n} & Omit<BitkitSelectMenuSearchProps, 'searchPlaceholder'> &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps &\n BitkitSelectMenuErrorStateProps;\n\nconst UISideNavWorkspaceSelector = forwardRef<HTMLButtonElement, BitkitUISideNavWorkspaceSelectorProps>(\n (props, ref) => {\n const {\n children,\n css,\n emptyHelperText,\n emptyLabel,\n errorHelperText,\n errorLabel,\n isLoading,\n label = 'Workspace',\n onOpenChange,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n searchValue,\n value,\n workspaces,\n ...rest\n } = props;\n\n const { isMobile, menuContainerRef, setMenuOpen, styles } = useUISideNavContext();\n const id = useId();\n const labelId = `${id}-label`;\n const valueId = `${id}-value`;\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const [ownQuery, setOwnQuery] = useState('');\n const [currentValue, setCurrentValue] = useControllableState<string | undefined>({\n defaultValue: undefined,\n value,\n });\n\n // A consumer that passes `onSearchChange` is searching somewhere we cannot see — a server, a\n // paged list — so `workspaces` is already the result and its length says nothing about how\n // many there are. They keep the input and the filtering; otherwise both are ours.\n const isSearchDelegated = onSearchChange !== undefined;\n const query = isSearchDelegated ? searchValue : ownQuery;\n const hasSearch = isSearchDelegated || workspaces.length >= searchableFrom;\n\n const collection = useMemo(() => {\n const matches = ownQuery ? workspaces.filter((workspace) => contains(workspace.label, ownQuery)) : workspaces;\n\n // `null` rather than nothing for a workspace without a logo: that is what tells the menu to\n // draw the initials, where an absent `avatar` would leave the row with no avatar at all.\n const items: Array<BitkitSelectMenuItemProps> = matches.map((workspace) => ({\n ...workspace,\n avatar: workspace.avatar ?? null,\n }));\n\n return createListCollection({ items });\n }, [contains, ownQuery, workspaces]);\n\n // `workspaces` is the search result while the search is delegated, so the selected workspace\n // can drop out of it mid-query. The cell keeps naming the workspace you are actually in.\n const lastSelected = useRef<BitkitUISideNavWorkspaceProps>(undefined);\n const matched = workspaces.find((workspace) => workspace.value === currentValue);\n if (matched) lastSelected.current = matched;\n const selected = matched ?? (lastSelected.current?.value === currentValue ? lastSelected.current : undefined);\n\n return (\n <Select.Root\n collection={collection}\n css={styles.workspaceRoot}\n ids={{ label: labelId }}\n onOpenChange={(details) => {\n setMenuOpen(details.open);\n if (!details.open) setOwnQuery('');\n onOpenChange?.(details.open);\n }}\n onValueChange={(details) => {\n setCurrentValue(details.value[0]);\n onValueChange?.(details.value[0]);\n }}\n // Tucked into the rail rather than hung off it: inset from the rail's edge and lapping\n // over the workspace cell, so the menu reads as the cell unfolding.\n positioning={\n isMobile\n ? { gutter: 0, offset: { crossAxis: 16 }, overflowPadding: 16 }\n : { gutter: -8, offset: { crossAxis: 16 }, placement: 'bottom-start' }\n }\n size=\"lg\"\n value={currentValue === undefined ? [] : [currentValue]}\n >\n <Select.Control css={styles.workspaceControl}>\n <Select.HiddenSelect />\n <Select.Trigger\n ref={ref}\n unstyled\n aria-labelledby={`${labelId} ${valueId}`}\n {...rest}\n css={[styles.workspace, css]}\n >\n <BitkitAvatar\n borderColor=\"border/minimal\"\n borderWidth=\"1\"\n name={selected?.label ?? ''}\n size=\"40\"\n src={selected?.avatar ?? ''}\n variant=\"image\"\n />\n <Box css={styles.workspaceTextBlock}>\n <Text css={styles.workspaceLabel} id={labelId}>\n {label}\n </Text>\n <Text css={styles.workspaceValue} id={valueId}>\n {selected?.label}\n </Text>\n </Box>\n <Select.Indicator css={styles.workspaceChevron}>\n <IconChevronDown />\n </Select.Indicator>\n </Select.Trigger>\n </Select.Control>\n {/*\n In the drawer the menu goes to the panel rather than the document: the panel scrolls\n under its own header, so a menu left in the flow would travel with the rows and be\n clipped by them, and anywhere outside the panel is outside the dialog's focus trap.\n */}\n <Portal container={isMobile ? menuContainerRef : undefined}>\n <Select.Positioner>\n <BitkitSelectMenu\n collection={collection}\n contentProps={{ css: styles.workspaceMenu }}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n errorHelperText={errorHelperText}\n errorLabel={errorLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={hasSearch ? (onSearchChange ?? setOwnQuery) : undefined}\n searchPlaceholder=\"Search your workspaces\"\n searchValue={query}\n size=\"lg\"\n >\n {children}\n </BitkitSelectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n );\n },\n);\n\nUISideNavWorkspaceSelector.displayName = 'BitkitUISideNav.WorkspaceSelector';\n\nexport default UISideNavWorkspaceSelector;\n"],"mappings":";;;;;;;;;;;;;AA4DA,IAAM,6BAA6B,YAChC,OAAO,QAAQ;CACd,MAAM,EACJ,UACA,KACA,iBACA,YACA,iBACA,YACA,WACA,QAAQ,aACR,cACA,oBACA,gBACA,eACA,aACA,OACA,YACA,GAAG,SACD;CAEJ,MAAM,EAAE,UAAU,kBAAkB,aAAa,WAAW,oBAAoB;CAChF,MAAM,KAAK,MAAM;CACjB,MAAM,UAAU,GAAG,GAAG;CACtB,MAAM,UAAU,GAAG,GAAG;CACtB,MAAM,EAAE,aAAa,UAAU,EAAE,aAAa,OAAO,CAAC;CAEtD,MAAM,CAAC,UAAU,eAAe,SAAS,EAAE;CAC3C,MAAM,CAAC,cAAc,mBAAmB,qBAAyC;EAC/E,cAAc,KAAA;EACd;CACF,CAAC;CAKD,MAAM,oBAAoB,mBAAmB,KAAA;CAC7C,MAAM,QAAQ,oBAAoB,cAAc;CAChD,MAAM,YAAY,qBAAqB,WAAW,UAAA;CAElD,MAAM,aAAa,cAAc;EAK/B,MAAM,SAJU,WAAW,WAAW,QAAQ,cAAc,SAAS,UAAU,OAAO,QAAQ,CAAC,IAAI,WAAA,CAI3C,KAAK,eAAe;GAC1E,GAAG;GACH,QAAQ,UAAU,UAAU;EAC9B,EAAE;EAEF,OAAO,qBAAqB,EAAE,MAAM,CAAC;CACvC,GAAG;EAAC;EAAU;EAAU;CAAU,CAAC;CAInC,MAAM,eAAe,OAAsC,KAAA,CAAS;CACpE,MAAM,UAAU,WAAW,MAAM,cAAc,UAAU,UAAU,YAAY;CAC/E,IAAI,SAAS,aAAa,UAAU;CACpC,MAAM,WAAW,YAAY,aAAa,SAAS,UAAU,eAAe,aAAa,UAAU,KAAA;CAEnG,OACE,qBAAC,OAAO,MAAR;EACc;EACZ,KAAK,OAAO;EACZ,KAAK,EAAE,OAAO,QAAQ;EACtB,eAAe,YAAY;GACzB,YAAY,QAAQ,IAAI;GACxB,IAAI,CAAC,QAAQ,MAAM,YAAY,EAAE;GACjC,eAAe,QAAQ,IAAI;EAC7B;EACA,gBAAgB,YAAY;GAC1B,gBAAgB,QAAQ,MAAM,EAAE;GAChC,gBAAgB,QAAQ,MAAM,EAAE;EAClC;EAGA,aACE,WACI;GAAE,QAAQ;GAAG,QAAQ,EAAE,WAAW,GAAG;GAAG,iBAAiB;EAAG,IAC5D;GAAE,QAAQ;GAAI,QAAQ,EAAE,WAAW,GAAG;GAAG,WAAW;EAAe;EAEzE,MAAK;EACL,OAAO,iBAAiB,KAAA,IAAY,CAAC,IAAI,CAAC,YAAY;EArBxD,UAAA,CAuBE,qBAAC,OAAO,SAAR;GAAgB,KAAK,OAAO;GAA5B,UAAA,CACE,oBAAC,OAAO,cAAR,CAAsB,CAAA,GACtB,qBAAC,OAAO,SAAR;IACO;IACL,UAAA;IACA,mBAAiB,GAAG,QAAQ,GAAG;IAC/B,GAAI;IACJ,KAAK,CAAC,OAAO,WAAW,GAAG;IAL7B,UAAA;KAOE,oBAAC,cAAD;MACE,aAAY;MACZ,aAAY;MACZ,MAAM,UAAU,SAAS;MACzB,MAAK;MACL,KAAK,UAAU,UAAU;MACzB,SAAQ;KACT,CAAA;KACD,qBAAC,KAAD;MAAK,KAAK,OAAO;MAAjB,UAAA,CACE,oBAAC,MAAD;OAAM,KAAK,OAAO;OAAgB,IAAI;OACnC,UAAA;MACG,CAAA,GACN,oBAAC,MAAD;OAAM,KAAK,OAAO;OAAgB,IAAI;OACnC,UAAA,UAAU;MACP,CAAA,CACH;;KACL,oBAAC,OAAO,WAAR;MAAkB,KAAK,OAAO;MAC5B,UAAA,oBAAC,iBAAD,CAAkB,CAAA;KACF,CAAA;IACJ;GACF,CAAA,CAAA;EAMhB,CAAA,GAAA,oBAAC,QAAD;GAAQ,WAAW,WAAW,mBAAmB,KAAA;GAC/C,UAAA,oBAAC,OAAO,YAAR,EAAA,UACE,oBAAC,kBAAD;IACc;IACZ,cAAc,EAAE,KAAK,OAAO,cAAc;IACzB;IACL;IACK;IACL;IACD;IACS;IACpB,gBAAgB,YAAa,kBAAkB,cAAe,KAAA;IAC9D,mBAAkB;IAClB,aAAa;IACb,MAAK;IAEJ;GACe,CAAA,EACD,CAAA;EACb,CAAA,CACG;;AAEjB,CACF;AAEA,2BAA2B,cAAc"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The footprint the rail keeps in the page. The expanded rail overlays the content rather than
|
|
3
|
-
* pushing it, so this is the gutter a layout reserves beside the navigation.
|
|
4
|
-
*/
|
|
5
|
-
export declare const uiSideNavRailWidth: `${number}rem`;
|
|
6
|
-
declare const uiSideNavSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"link" | "content" | "body" | "footer" | "closeButton" | "root" | "item" | "itemIndicator" | "positioner" | "itemLabel" | "itemIcon" | "backdrop" | "footerSeparator" | "footerHeading" | "linkIconBlock" | "linkTextBlock" | "linkIcon" | "linkStatusDot" | "linkLabel" | "linkSecondaryText" | "workspaceRoot" | "workspaceControl" | "workspace" | "workspaceTextBlock" | "workspaceChevron" | "workspaceMenu" | "workspaceLabel" | "workspaceValue", {
|
|
7
|
-
layout: {
|
|
8
|
-
rail: {
|
|
9
|
-
root: {
|
|
10
|
-
paddingBlockEnd: "12";
|
|
11
|
-
transition: "width 100ms ease-out";
|
|
12
|
-
transitionDelay: "50ms";
|
|
13
|
-
width: `${number}rem`;
|
|
14
|
-
_motionReduce: {
|
|
15
|
-
transition: "none";
|
|
16
|
-
};
|
|
17
|
-
'&[data-expanded]': {
|
|
18
|
-
transitionDelay: "100ms";
|
|
19
|
-
width: `${number}rem`;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
workspace: {
|
|
23
|
-
paddingInline: "16";
|
|
24
|
-
minWidth: `${number}rem`;
|
|
25
|
-
};
|
|
26
|
-
workspaceControl: {
|
|
27
|
-
minWidth: `${number}rem`;
|
|
28
|
-
};
|
|
29
|
-
workspaceMenu: {
|
|
30
|
-
width: `${number}rem`;
|
|
31
|
-
};
|
|
32
|
-
body: {
|
|
33
|
-
overflowX: "hidden";
|
|
34
|
-
overflowY: "auto";
|
|
35
|
-
scrollbar: "hidden";
|
|
36
|
-
};
|
|
37
|
-
item: {
|
|
38
|
-
gap: "24";
|
|
39
|
-
paddingBlock: "16";
|
|
40
|
-
minWidth: `${number}rem`;
|
|
41
|
-
};
|
|
42
|
-
link: {
|
|
43
|
-
gap: "24";
|
|
44
|
-
minWidth: `${number}rem`;
|
|
45
|
-
};
|
|
46
|
-
footerSeparator: {
|
|
47
|
-
'[data-expanded] &': {
|
|
48
|
-
paddingInline: "16";
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
footerHeading: {
|
|
52
|
-
minWidth: `${number}rem`;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
drawer: {
|
|
56
|
-
root: {
|
|
57
|
-
overflowX: "hidden";
|
|
58
|
-
overflowY: "auto";
|
|
59
|
-
width: "full";
|
|
60
|
-
};
|
|
61
|
-
workspaceRoot: {
|
|
62
|
-
background: "sys/ui/sidenav/bg";
|
|
63
|
-
insetBlockStart: number;
|
|
64
|
-
position: "sticky";
|
|
65
|
-
zIndex: number;
|
|
66
|
-
};
|
|
67
|
-
workspace: {
|
|
68
|
-
paddingBlock: "16";
|
|
69
|
-
paddingInlineEnd: "24";
|
|
70
|
-
paddingInlineStart: "16";
|
|
71
|
-
};
|
|
72
|
-
item: {
|
|
73
|
-
gap: "12";
|
|
74
|
-
paddingBlock: "16";
|
|
75
|
-
};
|
|
76
|
-
link: {
|
|
77
|
-
gap: "12";
|
|
78
|
-
};
|
|
79
|
-
footer: {
|
|
80
|
-
paddingBlockEnd: "16";
|
|
81
|
-
paddingBlockStart: "12";
|
|
82
|
-
position: "relative";
|
|
83
|
-
};
|
|
84
|
-
footerHeading: {
|
|
85
|
-
paddingBlockStart: "12";
|
|
86
|
-
'&[data-section]': {
|
|
87
|
-
marginBlockStart: "12";
|
|
88
|
-
paddingBlockStart: "24";
|
|
89
|
-
position: "relative";
|
|
90
|
-
_before: {
|
|
91
|
-
insetBlockStart: number;
|
|
92
|
-
insetInline: number;
|
|
93
|
-
position: "absolute";
|
|
94
|
-
background: "border/inverse";
|
|
95
|
-
content: "\"\"";
|
|
96
|
-
height: "1";
|
|
97
|
-
opacity: 0.2;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
footerSeparator: {
|
|
102
|
-
insetBlockStart: number;
|
|
103
|
-
insetInline: number;
|
|
104
|
-
paddingBlock: number;
|
|
105
|
-
paddingInline: number;
|
|
106
|
-
position: "absolute";
|
|
107
|
-
};
|
|
108
|
-
workspaceMenu: {
|
|
109
|
-
maxHeight: "var(--available-height)";
|
|
110
|
-
'--select-menu-list-max-height': "none";
|
|
111
|
-
};
|
|
112
|
-
body: {
|
|
113
|
-
flex: "1 0 auto";
|
|
114
|
-
paddingBlock: "8";
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
}>;
|
|
119
|
-
export default uiSideNavSlotRecipe;
|