@allxsmith/bestax-bulma 5.18.0 → 5.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/extras.css +1 -1
  4. package/dist/extras.css.map +1 -1
  5. package/dist/index.cjs +551 -124
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.esm.js +551 -124
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/types/components/Avatar.d.ts +17 -3
  10. package/dist/types/components/Dropdown.d.ts +7 -2
  11. package/dist/types/components/Menu.d.ts +6 -1
  12. package/dist/types/components/Toast.d.ts +15 -4
  13. package/dist/types/elements/Notification.d.ts +16 -6
  14. package/dist/types/form/Checkbox.d.ts +26 -2
  15. package/dist/types/form/DateTimeInputBase.d.ts +6 -1
  16. package/dist/types/form/Radio.d.ts +28 -2
  17. package/dist/types/form/Switch.d.ts +26 -2
  18. package/dist/types/form/TimeInputBase.d.ts +5 -1
  19. package/dist/types/helpers/Theme.d.ts +27 -1
  20. package/dist/types/helpers/buttonType.d.ts +19 -0
  21. package/dist/types/helpers/colorDeprecations.d.ts +4 -1
  22. package/dist/types/helpers/devWarnings.d.ts +8 -0
  23. package/dist/types/helpers/positionStacks.d.ts +33 -0
  24. package/dist/types-cjs/components/Avatar.d.ts +17 -3
  25. package/dist/types-cjs/components/Dropdown.d.ts +7 -2
  26. package/dist/types-cjs/components/Menu.d.ts +6 -1
  27. package/dist/types-cjs/components/Toast.d.ts +15 -4
  28. package/dist/types-cjs/elements/Notification.d.ts +16 -6
  29. package/dist/types-cjs/form/Checkbox.d.ts +26 -2
  30. package/dist/types-cjs/form/DateTimeInputBase.d.ts +6 -1
  31. package/dist/types-cjs/form/Radio.d.ts +28 -2
  32. package/dist/types-cjs/form/Switch.d.ts +26 -2
  33. package/dist/types-cjs/form/TimeInputBase.d.ts +5 -1
  34. package/dist/types-cjs/helpers/Theme.d.ts +27 -1
  35. package/dist/types-cjs/helpers/buttonType.d.ts +19 -0
  36. package/dist/types-cjs/helpers/colorDeprecations.d.ts +4 -1
  37. package/dist/types-cjs/helpers/devWarnings.d.ts +8 -0
  38. package/dist/types-cjs/helpers/positionStacks.d.ts +33 -0
  39. package/dist/versions/bestax-no-dark-mode.css +1 -1
  40. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  41. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  42. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  43. package/dist/versions/bestax-no-helpers.css +1 -1
  44. package/dist/versions/bestax-no-helpers.css.map +1 -1
  45. package/dist/versions/bestax-prefixed.css +1 -1
  46. package/dist/versions/bestax-prefixed.css.map +1 -1
  47. package/package.json +1 -1
  48. package/src/scss/form/_timeinput.scss +42 -14
@@ -59,11 +59,14 @@ export interface NotificationOptions {
59
59
  /** Duration in ms before auto-close. Default 3000. */
60
60
  duration?: number;
61
61
  /**
62
- * Position on the screen. Currently ignored: `NotificationContainer`'s own
63
- * `position` places every notification it shows, so set it there.
62
+ * Position on the screen. A notification shown without one goes to
63
+ * `NotificationContainer`'s `position`.
64
64
  */
65
65
  position?: NotificationPosition;
66
- /** When true, notifications enter a FIFO queue and display one at a time. Default false. */
66
+ /**
67
+ * When true, notifications enter a FIFO queue and display one at a time,
68
+ * one queue across every `position`. Default false.
69
+ */
67
70
  queue?: boolean;
68
71
  /** Show a delete (close) button. Default true. */
69
72
  hasDelete?: boolean;
@@ -139,15 +142,22 @@ export declare const notification: {
139
142
  };
140
143
  /**
141
144
  * Container component for rendering programmatic notifications.
142
- * Place once at your app root to enable the notification API. Mount it
143
- * before calling `notification`: a notification shown while no container is
144
- * mounted doesn't appear when one mounts, only alongside the next call.
145
+ * Place once at your app root to enable the notification API. A notification
146
+ * shown with a `position` appears there, and one shown without goes to the
147
+ * container's `position`, so the container renders a stack for each position
148
+ * in use.
145
149
  *
146
150
  * @function
147
151
  * @param {{ position?: NotificationPosition }} props - Container props.
148
152
  * @returns {JSX.Element | null} The rendered notification container, or null if empty.
149
153
  */
150
154
  export declare const NotificationContainer: React.FC<{
155
+ /**
156
+ * Where a notification shown without a `position` of its own appears.
157
+ * Default: 'top-right'. When it changes, those notifications move without
158
+ * remounting, but one shown with its own `position` equal to the old or new
159
+ * value remounts and starts over as if it had just been shown.
160
+ */
151
161
  position?: NotificationPosition;
152
162
  }>;
153
163
  export {};
@@ -1,11 +1,35 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
3
  /**
4
- * Valid colors for the Checkbox component.
4
+ * The values the Checkbox `color` prop accepts, as a readonly tuple.
5
+ *
6
+ * `CheckboxProps['color']` is typed from it, so the two list the same values.
7
+ * Map over it to build a color picker, or check a value that arrives at
8
+ * runtime before passing it in: the component adds no color class for a value
9
+ * outside the tuple.
10
+ *
11
+ * @example
12
+ * import { Checkbox, checkboxColors } from '@allxsmith/bestax-bulma';
13
+ *
14
+ * checkboxColors.map(color => (
15
+ * <Checkbox key={color} color={color}>
16
+ * {color}
17
+ * </Checkbox>
18
+ * ));
5
19
  */
6
20
  export declare const checkboxColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
21
  /**
8
- * Valid sizes for the Checkbox component.
22
+ * The values the Checkbox `size` prop accepts, as a readonly tuple.
23
+ *
24
+ * `CheckboxProps['size']` is typed from it, so the two list the same values.
25
+ * Use it to offer a size choice or to check a value that arrives at runtime:
26
+ * the component adds no size class for a value outside the tuple. These are
27
+ * element sizes, not the spacing scale in `validSizes`.
28
+ *
29
+ * @example
30
+ * import { checkboxSizes } from '@allxsmith/bestax-bulma';
31
+ *
32
+ * type CheckboxSize = (typeof checkboxSizes)[number];
9
33
  */
10
34
  export declare const checkboxSizes: readonly ["small", "normal", "medium", "large"];
11
35
  /**
@@ -53,7 +53,12 @@ export interface DateTimeInputBaseProps extends Omit<React.InputHTMLAttributes<H
53
53
  position?: PickerPosition;
54
54
  /** Render the popover into `document.body` via portal. */
55
55
  appendToBody?: boolean;
56
- /** Bulma color modifier. */
56
+ /**
57
+ * Bulma color modifier for the input, also carried by the time wheels, where
58
+ * it colors the selection band and the keyboard focus ring. Unset, the
59
+ * wheels use `--bulma-timeinput-wheel-selected-bg`, which defaults to
60
+ * `primary`. The calendar does not take it.
61
+ */
57
62
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
58
63
  /** Size variant. */
59
64
  size?: 'small' | 'medium' | 'large';
@@ -1,11 +1,37 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
3
  /**
4
- * Valid colors for the Radio component.
4
+ * The values the Radio `color` prop accepts, as a readonly tuple.
5
+ *
6
+ * `RadioProps['color']` is typed from it, so the two list the same values.
7
+ * Map over it to build a color picker, or check a value that arrives at
8
+ * runtime before passing it in: the component adds no color class for a value
9
+ * outside the tuple.
10
+ *
11
+ * @example
12
+ * import { Radio, Radios, radioColors } from '@allxsmith/bestax-bulma';
13
+ *
14
+ * <Radios name="accent" defaultValue="primary">
15
+ * {radioColors.map(color => (
16
+ * <Radio key={color} value={color} color={color}>
17
+ * {color}
18
+ * </Radio>
19
+ * ))}
20
+ * </Radios>;
5
21
  */
6
22
  export declare const radioColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
23
  /**
8
- * Valid sizes for the Radio component.
24
+ * The values the Radio `size` prop accepts, as a readonly tuple.
25
+ *
26
+ * `RadioProps['size']` is typed from it, so the two list the same values. Use
27
+ * it to offer a size choice or to check a value that arrives at runtime: the
28
+ * component adds no size class for a value outside the tuple. These are
29
+ * element sizes, not the spacing scale in `validSizes`.
30
+ *
31
+ * @example
32
+ * import { radioSizes } from '@allxsmith/bestax-bulma';
33
+ *
34
+ * type RadioSize = (typeof radioSizes)[number];
9
35
  */
10
36
  export declare const radioSizes: readonly ["small", "normal", "medium", "large"];
11
37
  /**
@@ -1,11 +1,35 @@
1
1
  import React from 'react';
2
2
  import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
3
3
  /**
4
- * Valid colors for the Switch component.
4
+ * The values the Switch `color` and `passiveType` props accept, as a readonly
5
+ * tuple.
6
+ *
7
+ * Both props are typed from it, so they list the same values. Map over it to
8
+ * build a color picker, or check a value that arrives at runtime before
9
+ * passing it in: the component adds no class for a value outside the tuple.
10
+ *
11
+ * @example
12
+ * import { Switch, switchColors } from '@allxsmith/bestax-bulma';
13
+ *
14
+ * switchColors.map(color => (
15
+ * <Switch key={color} color={color} defaultChecked>
16
+ * {color}
17
+ * </Switch>
18
+ * ));
5
19
  */
6
20
  export declare const switchColors: readonly ["primary", "link", "info", "success", "warning", "danger"];
7
21
  /**
8
- * Valid sizes for the Switch component.
22
+ * The values the Switch `size` prop accepts, as a readonly tuple.
23
+ *
24
+ * `SwitchProps['size']` is typed from it, so the two list the same values. Use
25
+ * it to offer a size choice or to check a value that arrives at runtime: the
26
+ * component adds no size class for a value outside the tuple. These are
27
+ * element sizes, not the spacing scale in `validSizes`.
28
+ *
29
+ * @example
30
+ * import { switchSizes } from '@allxsmith/bestax-bulma';
31
+ *
32
+ * type SwitchSize = (typeof switchSizes)[number];
9
33
  */
10
34
  export declare const switchSizes: readonly ["small", "normal", "medium", "large"];
11
35
  /**
@@ -52,7 +52,11 @@ export interface TimeInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLI
52
52
  position?: PickerPosition;
53
53
  /** Render the popover into `document.body` via portal. */
54
54
  appendToBody?: boolean;
55
- /** Bulma color modifier. */
55
+ /**
56
+ * Bulma color modifier for the input, also carried by the wheels, where it
57
+ * colors the selection band and the keyboard focus ring. Unset, the wheels
58
+ * use `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.
59
+ */
56
60
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
57
61
  /** Size variant. */
58
62
  size?: 'small' | 'medium' | 'large';
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { BulmaClassesProps } from './useBulmaClasses.js';
3
+ import { validRadii } from './bulmaClassHelpers.js';
3
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"];
4
5
  /** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */
5
6
  type BulmaVarKey = (typeof bulmaCssVars)[number];
@@ -10,7 +11,6 @@ type BulmaVars = Partial<Record<BulmaVarKey, string>>;
10
11
  *
11
12
  * @property {React.ReactNode} children - Content to render inside the theme scope.
12
13
  * @property {string} [className] - Additional CSS classes (only when isRoot is false).
13
- * @property {boolean} [isRoot] - Inject CSS variables globally at :root level. Default: false.
14
14
  * @property {'light' | 'dark' | 'system'} [colorMode] - Set Bulma's light/dark scheme by writing
15
15
  * the `data-theme` attribute on the document root (`<html>`). This is always global, even on a
16
16
  * scoped Theme. `'system'` removes the attribute so Bulma follows the OS `prefers-color-scheme`.
@@ -56,9 +56,35 @@ type BulmaVars = Partial<Record<BulmaVarKey, string>>;
56
56
  export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
57
57
  children: ReactNode;
58
58
  className?: string;
59
+ /**
60
+ * Inject the variables globally at `:root` instead of scoping them to a
61
+ * wrapper div. Default: false.
62
+ *
63
+ * Several root Themes can be mounted at once, and each contributes its own
64
+ * variables. Where two set the same one, the inner or later-mounted Theme
65
+ * wins, as with nested scoped Themes, and unmounting a Theme removes only
66
+ * what it contributed. The variables are written from an effect, so a
67
+ * server render does not include them.
68
+ */
59
69
  isRoot?: boolean;
60
70
  colorMode?: 'light' | 'dark' | 'system';
61
71
  bulmaVars?: BulmaVars;
72
+ /**
73
+ * Border radius helper, as on every other component: `radiusless` adds
74
+ * `is-radiusless` to the wrapper div. On a Theme it also sets
75
+ * `--bulma-radius` to 0, so what is inside the Theme loses its radius too.
76
+ * Under `isRoot` there is no wrapper for the class, and the variable is
77
+ * written at `:root`, which squares everything on the page that takes its
78
+ * radius from it.
79
+ *
80
+ * For any other radius, set the variable through `bulmaVars`
81
+ * (`bulmaVars={{ '--bulma-radius': '6px' }}`). This prop used to write the
82
+ * variable for every value, so any other non-empty string still does, but
83
+ * that route is deprecated and logs a warning in development. A number or
84
+ * a boolean never produced a usable radius that way, and is now ignored as
85
+ * it is on every other component.
86
+ */
87
+ radius?: (typeof validRadii)[number];
62
88
  schemeH?: string;
63
89
  schemeS?: string;
64
90
  lightL?: string;
@@ -0,0 +1,19 @@
1
+ import type React from 'react';
2
+ /** The values HTML defines for a `<button>`'s `type`. */
3
+ export type ButtonType = NonNullable<React.ButtonHTMLAttributes<HTMLButtonElement>['type']>;
4
+ /**
5
+ * The `type` to render on a `<button>` a component defaults to `button`: the
6
+ * caller's own value when it is `button`, `submit` or `reset`, and `button`
7
+ * otherwise.
8
+ *
9
+ * A missing `type` is not the only way a button ends up submitting the form
10
+ * around it. HTML reads an invalid value, such as the anchor's MIME-type
11
+ * `type="text/html"`, as submit too, and a props spread carrying
12
+ * `type: undefined` removes the attribute outright. Both can arrive through a
13
+ * spread or an untyped caller the component's own types never see, so this
14
+ * checks the value rather than trusting where it came from.
15
+ *
16
+ * Call it AFTER the forwarded props are spread and pass it the forwarded
17
+ * `type`, so its result is the attribute that renders.
18
+ */
19
+ export declare function buttonType(given: unknown): ButtonType;
@@ -5,7 +5,10 @@
5
5
  * component-modifier form is dead.
6
6
  */
7
7
  export declare const UNSTYLED_MODIFIER_COLORS: readonly ["black-bis", "black-ter", "white-bis", "white-ter", "grey-darker", "grey-dark", "grey", "grey-light", "grey-lighter"];
8
- /** Test-only: re-arm the warn-once registry. */
8
+ /**
9
+ * Test-only: re-arm the warn-once registry. The registry lives in
10
+ * `devWarnings`, shared with the other dev warnings, so this re-arms those too.
11
+ */
9
12
  export declare const resetColorDeprecationWarnings: () => void;
10
13
  /**
11
14
  * Dev warning for a `color` value whose `is-<color>` modifier has no shipped
@@ -0,0 +1,8 @@
1
+ /** Test-only: re-arm the warn-once registry. */
2
+ export declare const resetDevWarnings: () => void;
3
+ /**
4
+ * Logs a console warning in development, once per `key` for the life of the
5
+ * page. Safe to call during render: a re-render, or a second instance hitting
6
+ * the same case, finds the key already recorded and stays quiet.
7
+ */
8
+ export declare const warnOnce: (key: string, message: string) => void;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The items a programmatic container shows at one place on the screen.
3
+ */
4
+ export interface PositionStack<Item, Position extends string> {
5
+ /**
6
+ * A React key for the stack. The stack at the container's own position
7
+ * keeps the same key whatever that position is, so changing the container's
8
+ * `position` moves the items in it instead of remounting them.
9
+ */
10
+ key: string;
11
+ /** Where on the screen the stack sits. */
12
+ position: Position;
13
+ /** The items at that position, in the order they were shown. */
14
+ items: Item[];
15
+ }
16
+ /**
17
+ * Splits the items a container shows into one stack per position in use. An
18
+ * item goes to its own position when it has one and to the container's
19
+ * otherwise. A position with no items gets no stack.
20
+ *
21
+ * Stacks come back in `order`, so their order in the page follows the screen
22
+ * rather than which position happened to be used first, and a stack keeps its
23
+ * place while the others come and go. A position missing from `order` sorts
24
+ * after the known ones.
25
+ *
26
+ * @function groupIntoPositionStacks
27
+ * @param items - The items the container shows, in the order they were shown.
28
+ * @param positionOf - Reads an item's own position, if it has one.
29
+ * @param containerPosition - Where an item without a position of its own goes.
30
+ * @param order - Every known position, in the order stacks should render.
31
+ * @returns One stack per position in use.
32
+ */
33
+ export declare function groupIntoPositionStacks<Item, Position extends string>(items: readonly Item[], positionOf: (item: Item) => Position | undefined, containerPosition: Position, order: readonly Position[]): PositionStack<Item, Position>[];