@bitrise/bitkit-v2 0.3.478 → 0.3.480-beta.3050
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/BitkitPageHeader/BitkitPageHeader.d.ts +14 -0
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js +62 -36
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js.map +1 -1
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.d.ts +24 -0
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js +74 -6
- package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js.map +1 -1
- package/dist/components/BitkitUIHeader/BitkitUIHeader.d.ts +37 -0
- package/dist/components/BitkitUIHeader/BitkitUIHeader.js +112 -0
- package/dist/components/BitkitUIHeader/BitkitUIHeader.js.map +1 -0
- package/dist/components/BitkitUIHeader/BitriseLogo.d.ts +10 -0
- package/dist/components/BitkitUIHeader/BitriseLogo.js +86 -0
- package/dist/components/BitkitUIHeader/BitriseLogo.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderAccount.d.ts +23 -0
- package/dist/components/BitkitUIHeader/UIHeaderAccount.js +40 -0
- package/dist/components/BitkitUIHeader/UIHeaderAccount.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderButton.d.ts +32 -0
- package/dist/components/BitkitUIHeader/UIHeaderButton.js +41 -0
- package/dist/components/BitkitUIHeader/UIHeaderButton.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderContext.d.ts +13 -0
- package/dist/components/BitkitUIHeader/UIHeaderContext.js +11 -0
- package/dist/components/BitkitUIHeader/UIHeaderContext.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderControl.d.ts +65 -0
- package/dist/components/BitkitUIHeader/UIHeaderControl.js +71 -0
- package/dist/components/BitkitUIHeader/UIHeaderControl.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderNavButton.d.ts +20 -0
- package/dist/components/BitkitUIHeader/UIHeaderNavButton.js +46 -0
- package/dist/components/BitkitUIHeader/UIHeaderNavButton.js.map +1 -0
- package/dist/components/BitkitUIHeader/UIHeaderSearch.d.ts +32 -0
- package/dist/components/BitkitUIHeader/UIHeaderSearch.js +116 -0
- package/dist/components/BitkitUIHeader/UIHeaderSearch.js.map +1 -0
- package/dist/components/BitkitUIHeader/uiHeaderPart.d.ts +9 -0
- package/dist/components/BitkitUIHeader/uiHeaderPart.js +13 -0
- package/dist/components/BitkitUIHeader/uiHeaderPart.js.map +1 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/main.js +4 -2
- package/dist/theme/recipes/UIHeaderButton.recipe.js +103 -0
- package/dist/theme/recipes/UIHeaderButton.recipe.js.map +1 -0
- package/dist/theme/recipes/index.js +3 -1
- package/dist/theme/recipes/index.js.map +1 -1
- package/dist/theme/slot-recipes/PageHeader.recipe.d.ts +23 -1
- package/dist/theme/slot-recipes/PageHeader.recipe.js +63 -0
- package/dist/theme/slot-recipes/PageHeader.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/PageSidebar.recipe.d.ts +49 -1
- package/dist/theme/slot-recipes/PageSidebar.recipe.js +93 -0
- package/dist/theme/slot-recipes/PageSidebar.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/UIHeader.recipe.d.ts +4 -0
- package/dist/theme/slot-recipes/UIHeader.recipe.js +238 -0
- package/dist/theme/slot-recipes/UIHeader.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/index.d.ts +59 -2
- package/dist/theme/slot-recipes/index.js +2 -0
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/dist/theme/themeUtils.d.ts +6 -0
- package/dist/theme/themeUtils.js +7 -1
- package/dist/theme/themeUtils.js.map +1 -1
- package/package.json +1 -1
- package/dist/theme/recipes/index.d.ts +0 -525
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import IconMenuHamburger from "../../icons/IconMenuHamburger.js";
|
|
2
|
+
import BitkitAvatar from "../BitkitAvatar/BitkitAvatar.js";
|
|
3
|
+
import { useUIHeaderContext } from "./UIHeaderContext.js";
|
|
4
|
+
import { UIHeaderControlBase } from "./UIHeaderControl.js";
|
|
5
|
+
import { Box } from "@chakra-ui/react/box";
|
|
6
|
+
import { forwardRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region lib/components/BitkitUIHeader/UIHeaderNavButton.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Opens `BitkitUISideNav` on mobile, where the navigation is a drawer rather than a rail. It sits
|
|
11
|
+
* in the header's `leading` slot, which is hidden from the `tablet` breakpoint up.
|
|
12
|
+
*
|
|
13
|
+
* The two components do not know about each other: this button's `onClick` sets the navigation's
|
|
14
|
+
* `open`, and the navigation asks to close through its own `onOpenChange`.
|
|
15
|
+
*
|
|
16
|
+
* It shows the current workspace, so switching workspaces is one tap away from anywhere.
|
|
17
|
+
*/
|
|
18
|
+
var UIHeaderNavButton = forwardRef((props, ref) => {
|
|
19
|
+
const { label = "Open navigation", name, src, ...rest } = props;
|
|
20
|
+
const { styles } = useUIHeaderContext();
|
|
21
|
+
const avatarProps = src ? {
|
|
22
|
+
src,
|
|
23
|
+
variant: "image"
|
|
24
|
+
} : { variant: "letters" };
|
|
25
|
+
return /* @__PURE__ */ jsxs(UIHeaderControlBase, {
|
|
26
|
+
ref,
|
|
27
|
+
footprint: "navButton",
|
|
28
|
+
label,
|
|
29
|
+
...rest,
|
|
30
|
+
children: [/* @__PURE__ */ jsx(BitkitAvatar, {
|
|
31
|
+
name,
|
|
32
|
+
...avatarProps
|
|
33
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
34
|
+
css: styles.navButtonBadge,
|
|
35
|
+
children: /* @__PURE__ */ jsx(IconMenuHamburger, {
|
|
36
|
+
css: styles.navButtonIcon,
|
|
37
|
+
size: "16"
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
UIHeaderNavButton.displayName = "BitkitUIHeader.NavButton";
|
|
43
|
+
//#endregion
|
|
44
|
+
export { UIHeaderNavButton as default };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=UIHeaderNavButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIHeaderNavButton.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/UIHeaderNavButton.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { type HTMLChakraProps } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { IconMenuHamburger } from '../../icons';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport { useUIHeaderContext } from './UIHeaderContext';\nimport { UIHeaderControlBase } from './UIHeaderControl';\n\nexport interface BitkitUIHeaderNavButtonProps extends Omit<HTMLChakraProps<'button'>, 'children' | 'disabled'> {\n /** The accessible name. */\n label?: string;\n /** The current workspace. Shown as the avatar's initials when it has no logo. */\n name: string;\n /** The workspace's logo. Without one the avatar falls back to its initials. */\n src?: string;\n}\n\n/**\n * Opens `BitkitUISideNav` on mobile, where the navigation is a drawer rather than a rail. It sits\n * in the header's `leading` slot, which is hidden from the `tablet` breakpoint up.\n *\n * The two components do not know about each other: this button's `onClick` sets the navigation's\n * `open`, and the navigation asks to close through its own `onOpenChange`.\n *\n * It shows the current workspace, so switching workspaces is one tap away from anywhere.\n */\nconst UIHeaderNavButton = forwardRef<HTMLButtonElement, BitkitUIHeaderNavButtonProps>((props, ref) => {\n const { label = 'Open navigation', name, src, ...rest } = props;\n\n const { styles } = useUIHeaderContext();\n\n const avatarProps = src ? ({ src, variant: 'image' } as const) : ({ variant: 'letters' } as const);\n\n return (\n <UIHeaderControlBase ref={ref} footprint=\"navButton\" label={label} {...rest}>\n <BitkitAvatar name={name} {...avatarProps} />\n <Box css={styles.navButtonBadge}>\n <IconMenuHamburger css={styles.navButtonIcon} size=\"16\" />\n </Box>\n </UIHeaderControlBase>\n );\n});\n\nUIHeaderNavButton.displayName = 'BitkitUIHeader.NavButton';\n\nexport default UIHeaderNavButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AA2BA,IAAM,oBAAoB,YAA6D,OAAO,QAAQ;CACpG,MAAM,EAAE,QAAQ,mBAAmB,MAAM,KAAK,GAAG,SAAS;CAE1D,MAAM,EAAE,WAAW,mBAAmB;CAEtC,MAAM,cAAc,MAAO;EAAE;EAAK,SAAS;CAAQ,IAAe,EAAE,SAAS,UAAU;CAEvF,OACE,qBAAC,qBAAD;EAA0B;EAAK,WAAU;EAAmB;EAAO,GAAI;EAAvE,UAAA,CACE,oBAAC,cAAD;GAAoB;GAAM,GAAI;EAAc,CAAA,GAC5C,oBAAC,KAAD;GAAK,KAAK,OAAO;GACf,UAAA,oBAAC,mBAAD;IAAmB,KAAK,OAAO;IAAe,MAAK;GAAM,CAAA;EACtD,CAAA,CACc;;AAEzB,CAAC;AAED,kBAAkB,cAAc"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BoxProps } from '@chakra-ui/react/box';
|
|
2
|
+
import { Ref } from 'react';
|
|
3
|
+
export interface BitkitUIHeaderSearchProps extends Omit<BoxProps, 'children' | 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* The search field, for anchoring the results to it. The component owns no results list: what a
|
|
6
|
+
* search turns up differs per product, so the consumer renders its own panel against this.
|
|
7
|
+
*/
|
|
8
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
9
|
+
/** The accessible name of both the button and the field. */
|
|
10
|
+
label?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Called when the button is pressed, and when Escape closes the field.
|
|
13
|
+
*
|
|
14
|
+
* From `tablet` up this opens the field in place. Below it there is no inline field — the button
|
|
15
|
+
* is a plain trigger, and what it opens is the consumer's to render.
|
|
16
|
+
*/
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
onValueChange?: (value: string) => void;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
/** Marks the button as the one whose panel is open. Meant for the mobile trigger. */
|
|
22
|
+
selected?: boolean;
|
|
23
|
+
value?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Search in the header bar: a button that opens a field lying over it, so opening the search moves
|
|
27
|
+
* nothing else in the bar.
|
|
28
|
+
*
|
|
29
|
+
* It is controlled. Hold `open` and `value` yourself, and render the results against `inputRef`.
|
|
30
|
+
*/
|
|
31
|
+
declare const UIHeaderSearch: import('react').ForwardRefExoticComponent<BitkitUIHeaderSearchProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export default UIHeaderSearch;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import IconMagnifier from "../../icons/IconMagnifier.js";
|
|
2
|
+
import BitkitCloseButton from "../BitkitCloseButton/BitkitCloseButton.js";
|
|
3
|
+
import { useUIHeaderContext } from "./UIHeaderContext.js";
|
|
4
|
+
import uiHeaderPart from "./uiHeaderPart.js";
|
|
5
|
+
import { UIHeaderControlBase } from "./UIHeaderControl.js";
|
|
6
|
+
import { Box } from "@chakra-ui/react/box";
|
|
7
|
+
import { chakra } from "@chakra-ui/react/styled-system";
|
|
8
|
+
import { forwardRef, useEffect, useMemo, useRef } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { useCallbackRef } from "@chakra-ui/react/hooks";
|
|
11
|
+
import { mergeRefs } from "@chakra-ui/react";
|
|
12
|
+
//#region lib/components/BitkitUIHeader/UIHeaderSearch.tsx
|
|
13
|
+
/**
|
|
14
|
+
* Search in the header bar: a button that opens a field lying over it, so opening the search moves
|
|
15
|
+
* nothing else in the bar.
|
|
16
|
+
*
|
|
17
|
+
* It is controlled. Hold `open` and `value` yourself, and render the results against `inputRef`.
|
|
18
|
+
*/
|
|
19
|
+
var UIHeaderSearch = forwardRef((props, ref) => {
|
|
20
|
+
const { css, inputRef, label = "Search", onOpenChange, onValueChange, open = false, placeholder, selected, value = "", ...rest } = props;
|
|
21
|
+
const { barRef, styles } = useUIHeaderContext();
|
|
22
|
+
const buttonElementRef = useRef(null);
|
|
23
|
+
const inputElementRef = useRef(null);
|
|
24
|
+
const searchElementRef = useRef(null);
|
|
25
|
+
const restoreFocusRef = useRef(false);
|
|
26
|
+
const setInputRef = useMemo(() => mergeRefs(inputElementRef, inputRef), [inputRef]);
|
|
27
|
+
const setSearchRef = useMemo(() => mergeRefs(searchElementRef, ref), [ref]);
|
|
28
|
+
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (open) {
|
|
31
|
+
inputElementRef.current?.focus();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (!restoreFocusRef.current) return;
|
|
35
|
+
restoreFocusRef.current = false;
|
|
36
|
+
buttonElementRef.current?.focus();
|
|
37
|
+
}, [open]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!open) return void 0;
|
|
40
|
+
const bar = barRef.current;
|
|
41
|
+
if (!bar) return void 0;
|
|
42
|
+
const dismiss = (event) => {
|
|
43
|
+
const target = event.target instanceof Node ? event.target : null;
|
|
44
|
+
if (!target || searchElementRef.current?.contains(target)) return;
|
|
45
|
+
handleOpenChange?.(false);
|
|
46
|
+
};
|
|
47
|
+
bar.addEventListener("pointerdown", dismiss);
|
|
48
|
+
return () => bar.removeEventListener("pointerdown", dismiss);
|
|
49
|
+
}, [
|
|
50
|
+
barRef,
|
|
51
|
+
handleOpenChange,
|
|
52
|
+
open
|
|
53
|
+
]);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!open) return void 0;
|
|
56
|
+
const close = (event) => {
|
|
57
|
+
if (event.key !== "Escape") return;
|
|
58
|
+
if (event.target === inputElementRef.current) event.preventDefault();
|
|
59
|
+
restoreFocusRef.current = true;
|
|
60
|
+
handleOpenChange?.(false);
|
|
61
|
+
};
|
|
62
|
+
document.addEventListener("keydown", close);
|
|
63
|
+
return () => document.removeEventListener("keydown", close);
|
|
64
|
+
}, [handleOpenChange, open]);
|
|
65
|
+
const handleClear = () => {
|
|
66
|
+
onValueChange?.("");
|
|
67
|
+
inputElementRef.current?.focus();
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
70
|
+
ref: setSearchRef,
|
|
71
|
+
css: [styles.search, css],
|
|
72
|
+
...uiHeaderPart("search"),
|
|
73
|
+
...rest,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(UIHeaderControlBase, {
|
|
75
|
+
ref: buttonElementRef,
|
|
76
|
+
"aria-expanded": selected ?? open,
|
|
77
|
+
css: styles.searchButton,
|
|
78
|
+
"data-open": open ? "" : void 0,
|
|
79
|
+
footprint: "control",
|
|
80
|
+
label,
|
|
81
|
+
onClick: () => onOpenChange?.(!open),
|
|
82
|
+
selected,
|
|
83
|
+
...uiHeaderPart("search-button"),
|
|
84
|
+
children: /* @__PURE__ */ jsx(IconMagnifier, {})
|
|
85
|
+
}), /* @__PURE__ */ jsxs(Box, {
|
|
86
|
+
css: styles.searchField,
|
|
87
|
+
"data-open": open ? "" : void 0,
|
|
88
|
+
...uiHeaderPart("search-field"),
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ jsx(IconMagnifier, { css: styles.searchIcon }),
|
|
91
|
+
/* @__PURE__ */ jsx(chakra.input, {
|
|
92
|
+
ref: setInputRef,
|
|
93
|
+
"aria-label": label,
|
|
94
|
+
css: styles.searchInput,
|
|
95
|
+
onChange: (event) => onValueChange?.(event.target.value),
|
|
96
|
+
...uiHeaderPart("search-input"),
|
|
97
|
+
placeholder,
|
|
98
|
+
type: "search",
|
|
99
|
+
value
|
|
100
|
+
}),
|
|
101
|
+
!!value && /* @__PURE__ */ jsx(BitkitCloseButton, {
|
|
102
|
+
"aria-label": "Clear search",
|
|
103
|
+
colorVariant: "white",
|
|
104
|
+
css: styles.searchClear,
|
|
105
|
+
onClick: handleClear,
|
|
106
|
+
size: "sm"
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
UIHeaderSearch.displayName = "BitkitUIHeader.Search";
|
|
113
|
+
//#endregion
|
|
114
|
+
export { UIHeaderSearch as default };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=UIHeaderSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIHeaderSearch.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/UIHeaderSearch.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { mergeRefs } from '@chakra-ui/react';\nimport { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useCallbackRef } from '@chakra-ui/react/hooks';\nimport { chakra } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type Ref, useEffect, useMemo, useRef } from 'react';\n\nimport { IconMagnifier } from '../../icons';\nimport BitkitCloseButton from '../BitkitCloseButton/BitkitCloseButton';\nimport { useUIHeaderContext } from './UIHeaderContext';\nimport { UIHeaderControlBase } from './UIHeaderControl';\nimport uiHeaderPart from './uiHeaderPart';\n\nexport interface BitkitUIHeaderSearchProps extends Omit<BoxProps, 'children' | 'onChange'> {\n /**\n * The search field, for anchoring the results to it. The component owns no results list: what a\n * search turns up differs per product, so the consumer renders its own panel against this.\n */\n inputRef?: Ref<HTMLInputElement>;\n /** The accessible name of both the button and the field. */\n label?: string;\n /**\n * Called when the button is pressed, and when Escape closes the field.\n *\n * From `tablet` up this opens the field in place. Below it there is no inline field — the button\n * is a plain trigger, and what it opens is the consumer's to render.\n */\n onOpenChange?: (open: boolean) => void;\n onValueChange?: (value: string) => void;\n open?: boolean;\n placeholder?: string;\n /** Marks the button as the one whose panel is open. Meant for the mobile trigger. */\n selected?: boolean;\n value?: string;\n}\n\n/**\n * Search in the header bar: a button that opens a field lying over it, so opening the search moves\n * nothing else in the bar.\n *\n * It is controlled. Hold `open` and `value` yourself, and render the results against `inputRef`.\n */\nconst UIHeaderSearch = forwardRef<HTMLDivElement, BitkitUIHeaderSearchProps>((props, ref) => {\n const {\n css,\n inputRef,\n label = 'Search',\n onOpenChange,\n onValueChange,\n open = false,\n placeholder,\n selected,\n value = '',\n ...rest\n } = props;\n\n const { barRef, styles } = useUIHeaderContext();\n\n const buttonElementRef = useRef<HTMLButtonElement>(null);\n const inputElementRef = useRef<HTMLInputElement>(null);\n const searchElementRef = useRef<HTMLDivElement>(null);\n const restoreFocusRef = useRef(false);\n const setInputRef = useMemo(() => mergeRefs(inputElementRef, inputRef), [inputRef]);\n const setSearchRef = useMemo(() => mergeRefs(searchElementRef, ref), [ref]);\n\n // The field is controlled, so `onOpenChange` is usually a fresh arrow on every keystroke. Held\n // by a ref, the dismiss listener below is subscribed once per opening rather than per character.\n const handleOpenChange = useCallbackRef(onOpenChange);\n\n // Escape hands focus back to the button that opened the field, but only once the field is closed:\n // while it is open the button is `visibility: hidden`, and a hidden element cannot take focus.\n useEffect(() => {\n if (open) {\n inputElementRef.current?.focus();\n return;\n }\n\n if (!restoreFocusRef.current) return;\n restoreFocusRef.current = false;\n buttonElementRef.current?.focus();\n }, [open]);\n\n // Reaching for another control in the bar is as much a way out of the search as Escape, so the\n // open field gives way to it. Only presses in the bar itself count: the results are the\n // consumer's to render — in the `banner` slot as readily as anywhere else — and choosing from\n // them must not close the search.\n useEffect(() => {\n if (!open) return undefined;\n\n const bar = barRef.current;\n if (!bar) return undefined;\n\n const dismiss = (event: PointerEvent) => {\n const target = event.target instanceof Node ? event.target : null;\n if (!target || searchElementRef.current?.contains(target)) return;\n handleOpenChange?.(false);\n };\n\n bar.addEventListener('pointerdown', dismiss);\n return () => bar.removeEventListener('pointerdown', dismiss);\n }, [barRef, handleOpenChange, open]);\n\n useEffect(() => {\n if (!open) return undefined;\n\n const close = (event: globalThis.KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n if (event.target === inputElementRef.current) event.preventDefault();\n restoreFocusRef.current = true;\n handleOpenChange?.(false);\n };\n\n document.addEventListener('keydown', close);\n return () => document.removeEventListener('keydown', close);\n }, [handleOpenChange, open]);\n\n const handleClear = () => {\n onValueChange?.('');\n inputElementRef.current?.focus();\n };\n\n return (\n <Box ref={setSearchRef} css={[styles.search, css]} {...uiHeaderPart('search')} {...rest}>\n <UIHeaderControlBase\n ref={buttonElementRef}\n aria-expanded={selected ?? open}\n css={styles.searchButton}\n data-open={open ? '' : undefined}\n footprint=\"control\"\n label={label}\n onClick={() => onOpenChange?.(!open)}\n selected={selected}\n {...uiHeaderPart('search-button')}\n >\n <IconMagnifier />\n </UIHeaderControlBase>\n <Box css={styles.searchField} data-open={open ? '' : undefined} {...uiHeaderPart('search-field')}>\n <IconMagnifier css={styles.searchIcon} />\n {/* No named primitive fits: Chakra's `Input` carries its own recipe, and this field is\n styled entirely by the header's own slot. */}\n <chakra.input\n ref={setInputRef}\n aria-label={label}\n css={styles.searchInput}\n onChange={(event) => onValueChange?.(event.target.value)}\n {...uiHeaderPart('search-input')}\n placeholder={placeholder}\n type=\"search\"\n value={value}\n />\n {!!value && (\n <BitkitCloseButton\n aria-label=\"Clear search\"\n colorVariant=\"white\"\n css={styles.searchClear}\n onClick={handleClear}\n size=\"sm\"\n />\n )}\n </Box>\n </Box>\n );\n});\n\nUIHeaderSearch.displayName = 'BitkitUIHeader.Search';\n\nexport default UIHeaderSearch;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,IAAM,iBAAiB,YAAuD,OAAO,QAAQ;CAC3F,MAAM,EACJ,KACA,UACA,QAAQ,UACR,cACA,eACA,OAAO,OACP,aACA,UACA,QAAQ,IACR,GAAG,SACD;CAEJ,MAAM,EAAE,QAAQ,WAAW,mBAAmB;CAE9C,MAAM,mBAAmB,OAA0B,IAAI;CACvD,MAAM,kBAAkB,OAAyB,IAAI;CACrD,MAAM,mBAAmB,OAAuB,IAAI;CACpD,MAAM,kBAAkB,OAAO,KAAK;CACpC,MAAM,cAAc,cAAc,UAAU,iBAAiB,QAAQ,GAAG,CAAC,QAAQ,CAAC;CAClF,MAAM,eAAe,cAAc,UAAU,kBAAkB,GAAG,GAAG,CAAC,GAAG,CAAC;CAI1E,MAAM,mBAAmB,eAAe,YAAY;CAIpD,gBAAgB;EACd,IAAI,MAAM;GACR,gBAAgB,SAAS,MAAM;GAC/B;EACF;EAEA,IAAI,CAAC,gBAAgB,SAAS;EAC9B,gBAAgB,UAAU;EAC1B,iBAAiB,SAAS,MAAM;CAClC,GAAG,CAAC,IAAI,CAAC;CAMT,gBAAgB;EACd,IAAI,CAAC,MAAM,OAAO,KAAA;EAElB,MAAM,MAAM,OAAO;EACnB,IAAI,CAAC,KAAK,OAAO,KAAA;EAEjB,MAAM,WAAW,UAAwB;GACvC,MAAM,SAAS,MAAM,kBAAkB,OAAO,MAAM,SAAS;GAC7D,IAAI,CAAC,UAAU,iBAAiB,SAAS,SAAS,MAAM,GAAG;GAC3D,mBAAmB,KAAK;EAC1B;EAEA,IAAI,iBAAiB,eAAe,OAAO;EAC3C,aAAa,IAAI,oBAAoB,eAAe,OAAO;CAC7D,GAAG;EAAC;EAAQ;EAAkB;CAAI,CAAC;CAEnC,gBAAgB;EACd,IAAI,CAAC,MAAM,OAAO,KAAA;EAElB,MAAM,SAAS,UAAoC;GACjD,IAAI,MAAM,QAAQ,UAAU;GAC5B,IAAI,MAAM,WAAW,gBAAgB,SAAS,MAAM,eAAe;GACnE,gBAAgB,UAAU;GAC1B,mBAAmB,KAAK;EAC1B;EAEA,SAAS,iBAAiB,WAAW,KAAK;EAC1C,aAAa,SAAS,oBAAoB,WAAW,KAAK;CAC5D,GAAG,CAAC,kBAAkB,IAAI,CAAC;CAE3B,MAAM,oBAAoB;EACxB,gBAAgB,EAAE;EAClB,gBAAgB,SAAS,MAAM;CACjC;CAEA,OACE,qBAAC,KAAD;EAAK,KAAK;EAAc,KAAK,CAAC,OAAO,QAAQ,GAAG;EAAG,GAAI,aAAa,QAAQ;EAAG,GAAI;EAAnF,UAAA,CACE,oBAAC,qBAAD;GACE,KAAK;GACL,iBAAe,YAAY;GAC3B,KAAK,OAAO;GACZ,aAAW,OAAO,KAAK,KAAA;GACvB,WAAU;GACH;GACP,eAAe,eAAe,CAAC,IAAI;GACzB;GACV,GAAI,aAAa,eAAe;GAEhC,UAAA,oBAAC,eAAD,CAAgB,CAAA;EACG,CAAA,GACrB,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAa,aAAW,OAAO,KAAK,KAAA;GAAW,GAAI,aAAa,cAAc;GAA/F,UAAA;IACE,oBAAC,eAAD,EAAe,KAAK,OAAO,WAAa,CAAA;IAGxC,oBAAC,OAAO,OAAR;KACE,KAAK;KACL,cAAY;KACZ,KAAK,OAAO;KACZ,WAAW,UAAU,gBAAgB,MAAM,OAAO,KAAK;KACvD,GAAI,aAAa,cAAc;KAClB;KACb,MAAK;KACE;IACR,CAAA;IACA,CAAC,CAAC,SACD,oBAAC,mBAAD;KACE,cAAW;KACX,cAAa;KACb,KAAK,OAAO;KACZ,SAAS;KACT,MAAK;IACN,CAAA;GAEA;EACF,CAAA,CAAA;;AAET,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `data-scope` / `data-part` pair every element in the header carries, so a consumer's
|
|
3
|
+
* stylesheet or spec can address one without a generated class name. Spread it before `...rest`.
|
|
4
|
+
*/
|
|
5
|
+
declare const uiHeaderPart: (name: string) => {
|
|
6
|
+
'data-part': string;
|
|
7
|
+
'data-scope': string;
|
|
8
|
+
};
|
|
9
|
+
export default uiHeaderPart;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region lib/components/BitkitUIHeader/uiHeaderPart.ts
|
|
2
|
+
/**
|
|
3
|
+
* The `data-scope` / `data-part` pair every element in the header carries, so a consumer's
|
|
4
|
+
* stylesheet or spec can address one without a generated class name. Spread it before `...rest`.
|
|
5
|
+
*/
|
|
6
|
+
var uiHeaderPart = (name) => ({
|
|
7
|
+
"data-part": name,
|
|
8
|
+
"data-scope": "ui-header"
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { uiHeaderPart as default };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=uiHeaderPart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiHeaderPart.js","names":[],"sources":["../../../lib/components/BitkitUIHeader/uiHeaderPart.ts"],"sourcesContent":["/**\n * The `data-scope` / `data-part` pair every element in the header carries, so a consumer's\n * stylesheet or spec can address one without a generated class name. Spread it before `...rest`.\n */\nconst uiHeaderPart = (name: string) => ({ 'data-part': name, 'data-scope': 'ui-header' });\n\nexport default uiHeaderPart;\n"],"mappings":";;;;;AAIA,IAAM,gBAAgB,UAAkB;CAAE,aAAa;CAAM,cAAc;AAAY"}
|
|
@@ -50,7 +50,7 @@ export { default as BitkitOverflowContent, type BitkitOverflowContentProps, } fr
|
|
|
50
50
|
export { default as BitkitOverflowTooltip, type BitkitOverflowTooltipProps, } from './BitkitOverflowTooltip/BitkitOverflowTooltip';
|
|
51
51
|
export { default as BitkitPageFooter, type BitkitPageFooterItemProps, type BitkitPageFooterProps, } from './BitkitPageFooter/BitkitPageFooter';
|
|
52
52
|
export { default as BitkitPageHeader, type BitkitPageHeaderProps } from './BitkitPageHeader/BitkitPageHeader';
|
|
53
|
-
export { default as BitkitPageSidebar, type BitkitPageSidebarBodyProps, type BitkitPageSidebarDividerProps, type BitkitPageSidebarFooterProps, type BitkitPageSidebarGroupHeadingProps, type BitkitPageSidebarItemProps, type BitkitPageSidebarProgressItemProps, type BitkitPageSidebarProjectProps, type BitkitPageSidebarProps, type BitkitPageSidebarTitleProps, } from './BitkitPageSidebar/BitkitPageSidebar';
|
|
53
|
+
export { default as BitkitPageSidebar, type BitkitPageSidebarBodyProps, type BitkitPageSidebarDividerProps, type BitkitPageSidebarDrawerHeaderProps, type BitkitPageSidebarFooterProps, type BitkitPageSidebarGroupHeadingProps, type BitkitPageSidebarItemProps, type BitkitPageSidebarProgressItemProps, type BitkitPageSidebarProjectProps, type BitkitPageSidebarProps, type BitkitPageSidebarTitleProps, } from './BitkitPageSidebar/BitkitPageSidebar';
|
|
54
54
|
export { default as BitkitPagination, type BitkitPaginationLabels, type BitkitPaginationProps, } from './BitkitPagination/BitkitPagination';
|
|
55
55
|
export { default as BitkitPaginationLoadMore, type BitkitPaginationLoadMoreProps, } from './BitkitPaginationLoadMore/BitkitPaginationLoadMore';
|
|
56
56
|
export { default as BitkitPopover, type BitkitPopoverProps } from './BitkitPopover/BitkitPopover';
|
|
@@ -94,5 +94,6 @@ export { default as BitkitToggletip, type BitkitToggletipProps } from './BitkitT
|
|
|
94
94
|
export { default as BitkitTooltip, type BitkitTooltipProps } from './BitkitTooltip/BitkitTooltip';
|
|
95
95
|
export { default as BitkitTour, type BitkitTourInstance, type BitkitTourOptions, type BitkitTourProps, type BitkitTourSecondaryAction, type BitkitTourStep, useBitkitTour, } from './BitkitTour/BitkitTour';
|
|
96
96
|
export { default as BitkitTreeView, type BitkitTreeViewBranchProps, type BitkitTreeViewExpandedChangeDetails, type BitkitTreeViewLeafProps, type BitkitTreeViewNodeRenderProps, type BitkitTreeViewRootProps, type BitkitTreeViewSelectionChangeDetails, createTreeCollection, } from './BitkitTreeView/BitkitTreeView';
|
|
97
|
+
export { default as BitkitUIHeader, type BitkitUIHeaderAccountProps, type BitkitUIHeaderButtonProps, type BitkitUIHeaderControlAsAnchorProps, type BitkitUIHeaderControlAsButtonProps, type BitkitUIHeaderControlProps, type BitkitUIHeaderNavButtonProps, type BitkitUIHeaderProps, type BitkitUIHeaderSearchProps, uiHeaderHeight, } from './BitkitUIHeader/BitkitUIHeader';
|
|
97
98
|
export { default as BitkitUISideNav, type BitkitUISideNavBodyProps, type BitkitUISideNavFooterHeadingProps, type BitkitUISideNavFooterProps, type BitkitUISideNavItemProps, type BitkitUISideNavLinkAsAnchorProps, type BitkitUISideNavLinkAsButtonProps, type BitkitUISideNavLinkProps, type BitkitUISideNavProps, type BitkitUISideNavWorkspaceProps, type BitkitUISideNavWorkspaceSelectorProps, uiSideNavRailWidth, } from './BitkitUISideNav/BitkitUISideNav';
|
|
98
99
|
export { useUISideNav } from './BitkitUISideNav/UISideNavContext';
|
package/dist/main.js
CHANGED
|
@@ -352,6 +352,7 @@ import BitkitOverflowContent from "./components/BitkitOverflowContent/BitkitOver
|
|
|
352
352
|
import BitkitOverflowTooltip from "./components/BitkitOverflowTooltip/BitkitOverflowTooltip.js";
|
|
353
353
|
import BitkitPageFooter_default from "./components/BitkitPageFooter/BitkitPageFooter.js";
|
|
354
354
|
import BitkitPageHeader from "./components/BitkitPageHeader/BitkitPageHeader.js";
|
|
355
|
+
import useResponsive, { ResponsiveProvider } from "./hooks/useResponsive.js";
|
|
355
356
|
import BitkitPageSidebar_default from "./components/BitkitPageSidebar/BitkitPageSidebar.js";
|
|
356
357
|
import BitkitPagination from "./components/BitkitPagination/BitkitPagination.js";
|
|
357
358
|
import BitkitPaginationLoadMore from "./components/BitkitPaginationLoadMore/BitkitPaginationLoadMore.js";
|
|
@@ -383,10 +384,11 @@ import createBitkitToast, { dismissBitkitToast } from "./components/BitkitToast/
|
|
|
383
384
|
import BitkitToggleButton from "./components/BitkitToggleButton/BitkitToggleButton.js";
|
|
384
385
|
import BitkitTour, { useBitkitTour } from "./components/BitkitTour/BitkitTour.js";
|
|
385
386
|
import BitkitTreeView, { createTreeCollection } from "./components/BitkitTreeView/BitkitTreeView.js";
|
|
386
|
-
import
|
|
387
|
+
import { uiHeaderHeight } from "./theme/slot-recipes/UIHeader.recipe.js";
|
|
388
|
+
import BitkitUIHeader_default from "./components/BitkitUIHeader/BitkitUIHeader.js";
|
|
387
389
|
import { useUISideNav } from "./components/BitkitUISideNav/UISideNavContext.js";
|
|
388
390
|
import { uiSideNavRailWidth } from "./theme/slot-recipes/UISideNav.recipe.js";
|
|
389
391
|
import BitkitUISideNav_default from "./components/BitkitUISideNav/BitkitUISideNav.js";
|
|
390
392
|
import bitkitTheme from "./theme/index.js";
|
|
391
393
|
import Provider from "./providers/BitkitProvider.js";
|
|
392
|
-
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPageHeader, BitkitPageSidebar_default as BitkitPageSidebar, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSkeletonGroup, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitStepsDialog_default as BitkitStepsDialog, BitkitSwitch, BitkitTable, BitkitTableCard, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitToggletip, BitkitTooltip, BitkitTour, BitkitTreeView, BitkitUISideNav_default as BitkitUISideNav, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopilot, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCursor, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFile, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKiroColor, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMcp, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPin, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTabPlus, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTerminalFilled, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUnpin, IconUpload, IconValidateShield, IconVideo, IconVsCode, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWindsurf, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, uiSideNavRailWidth, useBitkitTour, useResponsive, useStepsDialog, useUISideNav };
|
|
394
|
+
export { BitkitAccordion_default as BitkitAccordion, BitkitActionBar, BitkitActionMenu_default as BitkitActionMenu, BitkitAlert, BitkitAvatar, BitkitBadge, BitkitBreadcrumb, BitkitButton, BitkitCalendar, BitkitCheckbox, BitkitCheckboxGroup, BitkitCloseButton, BitkitCodeSnippet, BitkitCollapsible, BitkitColorButton, BitkitCombobox_default as BitkitCombobox, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitList_default as BitkitList, BitkitMarkdown, BitkitMarkdownCard, BitkitMultiselect_default as BitkitMultiselect, BitkitMultiselectMenu, BitkitNativeSelect, BitkitNoteCard, BitkitNumberInput, BitkitOverflowContent, BitkitOverflowTooltip, BitkitPageFooter_default as BitkitPageFooter, BitkitPageHeader, BitkitPageSidebar_default as BitkitPageSidebar, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProgressBar, BitkitPromoBanner, Provider as BitkitProvider, BitkitRadio, BitkitRadioGroup, BitkitRibbon, BitkitSearchInput, BitkitSectionHeading, BitkitSegmentedControl_default as BitkitSegmentedControl, BitkitSelect_default as BitkitSelect, BitkitSelectMenu, BitkitSelectMenuAction, BitkitSelectableTag_default as BitkitSelectableTag, BitkitSettingsCard_default as BitkitSettingsCard, BitkitSkeletonGroup, BitkitSpinner, BitkitSplitButton_default as BitkitSplitButton, BitkitStat, BitkitSteps_default as BitkitSteps, BitkitStepsCard_default as BitkitStepsCard, BitkitStepsDialog_default as BitkitStepsDialog, BitkitSwitch, BitkitTable, BitkitTableCard, BitkitTabs, BitkitTag, BitkitTagsInput, BitkitTextArea, BitkitTextInput, BitkitToggleButton, BitkitToggletip, BitkitTooltip, BitkitTour, BitkitTreeView, BitkitUIHeader_default as BitkitUIHeader, BitkitUISideNav_default as BitkitUISideNav, IconAbortCircle, IconAbortCircleFilled, IconAddons, IconAgent, IconAnchor, IconAndroid, IconApp, IconAppSettings, IconAppStore, IconAppStoreColor, IconApple, IconArchive, IconArchiveDelete, IconArchiveRestore, IconArrowBackAndDown, IconArrowBackAndUp, IconArrowDown, IconArrowForwardAndDown, IconArrowForwardAndUp, IconArrowLeft, IconArrowNortheast, IconArrowNorthwest, IconArrowRight, IconArrowUp, IconArrowsHorizontal, IconArrowsVertical, IconAutomation, IconAws, IconAwsColor, IconBadge3RdParty, IconBadgeBitrise, IconBadgeUpgrade, IconBadgeVersionOk, IconBazel, IconBell, IconBitbot, IconBitbotError, IconBitbucket, IconBitbucketColor, IconBitbucketNeutral, IconBitbucketWhite, IconBlockCircle, IconBook, IconBoxArrowDown, IconBoxDot, IconBoxLinesOverflow, IconBoxLinesWrap, IconBranch, IconBrowserstackColor, IconBug, IconBuild, IconBuildCache, IconBuildCacheFilled, IconBuildEnvSetup, IconBuildHub, IconBuildHubFilled, IconCalendar, IconChangePlan, IconChat, IconCheck, IconCheckCircle, IconCheckCircleFilled, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconCi, IconCiFilled, IconCircle, IconCircleDashed, IconCircleHalfFilled, IconClaude, IconClaudeColor, IconClock, IconCode, IconCodePush, IconCodeSigning, IconCoffee, IconCommit, IconConfigure, IconConnectedAccounts, IconContainer, IconCopilot, IconCopy, IconCordova, IconCpu, IconCreditcard, IconCredits, IconCross, IconCrossCircle, IconCrossCircleFilled, IconCrown, IconCursor, IconCycle, IconDashboard, IconDashboardFilled, IconDeployment, IconDetails, IconDoc, IconDollar, IconDot, IconDotnet, IconDotnetColor, IconDotnetText, IconDotnetTextColor, IconDoubleCircle, IconDownload, IconDragHandle, IconEc2Ami, IconEnterprise, IconErrorCircle, IconErrorCircleFilled, IconExpand, IconExtraBuildCapacity, IconEye, IconEyeSlash, IconFastlane, IconFile, IconFileDoc, IconFilePdf, IconFilePlist, IconFileYml, IconFileZip, IconFilter, IconFlag, IconFlutter, IconFolder, IconFullscreen, IconFullscreenExit, IconGauge, IconGit, IconGithub, IconGitlab, IconGitlabColor, IconGitlabWhite, IconGlobe, IconGo, IconGoogleColor, IconGooglePlay, IconGooglePlayColor, IconGradle, IconGroup, IconHashtag, IconHeadset, IconHeart, IconHistory, IconHourglass, IconImage, IconInfoCircle, IconInfoCircleFilled, IconInsights, IconInsightsFilled, IconInstall, IconInteraction, IconInvoice, IconIonic, IconJapanese, IconJava, IconJavaColor, IconJavaDuke, IconJavaDukeColor, IconKey, IconKiroColor, IconKotlin, IconKotlinColor, IconKotlinWhite, IconLaptop, IconLaunchdarkly, IconLegacyApp, IconLightbulb, IconLink, IconLinux, IconLock, IconLockOpen, IconLogin, IconLogout, IconMacos, IconMagicWand, IconMagnifier, IconMail, IconMcp, IconMedal, IconMemory, IconMenuGrid, IconMenuHamburger, IconMessage, IconMessageAlert, IconMessageQuestion, IconMicrophone, IconMinus, IconMinusCircle, IconMinusCircleFilled, IconMobile, IconMobileLandscape, IconMonitorChart, IconMoreHorizontal, IconMoreVertical, IconNews, IconNextjs, IconNodejs, IconOpenInNew, IconOther, IconOutsideContributor, IconOverview, IconPause, IconPencil, IconPeople, IconPercent, IconPerson, IconPersonWithDesk, IconPin, IconPlay, IconPlus, IconPlusCircle, IconPlusCircleFilled, IconPower, IconProject, IconProjectSettings, IconPull, IconPush, IconPuzzle, IconPython, IconPythonColor, IconQuestionCircle, IconQuestionCircleFilled, IconReact, IconRefresh, IconRegex, IconRelease, IconReleaseFilled, IconRemoteAccess, IconReplace, IconResponsiveness, IconReviewerApproved, IconReviewerAssigned, IconReviewerRejected, IconRuby, IconRubyColor, IconSave, IconSecurityShield, IconSettings, IconSettingsFilled, IconShuffle, IconSiren, IconSkip, IconSkipCircle, IconSkipCircleFilled, IconSlack, IconSlackColor, IconSparkle, IconSparkleFilled, IconSpinnerOnDisabled, IconSpinnerPurple, IconSpinnerPurpleDouble, IconSpinnerWhite, IconStability, IconStack, IconStar, IconStep, IconStop, IconStopwatch, IconTabPlus, IconTag, IconTasks, IconTeams, IconTeamsColor, IconTemplateCode, IconTerminal, IconTerminalFilled, IconTestQuarantine, IconThemeDarkToggle, IconThumbDown, IconThumbUp, IconTools, IconTrash, IconTrigger, IconUbuntu, IconUbuntuColor, IconUnity3D, IconUnpin, IconUpload, IconValidateShield, IconVideo, IconVsCode, IconWarning, IconWarningYellow, IconWebUi, IconWebhooks, IconWindsurf, IconWorkflow, IconWorkflowFlow, IconXTwitter, IconXamarin, IconXcode, ResponsiveProvider, bitkitIcon, bitkitTheme as bitriseTheme, createBitkitToast, createTreeCollection, dismissBitkitToast, rem, uiHeaderHeight, uiSideNavRailWidth, useBitkitTour, useResponsive, useStepsDialog, useUISideNav };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import { defineRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
+
//#region lib/theme/recipes/UIHeaderButton.recipe.ts
|
|
4
|
+
var borderColors = (variant) => variant === "secondary" ? {
|
|
5
|
+
base: "sys/ui/header/button/secondary/border",
|
|
6
|
+
disabled: "sys/ui/header/button/secondary/border-disabled"
|
|
7
|
+
} : {
|
|
8
|
+
base: "transparent",
|
|
9
|
+
disabled: "transparent"
|
|
10
|
+
};
|
|
11
|
+
var variantStyles = (variant) => {
|
|
12
|
+
const border = borderColors(variant);
|
|
13
|
+
return {
|
|
14
|
+
background: `sys/ui/header/button/${variant}/bg`,
|
|
15
|
+
borderColor: border.base,
|
|
16
|
+
color: `sys/ui/header/button/${variant}/fg`,
|
|
17
|
+
_hover: {
|
|
18
|
+
background: `sys/ui/header/button/${variant}/bg-hover`,
|
|
19
|
+
_active: { background: `sys/ui/header/button/${variant}/bg-active` }
|
|
20
|
+
},
|
|
21
|
+
_active: { background: `sys/ui/header/button/${variant}/bg-active` },
|
|
22
|
+
_selected: {
|
|
23
|
+
background: `sys/ui/header/button/${variant}/bg-active`,
|
|
24
|
+
_hover: { background: `sys/ui/header/button/${variant}/bg-active` }
|
|
25
|
+
},
|
|
26
|
+
_disabled: {
|
|
27
|
+
background: `sys/ui/header/button/${variant}/bg-disabled`,
|
|
28
|
+
borderColor: border.disabled,
|
|
29
|
+
color: `sys/ui/header/button/${variant}/fg-disabled`,
|
|
30
|
+
cursor: "not-allowed"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
var badgeDot = {
|
|
35
|
+
background: "sys/ui/header/badge/indigo",
|
|
36
|
+
borderRadius: "full",
|
|
37
|
+
content: "\"\"",
|
|
38
|
+
pointerEvents: "none",
|
|
39
|
+
position: "absolute"
|
|
40
|
+
};
|
|
41
|
+
var badgeStyles = {
|
|
42
|
+
_before: {
|
|
43
|
+
...badgeDot,
|
|
44
|
+
height: "8",
|
|
45
|
+
insetBlockStart: "-4",
|
|
46
|
+
insetInlineEnd: "-4",
|
|
47
|
+
width: "8"
|
|
48
|
+
},
|
|
49
|
+
_after: {
|
|
50
|
+
...badgeDot,
|
|
51
|
+
height: rem(10),
|
|
52
|
+
insetBlockStart: rem(-5),
|
|
53
|
+
insetInlineEnd: rem(-5),
|
|
54
|
+
opacity: .5,
|
|
55
|
+
width: rem(10)
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var uiHeaderButtonRecipe = defineRecipe({
|
|
59
|
+
className: "ui-header-button",
|
|
60
|
+
base: {
|
|
61
|
+
alignItems: "center",
|
|
62
|
+
borderRadius: "4",
|
|
63
|
+
borderStyle: "solid",
|
|
64
|
+
borderWidth: "1",
|
|
65
|
+
cursor: "pointer",
|
|
66
|
+
display: "inline-flex",
|
|
67
|
+
flexShrink: 0,
|
|
68
|
+
gap: "4",
|
|
69
|
+
height: "32",
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
minWidth: "48",
|
|
72
|
+
paddingInline: "8",
|
|
73
|
+
position: "relative",
|
|
74
|
+
textDecoration: "none",
|
|
75
|
+
textStyle: "comp/button/sm",
|
|
76
|
+
whiteSpace: "nowrap",
|
|
77
|
+
"&:not(:last-child)": { marginInlineEnd: "8" },
|
|
78
|
+
_disabled: { cursor: "not-allowed" }
|
|
79
|
+
},
|
|
80
|
+
variants: {
|
|
81
|
+
variant: {
|
|
82
|
+
primary: variantStyles("primary"),
|
|
83
|
+
secondary: variantStyles("secondary"),
|
|
84
|
+
tertiary: variantStyles("tertiary")
|
|
85
|
+
},
|
|
86
|
+
badge: {
|
|
87
|
+
idle: badgeStyles,
|
|
88
|
+
pulse: {
|
|
89
|
+
...badgeStyles,
|
|
90
|
+
_after: {
|
|
91
|
+
...badgeStyles._after,
|
|
92
|
+
animation: "ping",
|
|
93
|
+
_motionReduce: { animation: "none" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
defaultVariants: { variant: "primary" }
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
export { uiHeaderButtonRecipe as default };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=UIHeaderButton.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIHeaderButton.recipe.js","names":[],"sources":["../../../lib/theme/recipes/UIHeaderButton.recipe.ts"],"sourcesContent":["import { defineRecipe, type SystemStyleObject } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\ntype Variant = 'primary' | 'secondary' | 'tertiary';\n\nconst borderColors = (variant: Variant) =>\n variant === 'secondary'\n ? { base: 'sys/ui/header/button/secondary/border', disabled: 'sys/ui/header/button/secondary/border-disabled' }\n : { base: 'transparent', disabled: 'transparent' };\n\nconst variantStyles = (variant: Variant): SystemStyleObject => {\n const border = borderColors(variant);\n\n return {\n background: `sys/ui/header/button/${variant}/bg`,\n borderColor: border.base,\n color: `sys/ui/header/button/${variant}/fg`,\n // `_hover`/`_active` compile to `:not(:disabled, [data-disabled])`, so they never match a\n // disabled button and `_disabled` wins without `!important`.\n _hover: {\n background: `sys/ui/header/button/${variant}/bg-hover`,\n // Repeat active under hover so clicking while hovering keeps the active styles.\n _active: {\n background: `sys/ui/header/button/${variant}/bg-active`,\n },\n },\n _active: {\n background: `sys/ui/header/button/${variant}/bg-active`,\n },\n // A button that holds a panel open stays pressed while the panel is, hover included — letting\n // hover lighten it would read as the panel having closed.\n _selected: {\n background: `sys/ui/header/button/${variant}/bg-active`,\n _hover: {\n background: `sys/ui/header/button/${variant}/bg-active`,\n },\n },\n _disabled: {\n background: `sys/ui/header/button/${variant}/bg-disabled`,\n borderColor: border.disabled,\n color: `sys/ui/header/button/${variant}/fg-disabled`,\n cursor: 'not-allowed',\n },\n };\n};\n\nconst badgeDot: SystemStyleObject = {\n background: 'sys/ui/header/badge/indigo',\n borderRadius: 'full',\n content: '\"\"',\n pointerEvents: 'none',\n position: 'absolute',\n};\n\nconst badgeStyles: SystemStyleObject = {\n _before: {\n ...badgeDot,\n height: '8',\n insetBlockStart: '-4',\n insetInlineEnd: '-4',\n width: '8',\n },\n _after: {\n ...badgeDot,\n height: rem(10),\n insetBlockStart: rem(-5),\n insetInlineEnd: rem(-5),\n opacity: 0.5,\n width: rem(10),\n },\n};\n\nconst uiHeaderButtonRecipe = defineRecipe({\n className: 'ui-header-button',\n base: {\n alignItems: 'center',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n cursor: 'pointer',\n display: 'inline-flex',\n flexShrink: 0,\n gap: '4',\n height: '32',\n justifyContent: 'center',\n minWidth: '48',\n paddingInline: '8',\n position: 'relative',\n textDecoration: 'none',\n textStyle: 'comp/button/sm',\n whiteSpace: 'nowrap',\n '&:not(:last-child)': {\n marginInlineEnd: '8',\n },\n _disabled: {\n cursor: 'not-allowed',\n },\n },\n variants: {\n variant: {\n primary: variantStyles('primary'),\n secondary: variantStyles('secondary'),\n tertiary: variantStyles('tertiary'),\n },\n badge: {\n idle: badgeStyles,\n pulse: {\n ...badgeStyles,\n _after: {\n ...badgeStyles._after,\n // The system's own ping: the ring expands past the dot and fades out.\n animation: 'ping',\n _motionReduce: {\n animation: 'none',\n },\n },\n },\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nexport default uiHeaderButtonRecipe;\n"],"mappings":";;;AAMA,IAAM,gBAAgB,YACpB,YAAY,cACR;CAAE,MAAM;CAAyC,UAAU;AAAiD,IAC5G;CAAE,MAAM;CAAe,UAAU;AAAc;AAErD,IAAM,iBAAiB,YAAwC;CAC7D,MAAM,SAAS,aAAa,OAAO;CAEnC,OAAO;EACL,YAAY,wBAAwB,QAAQ;EAC5C,aAAa,OAAO;EACpB,OAAO,wBAAwB,QAAQ;EAGvC,QAAQ;GACN,YAAY,wBAAwB,QAAQ;GAE5C,SAAS,EACP,YAAY,wBAAwB,QAAQ,YAC9C;EACF;EACA,SAAS,EACP,YAAY,wBAAwB,QAAQ,YAC9C;EAGA,WAAW;GACT,YAAY,wBAAwB,QAAQ;GAC5C,QAAQ,EACN,YAAY,wBAAwB,QAAQ,YAC9C;EACF;EACA,WAAW;GACT,YAAY,wBAAwB,QAAQ;GAC5C,aAAa,OAAO;GACpB,OAAO,wBAAwB,QAAQ;GACvC,QAAQ;EACV;CACF;AACF;AAEA,IAAM,WAA8B;CAClC,YAAY;CACZ,cAAc;CACd,SAAS;CACT,eAAe;CACf,UAAU;AACZ;AAEA,IAAM,cAAiC;CACrC,SAAS;EACP,GAAG;EACH,QAAQ;EACR,iBAAiB;EACjB,gBAAgB;EAChB,OAAO;CACT;CACA,QAAQ;EACN,GAAG;EACH,QAAQ,IAAI,EAAE;EACd,iBAAiB,IAAI,EAAE;EACvB,gBAAgB,IAAI,EAAE;EACtB,SAAS;EACT,OAAO,IAAI,EAAE;CACf;AACF;AAEA,IAAM,uBAAuB,aAAa;CACxC,WAAW;CACX,MAAM;EACJ,YAAY;EACZ,cAAc;EACd,aAAa;EACb,aAAa;EACb,QAAQ;EACR,SAAS;EACT,YAAY;EACZ,KAAK;EACL,QAAQ;EACR,gBAAgB;EAChB,UAAU;EACV,eAAe;EACf,UAAU;EACV,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,sBAAsB,EACpB,iBAAiB,IACnB;EACA,WAAW,EACT,QAAQ,cACV;CACF;CACA,UAAU;EACR,SAAS;GACP,SAAS,cAAc,SAAS;GAChC,WAAW,cAAc,WAAW;GACpC,UAAU,cAAc,UAAU;EACpC;EACA,OAAO;GACL,MAAM;GACN,OAAO;IACL,GAAG;IACH,QAAQ;KACN,GAAG,YAAY;KAEf,WAAW;KACX,eAAe,EACb,WAAW,OACb;IACF;GACF;EACF;CACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC"}
|
|
@@ -15,6 +15,7 @@ import separatorRecipe from "./Separator.recipe.js";
|
|
|
15
15
|
import skeletonRecipe from "./Skeleton.recipe.js";
|
|
16
16
|
import spinnerRecipe from "./Spinner.recipe.js";
|
|
17
17
|
import toggleButtonRecipe from "./ToggleButton.recipe.js";
|
|
18
|
+
import uiHeaderButtonRecipe from "./UIHeaderButton.recipe.js";
|
|
18
19
|
//#region lib/theme/recipes/index.ts
|
|
19
20
|
var recipes = {
|
|
20
21
|
badge: badgeRecipe,
|
|
@@ -33,7 +34,8 @@ var recipes = {
|
|
|
33
34
|
skeleton: skeletonRecipe,
|
|
34
35
|
spinner: spinnerRecipe,
|
|
35
36
|
textarea: textareaRecipe,
|
|
36
|
-
toggleButton: toggleButtonRecipe
|
|
37
|
+
toggleButton: toggleButtonRecipe,
|
|
38
|
+
uiHeaderButton: uiHeaderButtonRecipe
|
|
37
39
|
};
|
|
38
40
|
//#endregion
|
|
39
41
|
export { recipes as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/recipes/index.ts"],"sourcesContent":["import badgeRecipe from './Badge.recipe';\nimport buttonRecipe from './Button.recipe';\nimport closeButtonRecipe from './CloseButton.recipe';\nimport colorButtonRecipe from './ColorButton.recipe';\nimport controlButtonRecipe from './ControlButton.recipe';\nimport definitionTooltipRecipe from './DefinitionTooltip.recipe';\nimport iconRecipe from './Icon.recipe';\nimport inputRecipe from './Input.recipe';\nimport inputAddonRecipe from './InputAddon.recipe';\nimport linkRecipe from './Link.recipe';\nimport linkButtonRecipe from './LinkButton.recipe';\nimport selectableTagRecipe from './SelectableTag.recipe';\nimport separatorRecipe from './Separator.recipe';\nimport skeletonRecipe from './Skeleton.recipe';\nimport spinnerRecipe from './Spinner.recipe';\nimport textareaRecipe from './Textarea.recipe';\nimport toggleButtonRecipe from './ToggleButton.recipe';\n\nconst recipes = {\n badge: badgeRecipe,\n button: buttonRecipe,\n closeButton: closeButtonRecipe,\n controlButton: controlButtonRecipe,\n colorButton: colorButtonRecipe,\n definitionTooltip: definitionTooltipRecipe,\n icon: iconRecipe,\n input: inputRecipe,\n inputAddon: inputAddonRecipe,\n link: linkRecipe,\n linkButton: linkButtonRecipe,\n selectableTag: selectableTagRecipe,\n separator: separatorRecipe,\n skeleton: skeletonRecipe,\n spinner: spinnerRecipe,\n textarea: textareaRecipe,\n toggleButton: toggleButtonRecipe,\n};\n\nexport default recipes;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../lib/theme/recipes/index.ts"],"sourcesContent":["import badgeRecipe from './Badge.recipe';\nimport buttonRecipe from './Button.recipe';\nimport closeButtonRecipe from './CloseButton.recipe';\nimport colorButtonRecipe from './ColorButton.recipe';\nimport controlButtonRecipe from './ControlButton.recipe';\nimport definitionTooltipRecipe from './DefinitionTooltip.recipe';\nimport iconRecipe from './Icon.recipe';\nimport inputRecipe from './Input.recipe';\nimport inputAddonRecipe from './InputAddon.recipe';\nimport linkRecipe from './Link.recipe';\nimport linkButtonRecipe from './LinkButton.recipe';\nimport selectableTagRecipe from './SelectableTag.recipe';\nimport separatorRecipe from './Separator.recipe';\nimport skeletonRecipe from './Skeleton.recipe';\nimport spinnerRecipe from './Spinner.recipe';\nimport textareaRecipe from './Textarea.recipe';\nimport toggleButtonRecipe from './ToggleButton.recipe';\nimport uiHeaderButtonRecipe from './UIHeaderButton.recipe';\n\nconst recipes = {\n badge: badgeRecipe,\n button: buttonRecipe,\n closeButton: closeButtonRecipe,\n controlButton: controlButtonRecipe,\n colorButton: colorButtonRecipe,\n definitionTooltip: definitionTooltipRecipe,\n icon: iconRecipe,\n input: inputRecipe,\n inputAddon: inputAddonRecipe,\n link: linkRecipe,\n linkButton: linkButtonRecipe,\n selectableTag: selectableTagRecipe,\n separator: separatorRecipe,\n skeleton: skeletonRecipe,\n spinner: spinnerRecipe,\n textarea: textareaRecipe,\n toggleButton: toggleButtonRecipe,\n uiHeaderButton: uiHeaderButtonRecipe,\n};\n\nexport default recipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,IAAM,UAAU;CACd,OAAO;CACP,QAAQ;CACR,aAAa;CACb,eAAe;CACf,aAAa;CACb,mBAAmB;CACnB,MAAM;CACN,OAAO;CACP,YAAY;CACZ,MAAM;CACN,YAAY;CACZ,eAAe;CACf,WAAW;CACX,UAAU;CACV,SAAS;CACT,UAAU;CACV,cAAc;CACd,gBAAgB;AAClB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const pageHeaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "headerBlock" | "contentBlock" | "textBlock" | "titleRow" | "actionBlock", {
|
|
1
|
+
declare const pageHeaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "sectionTitle" | "headerBlock" | "contentBlock" | "titleBar" | "textBlock" | "titleRow" | "actionBlock" | "menuButton" | "sectionBlock", {
|
|
2
2
|
contentVariant: {
|
|
3
3
|
title: {
|
|
4
4
|
titleBlock: {
|
|
@@ -52,6 +52,28 @@ declare const pageHeaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinit
|
|
|
52
52
|
true: {};
|
|
53
53
|
false: {};
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* From the component's `onMenuClick`: the mobile layout for a page with a sidebar
|
|
57
|
+
* (`PageHeader - mobile`, `hasSidebar=true`). The title row tightens up — 12 above, 8 to the
|
|
58
|
+
* trail — and the title steps down to leave the section name as the page's large heading. All
|
|
59
|
+
* `base`: from `tablet` the header is the ordinary one.
|
|
60
|
+
*/
|
|
61
|
+
hasSidebar: {
|
|
62
|
+
true: {
|
|
63
|
+
headerBlock: {
|
|
64
|
+
base: {
|
|
65
|
+
gap: "8";
|
|
66
|
+
paddingBlockStart: "12";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
title: {
|
|
70
|
+
base: {
|
|
71
|
+
textStyle: "heading/mobile/h3";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
false: {};
|
|
76
|
+
};
|
|
55
77
|
/**
|
|
56
78
|
* From the component's `showDivider`. The header's background is the page's, so without the line
|
|
57
79
|
* the bottom padding reads as nothing but a margin -- one the page cannot shrink -- and it goes
|
|
@@ -119,6 +119,7 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
119
119
|
"breadcrumb",
|
|
120
120
|
"controls",
|
|
121
121
|
"contentBlock",
|
|
122
|
+
"titleBar",
|
|
122
123
|
"titleBlock",
|
|
123
124
|
"avatar",
|
|
124
125
|
"textBlock",
|
|
@@ -127,6 +128,9 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
127
128
|
"badge",
|
|
128
129
|
"secondaryText",
|
|
129
130
|
"actionBlock",
|
|
131
|
+
"menuButton",
|
|
132
|
+
"sectionBlock",
|
|
133
|
+
"sectionTitle",
|
|
130
134
|
"tabs"
|
|
131
135
|
],
|
|
132
136
|
base: {
|
|
@@ -191,6 +195,16 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
191
195
|
},
|
|
192
196
|
width: "100%"
|
|
193
197
|
},
|
|
198
|
+
titleBar: {
|
|
199
|
+
alignItems: "center",
|
|
200
|
+
display: {
|
|
201
|
+
base: "flex",
|
|
202
|
+
tablet: "contents"
|
|
203
|
+
},
|
|
204
|
+
gap: "12",
|
|
205
|
+
minWidth: 0,
|
|
206
|
+
width: "100%"
|
|
207
|
+
},
|
|
194
208
|
titleBlock: {
|
|
195
209
|
display: "flex",
|
|
196
210
|
flex: "1 0 0",
|
|
@@ -252,6 +266,32 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
252
266
|
tablet: "auto"
|
|
253
267
|
}
|
|
254
268
|
},
|
|
269
|
+
menuButton: {
|
|
270
|
+
display: {
|
|
271
|
+
base: "flex",
|
|
272
|
+
tablet: "none"
|
|
273
|
+
},
|
|
274
|
+
flexShrink: 0
|
|
275
|
+
},
|
|
276
|
+
sectionBlock: {
|
|
277
|
+
alignSelf: "stretch",
|
|
278
|
+
borderBlockStartColor: "border/minimal",
|
|
279
|
+
borderBlockStartStyle: "solid",
|
|
280
|
+
borderBlockStartWidth: "1",
|
|
281
|
+
display: {
|
|
282
|
+
base: "flex",
|
|
283
|
+
tablet: "none"
|
|
284
|
+
},
|
|
285
|
+
flexDirection: "column",
|
|
286
|
+
marginInline: "-16",
|
|
287
|
+
paddingBlockStart: "16",
|
|
288
|
+
paddingInline: "16"
|
|
289
|
+
},
|
|
290
|
+
sectionTitle: {
|
|
291
|
+
color: "text/primary",
|
|
292
|
+
textStyle: "heading/mobile/h1",
|
|
293
|
+
truncate: true
|
|
294
|
+
},
|
|
255
295
|
tabs: {
|
|
256
296
|
marginBlockEnd: rem(-1),
|
|
257
297
|
paddingInlineEnd: {
|
|
@@ -266,6 +306,12 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
266
306
|
}
|
|
267
307
|
},
|
|
268
308
|
compoundVariants: [
|
|
309
|
+
{
|
|
310
|
+
contentVariant: "title",
|
|
311
|
+
hasBreadcrumb: true,
|
|
312
|
+
hasSidebar: true,
|
|
313
|
+
css: { title: { base: { textStyle: "heading/mobile/h2" } } }
|
|
314
|
+
},
|
|
269
315
|
{
|
|
270
316
|
hasBreadcrumb: true,
|
|
271
317
|
variant: "minimal",
|
|
@@ -344,6 +390,22 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
344
390
|
false: {}
|
|
345
391
|
},
|
|
346
392
|
/**
|
|
393
|
+
* From the component's `onMenuClick`: the mobile layout for a page with a sidebar
|
|
394
|
+
* (`PageHeader - mobile`, `hasSidebar=true`). The title row tightens up — 12 above, 8 to the
|
|
395
|
+
* trail — and the title steps down to leave the section name as the page's large heading. All
|
|
396
|
+
* `base`: from `tablet` the header is the ordinary one.
|
|
397
|
+
*/
|
|
398
|
+
hasSidebar: {
|
|
399
|
+
true: {
|
|
400
|
+
headerBlock: { base: {
|
|
401
|
+
gap: "8",
|
|
402
|
+
paddingBlockStart: "12"
|
|
403
|
+
} },
|
|
404
|
+
title: { base: { textStyle: "heading/mobile/h3" } }
|
|
405
|
+
},
|
|
406
|
+
false: {}
|
|
407
|
+
},
|
|
408
|
+
/**
|
|
347
409
|
* From the component's `showDivider`. The header's background is the page's, so without the line
|
|
348
410
|
* the bottom padding reads as nothing but a margin -- one the page cannot shrink -- and it goes
|
|
349
411
|
* with the line. Flat values, so the collapsed row's `tablet` padding still centres it, and
|
|
@@ -407,6 +469,7 @@ var pageHeaderSlotRecipe = defineSlotRecipe({
|
|
|
407
469
|
hasBreadcrumb: false,
|
|
408
470
|
hasControls: false,
|
|
409
471
|
hasDivider: true,
|
|
472
|
+
hasSidebar: false,
|
|
410
473
|
isSticky: false,
|
|
411
474
|
variant: "default"
|
|
412
475
|
}
|