@allxsmith/bestax-bulma 5.24.0 → 5.26.0

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.
@@ -10,7 +10,7 @@ export type BulmaGapSize = BulmaGapValue;
10
10
  /**
11
11
  * Props for the Columns component.
12
12
  */
13
- export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
13
+ export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'columnGap' | 'rowGap'> {
14
14
  /** Additional CSS classes for the columns container. */
15
15
  className?: string;
16
16
  /** Text color. */
@@ -31,7 +31,15 @@ export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit
31
31
  isMobile?: boolean;
32
32
  /** Apply columns layout on desktop and up. */
33
33
  isDesktop?: boolean;
34
- /** Gap size for all breakpoints. Same scale as `Grid`'s `gap` prop; wins over `gapSize` if both are set. */
34
+ /**
35
+ * Gap size for all breakpoints, the columns gutter (`is-<value>`). Whole
36
+ * steps of the same scale as `Grid`'s `gap` prop; wins over `gapSize` if
37
+ * both are set.
38
+ *
39
+ * This is not the `gap` helper prop other components take, which renders
40
+ * `is-gap-<value>`: on `Columns` the gutter is padding inside each column,
41
+ * so the helper's CSS `gap` would add to it rather than replace it.
42
+ */
35
43
  gap?: BulmaGapValue;
36
44
  /** Gap size for mobile. Wins over `gapSizeMobile` if both are set. */
37
45
  gapMobile?: BulmaGapValue;
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
+ import type { BulmaGapStep } from '../helpers/bulmaClassHelpers.js';
3
4
  /**
4
- * Allowed gap values for Bulma's 0-8 spacing scale, shared by `Grid` and
5
- * `Columns`. Accepts the value as a number or a numeric string.
5
+ * The whole steps of Bulma's 0-8 gap scale, as `Columns` takes them. Accepts
6
+ * the value as a number or a numeric string.
7
+ *
8
+ * `Grid`'s gap props and the shared `gap`, `columnGap` and `rowGap` helper
9
+ * props take the half steps as well, as `BulmaGapStep`.
6
10
  */
7
11
  export type BulmaGapValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
8
12
  /**
@@ -23,12 +27,16 @@ export type BulmaFixedGridColsProp = BulmaFixedGridCols | 'auto';
23
27
  export interface GridProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
24
28
  /** Use a fixed grid layout (`.fixed-grid > .grid`). */
25
29
  isFixed?: boolean;
26
- /** Main gap for grid (Bulma `is-gap-X`). */
27
- gap?: BulmaGapValue;
28
- /** Column gap for grid (`is-column-gap-X`). */
29
- columnGap?: BulmaGapValue;
30
- /** Row gap for grid (`is-row-gap-X`). */
31
- rowGap?: BulmaGapValue;
30
+ /**
31
+ * Main gap for grid (Bulma `is-gap-X`), a whole or half step of Bulma's gap
32
+ * scale. The same values and class as the `gap` helper prop on every other
33
+ * component.
34
+ */
35
+ gap?: BulmaGapStep;
36
+ /** Column gap for grid (`is-column-gap-X`), on the same scale as `gap`. */
37
+ columnGap?: BulmaGapStep;
38
+ /** Row gap for grid (`is-row-gap-X`), on the same scale as `gap`. */
39
+ rowGap?: BulmaGapStep;
32
40
  /** Minimum column width for the grid (`is-col-min-X`). */
33
41
  minCol?: BulmaMinColValue;
34
42
  /** For fixed grids: explicit column count (`has-X-cols`), or `'auto'` for auto-count. */
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { BulmaClassesProps } from './useBulmaClasses.js';
3
- import { validRadii } from './bulmaClassHelpers.js';
3
+ import { validRadii, type BulmaGapStep } from './bulmaClassHelpers.js';
4
4
  declare const bulmaCssVars: readonly ["--bulma-scheme-h", "--bulma-scheme-s", "--bulma-scheme-main", "--bulma-scheme-main-bis", "--bulma-scheme-main-ter", "--bulma-scheme-invert", "--bulma-scheme-invert-bis", "--bulma-scheme-invert-ter", "--bulma-light-l", "--bulma-light-invert-l", "--bulma-dark-l", "--bulma-dark-invert-l", "--bulma-soft-l", "--bulma-bold-l", "--bulma-soft-invert-l", "--bulma-bold-invert-l", "--bulma-hover-background-l-delta", "--bulma-active-background-l-delta", "--bulma-hover-border-l-delta", "--bulma-active-border-l-delta", "--bulma-hover-color-l-delta", "--bulma-active-color-l-delta", "--bulma-hover-shadow-a-delta", "--bulma-active-shadow-a-delta", "--bulma-primary-h", "--bulma-primary-s", "--bulma-primary-l", "--bulma-link-h", "--bulma-link-s", "--bulma-link-l", "--bulma-info-h", "--bulma-info-s", "--bulma-info-l", "--bulma-success-h", "--bulma-success-s", "--bulma-success-l", "--bulma-warning-h", "--bulma-warning-s", "--bulma-warning-l", "--bulma-danger-h", "--bulma-danger-s", "--bulma-danger-l", "--bulma-shadow-h", "--bulma-shadow-s", "--bulma-shadow-l", "--bulma-shadow", "--bulma-family-primary", "--bulma-family-secondary", "--bulma-family-code", "--bulma-size-small", "--bulma-size-normal", "--bulma-size-medium", "--bulma-size-large", "--bulma-weight-light", "--bulma-weight-normal", "--bulma-weight-medium", "--bulma-weight-semibold", "--bulma-weight-bold", "--bulma-weight-extrabold", "--bulma-block-spacing", "--bulma-duration", "--bulma-easing", "--bulma-radius-small", "--bulma-radius", "--bulma-radius-medium", "--bulma-radius-large", "--bulma-radius-rounded", "--bulma-speed", "--bulma-arrow-color", "--bulma-loading-color", "--bulma-burger-h", "--bulma-burger-s", "--bulma-burger-l", "--bulma-burger-border-radius", "--bulma-burger-gap", "--bulma-burger-item-height", "--bulma-burger-item-width", "--bulma-body-background-color", "--bulma-body-size", "--bulma-body-min-width", "--bulma-body-rendering", "--bulma-body-family", "--bulma-body-overflow-x", "--bulma-body-overflow-y", "--bulma-body-color", "--bulma-body-font-size", "--bulma-body-weight", "--bulma-body-line-height", "--bulma-code-family", "--bulma-code-padding", "--bulma-code-weight", "--bulma-code-size", "--bulma-small-font-size", "--bulma-hr-background-color", "--bulma-hr-height", "--bulma-hr-margin", "--bulma-strong-color", "--bulma-strong-weight", "--bulma-pre-font-size", "--bulma-pre-padding", "--bulma-pre-code-font-size", "--bulma-skeleton-background", "--bulma-skeleton-radius", "--bulma-skeleton-block-min-height", "--bulma-skeleton-lines-gap", "--bulma-skeleton-line-height", "--bulma-breadcrumb-item-color", "--bulma-breadcrumb-item-hover-color", "--bulma-breadcrumb-item-active-color", "--bulma-breadcrumb-item-padding-vertical", "--bulma-breadcrumb-item-padding-horizontal", "--bulma-breadcrumb-item-separator-color", "--bulma-card-color", "--bulma-card-background-color", "--bulma-card-shadow", "--bulma-card-radius", "--bulma-card-header-background-color", "--bulma-card-header-color", "--bulma-card-header-padding", "--bulma-card-header-shadow", "--bulma-card-header-weight", "--bulma-card-content-background-color", "--bulma-card-content-padding", "--bulma-card-footer-background-color", "--bulma-card-footer-border-top", "--bulma-card-footer-padding", "--bulma-card-media-margin", "--bulma-dropdown-menu-min-width", "--bulma-dropdown-content-background-color", "--bulma-dropdown-content-offset", "--bulma-dropdown-content-padding-bottom", "--bulma-dropdown-content-padding-top", "--bulma-dropdown-content-radius", "--bulma-dropdown-content-shadow", "--bulma-dropdown-content-z", "--bulma-dropdown-item-h", "--bulma-dropdown-item-s", "--bulma-dropdown-item-l", "--bulma-dropdown-item-background-l", "--bulma-dropdown-item-background-l-delta", "--bulma-dropdown-item-hover-background-l-delta", "--bulma-dropdown-item-active-background-l-delta", "--bulma-dropdown-item-color-l", "--bulma-dropdown-item-selected-h", "--bulma-dropdown-item-selected-s", "--bulma-dropdown-item-selected-l", "--bulma-dropdown-item-selected-background-l", "--bulma-dropdown-item-selected-color-l", "--bulma-dropdown-divider-background-color", "--bulma-menu-item-h", "--bulma-menu-item-s", "--bulma-menu-item-l", "--bulma-menu-item-background-l", "--bulma-menu-item-background-l-delta", "--bulma-menu-item-hover-background-l-delta", "--bulma-menu-item-active-background-l-delta", "--bulma-menu-item-color-l", "--bulma-menu-item-radius", "--bulma-menu-item-selected-h", "--bulma-menu-item-selected-s", "--bulma-menu-item-selected-l", "--bulma-menu-item-selected-background-l", "--bulma-menu-item-selected-color-l", "--bulma-menu-list-border-left", "--bulma-menu-list-line-height", "--bulma-menu-list-link-padding", "--bulma-menu-nested-list-margin", "--bulma-menu-nested-list-padding-left", "--bulma-menu-label-color", "--bulma-menu-label-font-size", "--bulma-menu-label-letter-spacing", "--bulma-menu-label-spacing", "--bulma-message-h", "--bulma-message-s", "--bulma-message-background-l", "--bulma-message-border-l", "--bulma-message-border-l-delta", "--bulma-message-border-style", "--bulma-message-border-width", "--bulma-message-color-l", "--bulma-message-radius", "--bulma-message-header-weight", "--bulma-message-header-padding", "--bulma-message-header-radius", "--bulma-message-header-body-border-width", "--bulma-message-header-background-l", "--bulma-message-header-color-l", "--bulma-message-body-border-width", "--bulma-message-body-color", "--bulma-message-body-padding", "--bulma-message-body-radius", "--bulma-message-body-pre-code-background-color", "--bulma-modal-z", "--bulma-modal-background-background-color", "--bulma-modal-content-width", "--bulma-modal-content-margin-mobile", "--bulma-modal-content-spacing-mobile", "--bulma-modal-content-spacing-tablet", "--bulma-modal-close-dimensions", "--bulma-modal-close-right", "--bulma-modal-close-top", "--bulma-modal-card-spacing", "--bulma-modal-card-head-background-color", "--bulma-modal-card-head-padding", "--bulma-modal-card-head-radius", "--bulma-modal-card-title-color", "--bulma-modal-card-title-line-height", "--bulma-modal-card-title-size", "--bulma-modal-card-foot-background-color", "--bulma-modal-card-foot-radius", "--bulma-modal-card-body-background-color", "--bulma-modal-card-body-padding", "--bulma-navbar-h", "--bulma-navbar-s", "--bulma-navbar-l", "--bulma-navbar-background-color", "--bulma-navbar-box-shadow-size", "--bulma-navbar-box-shadow-color", "--bulma-navbar-padding-vertical", "--bulma-navbar-padding-horizontal", "--bulma-navbar-z", "--bulma-navbar-fixed-z", "--bulma-navbar-item-background-a", "--bulma-navbar-item-background-l", "--bulma-navbar-item-background-l-delta", "--bulma-navbar-item-hover-background-l-delta", "--bulma-navbar-item-active-background-l-delta", "--bulma-navbar-item-color-l", "--bulma-navbar-item-selected-h", "--bulma-navbar-item-selected-s", "--bulma-navbar-item-selected-l", "--bulma-navbar-item-selected-background-l", "--bulma-navbar-item-selected-color-l", "--bulma-navbar-item-img-max-height", "--bulma-navbar-burger-color", "--bulma-navbar-tab-hover-background-color", "--bulma-navbar-tab-hover-border-bottom-color", "--bulma-navbar-tab-active-color", "--bulma-navbar-tab-active-background-color", "--bulma-navbar-tab-active-border-bottom-color", "--bulma-navbar-tab-active-border-bottom-style", "--bulma-navbar-tab-active-border-bottom-width", "--bulma-navbar-dropdown-background-color", "--bulma-navbar-dropdown-border-l", "--bulma-navbar-dropdown-border-color", "--bulma-navbar-dropdown-border-style", "--bulma-navbar-dropdown-border-width", "--bulma-navbar-dropdown-offset", "--bulma-navbar-dropdown-arrow", "--bulma-navbar-dropdown-radius", "--bulma-navbar-dropdown-z", "--bulma-navbar-dropdown-boxed-radius", "--bulma-navbar-dropdown-boxed-shadow", "--bulma-navbar-dropdown-item-h", "--bulma-navbar-dropdown-item-s", "--bulma-navbar-dropdown-item-l", "--bulma-navbar-dropdown-item-background-l", "--bulma-navbar-dropdown-item-color-l", "--bulma-navbar-divider-background-l", "--bulma-navbar-divider-height", "--bulma-navbar-bottom-box-shadow-size", "--bulma-pagination-margin", "--bulma-pagination-min-width", "--bulma-pagination-item-h", "--bulma-pagination-item-s", "--bulma-pagination-item-l", "--bulma-pagination-item-background-l-delta", "--bulma-pagination-item-hover-background-l-delta", "--bulma-pagination-item-active-background-l-delta", "--bulma-pagination-item-border-style", "--bulma-pagination-item-border-width", "--bulma-pagination-item-border-l", "--bulma-pagination-item-border-l-delta", "--bulma-pagination-item-hover-border-l-delta", "--bulma-pagination-item-active-border-l-delta", "--bulma-pagination-item-focus-border-l-delta", "--bulma-pagination-item-color-l", "--bulma-pagination-item-font-size", "--bulma-pagination-item-margin", "--bulma-pagination-item-padding-left", "--bulma-pagination-item-padding-right", "--bulma-pagination-item-outer-shadow-h", "--bulma-pagination-item-outer-shadow-s", "--bulma-pagination-item-outer-shadow-l", "--bulma-pagination-item-outer-shadow-a", "--bulma-pagination-nav-padding-left", "--bulma-pagination-nav-padding-right", "--bulma-pagination-disabled-color", "--bulma-pagination-disabled-background-color", "--bulma-pagination-disabled-border-color", "--bulma-pagination-current-color", "--bulma-pagination-current-background-color", "--bulma-pagination-current-border-color", "--bulma-pagination-ellipsis-color", "--bulma-pagination-shadow-inset", "--bulma-pagination-selected-item-h", "--bulma-pagination-selected-item-s", "--bulma-pagination-selected-item-l", "--bulma-pagination-selected-item-background-l", "--bulma-pagination-selected-item-border-l", "--bulma-pagination-selected-item-color-l", "--bulma-panel-margin", "--bulma-panel-item-border", "--bulma-panel-radius", "--bulma-panel-shadow", "--bulma-panel-heading-line-height", "--bulma-panel-heading-padding", "--bulma-panel-heading-radius", "--bulma-panel-heading-size", "--bulma-panel-heading-weight", "--bulma-panel-tabs-font-size", "--bulma-panel-tab-border-bottom-color", "--bulma-panel-tab-border-bottom-style", "--bulma-panel-tab-border-bottom-width", "--bulma-panel-tab-active-color", "--bulma-panel-list-item-color", "--bulma-panel-list-item-hover-color", "--bulma-panel-block-color", "--bulma-panel-block-hover-background-color", "--bulma-panel-block-active-border-left-color", "--bulma-panel-block-active-color", "--bulma-panel-block-active-icon-color", "--bulma-panel-icon-color", "--bulma-tabs-border-bottom-color", "--bulma-tabs-border-bottom-style", "--bulma-tabs-border-bottom-width", "--bulma-tabs-link-color", "--bulma-tabs-link-hover-border-bottom-color", "--bulma-tabs-link-hover-color", "--bulma-tabs-link-active-border-bottom-color", "--bulma-tabs-link-active-color", "--bulma-tabs-link-padding", "--bulma-tabs-boxed-link-radius", "--bulma-tabs-boxed-link-hover-background-color", "--bulma-tabs-boxed-link-hover-border-bottom-color", "--bulma-tabs-boxed-link-active-background-color", "--bulma-tabs-boxed-link-active-border-color", "--bulma-tabs-boxed-link-active-border-bottom-color", "--bulma-tabs-toggle-link-border-color", "--bulma-tabs-toggle-link-border-style", "--bulma-tabs-toggle-link-border-width", "--bulma-tabs-toggle-link-hover-background-color", "--bulma-tabs-toggle-link-hover-border-color", "--bulma-tabs-toggle-link-radius", "--bulma-tabs-toggle-link-active-background-color", "--bulma-tabs-toggle-link-active-border-color", "--bulma-tabs-toggle-link-active-color", "--bulma-box-background-color", "--bulma-box-color", "--bulma-box-radius", "--bulma-box-shadow", "--bulma-box-padding", "--bulma-box-link-hover-shadow", "--bulma-box-link-active-shadow", "--bulma-content-heading-color", "--bulma-content-heading-weight", "--bulma-content-heading-line-height", "--bulma-content-block-margin-bottom", "--bulma-content-blockquote-background-color", "--bulma-content-blockquote-border-left", "--bulma-content-blockquote-padding", "--bulma-content-pre-padding", "--bulma-content-table-cell-border", "--bulma-content-table-cell-border-width", "--bulma-content-table-cell-padding", "--bulma-content-table-cell-heading-color", "--bulma-content-table-head-cell-border-width", "--bulma-content-table-head-cell-color", "--bulma-content-table-body-last-row-cell-border-bottom-width", "--bulma-content-table-foot-cell-border-width", "--bulma-content-table-foot-cell-color", "--bulma-delete-dimensions", "--bulma-delete-background-l", "--bulma-delete-background-alpha", "--bulma-delete-color", "--bulma-icon-dimensions", "--bulma-icon-dimensions-small", "--bulma-icon-dimensions-medium", "--bulma-icon-dimensions-large", "--bulma-icon-text-spacing", "--bulma-notification-h", "--bulma-notification-s", "--bulma-notification-background-l", "--bulma-notification-color-l", "--bulma-notification-code-background-color", "--bulma-notification-radius", "--bulma-notification-padding", "--bulma-progress-border-radius", "--bulma-progress-bar-background-color", "--bulma-progress-value-background-color", "--bulma-progress-indeterminate-duration", "--bulma-table-color", "--bulma-table-background-color", "--bulma-table-cell-border-color", "--bulma-table-cell-border-style", "--bulma-table-cell-border-width", "--bulma-table-cell-padding", "--bulma-table-cell-heading-color", "--bulma-table-cell-text-align", "--bulma-table-head-cell-border-width", "--bulma-table-head-cell-color", "--bulma-table-foot-cell-border-width", "--bulma-table-foot-cell-color", "--bulma-table-head-background-color", "--bulma-table-body-background-color", "--bulma-table-foot-background-color", "--bulma-table-row-hover-background-color", "--bulma-table-row-active-background-color", "--bulma-table-row-active-color", "--bulma-table-striped-row-even-background-color", "--bulma-table-striped-row-even-hover-background-color", "--bulma-tag-h", "--bulma-tag-s", "--bulma-tag-background-l", "--bulma-tag-background-l-delta", "--bulma-tag-hover-background-l-delta", "--bulma-tag-active-background-l-delta", "--bulma-tag-color-l", "--bulma-tag-radius", "--bulma-tag-delete-margin", "--bulma-title-color", "--bulma-title-family", "--bulma-title-size", "--bulma-title-weight", "--bulma-title-line-height", "--bulma-title-strong-color", "--bulma-title-strong-weight", "--bulma-title-sub-size", "--bulma-title-sup-size", "--bulma-subtitle-color", "--bulma-subtitle-family", "--bulma-subtitle-size", "--bulma-subtitle-weight", "--bulma-subtitle-line-height", "--bulma-subtitle-strong-color", "--bulma-subtitle-strong-weight", "--bulma-control-radius", "--bulma-control-radius-small", "--bulma-control-border-width", "--bulma-control-height", "--bulma-control-line-height", "--bulma-control-padding-vertical", "--bulma-control-padding-horizontal", "--bulma-control-size", "--bulma-control-focus-shadow-l", "--bulma-file-radius", "--bulma-file-name-border-color", "--bulma-file-name-border-style", "--bulma-file-name-border-width", "--bulma-file-name-max-width", "--bulma-file-h", "--bulma-file-s", "--bulma-file-background-l", "--bulma-file-background-l-delta", "--bulma-file-hover-background-l-delta", "--bulma-file-active-background-l-delta", "--bulma-file-border-l", "--bulma-file-border-l-delta", "--bulma-file-hover-border-l-delta", "--bulma-file-active-border-l-delta", "--bulma-file-cta-color-l", "--bulma-file-name-color-l", "--bulma-file-color-l-delta", "--bulma-file-hover-color-l-delta", "--bulma-file-active-color-l-delta", "--bulma-input-h", "--bulma-input-s", "--bulma-input-l", "--bulma-input-border-style", "--bulma-input-border-l", "--bulma-input-border-l-delta", "--bulma-input-hover-border-l-delta", "--bulma-input-active-border-l-delta", "--bulma-input-focus-h", "--bulma-input-focus-s", "--bulma-input-focus-l", "--bulma-input-focus-shadow-size", "--bulma-input-focus-shadow-alpha", "--bulma-input-color-l", "--bulma-input-background-l", "--bulma-input-background-l-delta", "--bulma-input-height", "--bulma-input-shadow", "--bulma-input-placeholder-color", "--bulma-input-disabled-color", "--bulma-input-disabled-background-color", "--bulma-input-disabled-border-color", "--bulma-input-disabled-placeholder-color", "--bulma-input-arrow", "--bulma-input-icon-color", "--bulma-input-icon-hover-color", "--bulma-input-icon-focus-color", "--bulma-input-radius", "--bulma-column-gap", "--bulma-grid-gap", "--bulma-grid-column-count", "--bulma-grid-column-min", "--bulma-grid-cell-column-span", "--bulma-grid-cell-column-start", "--bulma-footer-background-color", "--bulma-footer-color", "--bulma-footer-padding", "--bulma-hero-body-padding", "--bulma-hero-body-padding-tablet", "--bulma-hero-body-padding-small", "--bulma-hero-body-padding-medium", "--bulma-hero-body-padding-large", "--bulma-media-border-color", "--bulma-media-border-size", "--bulma-media-spacing", "--bulma-media-spacing-large", "--bulma-media-content-spacing", "--bulma-media-level-1-spacing", "--bulma-media-level-1-content-spacing", "--bulma-media-level-2-spacing", "--bulma-section-padding", "--bulma-section-padding-desktop", "--bulma-section-padding-medium", "--bulma-section-padding-large"];
5
5
  /** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */
6
6
  type BulmaVarKey = (typeof bulmaCssVars)[number];
@@ -90,6 +90,22 @@ export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroun
90
90
  * it is on every other component.
91
91
  */
92
92
  radius?: (typeof validRadii)[number];
93
+ /**
94
+ * Column gap helper, as on every other component: a gap step adds
95
+ * `is-column-gap-<step>` to the wrapper div, which spaces the wrapper's own
96
+ * children when it is a flex or grid container. Under `isRoot` there is no
97
+ * wrapper, so it does nothing, and says so in development.
98
+ *
99
+ * It does not set `--bulma-column-gap`, the variable `Columns` reads for
100
+ * its gutters; set that through `bulmaVars`
101
+ * (`bulmaVars={{ '--bulma-column-gap': '1rem' }}`). Before `columnGap` was
102
+ * a helper prop, untyped JavaScript could pass it to Theme as that
103
+ * variable. A string that is not a gap step (`'1rem'`) still sets it, but
104
+ * that route is deprecated and logs a warning in development. A gap step
105
+ * does not: `columnGap="0"` used to zero the gutters inside the Theme, and
106
+ * now adds `is-column-gap-0` to the wrapper instead.
107
+ */
108
+ columnGap?: BulmaGapStep;
93
109
  schemeH?: string;
94
110
  schemeS?: string;
95
111
  lightL?: string;
@@ -22,6 +22,24 @@ export declare const validSchemeColors: readonly ["scheme-main", "scheme-main-bi
22
22
  * @example '0', '1', 'auto'
23
23
  */
24
24
  export declare const validSizes: readonly ["0", "1", "2", "3", "4", "5", "6", "auto"];
25
+ /**
26
+ * Valid Bulma gap steps, taken by `gap`, `columnGap` and `rowGap`. Each whole
27
+ * step is 0.5rem, so `2` is 1rem and `8` is 4rem, and the half steps sit
28
+ * between them. They render `is-gap-<value>`, `is-column-gap-<value>` and
29
+ * `is-row-gap-<value>`.
30
+ *
31
+ * This is a different scale from `validSizes`: `gap="2"` is 1rem where
32
+ * `m="2"` is 0.5rem.
33
+ * @example '0', '0.5', '2', '8'
34
+ */
35
+ export declare const validGaps: readonly ["0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7", "7.5", "8"];
36
+ /**
37
+ * A gap step as `gap`, `columnGap` and `rowGap` take it: a value from
38
+ * `validGaps`, or the same step written as a number (`gap={2}`,
39
+ * `gap={1.5}`). `Grid` took its gaps as numbers before the gap helpers were
40
+ * shared, so every gap prop still does.
41
+ */
42
+ export type BulmaGapStep = '0' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '4.5' | '5' | '5.5' | '6' | '6.5' | '7' | '7.5' | '8' | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5 | 5.5 | 6 | 6.5 | 7 | 7.5 | 8;
25
43
  /**
26
44
  * Valid Bulma text size classes.
27
45
  * @example '1', '2', '3'
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties } from 'react';
2
- import { BulmaDisplayProps, BulmaViewportProps } from './bulmaClassHelpers.js';
2
+ import { BulmaDisplayProps, BulmaViewportProps, type BulmaGapStep } from './bulmaClassHelpers.js';
3
3
  import { BulmaColorProps, BulmaColorPropsWithScheme } from './useColorClasses.js';
4
4
  import { BulmaSpacingProps } from './useSpacingClasses.js';
5
5
  import { BulmaTypographyProps } from './useTypographyClasses.js';
@@ -50,8 +50,8 @@ export declare const useBulmaClasses: <T extends object>(props: BulmaClassesProp
50
50
  bulmaHelperStyles?: CSSProperties;
51
51
  rest: Omit<T, keyof BulmaClassesProps>;
52
52
  };
53
- export { validColors, validColorShades, validSchemeColors, validSizes, validTextSizes, validAlignments, validTextTransforms, validTextWeights, validFontFamilies, validDisplays, validVisibilities, validFlexDirections, validFlexWraps, validJustifyContents, validAlignContents, validAlignItems, validAlignSelfs, validFlexGrowShrink, validViewports, validFloats, validOverflows, validAxisOverflows, validInteractions, validCursors, validRadii, validShadows, validResponsives, validPositions, validAspectRatios, } from './bulmaClassHelpers.js';
54
- export type { BulmaViewportProps, BulmaDisplayProps };
53
+ export { validColors, validColorShades, validSchemeColors, validSizes, validGaps, validTextSizes, validAlignments, validTextTransforms, validTextWeights, validFontFamilies, validDisplays, validVisibilities, validFlexDirections, validFlexWraps, validJustifyContents, validAlignContents, validAlignItems, validAlignSelfs, validFlexGrowShrink, validViewports, validFloats, validOverflows, validAxisOverflows, validInteractions, validCursors, validRadii, validShadows, validResponsives, validPositions, validAspectRatios, } from './bulmaClassHelpers.js';
54
+ export type { BulmaViewportProps, BulmaDisplayProps, BulmaGapStep };
55
55
  export * from './useColorClasses.js';
56
56
  export * from './useSpacingClasses.js';
57
57
  export * from './useTypographyClasses.js';
@@ -1,6 +1,6 @@
1
- import { validSizes } from './bulmaClassHelpers.js';
1
+ import { validSizes, type BulmaGapStep } from './bulmaClassHelpers.js';
2
2
  /**
3
- * Props for applying Bulma margin and padding helper classes.
3
+ * Props for applying Bulma margin, padding and gap helper classes.
4
4
  */
5
5
  export interface BulmaSpacingProps {
6
6
  /** Margin (e.g., '0', '1'). */
@@ -31,9 +31,40 @@ export interface BulmaSpacingProps {
31
31
  px?: (typeof validSizes)[number];
32
32
  /** Padding vertical (top and bottom). */
33
33
  py?: (typeof validSizes)[number];
34
+ /**
35
+ * Space between the children of a flex or grid container (`is-gap-<value>`),
36
+ * on Bulma's gap scale: each whole step is 0.5rem, so `gap="2"` is 1rem, with
37
+ * half steps such as `"1.5"` between them. Also takes the step as a number.
38
+ *
39
+ * It sets the CSS `gap`, which does nothing unless the element lays its
40
+ * children out as flex or grid, so pair it with `display="flex"` on most
41
+ * components. The scale is not the margin scale: `m="2"` is 0.5rem.
42
+ *
43
+ * `Grid` and `Columns` declare their own `gap`. `Grid`'s renders the same
44
+ * class; `Columns`' is the columns gutter (`is-<value>`) and takes whole
45
+ * steps only.
46
+ */
47
+ gap?: BulmaGapStep;
48
+ /**
49
+ * Space between columns only (`is-column-gap-<value>`), on the same scale as
50
+ * `gap`. Beside `gap` or `gapless`, it wins on its own axis.
51
+ */
52
+ columnGap?: BulmaGapStep;
53
+ /**
54
+ * Space between rows only (`is-row-gap-<value>`), on the same scale as
55
+ * `gap`. Beside `gap` or `gapless`, it wins on its own axis.
56
+ */
57
+ rowGap?: BulmaGapStep;
58
+ /**
59
+ * Removes the gap between children (`is-gapless`), the shortcut for
60
+ * `gap="0"`; a valid `gap` wins when both are set. `Columns` is the
61
+ * exception: its `gap` is its gutter, and there `gapless` is Bulma's gapless
62
+ * columns modifier, the same as `isGapless`.
63
+ */
64
+ gapless?: boolean;
34
65
  }
35
66
  /**
36
- * A hook that generates Bulma margin and padding helper classes.
67
+ * A hook that generates Bulma margin, padding and gap helper classes.
37
68
  *
38
69
  * @function useSpacingClasses
39
70
  * @param props - Spacing-related Bulma helper props.
@@ -10,7 +10,7 @@ export type BulmaGapSize = BulmaGapValue;
10
10
  /**
11
11
  * Props for the Columns component.
12
12
  */
13
- export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
13
+ export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'columnGap' | 'rowGap'> {
14
14
  /** Additional CSS classes for the columns container. */
15
15
  className?: string;
16
16
  /** Text color. */
@@ -31,7 +31,15 @@ export interface ColumnsProps extends React.HTMLAttributes<HTMLDivElement>, Omit
31
31
  isMobile?: boolean;
32
32
  /** Apply columns layout on desktop and up. */
33
33
  isDesktop?: boolean;
34
- /** Gap size for all breakpoints. Same scale as `Grid`'s `gap` prop; wins over `gapSize` if both are set. */
34
+ /**
35
+ * Gap size for all breakpoints, the columns gutter (`is-<value>`). Whole
36
+ * steps of the same scale as `Grid`'s `gap` prop; wins over `gapSize` if
37
+ * both are set.
38
+ *
39
+ * This is not the `gap` helper prop other components take, which renders
40
+ * `is-gap-<value>`: on `Columns` the gutter is padding inside each column,
41
+ * so the helper's CSS `gap` would add to it rather than replace it.
42
+ */
35
43
  gap?: BulmaGapValue;
36
44
  /** Gap size for mobile. Wins over `gapSizeMobile` if both are set. */
37
45
  gapMobile?: BulmaGapValue;
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
+ import type { BulmaGapStep } from '../helpers/bulmaClassHelpers.js';
3
4
  /**
4
- * Allowed gap values for Bulma's 0-8 spacing scale, shared by `Grid` and
5
- * `Columns`. Accepts the value as a number or a numeric string.
5
+ * The whole steps of Bulma's 0-8 gap scale, as `Columns` takes them. Accepts
6
+ * the value as a number or a numeric string.
7
+ *
8
+ * `Grid`'s gap props and the shared `gap`, `columnGap` and `rowGap` helper
9
+ * props take the half steps as well, as `BulmaGapStep`.
6
10
  */
7
11
  export type BulmaGapValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';
8
12
  /**
@@ -23,12 +27,16 @@ export type BulmaFixedGridColsProp = BulmaFixedGridCols | 'auto';
23
27
  export interface GridProps extends React.HTMLAttributes<HTMLDivElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
24
28
  /** Use a fixed grid layout (`.fixed-grid > .grid`). */
25
29
  isFixed?: boolean;
26
- /** Main gap for grid (Bulma `is-gap-X`). */
27
- gap?: BulmaGapValue;
28
- /** Column gap for grid (`is-column-gap-X`). */
29
- columnGap?: BulmaGapValue;
30
- /** Row gap for grid (`is-row-gap-X`). */
31
- rowGap?: BulmaGapValue;
30
+ /**
31
+ * Main gap for grid (Bulma `is-gap-X`), a whole or half step of Bulma's gap
32
+ * scale. The same values and class as the `gap` helper prop on every other
33
+ * component.
34
+ */
35
+ gap?: BulmaGapStep;
36
+ /** Column gap for grid (`is-column-gap-X`), on the same scale as `gap`. */
37
+ columnGap?: BulmaGapStep;
38
+ /** Row gap for grid (`is-row-gap-X`), on the same scale as `gap`. */
39
+ rowGap?: BulmaGapStep;
32
40
  /** Minimum column width for the grid (`is-col-min-X`). */
33
41
  minCol?: BulmaMinColValue;
34
42
  /** For fixed grids: explicit column count (`has-X-cols`), or `'auto'` for auto-count. */
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { BulmaClassesProps } from './useBulmaClasses.js';
3
- import { validRadii } from './bulmaClassHelpers.js';
3
+ import { validRadii, type BulmaGapStep } from './bulmaClassHelpers.js';
4
4
  declare const bulmaCssVars: readonly ["--bulma-scheme-h", "--bulma-scheme-s", "--bulma-scheme-main", "--bulma-scheme-main-bis", "--bulma-scheme-main-ter", "--bulma-scheme-invert", "--bulma-scheme-invert-bis", "--bulma-scheme-invert-ter", "--bulma-light-l", "--bulma-light-invert-l", "--bulma-dark-l", "--bulma-dark-invert-l", "--bulma-soft-l", "--bulma-bold-l", "--bulma-soft-invert-l", "--bulma-bold-invert-l", "--bulma-hover-background-l-delta", "--bulma-active-background-l-delta", "--bulma-hover-border-l-delta", "--bulma-active-border-l-delta", "--bulma-hover-color-l-delta", "--bulma-active-color-l-delta", "--bulma-hover-shadow-a-delta", "--bulma-active-shadow-a-delta", "--bulma-primary-h", "--bulma-primary-s", "--bulma-primary-l", "--bulma-link-h", "--bulma-link-s", "--bulma-link-l", "--bulma-info-h", "--bulma-info-s", "--bulma-info-l", "--bulma-success-h", "--bulma-success-s", "--bulma-success-l", "--bulma-warning-h", "--bulma-warning-s", "--bulma-warning-l", "--bulma-danger-h", "--bulma-danger-s", "--bulma-danger-l", "--bulma-shadow-h", "--bulma-shadow-s", "--bulma-shadow-l", "--bulma-shadow", "--bulma-family-primary", "--bulma-family-secondary", "--bulma-family-code", "--bulma-size-small", "--bulma-size-normal", "--bulma-size-medium", "--bulma-size-large", "--bulma-weight-light", "--bulma-weight-normal", "--bulma-weight-medium", "--bulma-weight-semibold", "--bulma-weight-bold", "--bulma-weight-extrabold", "--bulma-block-spacing", "--bulma-duration", "--bulma-easing", "--bulma-radius-small", "--bulma-radius", "--bulma-radius-medium", "--bulma-radius-large", "--bulma-radius-rounded", "--bulma-speed", "--bulma-arrow-color", "--bulma-loading-color", "--bulma-burger-h", "--bulma-burger-s", "--bulma-burger-l", "--bulma-burger-border-radius", "--bulma-burger-gap", "--bulma-burger-item-height", "--bulma-burger-item-width", "--bulma-body-background-color", "--bulma-body-size", "--bulma-body-min-width", "--bulma-body-rendering", "--bulma-body-family", "--bulma-body-overflow-x", "--bulma-body-overflow-y", "--bulma-body-color", "--bulma-body-font-size", "--bulma-body-weight", "--bulma-body-line-height", "--bulma-code-family", "--bulma-code-padding", "--bulma-code-weight", "--bulma-code-size", "--bulma-small-font-size", "--bulma-hr-background-color", "--bulma-hr-height", "--bulma-hr-margin", "--bulma-strong-color", "--bulma-strong-weight", "--bulma-pre-font-size", "--bulma-pre-padding", "--bulma-pre-code-font-size", "--bulma-skeleton-background", "--bulma-skeleton-radius", "--bulma-skeleton-block-min-height", "--bulma-skeleton-lines-gap", "--bulma-skeleton-line-height", "--bulma-breadcrumb-item-color", "--bulma-breadcrumb-item-hover-color", "--bulma-breadcrumb-item-active-color", "--bulma-breadcrumb-item-padding-vertical", "--bulma-breadcrumb-item-padding-horizontal", "--bulma-breadcrumb-item-separator-color", "--bulma-card-color", "--bulma-card-background-color", "--bulma-card-shadow", "--bulma-card-radius", "--bulma-card-header-background-color", "--bulma-card-header-color", "--bulma-card-header-padding", "--bulma-card-header-shadow", "--bulma-card-header-weight", "--bulma-card-content-background-color", "--bulma-card-content-padding", "--bulma-card-footer-background-color", "--bulma-card-footer-border-top", "--bulma-card-footer-padding", "--bulma-card-media-margin", "--bulma-dropdown-menu-min-width", "--bulma-dropdown-content-background-color", "--bulma-dropdown-content-offset", "--bulma-dropdown-content-padding-bottom", "--bulma-dropdown-content-padding-top", "--bulma-dropdown-content-radius", "--bulma-dropdown-content-shadow", "--bulma-dropdown-content-z", "--bulma-dropdown-item-h", "--bulma-dropdown-item-s", "--bulma-dropdown-item-l", "--bulma-dropdown-item-background-l", "--bulma-dropdown-item-background-l-delta", "--bulma-dropdown-item-hover-background-l-delta", "--bulma-dropdown-item-active-background-l-delta", "--bulma-dropdown-item-color-l", "--bulma-dropdown-item-selected-h", "--bulma-dropdown-item-selected-s", "--bulma-dropdown-item-selected-l", "--bulma-dropdown-item-selected-background-l", "--bulma-dropdown-item-selected-color-l", "--bulma-dropdown-divider-background-color", "--bulma-menu-item-h", "--bulma-menu-item-s", "--bulma-menu-item-l", "--bulma-menu-item-background-l", "--bulma-menu-item-background-l-delta", "--bulma-menu-item-hover-background-l-delta", "--bulma-menu-item-active-background-l-delta", "--bulma-menu-item-color-l", "--bulma-menu-item-radius", "--bulma-menu-item-selected-h", "--bulma-menu-item-selected-s", "--bulma-menu-item-selected-l", "--bulma-menu-item-selected-background-l", "--bulma-menu-item-selected-color-l", "--bulma-menu-list-border-left", "--bulma-menu-list-line-height", "--bulma-menu-list-link-padding", "--bulma-menu-nested-list-margin", "--bulma-menu-nested-list-padding-left", "--bulma-menu-label-color", "--bulma-menu-label-font-size", "--bulma-menu-label-letter-spacing", "--bulma-menu-label-spacing", "--bulma-message-h", "--bulma-message-s", "--bulma-message-background-l", "--bulma-message-border-l", "--bulma-message-border-l-delta", "--bulma-message-border-style", "--bulma-message-border-width", "--bulma-message-color-l", "--bulma-message-radius", "--bulma-message-header-weight", "--bulma-message-header-padding", "--bulma-message-header-radius", "--bulma-message-header-body-border-width", "--bulma-message-header-background-l", "--bulma-message-header-color-l", "--bulma-message-body-border-width", "--bulma-message-body-color", "--bulma-message-body-padding", "--bulma-message-body-radius", "--bulma-message-body-pre-code-background-color", "--bulma-modal-z", "--bulma-modal-background-background-color", "--bulma-modal-content-width", "--bulma-modal-content-margin-mobile", "--bulma-modal-content-spacing-mobile", "--bulma-modal-content-spacing-tablet", "--bulma-modal-close-dimensions", "--bulma-modal-close-right", "--bulma-modal-close-top", "--bulma-modal-card-spacing", "--bulma-modal-card-head-background-color", "--bulma-modal-card-head-padding", "--bulma-modal-card-head-radius", "--bulma-modal-card-title-color", "--bulma-modal-card-title-line-height", "--bulma-modal-card-title-size", "--bulma-modal-card-foot-background-color", "--bulma-modal-card-foot-radius", "--bulma-modal-card-body-background-color", "--bulma-modal-card-body-padding", "--bulma-navbar-h", "--bulma-navbar-s", "--bulma-navbar-l", "--bulma-navbar-background-color", "--bulma-navbar-box-shadow-size", "--bulma-navbar-box-shadow-color", "--bulma-navbar-padding-vertical", "--bulma-navbar-padding-horizontal", "--bulma-navbar-z", "--bulma-navbar-fixed-z", "--bulma-navbar-item-background-a", "--bulma-navbar-item-background-l", "--bulma-navbar-item-background-l-delta", "--bulma-navbar-item-hover-background-l-delta", "--bulma-navbar-item-active-background-l-delta", "--bulma-navbar-item-color-l", "--bulma-navbar-item-selected-h", "--bulma-navbar-item-selected-s", "--bulma-navbar-item-selected-l", "--bulma-navbar-item-selected-background-l", "--bulma-navbar-item-selected-color-l", "--bulma-navbar-item-img-max-height", "--bulma-navbar-burger-color", "--bulma-navbar-tab-hover-background-color", "--bulma-navbar-tab-hover-border-bottom-color", "--bulma-navbar-tab-active-color", "--bulma-navbar-tab-active-background-color", "--bulma-navbar-tab-active-border-bottom-color", "--bulma-navbar-tab-active-border-bottom-style", "--bulma-navbar-tab-active-border-bottom-width", "--bulma-navbar-dropdown-background-color", "--bulma-navbar-dropdown-border-l", "--bulma-navbar-dropdown-border-color", "--bulma-navbar-dropdown-border-style", "--bulma-navbar-dropdown-border-width", "--bulma-navbar-dropdown-offset", "--bulma-navbar-dropdown-arrow", "--bulma-navbar-dropdown-radius", "--bulma-navbar-dropdown-z", "--bulma-navbar-dropdown-boxed-radius", "--bulma-navbar-dropdown-boxed-shadow", "--bulma-navbar-dropdown-item-h", "--bulma-navbar-dropdown-item-s", "--bulma-navbar-dropdown-item-l", "--bulma-navbar-dropdown-item-background-l", "--bulma-navbar-dropdown-item-color-l", "--bulma-navbar-divider-background-l", "--bulma-navbar-divider-height", "--bulma-navbar-bottom-box-shadow-size", "--bulma-pagination-margin", "--bulma-pagination-min-width", "--bulma-pagination-item-h", "--bulma-pagination-item-s", "--bulma-pagination-item-l", "--bulma-pagination-item-background-l-delta", "--bulma-pagination-item-hover-background-l-delta", "--bulma-pagination-item-active-background-l-delta", "--bulma-pagination-item-border-style", "--bulma-pagination-item-border-width", "--bulma-pagination-item-border-l", "--bulma-pagination-item-border-l-delta", "--bulma-pagination-item-hover-border-l-delta", "--bulma-pagination-item-active-border-l-delta", "--bulma-pagination-item-focus-border-l-delta", "--bulma-pagination-item-color-l", "--bulma-pagination-item-font-size", "--bulma-pagination-item-margin", "--bulma-pagination-item-padding-left", "--bulma-pagination-item-padding-right", "--bulma-pagination-item-outer-shadow-h", "--bulma-pagination-item-outer-shadow-s", "--bulma-pagination-item-outer-shadow-l", "--bulma-pagination-item-outer-shadow-a", "--bulma-pagination-nav-padding-left", "--bulma-pagination-nav-padding-right", "--bulma-pagination-disabled-color", "--bulma-pagination-disabled-background-color", "--bulma-pagination-disabled-border-color", "--bulma-pagination-current-color", "--bulma-pagination-current-background-color", "--bulma-pagination-current-border-color", "--bulma-pagination-ellipsis-color", "--bulma-pagination-shadow-inset", "--bulma-pagination-selected-item-h", "--bulma-pagination-selected-item-s", "--bulma-pagination-selected-item-l", "--bulma-pagination-selected-item-background-l", "--bulma-pagination-selected-item-border-l", "--bulma-pagination-selected-item-color-l", "--bulma-panel-margin", "--bulma-panel-item-border", "--bulma-panel-radius", "--bulma-panel-shadow", "--bulma-panel-heading-line-height", "--bulma-panel-heading-padding", "--bulma-panel-heading-radius", "--bulma-panel-heading-size", "--bulma-panel-heading-weight", "--bulma-panel-tabs-font-size", "--bulma-panel-tab-border-bottom-color", "--bulma-panel-tab-border-bottom-style", "--bulma-panel-tab-border-bottom-width", "--bulma-panel-tab-active-color", "--bulma-panel-list-item-color", "--bulma-panel-list-item-hover-color", "--bulma-panel-block-color", "--bulma-panel-block-hover-background-color", "--bulma-panel-block-active-border-left-color", "--bulma-panel-block-active-color", "--bulma-panel-block-active-icon-color", "--bulma-panel-icon-color", "--bulma-tabs-border-bottom-color", "--bulma-tabs-border-bottom-style", "--bulma-tabs-border-bottom-width", "--bulma-tabs-link-color", "--bulma-tabs-link-hover-border-bottom-color", "--bulma-tabs-link-hover-color", "--bulma-tabs-link-active-border-bottom-color", "--bulma-tabs-link-active-color", "--bulma-tabs-link-padding", "--bulma-tabs-boxed-link-radius", "--bulma-tabs-boxed-link-hover-background-color", "--bulma-tabs-boxed-link-hover-border-bottom-color", "--bulma-tabs-boxed-link-active-background-color", "--bulma-tabs-boxed-link-active-border-color", "--bulma-tabs-boxed-link-active-border-bottom-color", "--bulma-tabs-toggle-link-border-color", "--bulma-tabs-toggle-link-border-style", "--bulma-tabs-toggle-link-border-width", "--bulma-tabs-toggle-link-hover-background-color", "--bulma-tabs-toggle-link-hover-border-color", "--bulma-tabs-toggle-link-radius", "--bulma-tabs-toggle-link-active-background-color", "--bulma-tabs-toggle-link-active-border-color", "--bulma-tabs-toggle-link-active-color", "--bulma-box-background-color", "--bulma-box-color", "--bulma-box-radius", "--bulma-box-shadow", "--bulma-box-padding", "--bulma-box-link-hover-shadow", "--bulma-box-link-active-shadow", "--bulma-content-heading-color", "--bulma-content-heading-weight", "--bulma-content-heading-line-height", "--bulma-content-block-margin-bottom", "--bulma-content-blockquote-background-color", "--bulma-content-blockquote-border-left", "--bulma-content-blockquote-padding", "--bulma-content-pre-padding", "--bulma-content-table-cell-border", "--bulma-content-table-cell-border-width", "--bulma-content-table-cell-padding", "--bulma-content-table-cell-heading-color", "--bulma-content-table-head-cell-border-width", "--bulma-content-table-head-cell-color", "--bulma-content-table-body-last-row-cell-border-bottom-width", "--bulma-content-table-foot-cell-border-width", "--bulma-content-table-foot-cell-color", "--bulma-delete-dimensions", "--bulma-delete-background-l", "--bulma-delete-background-alpha", "--bulma-delete-color", "--bulma-icon-dimensions", "--bulma-icon-dimensions-small", "--bulma-icon-dimensions-medium", "--bulma-icon-dimensions-large", "--bulma-icon-text-spacing", "--bulma-notification-h", "--bulma-notification-s", "--bulma-notification-background-l", "--bulma-notification-color-l", "--bulma-notification-code-background-color", "--bulma-notification-radius", "--bulma-notification-padding", "--bulma-progress-border-radius", "--bulma-progress-bar-background-color", "--bulma-progress-value-background-color", "--bulma-progress-indeterminate-duration", "--bulma-table-color", "--bulma-table-background-color", "--bulma-table-cell-border-color", "--bulma-table-cell-border-style", "--bulma-table-cell-border-width", "--bulma-table-cell-padding", "--bulma-table-cell-heading-color", "--bulma-table-cell-text-align", "--bulma-table-head-cell-border-width", "--bulma-table-head-cell-color", "--bulma-table-foot-cell-border-width", "--bulma-table-foot-cell-color", "--bulma-table-head-background-color", "--bulma-table-body-background-color", "--bulma-table-foot-background-color", "--bulma-table-row-hover-background-color", "--bulma-table-row-active-background-color", "--bulma-table-row-active-color", "--bulma-table-striped-row-even-background-color", "--bulma-table-striped-row-even-hover-background-color", "--bulma-tag-h", "--bulma-tag-s", "--bulma-tag-background-l", "--bulma-tag-background-l-delta", "--bulma-tag-hover-background-l-delta", "--bulma-tag-active-background-l-delta", "--bulma-tag-color-l", "--bulma-tag-radius", "--bulma-tag-delete-margin", "--bulma-title-color", "--bulma-title-family", "--bulma-title-size", "--bulma-title-weight", "--bulma-title-line-height", "--bulma-title-strong-color", "--bulma-title-strong-weight", "--bulma-title-sub-size", "--bulma-title-sup-size", "--bulma-subtitle-color", "--bulma-subtitle-family", "--bulma-subtitle-size", "--bulma-subtitle-weight", "--bulma-subtitle-line-height", "--bulma-subtitle-strong-color", "--bulma-subtitle-strong-weight", "--bulma-control-radius", "--bulma-control-radius-small", "--bulma-control-border-width", "--bulma-control-height", "--bulma-control-line-height", "--bulma-control-padding-vertical", "--bulma-control-padding-horizontal", "--bulma-control-size", "--bulma-control-focus-shadow-l", "--bulma-file-radius", "--bulma-file-name-border-color", "--bulma-file-name-border-style", "--bulma-file-name-border-width", "--bulma-file-name-max-width", "--bulma-file-h", "--bulma-file-s", "--bulma-file-background-l", "--bulma-file-background-l-delta", "--bulma-file-hover-background-l-delta", "--bulma-file-active-background-l-delta", "--bulma-file-border-l", "--bulma-file-border-l-delta", "--bulma-file-hover-border-l-delta", "--bulma-file-active-border-l-delta", "--bulma-file-cta-color-l", "--bulma-file-name-color-l", "--bulma-file-color-l-delta", "--bulma-file-hover-color-l-delta", "--bulma-file-active-color-l-delta", "--bulma-input-h", "--bulma-input-s", "--bulma-input-l", "--bulma-input-border-style", "--bulma-input-border-l", "--bulma-input-border-l-delta", "--bulma-input-hover-border-l-delta", "--bulma-input-active-border-l-delta", "--bulma-input-focus-h", "--bulma-input-focus-s", "--bulma-input-focus-l", "--bulma-input-focus-shadow-size", "--bulma-input-focus-shadow-alpha", "--bulma-input-color-l", "--bulma-input-background-l", "--bulma-input-background-l-delta", "--bulma-input-height", "--bulma-input-shadow", "--bulma-input-placeholder-color", "--bulma-input-disabled-color", "--bulma-input-disabled-background-color", "--bulma-input-disabled-border-color", "--bulma-input-disabled-placeholder-color", "--bulma-input-arrow", "--bulma-input-icon-color", "--bulma-input-icon-hover-color", "--bulma-input-icon-focus-color", "--bulma-input-radius", "--bulma-column-gap", "--bulma-grid-gap", "--bulma-grid-column-count", "--bulma-grid-column-min", "--bulma-grid-cell-column-span", "--bulma-grid-cell-column-start", "--bulma-footer-background-color", "--bulma-footer-color", "--bulma-footer-padding", "--bulma-hero-body-padding", "--bulma-hero-body-padding-tablet", "--bulma-hero-body-padding-small", "--bulma-hero-body-padding-medium", "--bulma-hero-body-padding-large", "--bulma-media-border-color", "--bulma-media-border-size", "--bulma-media-spacing", "--bulma-media-spacing-large", "--bulma-media-content-spacing", "--bulma-media-level-1-spacing", "--bulma-media-level-1-content-spacing", "--bulma-media-level-2-spacing", "--bulma-section-padding", "--bulma-section-padding-desktop", "--bulma-section-padding-medium", "--bulma-section-padding-large"];
5
5
  /** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */
6
6
  type BulmaVarKey = (typeof bulmaCssVars)[number];
@@ -90,6 +90,22 @@ export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroun
90
90
  * it is on every other component.
91
91
  */
92
92
  radius?: (typeof validRadii)[number];
93
+ /**
94
+ * Column gap helper, as on every other component: a gap step adds
95
+ * `is-column-gap-<step>` to the wrapper div, which spaces the wrapper's own
96
+ * children when it is a flex or grid container. Under `isRoot` there is no
97
+ * wrapper, so it does nothing, and says so in development.
98
+ *
99
+ * It does not set `--bulma-column-gap`, the variable `Columns` reads for
100
+ * its gutters; set that through `bulmaVars`
101
+ * (`bulmaVars={{ '--bulma-column-gap': '1rem' }}`). Before `columnGap` was
102
+ * a helper prop, untyped JavaScript could pass it to Theme as that
103
+ * variable. A string that is not a gap step (`'1rem'`) still sets it, but
104
+ * that route is deprecated and logs a warning in development. A gap step
105
+ * does not: `columnGap="0"` used to zero the gutters inside the Theme, and
106
+ * now adds `is-column-gap-0` to the wrapper instead.
107
+ */
108
+ columnGap?: BulmaGapStep;
93
109
  schemeH?: string;
94
110
  schemeS?: string;
95
111
  lightL?: string;
@@ -22,6 +22,24 @@ export declare const validSchemeColors: readonly ["scheme-main", "scheme-main-bi
22
22
  * @example '0', '1', 'auto'
23
23
  */
24
24
  export declare const validSizes: readonly ["0", "1", "2", "3", "4", "5", "6", "auto"];
25
+ /**
26
+ * Valid Bulma gap steps, taken by `gap`, `columnGap` and `rowGap`. Each whole
27
+ * step is 0.5rem, so `2` is 1rem and `8` is 4rem, and the half steps sit
28
+ * between them. They render `is-gap-<value>`, `is-column-gap-<value>` and
29
+ * `is-row-gap-<value>`.
30
+ *
31
+ * This is a different scale from `validSizes`: `gap="2"` is 1rem where
32
+ * `m="2"` is 0.5rem.
33
+ * @example '0', '0.5', '2', '8'
34
+ */
35
+ export declare const validGaps: readonly ["0", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7", "7.5", "8"];
36
+ /**
37
+ * A gap step as `gap`, `columnGap` and `rowGap` take it: a value from
38
+ * `validGaps`, or the same step written as a number (`gap={2}`,
39
+ * `gap={1.5}`). `Grid` took its gaps as numbers before the gap helpers were
40
+ * shared, so every gap prop still does.
41
+ */
42
+ export type BulmaGapStep = '0' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '4.5' | '5' | '5.5' | '6' | '6.5' | '7' | '7.5' | '8' | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5 | 5.5 | 6 | 6.5 | 7 | 7.5 | 8;
25
43
  /**
26
44
  * Valid Bulma text size classes.
27
45
  * @example '1', '2', '3'
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties } from 'react';
2
- import { BulmaDisplayProps, BulmaViewportProps } from './bulmaClassHelpers.js';
2
+ import { BulmaDisplayProps, BulmaViewportProps, type BulmaGapStep } from './bulmaClassHelpers.js';
3
3
  import { BulmaColorProps, BulmaColorPropsWithScheme } from './useColorClasses.js';
4
4
  import { BulmaSpacingProps } from './useSpacingClasses.js';
5
5
  import { BulmaTypographyProps } from './useTypographyClasses.js';
@@ -50,8 +50,8 @@ export declare const useBulmaClasses: <T extends object>(props: BulmaClassesProp
50
50
  bulmaHelperStyles?: CSSProperties;
51
51
  rest: Omit<T, keyof BulmaClassesProps>;
52
52
  };
53
- export { validColors, validColorShades, validSchemeColors, validSizes, validTextSizes, validAlignments, validTextTransforms, validTextWeights, validFontFamilies, validDisplays, validVisibilities, validFlexDirections, validFlexWraps, validJustifyContents, validAlignContents, validAlignItems, validAlignSelfs, validFlexGrowShrink, validViewports, validFloats, validOverflows, validAxisOverflows, validInteractions, validCursors, validRadii, validShadows, validResponsives, validPositions, validAspectRatios, } from './bulmaClassHelpers.js';
54
- export type { BulmaViewportProps, BulmaDisplayProps };
53
+ export { validColors, validColorShades, validSchemeColors, validSizes, validGaps, validTextSizes, validAlignments, validTextTransforms, validTextWeights, validFontFamilies, validDisplays, validVisibilities, validFlexDirections, validFlexWraps, validJustifyContents, validAlignContents, validAlignItems, validAlignSelfs, validFlexGrowShrink, validViewports, validFloats, validOverflows, validAxisOverflows, validInteractions, validCursors, validRadii, validShadows, validResponsives, validPositions, validAspectRatios, } from './bulmaClassHelpers.js';
54
+ export type { BulmaViewportProps, BulmaDisplayProps, BulmaGapStep };
55
55
  export * from './useColorClasses.js';
56
56
  export * from './useSpacingClasses.js';
57
57
  export * from './useTypographyClasses.js';
@@ -1,6 +1,6 @@
1
- import { validSizes } from './bulmaClassHelpers.js';
1
+ import { validSizes, type BulmaGapStep } from './bulmaClassHelpers.js';
2
2
  /**
3
- * Props for applying Bulma margin and padding helper classes.
3
+ * Props for applying Bulma margin, padding and gap helper classes.
4
4
  */
5
5
  export interface BulmaSpacingProps {
6
6
  /** Margin (e.g., '0', '1'). */
@@ -31,9 +31,40 @@ export interface BulmaSpacingProps {
31
31
  px?: (typeof validSizes)[number];
32
32
  /** Padding vertical (top and bottom). */
33
33
  py?: (typeof validSizes)[number];
34
+ /**
35
+ * Space between the children of a flex or grid container (`is-gap-<value>`),
36
+ * on Bulma's gap scale: each whole step is 0.5rem, so `gap="2"` is 1rem, with
37
+ * half steps such as `"1.5"` between them. Also takes the step as a number.
38
+ *
39
+ * It sets the CSS `gap`, which does nothing unless the element lays its
40
+ * children out as flex or grid, so pair it with `display="flex"` on most
41
+ * components. The scale is not the margin scale: `m="2"` is 0.5rem.
42
+ *
43
+ * `Grid` and `Columns` declare their own `gap`. `Grid`'s renders the same
44
+ * class; `Columns`' is the columns gutter (`is-<value>`) and takes whole
45
+ * steps only.
46
+ */
47
+ gap?: BulmaGapStep;
48
+ /**
49
+ * Space between columns only (`is-column-gap-<value>`), on the same scale as
50
+ * `gap`. Beside `gap` or `gapless`, it wins on its own axis.
51
+ */
52
+ columnGap?: BulmaGapStep;
53
+ /**
54
+ * Space between rows only (`is-row-gap-<value>`), on the same scale as
55
+ * `gap`. Beside `gap` or `gapless`, it wins on its own axis.
56
+ */
57
+ rowGap?: BulmaGapStep;
58
+ /**
59
+ * Removes the gap between children (`is-gapless`), the shortcut for
60
+ * `gap="0"`; a valid `gap` wins when both are set. `Columns` is the
61
+ * exception: its `gap` is its gutter, and there `gapless` is Bulma's gapless
62
+ * columns modifier, the same as `isGapless`.
63
+ */
64
+ gapless?: boolean;
34
65
  }
35
66
  /**
36
- * A hook that generates Bulma margin and padding helper classes.
67
+ * A hook that generates Bulma margin, padding and gap helper classes.
37
68
  *
38
69
  * @function useSpacingClasses
39
70
  * @param props - Spacing-related Bulma helper props.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allxsmith/bestax-bulma",
3
- "version": "5.24.0",
3
+ "version": "5.26.0",
4
4
  "description": "A fully-typed React component library for the Bulma CSS framework. Build modern UIs quickly with reusable, accessible, and customizable Bulma-based React components.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.esm.js",