@bitrise/bitkit-v2 0.3.217 → 0.3.219
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 +26 -4
- package/README.md +3 -3
- package/dist/components/BitkitBreadcrumb/BitkitBreadcrumb.d.ts +5 -2
- package/dist/components/BitkitBreadcrumb/BitkitBreadcrumb.js +3 -1
- package/dist/components/BitkitBreadcrumb/BitkitBreadcrumb.js.map +1 -1
- package/dist/components/BitkitCodeSnippet/BitkitCodeSnippet.d.ts +8 -6
- package/dist/components/BitkitCodeSnippet/BitkitCodeSnippet.js +24 -13
- package/dist/components/BitkitCodeSnippet/BitkitCodeSnippet.js.map +1 -1
- package/dist/components/BitkitSplitButton/BitkitSplitButton.d.ts +3 -2
- package/dist/components/BitkitSplitButton/BitkitSplitButton.js +2 -1
- package/dist/components/BitkitSplitButton/BitkitSplitButton.js.map +1 -1
- package/dist/components/BitkitSteps/BitkitSteps.d.ts +2 -1
- package/dist/components/BitkitSteps/BitkitSteps.js +2 -1
- package/dist/components/BitkitSteps/BitkitSteps.js.map +1 -1
- package/dist/components/BitkitTable/BitkitExpandableRow.js +2 -1
- package/dist/components/BitkitTable/BitkitExpandableRow.js.map +1 -1
- package/dist/theme/slot-recipes/Table.recipe.d.ts +17 -1
- package/dist/theme/slot-recipes/Table.recipe.js +7 -1
- package/dist/theme/slot-recipes/Table.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +17 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -16,7 +16,7 @@ If `bitkit-storybook-mcp` isn't in your tools, **mention it once at the start of
|
|
|
16
16
|
> {
|
|
17
17
|
> "mcpServers": {
|
|
18
18
|
> "bitkit-storybook-mcp": {
|
|
19
|
-
> "url": "https://bitkit-v2
|
|
19
|
+
> "url": "https://storybook.services.bitrise.dev/projects/bitkit-v2/production/mcp",
|
|
20
20
|
> "type": "http"
|
|
21
21
|
> }
|
|
22
22
|
> }
|
|
@@ -50,7 +50,7 @@ import { BitkitProvider, BitkitButton } from '@bitrise/bitkit-v2';
|
|
|
50
50
|
{
|
|
51
51
|
"mcpServers": {
|
|
52
52
|
"bitkit-storybook-mcp": {
|
|
53
|
-
"url": "https://bitkit-v2
|
|
53
|
+
"url": "https://storybook.services.bitrise.dev/projects/bitkit-v2/production/mcp",
|
|
54
54
|
"type": "http"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -60,7 +60,7 @@ import { BitkitProvider, BitkitButton } from '@bitrise/bitkit-v2';
|
|
|
60
60
|
- `list-all-documentation` — list all components
|
|
61
61
|
- `get-documentation` — props and examples for a specific component
|
|
62
62
|
- `get-documentation-for-story` — extra detail for a story variant
|
|
63
|
-
- **Hosted Storybook (browser)**: <https://bitkit-v2
|
|
63
|
+
- **Hosted Storybook (browser)**: <https://storybook.services.bitrise.dev/projects/bitkit-v2/production/> — every component, props table, examples, and theme reference (colors, shadows, text styles, spacing, radii, icons). Google auth required.
|
|
64
64
|
- **Never hallucinate component properties.** Verify every prop against the docs before using it. A prop that "sounds right" (e.g. `shadow`, `rightIcon`) often does not exist.
|
|
65
65
|
- For tokens (colors, shadows, text styles, etc.), query the Storybook docs pages: `Docs/Colors - Components`, `Docs/Colors - System`, `Docs/Colors - Base`, `Docs/Shadows (Box Shadows)`, `Docs/Spacing & Sizes`, `Docs/Radii (Border Radius)`, `Docs/Text Styles`, `Docs/Typography`, `Docs/Icons`.
|
|
66
66
|
|
|
@@ -104,7 +104,29 @@ Bitkit components use consistent prop names across the library:
|
|
|
104
104
|
- **Omit default prop values** — `<IconCross />`, not `<IconCross size="24" />` when 24 is the default.
|
|
105
105
|
- **No shorthand props** — use full names: `marginInline`, `paddingBlockEnd`, `width`, `background`, `padding`. Never `mx`, `pb`, `w`, `bg`, `p`, `mt`.
|
|
106
106
|
- **Prefer logical over physical properties** — `marginInline`, `paddingBlock`, `insetInlineStart` over `marginLeft`/`marginRight`, `paddingTop`/`paddingBottom`, `left`.
|
|
107
|
-
- **
|
|
107
|
+
- **Never wrap a Bitkit component in `<Box>` for styling** — most Bitkit components accept Chakra style props (`width`, `flex`, `flexShrink`, `marginInline`, `padding`, `display`, etc.) directly on themselves. Set them on the component, never on a wrapper:
|
|
108
|
+
```tsx
|
|
109
|
+
// Bad — pointless wrapper
|
|
110
|
+
<Box width="128" flexShrink="0">
|
|
111
|
+
<BitkitTextInput ... />
|
|
112
|
+
</Box>
|
|
113
|
+
|
|
114
|
+
// Good — props on the component itself
|
|
115
|
+
<BitkitTextInput width="128" flexShrink="0" ... />
|
|
116
|
+
```
|
|
117
|
+
This holds for form fields (`BitkitTextInput`, `BitkitSelect`, `BitkitNativeSelect`, `BitkitCombobox`, etc.), buttons (`BitkitButton`, `BitkitIconButton`, etc.), and most other components — they all forward Chakra style props through to the rendered root element.
|
|
118
|
+
|
|
119
|
+
**Exceptions** — a few component groups intentionally own their own layout and don't accept arbitrary style props from outside:
|
|
120
|
+
- Page-level overlays: `BitkitDialog`, `BitkitDrawer`, `BitkitCalendar` — use the component's own sizing API (`size`, `maxHeight`, etc.).
|
|
121
|
+
- Floating positioned components: `BitkitTooltip`, `BitkitLabelTooltip`, `BitkitDefinitionTooltip`, `BitkitOverflowTooltip`, `BitkitToast`, `BitkitSelectMenu`, `BitkitMultiselectMenu` — their layout is positioned automatically; pass styling via the component's own props instead of a wrapper.
|
|
122
|
+
|
|
123
|
+
> **For everything else, if a style prop doesn't take effect on a Bitkit component, that's a bug in the component, not a styling task.** Stop, tell the user something looks off in Bitkit so they can flag it to the Bitkit team — don't quietly add a `<Box>` workaround. Each silent workaround hides a regression and bakes the wrapper pattern into the codebase.
|
|
124
|
+
|
|
125
|
+
Use `<Box>` only when:
|
|
126
|
+
- The wrapper holds multiple children that need a layout container (flex/grid parent for several siblings)
|
|
127
|
+
- You need a wrapper element for purely structural reasons (CSS Grid placement, sibling selectors, etc.)
|
|
128
|
+
|
|
129
|
+
For grouping a single child or a few siblings without styling, use a fragment (`<>...</>`).
|
|
108
130
|
- **Use `Text` for text content, not `Box`** — when rendering string content, use `<Text>` from `@chakra-ui/react/text`. Choose semantic tag via `as`: `<Text as="strong">`, `<Text as="span">`, `<Text as="label">`, plain `<Text>` for paragraphs.
|
|
109
131
|
- **Import from Chakra subpaths** — `import { Button } from '@chakra-ui/react/button'`, not `from '@chakra-ui/react'`.
|
|
110
132
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Bitrise Design System Components built with Chakra UI v3.
|
|
6
6
|
|
|
7
|
-
[Browse the component library in Storybook](https://bitkit-v2
|
|
7
|
+
[Browse the component library in Storybook](https://storybook.services.bitrise.dev/projects/bitkit-v2/production/) (Google auth required)
|
|
8
8
|
|
|
9
9
|
## Using with AI assistants (Claude Code, Cursor, Codex, etc.)
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ If you're prototyping or vibe-coding with an AI assistant, do this **before** wr
|
|
|
16
16
|
{
|
|
17
17
|
"mcpServers": {
|
|
18
18
|
"bitkit-storybook-mcp": {
|
|
19
|
-
"url": "https://bitkit-v2
|
|
19
|
+
"url": "https://storybook.services.bitrise.dev/projects/bitkit-v2/production/mcp",
|
|
20
20
|
"type": "http"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@ If you're prototyping or vibe-coding with an AI assistant, do this **before** wr
|
|
|
29
29
|
@./node_modules/@bitrise/bitkit-v2/AGENTS.md
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
The hosted Storybook itself is browsable at <https://bitkit-v2.
|
|
32
|
+
The hosted Storybook itself is browsable at <https://storybook.services.bitrise.dev/projects/bitkit-v2/production/> (Google auth required).
|
|
33
33
|
|
|
34
34
|
## Features
|
|
35
35
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { Breadcrumb, BreadcrumbRootProps } from '@chakra-ui/react/breadcrumb';
|
|
1
2
|
import { ReactElement } from 'react';
|
|
2
3
|
import { CurrentItemProps } from './components/BreadcrumbCurrentItem.tsx';
|
|
3
4
|
import { OverflowMenuProps } from './components/OverflowMenu.tsx';
|
|
4
5
|
import { ItemProps } from './types.ts';
|
|
5
6
|
type BitkitBreadcrumbChild = ReactElement<ItemProps> | ReactElement<CurrentItemProps> | ReactElement<OverflowMenuProps>;
|
|
6
|
-
export type BitkitBreadcrumbProps = {
|
|
7
|
+
export type BitkitBreadcrumbProps = Omit<BreadcrumbRootProps, 'children'> & {
|
|
7
8
|
children: BitkitBreadcrumbChild | BitkitBreadcrumbChild[];
|
|
8
9
|
};
|
|
9
|
-
declare const BitkitBreadcrumb: import('react').ForwardRefExoticComponent<
|
|
10
|
+
declare const BitkitBreadcrumb: import('react').ForwardRefExoticComponent<Omit<Breadcrumb.RootProps, "children"> & {
|
|
11
|
+
children: BitkitBreadcrumbChild | BitkitBreadcrumbChild[];
|
|
12
|
+
} & import('react').RefAttributes<HTMLElement>> & {
|
|
10
13
|
CurrentItem: import('react').ForwardRefExoticComponent<CurrentItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
11
14
|
Item: import('react').ForwardRefExoticComponent<ItemProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
12
15
|
OverflowMenu: {
|
|
@@ -33,7 +33,7 @@ var flattenItemProps = (elements) => {
|
|
|
33
33
|
}
|
|
34
34
|
return props;
|
|
35
35
|
};
|
|
36
|
-
var BitkitBreadcrumbRoot = forwardRef(({ children }, ref) => {
|
|
36
|
+
var BitkitBreadcrumbRoot = forwardRef(({ children, ...rest }, ref) => {
|
|
37
37
|
const isMobile = useBreakpointValue({
|
|
38
38
|
base: true,
|
|
39
39
|
tablet: false
|
|
@@ -47,6 +47,7 @@ var BitkitBreadcrumbRoot = forwardRef(({ children }, ref) => {
|
|
|
47
47
|
const overflowLinks = links.slice(0, -1).reverse();
|
|
48
48
|
return /* @__PURE__ */ jsx(Breadcrumb.Root, {
|
|
49
49
|
ref,
|
|
50
|
+
...rest,
|
|
50
51
|
children: /* @__PURE__ */ jsxs(Breadcrumb.List, { children: [
|
|
51
52
|
/* @__PURE__ */ jsxs(Show, {
|
|
52
53
|
when: overflowLinks.length > 0,
|
|
@@ -69,6 +70,7 @@ var BitkitBreadcrumbRoot = forwardRef(({ children }, ref) => {
|
|
|
69
70
|
}
|
|
70
71
|
return /* @__PURE__ */ jsx(Breadcrumb.Root, {
|
|
71
72
|
ref,
|
|
73
|
+
...rest,
|
|
72
74
|
children: /* @__PURE__ */ jsx(Breadcrumb.List, { children: childArray.map((child, index) => /* @__PURE__ */ jsxs(Fragment, { children: [child, /* @__PURE__ */ jsx(Show, {
|
|
73
75
|
when: index < childArray.length - 1,
|
|
74
76
|
children: /* @__PURE__ */ jsx(Breadcrumb.Separator, { children: /* @__PURE__ */ jsx(IconChevronRight, {}) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitBreadcrumb.js","names":[],"sources":["../../../lib/components/BitkitBreadcrumb/BitkitBreadcrumb.tsx"],"sourcesContent":["import { Breadcrumb } from '@chakra-ui/react/breadcrumb';\nimport { useBreakpointValue } from '@chakra-ui/react/hooks';\nimport { Show } from '@chakra-ui/react/show';\nimport { Children, forwardRef, Fragment, isValidElement, type ReactElement } from 'react';\n\nimport { IconChevronRight, IconMoreHorizontal } from '../../icons';\nimport BitkitControlButton from '../BitkitControlButton/BitkitControlButton.tsx';\nimport BreadcrumbCurrentItem, { type CurrentItemProps } from './components/BreadcrumbCurrentItem.tsx';\nimport BreadcrumbItem from './components/BreadcrumbItem.tsx';\nimport OverflowMenu, { type OverflowMenuProps } from './components/OverflowMenu.tsx';\nimport OverflowMenuItem from './components/OverflowMenuItem.tsx';\nimport OverflowMenuTrigger from './components/OverflowMenuTrigger.tsx';\nimport { type ItemProps } from './types.ts';\n\ntype BitkitBreadcrumbChild = ReactElement<ItemProps> | ReactElement<CurrentItemProps> | ReactElement<OverflowMenuProps>;\n\nexport type BitkitBreadcrumbProps = {\n children: BitkitBreadcrumbChild | BitkitBreadcrumbChild[];\n};\n\nconst flattenItemProps = (elements: ReactElement[]): ItemProps[] => {\n const props: ItemProps[] = [];\n\n for (const child of elements) {\n if (child.type === BreadcrumbItem) {\n const { href, children } = child.props as ItemProps;\n props.push({ href, children });\n } else if (child.type === OverflowMenu) {\n const { children: menuChildren } = child.props as OverflowMenuProps;\n const menuChildArray = Children.toArray(menuChildren).filter(isValidElement);\n for (const menuChild of menuChildArray) {\n if (menuChild.type === OverflowMenuItem) {\n const { href, children } = menuChild.props as ItemProps;\n props.push({ href, children });\n }\n }\n }\n }\n\n return props;\n};\n\nconst BitkitBreadcrumbRoot = forwardRef<HTMLElement, BitkitBreadcrumbProps>(({ children }, ref) => {\n const isMobile = useBreakpointValue({ base: true, tablet: false }, { fallback: 'tablet' });\n const childArray = Children.toArray(children).filter(isValidElement);\n\n if (childArray.length === 0) {\n return null;\n }\n\n if (isMobile) {\n const links = flattenItemProps(childArray);\n if (links.length === 0) {\n return null;\n }\n\n const lastLink = links[links.length - 1];\n const overflowLinks = links.slice(0, -1).reverse();\n\n return (\n <Breadcrumb.Root ref={ref}>\n <Breadcrumb.List>\n <Show when={overflowLinks.length > 0}>\n <OverflowMenu>\n <OverflowMenuTrigger>\n <BitkitControlButton icon={IconMoreHorizontal} label=\"Open breadcrumbs\" size=\"xs\" />\n </OverflowMenuTrigger>\n {overflowLinks.map((link) => (\n <OverflowMenuItem key={link.href} href={link.href}>\n {link.children}\n </OverflowMenuItem>\n ))}\n </OverflowMenu>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Show>\n <BreadcrumbItem href={lastLink.href}>{lastLink.children}</BreadcrumbItem>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n }\n\n return (\n <Breadcrumb.Root ref={ref}>\n <Breadcrumb.List>\n {childArray.map((child, index) => (\n <Fragment key={child.key}>\n {child}\n <Show when={index < childArray.length - 1}>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Show>\n </Fragment>\n ))}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n});\n\nBitkitBreadcrumbRoot.displayName = 'BitkitBreadcrumb';\n\nconst BitkitBreadcrumb = Object.assign(BitkitBreadcrumbRoot, {\n CurrentItem: BreadcrumbCurrentItem,\n Item: BreadcrumbItem,\n OverflowMenu,\n OverflowMenuItem,\n});\n\nexport default BitkitBreadcrumb;\n"],"mappings":";;;;;;;;;;;;;;AAoBA,IAAM,oBAAoB,aAA0C;CAClE,MAAM,QAAqB,CAAC;CAE5B,KAAK,MAAM,SAAS,UAClB,IAAI,MAAM,SAAS,gBAAgB;EACjC,MAAM,EAAE,MAAM,aAAa,MAAM;EACjC,MAAM,KAAK;GAAE;GAAM;EAAS,CAAC;CAC/B,OAAO,IAAI,MAAM,SAAS,cAAc;EACtC,MAAM,EAAE,UAAU,iBAAiB,MAAM;EACzC,MAAM,iBAAiB,SAAS,QAAQ,YAAY,EAAE,OAAO,cAAc;EAC3E,KAAK,MAAM,aAAa,gBACtB,IAAI,UAAU,SAAS,kBAAkB;GACvC,MAAM,EAAE,MAAM,aAAa,UAAU;GACrC,MAAM,KAAK;IAAE;IAAM;GAAS,CAAC;EAC/B;CAEJ;CAGF,OAAO;AACT;AAEA,IAAM,uBAAuB,YAAgD,EAAE,
|
|
1
|
+
{"version":3,"file":"BitkitBreadcrumb.js","names":[],"sources":["../../../lib/components/BitkitBreadcrumb/BitkitBreadcrumb.tsx"],"sourcesContent":["import { Breadcrumb, type BreadcrumbRootProps } from '@chakra-ui/react/breadcrumb';\nimport { useBreakpointValue } from '@chakra-ui/react/hooks';\nimport { Show } from '@chakra-ui/react/show';\nimport { Children, forwardRef, Fragment, isValidElement, type ReactElement } from 'react';\n\nimport { IconChevronRight, IconMoreHorizontal } from '../../icons';\nimport BitkitControlButton from '../BitkitControlButton/BitkitControlButton.tsx';\nimport BreadcrumbCurrentItem, { type CurrentItemProps } from './components/BreadcrumbCurrentItem.tsx';\nimport BreadcrumbItem from './components/BreadcrumbItem.tsx';\nimport OverflowMenu, { type OverflowMenuProps } from './components/OverflowMenu.tsx';\nimport OverflowMenuItem from './components/OverflowMenuItem.tsx';\nimport OverflowMenuTrigger from './components/OverflowMenuTrigger.tsx';\nimport { type ItemProps } from './types.ts';\n\ntype BitkitBreadcrumbChild = ReactElement<ItemProps> | ReactElement<CurrentItemProps> | ReactElement<OverflowMenuProps>;\n\nexport type BitkitBreadcrumbProps = Omit<BreadcrumbRootProps, 'children'> & {\n children: BitkitBreadcrumbChild | BitkitBreadcrumbChild[];\n};\n\nconst flattenItemProps = (elements: ReactElement[]): ItemProps[] => {\n const props: ItemProps[] = [];\n\n for (const child of elements) {\n if (child.type === BreadcrumbItem) {\n const { href, children } = child.props as ItemProps;\n props.push({ href, children });\n } else if (child.type === OverflowMenu) {\n const { children: menuChildren } = child.props as OverflowMenuProps;\n const menuChildArray = Children.toArray(menuChildren).filter(isValidElement);\n for (const menuChild of menuChildArray) {\n if (menuChild.type === OverflowMenuItem) {\n const { href, children } = menuChild.props as ItemProps;\n props.push({ href, children });\n }\n }\n }\n }\n\n return props;\n};\n\nconst BitkitBreadcrumbRoot = forwardRef<HTMLElement, BitkitBreadcrumbProps>(({ children, ...rest }, ref) => {\n const isMobile = useBreakpointValue({ base: true, tablet: false }, { fallback: 'tablet' });\n const childArray = Children.toArray(children).filter(isValidElement);\n\n if (childArray.length === 0) {\n return null;\n }\n\n if (isMobile) {\n const links = flattenItemProps(childArray);\n if (links.length === 0) {\n return null;\n }\n\n const lastLink = links[links.length - 1];\n const overflowLinks = links.slice(0, -1).reverse();\n\n return (\n <Breadcrumb.Root ref={ref} {...rest}>\n <Breadcrumb.List>\n <Show when={overflowLinks.length > 0}>\n <OverflowMenu>\n <OverflowMenuTrigger>\n <BitkitControlButton icon={IconMoreHorizontal} label=\"Open breadcrumbs\" size=\"xs\" />\n </OverflowMenuTrigger>\n {overflowLinks.map((link) => (\n <OverflowMenuItem key={link.href} href={link.href}>\n {link.children}\n </OverflowMenuItem>\n ))}\n </OverflowMenu>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Show>\n <BreadcrumbItem href={lastLink.href}>{lastLink.children}</BreadcrumbItem>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n }\n\n return (\n <Breadcrumb.Root ref={ref} {...rest}>\n <Breadcrumb.List>\n {childArray.map((child, index) => (\n <Fragment key={child.key}>\n {child}\n <Show when={index < childArray.length - 1}>\n <Breadcrumb.Separator>\n <IconChevronRight />\n </Breadcrumb.Separator>\n </Show>\n </Fragment>\n ))}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n );\n});\n\nBitkitBreadcrumbRoot.displayName = 'BitkitBreadcrumb';\n\nconst BitkitBreadcrumb = Object.assign(BitkitBreadcrumbRoot, {\n CurrentItem: BreadcrumbCurrentItem,\n Item: BreadcrumbItem,\n OverflowMenu,\n OverflowMenuItem,\n});\n\nexport default BitkitBreadcrumb;\n"],"mappings":";;;;;;;;;;;;;;AAoBA,IAAM,oBAAoB,aAA0C;CAClE,MAAM,QAAqB,CAAC;CAE5B,KAAK,MAAM,SAAS,UAClB,IAAI,MAAM,SAAS,gBAAgB;EACjC,MAAM,EAAE,MAAM,aAAa,MAAM;EACjC,MAAM,KAAK;GAAE;GAAM;EAAS,CAAC;CAC/B,OAAO,IAAI,MAAM,SAAS,cAAc;EACtC,MAAM,EAAE,UAAU,iBAAiB,MAAM;EACzC,MAAM,iBAAiB,SAAS,QAAQ,YAAY,EAAE,OAAO,cAAc;EAC3E,KAAK,MAAM,aAAa,gBACtB,IAAI,UAAU,SAAS,kBAAkB;GACvC,MAAM,EAAE,MAAM,aAAa,UAAU;GACrC,MAAM,KAAK;IAAE;IAAM;GAAS,CAAC;EAC/B;CAEJ;CAGF,OAAO;AACT;AAEA,IAAM,uBAAuB,YAAgD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AAW,SAAS;aACtC,oBAAC,WAAW,WAAZ,EAAA,UACE,oBAAC,kBAAD,CAAmB,CAAA,EACC,CAAA;EAClB,CAAA,CACE,EAAA,GAPK,MAAM,GAOX,CACX,EACc,CAAA;CACF,CAAA;AAErB,CAAC;AAED,qBAAqB,cAAc;AAEnC,IAAM,mBAAmB,OAAO,OAAO,sBAAsB;CAC3D,aAAa;CACb,MAAM;CACN;CACA;AACF,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { HTMLChakraProps } from '@chakra-ui/react/styled-system';
|
|
2
|
+
interface InlineProps extends Omit<HTMLChakraProps<'code'>, 'children' | 'size'> {
|
|
2
3
|
children: string;
|
|
3
|
-
size?: 'md' | 'lg';
|
|
4
|
-
textToCopy?: string;
|
|
5
|
-
}
|
|
6
|
-
interface InlineProps extends BaseProps {
|
|
7
4
|
interactive?: boolean;
|
|
5
|
+
size?: 'md' | 'lg';
|
|
8
6
|
startingHeight?: never;
|
|
7
|
+
textToCopy?: string;
|
|
9
8
|
variant: 'inline';
|
|
10
9
|
}
|
|
11
|
-
interface BlockProps extends
|
|
10
|
+
interface BlockProps extends Omit<HTMLChakraProps<'div'>, 'children' | 'size'> {
|
|
11
|
+
children: string;
|
|
12
12
|
interactive?: never;
|
|
13
|
+
size?: 'md' | 'lg';
|
|
13
14
|
startingHeight?: number;
|
|
15
|
+
textToCopy?: string;
|
|
14
16
|
variant: 'multi' | 'single';
|
|
15
17
|
}
|
|
16
18
|
export type BitkitCodeSnippetProps = InlineProps | BlockProps;
|
|
@@ -9,19 +9,18 @@ import { useClipboard } from "@ark-ui/react/clipboard";
|
|
|
9
9
|
//#region lib/components/BitkitCodeSnippet/BitkitCodeSnippet.tsx
|
|
10
10
|
var COPY_TOOLTIP = "Copy to clipboard";
|
|
11
11
|
var BitkitCodeSnippet = forwardRef((props, ref) => {
|
|
12
|
-
const
|
|
13
|
-
const hasShowMore = startingHeight !== void 0;
|
|
12
|
+
const hasShowMore = props.startingHeight !== void 0;
|
|
14
13
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
14
|
const { copied, copy } = useClipboard({
|
|
16
15
|
timeout: 2e3,
|
|
17
|
-
value: textToCopy ?? children
|
|
16
|
+
value: props.textToCopy ?? props.children
|
|
18
17
|
});
|
|
19
18
|
const styles = useSlotRecipe({ key: "codeSnippet" })({
|
|
20
|
-
size,
|
|
21
|
-
variant,
|
|
22
19
|
hasShowMore,
|
|
20
|
+
interactive: props.interactive,
|
|
23
21
|
isExpanded,
|
|
24
|
-
|
|
22
|
+
size: props.size ?? "lg",
|
|
23
|
+
variant: props.variant
|
|
25
24
|
});
|
|
26
25
|
const handleToggleExpand = () => {
|
|
27
26
|
setIsExpanded((prev) => !prev);
|
|
@@ -39,28 +38,39 @@ var BitkitCodeSnippet = forwardRef((props, ref) => {
|
|
|
39
38
|
type: "button",
|
|
40
39
|
children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: "16" }) : /* @__PURE__ */ jsx(IconCopy, { size: "16" })
|
|
41
40
|
});
|
|
42
|
-
if (variant === "inline") {
|
|
41
|
+
if (props.variant === "inline") {
|
|
42
|
+
const { children, interactive, size: _size, textToCopy: _textToCopy, variant: _variant, ...rest } = props;
|
|
43
43
|
if (!interactive) return /* @__PURE__ */ jsx(chakra.code, {
|
|
44
44
|
ref,
|
|
45
|
-
|
|
45
|
+
...rest,
|
|
46
|
+
css: [styles.root, rest.css],
|
|
46
47
|
children
|
|
47
48
|
});
|
|
48
49
|
return /* @__PURE__ */ jsx(BitkitTooltip, {
|
|
49
50
|
text: COPY_TOOLTIP,
|
|
50
51
|
children: /* @__PURE__ */ jsx(chakra.code, {
|
|
51
52
|
ref,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
...rest,
|
|
54
|
+
css: [styles.root, rest.css],
|
|
55
|
+
onClick: (e) => {
|
|
56
|
+
rest.onClick?.(e);
|
|
57
|
+
if (!e.defaultPrevented) copy();
|
|
58
|
+
},
|
|
59
|
+
onKeyDown: (e) => {
|
|
60
|
+
rest.onKeyDown?.(e);
|
|
61
|
+
if (!e.defaultPrevented) handleKeyDown(e);
|
|
62
|
+
},
|
|
55
63
|
role: "button",
|
|
56
64
|
tabIndex: 0,
|
|
57
65
|
children
|
|
58
66
|
})
|
|
59
67
|
});
|
|
60
68
|
}
|
|
69
|
+
const { children, size: _size, startingHeight, textToCopy: _textToCopy, variant, ...rest } = props;
|
|
61
70
|
if (variant === "single") return /* @__PURE__ */ jsxs(chakra.div, {
|
|
62
71
|
ref,
|
|
63
|
-
|
|
72
|
+
...rest,
|
|
73
|
+
css: [styles.root, rest.css],
|
|
64
74
|
children: [/* @__PURE__ */ jsx(chakra.code, {
|
|
65
75
|
css: styles.content,
|
|
66
76
|
tabIndex: -1,
|
|
@@ -73,7 +83,8 @@ var BitkitCodeSnippet = forwardRef((props, ref) => {
|
|
|
73
83
|
const contentMaxHeight = hasShowMore && !isExpanded ? startingHeight : void 0;
|
|
74
84
|
return /* @__PURE__ */ jsxs(chakra.div, {
|
|
75
85
|
ref,
|
|
76
|
-
|
|
86
|
+
...rest,
|
|
87
|
+
css: [styles.root, rest.css],
|
|
77
88
|
children: [
|
|
78
89
|
/* @__PURE__ */ jsx(chakra.code, {
|
|
79
90
|
css: styles.content,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitCodeSnippet.js","names":[],"sources":["../../../lib/components/BitkitCodeSnippet/BitkitCodeSnippet.tsx"],"sourcesContent":["import { useClipboard } from '@ark-ui/react/clipboard';\nimport { chakra, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type KeyboardEvent, useState } from 'react';\n\nimport { IconCheck, IconCopy } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\n\nconst COPY_TOOLTIP = 'Copy to clipboard';\n\ninterface
|
|
1
|
+
{"version":3,"file":"BitkitCodeSnippet.js","names":[],"sources":["../../../lib/components/BitkitCodeSnippet/BitkitCodeSnippet.tsx"],"sourcesContent":["import { useClipboard } from '@ark-ui/react/clipboard';\nimport { chakra, type HTMLChakraProps, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef, type KeyboardEvent, useState } from 'react';\n\nimport { IconCheck, IconCopy } from '../../icons';\nimport AssetSelectChevron from '../../utilities/AssetSelectChevron';\nimport BitkitTooltip from '../BitkitTooltip/BitkitTooltip';\n\nconst COPY_TOOLTIP = 'Copy to clipboard';\n\ninterface InlineProps extends Omit<HTMLChakraProps<'code'>, 'children' | 'size'> {\n children: string;\n interactive?: boolean;\n size?: 'md' | 'lg';\n startingHeight?: never;\n textToCopy?: string;\n variant: 'inline';\n}\n\ninterface BlockProps extends Omit<HTMLChakraProps<'div'>, 'children' | 'size'> {\n children: string;\n interactive?: never;\n size?: 'md' | 'lg';\n startingHeight?: number;\n textToCopy?: string;\n variant: 'multi' | 'single';\n}\n\nexport type BitkitCodeSnippetProps = InlineProps | BlockProps;\n\nconst BitkitCodeSnippet = forwardRef<HTMLElement, BitkitCodeSnippetProps>((props, ref) => {\n const hasShowMore = props.startingHeight !== undefined;\n const [isExpanded, setIsExpanded] = useState(false);\n\n const { copied, copy } = useClipboard({ timeout: 2000, value: props.textToCopy ?? props.children });\n\n const recipe = useSlotRecipe({ key: 'codeSnippet' });\n const styles = recipe({\n hasShowMore,\n interactive: props.interactive,\n isExpanded,\n size: props.size ?? 'lg',\n variant: props.variant,\n });\n\n const handleToggleExpand = () => {\n setIsExpanded((prev) => !prev);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n copy();\n }\n };\n\n const copyButton = (\n <chakra.button aria-label={COPY_TOOLTIP} css={styles.copyButton} onClick={copy} type=\"button\">\n {copied ? <IconCheck size=\"16\" /> : <IconCopy size=\"16\" />}\n </chakra.button>\n );\n\n if (props.variant === 'inline') {\n const { children, interactive, size: _size, textToCopy: _textToCopy, variant: _variant, ...rest } = props;\n\n if (!interactive) {\n return (\n <chakra.code ref={ref} {...rest} css={[styles.root, rest.css]}>\n {children}\n </chakra.code>\n );\n }\n\n return (\n <BitkitTooltip text={COPY_TOOLTIP}>\n <chakra.code\n ref={ref}\n {...rest}\n css={[styles.root, rest.css]}\n onClick={(e) => {\n rest.onClick?.(e);\n if (!e.defaultPrevented) copy();\n }}\n onKeyDown={(e) => {\n rest.onKeyDown?.(e);\n if (!e.defaultPrevented) handleKeyDown(e);\n }}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </chakra.code>\n </BitkitTooltip>\n );\n }\n\n const { children, size: _size, startingHeight, textToCopy: _textToCopy, variant, ...rest } = props;\n\n if (variant === 'single') {\n return (\n <chakra.div ref={ref} {...rest} css={[styles.root, rest.css]}>\n <chakra.code css={styles.content} tabIndex={-1}>\n {children}\n </chakra.code>\n <BitkitTooltip text={COPY_TOOLTIP}>{copyButton}</BitkitTooltip>\n </chakra.div>\n );\n }\n\n const contentMaxHeight = hasShowMore && !isExpanded ? startingHeight : undefined;\n\n return (\n <chakra.div ref={ref} {...rest} css={[styles.root, rest.css]}>\n <chakra.code css={styles.content} maxHeight={contentMaxHeight} tabIndex={-1}>\n {children}\n </chakra.code>\n <chakra.div css={styles.copyButtonWrapper}>\n <BitkitTooltip text={COPY_TOOLTIP}>{copyButton}</BitkitTooltip>\n </chakra.div>\n {hasShowMore && (\n <chakra.div css={styles.showMoreContainer}>\n {!isExpanded && <chakra.div css={styles.showMoreGradient} />}\n <chakra.button onClick={handleToggleExpand} css={styles.showMoreButton}>\n {isExpanded ? 'Show less' : 'Show more'}\n <AssetSelectChevron data-state={isExpanded ? 'open' : 'closed'} height=\"16\" width=\"16\" />\n </chakra.button>\n </chakra.div>\n )}\n </chakra.div>\n );\n});\n\nBitkitCodeSnippet.displayName = 'BitkitCodeSnippet';\n\nexport default BitkitCodeSnippet;\n"],"mappings":";;;;;;;;;AAQA,IA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onProps } from '../BitkitButton/BitkitButton';
|
|
3
4
|
type Size = 'lg' | 'md' | 'sm';
|
|
4
5
|
type Variant = 'primary' | 'secondary';
|
|
5
6
|
type State = 'disabled' | 'loading' | 'skeleton';
|
|
6
7
|
type BitkitSplitButtonActionProps = Omit<BitkitButtonProps, 'size' | 'variant' | 'state'>;
|
|
7
|
-
export type BitkitSplitButtonProps = PropsWithChildren<{
|
|
8
|
+
export type BitkitSplitButtonProps = PropsWithChildren<Omit<GroupProps, 'attached' | 'children' | 'display'> & {
|
|
8
9
|
size?: Size;
|
|
9
10
|
variant?: Variant;
|
|
10
11
|
state?: State;
|
|
11
12
|
}>;
|
|
12
|
-
declare const _default: import('react').ForwardRefExoticComponent<{
|
|
13
|
+
declare const _default: import('react').ForwardRefExoticComponent<Omit<GroupProps, "display" | "children" | "attached"> & {
|
|
13
14
|
size?: Size;
|
|
14
15
|
variant?: Variant;
|
|
15
16
|
state?: State;
|
|
@@ -33,7 +33,7 @@ var BitkitSplitButtonAction = forwardRef((props, ref) => {
|
|
|
33
33
|
});
|
|
34
34
|
BitkitSplitButtonAction.displayName = "BitkitSplitButtonAction";
|
|
35
35
|
var BitkitSplitButton = forwardRef((props, ref) => {
|
|
36
|
-
const { children, size = "lg", state, variant = "primary" } = props;
|
|
36
|
+
const { children, size = "lg", state, variant = "primary", ...rest } = props;
|
|
37
37
|
const childArray = Children.toArray(children);
|
|
38
38
|
const actionChild = childArray.find(isValidActionItem);
|
|
39
39
|
const menuItems = childArray.filter(isValidMenuItem);
|
|
@@ -51,6 +51,7 @@ var BitkitSplitButton = forwardRef((props, ref) => {
|
|
|
51
51
|
loading: state === "skeleton",
|
|
52
52
|
children: /* @__PURE__ */ jsxs(Group, {
|
|
53
53
|
ref,
|
|
54
|
+
...rest,
|
|
54
55
|
attached: true,
|
|
55
56
|
display: "inline-flex",
|
|
56
57
|
children: [actionChild, /* @__PURE__ */ jsx(BitkitActionMenu.Root, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSplitButton.js","names":[],"sources":["../../../lib/components/BitkitSplitButton/BitkitSplitButton.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Group } from '@chakra-ui/react/group';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Children, forwardRef, isValidElement, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport BitkitActionMenu from '../BitkitActionMenu/BitkitActionMenu';\nimport BitkitButton, { type BitkitButtonProps } from '../BitkitButton/BitkitButton';\nimport BitkitIconButton from '../BitkitIconButton/BitkitIconButton';\n\ntype Size = 'lg' | 'md' | 'sm';\ntype Variant = 'primary' | 'secondary';\ntype State = 'disabled' | 'loading' | 'skeleton';\n\nconst isValidActionItem = (child: ReactNode): child is ReactElement => {\n return isValidElement(child) && child.type === BitkitSplitButtonAction;\n};\n\nconst isValidMenuItem = (child: ReactNode): child is ReactElement => {\n return (\n isValidElement(child) &&\n (child.type === BitkitActionMenu.Group ||\n child.type === BitkitActionMenu.Item ||\n child.type === BitkitActionMenu.Separator)\n );\n};\n\n// --- Context ---\ninterface SplitButtonContext {\n size: Size;\n variant: Variant;\n state: State | undefined;\n styles: Record<string, SystemStyleObject>;\n}\n\nconst [SplitButtonProvider, useSplitButtonContext] = createContext<SplitButtonContext>({\n name: 'SplitButtonContext',\n hookName: 'useSplitButtonContext',\n providerName: '<BitkitSplitButton />',\n});\n\n// --- Action ---\ntype BitkitSplitButtonActionProps = Omit<BitkitButtonProps, 'size' | 'variant' | 'state'>;\n\nconst BitkitSplitButtonAction = forwardRef<HTMLButtonElement, BitkitSplitButtonActionProps>((props, ref) => {\n const { size, state, styles, variant } = useSplitButtonContext();\n\n return <BitkitButton ref={ref} css={styles.action} size={size} variant={variant} state={state} {...props} />;\n});\n\nBitkitSplitButtonAction.displayName = 'BitkitSplitButtonAction';\n\n// --- Root ---\nexport type BitkitSplitButtonProps = PropsWithChildren<{\n
|
|
1
|
+
{"version":3,"file":"BitkitSplitButton.js","names":[],"sources":["../../../lib/components/BitkitSplitButton/BitkitSplitButton.tsx"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { Group, type GroupProps } from '@chakra-ui/react/group';\nimport { Skeleton } from '@chakra-ui/react/skeleton';\nimport { type SystemStyleObject, useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Children, forwardRef, isValidElement, type PropsWithChildren, type ReactElement, type ReactNode } from 'react';\n\nimport { IconChevronDown } from '../../icons';\nimport BitkitActionMenu from '../BitkitActionMenu/BitkitActionMenu';\nimport BitkitButton, { type BitkitButtonProps } from '../BitkitButton/BitkitButton';\nimport BitkitIconButton from '../BitkitIconButton/BitkitIconButton';\n\ntype Size = 'lg' | 'md' | 'sm';\ntype Variant = 'primary' | 'secondary';\ntype State = 'disabled' | 'loading' | 'skeleton';\n\nconst isValidActionItem = (child: ReactNode): child is ReactElement => {\n return isValidElement(child) && child.type === BitkitSplitButtonAction;\n};\n\nconst isValidMenuItem = (child: ReactNode): child is ReactElement => {\n return (\n isValidElement(child) &&\n (child.type === BitkitActionMenu.Group ||\n child.type === BitkitActionMenu.Item ||\n child.type === BitkitActionMenu.Separator)\n );\n};\n\n// --- Context ---\ninterface SplitButtonContext {\n size: Size;\n variant: Variant;\n state: State | undefined;\n styles: Record<string, SystemStyleObject>;\n}\n\nconst [SplitButtonProvider, useSplitButtonContext] = createContext<SplitButtonContext>({\n name: 'SplitButtonContext',\n hookName: 'useSplitButtonContext',\n providerName: '<BitkitSplitButton />',\n});\n\n// --- Action ---\ntype BitkitSplitButtonActionProps = Omit<BitkitButtonProps, 'size' | 'variant' | 'state'>;\n\nconst BitkitSplitButtonAction = forwardRef<HTMLButtonElement, BitkitSplitButtonActionProps>((props, ref) => {\n const { size, state, styles, variant } = useSplitButtonContext();\n\n return <BitkitButton ref={ref} css={styles.action} size={size} variant={variant} state={state} {...props} />;\n});\n\nBitkitSplitButtonAction.displayName = 'BitkitSplitButtonAction';\n\n// --- Root ---\nexport type BitkitSplitButtonProps = PropsWithChildren<\n Omit<GroupProps, 'attached' | 'children' | 'display'> & {\n size?: Size;\n variant?: Variant;\n state?: State;\n }\n>;\n\nconst BitkitSplitButton = forwardRef<HTMLDivElement, BitkitSplitButtonProps>((props, ref) => {\n const { children, size = 'lg', state, variant = 'primary', ...rest } = props;\n\n const childArray = Children.toArray(children);\n const actionChild = childArray.find(isValidActionItem);\n const menuItems = childArray.filter(isValidMenuItem);\n\n const menuSize = size === 'lg' ? 'lg' : 'md';\n const recipe = useSlotRecipe({ key: 'splitButton' });\n const styles = recipe({ variant });\n\n return (\n <SplitButtonProvider value={{ size, state, styles, variant }}>\n <Skeleton asChild loading={state === 'skeleton'}>\n <Group ref={ref} {...rest} attached display=\"inline-flex\">\n {actionChild}\n <BitkitActionMenu.Root\n size={menuSize}\n trigger={\n <BitkitIconButton\n css={styles.trigger}\n icon={IconChevronDown}\n label=\"Toggle menu\"\n size={size}\n state={state === 'loading' ? 'disabled' : state}\n variant={variant}\n />\n }\n positioning={{ placement: 'bottom-end' }}\n >\n {menuItems}\n </BitkitActionMenu.Root>\n </Group>\n </Skeleton>\n </SplitButtonProvider>\n );\n});\nBitkitSplitButton.displayName = 'BitkitSplitButton';\n\nexport default Object.assign(BitkitSplitButton, {\n Action: BitkitSplitButtonAction,\n Group: BitkitActionMenu.Group,\n Item: BitkitActionMenu.Item,\n Separator: BitkitActionMenu.Separator,\n});\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,qBAAqB,UAA4C;CACrE,OAAO,eAAe,KAAK,KAAK,MAAM,SAAS;AACjD;AAEA,IAAM,mBAAmB,UAA4C;CACnE,OACE,eAAe,KAAK,MACnB,MAAM,SAAS,iBAAiB,SAC/B,MAAM,SAAS,iBAAiB,QAChC,MAAM,SAAS,iBAAiB;AAEt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CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { StepsRootProps } from '@chakra-ui/react/steps';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
export type BitkitStepsItemState = 'disabled' | 'invalid' | 'skippable';
|
|
3
|
-
export interface BitkitStepsProps {
|
|
4
|
+
export interface BitkitStepsProps extends Omit<StepsRootProps, 'children' | 'count' | 'linear' | 'orientation' | 'step'> {
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
orientation?: 'horizontal' | 'vertical';
|
|
6
7
|
step?: number;
|
|
@@ -40,12 +40,13 @@ var renderLabel = (label, action) => {
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
var BitkitSteps = forwardRef((props, ref) => {
|
|
43
|
-
const { children, orientation = "horizontal", step: stepProp } = props;
|
|
43
|
+
const { children, orientation = "horizontal", step: stepProp, ...rest } = props;
|
|
44
44
|
const stepCardCtx = useStepCardContext();
|
|
45
45
|
const step = stepProp ?? stepCardCtx?.step ?? 0;
|
|
46
46
|
const count = Children.count(children);
|
|
47
47
|
return /* @__PURE__ */ jsx(Steps.Root, {
|
|
48
48
|
ref,
|
|
49
|
+
...rest,
|
|
49
50
|
count,
|
|
50
51
|
linear: false,
|
|
51
52
|
orientation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitSteps.js","names":[],"sources":["../../../lib/components/BitkitSteps/BitkitSteps.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Link } from '@chakra-ui/react/link';\nimport { Steps, useStepsContext, useStepsStyles } from '@chakra-ui/react/steps';\nimport { Children, cloneElement, forwardRef, isValidElement, type ReactElement, type ReactNode } from 'react';\n\nimport IconCheck from '../../icons/IconCheck';\nimport IconSkip from '../../icons/IconSkip';\nimport { useStepCardContext } from '../BitkitStepsCard/StepCardContext';\n\nexport type BitkitStepsItemState = 'disabled' | 'invalid' | 'skippable';\n\ntype EffectiveStatus = 'completed' | 'disabled' | 'inProgress' | 'invalid' | 'notStarted' | 'skippable' | 'skipped';\n\nconst getEffectiveStatus = (\n itemState: BitkitStepsItemState | undefined,\n index: number,\n step: number,\n): EffectiveStatus => {\n if (itemState === 'disabled') return 'disabled';\n if (itemState === 'invalid') return 'invalid';\n if (itemState === 'skippable') return index < step ? 'skipped' : 'skippable';\n if (index < step) return 'completed';\n if (index === step) return 'inProgress';\n return 'notStarted';\n};\n\nconst renderIndicatorContent = (index: number, status: EffectiveStatus) => {\n if (status === 'completed') return <IconCheck size=\"16\" />;\n if (status === 'skippable' || status === 'skipped') return <IconSkip size=\"16\" />;\n if (status === 'invalid') return '!';\n return index + 1;\n};\n\nconst renderLabel = (label: string, action: BitkitStepsItemProps['action']) => {\n if (!action) return label;\n\n // Links don't look like links at rest — only the underline + purple color on hover reveals\n // them. Intentional: this is a power-user affordance on the step title. The base Link recipe\n // already adds the underline on hover; we only need to swap the color.\n if (action.href) {\n return (\n <Link\n _hover={{ color: 'text/link' }}\n href={action.href}\n onClick={action.onClick}\n rel={action.isExternal ? 'noopener noreferrer' : undefined}\n target={action.isExternal ? '_blank' : undefined}\n >\n {label}\n </Link>\n );\n }\n\n return (\n <Link _hover={{ color: 'text/link' }} as=\"button\" onClick={action.onClick} type=\"button\">\n {label}\n </Link>\n );\n};\n\nexport interface BitkitStepsProps {\n children: ReactNode;\n orientation?: 'horizontal' | 'vertical';\n step?: number;\n}\n\nconst BitkitSteps = forwardRef<HTMLDivElement, BitkitStepsProps>((props, ref) => {\n const { children, orientation = 'horizontal', step: stepProp } = props;\n const stepCardCtx = useStepCardContext();\n const step = stepProp ?? stepCardCtx?.step ?? 0;\n const count = Children.count(children);\n\n return (\n <Steps.Root ref={ref} count={count} linear={false} orientation={orientation} step={step}>\n <Steps.List>\n {Children.map(children, (child, index) => {\n if (isValidElement(child)) {\n return cloneElement(child as ReactElement<BitkitStepsItemInternalProps>, {\n _index: index,\n _orientation: orientation,\n });\n }\n return child;\n })}\n </Steps.List>\n </Steps.Root>\n );\n});\n\nBitkitSteps.displayName = 'BitkitSteps';\n\nexport interface BitkitStepsItemProps {\n action?: {\n href?: string;\n isExternal?: boolean;\n onClick?: () => void;\n };\n helperText?: string;\n label: string;\n state?: BitkitStepsItemState;\n}\n\ninterface BitkitStepsItemInternalProps extends BitkitStepsItemProps {\n _index?: number;\n _orientation?: 'horizontal' | 'vertical';\n}\n\nconst BitkitStepsItem = forwardRef<HTMLDivElement, BitkitStepsItemProps>((props, ref) => {\n const {\n _index = 0,\n _orientation = 'horizontal',\n action,\n helperText,\n label,\n state,\n } = props as BitkitStepsItemInternalProps;\n\n const styles = useStepsStyles();\n const stepsCtx = useStepsContext();\n const status = getEffectiveStatus(state, _index, stepsCtx.value);\n const resolvedAction = status === 'completed' ? action : undefined;\n const statusAttr = { 'data-step-status': status };\n\n return (\n <Steps.Item {...statusAttr} index={_index} ref={ref}>\n <Steps.Indicator {...statusAttr}>{renderIndicatorContent(_index, status)}</Steps.Indicator>\n <Box css={styles.trigger}>\n <Steps.Title {...statusAttr}>{renderLabel(label, resolvedAction)}</Steps.Title>\n {_orientation === 'vertical' && helperText && (\n <Steps.Description {...statusAttr}>{helperText}</Steps.Description>\n )}\n </Box>\n <Steps.Separator />\n </Steps.Item>\n );\n});\n\nBitkitStepsItem.displayName = 'BitkitStepsItem';\n\nexport default Object.assign(BitkitSteps, { Item: BitkitStepsItem });\n"],"mappings":";;;;;;;;;AAaA,IAAM,sBACJ,WACA,OACA,SACoB;CACpB,IAAI,cAAc,YAAY,OAAO;CACrC,IAAI,cAAc,WAAW,OAAO;CACpC,IAAI,cAAc,aAAa,OAAO,QAAQ,OAAO,YAAY;CACjE,IAAI,QAAQ,MAAM,OAAO;CACzB,IAAI,UAAU,MAAM,OAAO;CAC3B,OAAO;AACT;AAEA,IAAM,0BAA0B,OAAe,WAA4B;CACzE,IAAI,WAAW,aAAa,OAAO,oBAAC,WAAD,EAAW,MAAK,KAAM,CAAA;CACzD,IAAI,WAAW,eAAe,WAAW,WAAW,OAAO,oBAAC,UAAD,EAAU,MAAK,KAAM,CAAA;CAChF,IAAI,WAAW,WAAW,OAAO;CACjC,OAAO,QAAQ;AACjB;AAEA,IAAM,eAAe,OAAe,WAA2C;CAC7E,IAAI,CAAC,QAAQ,OAAO;CAKpB,IAAI,OAAO,MACT,OACE,oBAAC,MAAD;EACE,QAAQ,EAAE,OAAO,YAAY;EAC7B,MAAM,OAAO;EACb,SAAS,OAAO;EAChB,KAAK,OAAO,aAAa,wBAAwB,KAAA;EACjD,QAAQ,OAAO,aAAa,WAAW,KAAA;YAEtC;CACG,CAAA;CAIV,OACE,oBAAC,MAAD;EAAM,QAAQ,EAAE,OAAO,YAAY;EAAG,IAAG;EAAS,SAAS,OAAO;EAAS,MAAK;YAC7E;CACG,CAAA;AAEV;
|
|
1
|
+
{"version":3,"file":"BitkitSteps.js","names":[],"sources":["../../../lib/components/BitkitSteps/BitkitSteps.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Link } from '@chakra-ui/react/link';\nimport { Steps, type StepsRootProps, useStepsContext, useStepsStyles } from '@chakra-ui/react/steps';\nimport { Children, cloneElement, forwardRef, isValidElement, type ReactElement, type ReactNode } from 'react';\n\nimport IconCheck from '../../icons/IconCheck';\nimport IconSkip from '../../icons/IconSkip';\nimport { useStepCardContext } from '../BitkitStepsCard/StepCardContext';\n\nexport type BitkitStepsItemState = 'disabled' | 'invalid' | 'skippable';\n\ntype EffectiveStatus = 'completed' | 'disabled' | 'inProgress' | 'invalid' | 'notStarted' | 'skippable' | 'skipped';\n\nconst getEffectiveStatus = (\n itemState: BitkitStepsItemState | undefined,\n index: number,\n step: number,\n): EffectiveStatus => {\n if (itemState === 'disabled') return 'disabled';\n if (itemState === 'invalid') return 'invalid';\n if (itemState === 'skippable') return index < step ? 'skipped' : 'skippable';\n if (index < step) return 'completed';\n if (index === step) return 'inProgress';\n return 'notStarted';\n};\n\nconst renderIndicatorContent = (index: number, status: EffectiveStatus) => {\n if (status === 'completed') return <IconCheck size=\"16\" />;\n if (status === 'skippable' || status === 'skipped') return <IconSkip size=\"16\" />;\n if (status === 'invalid') return '!';\n return index + 1;\n};\n\nconst renderLabel = (label: string, action: BitkitStepsItemProps['action']) => {\n if (!action) return label;\n\n // Links don't look like links at rest — only the underline + purple color on hover reveals\n // them. Intentional: this is a power-user affordance on the step title. The base Link recipe\n // already adds the underline on hover; we only need to swap the color.\n if (action.href) {\n return (\n <Link\n _hover={{ color: 'text/link' }}\n href={action.href}\n onClick={action.onClick}\n rel={action.isExternal ? 'noopener noreferrer' : undefined}\n target={action.isExternal ? '_blank' : undefined}\n >\n {label}\n </Link>\n );\n }\n\n return (\n <Link _hover={{ color: 'text/link' }} as=\"button\" onClick={action.onClick} type=\"button\">\n {label}\n </Link>\n );\n};\n\nexport interface BitkitStepsProps extends Omit<\n StepsRootProps,\n 'children' | 'count' | 'linear' | 'orientation' | 'step'\n> {\n children: ReactNode;\n orientation?: 'horizontal' | 'vertical';\n step?: number;\n}\n\nconst BitkitSteps = forwardRef<HTMLDivElement, BitkitStepsProps>((props, ref) => {\n const { children, orientation = 'horizontal', step: stepProp, ...rest } = props;\n const stepCardCtx = useStepCardContext();\n const step = stepProp ?? stepCardCtx?.step ?? 0;\n const count = Children.count(children);\n\n return (\n <Steps.Root ref={ref} {...rest} count={count} linear={false} orientation={orientation} step={step}>\n <Steps.List>\n {Children.map(children, (child, index) => {\n if (isValidElement(child)) {\n return cloneElement(child as ReactElement<BitkitStepsItemInternalProps>, {\n _index: index,\n _orientation: orientation,\n });\n }\n return child;\n })}\n </Steps.List>\n </Steps.Root>\n );\n});\n\nBitkitSteps.displayName = 'BitkitSteps';\n\nexport interface BitkitStepsItemProps {\n action?: {\n href?: string;\n isExternal?: boolean;\n onClick?: () => void;\n };\n helperText?: string;\n label: string;\n state?: BitkitStepsItemState;\n}\n\ninterface BitkitStepsItemInternalProps extends BitkitStepsItemProps {\n _index?: number;\n _orientation?: 'horizontal' | 'vertical';\n}\n\nconst BitkitStepsItem = forwardRef<HTMLDivElement, BitkitStepsItemProps>((props, ref) => {\n const {\n _index = 0,\n _orientation = 'horizontal',\n action,\n helperText,\n label,\n state,\n } = props as BitkitStepsItemInternalProps;\n\n const styles = useStepsStyles();\n const stepsCtx = useStepsContext();\n const status = getEffectiveStatus(state, _index, stepsCtx.value);\n const resolvedAction = status === 'completed' ? action : undefined;\n const statusAttr = { 'data-step-status': status };\n\n return (\n <Steps.Item {...statusAttr} index={_index} ref={ref}>\n <Steps.Indicator {...statusAttr}>{renderIndicatorContent(_index, status)}</Steps.Indicator>\n <Box css={styles.trigger}>\n <Steps.Title {...statusAttr}>{renderLabel(label, resolvedAction)}</Steps.Title>\n {_orientation === 'vertical' && helperText && (\n <Steps.Description {...statusAttr}>{helperText}</Steps.Description>\n )}\n </Box>\n <Steps.Separator />\n </Steps.Item>\n );\n});\n\nBitkitStepsItem.displayName = 'BitkitStepsItem';\n\nexport default Object.assign(BitkitSteps, { Item: BitkitStepsItem });\n"],"mappings":";;;;;;;;;AAaA,IAAM,sBACJ,WACA,OACA,SACoB;CACpB,IAAI,cAAc,YAAY,OAAO;CACrC,IAAI,cAAc,WAAW,OAAO;CACpC,IAAI,cAAc,aAAa,OAAO,QAAQ,OAAO,YAAY;CACjE,IAAI,QAAQ,MAAM,OAAO;CACzB,IAAI,UAAU,MAAM,OAAO;CAC3B,OAAO;AACT;AAEA,IAAM,0BAA0B,OAAe,WAA4B;CACzE,IAAI,WAAW,aAAa,OAAO,oBAAC,WAAD,EAAW,MAAK,KAAM,CAAA;CACzD,IAAI,WAAW,eAAe,WAAW,WAAW,OAAO,oBAAC,UAAD,EAAU,MAAK,KAAM,CAAA;CAChF,IAAI,WAAW,WAAW,OAAO;CACjC,OAAO,QAAQ;AACjB;AAEA,IAAM,eAAe,OAAe,WAA2C;CAC7E,IAAI,CAAC,QAAQ,OAAO;CAKpB,IAAI,OAAO,MACT,OACE,oBAAC,MAAD;EACE,QAAQ,EAAE,OAAO,YAAY;EAC7B,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C,MAAM,OAAP;KAAa,GAAI;eAAa,YAAY,OAAO,cAAc;IAAe,CAAA,GAC7E,iBAAiB,cAAc,cAC9B,oBAAC,MAAM,aAAP;KAAmB,GAAI;eAAa;IAA8B,CAAA,CAEjE;;GACL,oBAAC,MAAM,WAAP,CAAkB,CAAA;EACR;;AAEhB,CAAC;AAED,gBAAgB,cAAc;AAE9B,IAAA,sBAAe,OAAO,OAAO,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -51,7 +51,8 @@ var BitkitExpandableRow = forwardRef(({ children, colSpan, defaultOpen = false,
|
|
|
51
51
|
colSpan,
|
|
52
52
|
css: {
|
|
53
53
|
paddingBlock: 0,
|
|
54
|
-
paddingInline: 0
|
|
54
|
+
paddingInline: 0,
|
|
55
|
+
height: 0
|
|
55
56
|
},
|
|
56
57
|
children: /* @__PURE__ */ jsx(Collapsible.Content, { children: /* @__PURE__ */ jsx(Box, {
|
|
57
58
|
css: expandedContentCss,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BitkitExpandableRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { chakra, type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { Table } 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 expandCellCss: SystemStyleObject = {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n};\n\nconst expandTriggerCss: SystemStyleObject = {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n padding: '12',\n paddingInlineEnd: '4',\n width: 'full',\n};\n\nconst expandedContentCss: SystemStyleObject = {\n paddingBlock: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '64',\n};\n\nconst BitkitExpandableRow = forwardRef<HTMLTableRowElement, BitkitExpandableRowProps>(\n ({ children, colSpan, defaultOpen = false, expandedContent }, ref) => (\n <Collapsible.Root asChild defaultOpen={defaultOpen}>\n <>\n <Table.Row ref={ref}>\n <Table.Cell css={expandCellCss}>\n <Collapsible.Trigger asChild>\n <chakra.button aria-label=\"Toggle row details\" css={expandTriggerCss} type=\"button\">\n <AssetSelectChevron color=\"button/secondary/fg/text\" />\n </chakra.button>\n </Collapsible.Trigger>\n </Table.Cell>\n {children}\n </Table.Row>\n <Table.Row css={{ _hover: { background: 'none' } }}>\n <Table.Cell colSpan={colSpan} css={{ paddingBlock: 0, paddingInline: 0 }}>\n <Collapsible.Content>\n <Box css={expandedContentCss}>{expandedContent}</Box>\n </Collapsible.Content>\n </Table.Cell>\n </Table.Row>\n </>\n </Collapsible.Root>\n ),\n);\n\nBitkitExpandableRow.displayName = 'BitkitExpandableRow';\n\nexport default BitkitExpandableRow;\n"],"mappings":";;;;;;;;AAeA,IAAM,gBAAmC;CACvC,cAAc;CACd,eAAe;CACf,eAAe;CACf,OAAO;AACT;AAEA,IAAM,mBAAsC;CAC1C,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,gBAAgB;CAChB,SAAS;CACT,kBAAkB;CAClB,OAAO;AACT;AAEA,IAAM,qBAAwC;CAC5C,cAAc;CACd,kBAAkB;CAClB,oBAAoB;AACtB;AAEA,IAAM,sBAAsB,YACzB,EAAE,UAAU,SAAS,cAAc,OAAO,mBAAmB,QAC5D,oBAAC,YAAY,MAAb;CAAkB,SAAA;CAAqB;WACrC,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,MAAM,KAAP;EAAgB;YAAhB,CACE,oBAAC,MAAM,MAAP;GAAY,KAAK;aACf,oBAAC,YAAY,SAAb;IAAqB,SAAA;cACnB,oBAAC,OAAO,QAAR;KAAe,cAAW;KAAqB,KAAK;KAAkB,MAAK;eACzE,oBAAC,oBAAD,EAAoB,OAAM,2BAA4B,CAAA;IACzC,CAAA;GACI,CAAA;EACX,CAAA,GACX,QACQ;KACX,oBAAC,MAAM,KAAP;EAAW,KAAK,EAAE,QAAQ,EAAE,YAAY,OAAO,EAAE;YAC/C,oBAAC,MAAM,MAAP;GAAqB;GAAS,KAAK;IAAE,cAAc;IAAG,eAAe;GAAE;
|
|
1
|
+
{"version":3,"file":"BitkitExpandableRow.js","names":[],"sources":["../../../lib/components/BitkitTable/BitkitExpandableRow.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { Collapsible } from '@chakra-ui/react/collapsible';\nimport { chakra, type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { Table } 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 expandCellCss: SystemStyleObject = {\n paddingBlock: 0,\n paddingInline: 0,\n verticalAlign: 'middle',\n width: '48',\n};\n\nconst expandTriggerCss: SystemStyleObject = {\n alignItems: 'center',\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n padding: '12',\n paddingInlineEnd: '4',\n width: 'full',\n};\n\nconst expandedContentCss: SystemStyleObject = {\n paddingBlock: '16',\n paddingInlineEnd: '16',\n paddingInlineStart: '64',\n};\n\nconst BitkitExpandableRow = forwardRef<HTMLTableRowElement, BitkitExpandableRowProps>(\n ({ children, colSpan, defaultOpen = false, expandedContent }, ref) => (\n <Collapsible.Root asChild defaultOpen={defaultOpen}>\n <>\n <Table.Row ref={ref}>\n <Table.Cell css={expandCellCss}>\n <Collapsible.Trigger asChild>\n <chakra.button aria-label=\"Toggle row details\" css={expandTriggerCss} type=\"button\">\n <AssetSelectChevron color=\"button/secondary/fg/text\" />\n </chakra.button>\n </Collapsible.Trigger>\n </Table.Cell>\n {children}\n </Table.Row>\n <Table.Row css={{ _hover: { background: 'none' } }}>\n <Table.Cell colSpan={colSpan} css={{ paddingBlock: 0, paddingInline: 0, height: 0 }}>\n <Collapsible.Content>\n <Box css={expandedContentCss}>{expandedContent}</Box>\n </Collapsible.Content>\n </Table.Cell>\n </Table.Row>\n </>\n </Collapsible.Root>\n ),\n);\n\nBitkitExpandableRow.displayName = 'BitkitExpandableRow';\n\nexport default BitkitExpandableRow;\n"],"mappings":";;;;;;;;AAeA,IAAM,gBAAmC;CACvC,cAAc;CACd,eAAe;CACf,eAAe;CACf,OAAO;AACT;AAEA,IAAM,mBAAsC;CAC1C,YAAY;CACZ,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,gBAAgB;CAChB,SAAS;CACT,kBAAkB;CAClB,OAAO;AACT;AAEA,IAAM,qBAAwC;CAC5C,cAAc;CACd,kBAAkB;CAClB,oBAAoB;AACtB;AAEA,IAAM,sBAAsB,YACzB,EAAE,UAAU,SAAS,cAAc,OAAO,mBAAmB,QAC5D,oBAAC,YAAY,MAAb;CAAkB,SAAA;CAAqB;WACrC,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,MAAM,KAAP;EAAgB;YAAhB,CACE,oBAAC,MAAM,MAAP;GAAY,KAAK;aACf,oBAAC,YAAY,SAAb;IAAqB,SAAA;cACnB,oBAAC,OAAO,QAAR;KAAe,cAAW;KAAqB,KAAK;KAAkB,MAAK;eACzE,oBAAC,oBAAD,EAAoB,OAAM,2BAA4B,CAAA;IACzC,CAAA;GACI,CAAA;EACX,CAAA,GACX,QACQ;KACX,oBAAC,MAAM,KAAP;EAAW,KAAK,EAAE,QAAQ,EAAE,YAAY,OAAO,EAAE;YAC/C,oBAAC,MAAM,MAAP;GAAqB;GAAS,KAAK;IAAE,cAAc;IAAG,eAAe;IAAG,QAAQ;GAAE;aAChF,oBAAC,YAAY,SAAb,EAAA,UACE,oBAAC,KAAD;IAAK,KAAK;cAAqB;GAAqB,CAAA,EACjC,CAAA;EACX,CAAA;CACH,CAAA,CACX,EAAA,CAAA;AACc,CAAA,CAEtB;AAEA,oBAAoB,cAAc"}
|
|
@@ -40,6 +40,23 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
+
size: {
|
|
44
|
+
sm: {
|
|
45
|
+
cell: {
|
|
46
|
+
height: "48";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
md: {
|
|
50
|
+
cell: {
|
|
51
|
+
height: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
lg: {
|
|
55
|
+
cell: {
|
|
56
|
+
height: "64";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
43
60
|
layout: {
|
|
44
61
|
table: {
|
|
45
62
|
root: {
|
|
@@ -61,7 +78,6 @@ declare const tableSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"
|
|
|
61
78
|
cell: {
|
|
62
79
|
borderBottomStyle: "solid";
|
|
63
80
|
borderBottomWidth: "1px";
|
|
64
|
-
paddingBlock: "20";
|
|
65
81
|
verticalAlign: "middle";
|
|
66
82
|
};
|
|
67
83
|
body: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
1
2
|
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
2
3
|
import { tableAnatomy } from "@chakra-ui/react/anatomy";
|
|
3
4
|
//#region lib/theme/slot-recipes/Table.recipe.ts
|
|
@@ -58,6 +59,11 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
58
59
|
footer: { borderTopColor: "border/regular" }
|
|
59
60
|
}
|
|
60
61
|
},
|
|
62
|
+
size: {
|
|
63
|
+
sm: { cell: { height: "48" } },
|
|
64
|
+
md: { cell: { height: rem(56) } },
|
|
65
|
+
lg: { cell: { height: "64" } }
|
|
66
|
+
},
|
|
61
67
|
layout: {
|
|
62
68
|
table: {
|
|
63
69
|
root: {
|
|
@@ -77,7 +83,6 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
77
83
|
cell: {
|
|
78
84
|
borderBottomStyle: "solid",
|
|
79
85
|
borderBottomWidth: "1px",
|
|
80
|
-
paddingBlock: "20",
|
|
81
86
|
verticalAlign: "middle"
|
|
82
87
|
},
|
|
83
88
|
body: {
|
|
@@ -141,6 +146,7 @@ var tableSlotRecipe = defineSlotRecipe({
|
|
|
141
146
|
}],
|
|
142
147
|
defaultVariants: {
|
|
143
148
|
layout: "table",
|
|
149
|
+
size: "lg",
|
|
144
150
|
variant: "default"
|
|
145
151
|
}
|
|
146
152
|
});
|
|
@@ -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\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: tableAnatomy.keys(),\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 color: 'text/body',\n textStyle: 'body/md/regular',\n },\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1px',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/minimal',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1px',\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 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 paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\n },\n },\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: '1px',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n
|
|
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\nconst tableSlotRecipe = defineSlotRecipe({\n className: 'table',\n slots: tableAnatomy.keys(),\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 color: 'text/body',\n textStyle: 'body/md/regular',\n },\n footer: {\n borderTopStyle: 'solid',\n borderTopWidth: '1px',\n },\n },\n variants: {\n variant: {\n default: {\n root: {\n borderColor: 'border/minimal',\n borderRadius: '4',\n borderStyle: 'solid',\n borderWidth: '1px',\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 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 paddingInline: '12',\n },\n footer: {\n borderTopColor: 'border/regular',\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 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: '1px',\n color: 'text/primary',\n fontWeight: 'bold',\n textAlign: 'start',\n textStyle: 'heading/h5',\n verticalAlign: 'middle',\n },\n cell: {\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n verticalAlign: 'middle',\n },\n body: {\n '& :where(tr)': {\n _hover: {\n backgroundColor: 'background/hover',\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/tertiary',\n borderBottomColor: 'border/minimal',\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\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: '1px',\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 paddingInlineEnd: '16',\n width: '96',\n },\n },\n footer: {\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 ],\n defaultVariants: {\n layout: 'table',\n size: 'lg',\n variant: 'default',\n },\n});\n\nexport default tableSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,kBAAkB,iBAAiB;CACvC,WAAW;CACX,OAAO,aAAa,KAAK;CACzB,MAAM;EACJ,MAAM;GACJ,oBAAoB;GACpB,WAAW;GACX,OAAO;EACT;EACA,SAAS;GACP,aAAa;GACb,WAAW;GACX,aAAa,EACX,kBAAkB,IACpB;EACF;EACA,MAAM;GACJ,OAAO;GACP,WAAW;EACb;EACA,QAAQ;GACN,gBAAgB;GAChB,gBAAgB;EAClB;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,eAAe;IACjB;IACA,QAAQ,EACN,gBAAgB,iBAClB;GACF;GACA,YAAY;IACV,cAAc;KACZ,mBAAmB;KACnB,SAAS;IACX;IACA,MAAM;KACJ,mBAAmB;KACnB,eAAe;IACjB;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;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;IACjB;IACA,MAAM;KACJ,mBAAmB;KACnB,mBAAmB;KACnB,eAAe;IACjB;IACA,MAAM;KACJ,gBAAgB,EACd,QAAQ,EACN,iBAAiB,mBACnB,EACF;KACA,8BAA8B,EAC5B,mBAAmB,IACrB;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,IACrB;IACF;IACA,MAAM;KACJ,YAAY;KACZ,SAAS;KACT,WAAW;KACX,eAAe;KACf,SAAS;MACP,WAAW;MACX,OAAO;MACP,SAAS;MACT,YAAY;MACZ,YAAY;MACZ,kBAAkB;MAClB,OAAO;KACT;IACF;IACA,QAAQ,EACN,SAAS,QACX;GACF;EACF;CACF;CACA,kBAAkB,CAChB;EACE,KAAK,EACH,KAAK,EACH,mBAAmB,iBACrB,EACF;EACA,QAAQ;EACR,SAAS;CACX,CACF;CACA,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
|
|
@@ -1829,6 +1829,23 @@ declare const slotRecipes: {
|
|
|
1829
1829
|
};
|
|
1830
1830
|
};
|
|
1831
1831
|
};
|
|
1832
|
+
size: {
|
|
1833
|
+
sm: {
|
|
1834
|
+
cell: {
|
|
1835
|
+
height: "48";
|
|
1836
|
+
};
|
|
1837
|
+
};
|
|
1838
|
+
md: {
|
|
1839
|
+
cell: {
|
|
1840
|
+
height: string;
|
|
1841
|
+
};
|
|
1842
|
+
};
|
|
1843
|
+
lg: {
|
|
1844
|
+
cell: {
|
|
1845
|
+
height: "64";
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1832
1849
|
layout: {
|
|
1833
1850
|
table: {
|
|
1834
1851
|
root: {
|
|
@@ -1850,7 +1867,6 @@ declare const slotRecipes: {
|
|
|
1850
1867
|
cell: {
|
|
1851
1868
|
borderBottomStyle: "solid";
|
|
1852
1869
|
borderBottomWidth: "1px";
|
|
1853
|
-
paddingBlock: "20";
|
|
1854
1870
|
verticalAlign: "middle";
|
|
1855
1871
|
};
|
|
1856
1872
|
body: {
|