@bitrise/bitkit-v2 0.3.506 → 0.3.507

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 CHANGED
@@ -238,6 +238,7 @@ Bitkit components use consistent prop names across the library:
238
238
  - **A surface that stays dark in both color modes** (logs, terminal output) — `background/fixed-contrast` with `text/on-color` (and `color/white/*` for dimmer text). `background/contrast` turns light in dark mode, so the white text on it disappears. Don't reach for a palette color instead.
239
239
  - **Always use `textStyle`** — never set `fontFamily` or `fontSize` on `<Text>`. Use `textStyle="body/md/regular"`, `textStyle="code/md"`, etc.
240
240
  - **Sizes as strings** — `width="32"`, not `width={32}`. Tokens are strings.
241
+ - **Responsive values as objects** — `padding={{ base: '16', tablet: '32' }}`, never the array form `padding={['16', '32']}`, which hides which breakpoint each value belongs to. The same goes for `columnTemplate` on `BitkitContentWrapper` (`{ tablet: '1fr 25rem' }`; its string form is deprecated).
241
242
  - **Use existing size tokens** — closest existing token (1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 40, 48, 64, 96, 128) representing pixel values (1=1px, 32=32px). Avoid arbitrary px (`width="100px"`). Above 128: a page's content width is `contentWidth` (`layout/maxWidth/640`, `…/960`, `…/1280`, `…/1616`, `…/full`) on `BitkitContentWrapper` and on the page header, subheader and filter bar above it — see `Docs/Page Layout`; for anything else use Bitkit's `rem()` helper (`import { rem } from '@bitrise/bitkit-v2'`, `maxWidth={rem(800)}`), never a bare-number string — `maxWidth="800"` is not a token, reaches the CSS without a unit, and the browser silently drops it.
242
243
  - **Omit default prop values** — `<IconCross />`, not `<IconCross size="24" />` when 24 is the default.
243
244
  - **Never pass `color` to a colored icon** — multi/fixed-color icons (`Icon*Color`, `IconWarningYellow`, `Icon*White`, etc.) have their colors baked in. They omit `color` from their props, so passing it is a type error. Only monochrome icons follow `color` (via `currentColor`).
@@ -1,13 +1,18 @@
1
1
  import { BoxProps } from '@chakra-ui/react/box';
2
+ import { default as breakpoints } from '../../theme/breakpoints';
2
3
  import { ContentWidth } from '../../theme/common/ContentWidth.common';
3
4
  /** A page content width: one of the `layout/maxWidth` tokens, `layout/maxWidth/full` for no cap. */
4
5
  export type BitkitContentWidth = ContentWidth;
5
6
  export interface BitkitContentWrapperProps extends BoxProps {
6
7
  /**
7
- * Side-by-side columns from `tablet` up, as a CSS grid template — `'1fr 1fr'` for two equal columns,
8
- * `'1fr 25rem'` for one that fills next to a fixed one. Below `tablet` the columns stack.
8
+ * Side-by-side columns: a CSS grid template per breakpoint, so where they split is visible at the call site —
9
+ * `{ tablet: '1fr 25rem' }` for one column that fills next to a fixed one from `tablet` up. Below the first
10
+ * breakpoint given, the columns stack.
11
+ *
12
+ * The string form (`'1fr 25rem'`, applied from `tablet`) is deprecated and goes away with the move to responsive
13
+ * conditions; use the object form in new code.
9
14
  */
10
- columnTemplate?: string;
15
+ columnTemplate?: string | Partial<Record<keyof typeof breakpoints, string>>;
11
16
  /** The cap on the page's content column, padding included. Pick the same value for the page header above it. */
12
17
  contentWidth: BitkitContentWidth;
13
18
  }
@@ -9,7 +9,7 @@ var BitkitContentWrapper = forwardRef((props, ref) => {
9
9
  const recipe = useRecipe({ key: "contentWrapper" });
10
10
  return /* @__PURE__ */ jsx(Box, {
11
11
  css: [recipe(), css],
12
- gridTemplateColumns: columnTemplate ? { tablet: columnTemplate } : void 0,
12
+ gridTemplateColumns: typeof columnTemplate === "string" ? { tablet: columnTemplate } : columnTemplate,
13
13
  maxWidth: contentWidth,
14
14
  ref,
15
15
  ...rest
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitContentWrapper.js","names":[],"sources":["../../../lib/components/BitkitContentWrapper/BitkitContentWrapper.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport { type ContentWidth } from '../../theme/common/ContentWidth.common';\n\n/** A page content width: one of the `layout/maxWidth` tokens, `layout/maxWidth/full` for no cap. */\nexport type BitkitContentWidth = ContentWidth;\n\nexport interface BitkitContentWrapperProps extends BoxProps {\n /**\n * Side-by-side columns from `tablet` up, as a CSS grid template — `'1fr 1fr'` for two equal columns,\n * `'1fr 25rem'` for one that fills next to a fixed one. Below `tablet` the columns stack.\n */\n columnTemplate?: string;\n /** The cap on the page's content column, padding included. Pick the same value for the page header above it. */\n contentWidth: BitkitContentWidth;\n}\n\n/** The page's content grid: capped at a `layout/maxWidth` token, centred, one column of sections 32 apart unless `columnTemplate` says otherwise. */\nconst BitkitContentWrapper = forwardRef<HTMLDivElement, BitkitContentWrapperProps>((props, ref) => {\n const { columnTemplate, contentWidth, css, ...rest } = props;\n\n const recipe = useRecipe({ key: 'contentWrapper' });\n\n return (\n <Box\n css={[recipe(), css]}\n gridTemplateColumns={columnTemplate ? { tablet: columnTemplate } : undefined}\n maxWidth={contentWidth}\n ref={ref}\n {...rest}\n />\n );\n});\n\nBitkitContentWrapper.displayName = 'BitkitContentWrapper';\n\nexport default BitkitContentWrapper;\n"],"mappings":";;;;;;AAoBA,IAAM,uBAAuB,YAAuD,OAAO,QAAQ;CACjG,MAAM,EAAE,gBAAgB,cAAc,KAAK,GAAG,SAAS;CAEvD,MAAM,SAAS,UAAU,EAAE,KAAK,iBAAiB,CAAC;CAElD,OACE,oBAAC,KAAD;EACE,KAAK,CAAC,OAAO,GAAG,GAAG;EACnB,qBAAqB,iBAAiB,EAAE,QAAQ,eAAe,IAAI,KAAA;EACnE,UAAU;EACL;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,qBAAqB,cAAc"}
1
+ {"version":3,"file":"BitkitContentWrapper.js","names":[],"sources":["../../../lib/components/BitkitContentWrapper/BitkitContentWrapper.tsx"],"sourcesContent":["import { Box, type BoxProps } from '@chakra-ui/react/box';\nimport { useRecipe } from '@chakra-ui/react/styled-system';\nimport { forwardRef } from 'react';\n\nimport type breakpoints from '../../theme/breakpoints';\nimport { type ContentWidth } from '../../theme/common/ContentWidth.common';\n\n/** A page content width: one of the `layout/maxWidth` tokens, `layout/maxWidth/full` for no cap. */\nexport type BitkitContentWidth = ContentWidth;\n\nexport interface BitkitContentWrapperProps extends BoxProps {\n /**\n * Side-by-side columns: a CSS grid template per breakpoint, so where they split is visible at the call site —\n * `{ tablet: '1fr 25rem' }` for one column that fills next to a fixed one from `tablet` up. Below the first\n * breakpoint given, the columns stack.\n *\n * The string form (`'1fr 25rem'`, applied from `tablet`) is deprecated and goes away with the move to responsive\n * conditions; use the object form in new code.\n */\n columnTemplate?: string | Partial<Record<keyof typeof breakpoints, string>>;\n /** The cap on the page's content column, padding included. Pick the same value for the page header above it. */\n contentWidth: BitkitContentWidth;\n}\n\n/** The page's content grid: capped at a `layout/maxWidth` token, centred, one column of sections 32 apart unless `columnTemplate` says otherwise. */\nconst BitkitContentWrapper = forwardRef<HTMLDivElement, BitkitContentWrapperProps>((props, ref) => {\n const { columnTemplate, contentWidth, css, ...rest } = props;\n\n const recipe = useRecipe({ key: 'contentWrapper' });\n\n return (\n <Box\n css={[recipe(), css]}\n gridTemplateColumns={typeof columnTemplate === 'string' ? { tablet: columnTemplate } : columnTemplate}\n maxWidth={contentWidth}\n ref={ref}\n {...rest}\n />\n );\n});\n\nBitkitContentWrapper.displayName = 'BitkitContentWrapper';\n\nexport default BitkitContentWrapper;\n"],"mappings":";;;;;;AAyBA,IAAM,uBAAuB,YAAuD,OAAO,QAAQ;CACjG,MAAM,EAAE,gBAAgB,cAAc,KAAK,GAAG,SAAS;CAEvD,MAAM,SAAS,UAAU,EAAE,KAAK,iBAAiB,CAAC;CAElD,OACE,oBAAC,KAAD;EACE,KAAK,CAAC,OAAO,GAAG,GAAG;EACnB,qBAAqB,OAAO,mBAAmB,WAAW,EAAE,QAAQ,eAAe,IAAI;EACvF,UAAU;EACL;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,qBAAqB,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.506",
4
+ "version": "0.3.507",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",