@bitrise/bitkit-v2 0.3.502-beta.3234 → 0.3.502-beta.3237
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/AGENTS.md +7 -3
- package/dist/components/BitkitButton/BitkitButton.d.ts +7 -0
- package/dist/components/BitkitButton/BitkitButton.js +11 -3
- package/dist/components/BitkitButton/BitkitButton.js.map +1 -1
- package/dist/components/BitkitCalendar/components/CalendarMonth.js +1 -1
- package/dist/components/BitkitFilter/BitkitFilter.d.ts +9 -4
- package/dist/components/BitkitFilter/BitkitFilter.js +6 -4
- package/dist/components/BitkitFilter/BitkitFilter.js.map +1 -1
- package/dist/components/BitkitFilter/BitkitFilterAdd.js +1 -1
- package/dist/components/BitkitIconButton/BitkitIconButton.d.ts +7 -0
- package/dist/components/BitkitIconButton/BitkitIconButton.js +24 -14
- package/dist/components/BitkitIconButton/BitkitIconButton.js.map +1 -1
- package/dist/components/BitkitPageHeader/BitkitPageHeader.d.ts +28 -6
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js +3 -5
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js.map +1 -1
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.d.ts +0 -2
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.js +1 -2
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.js.map +1 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.d.ts +0 -2
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js +1 -2
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js.map +1 -1
- package/dist/components/BitkitTooltip/BitkitTooltip.d.ts +3 -3
- package/dist/components/BitkitTooltip/BitkitTooltip.js.map +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/main.js +2 -4
- package/dist/theme/recipes/index.js +0 -2
- package/dist/theme/recipes/index.js.map +1 -1
- package/dist/theme/slot-recipes/Filter.recipe.d.ts +8 -0
- package/dist/theme/slot-recipes/Filter.recipe.js +28 -22
- package/dist/theme/slot-recipes/Filter.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/PageHeader.recipe.d.ts +27 -10
- package/dist/theme/slot-recipes/PageHeader.recipe.js +22 -18
- package/dist/theme/slot-recipes/PageHeader.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/StepCard.recipe.js +1 -1
- package/dist/theme/slot-recipes/StepCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +19 -43
- package/dist/theme/slot-recipes/index.js +0 -2
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/dist/utilities/focusableDisabledProps.d.ts +20 -0
- package/dist/utilities/focusableDisabledProps.js +23 -0
- package/dist/utilities/focusableDisabledProps.js.map +1 -0
- package/package.json +1 -2
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.d.ts +0 -16
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.js +0 -21
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.js.map +0 -1
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.d.ts +0 -18
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.js +0 -61
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.js.map +0 -1
- package/dist/theme/common/ContentWidth.common.d.ts +0 -20
- package/dist/theme/common/ContentWidth.common.js +0 -15
- package/dist/theme/common/ContentWidth.common.js.map +0 -1
- package/dist/theme/recipes/ContentWrapper.recipe.d.ts +0 -18
- package/dist/theme/recipes/ContentWrapper.recipe.js +0 -29
- package/dist/theme/recipes/ContentWrapper.recipe.js.map +0 -1
- package/dist/theme/slot-recipes/PageSubheader.recipe.d.ts +0 -28
- package/dist/theme/slot-recipes/PageSubheader.recipe.js +0 -139
- package/dist/theme/slot-recipes/PageSubheader.recipe.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region lib/utilities/focusableDisabledProps.ts
|
|
2
|
+
/**
|
|
3
|
+
* Disables a button without the native `disabled` attribute, for a button whose tooltip explains
|
|
4
|
+
* why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could
|
|
5
|
+
* never open. It stays focusable and is announced as unavailable via `aria-disabled`.
|
|
6
|
+
*
|
|
7
|
+
* Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,
|
|
8
|
+
* Space and a form's implicit submission all go through, so nothing activates the button; it also
|
|
9
|
+
* replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway.
|
|
10
|
+
* `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be
|
|
11
|
+
* exactly `""`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `""`
|
|
12
|
+
* as disabled.
|
|
13
|
+
*/
|
|
14
|
+
var focusableDisabledProps = {
|
|
15
|
+
"aria-disabled": true,
|
|
16
|
+
"data-disabled": "",
|
|
17
|
+
onClick: (event) => event.preventDefault(),
|
|
18
|
+
onKeyDown: void 0
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { focusableDisabledProps as default };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=focusableDisabledProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focusableDisabledProps.js","names":[],"sources":["../../lib/utilities/focusableDisabledProps.ts"],"sourcesContent":["import { type MouseEvent } from 'react';\n\n/**\n * Disables a button without the native `disabled` attribute, for a button whose tooltip explains\n * why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could\n * never open. It stays focusable and is announced as unavailable via `aria-disabled`.\n *\n * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,\n * Space and a form's implicit submission all go through, so nothing activates the button; it also\n * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway.\n * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be\n * exactly `\"\"`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `\"\"`\n * as disabled.\n */\nconst focusableDisabledProps = {\n 'aria-disabled': true,\n 'data-disabled': '',\n onClick: (event: MouseEvent) => event.preventDefault(),\n onKeyDown: undefined,\n} as const;\n\nexport default focusableDisabledProps;\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAM,yBAAyB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,UAAU,UAAsB,MAAM,eAAe;CACrD,WAAW,KAAA;AACb"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.502-beta.
|
|
4
|
+
"version": "0.3.502-beta.3237",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
"react": "^18.3.1",
|
|
90
90
|
"react-dom": "^18.3.1",
|
|
91
91
|
"release-it": "^21.1.1",
|
|
92
|
-
"remark-gfm": "^4.0.1",
|
|
93
92
|
"storybook": "10.6.2",
|
|
94
93
|
"svgo": "~3.3.4",
|
|
95
94
|
"tsx": "^4.23.15",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '@chakra-ui/react/box';
|
|
2
|
-
import { ContentWidth } from '../../theme/common/ContentWidth.common';
|
|
3
|
-
/** A page content width: one of the `layout/maxWidth` tokens, or `full` for no cap. */
|
|
4
|
-
export type BitkitContentWidth = ContentWidth;
|
|
5
|
-
export interface BitkitContentWrapperProps extends BoxProps {
|
|
6
|
-
/**
|
|
7
|
-
* Side-by-side columns from `tablet` up, as a CSS grid template — `'1fr 1fr'` for two equal columns,
|
|
8
|
-
* `'1fr 25rem'` for one that fills next to a fixed one. Below `tablet` the columns stack.
|
|
9
|
-
*/
|
|
10
|
-
columnTemplate?: string;
|
|
11
|
-
/** The cap on the page's content column, padding included. Pick the same value for the page header above it. */
|
|
12
|
-
contentWidth: BitkitContentWidth;
|
|
13
|
-
}
|
|
14
|
-
/** The page's content grid: capped at a `layout/maxWidth` token, centred, one column of sections 32 apart unless `columnTemplate` says otherwise. */
|
|
15
|
-
declare const BitkitContentWrapper: import('react').ForwardRefExoticComponent<BitkitContentWrapperProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export default BitkitContentWrapper;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useRecipe } from "@chakra-ui/react/styled-system";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { Box } from "@chakra-ui/react/box";
|
|
5
|
-
//#region lib/components/BitkitContentWrapper/BitkitContentWrapper.tsx
|
|
6
|
-
/** The page's content grid: capped at a `layout/maxWidth` token, centred, one column of sections 32 apart unless `columnTemplate` says otherwise. */
|
|
7
|
-
var BitkitContentWrapper = forwardRef((props, ref) => {
|
|
8
|
-
const { columnTemplate, contentWidth, css, ...rest } = props;
|
|
9
|
-
const recipe = useRecipe({ key: "contentWrapper" });
|
|
10
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
11
|
-
css: [recipe({ contentWidth }), css],
|
|
12
|
-
gridTemplateColumns: columnTemplate ? { tablet: columnTemplate } : void 0,
|
|
13
|
-
ref,
|
|
14
|
-
...rest
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
BitkitContentWrapper.displayName = "BitkitContentWrapper";
|
|
18
|
-
//#endregion
|
|
19
|
-
export { BitkitContentWrapper as default };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=BitkitContentWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitContentWrapper.js","names":[],"sources":["../../../lib/components/BitkitContentWrapper/BitkitContentWrapper.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { type ContentWidth } from '../../theme/common/ContentWidth.common';\n\n/** A page content width: one of the `layout/maxWidth` tokens, or `full` for no cap. */\nexport type BitkitContentWidth = ContentWidth;\n\nexport interface BitkitContentWrapperProps extends BoxProps {\n /**\n * Side-by-side columns from `tablet` up, as a CSS grid template — `'1fr 1fr'` for two equal columns,\n * `'1fr 25rem'` for one that fills next to a fixed one. Below `tablet` the columns stack.\n */\n columnTemplate?: string;\n /** The cap on the page's content column, padding included. Pick the same value for the page header above it. */\n contentWidth: BitkitContentWidth;\n}\n\n/** The page's content grid: capped at a `layout/maxWidth` token, centred, one column of sections 32 apart unless `columnTemplate` says otherwise. */\nconst BitkitContentWrapper = forwardRef<HTMLDivElement, BitkitContentWrapperProps>((props, ref) => {\n const { columnTemplate, contentWidth, css, ...rest } = props;\n\n const recipe = useRecipe({ key: 'contentWrapper' });\n\n return (\n <Box\n css={[recipe({ contentWidth }), css]}\n gridTemplateColumns={columnTemplate ? { tablet: columnTemplate } : undefined}\n ref={ref}\n {...rest}\n />\n );\n});\n\nBitkitContentWrapper.displayName = 'BitkitContentWrapper';\n\nexport default BitkitContentWrapper;\n"],"mappings":";;;;;;AAoBA,IAAM,uBAAuB,YAAuD,OAAO,QAAQ;CACjG,MAAM,EAAE,gBAAgB,cAAc,KAAK,GAAG,SAAS;CAEvD,MAAM,SAAS,UAAU,EAAE,KAAK,iBAAiB,CAAC;CAElD,OACE,oBAAC,KAAD;EACE,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG,GAAG;EACnC,qBAAqB,iBAAiB,EAAE,QAAQ,eAAe,IAAI,KAAA;EAC9D;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,qBAAqB,cAAc"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '@chakra-ui/react/box';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { BitkitContentWidth } from '../BitkitContentWrapper/BitkitContentWrapper';
|
|
4
|
-
export interface BitkitPageSubheaderProps extends Omit<BoxProps, 'title'> {
|
|
5
|
-
/** The actions, secondary first and primary last — mobile shows them the other way round. */
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
/** Caps the content at the page content column's width, so the title lines up with it. Use the `BitkitContentWrapper`'s value. */
|
|
8
|
-
contentWidth?: BitkitContentWidth;
|
|
9
|
-
/** One line under the title, inline content such as a "Learn more" link included. */
|
|
10
|
-
secondaryText?: ReactNode;
|
|
11
|
-
/** A `BitkitTabs.List`, rendered under the title; wrap the page in `BitkitTabs.Root` so the panels can live outside. */
|
|
12
|
-
tabs?: ReactNode;
|
|
13
|
-
/** The sub-page title, rendered as an `h2` under the page header's `h1`. */
|
|
14
|
-
title: string;
|
|
15
|
-
}
|
|
16
|
-
/** The title bar of a sub-page, under a page header whose sidebar sits beside the content. */
|
|
17
|
-
declare const BitkitPageSubheader: import('react').ForwardRefExoticComponent<BitkitPageSubheaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export default BitkitPageSubheader;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { isEmptyNode } from "../../utilities/isEmptyNode.js";
|
|
2
|
-
import BitkitOverflowTooltip from "../BitkitOverflowTooltip/BitkitOverflowTooltip.js";
|
|
3
|
-
import useIsTruncated from "../../utilities/useIsTruncated.js";
|
|
4
|
-
import { useSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Box } from "@chakra-ui/react/box";
|
|
8
|
-
import { Text } from "@chakra-ui/react/text";
|
|
9
|
-
//#region lib/components/BitkitPageSubheader/BitkitPageSubheader.tsx
|
|
10
|
-
/** The title bar of a sub-page, under a page header whose sidebar sits beside the content. */
|
|
11
|
-
var BitkitPageSubheader = forwardRef((props, ref) => {
|
|
12
|
-
const { children, contentWidth, css, secondaryText, tabs, title, ...rest } = props;
|
|
13
|
-
const hasActions = !isEmptyNode(children);
|
|
14
|
-
const hasSecondaryText = !isEmptyNode(secondaryText);
|
|
15
|
-
const hasTabs = !isEmptyNode(tabs);
|
|
16
|
-
const { isTruncated: isTitleTruncated, ref: titleRef } = useIsTruncated(title);
|
|
17
|
-
const styles = useSlotRecipe({ key: "pageSubheader" })({
|
|
18
|
-
contentWidth,
|
|
19
|
-
hasTabs
|
|
20
|
-
});
|
|
21
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
22
|
-
css: [styles.root, css],
|
|
23
|
-
ref,
|
|
24
|
-
...rest,
|
|
25
|
-
children: /* @__PURE__ */ jsxs(Box, {
|
|
26
|
-
css: styles.contentBlock,
|
|
27
|
-
children: [/* @__PURE__ */ jsxs(Box, {
|
|
28
|
-
css: styles.headerBlock,
|
|
29
|
-
children: [/* @__PURE__ */ jsxs(Box, {
|
|
30
|
-
css: styles.textBlock,
|
|
31
|
-
children: [/* @__PURE__ */ jsx(BitkitOverflowTooltip, {
|
|
32
|
-
disabled: !isTitleTruncated,
|
|
33
|
-
placement: "bottom-start",
|
|
34
|
-
text: title,
|
|
35
|
-
children: /* @__PURE__ */ jsx(Text, {
|
|
36
|
-
as: "h2",
|
|
37
|
-
css: styles.title,
|
|
38
|
-
ref: titleRef,
|
|
39
|
-
tabIndex: isTitleTruncated ? 0 : void 0,
|
|
40
|
-
children: title
|
|
41
|
-
})
|
|
42
|
-
}), hasSecondaryText && /* @__PURE__ */ jsx(Text, {
|
|
43
|
-
css: styles.secondaryText,
|
|
44
|
-
children: secondaryText
|
|
45
|
-
})]
|
|
46
|
-
}), hasActions && /* @__PURE__ */ jsx(Box, {
|
|
47
|
-
css: styles.actionBlock,
|
|
48
|
-
children
|
|
49
|
-
})]
|
|
50
|
-
}), hasTabs && /* @__PURE__ */ jsx(Box, {
|
|
51
|
-
css: styles.tabs,
|
|
52
|
-
children: tabs
|
|
53
|
-
})]
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
BitkitPageSubheader.displayName = "BitkitPageSubheader";
|
|
58
|
-
//#endregion
|
|
59
|
-
export { BitkitPageSubheader as default };
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=BitkitPageSubheader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitPageSubheader.js","names":[],"sources":["../../../lib/components/BitkitPageSubheader/BitkitPageSubheader.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { isEmptyNode } from '../../utilities/isEmptyNode';\nimport useIsTruncated from '../../utilities/useIsTruncated';\nimport { type BitkitContentWidth } from '../BitkitContentWrapper/BitkitContentWrapper';\nimport BitkitOverflowTooltip from '../BitkitOverflowTooltip/BitkitOverflowTooltip';\n\nexport interface BitkitPageSubheaderProps extends Omit<BoxProps, 'title'> {\n /** The actions, secondary first and primary last — mobile shows them the other way round. */\n children?: ReactNode;\n /** Caps the content at the page content column's width, so the title lines up with it. Use the `BitkitContentWrapper`'s value. */\n contentWidth?: BitkitContentWidth;\n /** One line under the title, inline content such as a \"Learn more\" link included. */\n secondaryText?: ReactNode;\n /** A `BitkitTabs.List`, rendered under the title; wrap the page in `BitkitTabs.Root` so the panels can live outside. */\n tabs?: ReactNode;\n /** The sub-page title, rendered as an `h2` under the page header's `h1`. */\n title: string;\n}\n\n/** The title bar of a sub-page, under a page header whose sidebar sits beside the content. */\nconst BitkitPageSubheader = forwardRef<HTMLDivElement, BitkitPageSubheaderProps>((props, ref) => {\n const { children, contentWidth, css, secondaryText, tabs, title, ...rest } = props;\n\n const hasActions = !isEmptyNode(children);\n const hasSecondaryText = !isEmptyNode(secondaryText);\n const hasTabs = !isEmptyNode(tabs);\n\n const { isTruncated: isTitleTruncated, ref: titleRef } = useIsTruncated<HTMLHeadingElement>(title);\n\n const recipe = useSlotRecipe({ key: 'pageSubheader' });\n const styles = recipe({ contentWidth, hasTabs });\n\n return (\n <Box css={[styles.root, css]} ref={ref} {...rest}>\n <Box css={styles.contentBlock}>\n <Box css={styles.headerBlock}>\n <Box css={styles.textBlock}>\n <BitkitOverflowTooltip disabled={!isTitleTruncated} placement=\"bottom-start\" text={title}>\n <Text as=\"h2\" css={styles.title} ref={titleRef} tabIndex={isTitleTruncated ? 0 : undefined}>\n {title}\n </Text>\n </BitkitOverflowTooltip>\n\n {hasSecondaryText && <Text css={styles.secondaryText}>{secondaryText}</Text>}\n </Box>\n\n {hasActions && <Box css={styles.actionBlock}>{children}</Box>}\n </Box>\n\n {hasTabs && <Box css={styles.tabs}>{tabs}</Box>}\n </Box>\n </Box>\n );\n});\n\nBitkitPageSubheader.displayName = 'BitkitPageSubheader';\n\nexport default BitkitPageSubheader;\n"],"mappings":";;;;;;;;;;AAwBA,IAAM,sBAAsB,YAAsD,OAAO,QAAQ;CAC/F,MAAM,EAAE,UAAU,cAAc,KAAK,eAAe,MAAM,OAAO,GAAG,SAAS;CAE7E,MAAM,aAAa,CAAC,YAAY,QAAQ;CACxC,MAAM,mBAAmB,CAAC,YAAY,aAAa;CACnD,MAAM,UAAU,CAAC,YAAY,IAAI;CAEjC,MAAM,EAAE,aAAa,kBAAkB,KAAK,aAAa,eAAmC,KAAK;CAGjG,MAAM,SADS,cAAc,EAAE,KAAK,gBAAgB,CACrC,CAAA,CAAO;EAAE;EAAc;CAAQ,CAAC;CAE/C,OACE,oBAAC,KAAD;EAAK,KAAK,CAAC,OAAO,MAAM,GAAG;EAAQ;EAAK,GAAI;EAC1C,UAAA,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAjB,UAAA,CACE,qBAAC,KAAD;IAAK,KAAK,OAAO;IAAjB,UAAA,CACE,qBAAC,KAAD;KAAK,KAAK,OAAO;KAAjB,UAAA,CACE,oBAAC,uBAAD;MAAuB,UAAU,CAAC;MAAkB,WAAU;MAAe,MAAM;MACjF,UAAA,oBAAC,MAAD;OAAM,IAAG;OAAK,KAAK,OAAO;OAAO,KAAK;OAAU,UAAU,mBAAmB,IAAI,KAAA;OAC9E,UAAA;MACG,CAAA;KACe,CAAA,GAEtB,oBAAoB,oBAAC,MAAD;MAAM,KAAK,OAAO;MAAgB,UAAA;KAAoB,CAAA,CACxE;IAEJ,CAAA,GAAA,cAAc,oBAAC,KAAD;KAAK,KAAK,OAAO;KAAc;IAAc,CAAA,CACzD;GAEJ,CAAA,GAAA,WAAW,oBAAC,KAAD;IAAK,KAAK,OAAO;IAAO,UAAA;GAAU,CAAA,CAC3C;;CACF,CAAA;AAET,CAAC;AAED,oBAAoB,cAAc"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** The page content widths: a `layout/maxWidth` cap, padding included, or `full` for none. */
|
|
2
|
-
declare const contentWidthStyles: {
|
|
3
|
-
readonly '640': {
|
|
4
|
-
readonly maxWidth: "layout/maxWidth/640";
|
|
5
|
-
};
|
|
6
|
-
readonly '960': {
|
|
7
|
-
readonly maxWidth: "layout/maxWidth/960";
|
|
8
|
-
};
|
|
9
|
-
readonly '1280': {
|
|
10
|
-
readonly maxWidth: "layout/maxWidth/1280";
|
|
11
|
-
};
|
|
12
|
-
readonly '1616': {
|
|
13
|
-
readonly maxWidth: "layout/maxWidth/1616";
|
|
14
|
-
};
|
|
15
|
-
readonly full: {};
|
|
16
|
-
};
|
|
17
|
-
export type ContentWidth = keyof typeof contentWidthStyles;
|
|
18
|
-
/** The `maxWidth` token for a content width, or nothing for `full` and no width at all. */
|
|
19
|
-
export declare const contentMaxWidth: (contentWidth?: ContentWidth) => "layout/maxWidth/640" | "layout/maxWidth/960" | "layout/maxWidth/1280" | "layout/maxWidth/1616" | undefined;
|
|
20
|
-
export default contentWidthStyles;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region lib/theme/common/ContentWidth.common.ts
|
|
2
|
-
/** The page content widths: a `layout/maxWidth` cap, padding included, or `full` for none. */
|
|
3
|
-
var contentWidthStyles = {
|
|
4
|
-
"640": { maxWidth: "layout/maxWidth/640" },
|
|
5
|
-
"960": { maxWidth: "layout/maxWidth/960" },
|
|
6
|
-
"1280": { maxWidth: "layout/maxWidth/1280" },
|
|
7
|
-
"1616": { maxWidth: "layout/maxWidth/1616" },
|
|
8
|
-
full: {}
|
|
9
|
-
};
|
|
10
|
-
/** The `maxWidth` token for a content width, or nothing for `full` and no width at all. */
|
|
11
|
-
var contentMaxWidth = (contentWidth) => contentWidth && contentWidth !== "full" ? contentWidthStyles[contentWidth].maxWidth : void 0;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { contentMaxWidth, contentWidthStyles as default };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=ContentWidth.common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentWidth.common.js","names":[],"sources":["../../../lib/theme/common/ContentWidth.common.ts"],"sourcesContent":["/** The page content widths: a `layout/maxWidth` cap, padding included, or `full` for none. */\nconst contentWidthStyles = {\n '640': { maxWidth: 'layout/maxWidth/640' },\n '960': { maxWidth: 'layout/maxWidth/960' },\n '1280': { maxWidth: 'layout/maxWidth/1280' },\n '1616': { maxWidth: 'layout/maxWidth/1616' },\n full: {},\n} as const;\n\nexport type ContentWidth = keyof typeof contentWidthStyles;\n\n/** The `maxWidth` token for a content width, or nothing for `full` and no width at all. */\nexport const contentMaxWidth = (contentWidth?: ContentWidth) =>\n contentWidth && contentWidth !== 'full' ? contentWidthStyles[contentWidth].maxWidth : undefined;\n\nexport default contentWidthStyles;\n"],"mappings":";;AACA,IAAM,qBAAqB;CACzB,OAAO,EAAE,UAAU,sBAAsB;CACzC,OAAO,EAAE,UAAU,sBAAsB;CACzC,QAAQ,EAAE,UAAU,uBAAuB;CAC3C,QAAQ,EAAE,UAAU,uBAAuB;CAC3C,MAAM,CAAC;AACT;;AAKA,IAAa,mBAAmB,iBAC9B,gBAAgB,iBAAiB,SAAS,mBAAmB,aAAa,CAAC,WAAW,KAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const contentWrapperRecipe: import('@chakra-ui/react').RecipeDefinition<{
|
|
2
|
-
contentWidth: {
|
|
3
|
-
readonly '640': {
|
|
4
|
-
readonly maxWidth: "layout/maxWidth/640";
|
|
5
|
-
};
|
|
6
|
-
readonly '960': {
|
|
7
|
-
readonly maxWidth: "layout/maxWidth/960";
|
|
8
|
-
};
|
|
9
|
-
readonly '1280': {
|
|
10
|
-
readonly maxWidth: "layout/maxWidth/1280";
|
|
11
|
-
};
|
|
12
|
-
readonly '1616': {
|
|
13
|
-
readonly maxWidth: "layout/maxWidth/1616";
|
|
14
|
-
};
|
|
15
|
-
readonly full: {};
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
export default contentWrapperRecipe;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import contentWidthStyles from "../common/ContentWidth.common.js";
|
|
2
|
-
import { defineRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
-
//#region lib/theme/recipes/ContentWrapper.recipe.ts
|
|
4
|
-
var contentWrapperRecipe = defineRecipe({
|
|
5
|
-
className: "content-wrapper",
|
|
6
|
-
base: {
|
|
7
|
-
columnGap: {
|
|
8
|
-
base: "32",
|
|
9
|
-
desktop: "64"
|
|
10
|
-
},
|
|
11
|
-
display: "grid",
|
|
12
|
-
gridTemplateColumns: "minmax(0, 1fr)",
|
|
13
|
-
"& > *": { minWidth: 0 },
|
|
14
|
-
marginInline: "auto",
|
|
15
|
-
paddingBlockEnd: "48",
|
|
16
|
-
paddingBlockStart: "32",
|
|
17
|
-
paddingInline: {
|
|
18
|
-
base: "16",
|
|
19
|
-
tablet: "32"
|
|
20
|
-
},
|
|
21
|
-
rowGap: "32",
|
|
22
|
-
width: "100%"
|
|
23
|
-
},
|
|
24
|
-
variants: { contentWidth: contentWidthStyles }
|
|
25
|
-
});
|
|
26
|
-
//#endregion
|
|
27
|
-
export { contentWrapperRecipe as default };
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=ContentWrapper.recipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentWrapper.recipe.js","names":[],"sources":["../../../lib/theme/recipes/ContentWrapper.recipe.ts"],"sourcesContent":["import { defineRecipe } from '@chakra-ui/react/styled-system';\n\nimport contentWidthStyles from '../common/ContentWidth.common';\n\nconst contentWrapperRecipe = defineRecipe({\n className: 'content-wrapper',\n base: {\n columnGap: { base: '32', desktop: '64' },\n display: 'grid',\n gridTemplateColumns: 'minmax(0, 1fr)',\n // Lets a `1fr` column shrink below its content's width instead of overflowing the page.\n '& > *': { minWidth: 0 },\n marginInline: 'auto',\n paddingBlockEnd: '48',\n paddingBlockStart: '32',\n paddingInline: { base: '16', tablet: '32' },\n rowGap: '32',\n width: '100%',\n },\n variants: {\n contentWidth: contentWidthStyles,\n },\n});\n\nexport default contentWrapperRecipe;\n"],"mappings":";;;AAIA,IAAM,uBAAuB,aAAa;CACxC,WAAW;CACX,MAAM;EACJ,WAAW;GAAE,MAAM;GAAM,SAAS;EAAK;EACvC,SAAS;EACT,qBAAqB;EAErB,SAAS,EAAE,UAAU,EAAE;EACvB,cAAc;EACd,iBAAiB;EACjB,mBAAmB;EACnB,eAAe;GAAE,MAAM;GAAM,QAAQ;EAAK;EAC1C,QAAQ;EACR,OAAO;CACT;CACA,UAAU,EACR,cAAc,mBAChB;AACF,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { default as contentWidthStyles } from '../common/ContentWidth.common';
|
|
2
|
-
declare const pageSubheaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "headerBlock" | "contentBlock" | "textBlock" | "actionBlock", {
|
|
3
|
-
contentWidth: { [K in keyof typeof contentWidthStyles]: {
|
|
4
|
-
contentBlock: (typeof contentWidthStyles)[K];
|
|
5
|
-
tabs?: {
|
|
6
|
-
paddingInlineStart: {
|
|
7
|
-
base: string;
|
|
8
|
-
tablet: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
}; };
|
|
12
|
-
hasTabs: {
|
|
13
|
-
true: {
|
|
14
|
-
root: {
|
|
15
|
-
borderBlockEnd: "1px solid";
|
|
16
|
-
borderColor: "border/regular";
|
|
17
|
-
};
|
|
18
|
-
headerBlock: {
|
|
19
|
-
paddingBlockEnd: {
|
|
20
|
-
base: "16";
|
|
21
|
-
tablet: "24";
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
false: {};
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
export default pageSubheaderSlotRecipe;
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { rem } from "../themeUtils.js";
|
|
2
|
-
import contentWidthStyles from "../common/ContentWidth.common.js";
|
|
3
|
-
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
4
|
-
//#region lib/theme/slot-recipes/PageSubheader.recipe.ts
|
|
5
|
-
var pageSubheaderSlotRecipe = defineSlotRecipe({
|
|
6
|
-
className: "page-subheader",
|
|
7
|
-
slots: [
|
|
8
|
-
"root",
|
|
9
|
-
"contentBlock",
|
|
10
|
-
"headerBlock",
|
|
11
|
-
"textBlock",
|
|
12
|
-
"title",
|
|
13
|
-
"secondaryText",
|
|
14
|
-
"actionBlock",
|
|
15
|
-
"tabs"
|
|
16
|
-
],
|
|
17
|
-
base: {
|
|
18
|
-
root: {
|
|
19
|
-
background: "background/primary",
|
|
20
|
-
display: "flex",
|
|
21
|
-
flexDirection: "column",
|
|
22
|
-
width: "100%"
|
|
23
|
-
},
|
|
24
|
-
contentBlock: {
|
|
25
|
-
display: "flex",
|
|
26
|
-
flexDirection: "column",
|
|
27
|
-
marginInline: "auto",
|
|
28
|
-
width: "100%"
|
|
29
|
-
},
|
|
30
|
-
headerBlock: {
|
|
31
|
-
alignItems: {
|
|
32
|
-
base: "stretch",
|
|
33
|
-
tablet: "flex-end"
|
|
34
|
-
},
|
|
35
|
-
display: "flex",
|
|
36
|
-
flexDirection: {
|
|
37
|
-
base: "column",
|
|
38
|
-
tablet: "row"
|
|
39
|
-
},
|
|
40
|
-
gap: {
|
|
41
|
-
base: "16",
|
|
42
|
-
tablet: "32"
|
|
43
|
-
},
|
|
44
|
-
paddingBlockEnd: {
|
|
45
|
-
base: "16",
|
|
46
|
-
tablet: "0"
|
|
47
|
-
},
|
|
48
|
-
paddingBlockStart: {
|
|
49
|
-
base: "16",
|
|
50
|
-
tablet: "32"
|
|
51
|
-
},
|
|
52
|
-
paddingInline: {
|
|
53
|
-
base: "16",
|
|
54
|
-
tablet: "32"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
textBlock: {
|
|
58
|
-
display: "flex",
|
|
59
|
-
flex: {
|
|
60
|
-
base: "none",
|
|
61
|
-
tablet: "1 0 0"
|
|
62
|
-
},
|
|
63
|
-
flexDirection: "column",
|
|
64
|
-
gap: {
|
|
65
|
-
base: "4",
|
|
66
|
-
tablet: "0"
|
|
67
|
-
},
|
|
68
|
-
minWidth: 0
|
|
69
|
-
},
|
|
70
|
-
title: {
|
|
71
|
-
color: "text/primary",
|
|
72
|
-
paddingBlockEnd: {
|
|
73
|
-
base: "0",
|
|
74
|
-
tablet: "4"
|
|
75
|
-
},
|
|
76
|
-
textStyle: {
|
|
77
|
-
base: "heading/mobile/h1",
|
|
78
|
-
tablet: "heading/h2"
|
|
79
|
-
},
|
|
80
|
-
truncate: true
|
|
81
|
-
},
|
|
82
|
-
secondaryText: {
|
|
83
|
-
color: "text/secondary",
|
|
84
|
-
textStyle: "body/md/regular"
|
|
85
|
-
},
|
|
86
|
-
actionBlock: {
|
|
87
|
-
display: "flex",
|
|
88
|
-
flexShrink: 0,
|
|
89
|
-
flexDirection: {
|
|
90
|
-
base: "row-reverse",
|
|
91
|
-
tablet: "row"
|
|
92
|
-
},
|
|
93
|
-
flexWrap: {
|
|
94
|
-
base: "wrap-reverse",
|
|
95
|
-
tablet: "wrap"
|
|
96
|
-
},
|
|
97
|
-
gap: "12",
|
|
98
|
-
"& > *": { flex: {
|
|
99
|
-
base: "1 1 auto",
|
|
100
|
-
tablet: "none"
|
|
101
|
-
} }
|
|
102
|
-
},
|
|
103
|
-
tabs: {
|
|
104
|
-
marginBlockEnd: rem(-1),
|
|
105
|
-
paddingInlineEnd: "32",
|
|
106
|
-
paddingInlineStart: "16"
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
variants: {
|
|
110
|
-
contentWidth: Object.fromEntries(Object.entries(contentWidthStyles).map(([key, styles]) => [key, key === "full" ? { contentBlock: styles } : {
|
|
111
|
-
contentBlock: styles,
|
|
112
|
-
tabs: { paddingInlineStart: {
|
|
113
|
-
base: "16",
|
|
114
|
-
tablet: "32"
|
|
115
|
-
} }
|
|
116
|
-
}])),
|
|
117
|
-
hasTabs: {
|
|
118
|
-
true: {
|
|
119
|
-
root: {
|
|
120
|
-
borderBlockEnd: "1px solid",
|
|
121
|
-
borderColor: "border/regular"
|
|
122
|
-
},
|
|
123
|
-
headerBlock: { paddingBlockEnd: {
|
|
124
|
-
base: "16",
|
|
125
|
-
tablet: "24"
|
|
126
|
-
} }
|
|
127
|
-
},
|
|
128
|
-
false: {}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
defaultVariants: {
|
|
132
|
-
contentWidth: "full",
|
|
133
|
-
hasTabs: false
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
//#endregion
|
|
137
|
-
export { pageSubheaderSlotRecipe as default };
|
|
138
|
-
|
|
139
|
-
//# sourceMappingURL=PageSubheader.recipe.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageSubheader.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/PageSubheader.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport contentWidthStyles from '../common/ContentWidth.common';\nimport { rem } from '../themeUtils';\n\nconst pageSubheaderSlotRecipe = defineSlotRecipe({\n className: 'page-subheader',\n slots: ['root', 'contentBlock', 'headerBlock', 'textBlock', 'title', 'secondaryText', 'actionBlock', 'tabs'] as const,\n base: {\n root: {\n background: 'background/primary',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n contentBlock: {\n display: 'flex',\n flexDirection: 'column',\n marginInline: 'auto',\n width: '100%',\n },\n headerBlock: {\n alignItems: { base: 'stretch', tablet: 'flex-end' },\n display: 'flex',\n flexDirection: { base: 'column', tablet: 'row' },\n gap: { base: '16', tablet: '32' },\n paddingBlockEnd: { base: '16', tablet: '0' },\n paddingBlockStart: { base: '16', tablet: '32' },\n paddingInline: { base: '16', tablet: '32' },\n },\n textBlock: {\n display: 'flex',\n flex: { base: 'none', tablet: '1 0 0' },\n flexDirection: 'column',\n gap: { base: '4', tablet: '0' },\n minWidth: 0,\n },\n title: {\n color: 'text/primary',\n // Desktop keeps the design's 4px under the title with or without the secondary text; mobile has a gap instead.\n paddingBlockEnd: { base: '0', tablet: '4' },\n textStyle: { base: 'heading/mobile/h1', tablet: 'heading/h2' },\n truncate: true,\n },\n secondaryText: {\n color: 'text/secondary',\n textStyle: 'body/md/regular',\n },\n actionBlock: {\n display: 'flex',\n flexShrink: 0,\n // Mobile puts the primary action first, so the row (and its lines, once they wrap) reverses the DOM order.\n flexDirection: { base: 'row-reverse', tablet: 'row' },\n flexWrap: { base: 'wrap-reverse', tablet: 'wrap' },\n gap: '12',\n '& > *': { flex: { base: '1 1 auto', tablet: 'none' } },\n },\n tabs: {\n // Lands the tab list's own bottom line on the root's border, so the subheader keeps one edge.\n marginBlockEnd: rem(-1),\n paddingInlineEnd: '32',\n paddingInlineStart: '16',\n },\n },\n variants: {\n contentWidth: Object.fromEntries(\n Object.entries(contentWidthStyles).map(([key, styles]) => [\n key,\n // The capped design insets the tabs by 32, the full-width one by 16 (pending a design answer on which is right).\n key === 'full'\n ? { contentBlock: styles }\n : { contentBlock: styles, tabs: { paddingInlineStart: { base: '16', tablet: '32' } } },\n ]),\n ) as {\n [K in keyof typeof contentWidthStyles]: {\n contentBlock: (typeof contentWidthStyles)[K];\n tabs?: { paddingInlineStart: { base: string; tablet: string } };\n };\n },\n hasTabs: {\n true: {\n root: {\n borderBlockEnd: '1px solid',\n borderColor: 'border/regular',\n },\n headerBlock: {\n paddingBlockEnd: { base: '16', tablet: '24' },\n },\n },\n false: {},\n },\n },\n defaultVariants: {\n contentWidth: 'full',\n hasTabs: false,\n },\n});\n\nexport default pageSubheaderSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,0BAA0B,iBAAiB;CAC/C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAgB;EAAe;EAAa;EAAS;EAAiB;EAAe;CAAM;CAC3G,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,eAAe;GACf,OAAO;EACT;EACA,cAAc;GACZ,SAAS;GACT,eAAe;GACf,cAAc;GACd,OAAO;EACT;EACA,aAAa;GACX,YAAY;IAAE,MAAM;IAAW,QAAQ;GAAW;GAClD,SAAS;GACT,eAAe;IAAE,MAAM;IAAU,QAAQ;GAAM;GAC/C,KAAK;IAAE,MAAM;IAAM,QAAQ;GAAK;GAChC,iBAAiB;IAAE,MAAM;IAAM,QAAQ;GAAI;GAC3C,mBAAmB;IAAE,MAAM;IAAM,QAAQ;GAAK;GAC9C,eAAe;IAAE,MAAM;IAAM,QAAQ;GAAK;EAC5C;EACA,WAAW;GACT,SAAS;GACT,MAAM;IAAE,MAAM;IAAQ,QAAQ;GAAQ;GACtC,eAAe;GACf,KAAK;IAAE,MAAM;IAAK,QAAQ;GAAI;GAC9B,UAAU;EACZ;EACA,OAAO;GACL,OAAO;GAEP,iBAAiB;IAAE,MAAM;IAAK,QAAQ;GAAI;GAC1C,WAAW;IAAE,MAAM;IAAqB,QAAQ;GAAa;GAC7D,UAAU;EACZ;EACA,eAAe;GACb,OAAO;GACP,WAAW;EACb;EACA,aAAa;GACX,SAAS;GACT,YAAY;GAEZ,eAAe;IAAE,MAAM;IAAe,QAAQ;GAAM;GACpD,UAAU;IAAE,MAAM;IAAgB,QAAQ;GAAO;GACjD,KAAK;GACL,SAAS,EAAE,MAAM;IAAE,MAAM;IAAY,QAAQ;GAAO,EAAE;EACxD;EACA,MAAM;GAEJ,gBAAgB,IAAI,EAAE;GACtB,kBAAkB;GAClB,oBAAoB;EACtB;CACF;CACA,UAAU;EACR,cAAc,OAAO,YACnB,OAAO,QAAQ,kBAAkB,CAAC,CAAC,KAAK,CAAC,KAAK,YAAY,CACxD,KAEA,QAAQ,SACJ,EAAE,cAAc,OAAO,IACvB;GAAE,cAAc;GAAQ,MAAM,EAAE,oBAAoB;IAAE,MAAM;IAAM,QAAQ;GAAK,EAAE;EAAE,CACzF,CAAC,CACH;EAMA,SAAS;GACP,MAAM;IACJ,MAAM;KACJ,gBAAgB;KAChB,aAAa;IACf;IACA,aAAa,EACX,iBAAiB;KAAE,MAAM;KAAM,QAAQ;IAAK,EAC9C;GACF;GACA,OAAO,CAAC;EACV;CACF;CACA,iBAAiB;EACf,cAAc;EACd,SAAS;CACX;AACF,CAAC"}
|