@bitrise/bitkit-v2 0.3.468-beta.2968 → 0.3.468

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.
Files changed (57) hide show
  1. package/dist/components/BitkitCombobox/BitkitCombobox.d.ts +3 -3
  2. package/dist/components/BitkitCombobox/BitkitCombobox.js +2 -6
  3. package/dist/components/BitkitCombobox/BitkitCombobox.js.map +1 -1
  4. package/dist/components/BitkitMultiselect/BitkitMultiselect.d.ts +3 -3
  5. package/dist/components/BitkitMultiselect/BitkitMultiselect.js +1 -4
  6. package/dist/components/BitkitMultiselect/BitkitMultiselect.js.map +1 -1
  7. package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.d.ts +3 -3
  8. package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js.map +1 -1
  9. package/dist/components/BitkitSelect/BitkitSelect.d.ts +3 -3
  10. package/dist/components/BitkitSelect/BitkitSelect.js +1 -4
  11. package/dist/components/BitkitSelect/BitkitSelect.js.map +1 -1
  12. package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +2 -7
  13. package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js.map +1 -1
  14. package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +3 -3
  15. package/dist/components/BitkitSelectMenu/SelectMenuShell.js +29 -59
  16. package/dist/components/BitkitSelectMenu/SelectMenuShell.js.map +1 -1
  17. package/dist/components/index.d.ts +0 -2
  18. package/dist/main.js +1 -4
  19. package/dist/theme/semantic-tokens/index.d.ts +1 -0
  20. package/dist/theme/semantic-tokens/semanticColors.d.ts +1 -0
  21. package/dist/theme/semantic-tokens/semanticColors.js +10 -7
  22. package/dist/theme/semantic-tokens/semanticColors.js.map +1 -1
  23. package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +2 -14
  24. package/dist/theme/slot-recipes/Select.recipe.d.ts +5 -23
  25. package/dist/theme/slot-recipes/Select.recipe.js +3 -37
  26. package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
  27. package/dist/theme/slot-recipes/index.d.ts +7 -150
  28. package/dist/theme/slot-recipes/index.js +1 -3
  29. package/dist/theme/slot-recipes/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/components/BitkitUISideNav/BitkitUISideNav.d.ts +0 -38
  32. package/dist/components/BitkitUISideNav/BitkitUISideNav.js +0 -167
  33. package/dist/components/BitkitUISideNav/BitkitUISideNav.js.map +0 -1
  34. package/dist/components/BitkitUISideNav/UISideNavBody.d.ts +0 -7
  35. package/dist/components/BitkitUISideNav/UISideNavBody.js +0 -20
  36. package/dist/components/BitkitUISideNav/UISideNavBody.js.map +0 -1
  37. package/dist/components/BitkitUISideNav/UISideNavContext.d.ts +0 -32
  38. package/dist/components/BitkitUISideNav/UISideNavContext.js +0 -28
  39. package/dist/components/BitkitUISideNav/UISideNavContext.js.map +0 -1
  40. package/dist/components/BitkitUISideNav/UISideNavFooter.d.ts +0 -16
  41. package/dist/components/BitkitUISideNav/UISideNavFooter.js +0 -28
  42. package/dist/components/BitkitUISideNav/UISideNavFooter.js.map +0 -1
  43. package/dist/components/BitkitUISideNav/UISideNavFooterHeading.d.ts +0 -12
  44. package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js +0 -26
  45. package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js.map +0 -1
  46. package/dist/components/BitkitUISideNav/UISideNavItem.d.ts +0 -26
  47. package/dist/components/BitkitUISideNav/UISideNavItem.js +0 -33
  48. package/dist/components/BitkitUISideNav/UISideNavItem.js.map +0 -1
  49. package/dist/components/BitkitUISideNav/UISideNavLink.d.ts +0 -30
  50. package/dist/components/BitkitUISideNav/UISideNavLink.js +0 -58
  51. package/dist/components/BitkitUISideNav/UISideNavLink.js.map +0 -1
  52. package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.d.ts +0 -55
  53. package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js +0 -127
  54. package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js.map +0 -1
  55. package/dist/theme/slot-recipes/UISideNav.recipe.d.ts +0 -119
  56. package/dist/theme/slot-recipes/UISideNav.recipe.js +0 -416
  57. package/dist/theme/slot-recipes/UISideNav.recipe.js.map +0 -1
@@ -1,28 +0,0 @@
1
- import { useUISideNavContext } from "./UISideNavContext.js";
2
- import { Box } from "@chakra-ui/react/box";
3
- import { forwardRef } from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { Text } from "@chakra-ui/react/text";
6
- //#region lib/components/BitkitUISideNav/UISideNavFooter.tsx
7
- var UISideNavFooter = forwardRef((props, ref) => {
8
- const { children, css, label, ...rest } = props;
9
- const { styles } = useUISideNavContext();
10
- return /* @__PURE__ */ jsxs(Box, {
11
- ref,
12
- ...rest,
13
- css: [styles.footer, css],
14
- children: [
15
- /* @__PURE__ */ jsx(Box, { css: styles.footerSeparator }),
16
- label && /* @__PURE__ */ jsx(Text, {
17
- css: styles.footerHeading,
18
- children: label
19
- }),
20
- children
21
- ]
22
- });
23
- });
24
- UISideNavFooter.displayName = "BitkitUISideNav.Footer";
25
- //#endregion
26
- export { UISideNavFooter as default };
27
-
28
- //# sourceMappingURL=UISideNavFooter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UISideNavFooter.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavFooter.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport { useUISideNavContext } from './UISideNavContext';\n\nexport interface BitkitUISideNavFooterProps extends BoxProps {\n /**\n * The rows below the navigation. Drop a `FooterHeading` between them to start a further\n * section, the way the mobile drawer parts its status row from its Help links.\n */\n children: ReactNode;\n /**\n * An uppercase heading for the whole block, e.g. `Help`, drawn under the footer's own rule.\n * The desktop rail has nowhere to show one when collapsed, so it usually has none.\n */\n label?: string;\n}\n\nconst UISideNavFooter = forwardRef<HTMLDivElement, BitkitUISideNavFooterProps>((props, ref) => {\n const { children, css, label, ...rest } = props;\n\n const { styles } = useUISideNavContext();\n\n return (\n <Box ref={ref} {...rest} css={[styles.footer, css]}>\n {/* Always drawn: the design parts the footer from the navigation above it in both layouts. */}\n <Box css={styles.footerSeparator} />\n {label && <Text css={styles.footerHeading}>{label}</Text>}\n {children}\n </Box>\n );\n});\n\nUISideNavFooter.displayName = 'BitkitUISideNav.Footer';\n\nexport default UISideNavFooter;\n"],"mappings":";;;;;;AAmBA,IAAM,kBAAkB,YAAwD,OAAO,QAAQ;CAC7F,MAAM,EAAE,UAAU,KAAK,OAAO,GAAG,SAAS;CAE1C,MAAM,EAAE,WAAW,oBAAoB;CAEvC,OACE,qBAAC,KAAD;EAAU;EAAK,GAAI;EAAM,KAAK,CAAC,OAAO,QAAQ,GAAG;EAAjD,UAAA;GAEE,oBAAC,KAAD,EAAK,KAAK,OAAO,gBAAkB,CAAA;GAClC,SAAS,oBAAC,MAAD;IAAM,KAAK,OAAO;IAAgB,UAAA;GAAY,CAAA;GACvD;EACE;;AAET,CAAC;AAED,gBAAgB,cAAc"}
@@ -1,12 +0,0 @@
1
- import { TextProps } from '@chakra-ui/react/text';
2
- export interface BitkitUISideNavFooterHeadingProps extends Omit<TextProps, 'children'> {
3
- /** The heading, e.g. `Help`. Drawn uppercase, so write it in normal case. */
4
- children: string;
5
- }
6
- /**
7
- * Starts a further section inside a footer that already holds rows, bringing a rule of its own.
8
- * A footer that is nothing but one titled section says the same thing with `label` — and without
9
- * the second rule, since the footer already draws one at its top.
10
- */
11
- declare const UISideNavFooterHeading: import('react').ForwardRefExoticComponent<BitkitUISideNavFooterHeadingProps & import('react').RefAttributes<HTMLParagraphElement>>;
12
- export default UISideNavFooterHeading;
@@ -1,26 +0,0 @@
1
- import { useUISideNavContext } from "./UISideNavContext.js";
2
- import { forwardRef } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
- import { Text } from "@chakra-ui/react/text";
5
- //#region lib/components/BitkitUISideNav/UISideNavFooterHeading.tsx
6
- /**
7
- * Starts a further section inside a footer that already holds rows, bringing a rule of its own.
8
- * A footer that is nothing but one titled section says the same thing with `label` — and without
9
- * the second rule, since the footer already draws one at its top.
10
- */
11
- var UISideNavFooterHeading = forwardRef((props, ref) => {
12
- const { children, css, ...rest } = props;
13
- const { styles } = useUISideNavContext();
14
- return /* @__PURE__ */ jsx(Text, {
15
- ref,
16
- "data-section": "",
17
- ...rest,
18
- css: [styles.footerHeading, css],
19
- children
20
- });
21
- });
22
- UISideNavFooterHeading.displayName = "BitkitUISideNav.FooterHeading";
23
- //#endregion
24
- export { UISideNavFooterHeading as default };
25
-
26
- //# sourceMappingURL=UISideNavFooterHeading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UISideNavFooterHeading.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavFooterHeading.tsx"],"sourcesContent":["import { Text, type TextProps } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { useUISideNavContext } from './UISideNavContext';\n\nexport interface BitkitUISideNavFooterHeadingProps extends Omit<TextProps, 'children'> {\n /** The heading, e.g. `Help`. Drawn uppercase, so write it in normal case. */\n children: string;\n}\n\n/**\n * Starts a further section inside a footer that already holds rows, bringing a rule of its own.\n * A footer that is nothing but one titled section says the same thing with `label` — and without\n * the second rule, since the footer already draws one at its top.\n */\nconst UISideNavFooterHeading = forwardRef<HTMLParagraphElement, BitkitUISideNavFooterHeadingProps>((props, ref) => {\n const { children, css, ...rest } = props;\n\n const { styles } = useUISideNavContext();\n\n return (\n <Text ref={ref} data-section=\"\" {...rest} css={[styles.footerHeading, css]}>\n {children}\n </Text>\n );\n});\n\nUISideNavFooterHeading.displayName = 'BitkitUISideNav.FooterHeading';\n\nexport default UISideNavFooterHeading;\n"],"mappings":";;;;;;;;;;AAeA,IAAM,yBAAyB,YAAqE,OAAO,QAAQ;CACjH,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS;CAEnC,MAAM,EAAE,WAAW,oBAAoB;CAEvC,OACE,oBAAC,MAAD;EAAW;EAAK,gBAAa;EAAG,GAAI;EAAM,KAAK,CAAC,OAAO,eAAe,GAAG;EACtE;CACG,CAAA;AAEV,CAAC;AAED,uBAAuB,cAAc"}
@@ -1,26 +0,0 @@
1
- import { HTMLChakraProps } from '@chakra-ui/react/styled-system';
2
- import { BitkitIconComponent } from '../../icons';
3
- export interface BitkitUISideNavItemProps extends Omit<HTMLChakraProps<'a'>, 'children'> {
4
- /**
5
- * The destination. Always an anchor: the platform navigation moves between server-rendered
6
- * product areas, so every row is a real link rather than a button with a handler.
7
- */
8
- href: string;
9
- /**
10
- * The row's label. A string rather than `ReactNode` because the collapsed rail clips it and
11
- * the expanded rail truncates it, neither of which survives arbitrary markup.
12
- */
13
- children: string;
14
- /** Shown at rest. In the collapsed rail this is the only thing visible. */
15
- icon: BitkitIconComponent;
16
- /** Marks the row as the current product area. The consumer decides what counts as current. */
17
- selected?: boolean;
18
- /**
19
- * Swapped in for `icon` while selected. The design pairs an outline icon with its filled
20
- * counterpart, e.g. `IconDashboard` with `IconDashboardFilled`. Without it the outline icon
21
- * stays and only the row's colour and marker change.
22
- */
23
- selectedIcon?: BitkitIconComponent;
24
- }
25
- declare const UISideNavItem: import('react').ForwardRefExoticComponent<BitkitUISideNavItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
26
- export default UISideNavItem;
@@ -1,33 +0,0 @@
1
- import { useUISideNavContext } from "./UISideNavContext.js";
2
- import { Box } from "@chakra-ui/react/box";
3
- import { chakra } from "@chakra-ui/react/styled-system";
4
- import { forwardRef } from "react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { Text } from "@chakra-ui/react/text";
7
- //#region lib/components/BitkitUISideNav/UISideNavItem.tsx
8
- var UISideNavItem = forwardRef((props, ref) => {
9
- const { children, css, icon: Icon, selected, selectedIcon: SelectedIcon, ...rest } = props;
10
- const { styles } = useUISideNavContext();
11
- const RowIcon = selected && SelectedIcon ? SelectedIcon : Icon;
12
- return /* @__PURE__ */ jsxs(chakra.a, {
13
- ref,
14
- "aria-current": selected ? "page" : void 0,
15
- "data-selected": selected ? "" : void 0,
16
- ...rest,
17
- css: [styles.item, css],
18
- children: [
19
- /* @__PURE__ */ jsx(RowIcon, { css: styles.itemIcon }),
20
- /* @__PURE__ */ jsx(Text, {
21
- as: "span",
22
- css: styles.itemLabel,
23
- children
24
- }),
25
- selected && /* @__PURE__ */ jsx(Box, { css: styles.itemIndicator })
26
- ]
27
- });
28
- });
29
- UISideNavItem.displayName = "BitkitUISideNav.Item";
30
- //#endregion
31
- export { UISideNavItem as default };
32
-
33
- //# sourceMappingURL=UISideNavItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UISideNavItem.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavItem.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { chakra, type HTMLChakraProps } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent } from '../../icons';\nimport { useUISideNavContext } from './UISideNavContext';\n\nexport interface BitkitUISideNavItemProps extends Omit<HTMLChakraProps<'a'>, 'children'> {\n /**\n * The destination. Always an anchor: the platform navigation moves between server-rendered\n * product areas, so every row is a real link rather than a button with a handler.\n */\n href: string;\n /**\n * The row's label. A string rather than `ReactNode` because the collapsed rail clips it and\n * the expanded rail truncates it, neither of which survives arbitrary markup.\n */\n children: string;\n /** Shown at rest. In the collapsed rail this is the only thing visible. */\n icon: BitkitIconComponent;\n /** Marks the row as the current product area. The consumer decides what counts as current. */\n selected?: boolean;\n /**\n * Swapped in for `icon` while selected. The design pairs an outline icon with its filled\n * counterpart, e.g. `IconDashboard` with `IconDashboardFilled`. Without it the outline icon\n * stays and only the row's colour and marker change.\n */\n selectedIcon?: BitkitIconComponent;\n}\n\nconst UISideNavItem = forwardRef<HTMLAnchorElement, BitkitUISideNavItemProps>((props, ref) => {\n const { children, css, icon: Icon, selected, selectedIcon: SelectedIcon, ...rest } = props;\n\n const { styles } = useUISideNavContext();\n\n const RowIcon = selected && SelectedIcon ? SelectedIcon : Icon;\n\n // `chakra.a` rather than `Link`: the row is styled entirely by the nav's own `item` slot, and\n // `Link` would layer its own recipe over it.\n return (\n <chakra.a\n ref={ref}\n aria-current={selected ? 'page' : undefined}\n data-selected={selected ? '' : undefined}\n {...rest}\n css={[styles.item, css]}\n >\n <RowIcon css={styles.itemIcon} />\n <Text as=\"span\" css={styles.itemLabel}>\n {children}\n </Text>\n {selected && <Box css={styles.itemIndicator} />}\n </chakra.a>\n );\n});\n\nUISideNavItem.displayName = 'BitkitUISideNav.Item';\n\nexport default UISideNavItem;\n"],"mappings":";;;;;;;AA+BA,IAAM,gBAAgB,YAAyD,OAAO,QAAQ;CAC5F,MAAM,EAAE,UAAU,KAAK,MAAM,MAAM,UAAU,cAAc,cAAc,GAAG,SAAS;CAErF,MAAM,EAAE,WAAW,oBAAoB;CAEvC,MAAM,UAAU,YAAY,eAAe,eAAe;CAI1D,OACE,qBAAC,OAAO,GAAR;EACO;EACL,gBAAc,WAAW,SAAS,KAAA;EAClC,iBAAe,WAAW,KAAK,KAAA;EAC/B,GAAI;EACJ,KAAK,CAAC,OAAO,MAAM,GAAG;EALxB,UAAA;GAOE,oBAAC,SAAD,EAAS,KAAK,OAAO,SAAW,CAAA;GAChC,oBAAC,MAAD;IAAM,IAAG;IAAO,KAAK,OAAO;IACzB;GACG,CAAA;GACL,YAAY,oBAAC,KAAD,EAAK,KAAK,OAAO,cAAgB,CAAA;EACtC;;AAEd,CAAC;AAED,cAAc,cAAc"}
@@ -1,30 +0,0 @@
1
- import { HTMLChakraProps } from '@chakra-ui/react/styled-system';
2
- import { BitkitIconComponent } from '../../icons';
3
- interface UISideNavLinkCommonProps {
4
- children: string;
5
- icon: BitkitIconComponent;
6
- /**
7
- * A second line under the label, for a row that reports something rather than just naming a
8
- * destination. It steps the row up to 56px and the label down to the smaller semibold size.
9
- */
10
- secondaryText?: string;
11
- /**
12
- * A coloured dot on the icon's trailing bottom corner. Use it with `secondaryText`, which is
13
- * what spells the state out; the dot alone only carries colour.
14
- */
15
- status?: 'critical' | 'neutral' | 'success';
16
- }
17
- export interface BitkitUISideNavLinkAsAnchorProps extends UISideNavLinkCommonProps, Omit<HTMLChakraProps<'a'>, 'children'> {
18
- href: string;
19
- /** Adds the north-east arrow and the usual `target`/`rel` pair for a link leaving the app. */
20
- isExternal?: boolean;
21
- }
22
- export interface BitkitUISideNavLinkAsButtonProps extends UISideNavLinkCommonProps, Omit<HTMLChakraProps<'button'>, 'children'> {
23
- href?: undefined;
24
- isExternal?: undefined;
25
- /** Makes the row a button instead of a link — for one that opens a dialog rather than navigating. */
26
- onClick: NonNullable<HTMLChakraProps<'button'>['onClick']>;
27
- }
28
- export type BitkitUISideNavLinkProps = BitkitUISideNavLinkAsAnchorProps | BitkitUISideNavLinkAsButtonProps;
29
- declare const UISideNavLink: import('react').ForwardRefExoticComponent<BitkitUISideNavLinkProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
30
- export default UISideNavLink;
@@ -1,58 +0,0 @@
1
- import IconArrowNortheast from "../../icons/IconArrowNortheast.js";
2
- import { useUISideNavContext } from "./UISideNavContext.js";
3
- import { Box } from "@chakra-ui/react/box";
4
- import { chakra } from "@chakra-ui/react/styled-system";
5
- import { forwardRef } from "react";
6
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
- import { Text } from "@chakra-ui/react/text";
8
- //#region lib/components/BitkitUISideNav/UISideNavLink.tsx
9
- var UISideNavLink = forwardRef((props, ref) => {
10
- const { children, css, href, icon: Icon, isExternal, rel, secondaryText, status, target, ...rest } = props;
11
- const { styles } = useUISideNavContext();
12
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
13
- /* @__PURE__ */ jsxs(Box, {
14
- css: styles.linkIconBlock,
15
- children: [/* @__PURE__ */ jsx(Icon, { css: styles.linkIcon }), status && /* @__PURE__ */ jsx(Box, {
16
- css: styles.linkStatusDot,
17
- "data-status": status
18
- })]
19
- }),
20
- /* @__PURE__ */ jsxs(Box, {
21
- css: styles.linkTextBlock,
22
- children: [/* @__PURE__ */ jsx(Text, {
23
- as: "span",
24
- css: styles.linkLabel,
25
- children
26
- }), secondaryText && /* @__PURE__ */ jsx(Text, {
27
- as: "span",
28
- css: styles.linkSecondaryText,
29
- children: secondaryText
30
- })]
31
- }),
32
- isExternal && /* @__PURE__ */ jsx(IconArrowNortheast, { css: styles.linkIcon })
33
- ] });
34
- const rootProps = {
35
- "data-with-secondary": secondaryText ? "" : void 0,
36
- ...rest,
37
- css: [styles.link, css]
38
- };
39
- if (href === void 0) return /* @__PURE__ */ jsx(chakra.button, {
40
- ref,
41
- type: "button",
42
- ...rootProps,
43
- children: content
44
- });
45
- return /* @__PURE__ */ jsx(chakra.a, {
46
- ref,
47
- href,
48
- rel: isExternal ? rel ? `${rel} noreferrer noopener` : "noreferrer noopener" : rel,
49
- target: isExternal ? "_blank" : target,
50
- ...rootProps,
51
- children: content
52
- });
53
- });
54
- UISideNavLink.displayName = "BitkitUISideNav.Link";
55
- //#endregion
56
- export { UISideNavLink as default };
57
-
58
- //# sourceMappingURL=UISideNavLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UISideNavLink.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavLink.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { chakra, type HTMLChakraProps } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, type Ref } from 'react';\n\nimport { type BitkitIconComponent, IconArrowNortheast } from '../../icons';\nimport { useUISideNavContext } from './UISideNavContext';\n\ninterface UISideNavLinkCommonProps {\n children: string;\n icon: BitkitIconComponent;\n /**\n * A second line under the label, for a row that reports something rather than just naming a\n * destination. It steps the row up to 56px and the label down to the smaller semibold size.\n */\n secondaryText?: string;\n /**\n * A coloured dot on the icon's trailing bottom corner. Use it with `secondaryText`, which is\n * what spells the state out; the dot alone only carries colour.\n */\n status?: 'critical' | 'neutral' | 'success';\n}\n\nexport interface BitkitUISideNavLinkAsAnchorProps\n extends UISideNavLinkCommonProps, Omit<HTMLChakraProps<'a'>, 'children'> {\n href: string;\n /** Adds the north-east arrow and the usual `target`/`rel` pair for a link leaving the app. */\n isExternal?: boolean;\n}\n\nexport interface BitkitUISideNavLinkAsButtonProps\n extends UISideNavLinkCommonProps, Omit<HTMLChakraProps<'button'>, 'children'> {\n href?: undefined;\n isExternal?: undefined;\n /** Makes the row a button instead of a link — for one that opens a dialog rather than navigating. */\n onClick: NonNullable<HTMLChakraProps<'button'>['onClick']>;\n}\n\nexport type BitkitUISideNavLinkProps = BitkitUISideNavLinkAsAnchorProps | BitkitUISideNavLinkAsButtonProps;\n\nconst UISideNavLink = forwardRef<HTMLAnchorElement | HTMLButtonElement, BitkitUISideNavLinkProps>((props, ref) => {\n const {\n children,\n css,\n href,\n icon: Icon,\n isExternal,\n rel,\n secondaryText,\n status,\n target,\n ...rest\n } = props as BitkitUISideNavLinkAsAnchorProps;\n\n const { styles } = useUISideNavContext();\n\n const content = (\n <>\n <Box css={styles.linkIconBlock}>\n <Icon css={styles.linkIcon} />\n {status && <Box css={styles.linkStatusDot} data-status={status} />}\n </Box>\n <Box css={styles.linkTextBlock}>\n <Text as=\"span\" css={styles.linkLabel}>\n {children}\n </Text>\n {secondaryText && (\n <Text as=\"span\" css={styles.linkSecondaryText}>\n {secondaryText}\n </Text>\n )}\n </Box>\n {isExternal && <IconArrowNortheast css={styles.linkIcon} />}\n </>\n );\n\n const rootProps = {\n 'data-with-secondary': secondaryText ? '' : undefined,\n ...rest,\n css: [styles.link, css],\n };\n\n // `chakra.button` / `chakra.a` rather than `Button` / `Link`: the row is styled entirely by the\n // nav's own `link` slot, and either named primitive would layer its own recipe over it.\n if (href === undefined) {\n return (\n <chakra.button ref={ref as Ref<HTMLButtonElement>} type=\"button\" {...(rootProps as HTMLChakraProps<'button'>)}>\n {content}\n </chakra.button>\n );\n }\n\n return (\n <chakra.a\n ref={ref as Ref<HTMLAnchorElement>}\n href={href}\n rel={isExternal ? (rel ? `${rel} noreferrer noopener` : 'noreferrer noopener') : rel}\n target={isExternal ? '_blank' : target}\n {...rootProps}\n >\n {content}\n </chakra.a>\n );\n});\n\nUISideNavLink.displayName = 'BitkitUISideNav.Link';\n\nexport default UISideNavLink;\n"],"mappings":";;;;;;;;AAwCA,IAAM,gBAAgB,YAA6E,OAAO,QAAQ;CAChH,MAAM,EACJ,UACA,KACA,MACA,MAAM,MACN,YACA,KACA,eACA,QACA,QACA,GAAG,SACD;CAEJ,MAAM,EAAE,WAAW,oBAAoB;CAEvC,MAAM,UACJ,qBAAA,YAAA,EAAA,UAAA;EACE,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAjB,UAAA,CACE,oBAAC,MAAD,EAAM,KAAK,OAAO,SAAW,CAAA,GAC5B,UAAU,oBAAC,KAAD;IAAK,KAAK,OAAO;IAAe,eAAa;GAAS,CAAA,CAC9D;;EACL,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAjB,UAAA,CACE,oBAAC,MAAD;IAAM,IAAG;IAAO,KAAK,OAAO;IACzB;GACG,CAAA,GACL,iBACC,oBAAC,MAAD;IAAM,IAAG;IAAO,KAAK,OAAO;IACzB,UAAA;GACG,CAAA,CAEL;;EACJ,cAAc,oBAAC,oBAAD,EAAoB,KAAK,OAAO,SAAW,CAAA;CAC1D,EAAA,CAAA;CAGJ,MAAM,YAAY;EAChB,uBAAuB,gBAAgB,KAAK,KAAA;EAC5C,GAAG;EACH,KAAK,CAAC,OAAO,MAAM,GAAG;CACxB;CAIA,IAAI,SAAS,KAAA,GACX,OACE,oBAAC,OAAO,QAAR;EAAoB;EAA+B,MAAK;EAAS,GAAK;EACnE,UAAA;CACY,CAAA;CAInB,OACE,oBAAC,OAAO,GAAR;EACO;EACC;EACN,KAAK,aAAc,MAAM,GAAG,IAAI,wBAAwB,wBAAyB;EACjF,QAAQ,aAAa,WAAW;EAChC,GAAI;EAEH,UAAA;CACO,CAAA;AAEd,CAAC;AAED,cAAc,cAAc"}
@@ -1,55 +0,0 @@
1
- import { Select, SelectTriggerProps } from '@chakra-ui/react/select';
2
- import { BitkitSelectMenuEmptyStateProps, BitkitSelectMenuErrorStateProps, BitkitSelectMenuItemProps, BitkitSelectMenuScrollProps, BitkitSelectMenuSearchProps } from '../BitkitSelectMenu/BitkitSelectMenu';
3
- import { BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';
4
- export type BitkitUISideNavWorkspaceProps = Pick<BitkitSelectMenuItemProps, 'label' | 'value'> & {
5
- /**
6
- * The workspace's logo. Leave it off and the avatar falls back to the initials of `label` —
7
- * a workspace always has one, unlike a plain menu item.
8
- */
9
- avatar?: string;
10
- };
11
- /**
12
- * The list length at which the design adds the search input. Below it the menu is short enough
13
- * to read at a glance and a search field would only be in the way. Exported for the stories,
14
- * which label each list by the side of this it falls on — not part of the package's surface.
15
- */
16
- export declare const searchableFrom = 6;
17
- export type BitkitUISideNavWorkspaceSelectorProps = Omit<SelectTriggerProps, 'children' | 'onChange'> & {
18
- /**
19
- * A single `BitkitSelectMenuAction` shown under the list, typically "Create workspace". Its
20
- * presence is the toggle — there is no boolean for it.
21
- */
22
- children?: BitkitSelectMenuActionChild;
23
- isLoading?: boolean;
24
- /** The small uppercase caption above the workspace name. */
25
- label?: string;
26
- /**
27
- * Fires when the menu opens and when it closes — where a list loaded on demand belongs. The
28
- * menu also opens from the keyboard, which fires no click on the trigger.
29
- */
30
- onOpenChange?: (open: boolean) => void;
31
- onValueChange?: (value: string) => void;
32
- /** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */
33
- value?: string;
34
- workspaces: Array<BitkitUISideNavWorkspaceProps>;
35
- } & Omit<BitkitSelectMenuSearchProps, 'searchPlaceholder'> & BitkitSelectMenuScrollProps & BitkitSelectMenuEmptyStateProps & BitkitSelectMenuErrorStateProps;
36
- declare const UISideNavWorkspaceSelector: import('react').ForwardRefExoticComponent<Omit<Select.TriggerProps, "children" | "onChange"> & {
37
- /**
38
- * A single `BitkitSelectMenuAction` shown under the list, typically "Create workspace". Its
39
- * presence is the toggle — there is no boolean for it.
40
- */
41
- children?: BitkitSelectMenuActionChild;
42
- isLoading?: boolean;
43
- /** The small uppercase caption above the workspace name. */
44
- label?: string;
45
- /**
46
- * Fires when the menu opens and when it closes — where a list loaded on demand belongs. The
47
- * menu also opens from the keyboard, which fires no click on the trigger.
48
- */
49
- onOpenChange?: (open: boolean) => void;
50
- onValueChange?: (value: string) => void;
51
- /** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */
52
- value?: string;
53
- workspaces: Array<BitkitUISideNavWorkspaceProps>;
54
- } & Omit<BitkitSelectMenuSearchProps, "searchPlaceholder"> & BitkitSelectMenuScrollProps & BitkitSelectMenuEmptyStateProps & BitkitSelectMenuErrorStateProps & import('react').RefAttributes<HTMLButtonElement>>;
55
- export default UISideNavWorkspaceSelector;
@@ -1,127 +0,0 @@
1
- import IconChevronDown from "../../icons/IconChevronDown.js";
2
- import BitkitAvatar from "../BitkitAvatar/BitkitAvatar.js";
3
- import BitkitSelectMenu from "../BitkitSelectMenu/BitkitSelectMenu.js";
4
- import { useUISideNavContext } from "./UISideNavContext.js";
5
- import { Box } from "@chakra-ui/react/box";
6
- import { forwardRef, useId, useMemo, useRef, useState } from "react";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
- import { Portal } from "@chakra-ui/react/portal";
9
- import { Text } from "@chakra-ui/react/text";
10
- import { useControllableState } from "@chakra-ui/react/hooks";
11
- import { createListCollection } from "@chakra-ui/react/collection";
12
- import { Select } from "@chakra-ui/react/select";
13
- import { useFilter } from "@chakra-ui/react/locale";
14
- var UISideNavWorkspaceSelector = forwardRef((props, ref) => {
15
- const { children, css, emptyHelperText, emptyLabel, errorHelperText, errorLabel, isLoading, label = "Workspace", onOpenChange, onScrolledToBottom, onSearchChange, onValueChange, searchValue, value, workspaces, ...rest } = props;
16
- const { isMobile, menuContainerRef, setMenuOpen, styles } = useUISideNavContext();
17
- const id = useId();
18
- const labelId = `${id}-label`;
19
- const valueId = `${id}-value`;
20
- const { contains } = useFilter({ sensitivity: "base" });
21
- const [ownQuery, setOwnQuery] = useState("");
22
- const [currentValue, setCurrentValue] = useControllableState({
23
- defaultValue: void 0,
24
- value
25
- });
26
- const isSearchDelegated = onSearchChange !== void 0;
27
- const query = isSearchDelegated ? searchValue : ownQuery;
28
- const hasSearch = isSearchDelegated || workspaces.length >= 6;
29
- const collection = useMemo(() => {
30
- const items = (ownQuery ? workspaces.filter((workspace) => contains(workspace.label, ownQuery)) : workspaces).map((workspace) => ({
31
- ...workspace,
32
- avatar: workspace.avatar ?? null
33
- }));
34
- return createListCollection({ items });
35
- }, [
36
- contains,
37
- ownQuery,
38
- workspaces
39
- ]);
40
- const lastSelected = useRef(void 0);
41
- const matched = workspaces.find((workspace) => workspace.value === currentValue);
42
- if (matched) lastSelected.current = matched;
43
- const selected = matched ?? (lastSelected.current?.value === currentValue ? lastSelected.current : void 0);
44
- return /* @__PURE__ */ jsxs(Select.Root, {
45
- collection,
46
- css: styles.workspaceRoot,
47
- ids: { label: labelId },
48
- onOpenChange: (details) => {
49
- setMenuOpen(details.open);
50
- if (!details.open) setOwnQuery("");
51
- onOpenChange?.(details.open);
52
- },
53
- onValueChange: (details) => {
54
- setCurrentValue(details.value[0]);
55
- onValueChange?.(details.value[0]);
56
- },
57
- positioning: isMobile ? {
58
- gutter: 0,
59
- offset: { crossAxis: 16 },
60
- overflowPadding: 16
61
- } : {
62
- gutter: -8,
63
- offset: { crossAxis: 16 },
64
- placement: "bottom-start"
65
- },
66
- size: "lg",
67
- value: currentValue === void 0 ? [] : [currentValue],
68
- children: [/* @__PURE__ */ jsxs(Select.Control, {
69
- css: styles.workspaceControl,
70
- children: [/* @__PURE__ */ jsx(Select.HiddenSelect, {}), /* @__PURE__ */ jsxs(Select.Trigger, {
71
- ref,
72
- unstyled: true,
73
- "aria-labelledby": `${labelId} ${valueId}`,
74
- ...rest,
75
- css: [styles.workspace, css],
76
- children: [
77
- /* @__PURE__ */ jsx(BitkitAvatar, {
78
- borderColor: "border/minimal",
79
- borderWidth: "1",
80
- name: selected?.label ?? "",
81
- size: "40",
82
- src: selected?.avatar ?? "",
83
- variant: "image"
84
- }),
85
- /* @__PURE__ */ jsxs(Box, {
86
- css: styles.workspaceTextBlock,
87
- children: [/* @__PURE__ */ jsx(Text, {
88
- css: styles.workspaceLabel,
89
- id: labelId,
90
- children: label
91
- }), /* @__PURE__ */ jsx(Text, {
92
- css: styles.workspaceValue,
93
- id: valueId,
94
- children: selected?.label
95
- })]
96
- }),
97
- /* @__PURE__ */ jsx(Select.Indicator, {
98
- css: styles.workspaceChevron,
99
- children: /* @__PURE__ */ jsx(IconChevronDown, {})
100
- })
101
- ]
102
- })]
103
- }), /* @__PURE__ */ jsx(Portal, {
104
- container: isMobile ? menuContainerRef : void 0,
105
- children: /* @__PURE__ */ jsx(Select.Positioner, { children: /* @__PURE__ */ jsx(BitkitSelectMenu, {
106
- collection,
107
- contentProps: { css: styles.workspaceMenu },
108
- emptyHelperText,
109
- emptyLabel,
110
- errorHelperText,
111
- errorLabel,
112
- isLoading,
113
- onScrolledToBottom,
114
- onSearchChange: hasSearch ? onSearchChange ?? setOwnQuery : void 0,
115
- searchPlaceholder: "Search your workspaces",
116
- searchValue: query,
117
- size: "lg",
118
- children
119
- }) })
120
- })]
121
- });
122
- });
123
- UISideNavWorkspaceSelector.displayName = "BitkitUISideNav.WorkspaceSelector";
124
- //#endregion
125
- export { UISideNavWorkspaceSelector as default };
126
-
127
- //# sourceMappingURL=UISideNavWorkspaceSelector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UISideNavWorkspaceSelector.js","names":[],"sources":["../../../lib/components/BitkitUISideNav/UISideNavWorkspaceSelector.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { useControllableState } from '@chakra-ui/react/hooks';\nimport { useFilter } from '@chakra-ui/react/locale';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { Select, type SelectTriggerProps } from '@chakra-ui/react/select';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef, useId, useMemo, useRef, useState } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport BitkitAvatar from '../BitkitAvatar/BitkitAvatar';\nimport BitkitSelectMenu, {\n type BitkitSelectMenuEmptyStateProps,\n type BitkitSelectMenuErrorStateProps,\n type BitkitSelectMenuItemProps,\n type BitkitSelectMenuScrollProps,\n type BitkitSelectMenuSearchProps,\n} from '../BitkitSelectMenu/BitkitSelectMenu';\nimport { type BitkitSelectMenuActionChild } from '../BitkitSelectMenu/BitkitSelectMenuAction';\nimport { useUISideNavContext } from './UISideNavContext';\n\nexport type BitkitUISideNavWorkspaceProps = Pick<BitkitSelectMenuItemProps, 'label' | 'value'> & {\n /**\n * The workspace's logo. Leave it off and the avatar falls back to the initials of `label` —\n * a workspace always has one, unlike a plain menu item.\n */\n avatar?: string;\n};\n\n/**\n * The list length at which the design adds the search input. Below it the menu is short enough\n * to read at a glance and a search field would only be in the way. Exported for the stories,\n * which label each list by the side of this it falls on — not part of the package's surface.\n */\nexport const searchableFrom = 6;\n\nexport type BitkitUISideNavWorkspaceSelectorProps = Omit<SelectTriggerProps, 'children' | 'onChange'> & {\n /**\n * A single `BitkitSelectMenuAction` shown under the list, typically \"Create workspace\". Its\n * presence is the toggle — there is no boolean for it.\n */\n children?: BitkitSelectMenuActionChild;\n isLoading?: boolean;\n /** The small uppercase caption above the workspace name. */\n label?: string;\n /**\n * Fires when the menu opens and when it closes — where a list loaded on demand belongs. The\n * menu also opens from the keyboard, which fires no click on the trigger.\n */\n onOpenChange?: (open: boolean) => void;\n onValueChange?: (value: string) => void;\n /** The selected workspace's `value`. Leave it off to let the selector track the choice itself. */\n value?: string;\n workspaces: Array<BitkitUISideNavWorkspaceProps>;\n // The copy is the design's, not the consumer's, so the placeholder is not on the way through.\n} & Omit<BitkitSelectMenuSearchProps, 'searchPlaceholder'> &\n BitkitSelectMenuScrollProps &\n BitkitSelectMenuEmptyStateProps &\n BitkitSelectMenuErrorStateProps;\n\nconst UISideNavWorkspaceSelector = forwardRef<HTMLButtonElement, BitkitUISideNavWorkspaceSelectorProps>(\n (props, ref) => {\n const {\n children,\n css,\n emptyHelperText,\n emptyLabel,\n errorHelperText,\n errorLabel,\n isLoading,\n label = 'Workspace',\n onOpenChange,\n onScrolledToBottom,\n onSearchChange,\n onValueChange,\n searchValue,\n value,\n workspaces,\n ...rest\n } = props;\n\n const { isMobile, menuContainerRef, setMenuOpen, styles } = useUISideNavContext();\n const id = useId();\n const labelId = `${id}-label`;\n const valueId = `${id}-value`;\n const { contains } = useFilter({ sensitivity: 'base' });\n\n const [ownQuery, setOwnQuery] = useState('');\n const [currentValue, setCurrentValue] = useControllableState<string | undefined>({\n defaultValue: undefined,\n value,\n });\n\n // A consumer that passes `onSearchChange` is searching somewhere we cannot see — a server, a\n // paged list — so `workspaces` is already the result and its length says nothing about how\n // many there are. They keep the input and the filtering; otherwise both are ours.\n const isSearchDelegated = onSearchChange !== undefined;\n const query = isSearchDelegated ? searchValue : ownQuery;\n const hasSearch = isSearchDelegated || workspaces.length >= searchableFrom;\n\n const collection = useMemo(() => {\n const matches = ownQuery ? workspaces.filter((workspace) => contains(workspace.label, ownQuery)) : workspaces;\n\n // `null` rather than nothing for a workspace without a logo: that is what tells the menu to\n // draw the initials, where an absent `avatar` would leave the row with no avatar at all.\n const items: Array<BitkitSelectMenuItemProps> = matches.map((workspace) => ({\n ...workspace,\n avatar: workspace.avatar ?? null,\n }));\n\n return createListCollection({ items });\n }, [contains, ownQuery, workspaces]);\n\n // `workspaces` is the search result while the search is delegated, so the selected workspace\n // can drop out of it mid-query. The cell keeps naming the workspace you are actually in.\n const lastSelected = useRef<BitkitUISideNavWorkspaceProps>(undefined);\n const matched = workspaces.find((workspace) => workspace.value === currentValue);\n if (matched) lastSelected.current = matched;\n const selected = matched ?? (lastSelected.current?.value === currentValue ? lastSelected.current : undefined);\n\n return (\n <Select.Root\n collection={collection}\n css={styles.workspaceRoot}\n ids={{ label: labelId }}\n onOpenChange={(details) => {\n setMenuOpen(details.open);\n if (!details.open) setOwnQuery('');\n onOpenChange?.(details.open);\n }}\n onValueChange={(details) => {\n setCurrentValue(details.value[0]);\n onValueChange?.(details.value[0]);\n }}\n // Tucked into the rail rather than hung off it: inset from the rail's edge and lapping\n // over the workspace cell, so the menu reads as the cell unfolding.\n positioning={\n isMobile\n ? { gutter: 0, offset: { crossAxis: 16 }, overflowPadding: 16 }\n : { gutter: -8, offset: { crossAxis: 16 }, placement: 'bottom-start' }\n }\n size=\"lg\"\n value={currentValue === undefined ? [] : [currentValue]}\n >\n <Select.Control css={styles.workspaceControl}>\n <Select.HiddenSelect />\n <Select.Trigger\n ref={ref}\n unstyled\n aria-labelledby={`${labelId} ${valueId}`}\n {...rest}\n css={[styles.workspace, css]}\n >\n <BitkitAvatar\n borderColor=\"border/minimal\"\n borderWidth=\"1\"\n name={selected?.label ?? ''}\n size=\"40\"\n src={selected?.avatar ?? ''}\n variant=\"image\"\n />\n <Box css={styles.workspaceTextBlock}>\n <Text css={styles.workspaceLabel} id={labelId}>\n {label}\n </Text>\n <Text css={styles.workspaceValue} id={valueId}>\n {selected?.label}\n </Text>\n </Box>\n <Select.Indicator css={styles.workspaceChevron}>\n <IconChevronDown />\n </Select.Indicator>\n </Select.Trigger>\n </Select.Control>\n {/*\n In the drawer the menu goes to the panel rather than the document: the panel scrolls\n under its own header, so a menu left in the flow would travel with the rows and be\n clipped by them, and anywhere outside the panel is outside the dialog's focus trap.\n */}\n <Portal container={isMobile ? menuContainerRef : undefined}>\n <Select.Positioner>\n <BitkitSelectMenu\n collection={collection}\n contentProps={{ css: styles.workspaceMenu }}\n emptyHelperText={emptyHelperText}\n emptyLabel={emptyLabel}\n errorHelperText={errorHelperText}\n errorLabel={errorLabel}\n isLoading={isLoading}\n onScrolledToBottom={onScrolledToBottom}\n onSearchChange={hasSearch ? (onSearchChange ?? setOwnQuery) : undefined}\n searchPlaceholder=\"Search your workspaces\"\n searchValue={query}\n size=\"lg\"\n >\n {children}\n </BitkitSelectMenu>\n </Select.Positioner>\n </Portal>\n </Select.Root>\n );\n },\n);\n\nUISideNavWorkspaceSelector.displayName = 'BitkitUISideNav.WorkspaceSelector';\n\nexport default UISideNavWorkspaceSelector;\n"],"mappings":"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"}
@@ -1,119 +0,0 @@
1
- /**
2
- * The footprint the rail keeps in the page. The expanded rail overlays the content rather than
3
- * pushing it, so this is the gutter a layout reserves beside the navigation.
4
- */
5
- export declare const uiSideNavRailWidth: `${number}rem`;
6
- declare const uiSideNavSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"link" | "content" | "body" | "footer" | "closeButton" | "root" | "item" | "itemIndicator" | "positioner" | "itemLabel" | "itemIcon" | "backdrop" | "footerSeparator" | "footerHeading" | "linkIconBlock" | "linkTextBlock" | "linkIcon" | "linkStatusDot" | "linkLabel" | "linkSecondaryText" | "workspaceRoot" | "workspaceControl" | "workspace" | "workspaceTextBlock" | "workspaceChevron" | "workspaceMenu" | "workspaceLabel" | "workspaceValue", {
7
- layout: {
8
- rail: {
9
- root: {
10
- paddingBlockEnd: "12";
11
- transition: "width 100ms ease-out";
12
- transitionDelay: "50ms";
13
- width: `${number}rem`;
14
- _motionReduce: {
15
- transition: "none";
16
- };
17
- '&[data-expanded]': {
18
- transitionDelay: "100ms";
19
- width: `${number}rem`;
20
- };
21
- };
22
- workspace: {
23
- paddingInline: "16";
24
- minWidth: `${number}rem`;
25
- };
26
- workspaceControl: {
27
- minWidth: `${number}rem`;
28
- };
29
- workspaceMenu: {
30
- width: `${number}rem`;
31
- };
32
- body: {
33
- overflowX: "hidden";
34
- overflowY: "auto";
35
- scrollbar: "hidden";
36
- };
37
- item: {
38
- gap: "24";
39
- paddingBlock: "16";
40
- minWidth: `${number}rem`;
41
- };
42
- link: {
43
- gap: "24";
44
- minWidth: `${number}rem`;
45
- };
46
- footerSeparator: {
47
- '[data-expanded] &': {
48
- paddingInline: "16";
49
- };
50
- };
51
- footerHeading: {
52
- minWidth: `${number}rem`;
53
- };
54
- };
55
- drawer: {
56
- root: {
57
- overflowX: "hidden";
58
- overflowY: "auto";
59
- width: "full";
60
- };
61
- workspaceRoot: {
62
- background: "sys/ui/sidenav/bg";
63
- insetBlockStart: number;
64
- position: "sticky";
65
- zIndex: number;
66
- };
67
- workspace: {
68
- paddingBlock: "16";
69
- paddingInlineEnd: "24";
70
- paddingInlineStart: "16";
71
- };
72
- item: {
73
- gap: "12";
74
- paddingBlock: "16";
75
- };
76
- link: {
77
- gap: "12";
78
- };
79
- footer: {
80
- paddingBlockEnd: "16";
81
- paddingBlockStart: "12";
82
- position: "relative";
83
- };
84
- footerHeading: {
85
- paddingBlockStart: "12";
86
- '&[data-section]': {
87
- marginBlockStart: "12";
88
- paddingBlockStart: "24";
89
- position: "relative";
90
- _before: {
91
- insetBlockStart: number;
92
- insetInline: number;
93
- position: "absolute";
94
- background: "border/inverse";
95
- content: "\"\"";
96
- height: "1";
97
- opacity: 0.2;
98
- };
99
- };
100
- };
101
- footerSeparator: {
102
- insetBlockStart: number;
103
- insetInline: number;
104
- paddingBlock: number;
105
- paddingInline: number;
106
- position: "absolute";
107
- };
108
- workspaceMenu: {
109
- maxHeight: "var(--available-height)";
110
- '--select-menu-list-max-height': "none";
111
- };
112
- body: {
113
- flex: "1 0 auto";
114
- paddingBlock: "8";
115
- };
116
- };
117
- };
118
- }>;
119
- export default uiSideNavSlotRecipe;