@allxsmith/bestax-bulma 5.43.1 → 5.45.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 (37) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/esm/components/Carousel.js +2 -2
  4. package/dist/esm/components/Carousel.js.map +1 -1
  5. package/dist/esm/elements/Td.js +6 -4
  6. package/dist/esm/elements/Td.js.map +1 -1
  7. package/dist/esm/elements/Th.js +2 -2
  8. package/dist/esm/elements/Th.js.map +1 -1
  9. package/dist/esm/elements/tableAlignment.js +16 -0
  10. package/dist/esm/elements/tableAlignment.js.map +1 -0
  11. package/dist/esm/form/Checkbox.js.map +1 -1
  12. package/dist/esm/helpers/bulmaClassHelpers.js +2 -2
  13. package/dist/esm/helpers/bulmaClassHelpers.js.map +1 -1
  14. package/dist/extras.css +1 -1
  15. package/dist/extras.css.map +1 -1
  16. package/dist/index.cjs +25 -12
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/types/components/Carousel.d.ts +29 -3
  19. package/dist/types/elements/Td.d.ts +4 -1
  20. package/dist/types/elements/Th.d.ts +1 -6
  21. package/dist/types/elements/tableAlignment.d.ts +16 -0
  22. package/dist/types/form/Checkbox.d.ts +8 -6
  23. package/dist/types-cjs/components/Carousel.d.ts +29 -3
  24. package/dist/types-cjs/elements/Td.d.ts +4 -1
  25. package/dist/types-cjs/elements/Th.d.ts +1 -6
  26. package/dist/types-cjs/elements/tableAlignment.d.ts +16 -0
  27. package/dist/types-cjs/form/Checkbox.d.ts +8 -6
  28. package/dist/versions/bestax-no-dark-mode.css +1 -1
  29. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  30. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  31. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  32. package/dist/versions/bestax-no-helpers.css +1 -1
  33. package/dist/versions/bestax-no-helpers.css.map +1 -1
  34. package/dist/versions/bestax-prefixed.css +1 -1
  35. package/dist/versions/bestax-prefixed.css.map +1 -1
  36. package/package.json +1 -1
  37. package/src/scss/components/_carousel.scss +31 -13
@@ -134,9 +134,31 @@ export interface CarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>
134
134
  * a carousel inside a form is not submitted by picking a slide.
135
135
  */
136
136
  indicator?: boolean;
137
- /** Position indicators inside carousel. */
137
+ /**
138
+ * Puts the indicators over the slides instead of below them, at the edge
139
+ * `indicatorPosition` names. It also turns on the overlay look unless
140
+ * `overlayControls` says otherwise, so on its own it gives the look made
141
+ * for photos: light arrows, and light indicators on a dark gradient band.
142
+ */
138
143
  indicatorInside?: boolean;
139
- /** Indicator position. Default: 'bottom'. */
144
+ /**
145
+ * The overlay look, made for photos. The arrows take the
146
+ * `--bulma-carousel-overlay-arrow-*` colors, and indicators over the
147
+ * slides take the `--bulma-carousel-overlay-indicator-*` colors on a dark
148
+ * gradient band. Indicators below the slides keep their plain colors,
149
+ * since they sit on the page. It follows `indicatorInside` unless you set
150
+ * it, so `overlayControls={false}` puts the indicators over the slides
151
+ * with the plain look, and `overlayControls` alone gives the arrows the
152
+ * overlay look with the indicators below. While it's on, `arrowColor`
153
+ * doesn't apply.
154
+ * @defaultValue indicatorInside
155
+ */
156
+ overlayControls?: boolean;
157
+ /**
158
+ * The edge of the slides `indicatorInside` puts the indicators on.
159
+ * Default: 'bottom'. Without `indicatorInside` they sit below the slides
160
+ * whatever this says, so leave it unset there.
161
+ */
140
162
  indicatorPosition?: 'bottom' | 'top';
141
163
  /** Indicator style. Default: 'dots'. */
142
164
  indicatorStyle?: 'circles' | 'dots' | 'lines' | 'bars';
@@ -154,7 +176,11 @@ export interface CarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>
154
176
  iconFeatures?: string | string[];
155
177
  /** Show semi-transparent background on arrow buttons. Set to `false` for icon-only arrows. */
156
178
  arrowBackground?: boolean;
157
- /** Color theme for navigation arrows. */
179
+ /**
180
+ * Color theme for navigation arrows. Not applied while the overlay look is
181
+ * on (see `overlayControls`, which `indicatorInside` turns on), whose
182
+ * arrows take `--bulma-carousel-overlay-arrow-color`.
183
+ */
158
184
  arrowColor?: 'light' | 'dark';
159
185
  /** Accessible label for the carousel region. Default: 'Image carousel'. */
160
186
  ariaLabel?: string;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import React from 'react';
5
5
  import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
6
+ import { TableAlignment } from './tableAlignment.js';
6
7
  /**
7
8
  * The values the table `color` prop accepts, as a readonly tuple.
8
9
  *
@@ -34,6 +35,8 @@ export type TableColor = (typeof validTableColors)[number];
34
35
  export interface TdProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'color'>, Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {
35
36
  /** Additional CSS classes to apply. */
36
37
  className?: string;
38
+ /** Text alignment for the table cell ('left', 'right', 'centered'). */
39
+ isAligned?: TableAlignment;
37
40
  /** Bulma color modifier for the table cell. */
38
41
  color?: TableColor;
39
42
  /** Table cell content. */
@@ -42,7 +45,7 @@ export interface TdProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElemen
42
45
  /**
43
46
  * Td component for rendering a styled Bulma table cell.
44
47
  *
45
- * Supports Bulma color modifiers and helper classes for additional styling.
48
+ * Supports alignment, Bulma color modifiers, and helper classes for additional styling.
46
49
  *
47
50
  * @function
48
51
  * @param {TdProps} props - Props for the Td component.
@@ -4,11 +4,7 @@
4
4
  import React from 'react';
5
5
  import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
6
6
  import { TableColor } from './Td.js';
7
- declare const validAlignments: readonly ["left", "right", "centered"];
8
- /**
9
- * Valid alignment values for the Th component.
10
- */
11
- type TableAlignment = (typeof validAlignments)[number];
7
+ import { TableAlignment } from './tableAlignment.js';
12
8
  /**
13
9
  * Props for the Th component.
14
10
  */
@@ -35,4 +31,3 @@ export interface ThProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElemen
35
31
  * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}
36
32
  */
37
33
  export declare const Th: React.FC<ThProps>;
38
- export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The `isAligned` values `Th` and `Td` accept. Each one writes
3
+ * `has-text-<value>` on the cell, and a value outside the tuple adds no class.
4
+ *
5
+ * One copy, imported by both cells, so a header and its body cells always
6
+ * take the same values.
7
+ *
8
+ * Its own module rather than `Th.tsx` or `Td.tsx` because `src/index.ts`
9
+ * wildcard-exports those files, and everything published there is public
10
+ * forever. `iconProps.ts` makes the same call.
11
+ */
12
+ export declare const validTableAlignments: readonly ["left", "right", "centered"];
13
+ /**
14
+ * Valid alignment values for the Th and Td components.
15
+ */
16
+ export type TableAlignment = (typeof validTableAlignments)[number];
@@ -47,12 +47,14 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
47
47
  /**
48
48
  * Shows the mixed state, as in a "Select all" box when some of what it
49
49
  * covers is checked. It's a look and an announcement only: `checked` is
50
- * still the value, and a click still toggles `checked`. A browser clears
51
- * the mixed state on a click, so the component sets it again from this
52
- * prop after every click and every render. Left unset, the component
53
- * doesn't touch it, and once it has set it, going back to unset clears it
54
- * once and hands it back. It has no HTML attribute, so server-rendered
55
- * markup can't carry it, and a mixed box renders unmixed until hydration.
50
+ * still the value, and a click still toggles `checked`. Set to `true` or
51
+ * `false`, it's controlled: a browser clears the mixed state on a click,
52
+ * so the component sets it again from this prop after every click and
53
+ * every render. Unset isn't `false`. The component leaves the input's own
54
+ * `indeterminate` property alone, so a ref can set it, and going from set
55
+ * to unset clears it once and hands it back. It has no HTML attribute, so
56
+ * server-rendered markup can't carry it, and a mixed box renders unmixed
57
+ * until hydration.
56
58
  */
57
59
  indeterminate?: boolean;
58
60
  /**
@@ -134,9 +134,31 @@ export interface CarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>
134
134
  * a carousel inside a form is not submitted by picking a slide.
135
135
  */
136
136
  indicator?: boolean;
137
- /** Position indicators inside carousel. */
137
+ /**
138
+ * Puts the indicators over the slides instead of below them, at the edge
139
+ * `indicatorPosition` names. It also turns on the overlay look unless
140
+ * `overlayControls` says otherwise, so on its own it gives the look made
141
+ * for photos: light arrows, and light indicators on a dark gradient band.
142
+ */
138
143
  indicatorInside?: boolean;
139
- /** Indicator position. Default: 'bottom'. */
144
+ /**
145
+ * The overlay look, made for photos. The arrows take the
146
+ * `--bulma-carousel-overlay-arrow-*` colors, and indicators over the
147
+ * slides take the `--bulma-carousel-overlay-indicator-*` colors on a dark
148
+ * gradient band. Indicators below the slides keep their plain colors,
149
+ * since they sit on the page. It follows `indicatorInside` unless you set
150
+ * it, so `overlayControls={false}` puts the indicators over the slides
151
+ * with the plain look, and `overlayControls` alone gives the arrows the
152
+ * overlay look with the indicators below. While it's on, `arrowColor`
153
+ * doesn't apply.
154
+ * @defaultValue indicatorInside
155
+ */
156
+ overlayControls?: boolean;
157
+ /**
158
+ * The edge of the slides `indicatorInside` puts the indicators on.
159
+ * Default: 'bottom'. Without `indicatorInside` they sit below the slides
160
+ * whatever this says, so leave it unset there.
161
+ */
140
162
  indicatorPosition?: 'bottom' | 'top';
141
163
  /** Indicator style. Default: 'dots'. */
142
164
  indicatorStyle?: 'circles' | 'dots' | 'lines' | 'bars';
@@ -154,7 +176,11 @@ export interface CarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>
154
176
  iconFeatures?: string | string[];
155
177
  /** Show semi-transparent background on arrow buttons. Set to `false` for icon-only arrows. */
156
178
  arrowBackground?: boolean;
157
- /** Color theme for navigation arrows. */
179
+ /**
180
+ * Color theme for navigation arrows. Not applied while the overlay look is
181
+ * on (see `overlayControls`, which `indicatorInside` turns on), whose
182
+ * arrows take `--bulma-carousel-overlay-arrow-color`.
183
+ */
158
184
  arrowColor?: 'light' | 'dark';
159
185
  /** Accessible label for the carousel region. Default: 'Image carousel'. */
160
186
  ariaLabel?: string;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import React from 'react';
5
5
  import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
6
+ import { TableAlignment } from './tableAlignment.js';
6
7
  /**
7
8
  * The values the table `color` prop accepts, as a readonly tuple.
8
9
  *
@@ -34,6 +35,8 @@ export type TableColor = (typeof validTableColors)[number];
34
35
  export interface TdProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'color'>, Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {
35
36
  /** Additional CSS classes to apply. */
36
37
  className?: string;
38
+ /** Text alignment for the table cell ('left', 'right', 'centered'). */
39
+ isAligned?: TableAlignment;
37
40
  /** Bulma color modifier for the table cell. */
38
41
  color?: TableColor;
39
42
  /** Table cell content. */
@@ -42,7 +45,7 @@ export interface TdProps extends Omit<React.TdHTMLAttributes<HTMLTableCellElemen
42
45
  /**
43
46
  * Td component for rendering a styled Bulma table cell.
44
47
  *
45
- * Supports Bulma color modifiers and helper classes for additional styling.
48
+ * Supports alignment, Bulma color modifiers, and helper classes for additional styling.
46
49
  *
47
50
  * @function
48
51
  * @param {TdProps} props - Props for the Td component.
@@ -4,11 +4,7 @@
4
4
  import React from 'react';
5
5
  import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
6
6
  import { TableColor } from './Td.js';
7
- declare const validAlignments: readonly ["left", "right", "centered"];
8
- /**
9
- * Valid alignment values for the Th component.
10
- */
11
- type TableAlignment = (typeof validAlignments)[number];
7
+ import { TableAlignment } from './tableAlignment.js';
12
8
  /**
13
9
  * Props for the Th component.
14
10
  */
@@ -35,4 +31,3 @@ export interface ThProps extends Omit<React.ThHTMLAttributes<HTMLTableCellElemen
35
31
  * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}
36
32
  */
37
33
  export declare const Th: React.FC<ThProps>;
38
- export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The `isAligned` values `Th` and `Td` accept. Each one writes
3
+ * `has-text-<value>` on the cell, and a value outside the tuple adds no class.
4
+ *
5
+ * One copy, imported by both cells, so a header and its body cells always
6
+ * take the same values.
7
+ *
8
+ * Its own module rather than `Th.tsx` or `Td.tsx` because `src/index.ts`
9
+ * wildcard-exports those files, and everything published there is public
10
+ * forever. `iconProps.ts` makes the same call.
11
+ */
12
+ export declare const validTableAlignments: readonly ["left", "right", "centered"];
13
+ /**
14
+ * Valid alignment values for the Th and Td components.
15
+ */
16
+ export type TableAlignment = (typeof validTableAlignments)[number];
@@ -47,12 +47,14 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
47
47
  /**
48
48
  * Shows the mixed state, as in a "Select all" box when some of what it
49
49
  * covers is checked. It's a look and an announcement only: `checked` is
50
- * still the value, and a click still toggles `checked`. A browser clears
51
- * the mixed state on a click, so the component sets it again from this
52
- * prop after every click and every render. Left unset, the component
53
- * doesn't touch it, and once it has set it, going back to unset clears it
54
- * once and hands it back. It has no HTML attribute, so server-rendered
55
- * markup can't carry it, and a mixed box renders unmixed until hydration.
50
+ * still the value, and a click still toggles `checked`. Set to `true` or
51
+ * `false`, it's controlled: a browser clears the mixed state on a click,
52
+ * so the component sets it again from this prop after every click and
53
+ * every render. Unset isn't `false`. The component leaves the input's own
54
+ * `indeterminate` property alone, so a ref can set it, and going from set
55
+ * to unset clears it once and hands it back. It has no HTML attribute, so
56
+ * server-rendered markup can't carry it, and a mixed box renders unmixed
57
+ * until hydration.
56
58
  */
57
59
  indeterminate?: boolean;
58
60
  /**