@bitrise/bitkit-v2 0.3.522-beta.3342 → 0.3.523
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 +0 -1
- package/dist/components/BitkitCollapsible/BitkitCollapsible.js +13 -4
- package/dist/components/BitkitCollapsible/BitkitCollapsible.js.map +1 -1
- package/dist/components/BitkitLinkCard/BitkitLinkCard.d.ts +29 -0
- package/dist/components/BitkitLinkCard/BitkitLinkCard.js +67 -0
- package/dist/components/BitkitLinkCard/BitkitLinkCard.js.map +1 -0
- package/dist/components/BitkitTable/BitkitExpandableRow.d.ts +0 -2
- package/dist/components/BitkitTable/BitkitExpandableRow.js +2 -4
- package/dist/components/BitkitTable/BitkitExpandableRow.js.map +1 -1
- package/dist/components/BitkitTable/BitkitLinkedRow.d.ts +1 -2
- package/dist/components/BitkitTable/BitkitLinkedRow.js +1 -2
- package/dist/components/BitkitTable/BitkitLinkedRow.js.map +1 -1
- package/dist/components/BitkitTable/BitkitTable.d.ts +1 -3
- package/dist/components/BitkitTable/BitkitTable.js +0 -2
- package/dist/components/BitkitTable/BitkitTable.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/main.js +3 -2
- package/dist/theme/slot-recipes/LinkCard.recipe.d.ts +14 -0
- package/dist/theme/slot-recipes/LinkCard.recipe.js +128 -0
- package/dist/theme/slot-recipes/LinkCard.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/PageHeader.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/PageSubheader.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Table.recipe.d.ts +1 -1
- package/dist/theme/slot-recipes/Table.recipe.js +2 -1
- package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +16 -3
- package/dist/theme/slot-recipes/index.js +2 -0
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/BitkitTable/BitkitTableRow.d.ts +0 -24
- package/dist/components/BitkitTable/BitkitTableRow.js +0 -30
- package/dist/components/BitkitTable/BitkitTableRow.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -156,7 +156,6 @@ Bitkit components use consistent prop names across the library:
|
|
|
156
156
|
</BitkitActionMenu>
|
|
157
157
|
```
|
|
158
158
|
`data-*` attributes on `BitkitActionMenu` reach the element carrying `role="menu"` (the portalled list), and nothing else passes through — the same contract the dialogs have.
|
|
159
|
-
- **A `BitkitTable` row is tinted as selected only when you pass `selected`** — on `BitkitTable.Row`, `BitkitTable.LinkedRow` and `BitkitTable.ExpandableRow`, from the selection state you already hold (`selected={selectedIds.includes(row.id)}`). A checkbox, radio or switch in the row never tints it on its own, so a checkbox that edits a value (an "Active" column) needs nothing. Don't override the row's background instead.
|
|
160
159
|
- **Form components are flat** — `BitkitTextInput`, `BitkitSelect`, `BitkitCombobox`, etc. expose `label`, `errorText`, `helperText`, etc. directly as props. No need to wrap in a separate field component.
|
|
161
160
|
- **`BitkitTextInput` slots** — `startElement` / `endElement` take a `ReactNode` and render inside the field (an icon, badge, text, or an interactive control like a reveal/clear button). `startAddon` / `endAddon` render outside the border, attached to the field, and switch on the content type: a **bare string** gets the standard bordered grey box (a unit label like `$` / `USD` — wrapped in a `<Text>` or a fragment it counts as a component and loses the box), while any **component** renders as itself, welded to the field — it keeps its own styling and the corners it touches are squared for you. A button addon needs its own `variant` and a `size` matching the field's (the field's `size` doesn't reach it, so an `md` field needs an `md` button), and nothing else: don't square its corners by hand, and don't look for a way to strip the grey box — the content type is the switch. These match the Figma slot names. The validation status icon (error/warning) is added automatically and sits left of `endElement`. The field's `state` doesn't reach a component addon, so disable it yourself when it should follow:
|
|
162
161
|
```tsx
|
|
@@ -8,10 +8,14 @@ import { Box } from "@chakra-ui/react/box";
|
|
|
8
8
|
import { useSafeLayoutEffect } from "@chakra-ui/react/hooks";
|
|
9
9
|
import { Collapsible } from "@chakra-ui/react/collapsible";
|
|
10
10
|
//#region lib/components/BitkitCollapsible/BitkitCollapsible.tsx
|
|
11
|
-
var useIsContentOverflowing = (collapsedHeight) => {
|
|
11
|
+
var useIsContentOverflowing = (collapsedHeight, isFullyCollapsed) => {
|
|
12
12
|
const contentRef = useRef(null);
|
|
13
13
|
const [isOverflowing, setIsOverflowing] = useState(true);
|
|
14
14
|
useSafeLayoutEffect(() => {
|
|
15
|
+
if (isFullyCollapsed) {
|
|
16
|
+
setIsOverflowing(true);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
15
19
|
const contentEl = contentRef.current;
|
|
16
20
|
const measureScope = contentEl?.parentElement;
|
|
17
21
|
if (!contentEl || !measureScope) return;
|
|
@@ -26,7 +30,11 @@ var useIsContentOverflowing = (collapsedHeight) => {
|
|
|
26
30
|
const resizeObserver = new ResizeObserver(checkOverflow);
|
|
27
31
|
resizeObserver.observe(contentEl);
|
|
28
32
|
return () => resizeObserver.disconnect();
|
|
29
|
-
}, [
|
|
33
|
+
}, [
|
|
34
|
+
collapsedHeight,
|
|
35
|
+
isFullyCollapsed,
|
|
36
|
+
isOverflowing
|
|
37
|
+
]);
|
|
30
38
|
return {
|
|
31
39
|
contentRef,
|
|
32
40
|
isOverflowing
|
|
@@ -35,7 +43,8 @@ var useIsContentOverflowing = (collapsedHeight) => {
|
|
|
35
43
|
var BitkitCollapsible = forwardRef((props, ref) => {
|
|
36
44
|
const { children, closedLabel = "Show less", collapsedHeight = "48px", collapsedWidth, css, defaultOpen, disabled, hideMode, ids, label, labelProps, lazyMount, onExitComplete, onOpenChange, open, openLabel = "Show more", unmountOnExit, ...rest } = props;
|
|
37
45
|
const styles = useSlotRecipe({ key: "collapsible" })();
|
|
38
|
-
const
|
|
46
|
+
const isFullyCollapsed = parseFloat(collapsedHeight) === 0;
|
|
47
|
+
const { contentRef, isOverflowing } = useIsContentOverflowing(collapsedHeight, isFullyCollapsed);
|
|
39
48
|
const handleOpenChange = onOpenChange ? (details) => onOpenChange(details.open) : void 0;
|
|
40
49
|
if (!isOverflowing) return /* @__PURE__ */ jsxs(Box, {
|
|
41
50
|
ref,
|
|
@@ -51,7 +60,7 @@ var BitkitCollapsible = forwardRef((props, ref) => {
|
|
|
51
60
|
});
|
|
52
61
|
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
53
62
|
ref,
|
|
54
|
-
collapsedHeight,
|
|
63
|
+
collapsedHeight: isFullyCollapsed ? void 0 : collapsedHeight,
|
|
55
64
|
collapsedWidth,
|
|
56
65
|
css: [styles.root, css],
|
|
57
66
|
defaultOpen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitCollapsible.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitCollapsible/BitkitCollapsible.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible, type CollapsibleRootProps } from '@chakra-ui/react/collapsible';\nimport { useSafeLayoutEffect } from '@chakra-ui/react/hooks';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type ReactNode, useRef, useState } from 'react';\n\n// TODO: Investigate using AssetSelectChevron instead of IconChevronDown/IconChevronUp\nimport { IconChevronDown, IconChevronUp } from '../../icons';\nimport BitkitLabel, { type BitkitLabelProps } from '../BitkitLabel/BitkitLabel';\n\ntype UncontrolledProps = {\n defaultOpen?: boolean;\n open?: never;\n onOpenChange?: never;\n};\n\ntype ControlledProps = {\n defaultOpen?: never;\n onOpenChange: (open: boolean) => void;\n open: boolean;\n};\n\nexport type BitkitCollapsibleProps = Omit<\n CollapsibleRootProps,\n 'collapsedHeight' | 'defaultOpen' | 'onOpenChange' | 'open'\n> & {\n children: ReactNode;\n closedLabel?: string;\n collapsedHeight?: string;\n label?: string;\n labelProps?: Omit<BitkitLabelProps, 'children'>;\n openLabel?: string;\n} & (UncontrolledProps | ControlledProps);\n\n// contentRef sits on an unclamped wrapper *inside* Collapsible.Content, not on Content itself: when\n// closed, Content's own box is pinned to collapsedHeight (max-height + overflow), so a ResizeObserver\n// on Content can't see content that grows without changing Content's own (clamped) box - e.g. an image\n// or async child rendering more after mount. scrollHeight still reports the wrapper's true height\n// either way, clamped or not, so the read doesn't change - only where we watch for changes does.\n// isOverflowing and collapsedHeight are the effect's only dependencies. isOverflowing: BitkitCollapsible\n// renders a different tree depending on it (see below), moving contentRef to a different DOM node each\n// time it flips, so the effect must re-attach then. children is deliberately not a dependency: the\n// wrapper being unclamped means the observer already sees every content-driven size change on its own.\nconst useIsContentOverflowing = (collapsedHeight: string) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const [isOverflowing, setIsOverflowing] = useState(true);\n\n useSafeLayoutEffect(() => {\n const contentEl = contentRef.current;\n const measureScope = contentEl?.parentElement;\n if (!contentEl || !measureScope) {\n return undefined;\n }\n\n // Appended as a sibling of contentEl (not document.body) so it inherits the same font-size and\n // CSS custom properties contentEl actually sees, resolving em/var(...) heights correctly - not\n // just px/rem, which don't depend on where in the tree they're resolved.\n const probe = document.createElement('div');\n probe.style.cssText = `position: absolute; visibility: hidden; pointer-events: none; height: ${collapsedHeight};`;\n measureScope.appendChild(probe);\n const collapsedHeightPx = probe.getBoundingClientRect().height;\n measureScope.removeChild(probe);\n\n const checkOverflow = () => setIsOverflowing(contentEl.scrollHeight > collapsedHeightPx);\n checkOverflow();\n\n if (typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const resizeObserver = new ResizeObserver(checkOverflow);\n resizeObserver.observe(contentEl);\n return () => resizeObserver.disconnect();\n }, [collapsedHeight, isOverflowing]);\n\n return { contentRef, isOverflowing };\n};\n\nconst BitkitCollapsible = forwardRef<HTMLDivElement, BitkitCollapsibleProps>((props, ref) => {\n const {\n children,\n closedLabel = 'Show less',\n collapsedHeight = '48px',\n collapsedWidth,\n css,\n defaultOpen,\n disabled,\n hideMode,\n ids,\n label,\n labelProps,\n lazyMount,\n onExitComplete,\n onOpenChange,\n open,\n openLabel = 'Show more',\n unmountOnExit,\n ...rest\n } = props;\n\n const recipe = useSlotRecipe({ key: 'collapsible' });\n const styles = recipe();\n\n const { contentRef, isOverflowing } = useIsContentOverflowing(collapsedHeight);\n\n const handleOpenChange = onOpenChange ? (details: { open: boolean }) => onOpenChange(details.open) : undefined;\n\n // zag's closed-state styling (min/max-height clamp, the fade-out pseudo-element) is driven purely by\n // Collapsible.Root defaulting to \"closed\" - it doesn't know or care whether collapsedHeight would\n // ever actually clip anything. Passing collapsedHeight and hiding only the trigger still leaves\n // content that fits pinned to that height and faded, so when it doesn't overflow we skip\n // Collapsible.Root/Content entirely and render plain markup instead of fighting the closed-state\n // styling with overrides. Only styles.root applies here - it carries the inherited color/textStyle,\n // which is all a non-collapsing block needs; styles.content's overflow/position/fade rules are\n // collapse-only and would clip content (a focus ring, an absolutely-positioned child) that isn't\n // meant to be clipped. contentRef sits directly under styles.root rather than under a styles.content\n // box, so measureScope (its parent) is styles.root in this branch and styles.content in the\n // overflowing one below - both carry the same inherited font-size, since textStyle now lives on\n // root and cascades down, so collapsedHeight's em/var(...) units resolve the same way in either\n // branch. disabled/ids/collapsedWidth/onExitComplete/lazyMount/unmountOnExit/hideMode\n // are zag/Ark machine props with no meaning on plain markup, so they're destructured out above and\n // only forwarded to Collapsible.Root below - otherwise they'd reach the DOM as unknown attributes.\n //\n // isOverflowing starts true, so every mount (even of content that turns out to fit) renders through\n // this Collapsible.Root tree first and flips to the plain tree below once measured - a real\n // remount of children, since the two trees don't share a component type at that position. Same\n // going the other way on a runtime resize. Accepted tradeoff: measuring requires a real layout\n // pass, and we don't have the content's size before that first render.\n if (!isOverflowing) {\n return (\n <Box ref={ref} css={[styles.root, css]} {...rest}>\n {label && <BitkitLabel {...labelProps}>{label}</BitkitLabel>}\n <Box ref={contentRef}>{children}</Box>\n </Box>\n );\n }\n\n return (\n <Collapsible.Root\n ref={ref}\n collapsedHeight={collapsedHeight}\n collapsedWidth={collapsedWidth}\n css={[styles.root, css]}\n defaultOpen={defaultOpen}\n disabled={disabled}\n hideMode={hideMode}\n ids={ids}\n lazyMount={lazyMount}\n onExitComplete={onExitComplete}\n onOpenChange={handleOpenChange}\n open={open}\n unmountOnExit={unmountOnExit}\n {...rest}\n >\n {label && <BitkitLabel {...labelProps}>{label}</BitkitLabel>}\n <Collapsible.Content css={styles.content}>\n <Box ref={contentRef}>{children}</Box>\n </Collapsible.Content>\n <Collapsible.Trigger css={styles.trigger}>\n <Collapsible.Context>\n {(api) => (\n <>\n {api.open ? closedLabel : openLabel}\n {api.open ? <IconChevronUp size=\"16\" /> : <IconChevronDown size=\"16\" />}\n </>\n )}\n </Collapsible.Context>\n </Collapsible.Trigger>\n </Collapsible.Root>\n );\n});\n\nBitkitCollapsible.displayName = 'BitkitCollapsible';\n\nexport default BitkitCollapsible;\n"],"mappings":";;;;;;;;;;AA2CA,IAAM,2BAA2B,oBAA4B;CAC3D,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,CAAC,eAAe,oBAAoB,SAAS,IAAI;CAEvD,0BAA0B;EACxB,MAAM,YAAY,WAAW;EAC7B,MAAM,eAAe,WAAW;EAChC,IAAI,CAAC,aAAa,CAAC,cACjB;EAMF,MAAM,QAAQ,SAAS,cAAc,KAAK;EAC1C,MAAM,MAAM,UAAU,yEAAyE,gBAAgB;EAC/G,aAAa,YAAY,KAAK;EAC9B,MAAM,oBAAoB,MAAM,sBAAsB,CAAC,CAAC;EACxD,aAAa,YAAY,KAAK;EAE9B,MAAM,sBAAsB,iBAAiB,UAAU,eAAe,iBAAiB;EACvF,cAAc;EAEd,IAAI,OAAO,mBAAmB,aAC5B;EAGF,MAAM,iBAAiB,IAAI,eAAe,aAAa;EACvD,eAAe,QAAQ,SAAS;EAChC,aAAa,eAAe,WAAW;CACzC,GAAG,CAAC,iBAAiB,aAAa,CAAC;CAEnC,OAAO;EAAE;EAAY;CAAc;AACrC;AAEA,IAAM,oBAAoB,YAAoD,OAAO,QAAQ;CAC3F,MAAM,EACJ,UACA,cAAc,aACd,kBAAkB,QAClB,gBACA,KACA,aACA,UACA,UACA,KACA,OACA,YACA,WACA,gBACA,cACA,MACA,YAAY,aACZ,eACA,GAAG,SACD;CAGJ,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;CAEtB,MAAM,EAAE,YAAY,kBAAkB,wBAAwB,eAAe;CAE7E,MAAM,mBAAmB,gBAAgB,YAA+B,aAAa,QAAQ,IAAI,IAAI,KAAA;CAuBrG,IAAI,CAAC,eACH,OACE,qBAAC,KAAD;EAAU;EAAK,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,GAAI;EAA5C,UAAA,CACG,SAAS,oBAAC,aAAD;GAAa,GAAI;GAAa,UAAA;EAAmB,CAAA,GAC3D,oBAAC,KAAD;GAAK,KAAK;GAAa;EAAc,CAAA,CAClC;;CAIT,OACE,qBAAC,YAAY,MAAb;EACO;EACY;EACD;EAChB,KAAK,CAAC,OAAO,MAAM,GAAG;EACT;EACH;EACA;EACL;EACM;EACK;EAChB,cAAc;EACR;EACS;EACf,GAAI;EAdN,UAAA;GAgBG,SAAS,oBAAC,aAAD;IAAa,GAAI;IAAa,UAAA;GAAmB,CAAA;GAC3D,oBAAC,YAAY,SAAb;IAAqB,KAAK,OAAO;IAC/B,UAAA,oBAAC,KAAD;KAAK,KAAK;KAAa;IAAc,CAAA;GAClB,CAAA;GACrB,oBAAC,YAAY,SAAb;IAAqB,KAAK,OAAO;IAC/B,UAAA,oBAAC,YAAY,SAAb,EAAA,WACI,QACA,qBAAAA,YAAA,EAAA,UAAA,CACG,IAAI,OAAO,cAAc,WACzB,IAAI,OAAO,oBAAC,eAAD,EAAe,MAAK,KAAM,CAAA,IAAI,oBAAC,iBAAD,EAAiB,MAAK,KAAM,CAAA,CACtE,EAAA,CAAA,EAEe,CAAA;GACF,CAAA;EACL;;AAEtB,CAAC;AAED,kBAAkB,cAAc"}
|
|
1
|
+
{"version":3,"file":"BitkitCollapsible.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitCollapsible/BitkitCollapsible.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible, type CollapsibleRootProps } from '@chakra-ui/react/collapsible';\nimport { useSafeLayoutEffect } from '@chakra-ui/react/hooks';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type ReactNode, useRef, useState } from 'react';\n\n// TODO: Investigate using AssetSelectChevron instead of IconChevronDown/IconChevronUp\nimport { IconChevronDown, IconChevronUp } from '../../icons';\nimport BitkitLabel, { type BitkitLabelProps } from '../BitkitLabel/BitkitLabel';\n\ntype UncontrolledProps = {\n defaultOpen?: boolean;\n open?: never;\n onOpenChange?: never;\n};\n\ntype ControlledProps = {\n defaultOpen?: never;\n onOpenChange: (open: boolean) => void;\n open: boolean;\n};\n\nexport type BitkitCollapsibleProps = Omit<\n CollapsibleRootProps,\n 'collapsedHeight' | 'defaultOpen' | 'onOpenChange' | 'open'\n> & {\n children: ReactNode;\n closedLabel?: string;\n collapsedHeight?: string;\n label?: string;\n labelProps?: Omit<BitkitLabelProps, 'children'>;\n openLabel?: string;\n} & (UncontrolledProps | ControlledProps);\n\n// contentRef sits on an unclamped wrapper *inside* Collapsible.Content, not on Content itself: when\n// closed, Content's own box is pinned to collapsedHeight (max-height + overflow), so a ResizeObserver\n// on Content can't see content that grows without changing Content's own (clamped) box - e.g. an image\n// or async child rendering more after mount. scrollHeight still reports the wrapper's true height\n// either way, clamped or not, so the read doesn't change - only where we watch for changes does.\n// isOverflowing and collapsedHeight are the effect's only dependencies. isOverflowing: BitkitCollapsible\n// renders a different tree depending on it (see below), moving contentRef to a different DOM node each\n// time it flips, so the effect must re-attach then. children is deliberately not a dependency: the\n// wrapper being unclamped means the observer already sees every content-driven size change on its own.\nconst useIsContentOverflowing = (collapsedHeight: string, isFullyCollapsed: boolean) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const [isOverflowing, setIsOverflowing] = useState(true);\n\n useSafeLayoutEffect(() => {\n // Fully collapsed content is `hidden` while closed, so it measures 0 and would always look like it\n // fits. Any content overflows a zero height anyway.\n if (isFullyCollapsed) {\n setIsOverflowing(true);\n return undefined;\n }\n\n const contentEl = contentRef.current;\n const measureScope = contentEl?.parentElement;\n if (!contentEl || !measureScope) {\n return undefined;\n }\n\n // Appended as a sibling of contentEl (not document.body) so it inherits the same font-size and\n // CSS custom properties contentEl actually sees, resolving em/var(...) heights correctly - not\n // just px/rem, which don't depend on where in the tree they're resolved.\n const probe = document.createElement('div');\n probe.style.cssText = `position: absolute; visibility: hidden; pointer-events: none; height: ${collapsedHeight};`;\n measureScope.appendChild(probe);\n const collapsedHeightPx = probe.getBoundingClientRect().height;\n measureScope.removeChild(probe);\n\n const checkOverflow = () => setIsOverflowing(contentEl.scrollHeight > collapsedHeightPx);\n checkOverflow();\n\n if (typeof ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const resizeObserver = new ResizeObserver(checkOverflow);\n resizeObserver.observe(contentEl);\n return () => resizeObserver.disconnect();\n }, [collapsedHeight, isFullyCollapsed, isOverflowing]);\n\n return { contentRef, isOverflowing };\n};\n\nconst BitkitCollapsible = forwardRef<HTMLDivElement, BitkitCollapsibleProps>((props, ref) => {\n const {\n children,\n closedLabel = 'Show less',\n collapsedHeight = '48px',\n collapsedWidth,\n css,\n defaultOpen,\n disabled,\n hideMode,\n ids,\n label,\n labelProps,\n lazyMount,\n onExitComplete,\n onOpenChange,\n open,\n openLabel = 'Show more',\n unmountOnExit,\n ...rest\n } = props;\n\n const recipe = useSlotRecipe({ key: 'collapsible' });\n const styles = recipe();\n\n // A zero collapsedHeight shows nothing while closed, so it isn't passed to zag: without one, zag marks\n // the closed content `hidden`, which keeps it out of the accessibility tree and find-in-page. With\n // one, the content is only clipped to 0px and stays readable by assistive technology.\n const isFullyCollapsed = parseFloat(collapsedHeight) === 0;\n const { contentRef, isOverflowing } = useIsContentOverflowing(collapsedHeight, isFullyCollapsed);\n\n const handleOpenChange = onOpenChange ? (details: { open: boolean }) => onOpenChange(details.open) : undefined;\n\n // zag's closed-state styling (min/max-height clamp, the fade-out pseudo-element) is driven purely by\n // Collapsible.Root defaulting to \"closed\" - it doesn't know or care whether collapsedHeight would\n // ever actually clip anything. Passing collapsedHeight and hiding only the trigger still leaves\n // content that fits pinned to that height and faded, so when it doesn't overflow we skip\n // Collapsible.Root/Content entirely and render plain markup instead of fighting the closed-state\n // styling with overrides. Only styles.root applies here - it carries the inherited color/textStyle,\n // which is all a non-collapsing block needs; styles.content's overflow/position/fade rules are\n // collapse-only and would clip content (a focus ring, an absolutely-positioned child) that isn't\n // meant to be clipped. contentRef sits directly under styles.root rather than under a styles.content\n // box, so measureScope (its parent) is styles.root in this branch and styles.content in the\n // overflowing one below - both carry the same inherited font-size, since textStyle now lives on\n // root and cascades down, so collapsedHeight's em/var(...) units resolve the same way in either\n // branch. disabled/ids/collapsedWidth/onExitComplete/lazyMount/unmountOnExit/hideMode\n // are zag/Ark machine props with no meaning on plain markup, so they're destructured out above and\n // only forwarded to Collapsible.Root below - otherwise they'd reach the DOM as unknown attributes.\n //\n // isOverflowing starts true, so every mount (even of content that turns out to fit) renders through\n // this Collapsible.Root tree first and flips to the plain tree below once measured - a real\n // remount of children, since the two trees don't share a component type at that position. Same\n // going the other way on a runtime resize. Accepted tradeoff: measuring requires a real layout\n // pass, and we don't have the content's size before that first render.\n if (!isOverflowing) {\n return (\n <Box ref={ref} css={[styles.root, css]} {...rest}>\n {label && <BitkitLabel {...labelProps}>{label}</BitkitLabel>}\n <Box ref={contentRef}>{children}</Box>\n </Box>\n );\n }\n\n return (\n <Collapsible.Root\n ref={ref}\n collapsedHeight={isFullyCollapsed ? undefined : collapsedHeight}\n collapsedWidth={collapsedWidth}\n css={[styles.root, css]}\n defaultOpen={defaultOpen}\n disabled={disabled}\n hideMode={hideMode}\n ids={ids}\n lazyMount={lazyMount}\n onExitComplete={onExitComplete}\n onOpenChange={handleOpenChange}\n open={open}\n unmountOnExit={unmountOnExit}\n {...rest}\n >\n {label && <BitkitLabel {...labelProps}>{label}</BitkitLabel>}\n <Collapsible.Content css={styles.content}>\n <Box ref={contentRef}>{children}</Box>\n </Collapsible.Content>\n <Collapsible.Trigger css={styles.trigger}>\n <Collapsible.Context>\n {(api) => (\n <>\n {api.open ? closedLabel : openLabel}\n {api.open ? <IconChevronUp size=\"16\" /> : <IconChevronDown size=\"16\" />}\n </>\n )}\n </Collapsible.Context>\n </Collapsible.Trigger>\n </Collapsible.Root>\n );\n});\n\nBitkitCollapsible.displayName = 'BitkitCollapsible';\n\nexport default BitkitCollapsible;\n"],"mappings":";;;;;;;;;;AA2CA,IAAM,2BAA2B,iBAAyB,qBAA8B;CACtF,MAAM,aAAa,OAAuB,IAAI;CAC9C,MAAM,CAAC,eAAe,oBAAoB,SAAS,IAAI;CAEvD,0BAA0B;EAGxB,IAAI,kBAAkB;GACpB,iBAAiB,IAAI;GACrB;EACF;EAEA,MAAM,YAAY,WAAW;EAC7B,MAAM,eAAe,WAAW;EAChC,IAAI,CAAC,aAAa,CAAC,cACjB;EAMF,MAAM,QAAQ,SAAS,cAAc,KAAK;EAC1C,MAAM,MAAM,UAAU,yEAAyE,gBAAgB;EAC/G,aAAa,YAAY,KAAK;EAC9B,MAAM,oBAAoB,MAAM,sBAAsB,CAAC,CAAC;EACxD,aAAa,YAAY,KAAK;EAE9B,MAAM,sBAAsB,iBAAiB,UAAU,eAAe,iBAAiB;EACvF,cAAc;EAEd,IAAI,OAAO,mBAAmB,aAC5B;EAGF,MAAM,iBAAiB,IAAI,eAAe,aAAa;EACvD,eAAe,QAAQ,SAAS;EAChC,aAAa,eAAe,WAAW;CACzC,GAAG;EAAC;EAAiB;EAAkB;CAAa,CAAC;CAErD,OAAO;EAAE;EAAY;CAAc;AACrC;AAEA,IAAM,oBAAoB,YAAoD,OAAO,QAAQ;CAC3F,MAAM,EACJ,UACA,cAAc,aACd,kBAAkB,QAClB,gBACA,KACA,aACA,UACA,UACA,KACA,OACA,YACA,WACA,gBACA,cACA,MACA,YAAY,aACZ,eACA,GAAG,SACD;CAGJ,MAAM,SADS,cAAc,EAAE,KAAK,cAAc,CACnC,CAAA,CAAO;CAKtB,MAAM,mBAAmB,WAAW,eAAe,MAAM;CACzD,MAAM,EAAE,YAAY,kBAAkB,wBAAwB,iBAAiB,gBAAgB;CAE/F,MAAM,mBAAmB,gBAAgB,YAA+B,aAAa,QAAQ,IAAI,IAAI,KAAA;CAuBrG,IAAI,CAAC,eACH,OACE,qBAAC,KAAD;EAAU;EAAK,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,GAAI;EAA5C,UAAA,CACG,SAAS,oBAAC,aAAD;GAAa,GAAI;GAAa,UAAA;EAAmB,CAAA,GAC3D,oBAAC,KAAD;GAAK,KAAK;GAAa;EAAc,CAAA,CAClC;;CAIT,OACE,qBAAC,YAAY,MAAb;EACO;EACL,iBAAiB,mBAAmB,KAAA,IAAY;EAChC;EAChB,KAAK,CAAC,OAAO,MAAM,GAAG;EACT;EACH;EACA;EACL;EACM;EACK;EAChB,cAAc;EACR;EACS;EACf,GAAI;EAdN,UAAA;GAgBG,SAAS,oBAAC,aAAD;IAAa,GAAI;IAAa,UAAA;GAAmB,CAAA;GAC3D,oBAAC,YAAY,SAAb;IAAqB,KAAK,OAAO;IAC/B,UAAA,oBAAC,KAAD;KAAK,KAAK;KAAa;IAAc,CAAA;GAClB,CAAA;GACrB,oBAAC,YAAY,SAAb;IAAqB,KAAK,OAAO;IAC/B,UAAA,oBAAC,YAAY,SAAb,EAAA,WACI,QACA,qBAAAA,YAAA,EAAA,UAAA,CACG,IAAI,OAAO,cAAc,WACzB,IAAI,OAAO,oBAAC,eAAD,EAAe,MAAK,KAAM,CAAA,IAAI,oBAAC,iBAAD,EAAiB,MAAK,KAAM,CAAA,CACtE,EAAA,CAAA,EAEe,CAAA;GACF,CAAA;EACL;;AAEtB,CAAC;AAED,kBAAkB,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HTMLChakraProps } from '@chakra-ui/react/styled-system';
|
|
2
|
+
import { BitkitIconComponent } from '../../icons';
|
|
3
|
+
import { BitkitProductThumbnailProduct } from '../BitkitProductThumbnail/BitkitProductThumbnail';
|
|
4
|
+
interface BitkitLinkCardCommonProps extends Omit<HTMLChakraProps<'a'>, 'children' | 'title'> {
|
|
5
|
+
/** The call to action in the footer. */
|
|
6
|
+
ctaText: string;
|
|
7
|
+
bodyText?: string;
|
|
8
|
+
href: string;
|
|
9
|
+
/** Opens the link in a new tab, with `rel="noreferrer noopener"`, and swaps the hover arrow for the external one. */
|
|
10
|
+
isExternal?: boolean;
|
|
11
|
+
headingText: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BitkitLinkCardWithIconProps extends BitkitLinkCardCommonProps {
|
|
14
|
+
/** Icon shown in a small tile above the title. */
|
|
15
|
+
icon: BitkitIconComponent;
|
|
16
|
+
product?: undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface BitkitLinkCardWithProductProps extends BitkitLinkCardCommonProps {
|
|
19
|
+
icon?: undefined;
|
|
20
|
+
/**
|
|
21
|
+
* For a card that points at a Bitrise product rather than a feature: shows that product's
|
|
22
|
+
* `BitkitProductThumbnail` above the title (40px below tablet, 64px from tablet up).
|
|
23
|
+
*/
|
|
24
|
+
product: BitkitProductThumbnailProduct;
|
|
25
|
+
}
|
|
26
|
+
/** Either `icon` or `product` is required. */
|
|
27
|
+
export type BitkitLinkCardProps = BitkitLinkCardWithIconProps | BitkitLinkCardWithProductProps;
|
|
28
|
+
declare const BitkitLinkCard: import('react').ForwardRefExoticComponent<BitkitLinkCardProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
29
|
+
export default BitkitLinkCard;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import IconArrowNortheast from "../../icons/IconArrowNortheast.js";
|
|
2
|
+
import IconArrowRight from "../../icons/IconArrowRight.js";
|
|
3
|
+
import BitkitProductThumbnail from "../BitkitProductThumbnail/BitkitProductThumbnail.js";
|
|
4
|
+
import { chakra, useSlotRecipe } 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 { Box } from "@chakra-ui/react/box";
|
|
8
|
+
import { Text } from "@chakra-ui/react/text";
|
|
9
|
+
import { Card } from "@chakra-ui/react/card";
|
|
10
|
+
//#region lib/components/BitkitLinkCard/BitkitLinkCard.tsx
|
|
11
|
+
var BitkitLinkCard = forwardRef((props, ref) => {
|
|
12
|
+
const { bodyText, className, css, ctaText, headingText, icon: Icon, isExternal, product, rel, target, ...rest } = props;
|
|
13
|
+
const variant = Icon ? "icon" : "product";
|
|
14
|
+
const styles = useSlotRecipe({ key: "linkCard" })({ variant });
|
|
15
|
+
const ActionIcon = isExternal ? IconArrowNortheast : IconArrowRight;
|
|
16
|
+
return /* @__PURE__ */ jsx(Card.Root, {
|
|
17
|
+
asChild: true,
|
|
18
|
+
css: [styles.root, css],
|
|
19
|
+
elevation: false,
|
|
20
|
+
paddingSize: {
|
|
21
|
+
base: "sm",
|
|
22
|
+
tablet: "lg"
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ jsxs(chakra.a, {
|
|
25
|
+
className: className ? `group ${className}` : "group",
|
|
26
|
+
ref,
|
|
27
|
+
rel: isExternal ? rel ? `${rel} noreferrer noopener` : "noreferrer noopener" : rel,
|
|
28
|
+
target: isExternal ? "_blank" : target,
|
|
29
|
+
...rest,
|
|
30
|
+
children: [/* @__PURE__ */ jsxs(Card.Body, {
|
|
31
|
+
css: styles.body,
|
|
32
|
+
children: [Icon ? /* @__PURE__ */ jsx(Box, {
|
|
33
|
+
css: styles.iconTile,
|
|
34
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
35
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(BitkitProductThumbnail, {
|
|
36
|
+
hideFrom: "tablet",
|
|
37
|
+
product
|
|
38
|
+
}), /* @__PURE__ */ jsx(BitkitProductThumbnail, {
|
|
39
|
+
hideBelow: "tablet",
|
|
40
|
+
product,
|
|
41
|
+
size: "64"
|
|
42
|
+
})] }), /* @__PURE__ */ jsxs(Box, {
|
|
43
|
+
css: styles.textBlock,
|
|
44
|
+
children: [/* @__PURE__ */ jsx(Card.Title, {
|
|
45
|
+
css: styles.title,
|
|
46
|
+
children: headingText
|
|
47
|
+
}), bodyText && /* @__PURE__ */ jsx(Card.Description, {
|
|
48
|
+
css: styles.description,
|
|
49
|
+
children: bodyText
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
}), /* @__PURE__ */ jsxs(Card.Footer, {
|
|
53
|
+
css: styles.footer,
|
|
54
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
55
|
+
as: "span",
|
|
56
|
+
css: styles.actionLabel,
|
|
57
|
+
children: ctaText
|
|
58
|
+
}), /* @__PURE__ */ jsx(ActionIcon, { css: styles.actionIcon })]
|
|
59
|
+
})]
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
BitkitLinkCard.displayName = "BitkitLinkCard";
|
|
64
|
+
//#endregion
|
|
65
|
+
export { BitkitLinkCard as default };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=BitkitLinkCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BitkitLinkCard.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitLinkCard/BitkitLinkCard.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Card } from '@chakra-ui/react/card';\nimport { chakra, type HTMLChakraProps, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { forwardRef } from 'react';\n\nimport { type BitkitIconComponent, IconArrowNortheast, IconArrowRight } from '../../icons';\nimport BitkitProductThumbnail, {\n type BitkitProductThumbnailProduct,\n} from '../BitkitProductThumbnail/BitkitProductThumbnail';\n\ninterface BitkitLinkCardCommonProps extends Omit<HTMLChakraProps<'a'>, 'children' | 'title'> {\n /** The call to action in the footer. */\n ctaText: string;\n bodyText?: string;\n href: string;\n /** Opens the link in a new tab, with `rel=\"noreferrer noopener\"`, and swaps the hover arrow for the external one. */\n isExternal?: boolean;\n headingText: string;\n}\n\nexport interface BitkitLinkCardWithIconProps extends BitkitLinkCardCommonProps {\n /** Icon shown in a small tile above the title. */\n icon: BitkitIconComponent;\n product?: undefined;\n}\n\nexport interface BitkitLinkCardWithProductProps extends BitkitLinkCardCommonProps {\n icon?: undefined;\n /**\n * For a card that points at a Bitrise product rather than a feature: shows that product's\n * `BitkitProductThumbnail` above the title (40px below tablet, 64px from tablet up).\n */\n product: BitkitProductThumbnailProduct;\n}\n\n/** Either `icon` or `product` is required. */\nexport type BitkitLinkCardProps = BitkitLinkCardWithIconProps | BitkitLinkCardWithProductProps;\n\nconst BitkitLinkCard = forwardRef<HTMLAnchorElement, BitkitLinkCardProps>((props, ref) => {\n const {\n bodyText,\n className,\n css,\n ctaText,\n headingText,\n icon: Icon,\n isExternal,\n product,\n rel,\n target,\n ...rest\n } = props;\n\n const variant = Icon ? 'icon' : 'product';\n const recipe = useSlotRecipe({ key: 'linkCard' });\n const styles = recipe({ variant });\n const ActionIcon = isExternal ? IconArrowNortheast : IconArrowRight;\n\n return (\n <Card.Root asChild css={[styles.root, css]} elevation={false} paddingSize={{ base: 'sm', tablet: 'lg' }}>\n {/* chakra.a: Card.Root renders as this anchor; no named primitive is a plain, unstyled link. */}\n <chakra.a\n // `group` drives every part's hover and focus styling, so a consumer's class is added to it.\n className={className ? `group ${className}` : 'group'}\n ref={ref}\n rel={isExternal ? (rel ? `${rel} noreferrer noopener` : 'noreferrer noopener') : rel}\n target={isExternal ? '_blank' : target}\n {...rest}\n >\n <Card.Body css={styles.body}>\n {Icon ? (\n <Box css={styles.iconTile}>\n <Icon />\n </Box>\n ) : (\n // Each size has its own artwork, so both are rendered and the breakpoint picks one.\n <>\n <BitkitProductThumbnail hideFrom=\"tablet\" product={product} />\n <BitkitProductThumbnail hideBelow=\"tablet\" product={product} size=\"64\" />\n </>\n )}\n <Box css={styles.textBlock}>\n <Card.Title css={styles.title}>{headingText}</Card.Title>\n {bodyText && <Card.Description css={styles.description}>{bodyText}</Card.Description>}\n </Box>\n </Card.Body>\n <Card.Footer css={styles.footer}>\n <Text as=\"span\" css={styles.actionLabel}>\n {ctaText}\n </Text>\n <ActionIcon css={styles.actionIcon} />\n </Card.Footer>\n </chakra.a>\n </Card.Root>\n );\n});\n\nBitkitLinkCard.displayName = 'BitkitLinkCard';\n\nexport default BitkitLinkCard;\n"],"mappings":";;;;;;;;;;AAuCA,IAAM,iBAAiB,YAAoD,OAAO,QAAQ;CACxF,MAAM,EACJ,UACA,WACA,KACA,SACA,aACA,MAAM,MACN,YACA,SACA,KACA,QACA,GAAG,SACD;CAEJ,MAAM,UAAU,OAAO,SAAS;CAEhC,MAAM,SADS,cAAc,EAAE,KAAK,WAAW,CAChC,CAAA,CAAO,EAAE,QAAQ,CAAC;CACjC,MAAM,aAAa,aAAa,qBAAqB;CAErD,OACE,oBAAC,KAAK,MAAN;EAAW,SAAA;EAAQ,KAAK,CAAC,OAAO,MAAM,GAAG;EAAG,WAAW;EAAO,aAAa;GAAE,MAAM;GAAM,QAAQ;EAAK;EAEpG,UAAA,qBAAC,OAAO,GAAR;GAEE,WAAW,YAAY,SAAS,cAAc;GACzC;GACL,KAAK,aAAc,MAAM,GAAG,IAAI,wBAAwB,wBAAyB;GACjF,QAAQ,aAAa,WAAW;GAChC,GAAI;GANN,UAAA,CAQE,qBAAC,KAAK,MAAN;IAAW,KAAK,OAAO;IAAvB,UAAA,CACG,OACC,oBAAC,KAAD;KAAK,KAAK,OAAO;KACf,UAAA,oBAAC,MAAD,CAAO,CAAA;IACJ,CAAA,IAGL,qBAAAA,YAAA,EAAA,UAAA,CACE,oBAAC,wBAAD;KAAwB,UAAS;KAAkB;IAAU,CAAA,GAC7D,oBAAC,wBAAD;KAAwB,WAAU;KAAkB;KAAS,MAAK;IAAM,CAAA,CACxE,EAAA,CAAA,GAEJ,qBAAC,KAAD;KAAK,KAAK,OAAO;KAAjB,UAAA,CACE,oBAAC,KAAK,OAAN;MAAY,KAAK,OAAO;MAAQ,UAAA;KAAwB,CAAA,GACvD,YAAY,oBAAC,KAAK,aAAN;MAAkB,KAAK,OAAO;MAAc,UAAA;KAA2B,CAAA,CACjF;IACI,CAAA,CAAA;GACX,CAAA,GAAA,qBAAC,KAAK,QAAN;IAAa,KAAK,OAAO;IAAzB,UAAA,CACE,oBAAC,MAAD;KAAM,IAAG;KAAO,KAAK,OAAO;KACzB,UAAA;IACG,CAAA,GACN,oBAAC,YAAD,EAAY,KAAK,OAAO,WAAa,CAAA,CAC1B;GACL,CAAA,CAAA;;CACD,CAAA;AAEf,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -4,8 +4,6 @@ export interface BitkitExpandableRowProps {
|
|
|
4
4
|
colSpan: number;
|
|
5
5
|
defaultOpen?: boolean;
|
|
6
6
|
expandedContent: ReactNode;
|
|
7
|
-
/** Tints the row as selected. See `BitkitTable.Row`. */
|
|
8
|
-
selected?: boolean;
|
|
9
7
|
}
|
|
10
8
|
declare const BitkitExpandableRow: import('react').ForwardRefExoticComponent<BitkitExpandableRowProps & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
11
9
|
export default BitkitExpandableRow;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import AssetSelectChevron from "../../utilities/AssetSelectChevron.js";
|
|
2
|
-
import BitkitTableRow from "./BitkitTableRow.js";
|
|
3
2
|
import { forwardRef } from "react";
|
|
4
3
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { Box } from "@chakra-ui/react/box";
|
|
6
5
|
import { Collapsible } from "@chakra-ui/react/collapsible";
|
|
7
6
|
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
8
7
|
//#region lib/components/BitkitTable/BitkitExpandableRow.tsx
|
|
9
|
-
var BitkitExpandableRow = forwardRef(({ children, colSpan, defaultOpen = false, expandedContent
|
|
8
|
+
var BitkitExpandableRow = forwardRef(({ children, colSpan, defaultOpen = false, expandedContent }, ref) => {
|
|
10
9
|
const styles = useTableStyles();
|
|
11
10
|
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
12
11
|
asChild: true,
|
|
13
12
|
defaultOpen,
|
|
14
|
-
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(
|
|
13
|
+
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Table.Row, {
|
|
15
14
|
ref,
|
|
16
15
|
css: styles.expandableRow,
|
|
17
|
-
selected,
|
|
18
16
|
children: [/* @__PURE__ */ jsx(Table.Cell, {
|
|
19
17
|
css: styles.expandCell,
|
|
20
18
|
children: /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitExpandableRow.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\
|
|
1
|
+
{"version":3,"file":"BitkitExpandableRow.js","names":["_Fragment"],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactNode } from 'react';\n\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\n\nexport interface BitkitExpandableRowProps {\n children: ReactNode;\n colSpan: number;\n defaultOpen?: boolean;\n expandedContent: ReactNode;\n}\n\nconst BitkitExpandableRow = forwardRef<HTMLTableRowElement, BitkitExpandableRowProps>(\n ({ children, colSpan, defaultOpen = false, expandedContent }, ref) => {\n const styles = useTableStyles();\n\n return (\n <Collapsible.Root asChild defaultOpen={defaultOpen}>\n <>\n <Table.Row ref={ref} css={styles.expandableRow}>\n <Table.Cell css={styles.expandCell}>\n <Collapsible.Trigger aria-label=\"Toggle row details\" css={styles.expandTrigger}>\n <Collapsible.Indicator asChild>\n <AssetSelectChevron color=\"button/secondary/text\" />\n </Collapsible.Indicator>\n </Collapsible.Trigger>\n </Table.Cell>\n {children}\n </Table.Row>\n <Table.Row css={styles.expandedRow}>\n <Table.Cell colSpan={colSpan} css={styles.expandedCell}>\n <Collapsible.Content>\n <Box css={styles.expandedContent}>{expandedContent}</Box>\n </Collapsible.Content>\n </Table.Cell>\n </Table.Row>\n </>\n </Collapsible.Root>\n );\n },\n);\n\nBitkitExpandableRow.displayName = 'BitkitTable.ExpandableRow';\n\nexport default BitkitExpandableRow;\n"],"mappings":";;;;;;;AAcA,IAAM,sBAAsB,YACzB,EAAE,UAAU,SAAS,cAAc,OAAO,mBAAmB,QAAQ;CACpE,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,YAAY,MAAb;EAAkB,SAAA;EAAqB;EACrC,UAAA,qBAAAA,YAAA,EAAA,UAAA,CACE,qBAAC,MAAM,KAAP;GAAgB;GAAK,KAAK,OAAO;GAAjC,UAAA,CACE,oBAAC,MAAM,MAAP;IAAY,KAAK,OAAO;IACtB,UAAA,oBAAC,YAAY,SAAb;KAAqB,cAAW;KAAqB,KAAK,OAAO;KAC/D,UAAA,oBAAC,YAAY,WAAb;MAAuB,SAAA;MACrB,UAAA,oBAAC,oBAAD,EAAoB,OAAM,wBAAyB,CAAA;KAC9B,CAAA;IACJ,CAAA;GACX,CAAA,GACX,QACQ;EACX,CAAA,GAAA,oBAAC,MAAM,KAAP;GAAW,KAAK,OAAO;GACrB,UAAA,oBAAC,MAAM,MAAP;IAAqB;IAAS,KAAK,OAAO;IACxC,UAAA,oBAAC,YAAY,SAAb,EAAA,UACE,oBAAC,KAAD;KAAK,KAAK,OAAO;KAAkB,UAAA;IAAqB,CAAA,EACrC,CAAA;GACX,CAAA;EACH,CAAA,CACX,EAAA,CAAA;CACc,CAAA;AAEtB,CACF;AAEA,oBAAoB,cAAc"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Table } from '@chakra-ui/react/table';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { BitkitLinkProps } from '../BitkitLink/BitkitLink';
|
|
4
|
-
|
|
5
|
-
export type BitkitLinkedRowProps = Omit<BitkitTableRowProps, 'onClick'>;
|
|
4
|
+
export type BitkitLinkedRowProps = Omit<Table.RowProps, 'onClick'>;
|
|
6
5
|
export interface BitkitLinkedRowLinkCellProps extends Omit<Table.CellProps, 'children'> {
|
|
7
6
|
/**
|
|
8
7
|
* The row's link: a single `BitkitLink` with its own `href`, `isExternal`, `colorVariant` and any
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { withSubComponents } from "../../utilities/withSubComponents.js";
|
|
2
|
-
import BitkitTableRow from "./BitkitTableRow.js";
|
|
3
2
|
import { forwardRef } from "react";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
@@ -31,7 +30,7 @@ import { Table, useTableStyles } from "@chakra-ui/react/table";
|
|
|
31
30
|
var BitkitLinkedRow = forwardRef((props, ref) => {
|
|
32
31
|
const { children, css, ...rest } = props;
|
|
33
32
|
const styles = useTableStyles();
|
|
34
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsx(Table.Row, {
|
|
35
34
|
ref,
|
|
36
35
|
css: [styles.linkedRow, css],
|
|
37
36
|
...rest,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitLinkedRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitLinkedRow.tsx"],"sourcesContent":["import { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactElement } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport { type BitkitLinkProps } from '../BitkitLink/BitkitLink';\
|
|
1
|
+
{"version":3,"file":"BitkitLinkedRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitLinkedRow.tsx"],"sourcesContent":["import { Table, useTableStyles } from '@chakra-ui/react/table';\nimport { forwardRef, type ReactElement } from 'react';\n\nimport { withSubComponents } from '../../utilities/withSubComponents';\nimport { type BitkitLinkProps } from '../BitkitLink/BitkitLink';\n\nexport type BitkitLinkedRowProps = Omit<Table.RowProps, 'onClick'>;\n\n/**\n * A table row that navigates as a whole. Exactly one of its cells must be a\n * `BitkitTable.LinkedRow.LinkCell` holding the row's link — that link's text becomes the row's\n * accessible name, and its stretched pseudo-element makes the entire row the click and focus target.\n *\n * Interactive elements in the other cells (buttons, checkboxes, other links) stay clickable: they\n * are lifted above the stretched link, so a `BitkitTable.RowActionsCell` works inside a linked row.\n *\n * Neither requirement is enforced: a row without a `LinkCell`, or one whose link has no `href`,\n * still renders with the linked-row styling — hover affordance included — and navigates nowhere.\n *\n * @example\n * ```tsx\n * <BitkitTable.LinkedRow>\n * <BitkitTable.LinkedRow.LinkCell>\n * <BitkitLink colorVariant=\"purple\" href={`/workflows/${row.id}`}>\n * {row.name}\n * </BitkitLink>\n * </BitkitTable.LinkedRow.LinkCell>\n * <BitkitTable.Cell>{row.status}</BitkitTable.Cell>\n * <BitkitTable.RowActionsCell actions={actions} />\n * </BitkitTable.LinkedRow>\n * ```\n */\nconst BitkitLinkedRow = forwardRef<HTMLTableRowElement, BitkitLinkedRowProps>((props, ref) => {\n const { children, css, ...rest } = props;\n const styles = useTableStyles();\n\n return (\n <Table.Row ref={ref} css={[styles.linkedRow, css]} {...rest}>\n {children}\n </Table.Row>\n );\n});\n\nBitkitLinkedRow.displayName = 'BitkitTable.LinkedRow';\n\nexport interface BitkitLinkedRowLinkCellProps extends Omit<Table.CellProps, 'children'> {\n /**\n * The row's link: a single `BitkitLink` with its own `href`, `isExternal`, `colorVariant` and any\n * other link prop. The type only rules out bare text and multiple children — a non-link element,\n * or a `BitkitLink` without an `href`, type-checks as well and leaves the row looking linked\n * while navigating nowhere. Anything else the cell should show (an icon, a `VisuallyHidden` name)\n * goes inside the link.\n */\n children: ReactElement<BitkitLinkProps>;\n}\n\n/**\n * The cell that carries the row's link, so give it the cell that names the row. The cell only\n * stretches its link across the row, leaving the styling to the link itself.\n */\nconst LinkCell = forwardRef<HTMLTableCellElement, BitkitLinkedRowLinkCellProps>((props, ref) => {\n const { children, css, ...rest } = props;\n const styles = useTableStyles();\n\n return (\n <Table.Cell ref={ref} css={[styles.linkCell, css]} data-link-cell {...rest}>\n {children}\n </Table.Cell>\n );\n});\n\nLinkCell.displayName = 'BitkitTable.LinkedRow.LinkCell';\n\nexport default withSubComponents(BitkitLinkedRow, { LinkCell });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAM,kBAAkB,YAAuD,OAAO,QAAQ;CAC5F,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS;CACnC,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,MAAM,KAAP;EAAgB;EAAK,KAAK,CAAC,OAAO,WAAW,GAAG;EAAG,GAAI;EACpD;CACQ,CAAA;AAEf,CAAC;AAED,gBAAgB,cAAc;;;;;AAiB9B,IAAM,WAAW,YAAgE,OAAO,QAAQ;CAC9F,MAAM,EAAE,UAAU,KAAK,GAAG,SAAS;CACnC,MAAM,SAAS,eAAe;CAE9B,OACE,oBAAC,MAAM,MAAP;EAAiB;EAAK,KAAK,CAAC,OAAO,UAAU,GAAG;EAAG,kBAAA;EAAe,GAAI;EACnE;CACS,CAAA;AAEhB,CAAC;AAED,SAAS,cAAc;AAEvB,IAAA,0BAAe,kBAAkB,iBAAiB,EAAE,SAAS,CAAC"}
|
|
@@ -6,7 +6,6 @@ import { default as FilterRow } from './BitkitFilterRow';
|
|
|
6
6
|
import { default as LinkedRow } from './BitkitLinkedRow';
|
|
7
7
|
import { default as RowActionsCell } from './BitkitRowActionsCell';
|
|
8
8
|
import { default as SortableColumnHeader } from './BitkitSortableColumnHeader';
|
|
9
|
-
import { default as Row } from './BitkitTableRow';
|
|
10
9
|
/**
|
|
11
10
|
* Chakra's `Table` namespace with the Bitkit table parts attached, so a table needs a single
|
|
12
11
|
* import: `BitkitTable.Root`, `BitkitTable.Row`, `BitkitTable.Cell`, … alongside
|
|
@@ -31,13 +30,12 @@ import { default as Row } from './BitkitTableRow';
|
|
|
31
30
|
* </BitkitTable.Root>
|
|
32
31
|
* ```
|
|
33
32
|
*/
|
|
34
|
-
declare const BitkitTable:
|
|
33
|
+
declare const BitkitTable: typeof Table & {
|
|
35
34
|
BulkActionsRow: typeof BulkActionsRow;
|
|
36
35
|
DefinitionColumnHeader: typeof DefinitionColumnHeader;
|
|
37
36
|
ExpandableRow: typeof ExpandableRow;
|
|
38
37
|
FilterRow: typeof FilterRow;
|
|
39
38
|
LinkedRow: typeof LinkedRow;
|
|
40
|
-
Row: typeof Row;
|
|
41
39
|
RowActionsCell: typeof RowActionsCell;
|
|
42
40
|
SortableColumnHeader: typeof SortableColumnHeader;
|
|
43
41
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import BitkitBulkActionsRow from "./BitkitBulkActionsRow.js";
|
|
2
2
|
import BitkitDefinitionColumnHeader from "./BitkitDefinitionColumnHeader.js";
|
|
3
|
-
import BitkitTableRow from "./BitkitTableRow.js";
|
|
4
3
|
import BitkitExpandableRow from "./BitkitExpandableRow.js";
|
|
5
4
|
import BitkitFilterRow from "./BitkitFilterRow.js";
|
|
6
5
|
import BitkitLinkedRow_default from "./BitkitLinkedRow.js";
|
|
@@ -39,7 +38,6 @@ var BitkitTable = {
|
|
|
39
38
|
ExpandableRow: BitkitExpandableRow,
|
|
40
39
|
FilterRow: BitkitFilterRow,
|
|
41
40
|
LinkedRow: BitkitLinkedRow_default,
|
|
42
|
-
Row: BitkitTableRow,
|
|
43
41
|
RowActionsCell: BitkitRowActionsCell,
|
|
44
42
|
SortableColumnHeader: BitkitSortableColumnHeader
|
|
45
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTable.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTable.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\n\nimport BulkActionsRow from './BitkitBulkActionsRow';\nimport DefinitionColumnHeader from './BitkitDefinitionColumnHeader';\nimport ExpandableRow from './BitkitExpandableRow';\nimport FilterRow from './BitkitFilterRow';\nimport LinkedRow from './BitkitLinkedRow';\nimport RowActionsCell from './BitkitRowActionsCell';\nimport SortableColumnHeader from './BitkitSortableColumnHeader';\
|
|
1
|
+
{"version":3,"file":"BitkitTable.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTable.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\n\nimport BulkActionsRow from './BitkitBulkActionsRow';\nimport DefinitionColumnHeader from './BitkitDefinitionColumnHeader';\nimport ExpandableRow from './BitkitExpandableRow';\nimport FilterRow from './BitkitFilterRow';\nimport LinkedRow from './BitkitLinkedRow';\nimport RowActionsCell from './BitkitRowActionsCell';\nimport SortableColumnHeader from './BitkitSortableColumnHeader';\n\n/**\n * Chakra's `Table` namespace with the Bitkit table parts attached, so a table needs a single\n * import: `BitkitTable.Root`, `BitkitTable.Row`, `BitkitTable.Cell`, … alongside\n * `BitkitTable.RowActionsCell`, `BitkitTable.SortableColumnHeader`, and the rest.\n *\n * @example\n * ```tsx\n * <BitkitTable.Root size=\"lg\">\n * <BitkitTable.Header>\n * <BitkitTable.Row>\n * <BitkitTable.SortableColumnHeader direction={direction} onSort={onSort}>Name</BitkitTable.SortableColumnHeader>\n * </BitkitTable.Row>\n * </BitkitTable.Header>\n * <BitkitTable.Body>\n * <BitkitTable.LinkedRow>\n * <BitkitTable.LinkedRow.LinkCell>\n * <BitkitLink colorVariant=\"purple\" href={`/projects/${row.id}`}>{row.name}</BitkitLink>\n * </BitkitTable.LinkedRow.LinkCell>\n * <BitkitTable.RowActionsCell actions={actions} />\n * </BitkitTable.LinkedRow>\n * </BitkitTable.Body>\n * </BitkitTable.Root>\n * ```\n */\nconst BitkitTable: typeof Table & {\n BulkActionsRow: typeof BulkActionsRow;\n DefinitionColumnHeader: typeof DefinitionColumnHeader;\n ExpandableRow: typeof ExpandableRow;\n FilterRow: typeof FilterRow;\n LinkedRow: typeof LinkedRow;\n RowActionsCell: typeof RowActionsCell;\n SortableColumnHeader: typeof SortableColumnHeader;\n} = {\n ...Table,\n BulkActionsRow,\n DefinitionColumnHeader,\n ExpandableRow,\n FilterRow,\n LinkedRow,\n RowActionsCell,\n SortableColumnHeader,\n};\n\nexport default BitkitTable;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAM,cAQF;CACF,GAAG;CACH,gBAAA;CACA,wBAAA;CACA,eAAA;CACA,WAAA;CACA,WAAA;CACA,gBAAA;CACA,sBAAA;AACF"}
|
|
@@ -47,6 +47,7 @@ export { default as BitkitLabelTooltip, type BitkitLabelTooltipProps } from './B
|
|
|
47
47
|
export { default as BitkitLightbox, type BitkitLightboxProps } from './BitkitLightbox/BitkitLightbox';
|
|
48
48
|
export { default as BitkitLink, type BitkitLinkProps } from './BitkitLink/BitkitLink';
|
|
49
49
|
export { default as BitkitLinkButton, type BitkitLinkButtonProps } from './BitkitLinkButton/BitkitLinkButton';
|
|
50
|
+
export { default as BitkitLinkCard, type BitkitLinkCardProps, type BitkitLinkCardWithIconProps, type BitkitLinkCardWithProductProps, } from './BitkitLinkCard/BitkitLinkCard';
|
|
50
51
|
export { default as BitkitList, type BitkitListItemProps, type BitkitListProps } from './BitkitList';
|
|
51
52
|
export { default as BitkitMarkdown, type BitkitMarkdownProps } from './BitkitMarkdown/BitkitMarkdown';
|
|
52
53
|
export { default as BitkitMarkdownCard, type BitkitMarkdownCardProps } from './BitkitMarkdownCard/BitkitMarkdownCard';
|
|
@@ -93,7 +94,6 @@ export { type BitkitLinkedRowLinkCellProps, type BitkitLinkedRowProps } from './
|
|
|
93
94
|
export { type BitkitRowAction, type BitkitRowActionsCellProps } from './BitkitTable/BitkitRowActionsCell';
|
|
94
95
|
export { type BitkitSortableColumnHeaderProps } from './BitkitTable/BitkitSortableColumnHeader';
|
|
95
96
|
export { default as BitkitTable } from './BitkitTable/BitkitTable';
|
|
96
|
-
export { type BitkitTableRowProps } from './BitkitTable/BitkitTableRow';
|
|
97
97
|
export { default as BitkitTableCard, type BitkitTableCardProps } from './BitkitTableCard/BitkitTableCard';
|
|
98
98
|
export { default as BitkitTabs, type BitkitTabsAddButtonProps, type BitkitTabsRootProps, type BitkitTabsStatusColor, type BitkitTabsTriggerProps, } from './BitkitTabs/BitkitTabs';
|
|
99
99
|
export { default as BitkitTag, type BitkitTagProps } from './BitkitTag/BitkitTag';
|
package/dist/main.js
CHANGED
|
@@ -350,6 +350,8 @@ import BitkitLabeledData from "./components/BitkitLabeledData/BitkitLabeledData.
|
|
|
350
350
|
import BitkitLightbox from "./components/BitkitLightbox/BitkitLightbox.js";
|
|
351
351
|
import BitkitLink from "./components/BitkitLink/BitkitLink.js";
|
|
352
352
|
import BitkitLinkButton from "./components/BitkitLinkButton/BitkitLinkButton.js";
|
|
353
|
+
import BitkitProductThumbnail from "./components/BitkitProductThumbnail/BitkitProductThumbnail.js";
|
|
354
|
+
import BitkitLinkCard from "./components/BitkitLinkCard/BitkitLinkCard.js";
|
|
353
355
|
import BitkitMarkdown from "./components/BitkitMarkdown/BitkitMarkdown.js";
|
|
354
356
|
import BitkitMarkdownCard from "./components/BitkitMarkdownCard/BitkitMarkdownCard.js";
|
|
355
357
|
import BitkitMultiselectMenu from "./components/BitkitMultiselectMenu/BitkitMultiselectMenu.js";
|
|
@@ -367,7 +369,6 @@ import BitkitPageSubheader from "./components/BitkitPageSubheader/BitkitPageSubh
|
|
|
367
369
|
import BitkitPagination from "./components/BitkitPagination/BitkitPagination.js";
|
|
368
370
|
import BitkitPaginationLoadMore from "./components/BitkitPaginationLoadMore/BitkitPaginationLoadMore.js";
|
|
369
371
|
import BitkitPopover from "./components/BitkitPopover/BitkitPopover.js";
|
|
370
|
-
import BitkitProductThumbnail from "./components/BitkitProductThumbnail/BitkitProductThumbnail.js";
|
|
371
372
|
import BitkitProgressBar from "./components/BitkitProgressBar/BitkitProgressBar.js";
|
|
372
373
|
import BitkitPromoBanner from "./components/BitkitPromoBanner/BitkitPromoBanner.js";
|
|
373
374
|
import BitkitRadio from "./components/BitkitRadio/BitkitRadio.js";
|
|
@@ -400,4 +401,4 @@ import { uiSideNavRailWidth } from "./theme/slot-recipes/UISideNav.recipe.js";
|
|
|
400
401
|
import BitkitUISideNav_default from "./components/BitkitUISideNav/BitkitUISideNav.js";
|
|
401
402
|
import bitkitTheme from "./theme/index.js";
|
|
402
403
|
import Provider from "./providers/BitkitProvider.js";
|
|
403
|
-
export { BitbotLogoWithText, 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, BitkitContentWrapper_default as BitkitContentWrapper, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFilter_default as BitkitFilter, 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, BitkitPageSubheader, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProductThumbnail, 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, IconBitbotIntercomWhite, 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, IconModeDark, IconModeLight, IconModeSystem, 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, uiHeaderHeightPx, uiSideNavRailWidth, useBitkitTour, useResponsive, useStepsDialog, useUISideNav };
|
|
404
|
+
export { BitbotLogoWithText, 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, BitkitContentWrapper_default as BitkitContentWrapper, BitkitControlButton, BitkitDataWidget, BitkitDatePicker, BitkitDefinitionTooltip, BitkitDialog_default as BitkitDialog, BitkitDraggableCard, BitkitDrawer, BitkitEmptyState, BitkitExpandableCard, BitkitField, BitkitFileInput, BitkitFilter_default as BitkitFilter, BitkitFormDialog_default as BitkitFormDialog, BitkitGroupHeading, BitkitHeading, BitkitIconButton, BitkitInlineLoading, BitkitLabel, BitkitLabelTooltip, BitkitLabeledData, BitkitLightbox, BitkitLink, BitkitLinkButton, BitkitLinkCard, 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, BitkitPageSubheader, BitkitPagination, BitkitPaginationLoadMore, BitkitPopover, BitkitProductThumbnail, 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, IconBitbotIntercomWhite, 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, IconModeDark, IconModeLight, IconModeSystem, 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, uiHeaderHeightPx, uiSideNavRailWidth, useBitkitTour, useResponsive, useStepsDialog, useUISideNav };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const linkCardSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "root" | "description" | "iconTile" | "textBlock" | "actionLabel" | "actionIcon", {
|
|
2
|
+
variant: {
|
|
3
|
+
icon: {};
|
|
4
|
+
product: {
|
|
5
|
+
description: {
|
|
6
|
+
textStyle: {
|
|
7
|
+
base: "body/lg/regular";
|
|
8
|
+
tablet: "body/md/regular";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
export default linkCardSlotRecipe;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
2
|
+
import { cardAnatomy } from "@chakra-ui/react/anatomy";
|
|
3
|
+
//#region lib/theme/slot-recipes/LinkCard.recipe.ts
|
|
4
|
+
var linkCardAnatomy = cardAnatomy.extendWith("iconTile", "textBlock", "actionLabel", "actionIcon");
|
|
5
|
+
var rootActive = {
|
|
6
|
+
borderColor: "border/hover",
|
|
7
|
+
boxShadow: "elevation/md"
|
|
8
|
+
};
|
|
9
|
+
var textActive = { color: "text/link-hover" };
|
|
10
|
+
var iconTileActive = {
|
|
11
|
+
backgroundColor: "background/selected-hover",
|
|
12
|
+
color: "icon/interactive"
|
|
13
|
+
};
|
|
14
|
+
var linkCardSlotRecipe = defineSlotRecipe({
|
|
15
|
+
className: "link-card",
|
|
16
|
+
slots: linkCardAnatomy.keys(),
|
|
17
|
+
base: {
|
|
18
|
+
root: {
|
|
19
|
+
borderRadius: "12",
|
|
20
|
+
color: "text/primary",
|
|
21
|
+
display: "flex",
|
|
22
|
+
flexDirection: "column",
|
|
23
|
+
maxWidth: "layout/maxWidth/480",
|
|
24
|
+
overflow: "clip",
|
|
25
|
+
textDecoration: "none",
|
|
26
|
+
_hover: rootActive,
|
|
27
|
+
_focusVisible: rootActive
|
|
28
|
+
},
|
|
29
|
+
body: {
|
|
30
|
+
display: "flex",
|
|
31
|
+
flex: "1",
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
gap: {
|
|
34
|
+
base: "12",
|
|
35
|
+
tablet: "16"
|
|
36
|
+
},
|
|
37
|
+
minHeight: 0,
|
|
38
|
+
paddingInlineEnd: {
|
|
39
|
+
base: "24",
|
|
40
|
+
tablet: "24"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
iconTile: {
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
alignSelf: "flex-start",
|
|
46
|
+
backgroundColor: "background/tertiary",
|
|
47
|
+
borderRadius: {
|
|
48
|
+
base: "8",
|
|
49
|
+
tablet: "10"
|
|
50
|
+
},
|
|
51
|
+
color: "icon/secondary",
|
|
52
|
+
display: "flex",
|
|
53
|
+
flexShrink: 0,
|
|
54
|
+
justifyContent: "center",
|
|
55
|
+
padding: "8",
|
|
56
|
+
"& > svg": { boxSize: {
|
|
57
|
+
base: "24",
|
|
58
|
+
tablet: "32"
|
|
59
|
+
} },
|
|
60
|
+
_groupHover: iconTileActive,
|
|
61
|
+
_groupFocusVisible: iconTileActive
|
|
62
|
+
},
|
|
63
|
+
textBlock: {
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
gap: "6",
|
|
67
|
+
overflowWrap: "anywhere"
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
color: "text/primary",
|
|
71
|
+
textStyle: "body/xl/semibold",
|
|
72
|
+
_groupHover: textActive,
|
|
73
|
+
_groupFocusVisible: textActive
|
|
74
|
+
},
|
|
75
|
+
description: {
|
|
76
|
+
color: "text/secondary",
|
|
77
|
+
textStyle: "body/lg/regular"
|
|
78
|
+
},
|
|
79
|
+
footer: {
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
display: "flex",
|
|
82
|
+
gap: "4",
|
|
83
|
+
marginInline: {
|
|
84
|
+
base: "16",
|
|
85
|
+
tablet: "24"
|
|
86
|
+
},
|
|
87
|
+
paddingBlock: {
|
|
88
|
+
base: "16",
|
|
89
|
+
tablet: "24"
|
|
90
|
+
},
|
|
91
|
+
paddingInlineEnd: {
|
|
92
|
+
base: "8",
|
|
93
|
+
tablet: "8"
|
|
94
|
+
},
|
|
95
|
+
paddingInlineStart: {
|
|
96
|
+
base: "0",
|
|
97
|
+
tablet: "0"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
actionLabel: {
|
|
101
|
+
color: "text/link",
|
|
102
|
+
flex: "1",
|
|
103
|
+
minWidth: 0,
|
|
104
|
+
textStyle: "body/lg/regular",
|
|
105
|
+
_groupHover: textActive,
|
|
106
|
+
_groupFocusVisible: textActive
|
|
107
|
+
},
|
|
108
|
+
actionIcon: {
|
|
109
|
+
color: "icon/interactive",
|
|
110
|
+
flexShrink: 0,
|
|
111
|
+
opacity: 0,
|
|
112
|
+
_groupHover: { opacity: 1 },
|
|
113
|
+
_groupFocusVisible: { opacity: 1 }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
variants: { variant: {
|
|
117
|
+
icon: {},
|
|
118
|
+
product: { description: { textStyle: {
|
|
119
|
+
base: "body/lg/regular",
|
|
120
|
+
tablet: "body/md/regular"
|
|
121
|
+
} } }
|
|
122
|
+
} },
|
|
123
|
+
defaultVariants: { variant: "icon" }
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
export { linkCardSlotRecipe as default };
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=LinkCard.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkCard.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/LinkCard.recipe.ts"],"sourcesContent":["import { cardAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\n// BitkitLinkCard is a `Card` (elevation off, `sm` padding below tablet and `lg` from tablet up):\n// background, border, body padding and the footer's divider come from the card recipe. This recipe\n// only adds what the link card does differently: a larger radius, an inset divider, the hover state\n// and its own content.\n//\n// The whole card is one link, so hover and keyboard focus read the same: the root reacts with\n// `_hover` / `_focusVisible`, and its parts follow through the `group` class on the root.\n//\n// `variant` is a layout variant: the icon and product cards differ in their visual and, from tablet\n// up, in the size of the body text.\nconst linkCardAnatomy = cardAnatomy.extendWith('iconTile', 'textBlock', 'actionLabel', 'actionIcon');\n\nconst rootActive = {\n borderColor: 'border/hover',\n boxShadow: 'elevation/md',\n};\n\nconst textActive = { color: 'text/link-hover' };\n\nconst iconTileActive = {\n backgroundColor: 'background/selected-hover',\n color: 'icon/interactive',\n};\n\nconst linkCardSlotRecipe = defineSlotRecipe({\n className: 'link-card',\n slots: linkCardAnatomy.keys(),\n base: {\n root: {\n borderRadius: '12',\n color: 'text/primary',\n display: 'flex',\n flexDirection: 'column',\n maxWidth: 'layout/maxWidth/480',\n overflow: 'clip',\n textDecoration: 'none',\n _hover: rootActive,\n _focusVisible: rootActive,\n },\n body: {\n display: 'flex',\n flex: '1',\n flexDirection: 'column',\n gap: { base: '12', tablet: '16' },\n minHeight: 0,\n // The design keeps the content 24px off the trailing edge at every size, also where the card's\n // padding is 16. Responsive for the same reason as the footer's padding.\n paddingInlineEnd: { base: '24', tablet: '24' },\n },\n iconTile: {\n alignItems: 'center',\n alignSelf: 'flex-start',\n backgroundColor: 'background/tertiary',\n borderRadius: { base: '8', tablet: '10' },\n color: 'icon/secondary',\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n padding: '8',\n '& > svg': {\n boxSize: { base: '24', tablet: '32' },\n },\n _groupHover: iconTileActive,\n _groupFocusVisible: iconTileActive,\n },\n textBlock: {\n display: 'flex',\n flexDirection: 'column',\n gap: '6',\n overflowWrap: 'anywhere',\n },\n title: {\n color: 'text/primary',\n textStyle: 'body/xl/semibold',\n _groupHover: textActive,\n _groupFocusVisible: textActive,\n },\n description: {\n color: 'text/secondary',\n textStyle: 'body/lg/regular',\n },\n // The card's footer runs its divider edge to edge; the design insets it to the body's padding.\n // The padding is responsive on purpose: the card's own footer padding comes from a responsive\n // `paddingSize`, so a plain value here would lose to its breakpoint rule from tablet up.\n footer: {\n alignItems: 'center',\n display: 'flex',\n gap: '4',\n marginInline: { base: '16', tablet: '24' },\n paddingBlock: { base: '16', tablet: '24' },\n paddingInlineEnd: { base: '8', tablet: '8' },\n paddingInlineStart: { base: '0', tablet: '0' },\n },\n actionLabel: {\n color: 'text/link',\n flex: '1',\n minWidth: 0,\n textStyle: 'body/lg/regular',\n _groupHover: textActive,\n _groupFocusVisible: textActive,\n },\n actionIcon: {\n color: 'icon/interactive',\n flexShrink: 0,\n opacity: 0,\n _groupHover: { opacity: 1 },\n _groupFocusVisible: { opacity: 1 },\n },\n },\n variants: {\n variant: {\n icon: {},\n // The visual is a BitkitProductThumbnail, which brings its own size, radius and background.\n product: {\n description: {\n textStyle: { base: 'body/lg/regular', tablet: 'body/md/regular' },\n },\n },\n },\n },\n defaultVariants: {\n variant: 'icon',\n },\n});\n\nexport default linkCardSlotRecipe;\n"],"mappings":";;;AAaA,IAAM,kBAAkB,YAAY,WAAW,YAAY,aAAa,eAAe,YAAY;AAEnG,IAAM,aAAa;CACjB,aAAa;CACb,WAAW;AACb;AAEA,IAAM,aAAa,EAAE,OAAO,kBAAkB;AAE9C,IAAM,iBAAiB;CACrB,iBAAiB;CACjB,OAAO;AACT;AAEA,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,gBAAgB,KAAK;CAC5B,MAAM;EACJ,MAAM;GACJ,cAAc;GACd,OAAO;GACP,SAAS;GACT,eAAe;GACf,UAAU;GACV,UAAU;GACV,gBAAgB;GAChB,QAAQ;GACR,eAAe;EACjB;EACA,MAAM;GACJ,SAAS;GACT,MAAM;GACN,eAAe;GACf,KAAK;IAAE,MAAM;IAAM,QAAQ;GAAK;GAChC,WAAW;GAGX,kBAAkB;IAAE,MAAM;IAAM,QAAQ;GAAK;EAC/C;EACA,UAAU;GACR,YAAY;GACZ,WAAW;GACX,iBAAiB;GACjB,cAAc;IAAE,MAAM;IAAK,QAAQ;GAAK;GACxC,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,SAAS;GACT,WAAW,EACT,SAAS;IAAE,MAAM;IAAM,QAAQ;GAAK,EACtC;GACA,aAAa;GACb,oBAAoB;EACtB;EACA,WAAW;GACT,SAAS;GACT,eAAe;GACf,KAAK;GACL,cAAc;EAChB;EACA,OAAO;GACL,OAAO;GACP,WAAW;GACX,aAAa;GACb,oBAAoB;EACtB;EACA,aAAa;GACX,OAAO;GACP,WAAW;EACb;EAIA,QAAQ;GACN,YAAY;GACZ,SAAS;GACT,KAAK;GACL,cAAc;IAAE,MAAM;IAAM,QAAQ;GAAK;GACzC,cAAc;IAAE,MAAM;IAAM,QAAQ;GAAK;GACzC,kBAAkB;IAAE,MAAM;IAAK,QAAQ;GAAI;GAC3C,oBAAoB;IAAE,MAAM;IAAK,QAAQ;GAAI;EAC/C;EACA,aAAa;GACX,OAAO;GACP,MAAM;GACN,UAAU;GACV,WAAW;GACX,aAAa;GACb,oBAAoB;EACtB;EACA,YAAY;GACV,OAAO;GACP,YAAY;GACZ,SAAS;GACT,aAAa,EAAE,SAAS,EAAE;GAC1B,oBAAoB,EAAE,SAAS,EAAE;EACnC;CACF;CACA,UAAU,EACR,SAAS;EACP,MAAM,CAAC;EAEP,SAAS,EACP,aAAa,EACX,WAAW;GAAE,MAAM;GAAmB,QAAQ;EAAkB,EAClE,EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const pageHeaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "
|
|
1
|
+
declare const pageHeaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "textBlock" | "sectionTitle" | "headerBlock" | "contentBlock" | "titleBar" | "titleRow" | "actionBlock" | "menuButton" | "sectionBlock", {
|
|
2
2
|
contentVariant: {
|
|
3
3
|
title: {
|
|
4
4
|
titleBlock: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const pageSubheaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "
|
|
1
|
+
declare const pageSubheaderSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "textBlock" | "headerBlock" | "contentBlock" | "actionBlock", {
|
|
2
2
|
isCapped: {
|
|
3
3
|
true: {
|
|
4
4
|
tabs: {
|
|
@@ -127,7 +127,7 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
127
127
|
};
|
|
128
128
|
body: {
|
|
129
129
|
'& :where(tr)': {
|
|
130
|
-
|
|
130
|
+
"&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]": {
|
|
131
131
|
backgroundColor: "background/selected";
|
|
132
132
|
_hover: {
|
|
133
133
|
backgroundColor: "background/selected";
|
|
@@ -3,6 +3,7 @@ import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
|
3
3
|
import { tableAnatomy } from "@chakra-ui/react/anatomy";
|
|
4
4
|
//#region lib/theme/slot-recipes/Table.recipe.ts
|
|
5
5
|
var controlOnlyCell = { "& > :where(label):only-child": { display: "flex" } };
|
|
6
|
+
var selectedRow = "&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]";
|
|
6
7
|
var tableSlotRecipe = defineSlotRecipe({
|
|
7
8
|
className: "table",
|
|
8
9
|
slots: [
|
|
@@ -259,7 +260,7 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
259
260
|
}
|
|
260
261
|
},
|
|
261
262
|
body: {
|
|
262
|
-
"& :where(tr)": {
|
|
263
|
+
"& :where(tr)": { [selectedRow]: {
|
|
263
264
|
backgroundColor: "background/selected",
|
|
264
265
|
_hover: { backgroundColor: "background/selected" }
|
|
265
266
|
} },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n '&[data-selected]': {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Table.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Table.recipe.ts"],"sourcesContent":["import { tableAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n// A control like a checkbox renders as an inline-flex <label>, which sits on the line box's\n// baseline — so the text strut's descender space leaves it a pixel or two above the row's centre.\n// Making it block-level takes the line box out of the equation and lets vertical-align: middle\n// centre it exactly.\nconst controlOnlyCell = {\n '& > :where(label):only-child': {\n display: 'flex',\n },\n};\n\n// A tinted row means \"selected\", and only a Checkbox or a Radio marks it — plus `data-selected` on\n// the row itself, the explicit opt-in for a table that tints on its own terms (a switched-on row,\n// say). Everything else is left alone, which is the narrowing over a bare `input:checked`: a switch\n// renders a hidden input[type=\"checkbox\"] too, so a toggle in a data cell read as a selected row.\n//\n// `[data-part=\"item\"]` is the load-bearing half of the radio branch. Ark's SegmentGroup is Zag's\n// radio-group anatomy renamed, so a segment sits under its own scope — but scope alone would still\n// match `RadioGroup.Root`, which wraps the whole table in the `Selectable` pattern, and with it every\n// checked radio inside. Requiring `item` on the same element pins the match to a single radio.\n//\n// Known gap: BitkitSelectableTag is a `Checkbox.Root` underneath, so one in a data cell tints its\n// row. It has no consumers today; when it gets one, put `data-selectable-tag` on its `Checkbox.Root`\n// and `:not([data-selectable-tag])` on the checkbox branch here.\nconst selectedRow =\n '&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]';\n\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: [\n ...tableAnatomy.keys(),\n 'actionsCell',\n 'actionsGroup',\n 'bulkActionsGroup',\n 'bulkActionsButtons',\n 'definitionTrigger',\n 'expandCell',\n 'expandTrigger',\n 'expandableRow',\n 'expandedCell',\n 'expandedContent',\n 'expandedRow',\n 'filterControls',\n 'linkCell',\n 'linkedRow',\n 'sortColumnHeader',\n 'sortTrigger',\n 'utilityCell',\n ],\n base: {\n root: {\n fontVariantNumeric: 'lining-nums tabular-nums',\n textAlign: 'start',\n width: 'full',\n },\n caption: {\n captionSide: 'top !important',\n textAlign: 'start',\n '& > * + *': {\n marginBlockStart: '4',\n },\n },\n cell: {\n textStyle: 'body/md/regular',\n },\n actionsCell: {\n textAlign: 'end',\n whiteSpace: 'nowrap',\n // Shrink-to-fit: a table cell can't go below its content width, so any value under the\n // content's own width collapses the column around the buttons and leaves the rest to\n // the data columns.\n width: '1%',\n },\n actionsGroup: {\n alignItems: 'center',\n display: 'inline-flex',\n gap: '8',\n position: 'relative',\n },\n bulkActionsGroup: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n },\n bulkActionsButtons: {\n alignItems: 'center',\n display: 'flex',\n gap: '12',\n marginInlineStart: 'auto',\n },\n // The column header's own `heading/h5` has to survive, so the trigger inherits its type and\n // colour rather than setting them — which is what rules out BitkitDefinitionTooltip in a header,\n // since its recipe always pins a textStyle. The offset is that recipe's own value for 14px type.\n definitionTrigger: {\n color: 'inherit',\n cursor: 'pointer',\n font: 'inherit',\n letterSpacing: 'inherit',\n maxWidth: 'full',\n textDecoration: 'underline dotted',\n textDecorationColor: 'color/neutral/bold',\n textUnderlineOffset: '0.25em',\n _hover: {\n textDecorationColor: 'color/purple/base',\n },\n },\n expandCell: {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n },\n // A fixed 32x32 box (per the design), centred in the cell by the cell's own vertical-align.\n // Deriving the size from padding instead leaves it at the mercy of the Collapsible recipe's\n // asymmetric paddingBlockStart, which is what pushed the chevron 2px above the row's centre.\n expandTrigger: {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n height: '32',\n justifyContent: 'center',\n marginInlineStart: '12',\n padding: 0,\n width: '32',\n },\n expandableRow: {\n '& > td': {\n borderBottomWidth: 0,\n },\n },\n expandedCell: {\n height: 0,\n paddingBlock: 0,\n paddingInline: 0,\n },\n expandedContent: {\n borderBlockStartColor: 'border/minimal',\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: '1',\n marginInlineEnd: '16',\n marginInlineStart: '48',\n paddingBlockEnd: '24',\n paddingBlockStart: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '12',\n },\n expandedRow: {\n _hover: {\n background: 'none',\n },\n },\n filterControls: {\n alignItems: 'center',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '16',\n width: 'full',\n },\n linkCell: {\n // The link inside is the row's link: its stretched pseudo covers the whole row, so the row\n // becomes the click and focus target.\n '& a': {\n textDecoration: 'none',\n // The row's own background change is the hover affordance; the link recipe's hover\n // underline would fire on every row hover, since the stretched pseudo covers the row.\n _hover: {\n textDecoration: 'none',\n },\n _after: {\n content: '\"\"',\n inset: 0,\n position: 'absolute',\n },\n _focusVisible: {\n outline: 'none',\n _after: {\n outline: 'var(--focus-ring-width) var(--focus-ring-style) var(--focus-ring-color)',\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n },\n },\n linkedRow: {\n position: 'relative',\n _hover: {\n backgroundColor: 'background/secondary',\n },\n '& :where(a:not([data-link-cell] a), button, input, label, select)': {\n position: 'relative',\n zIndex: '1',\n },\n },\n sortColumnHeader: {\n paddingBlock: 0,\n paddingInline: 0,\n },\n sortTrigger: {\n alignItems: 'center',\n appearance: 'none',\n background: 'none',\n border: 'none',\n color: 'inherit',\n cursor: 'pointer',\n display: 'flex',\n font: 'inherit',\n gap: '8',\n height: 'full',\n paddingBlock: '12',\n paddingInline: '16',\n userSelect: 'none',\n width: 'full',\n _focusVisible: {\n outlineOffset: '-3px',\n },\n _hover: {\n backgroundColor: 'background/active',\n },\n },\n utilityCell: {\n height: 'auto',\n paddingBlock: '12',\n paddingInline: '16',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/regular',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1',\n overflow: 'hidden',\n },\n header: {\n '& :where(th)': {\n backgroundColor: 'background/tertiary',\n },\n },\n columnHeader: {\n borderBottomColor: 'border/minimal',\n paddingBlock: '12',\n paddingInline: '16',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '16',\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n borderless: {\n columnHeader: {\n borderBottomColor: 'border/regular',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/regular',\n borderTopColor: 'border/regular',\n paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\n card: {\n columnHeader: {\n borderBottomColor: 'border/minimal',\n height: '48',\n padding: '12',\n },\n cell: {\n borderBottomColor: 'border/minimal',\n borderTopColor: 'border/minimal',\n paddingInline: '12',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '24',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '24',\n },\n },\n },\n footer: {\n borderTopColor: 'border/minimal',\n },\n },\n },\n size: {\n sm: {\n cell: {\n height: '48',\n },\n },\n md: {\n cell: {\n height: rem(56),\n },\n },\n lg: {\n cell: {\n height: '64',\n },\n },\n },\n // Hovering a row tints it. Usually a reading aid on a long or wide table rather than a hint\n // that the row is clickable, so it says nothing about the row being interactive — turn it off\n // for short, static tables where there is no place to lose.\n rowHover: {\n true: {},\n false: {},\n },\n layout: {\n table: {\n root: {\n borderCollapse: 'separate',\n borderSpacing: '0',\n },\n caption: {\n marginBlockEnd: '24',\n },\n columnHeader: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n verticalAlign: 'middle',\n ...controlOnlyCell,\n // border-collapse: separate ignores borders on tfoot itself (CSS 2.1 §17.6.1),\n // so the body/footer divider has to live on the footer's cells.\n // A footer holds one full-width block (pagination, a \"new item\" action) that brings its\n // own padding and height, so the body cell's 16px inset and fixed row height would\n // double up on it.\n 'tfoot &': {\n borderBottomWidth: 0,\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n height: 'auto',\n paddingBlock: 0,\n paddingInline: 0,\n },\n },\n body: {\n '& :where(tr)': {\n [selectedRow]: {\n backgroundColor: 'background/selected',\n _hover: {\n backgroundColor: 'background/selected',\n },\n },\n },\n '& :where(tr:last-child) td': {\n borderBottomWidth: 0,\n },\n },\n },\n stacked: {\n root: {\n display: 'block',\n },\n caption: {\n display: 'block',\n padding: '16',\n backgroundColor: 'background/secondary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n },\n header: {\n borderWidth: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1',\n },\n body: {\n display: 'block',\n },\n row: {\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1',\n display: 'block',\n paddingBlock: '12',\n '&:last-child': {\n borderBottomWidth: 0,\n },\n },\n cell: {\n alignItems: 'center',\n display: 'flex',\n minHeight: '48',\n paddingInline: '16',\n _before: {\n alignSelf: 'center',\n color: 'text/primary',\n content: 'attr(data-label)',\n flexShrink: 0,\n fontWeight: 'semibold',\n marginInlineEnd: '16',\n width: '96',\n },\n 'tfoot &': {\n display: 'block',\n paddingInline: 0,\n _before: {\n content: 'none',\n },\n },\n },\n // display: block takes tfoot out of the table model, so a border on it does render here\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1',\n display: 'block',\n },\n },\n },\n },\n compoundVariants: [\n {\n css: {\n row: {\n borderBottomColor: 'border/regular',\n },\n },\n layout: 'stacked',\n variant: 'borderless',\n },\n // The card gutter and the 12px cell padding are for the wide layout. Stacked rows are blocks\n // whose cells run vertically, so an inline indent on only the first and last one reads as a\n // misalignment — everything goes back to the stacked layout's own 16px.\n {\n css: {\n cell: {\n paddingInline: '16',\n },\n row: {\n 'thead &, tbody &': {\n '& > :where(td, th):first-child': {\n paddingInlineStart: '16',\n },\n '& > :where(td, th):last-child': {\n paddingInlineEnd: '16',\n },\n },\n },\n },\n layout: 'stacked',\n variant: 'card',\n },\n // The `size` variant pins a fixed cell height (48/56/64px), and it is merged after `layout`\n // regardless of declaration order — so only a compound variant can release it. Stacked cells\n // are flex containers whose content (label gutter + a multi-line value) routinely needs more\n // room than the fixed height, and the stacked `cell` keeps `minHeight: 48` as the floor.\n {\n css: {\n cell: {\n height: 'auto',\n },\n },\n layout: 'stacked',\n },\n // Scoped to `layout: table` because that is where the hover lived before: the stacked layout\n // renders rows as blocks and never tinted them.\n {\n css: {\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/secondary',\n },\n },\n },\n },\n layout: 'table',\n rowHover: true,\n },\n ],\n defaultVariants: {\n layout: 'table',\n rowHover: true,\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AASA,IAAM,kBAAkB,EACtB,gCAAgC,EAC9B,SAAS,OACX,EACF;AAeA,IAAM,cACJ;AAEF,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO;EACL,GAAG,aAAa,KAAK;EACrB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAAkB,IACpB;EACF;EACA,MAAM,EACJ,WAAW,kBACb;EACA,aAAa;GACX,WAAW;GACX,YAAY;GAIZ,OAAO;EACT;EACA,cAAc;GACZ,YAAY;GACZ,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,kBAAkB;GAChB,YAAY;GACZ,SAAS;GACT,KAAK;EACP;EACA,oBAAoB;GAClB,YAAY;GACZ,SAAS;GACT,KAAK;GACL,mBAAmB;EACrB;EAIA,mBAAmB;GACjB,OAAO;GACP,QAAQ;GACR,MAAM;GACN,eAAe;GACf,UAAU;GACV,gBAAgB;GAChB,qBAAqB;GACrB,qBAAqB;GACrB,QAAQ,EACN,qBAAqB,oBACvB;EACF;EACA,YAAY;GACV,cAAc;GACd,eAAe;GACf,eAAe;GACf,OAAO;EACT;EAIA,eAAe;GACb,YAAY;GACZ,YAAY;GACZ,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,QAAQ;GACR,gBAAgB;GAChB,mBAAmB;GACnB,SAAS;GACT,OAAO;EACT;EACA,eAAe,EACb,UAAU,EACR,mBAAmB,EACrB,EACF;EACA,cAAc;GACZ,QAAQ;GACR,cAAc;GACd,eAAe;EACjB;EACA,iBAAiB;GACf,uBAAuB;GACvB,uBAAuB;GACvB,uBAAuB;GACvB,iBAAiB;GACjB,mBAAmB;GACnB,iBAAiB;GACjB,mBAAmB;GACnB,kBAAkB;GAClB,oBAAoB;EACtB;EACA,aAAa,EACX,QAAQ,EACN,YAAY,OACd,EACF;EACA,gBAAgB;GACd,YAAY;GACZ,SAAS;GACT,UAAU;GACV,KAAK;GACL,OAAO;EACT;EACA,UAAU,EAGR,OAAO;GACL,gBAAgB;GAGhB,QAAQ,EACN,gBAAgB,OAClB;GACA,QAAQ;IACN,SAAS;IACT,OAAO;IACP,UAAU;GACZ;GACA,eAAe;IACb,SAAS;IACT,QAAQ;KACN,SAAS;KACT,eAAe;IACjB;GACF;EACF,EACF;EACA,WAAW;GACT,UAAU;GACV,QAAQ,EACN,iBAAiB,uBACnB;GACA,qEAAqE;IACnE,UAAU;IACV,QAAQ;GACV;EACF;EACA,kBAAkB;GAChB,cAAc;GACd,eAAe;EACjB;EACA,aAAa;GACX,YAAY;GACZ,YAAY;GACZ,YAAY;GACZ,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,SAAS;GACT,MAAM;GACN,KAAK;GACL,QAAQ;GACR,cAAc;GACd,eAAe;GACf,YAAY;GACZ,OAAO;GACP,eAAe,EACb,eAAe,OACjB;GACA,QAAQ,EACN,iBAAiB,oBACnB;EACF;EACA,aAAa;GACX,QAAQ;GACR,cAAc;GACd,eAAe;EACjB;CACF;CACA,UAAU;EACR,SAAS;GACP,SAAS;IACP,MAAM;KACJ,aAAa;KACb,cAAc;KACd,aAAa;KACb,aAAa;KACb,UAAU;IACZ;IACA,QAAQ,EACN,gBAAgB,EACd,iBAAiB,sBACnB,EACF;IACA,cAAc;KACZ,mBAAmB;KACnB,cAAc;KACd,eAAe;IACjB;IACA,MAAM;KACJ,mBAAmB;KACnB,gBAAgB;KAChB,eAAe;IACjB;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;GACA,YAAY;IACV,cAAc;KACZ,mBAAmB;KACnB,SAAS;IACX;IACA,MAAM;KACJ,mBAAmB;KACnB,gBAAgB;KAChB,eAAe;IACjB;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;GACA,MAAM;IACJ,cAAc;KACZ,mBAAmB;KACnB,QAAQ;KACR,SAAS;IACX;IACA,MAAM;KACJ,mBAAmB;KACnB,gBAAgB;KAChB,eAAe;IACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;EACF;EACA,MAAM;GACJ,IAAI,EACF,MAAM,EACJ,QAAQ,KACV,EACF;GACA,IAAI,EACF,MAAM,EACJ,QAAQ,IAAI,EAAE,EAChB,EACF;GACA,IAAI,EACF,MAAM,EACJ,QAAQ,KACV,EACF;EACF;EAIA,UAAU;GACR,MAAM,CAAC;GACP,OAAO,CAAC;EACV;EACA,QAAQ;GACN,OAAO;IACL,MAAM;KACJ,gBAAgB;KAChB,eAAe;IACjB;IACA,SAAS,EACP,gBAAgB,KAClB;IACA,cAAc;KACZ,mBAAmB;KACnB,mBAAmB;KACnB,OAAO;KACP,YAAY;KACZ,WAAW;KACX,WAAW;KACX,eAAe;KACf,GAAG;IACL;IACA,MAAM;KACJ,mBAAmB;KACnB,mBAAmB;KACnB,eAAe;KACf,GAAG;KAMH,WAAW;MACT,mBAAmB;MACnB,gBAAgB;MAChB,gBAAgB;MAChB,QAAQ;MACR,cAAc;MACd,eAAe;KACjB;IACF;IACA,MAAM;KACJ,gBAAgB,GACb,cAAc;MACb,iBAAiB;MACjB,QAAQ,EACN,iBAAiB,sBACnB;KACF,EACF;KACA,8BAA8B,EAC5B,mBAAmB,EACrB;IACF;GACF;GACA,SAAS;IACP,MAAM,EACJ,SAAS,QACX;IACA,SAAS;KACP,SAAS;KACT,SAAS;KACT,iBAAiB;KACjB,mBAAmB;KACnB,mBAAmB;KACnB,mBAAmB;IACrB;IACA,QAAQ;KACN,aAAa;KACb,MAAM;KACN,QAAQ;KACR,QAAQ;KACR,UAAU;KACV,SAAS;KACT,UAAU;KACV,YAAY;KACZ,OAAO;IACT;IACA,MAAM,EACJ,SAAS,QACX;IACA,KAAK;KACH,mBAAmB;KACnB,mBAAmB;KACnB,mBAAmB;KACnB,SAAS;KACT,cAAc;KACd,gBAAgB,EACd,mBAAmB,EACrB;IACF;IACA,MAAM;KACJ,YAAY;KACZ,SAAS;KACT,WAAW;KACX,eAAe;KACf,SAAS;MACP,WAAW;MACX,OAAO;MACP,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,iBAAiB;MACjB,OAAO;KACT;KACA,WAAW;MACT,SAAS;MACT,eAAe;MACf,SAAS,EACP,SAAS,OACX;KACF;IACF;IAEA,QAAQ;KACN,gBAAgB;KAChB,gBAAgB;KAChB,SAAS;IACX;GACF;EACF;CACF;CACA,kBAAkB;EAChB;GACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;GACA,QAAQ;GACR,SAAS;EACX;EAIA;GACE,KAAK;IACH,MAAM,EACJ,eAAe,KACjB;IACA,KAAK,EACH,oBAAoB;KAClB,kCAAkC,EAChC,oBAAoB,KACtB;KACA,iCAAiC,EAC/B,kBAAkB,KACpB;IACF,EACF;GACF;GACA,QAAQ;GACR,SAAS;EACX;EAKA;GACE,KAAK,EACH,MAAM,EACJ,QAAQ,OACV,EACF;GACA,QAAQ;EACV;EAGA;GACE,KAAK,EACH,MAAM,EACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,uBACnB,EACF,EACF,EACF;GACA,QAAQ;GACR,UAAU;EACZ;CACF;CACA,iBAAiB;EACf,QAAQ;EACR,UAAU;EACV,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
@@ -1288,6 +1288,19 @@ declare const slotRecipes: {
|
|
|
1288
1288
|
};
|
|
1289
1289
|
};
|
|
1290
1290
|
}>;
|
|
1291
|
+
linkCard: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "header" | "title" | "root" | "description" | "iconTile" | "textBlock" | "actionLabel" | "actionIcon", {
|
|
1292
|
+
variant: {
|
|
1293
|
+
icon: {};
|
|
1294
|
+
product: {
|
|
1295
|
+
description: {
|
|
1296
|
+
textStyle: {
|
|
1297
|
+
base: "body/lg/regular";
|
|
1298
|
+
tablet: "body/md/regular";
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
}>;
|
|
1291
1304
|
listbox: import('@chakra-ui/react').SlotRecipeDefinition<"content" | "input" | "label" | "root" | "item" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "itemText" | "valueText" | "empty", {
|
|
1292
1305
|
size: {
|
|
1293
1306
|
md: {};
|
|
@@ -1702,7 +1715,7 @@ declare const slotRecipes: {
|
|
|
1702
1715
|
};
|
|
1703
1716
|
};
|
|
1704
1717
|
}>;
|
|
1705
|
-
pageHeader: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "
|
|
1718
|
+
pageHeader: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "badge" | "avatar" | "breadcrumb" | "tabs" | "root" | "secondaryText" | "controls" | "titleBlock" | "textBlock" | "sectionTitle" | "headerBlock" | "contentBlock" | "titleBar" | "titleRow" | "actionBlock" | "menuButton" | "sectionBlock", {
|
|
1706
1719
|
contentVariant: {
|
|
1707
1720
|
title: {
|
|
1708
1721
|
titleBlock: {
|
|
@@ -2121,7 +2134,7 @@ declare const slotRecipes: {
|
|
|
2121
2134
|
};
|
|
2122
2135
|
};
|
|
2123
2136
|
}>;
|
|
2124
|
-
pageSubheader: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "
|
|
2137
|
+
pageSubheader: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "textBlock" | "headerBlock" | "contentBlock" | "actionBlock", {
|
|
2125
2138
|
isCapped: {
|
|
2126
2139
|
true: {
|
|
2127
2140
|
tabs: {
|
|
@@ -2982,7 +2995,7 @@ declare const slotRecipes: {
|
|
|
2982
2995
|
};
|
|
2983
2996
|
body: {
|
|
2984
2997
|
'& :where(tr)': {
|
|
2985
|
-
|
|
2998
|
+
"&:has([data-scope=\"checkbox\"] input:checked), &:has([data-scope=\"radio-group\"][data-part=\"item\"] input:checked), &[data-selected]": {
|
|
2986
2999
|
backgroundColor: "background/selected";
|
|
2987
3000
|
_hover: {
|
|
2988
3001
|
backgroundColor: "background/selected";
|
|
@@ -28,6 +28,7 @@ import groupHeadingRecipe from "./GroupHeading.recipe.js";
|
|
|
28
28
|
import imageCropperSlotRecipe from "./ImageCropper.recipe.js";
|
|
29
29
|
import inlineLoadingRecipe from "./InlineLoading.recipe.js";
|
|
30
30
|
import labeledDataSlotRecipe from "./LabeledData.recipe.js";
|
|
31
|
+
import linkCardSlotRecipe from "./LinkCard.recipe.js";
|
|
31
32
|
import listSlotRecipe from "./List.recipe.js";
|
|
32
33
|
import listboxSlotRecipe from "./Listbox.recipe.js";
|
|
33
34
|
import markdownSlotRecipe from "./Markdown.recipe.js";
|
|
@@ -95,6 +96,7 @@ var slotRecipes = {
|
|
|
95
96
|
imageCropper: imageCropperSlotRecipe,
|
|
96
97
|
inlineLoading: inlineLoadingRecipe,
|
|
97
98
|
list: listSlotRecipe,
|
|
99
|
+
linkCard: linkCardSlotRecipe,
|
|
98
100
|
listbox: listboxSlotRecipe,
|
|
99
101
|
markdown: markdownSlotRecipe,
|
|
100
102
|
markdownCard: markdownCardSlotRecipe,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport filterSlotRecipe from './Filter.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport listboxSlotRecipe from './Listbox.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport pageSubheaderSlotRecipe from './PageSubheader.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiHeaderSlotRecipe from './UIHeader.recipe';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n filter: filterSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n listbox: listboxSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pageSubheader: pageSubheaderSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiHeader: uiHeaderSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport filterSlotRecipe from './Filter.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport linkCardSlotRecipe from './LinkCard.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport listboxSlotRecipe from './Listbox.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport pageSubheaderSlotRecipe from './PageSubheader.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiHeaderSlotRecipe from './UIHeader.recipe';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n filter: filterSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n linkCard: linkCardSlotRecipe,\n listbox: listboxSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pageSubheader: pageSubheaderSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiHeader: uiHeaderSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,IAAM,cAAc;CAClB,WAAW;CACX,WAAW;CACX,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,aAAa;CACb,aAAa;CACb,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,QAAQ;CACR,eAAe;CACf,QAAQ;CACR,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAcA;CACd,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,cAAc;CACd,eAAeC;CACf,MAAM;CACN,UAAU;CACV,SAAS;CACT,UAAU;CACV,cAAc;CACd,MAAM;CACN,aAAa;CACb,UAAU;CACV,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,eAAe;CACf,YAAY;CACZ,oBAAoBC;CACpB,SAAS;CACT,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,gBAAgBC;CAChB,aAAa;CACb,cAAc;CACd,QAAQ;CACR,cAAc;CACd,aAAa;CACb,MAAM;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACX,MAAM;CACN,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,UAAU;CACV,WAAW;AACb"}
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Table } from '@chakra-ui/react/table';
|
|
2
|
-
export interface BitkitTableRowProps extends Table.RowProps {
|
|
3
|
-
/**
|
|
4
|
-
* Tints the row as selected. Pass it from the selection state you already hold
|
|
5
|
-
* (`selected={selectedIds.includes(row.id)}`): a checkbox, radio or switch in the row never
|
|
6
|
-
* tints it on its own.
|
|
7
|
-
*/
|
|
8
|
-
selected?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <BitkitTable.Row selected={selectedIds.includes(row.id)}>
|
|
16
|
-
* <BitkitTable.Cell>
|
|
17
|
-
* <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />
|
|
18
|
-
* </BitkitTable.Cell>
|
|
19
|
-
* <BitkitTable.Cell>{row.name}</BitkitTable.Cell>
|
|
20
|
-
* </BitkitTable.Row>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
declare const BitkitTableRow: import('react').ForwardRefExoticComponent<BitkitTableRowProps & import('react').RefAttributes<HTMLTableRowElement>>;
|
|
24
|
-
export default BitkitTableRow;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Table } from "@chakra-ui/react/table";
|
|
4
|
-
//#region lib/components/BitkitTable/BitkitTableRow.tsx
|
|
5
|
-
/**
|
|
6
|
-
* A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <BitkitTable.Row selected={selectedIds.includes(row.id)}>
|
|
11
|
-
* <BitkitTable.Cell>
|
|
12
|
-
* <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />
|
|
13
|
-
* </BitkitTable.Cell>
|
|
14
|
-
* <BitkitTable.Cell>{row.name}</BitkitTable.Cell>
|
|
15
|
-
* </BitkitTable.Row>
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
var BitkitTableRow = forwardRef((props, ref) => {
|
|
19
|
-
const { selected, ...rest } = props;
|
|
20
|
-
return /* @__PURE__ */ jsx(Table.Row, {
|
|
21
|
-
ref,
|
|
22
|
-
"data-selected": selected ? "" : void 0,
|
|
23
|
-
...rest
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
BitkitTableRow.displayName = "BitkitTable.Row";
|
|
27
|
-
//#endregion
|
|
28
|
-
export { BitkitTableRow as default };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=BitkitTableRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitTableRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitTableRow.tsx"],"sourcesContent":["import { Table } from '@chakra-ui/react/table';\nimport { forwardRef } from 'react';\n\nexport interface BitkitTableRowProps extends Table.RowProps {\n /**\n * Tints the row as selected. Pass it from the selection state you already hold\n * (`selected={selectedIds.includes(row.id)}`): a checkbox, radio or switch in the row never\n * tints it on its own.\n */\n selected?: boolean;\n}\n\n/**\n * A table row. Chakra's `Table.Row` plus `selected`, which is the only thing that tints a row.\n *\n * @example\n * ```tsx\n * <BitkitTable.Row selected={selectedIds.includes(row.id)}>\n * <BitkitTable.Cell>\n * <BitkitCheckbox aria-label={`Select ${row.name}`} value={row.id} />\n * </BitkitTable.Cell>\n * <BitkitTable.Cell>{row.name}</BitkitTable.Cell>\n * </BitkitTable.Row>\n * ```\n */\nconst BitkitTableRow = forwardRef<HTMLTableRowElement, BitkitTableRowProps>((props, ref) => {\n const { selected, ...rest } = props;\n\n return <Table.Row ref={ref} data-selected={selected ? '' : undefined} {...rest} />;\n});\n\nBitkitTableRow.displayName = 'BitkitTable.Row';\n\nexport default BitkitTableRow;\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,IAAM,iBAAiB,YAAsD,OAAO,QAAQ;CAC1F,MAAM,EAAE,UAAU,GAAG,SAAS;CAE9B,OAAO,oBAAC,MAAM,KAAP;EAAgB;EAAK,iBAAe,WAAW,KAAK,KAAA;EAAW,GAAI;CAAO,CAAA;AACnF,CAAC;AAED,eAAe,cAAc"}
|