@allxsmith/bestax-bulma 5.43.1 → 5.44.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.
- package/dist/esm/elements/Td.js +6 -4
- package/dist/esm/elements/Td.js.map +1 -1
- package/dist/esm/elements/Th.js +2 -2
- package/dist/esm/elements/Th.js.map +1 -1
- package/dist/esm/elements/tableAlignment.js +16 -0
- package/dist/esm/elements/tableAlignment.js.map +1 -0
- package/dist/esm/helpers/bulmaClassHelpers.js +2 -2
- package/dist/esm/helpers/bulmaClassHelpers.js.map +1 -1
- package/dist/index.cjs +23 -10
- package/dist/index.cjs.map +1 -1
- package/dist/types/elements/Td.d.ts +4 -1
- package/dist/types/elements/Th.d.ts +1 -6
- package/dist/types/elements/tableAlignment.d.ts +16 -0
- package/dist/types-cjs/elements/Td.d.ts +4 -1
- package/dist/types-cjs/elements/Th.d.ts +1 -6
- package/dist/types-cjs/elements/tableAlignment.d.ts +16 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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];
|
|
@@ -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
|
-
|
|
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];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allxsmith/bestax-bulma",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.44.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",
|