@allxsmith/bestax-bulma 5.18.2 → 5.20.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.
Files changed (94) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/constants.cjs +67 -6
  4. package/dist/constants.cjs.map +1 -1
  5. package/dist/constants.d.cts +30 -6
  6. package/dist/constants.esm.js +65 -7
  7. package/dist/constants.esm.js.map +1 -1
  8. package/dist/extras.css +1 -1
  9. package/dist/extras.css.map +1 -1
  10. package/dist/index.cjs +628 -52
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.esm.js +625 -53
  13. package/dist/index.esm.js.map +1 -1
  14. package/dist/types/components/Card.d.ts +2 -0
  15. package/dist/types/components/Carousel.d.ts +8 -2
  16. package/dist/types/components/Modal.d.ts +2 -0
  17. package/dist/types/components/Navbar.d.ts +24 -3
  18. package/dist/types/components/Sidebar.d.ts +2 -0
  19. package/dist/types/components/Steps.d.ts +5 -1
  20. package/dist/types/elements/Button.d.ts +5 -1
  21. package/dist/types/elements/Delete.d.ts +9 -1
  22. package/dist/types/elements/Link.d.ts +7 -1
  23. package/dist/types/elements/Loader.d.ts +39 -0
  24. package/dist/types/elements/Notification.d.ts +29 -3
  25. package/dist/types/elements/Tag.d.ts +7 -1
  26. package/dist/types/elements/Td.d.ts +21 -2
  27. package/dist/types/form/Autocomplete.d.ts +5 -1
  28. package/dist/types/form/Control.d.ts +5 -1
  29. package/dist/types/form/DateInput.d.ts +5 -1
  30. package/dist/types/form/DateInputBase.d.ts +9 -1
  31. package/dist/types/form/DateTimeInput.d.ts +5 -1
  32. package/dist/types/form/DateTimeInputBase.d.ts +11 -4
  33. package/dist/types/form/Input.d.ts +5 -1
  34. package/dist/types/form/Numberinput.d.ts +5 -1
  35. package/dist/types/form/Select.d.ts +5 -1
  36. package/dist/types/form/SelectBase.d.ts +5 -1
  37. package/dist/types/form/Taginput.d.ts +5 -1
  38. package/dist/types/form/TextArea.d.ts +5 -1
  39. package/dist/types/form/TimeInput.d.ts +5 -1
  40. package/dist/types/form/TimeInputBase.d.ts +4 -2
  41. package/dist/types/helpers/Theme.d.ts +6 -1
  42. package/dist/types/helpers/bulmaClassHelpers.d.ts +30 -6
  43. package/dist/types/helpers/shadowDom.d.ts +54 -0
  44. package/dist/types/helpers/statusRegion.d.ts +61 -0
  45. package/dist/types/helpers/useBulmaClasses.d.ts +1 -1
  46. package/dist/types/helpers/useOtherClasses.d.ts +61 -5
  47. package/dist/types/index.d.ts +1 -0
  48. package/dist/types-cjs/components/Card.d.ts +2 -0
  49. package/dist/types-cjs/components/Carousel.d.ts +8 -2
  50. package/dist/types-cjs/components/Modal.d.ts +2 -0
  51. package/dist/types-cjs/components/Navbar.d.ts +24 -3
  52. package/dist/types-cjs/components/Sidebar.d.ts +2 -0
  53. package/dist/types-cjs/components/Steps.d.ts +5 -1
  54. package/dist/types-cjs/elements/Button.d.ts +5 -1
  55. package/dist/types-cjs/elements/Delete.d.ts +9 -1
  56. package/dist/types-cjs/elements/Link.d.ts +7 -1
  57. package/dist/types-cjs/elements/Loader.d.ts +39 -0
  58. package/dist/types-cjs/elements/Notification.d.ts +29 -3
  59. package/dist/types-cjs/elements/Tag.d.ts +7 -1
  60. package/dist/types-cjs/elements/Td.d.ts +21 -2
  61. package/dist/types-cjs/form/Autocomplete.d.ts +5 -1
  62. package/dist/types-cjs/form/Control.d.ts +5 -1
  63. package/dist/types-cjs/form/DateInput.d.ts +5 -1
  64. package/dist/types-cjs/form/DateInputBase.d.ts +9 -1
  65. package/dist/types-cjs/form/DateTimeInput.d.ts +5 -1
  66. package/dist/types-cjs/form/DateTimeInputBase.d.ts +11 -4
  67. package/dist/types-cjs/form/Input.d.ts +5 -1
  68. package/dist/types-cjs/form/Numberinput.d.ts +5 -1
  69. package/dist/types-cjs/form/Select.d.ts +5 -1
  70. package/dist/types-cjs/form/SelectBase.d.ts +5 -1
  71. package/dist/types-cjs/form/Taginput.d.ts +5 -1
  72. package/dist/types-cjs/form/TextArea.d.ts +5 -1
  73. package/dist/types-cjs/form/TimeInput.d.ts +5 -1
  74. package/dist/types-cjs/form/TimeInputBase.d.ts +4 -2
  75. package/dist/types-cjs/helpers/Theme.d.ts +6 -1
  76. package/dist/types-cjs/helpers/bulmaClassHelpers.d.ts +30 -6
  77. package/dist/types-cjs/helpers/shadowDom.d.ts +54 -0
  78. package/dist/types-cjs/helpers/statusRegion.d.ts +61 -0
  79. package/dist/types-cjs/helpers/useBulmaClasses.d.ts +1 -1
  80. package/dist/types-cjs/helpers/useOtherClasses.d.ts +61 -5
  81. package/dist/types-cjs/index.d.ts +1 -0
  82. package/dist/versions/bestax-no-dark-mode.css +1 -1
  83. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  84. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  85. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  86. package/dist/versions/bestax-no-helpers.css +1 -1
  87. package/dist/versions/bestax-no-helpers.css.map +1 -1
  88. package/dist/versions/bestax-prefixed.css +1 -1
  89. package/dist/versions/bestax-prefixed.css.map +1 -1
  90. package/package.json +1 -1
  91. package/src/scss/elements/_index.scss +1 -0
  92. package/src/scss/elements/_loader.scss +23 -0
  93. package/src/scss/form/_dateinput.scss +36 -10
  94. package/src/scss/form/_timeinput.scss +30 -9
@@ -54,10 +54,17 @@ export interface DateTimeInputBaseProps extends Omit<React.InputHTMLAttributes<H
54
54
  /** Render the popover into `document.body` via portal. */
55
55
  appendToBody?: boolean;
56
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.
57
+ * Bulma color modifier for the input, also carried by the calendar and the
58
+ * time wheels, where it colors the selected date and the selection band.
59
+ * Today's date and the calendar's keyboard focus ring take the color's
60
+ * `-on-scheme` variant, which Bulma adjusts to contrast with the background,
61
+ * so pale colors stay readable; that makes `'primary'` a shade off the unset
62
+ * calendar, which uses plain `primary` for them. A focused wheel's ring is
63
+ * drawn inside the band in the color's `-invert`, like the selected value,
64
+ * so it shows on the fill. Unset, they use their
65
+ * `--bulma-dateinput-*` and `--bulma-timeinput-wheel-*` variables, which
66
+ * follow `primary` by default. The footer's time pill and Done button stay
67
+ * `primary` either way.
61
68
  */
62
69
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
63
70
  /** Size variant. */
@@ -34,7 +34,11 @@ export interface InputProps extends InputBaseProps {
34
34
  hasIconsLeft?: boolean;
35
35
  /** Force right icon container. */
36
36
  hasIconsRight?: boolean;
37
- /** Shows loading indicator. */
37
+ /**
38
+ * Shows a loading spinner on the wrapping Control.
39
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
40
+ * drawn (with bestax's CSS loaded).
41
+ */
38
42
  isLoading?: boolean;
39
43
  /** Expand the control. */
40
44
  isExpanded?: boolean;
@@ -53,7 +53,11 @@ export interface NumberinputProps extends Omit<React.InputHTMLAttributes<HTMLInp
53
53
  disabled?: boolean;
54
54
  /** Whether the input can be typed in. */
55
55
  editable?: boolean;
56
- /** Shows a loading state. */
56
+ /**
57
+ * Shows a loading spinner on the input's control.
58
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
59
+ * drawn (with bestax's CSS loaded).
60
+ */
57
61
  isLoading?: boolean;
58
62
  /** Enables exponential step increments when holding buttons. */
59
63
  exponential?: boolean;
@@ -26,7 +26,11 @@ export interface SelectProps extends SelectBaseProps {
26
26
  iconLeftSize?: ControlBaseProps['iconLeftSize'];
27
27
  /** Force left icon container. */
28
28
  hasIconsLeft?: boolean;
29
- /** Shows loading indicator. */
29
+ /**
30
+ * Replaces the chevron with a loading spinner.
31
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
32
+ * drawn (with bestax's CSS loaded).
33
+ */
30
34
  isLoading?: boolean;
31
35
  /** Expand the control. */
32
36
  isExpanded?: boolean;
@@ -10,7 +10,11 @@ export interface SelectBaseProps extends Omit<React.SelectHTMLAttributes<HTMLSel
10
10
  size?: 'small' | 'medium' | 'large';
11
11
  /** Rounded select corners. */
12
12
  isRounded?: boolean;
13
- /** Shows loading indicator. */
13
+ /**
14
+ * Replaces the chevron with a loading spinner.
15
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
16
+ * drawn (with bestax's CSS loaded).
17
+ */
14
18
  isLoading?: boolean;
15
19
  /** Applies Bulma's is-active modifier. */
16
20
  isActive?: boolean;
@@ -76,7 +76,11 @@ export interface TaginputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
76
76
  keepFirst?: boolean;
77
77
  /** Keeps the autocomplete dropdown open after selection. */
78
78
  keepOpen?: boolean;
79
- /** Shows a loading indicator. */
79
+ /**
80
+ * Shows a loading spinner in the input.
81
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
82
+ * drawn (with bestax's CSS loaded).
83
+ */
80
84
  loading?: boolean;
81
85
  /** ARIA label for tag close buttons. */
82
86
  ariaCloseLabel?: string;
@@ -18,7 +18,11 @@ export interface TextAreaProps extends TextAreaBaseProps {
18
18
  labelProps?: FieldProps['labelProps'];
19
19
  /** Horizontal field layout. */
20
20
  horizontal?: boolean;
21
- /** Shows loading indicator on the wrapping Control. */
21
+ /**
22
+ * Shows a loading spinner on the wrapping Control.
23
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
24
+ * drawn (with bestax's CSS loaded).
25
+ */
22
26
  isLoading?: boolean;
23
27
  /** Control size. */
24
28
  controlSize?: ControlBaseProps['size'];
@@ -34,7 +34,11 @@ export interface TimeInputProps extends TimeInputBaseProps {
34
34
  hasIconsLeft?: boolean;
35
35
  /** Force the right icon container. */
36
36
  hasIconsRight?: boolean;
37
- /** Show a loading indicator on the control. */
37
+ /**
38
+ * Show a loading spinner on the control.
39
+ * Under `prefers-reduced-motion: reduce` the spinner stops and stays
40
+ * drawn (with bestax's CSS loaded).
41
+ */
38
42
  isLoading?: boolean;
39
43
  /** Expand the control to fill its container. */
40
44
  isExpanded?: boolean;
@@ -54,8 +54,10 @@ export interface TimeInputBaseProps extends Omit<React.InputHTMLAttributes<HTMLI
54
54
  appendToBody?: boolean;
55
55
  /**
56
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`.
57
+ * colors the selection band. A focused wheel's keyboard focus ring is drawn
58
+ * inside the band in the color's `-invert`, like the selected value, so it
59
+ * shows on the fill. Unset, the wheels use
60
+ * `--bulma-timeinput-wheel-selected-bg`, which defaults to `primary`.
59
61
  */
60
62
  color?: 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
61
63
  /** Size variant. */
@@ -77,7 +77,12 @@ export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroun
77
77
  * written at `:root`, which squares everything on the page that takes its
78
78
  * radius from it.
79
79
  *
80
- * For any other radius, set the variable through `bulmaVars`
80
+ * The sizes (`small`, `normal`, `large`, `rounded`) add their
81
+ * `has-radius-<value>` class to the wrapper div and set no variable, so
82
+ * they round the wrapper and leave what is inside it alone. Under `isRoot`
83
+ * there is no wrapper, so they do nothing, and say so in development.
84
+ *
85
+ * To change the radius of what is inside, set the variable through `bulmaVars`
81
86
  * (`bulmaVars={{ '--bulma-radius': '6px' }}`). This prop used to write the
82
87
  * variable for every value, so any other non-empty string still does, but
83
88
  * that route is deprecated and logs a warning in development. A number or
@@ -104,10 +104,31 @@ export declare const validViewports: readonly ["mobile", "tablet", "tablet-only"
104
104
  */
105
105
  export declare const validFloats: readonly ["left", "right"];
106
106
  /**
107
- * Valid Bulma overflow classes.
108
- * @example 'clipped'
107
+ * Valid Bulma overflow values for one axis, taken by `overflowX` and
108
+ * `overflowY`. Each renders `is-overflow-x-<value>` or `is-overflow-y-<value>`.
109
+ * @example 'auto', 'hidden', 'scroll'
109
110
  */
110
- export declare const validOverflows: readonly ["clipped"];
111
+ export declare const validAxisOverflows: readonly ["auto", "clip", "hidden", "scroll", "visible"];
112
+ /**
113
+ * Valid Bulma overflow values for `overflow`.
114
+ *
115
+ * `clipped` renders `is-clipped`, the helper `overflow` started with. Every
116
+ * other value renders `is-overflow-<value>`.
117
+ * @example 'clipped', 'auto', 'hidden'
118
+ */
119
+ export declare const validOverflows: readonly ["clipped", "auto", "clip", "hidden", "scroll", "visible"];
120
+ /**
121
+ * Valid Bulma position values, taken by `pos`. Each renders
122
+ * `is-position-<value>`.
123
+ * @example 'relative', 'absolute', 'sticky'
124
+ */
125
+ export declare const validPositions: readonly ["absolute", "fixed", "relative", "static", "sticky"];
126
+ /**
127
+ * Valid Bulma aspect ratios, taken by `aspectRatio`. Each renders
128
+ * `is-aspect-ratio-<value>`.
129
+ * @example '1by1', '4by3', '16by9'
130
+ */
131
+ export declare const validAspectRatios: readonly ["1by1", "5by4", "4by3", "3by2", "5by3", "16by9", "2by1", "3by1", "4by5", "3by4", "2by3", "3by5", "9by16", "1by2", "1by3"];
111
132
  /**
112
133
  * Valid Bulma interaction classes.
113
134
  * @example 'unselectable', 'clickable'
@@ -132,10 +153,13 @@ export declare const validCursors: readonly ["pointer", "help"];
132
153
  */
133
154
  export declare const cursorClasses: Record<(typeof validCursors)[number], string>;
134
155
  /**
135
- * Valid Bulma border-radius helper classes.
136
- * @example 'radiusless'
156
+ * Valid Bulma border-radius helper values.
157
+ *
158
+ * `radiusless` renders `is-radiusless` and removes the radius. The sizes
159
+ * render `has-radius-<value>` and set one from Bulma's radius scale.
160
+ * @example 'radiusless', 'small', 'rounded'
137
161
  */
138
- export declare const validRadii: readonly ["radiusless"];
162
+ export declare const validRadii: readonly ["radiusless", "small", "normal", "large", "rounded"];
139
163
  /**
140
164
  * Valid Bulma shadow helper classes.
141
165
  * @example 'shadowless'
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Event and focus checks that still hold when a component renders inside a
3
+ * shadow root.
4
+ *
5
+ * Code outside a shadow root cannot see into it. A listener on `document`
6
+ * reads an event from inside one with its `target` set to the shadow host,
7
+ * and `document.activeElement` names the host instead of the element that has
8
+ * focus. A component asking either question from `document` then takes a
9
+ * click on its own menu for an outside click, or cannot tell which of its
10
+ * items is focused. A web component or a sandboxed preview puts a component
11
+ * in exactly that position.
12
+ *
13
+ * Focus comes in two questions, and each has its own function here. "Is focus
14
+ * inside me, and on which of my elements?" is `getActiveElementInTree`. "Which
15
+ * element has focus, wherever it is?", the one to record before moving focus
16
+ * away and restore to later, is `getDeepestActiveElement`.
17
+ */
18
+ /**
19
+ * Whether `event` happened inside `node`. The event's composed path still
20
+ * holds the element that was really clicked, where a `document` listener
21
+ * reads the shadow host as the event's `target`.
22
+ *
23
+ * @param event - An event read by a listener outside `node`, usually on `document`.
24
+ * @param node - The component's element, or nothing while it is unmounted.
25
+ * @returns True when `node` is on the event's path.
26
+ */
27
+ export declare function isEventInside(event: Event, node: Node | null | undefined): boolean;
28
+ /**
29
+ * The focused element as `node`'s own tree sees it: its shadow root's
30
+ * `activeElement` when `node` is inside one, `document.activeElement` when it
31
+ * is not. The result is comparable with `node` and its descendants, which
32
+ * live in that same tree, so use it to ask whether focus is inside `node`.
33
+ * Focus inside a shadow root nested within `node` reads as that root's host,
34
+ * which `node` contains.
35
+ *
36
+ * A shadow root with nothing focused inside reports `null`, and a detached
37
+ * node has no document above it. Both fall back to `document.activeElement`,
38
+ * so focus elsewhere on the page still reads as outside `node`.
39
+ *
40
+ * @param node - An element of the component, or nothing while it is unmounted.
41
+ * @returns The focused element in `node`'s tree, or the document's.
42
+ */
43
+ export declare function getActiveElementInTree(node: Node | null | undefined): Element | null;
44
+ /**
45
+ * The element that really has focus, followed down from
46
+ * `document.activeElement` through every open shadow root on the way. Use it
47
+ * to record where focus was before moving it, so it can be restored to that
48
+ * element later: the tree a component renders into need not be the tree its
49
+ * opener sits in. A closed shadow root cannot be entered, so focus inside one
50
+ * reads as its host.
51
+ *
52
+ * @returns The focused element, or `null` when the document has none.
53
+ */
54
+ export declare function getDeepestActiveElement(): Element | null;
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ /**
3
+ * How long after an item appears its announcement is written, in ms. The wait
4
+ * lets a screen reader register a region the container has only just mounted,
5
+ * and items shown in quick succession are written, and read out, together.
6
+ */
7
+ export declare const announceDelay = 100;
8
+ /**
9
+ * How long an announcement stays in the region once written, in ms. That's
10
+ * long enough for a screen reader to pick it up. Clearing it after keeps a
11
+ * second copy of the item's text from sitting in the page, where someone
12
+ * reading through the page, or a test looking the text up, would find it
13
+ * again.
14
+ */
15
+ export declare const announcementLifetime = 1000;
16
+ /**
17
+ * Reads an element out roughly the way a screen reader would: its text, with
18
+ * an element's `aria-label`, or an image's `alt`, standing in for what's
19
+ * inside it, a break between block-level elements, and parts that are
20
+ * `aria-hidden`, `hidden` or inline-styled `display: none` left out. It isn't
21
+ * the full accessible name computation, so `aria-labelledby`, CSS-generated
22
+ * content, content hidden by a stylesheet and other ways of naming or hiding
23
+ * content aren't followed.
24
+ *
25
+ * @function spokenText
26
+ * @param element - The element to read.
27
+ * @returns Its text, with runs of whitespace collapsed and the ends trimmed.
28
+ */
29
+ export declare function spokenText(element: Element): string;
30
+ /**
31
+ * Props for StatusRegion.
32
+ */
33
+ export interface StatusRegionProps<Item extends {
34
+ id: string;
35
+ }> {
36
+ /** The items to announce politely, in the order they were shown. */
37
+ items: readonly Item[];
38
+ /**
39
+ * The text to announce for an item, or nothing to skip it, as
40
+ * `useAnnouncements` takes it.
41
+ */
42
+ describe: (item: Item) => string | null;
43
+ }
44
+ /**
45
+ * A visually hidden, polite `status` live region that a programmatic
46
+ * container announces its items through. The container renders it from the
47
+ * moment it mounts, whether or not it has anything to show, so the region is
48
+ * already in the page when an announcement is written into it.
49
+ *
50
+ * The announcements are this component's own state, so writing and clearing
51
+ * them re-renders the region and leaves the container's items alone. Each one
52
+ * is its own keyed node, so a re-render that leaves the announcements alone
53
+ * leaves the region's content alone too, and nothing is read out twice.
54
+ *
55
+ * @function StatusRegion
56
+ * @param props - The items to announce, and the text to announce for each.
57
+ * @returns The region.
58
+ */
59
+ export declare function StatusRegion<Item extends {
60
+ id: string;
61
+ }>({ items, describe, }: StatusRegionProps<Item>): React.ReactElement;
@@ -50,7 +50,7 @@ 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, validInteractions, validCursors, validRadii, validShadows, validResponsives, } from './bulmaClassHelpers.js';
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
54
  export type { BulmaViewportProps, BulmaDisplayProps };
55
55
  export * from './useColorClasses.js';
56
56
  export * from './useSpacingClasses.js';
@@ -1,19 +1,48 @@
1
- import { validCursors, validFloats, validInteractions, validOverflows, validRadii, validResponsives, validShadows } from './bulmaClassHelpers.js';
1
+ import { validAspectRatios, validAxisOverflows, validCursors, validFloats, validInteractions, validOverflows, validPositions, validRadii, validResponsives, validShadows } from './bulmaClassHelpers.js';
2
2
  /**
3
3
  * Props for applying miscellaneous Bulma helper classes.
4
4
  */
5
5
  export interface BulmaOtherProps {
6
6
  /** Float direction (e.g., 'left', 'right'). */
7
7
  float?: (typeof validFloats)[number];
8
- /** Overflow behavior (e.g., 'clipped'). */
8
+ /**
9
+ * Overflow behavior on both axes. `clipped` renders `is-clipped`; the CSS
10
+ * keywords (`auto`, `clip`, `hidden`, `scroll`, `visible`) render
11
+ * `is-overflow-<value>`.
12
+ *
13
+ * Beside `overflowX` or `overflowY`, the axis prop wins on its own axis and
14
+ * `overflow` sets only the other one, with `clipped` counting as `hidden`:
15
+ * `overflow="hidden" overflowY="auto"` clips sideways and scrolls down.
16
+ */
9
17
  overflow?: (typeof validOverflows)[number];
18
+ /**
19
+ * Horizontal overflow behavior (e.g., 'auto', 'hidden'). Wins over
20
+ * `overflow` on this axis.
21
+ */
22
+ overflowX?: (typeof validAxisOverflows)[number];
23
+ /**
24
+ * Vertical overflow behavior (e.g., 'auto', 'scroll'). Wins over `overflow`
25
+ * on this axis.
26
+ */
27
+ overflowY?: (typeof validAxisOverflows)[number];
10
28
  /** Applies overlay styling if true. */
11
29
  overlay?: boolean;
12
30
  /** Interaction behavior (e.g., 'unselectable', 'clickable'). */
13
31
  interaction?: (typeof validInteractions)[number];
14
32
  /** Cursor style (e.g., 'pointer', 'help'). */
15
33
  cursor?: (typeof validCursors)[number];
16
- /** Border radius style (e.g., 'radiusless'). */
34
+ /**
35
+ * Border radius. `radiusless` removes it (`is-radiusless`). `small`,
36
+ * `normal`, `large` and `rounded` set one from Bulma's radius scale
37
+ * (`has-radius-<value>`), where `rounded` is the pill shape.
38
+ *
39
+ * The class lands on the component's root element, so where an inner
40
+ * element draws the radius, such as the `<img>` in `Image` or the
41
+ * `<select>` in `Select`, that element keeps its own. The sizes are not
42
+ * `!important`, unlike `radiusless`, so a component rule more specific than
43
+ * one class still wins: an `isRounded` control stays a pill, and a joined
44
+ * addon keeps its square inner corners.
45
+ */
17
46
  radius?: (typeof validRadii)[number];
18
47
  /** Shadow style (e.g., 'shadowless'). */
19
48
  shadow?: (typeof validShadows)[number];
@@ -23,15 +52,42 @@ export interface BulmaOtherProps {
23
52
  skeleton?: boolean;
24
53
  /** Applies clearfix to fix floating children if true. */
25
54
  clearfix?: boolean;
26
- /** Applies position: relative if true. */
55
+ /**
56
+ * CSS `position` (`is-position-<value>`).
57
+ *
58
+ * Named `pos` because several components already have a `position` prop
59
+ * of their own, for where they place a popup or a toast.
60
+ *
61
+ * It sets `position` and nothing else, so an element that is `absolute`,
62
+ * `fixed` or `sticky` still needs its offsets (`top`, `left`, …) from your
63
+ * own CSS. `sticky` in particular does nothing until one is set.
64
+ *
65
+ * When `pos` is set it decides the position, and `relative` adds nothing.
66
+ */
67
+ pos?: (typeof validPositions)[number];
68
+ /**
69
+ * Applies position: relative if true (`is-relative`). The shortcut for
70
+ * `pos="relative"`, kept working as it always has; `pos` wins when both are
71
+ * set.
72
+ */
27
73
  relative?: boolean;
28
74
  /** Applies height: 100% if true. */
29
75
  fullHeight?: boolean;
76
+ /**
77
+ * Fixed width-to-height ratio (`is-aspect-ratio-<value>`), e.g. `16by9`.
78
+ * The height follows the width, so leave the height unset. Content taller
79
+ * than the ratio allows grows the element unless `overflow` or `overflowY`
80
+ * makes it scroll or clip.
81
+ *
82
+ * On `Image`, prefer its own `size` ratios, which also fit the picture to
83
+ * the box; this class sizes only the wrapper.
84
+ */
85
+ aspectRatio?: (typeof validAspectRatios)[number];
30
86
  }
31
87
  /**
32
88
  * A hook that generates miscellaneous Bulma helper classes (float, overflow,
33
89
  * overlay, interaction, cursor, radius, shadow, responsive, skeleton,
34
- * clearfix, relative, and full height).
90
+ * clearfix, position, full height, and aspect ratio).
35
91
  *
36
92
  * @function useOtherClasses
37
93
  * @param props - Miscellaneous Bulma helper props.
@@ -38,6 +38,7 @@ export * from './elements/IconText.js';
38
38
  export * from './elements/Image.js';
39
39
  export * from './elements/Link.js';
40
40
  export * from './elements/ListItem.js';
41
+ export * from './elements/Loader.js';
41
42
  export * from './elements/Notification.js';
42
43
  export * from './elements/OrderedList.js';
43
44
  export * from './elements/Paragraph.js';