@allxsmith/bestax-bulma 5.43.0 → 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/README.md CHANGED
@@ -195,8 +195,9 @@ Building with an AI agent (Claude Code, Cursor, Copilot)? bestax-bulma ships LLM
195
195
 
196
196
  bestax-bulma is built on top of the incredible [Bulma](https://bulma.io) CSS framework,
197
197
  © [Jeremy Thomas](https://github.com/jgthms) and licensed under the
198
- [MIT License](https://github.com/jgthms/bulma/blob/main/LICENSE). Some example content and
199
- documentation is adapted from the Bulma website
198
+ [MIT License](https://github.com/jgthms/bulma/blob/main/LICENSE), whose notice ships with the
199
+ package in [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md). Some example content and documentation is
200
+ adapted from the Bulma website
200
201
  ([CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)), © Jeremy Thomas.
201
202
 
202
203
  If you find Bulma useful, please consider
@@ -0,0 +1,35 @@
1
+ # Third-party notices
2
+
3
+ `@allxsmith/bestax-bulma` ships `dist/bestax.css` and the builds in `dist/versions/`, which are
4
+ [Bulma](https://bulma.io)'s own Sass compiled with bestax's settings and bestax's additions.
5
+ (`dist/extras.css` holds only bestax's own styles.) Bulma's MIT License asks for its copyright and
6
+ permission notice to go with every copy, so here it is.
7
+
8
+ ## Bulma
9
+
10
+ Source: https://github.com/jgthms/bulma, the version the `bulma` range in `package.json`
11
+ resolves to.
12
+
13
+ ```text
14
+ The MIT License (MIT)
15
+
16
+ Copyright (c) 2023 Jeremy Thomas
17
+
18
+ Permission is hereby granted, free of charge, to any person obtaining a copy
19
+ of this software and associated documentation files (the "Software"), to deal
20
+ in the Software without restriction, including without limitation the rights
21
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
+ copies of the Software, and to permit persons to whom the Software is
23
+ furnished to do so, subject to the following conditions:
24
+
25
+ The above copyright notice and this permission notice shall be included in
26
+ all copies or substantial portions of the Software.
27
+
28
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34
+ THE SOFTWARE.
35
+ ```
@@ -2,6 +2,7 @@
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { usePrefixedClassNames, classNames } from '../helpers/classNames.js';
4
4
  import { useBulmaClasses } from '../helpers/useBulmaClasses.js';
5
+ import { validTableAlignments } from './tableAlignment.js';
5
6
 
6
7
  /**
7
8
  * The values the table `color` prop accepts, as a readonly tuple.
@@ -38,22 +39,23 @@ const validTableColors = [
38
39
  /**
39
40
  * Td component for rendering a styled Bulma table cell.
40
41
  *
41
- * Supports Bulma color modifiers and helper classes for additional styling.
42
+ * Supports alignment, Bulma color modifiers, and helper classes for additional styling.
42
43
  *
43
44
  * @function
44
45
  * @param {TdProps} props - Props for the Td component.
45
46
  * @returns {JSX.Element} The rendered table cell element.
46
47
  * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}
47
48
  */
48
- const Td = ({ className, color, children, ...props }) => {
49
- const colorClass = usePrefixedClassNames('', {
49
+ const Td = ({ className, isAligned, color, children, ...props }) => {
50
+ const bulmaClasses = usePrefixedClassNames('', {
51
+ [`has-text-${isAligned}`]: isAligned && validTableAlignments.includes(isAligned),
50
52
  [`is-${color}`]: color && validTableColors.includes(color),
51
53
  });
52
54
  /**
53
55
  * Generates Bulma helper classes and separates out remaining props.
54
56
  */
55
57
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
56
- const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
58
+ const tdClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
57
59
  return (jsx("td", { className: tdClasses || undefined, ...rest, children: children }));
58
60
  };
59
61
 
@@ -1 +1 @@
1
- {"version":3,"file":"Td.js","sources":["../../../src/elements/Td.tsx"],"sourcesContent":["/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\n\n/**\n * The values the table `color` prop accepts, as a readonly tuple.\n *\n * `TableColor` is typed from it, and `Tr`, `Th` and `Td` all take a\n * `TableColor`, so the tuple and those props list the same values. Map over\n * it to build a color picker, or check a value that arrives at runtime before\n * passing it in: the components add no color class for a value outside the\n * tuple.\n *\n * @example\n * import { Tr, Td, validTableColors } from '@allxsmith/bestax-bulma';\n *\n * <Tr>\n * {validTableColors.map(color => (\n * <Td key={color} color={color}>\n * {color}\n * </Td>\n * ))}\n * </Tr>;\n */\nexport const validTableColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/**\n * The color values `Tr`, `Th` and `Td` accept, typed from `validTableColors`.\n */\nexport type TableColor = (typeof validTableColors)[number];\n\n/**\n * Props for the Td component.\n */\nexport interface TdProps\n extends\n Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Bulma color modifier for the table cell. */\n color?: TableColor;\n /** Table cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Td component for rendering a styled Bulma table cell.\n *\n * Supports Bulma color modifiers and helper classes for additional styling.\n *\n * @function\n * @param {TdProps} props - Props for the Td component.\n * @returns {JSX.Element} The rendered table cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}\n */\nexport const Td: React.FC<TdProps> = ({\n className,\n color,\n children,\n ...props\n}) => {\n const colorClass = usePrefixedClassNames('', {\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const tdClasses = classNames(colorClass, className, bulmaHelperClasses);\n\n return (\n <td className={tdClasses || undefined} {...rest}>\n {children}\n </td>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;AAOA;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;;AAuBT;;;;;;;;;AASG;AACI,MAAM,EAAE,GAAsB,CAAC,EACpC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,KAAI;AACH,IAAA,MAAM,UAAU,GAAG,qBAAqB,CAAC,EAAE,EAAE;AAC3C,QAAA,CAAC,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC3D,KAAA,CAAC;AAEF;;AAEG;AACH,IAAA,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAElE,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,EAAE,SAAS,EAAE,kBAAkB,CAAC;AAEvE,IAAA,QACEA,GAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,SAAS,IAAI,SAAS,EAAA,GAAM,IAAI,EAAA,QAAA,EAC5C,QAAQ,EAAA,CACN;AAET;;"}
1
+ {"version":3,"file":"Td.js","sources":["../../../src/elements/Td.tsx"],"sourcesContent":["/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { TableAlignment, validTableAlignments } from './tableAlignment';\n\n/**\n * The values the table `color` prop accepts, as a readonly tuple.\n *\n * `TableColor` is typed from it, and `Tr`, `Th` and `Td` all take a\n * `TableColor`, so the tuple and those props list the same values. Map over\n * it to build a color picker, or check a value that arrives at runtime before\n * passing it in: the components add no color class for a value outside the\n * tuple.\n *\n * @example\n * import { Tr, Td, validTableColors } from '@allxsmith/bestax-bulma';\n *\n * <Tr>\n * {validTableColors.map(color => (\n * <Td key={color} color={color}>\n * {color}\n * </Td>\n * ))}\n * </Tr>;\n */\nexport const validTableColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n] as const;\n\n/**\n * The color values `Tr`, `Th` and `Td` accept, typed from `validTableColors`.\n */\nexport type TableColor = (typeof validTableColors)[number];\n\n/**\n * Props for the Td component.\n */\nexport interface TdProps\n extends\n Omit<React.TdHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text alignment for the table cell ('left', 'right', 'centered'). */\n isAligned?: TableAlignment;\n /** Bulma color modifier for the table cell. */\n color?: TableColor;\n /** Table cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Td component for rendering a styled Bulma table cell.\n *\n * Supports alignment, Bulma color modifiers, and helper classes for additional styling.\n *\n * @function\n * @param {TdProps} props - Props for the Td component.\n * @returns {JSX.Element} The rendered table cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}\n */\nexport const Td: React.FC<TdProps> = ({\n className,\n isAligned,\n color,\n children,\n ...props\n}) => {\n const bulmaClasses = usePrefixedClassNames('', {\n [`has-text-${isAligned}`]:\n isAligned && validTableAlignments.includes(isAligned),\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const tdClasses = classNames(bulmaClasses, className, bulmaHelperClasses);\n\n return (\n <td className={tdClasses || undefined} {...rest}>\n {children}\n </td>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;AAQA;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;IACP,OAAO;;AAyBT;;;;;;;;;AASG;AACI,MAAM,EAAE,GAAsB,CAAC,EACpC,SAAS,EACT,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,KAAI;AACH,IAAA,MAAM,YAAY,GAAG,qBAAqB,CAAC,EAAE,EAAE;AAC7C,QAAA,CAAC,CAAA,SAAA,EAAY,SAAS,CAAA,CAAE,GACtB,SAAS,IAAI,oBAAoB,CAAC,QAAQ,CAAC,SAAS,CAAC;AACvD,QAAA,CAAC,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC3D,KAAA,CAAC;AAEF;;AAEG;AACH,IAAA,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAElE,MAAM,SAAS,GAAG,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC;AAEzE,IAAA,QACEA,GAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAE,SAAS,IAAI,SAAS,EAAA,GAAM,IAAI,EAAA,QAAA,EAC5C,QAAQ,EAAA,CACN;AAET;;"}
@@ -3,8 +3,8 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { usePrefixedClassNames, classNames } from '../helpers/classNames.js';
4
4
  import { useBulmaClasses } from '../helpers/useBulmaClasses.js';
5
5
  import { validTableColors } from './Td.js';
6
+ import { validTableAlignments } from './tableAlignment.js';
6
7
 
7
- const validAlignments = ['left', 'right', 'centered'];
8
8
  /**
9
9
  * Th component for rendering a styled Bulma table header cell.
10
10
  *
@@ -17,7 +17,7 @@ const validAlignments = ['left', 'right', 'centered'];
17
17
  */
18
18
  const Th = ({ className, isAligned, width, color, children, ...props }) => {
19
19
  const bulmaClasses = usePrefixedClassNames('', {
20
- [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
20
+ [`has-text-${isAligned}`]: isAligned && validTableAlignments.includes(isAligned),
21
21
  [`is-${color}`]: color && validTableColors.includes(color),
22
22
  });
23
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Th.js","sources":["../../../src/elements/Th.tsx"],"sourcesContent":["/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { TableColor, validTableColors } from './Td';\n\nconst validAlignments = ['left', 'right', 'centered'] as const;\n/**\n * Valid alignment values for the Th component.\n */\ntype TableAlignment = (typeof validAlignments)[number];\n\n/**\n * Props for the Th component.\n */\nexport interface ThProps\n extends\n Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text alignment for the header cell ('left', 'right', 'centered'). */\n isAligned?: TableAlignment;\n /** Width of the header cell (e.g., '100px' or 100). */\n width?: string | number;\n /** Bulma color modifier for the header cell. */\n color?: TableColor;\n /** Table header cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Th component for rendering a styled Bulma table header cell.\n *\n * Supports alignment, width, and color modifiers.\n *\n * @function\n * @param {ThProps} props - Props for the Th component.\n * @returns {JSX.Element} The rendered table header cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}\n */\nexport const Th: React.FC<ThProps> = ({\n className,\n isAligned,\n width,\n color,\n children,\n ...props\n}) => {\n const bulmaClasses = usePrefixedClassNames('', {\n [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);\n\n return (\n <th\n className={thClasses || undefined}\n style={\n width\n ? { width: typeof width === 'number' ? `${width}px` : width }\n : undefined\n }\n {...rest}\n >\n {children}\n </th>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;AAQA,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,CAAU;AAyB9D;;;;;;;;;AASG;MACU,EAAE,GAAsB,CAAC,EACpC,SAAS,EACT,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,KAAI;AACH,IAAA,MAAM,YAAY,GAAG,qBAAqB,CAAC,EAAE,EAAE;AAC7C,QAAA,CAAC,CAAA,SAAA,EAAY,SAAS,CAAA,CAAE,GAAG,SAAS,IAAI,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC;AAC3E,QAAA,CAAC,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC3D,KAAA,CAAC;AAEF;;AAEG;AACH,IAAA,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAElE,MAAM,SAAS,GAAG,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC;IAEzE,QACEA,GAAA,CAAA,IAAA,EAAA,EACE,SAAS,EAAE,SAAS,IAAI,SAAS,EACjC,KAAK,EACH;AACE,cAAE,EAAE,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,GAAG,KAAK,CAAA,EAAA,CAAI,GAAG,KAAK;cACzD,SAAS,EAAA,GAEX,IAAI,YAEP,QAAQ,EAAA,CACN;AAET;;"}
1
+ {"version":3,"file":"Th.js","sources":["../../../src/elements/Th.tsx"],"sourcesContent":["/**\n * @group Table\n */\nimport React from 'react';\nimport { classNames, usePrefixedClassNames } from '../helpers/classNames';\nimport { useBulmaClasses, BulmaClassesProps } from '../helpers/useBulmaClasses';\nimport { TableColor, validTableColors } from './Td';\nimport { TableAlignment, validTableAlignments } from './tableAlignment';\n\n/**\n * Props for the Th component.\n */\nexport interface ThProps\n extends\n Omit<React.ThHTMLAttributes<HTMLTableCellElement>, 'color'>,\n Omit<BulmaClassesProps, 'backgroundColor' | 'color'> {\n /** Additional CSS classes to apply. */\n className?: string;\n /** Text alignment for the header cell ('left', 'right', 'centered'). */\n isAligned?: TableAlignment;\n /** Width of the header cell (e.g., '100px' or 100). */\n width?: string | number;\n /** Bulma color modifier for the header cell. */\n color?: TableColor;\n /** Table header cell content. */\n children?: React.ReactNode;\n}\n\n/**\n * Th component for rendering a styled Bulma table header cell.\n *\n * Supports alignment, width, and color modifiers.\n *\n * @function\n * @param {ThProps} props - Props for the Th component.\n * @returns {JSX.Element} The rendered table header cell element.\n * @see {@link https://bulma.io/documentation/elements/table/#table-head | Bulma Table documentation}\n */\nexport const Th: React.FC<ThProps> = ({\n className,\n isAligned,\n width,\n color,\n children,\n ...props\n}) => {\n const bulmaClasses = usePrefixedClassNames('', {\n [`has-text-${isAligned}`]:\n isAligned && validTableAlignments.includes(isAligned),\n [`is-${color}`]: color && validTableColors.includes(color),\n });\n\n /**\n * Generates Bulma helper classes and separates out remaining props.\n */\n const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });\n\n const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);\n\n return (\n <th\n className={thClasses || undefined}\n style={\n width\n ? { width: typeof width === 'number' ? `${width}px` : width }\n : undefined\n }\n {...rest}\n >\n {children}\n </th>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;;AA4BA;;;;;;;;;AASG;MACU,EAAE,GAAsB,CAAC,EACpC,SAAS,EACT,SAAS,EACT,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,KAAI;AACH,IAAA,MAAM,YAAY,GAAG,qBAAqB,CAAC,EAAE,EAAE;AAC7C,QAAA,CAAC,CAAA,SAAA,EAAY,SAAS,CAAA,CAAE,GACtB,SAAS,IAAI,oBAAoB,CAAC,QAAQ,CAAC,SAAS,CAAC;AACvD,QAAA,CAAC,CAAA,GAAA,EAAM,KAAK,CAAA,CAAE,GAAG,KAAK,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAC3D,KAAA,CAAC;AAEF;;AAEG;AACH,IAAA,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;IAElE,MAAM,SAAS,GAAG,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE,kBAAkB,CAAC;IAEzE,QACEA,GAAA,CAAA,IAAA,EAAA,EACE,SAAS,EAAE,SAAS,IAAI,SAAS,EACjC,KAAK,EACH;AACE,cAAE,EAAE,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,GAAG,KAAK,CAAA,EAAA,CAAI,GAAG,KAAK;cACzD,SAAS,EAAA,GAEX,IAAI,YAEP,QAAQ,EAAA,CACN;AAET;;"}
@@ -0,0 +1,16 @@
1
+ /* @allxsmith/bestax-bulma — AI agents: see AGENTS.md in the package root, or https://bestax.io/llms.txt */
2
+ /**
3
+ * The `isAligned` values `Th` and `Td` accept. Each one writes
4
+ * `has-text-<value>` on the cell, and a value outside the tuple adds no class.
5
+ *
6
+ * One copy, imported by both cells, so a header and its body cells always
7
+ * take the same values.
8
+ *
9
+ * Its own module rather than `Th.tsx` or `Td.tsx` because `src/index.ts`
10
+ * wildcard-exports those files, and everything published there is public
11
+ * forever. `iconProps.ts` makes the same call.
12
+ */
13
+ const validTableAlignments = ['left', 'right', 'centered'];
14
+
15
+ export { validTableAlignments };
16
+ //# sourceMappingURL=tableAlignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableAlignment.js","sources":["../../../src/elements/tableAlignment.ts"],"sourcesContent":["/**\n * The `isAligned` values `Th` and `Td` accept. Each one writes\n * `has-text-<value>` on the cell, and a value outside the tuple adds no class.\n *\n * One copy, imported by both cells, so a header and its body cells always\n * take the same values.\n *\n * Its own module rather than `Th.tsx` or `Td.tsx` because `src/index.ts`\n * wildcard-exports those files, and everything published there is public\n * forever. `iconProps.ts` makes the same call.\n */\nexport const validTableAlignments = ['left', 'right', 'centered'] as const;\n\n/**\n * Valid alignment values for the Th and Td components.\n */\nexport type TableAlignment = (typeof validTableAlignments)[number];\n"],"names":[],"mappings":";AAAA;;;;;;;;;;AAUG;AACI,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU;;"}
@@ -115,7 +115,7 @@ const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'];
115
115
  * Valid Bulma text alignment classes.
116
116
  * @example 'centered', 'left', 'right'
117
117
  */
118
- const validAlignments$1 = [
118
+ const validAlignments = [
119
119
  'centered',
120
120
  'justified',
121
121
  'left',
@@ -411,5 +411,5 @@ const createBulmaClassHelpers = (classPrefix, viewport) => {
411
411
  return { classes, addPrefixedClass, addClass, addClassNoViewport };
412
412
  };
413
413
 
414
- export { createBulmaClassHelpers, cursorClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validAspectRatios, validAxisOverflows, validColorShades, validColors, validCursors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFloats, validFontFamilies, validGaps, validInteractions, validJustifyContents, validOverflows, validPositions, validRadii, validResponsives, validSchemeColors, validShadows, validSizes$1 as validSizes, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
414
+ export { createBulmaClassHelpers, cursorClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments, validAspectRatios, validAxisOverflows, validColorShades, validColors, validCursors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFloats, validFontFamilies, validGaps, validInteractions, validJustifyContents, validOverflows, validPositions, validRadii, validResponsives, validSchemeColors, validShadows, validSizes$1 as validSizes, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
415
415
  //# sourceMappingURL=bulmaClassHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bulmaClassHelpers.js","sources":["../../../src/helpers/bulmaClassHelpers.ts"],"sourcesContent":["/**\n * Valid Bulma color classes.\n * @example 'primary', 'link', 'info'\n */\nexport const validColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'black-bis',\n 'black-ter',\n 'grey-darker',\n 'grey-dark',\n 'grey',\n 'grey-light',\n 'grey-lighter',\n 'white',\n 'white-bis',\n 'white-ter',\n 'light',\n 'dark',\n] as const;\n\n/**\n * Valid Bulma color shade suffixes.\n * @example '00', '05', 'invert', 'light', 'dark', 'soft', 'bold', 'on-scheme'\n */\nexport const validColorShades = [\n '00',\n '05',\n '10',\n '15',\n '20',\n '25',\n '30',\n '35',\n '40',\n '45',\n '50',\n '55',\n '60',\n '65',\n '70',\n '75',\n '80',\n '85',\n '90',\n '95',\n 'invert',\n 'light',\n 'dark',\n 'soft',\n 'bold',\n 'on-scheme',\n] as const;\n\n/**\n * Valid Bulma scheme color names for scheme-aware backgrounds.\n *\n * Bulma ships no `has-background-scheme-*` helper classes, so these values\n * never emit a class — components render them as a dark-mode-safe inline\n * `background-color: var(--bulma-<value>)` style instead.\n * @example 'scheme-main', 'scheme-main-bis', 'scheme-invert'\n */\nexport const validSchemeColors = [\n 'scheme-main',\n 'scheme-main-bis',\n 'scheme-main-ter',\n 'scheme-invert',\n 'scheme-invert-bis',\n 'scheme-invert-ter',\n] as const;\n\n/**\n * Valid Bulma size classes for margins and paddings.\n * @example '0', '1', 'auto'\n */\nexport const validSizes = ['0', '1', '2', '3', '4', '5', '6', 'auto'] as const;\n\n/**\n * Valid Bulma gap steps, taken by `gap`, `columnGap` and `rowGap`. Each whole\n * step is 0.5rem, so `2` is 1rem and `8` is 4rem, and the half steps sit\n * between them. They render `is-gap-<value>`, `is-column-gap-<value>` and\n * `is-row-gap-<value>`.\n *\n * This is a different scale from `validSizes`: `gap=\"2\"` is 1rem where\n * `m=\"2\"` is 0.5rem.\n * @example '0', '0.5', '2', '8'\n */\nexport const validGaps = [\n '0',\n '0.5',\n '1',\n '1.5',\n '2',\n '2.5',\n '3',\n '3.5',\n '4',\n '4.5',\n '5',\n '5.5',\n '6',\n '6.5',\n '7',\n '7.5',\n '8',\n] as const;\n\n// Spelled out rather than built from `validGaps` so the API docs can print\n// it; a type test in useSpacingClasses.test.tsx holds both halves to the\n// tuple.\n/**\n * A gap step as `gap`, `columnGap` and `rowGap` take it: a value from\n * `validGaps`, or the same step written as a number (`gap={2}`,\n * `gap={1.5}`). `Grid` took its gaps as numbers before the gap helpers were\n * shared, so every gap prop still does.\n */\nexport type BulmaGapStep =\n | '0'\n | '0.5'\n | '1'\n | '1.5'\n | '2'\n | '2.5'\n | '3'\n | '3.5'\n | '4'\n | '4.5'\n | '5'\n | '5.5'\n | '6'\n | '6.5'\n | '7'\n | '7.5'\n | '8'\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 4.5\n | 5\n | 5.5\n | 6\n | 6.5\n | 7\n | 7.5\n | 8;\n\n/**\n * Valid Bulma text size classes.\n * @example '1', '2', '3'\n */\nexport const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'] as const;\n\n/**\n * Valid Bulma text alignment classes.\n * @example 'centered', 'left', 'right'\n */\nexport const validAlignments = [\n 'centered',\n 'justified',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma text transformation classes.\n * @example 'capitalized', 'uppercase', 'italic'\n */\nexport const validTextTransforms = [\n 'capitalized',\n 'lowercase',\n 'uppercase',\n 'italic',\n] as const;\n\n/**\n * Valid Bulma text weight classes.\n * @example 'light', 'normal', 'bold'\n */\nexport const validTextWeights = [\n 'light',\n 'normal',\n 'medium',\n 'semibold',\n 'bold',\n] as const;\n\n/**\n * Valid Bulma font family classes.\n * @example 'sans-serif', 'monospace', 'code'\n */\nexport const validFontFamilies = [\n 'sans-serif',\n 'monospace',\n 'primary',\n 'secondary',\n 'code',\n] as const;\n\n/**\n * Valid Bulma display classes.\n * @example 'block', 'flex', 'inline'\n */\nexport const validDisplays = [\n 'block',\n 'flex',\n 'inline',\n 'inline-block',\n 'inline-flex',\n 'grid',\n] as const;\n\n/**\n * Valid Bulma visibility classes.\n * These are all the valid visibility options available in Bulma.\n * @example 'hidden', 'sr-only', 'invisible'\n */\nexport const validVisibilities = ['hidden', 'sr-only', 'invisible'] as const;\n\n/**\n * Valid Bulma flex direction classes.\n * @example 'row', 'column', 'row-reverse'\n */\nexport const validFlexDirections = [\n 'row',\n 'row-reverse',\n 'column',\n 'column-reverse',\n] as const;\n\n/**\n * Valid Bulma flex wrap classes.\n * @example 'nowrap', 'wrap', 'wrap-reverse'\n */\nexport const validFlexWraps = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\n/**\n * Valid Bulma justify-content classes.\n * @example 'flex-start', 'center', 'space-between'\n */\nexport const validJustifyContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'start',\n 'end',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma align-content classes.\n * @example 'flex-start', 'center', 'stretch'\n */\nexport const validAlignContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma align-items classes.\n * @example 'stretch', 'flex-start', 'center'\n */\nexport const validAlignItems = [\n 'stretch',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'start',\n 'end',\n] as const;\n\n/**\n * Valid Bulma align-self classes.\n * @example 'auto', 'flex-start', 'center'\n */\nexport const validAlignSelfs = [\n 'auto',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma flex grow and shrink values.\n * @example '0', '1', '2', '3', '4', '5'\n */\nexport const validFlexGrowShrink = ['0', '1', '2', '3', '4', '5'] as const;\n\n/**\n * Valid Bulma viewport classes for responsive design.\n * @example 'mobile', 'tablet', 'desktop'\n */\nexport const validViewports = [\n 'mobile',\n 'tablet',\n 'tablet-only',\n 'touch',\n 'desktop',\n 'desktop-only',\n 'widescreen',\n 'widescreen-only',\n 'fullhd',\n] as const;\n\n/**\n * Valid Bulma float classes.\n * @example 'left', 'right'\n */\nexport const validFloats = ['left', 'right'] as const;\n\n/**\n * Valid Bulma overflow values for one axis, taken by `overflowX` and\n * `overflowY`. Each renders `is-overflow-x-<value>` or `is-overflow-y-<value>`.\n * @example 'auto', 'hidden', 'scroll'\n */\nexport const validAxisOverflows = [\n 'auto',\n 'clip',\n 'hidden',\n 'scroll',\n 'visible',\n] as const;\n\n/**\n * Valid Bulma overflow values for `overflow`.\n *\n * `clipped` renders `is-clipped`, the helper `overflow` started with. Every\n * other value renders `is-overflow-<value>`.\n * @example 'clipped', 'auto', 'hidden'\n */\nexport const validOverflows = ['clipped', ...validAxisOverflows] as const;\n\n/**\n * Valid Bulma position values, taken by `pos`. Each renders\n * `is-position-<value>`.\n * @example 'relative', 'absolute', 'sticky'\n */\nexport const validPositions = [\n 'absolute',\n 'fixed',\n 'relative',\n 'static',\n 'sticky',\n] as const;\n\n/**\n * Valid Bulma aspect ratios, taken by `aspectRatio`. Each renders\n * `is-aspect-ratio-<value>`.\n * @example '1by1', '4by3', '16by9'\n */\nexport const validAspectRatios = [\n '1by1',\n '5by4',\n '4by3',\n '3by2',\n '5by3',\n '16by9',\n '2by1',\n '3by1',\n '4by5',\n '3by4',\n '2by3',\n '3by5',\n '9by16',\n '1by2',\n '1by3',\n] as const;\n\n/**\n * Valid Bulma interaction classes.\n * @example 'unselectable', 'clickable'\n */\nexport const validInteractions = ['unselectable', 'clickable'] as const;\n\n/**\n * Valid Bulma cursor helper values.\n *\n * These share no class stem: `pointer` renders `is-clickable` and `help`\n * renders `is-cursor-help`, so the class each one emits lives in\n * `cursorClasses` rather than being built from the value.\n * @example 'pointer', 'help'\n */\nexport const validCursors = ['pointer', 'help'] as const;\n\n/**\n * Cursor helper value to the class it renders.\n *\n * A `Record` over `validCursors` on purpose: TypeScript then rejects a value\n * added to the tuple with no class for it, and a class for a value the tuple\n * does not carry, so the accepted set and the rendered classes cannot drift\n * apart.\n */\nexport const cursorClasses: Record<(typeof validCursors)[number], string> = {\n pointer: 'is-clickable',\n help: 'is-cursor-help',\n};\n\n/**\n * Valid Bulma border-radius helper values.\n *\n * `radiusless` renders `is-radiusless` and removes the radius. The sizes\n * render `has-radius-<value>` and set one from Bulma's radius scale.\n * @example 'radiusless', 'small', 'rounded'\n */\nexport const validRadii = [\n 'radiusless',\n 'small',\n 'normal',\n 'large',\n 'rounded',\n] as const;\n\n/**\n * Valid Bulma shadow helper classes.\n * @example 'shadowless'\n */\nexport const validShadows = ['shadowless'] as const;\n\n/**\n * Valid Bulma responsive helper classes.\n * @example 'mobile', 'narrow'\n */\nexport const validResponsives = ['mobile', 'narrow'] as const;\n\n/**\n * Props for applying a Bulma viewport modifier to viewport-aware helper classes.\n */\nexport interface BulmaViewportProps {\n /** Viewport for responsive classes (e.g., 'mobile', 'desktop'). */\n viewport?: (typeof validViewports)[number];\n}\n\n/**\n * Props for applying Bulma display helper classes, including viewport-specific\n * display variants.\n */\nexport interface BulmaDisplayProps {\n /** Display type (e.g., 'block', 'flex'). */\n display?: (typeof validDisplays)[number] | 'none';\n /** Display type for mobile viewport (up to 768px). */\n displayMobile?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet viewport (769px - 1023px). */\n displayTablet?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet-only viewport (769px - 1023px, excludes desktop+). */\n displayTabletOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for touch viewport (up to 1023px; mobile + tablet). */\n displayTouch?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop viewport (1024px - 1215px). */\n displayDesktop?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n displayDesktopOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen viewport (1216px - 1407px). */\n displayWidescreen?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n displayWidescreenOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for fullhd viewport (1408px and above). */\n displayFullhd?: (typeof validDisplays)[number] | 'none';\n}\n\n/**\n * Creates the shared class-building helpers used by the Bulma helper hooks.\n *\n * Returns a mutable `classes` array along with the helper functions that push\n * (optionally prefixed, optionally viewport-suffixed) class names onto it.\n *\n * @internal\n * @param classPrefix - Optional prefix applied to all generated class names.\n * @param viewport - Optional viewport modifier for viewport-aware classes.\n */\nexport const createBulmaClassHelpers = (\n classPrefix?: string,\n viewport?: (typeof validViewports)[number]\n) => {\n const classes: string[] = [];\n\n // Helper function to add class with prefix support\n const addPrefixedClass = (className: string) => {\n classes.push(classPrefix ? `${classPrefix}${className}` : className);\n };\n\n // Helper to add class with optional viewport\n //\n // `supportedViewports` narrows which viewports may be suffixed onto this\n // class. It defaults to every viewport, but a few Bulma helper families\n // (notably `is-size-*`, which ships no `-only` bands) support only a subset,\n // so passing the emitting set keeps us from producing dead classes.\n const addClass = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[],\n supportsViewport = false,\n supportedViewports: readonly string[] = validViewports\n ) => {\n if (value && validValues.includes(value)) {\n const className =\n supportsViewport &&\n viewport &&\n validViewports.includes(viewport) &&\n supportedViewports.includes(viewport)\n ? `${prefix}-${value}-${viewport}`\n : `${prefix}-${value}`;\n addPrefixedClass(className);\n }\n };\n\n // Helper specifically for classes that never support viewport modifiers\n const addClassNoViewport = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[]\n ) => {\n if (value && (!validValues.length || validValues.includes(value))) {\n addPrefixedClass(`${prefix}-${value}`);\n }\n };\n\n return { classes, addPrefixedClass, addClass, addClassNoViewport };\n};\n"],"names":["validSizes","validAlignments"],"mappings":";AAAA;;;AAGG;AACI,MAAM,WAAW,GAAG;IACzB,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,MAAM;IACN,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,WAAW;IACX,OAAO;IACP,MAAM;;AAGR;;;AAGG;AACI,MAAM,gBAAgB,GAAG;IAC9B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;;AAGb;;;;;;;AAOG;AACI,MAAM,iBAAiB,GAAG;IAC/B,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,mBAAmB;;AAGrB;;;AAGG;MACUA,YAAU,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM;AAEpE;;;;;;;;;AASG;AACI,MAAM,SAAS,GAAG;IACvB,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,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C,CAAC,EAAE;AACjE,YAAA,gBAAgB,CAAC,CAAA,EAAG,MAAM,IAAI,KAAK,CAAA,CAAE,CAAC;QACxC;AACF,IAAA,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE;AACpE;;"}
1
+ {"version":3,"file":"bulmaClassHelpers.js","sources":["../../../src/helpers/bulmaClassHelpers.ts"],"sourcesContent":["/**\n * Valid Bulma color classes.\n * @example 'primary', 'link', 'info'\n */\nexport const validColors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'black-bis',\n 'black-ter',\n 'grey-darker',\n 'grey-dark',\n 'grey',\n 'grey-light',\n 'grey-lighter',\n 'white',\n 'white-bis',\n 'white-ter',\n 'light',\n 'dark',\n] as const;\n\n/**\n * Valid Bulma color shade suffixes.\n * @example '00', '05', 'invert', 'light', 'dark', 'soft', 'bold', 'on-scheme'\n */\nexport const validColorShades = [\n '00',\n '05',\n '10',\n '15',\n '20',\n '25',\n '30',\n '35',\n '40',\n '45',\n '50',\n '55',\n '60',\n '65',\n '70',\n '75',\n '80',\n '85',\n '90',\n '95',\n 'invert',\n 'light',\n 'dark',\n 'soft',\n 'bold',\n 'on-scheme',\n] as const;\n\n/**\n * Valid Bulma scheme color names for scheme-aware backgrounds.\n *\n * Bulma ships no `has-background-scheme-*` helper classes, so these values\n * never emit a class — components render them as a dark-mode-safe inline\n * `background-color: var(--bulma-<value>)` style instead.\n * @example 'scheme-main', 'scheme-main-bis', 'scheme-invert'\n */\nexport const validSchemeColors = [\n 'scheme-main',\n 'scheme-main-bis',\n 'scheme-main-ter',\n 'scheme-invert',\n 'scheme-invert-bis',\n 'scheme-invert-ter',\n] as const;\n\n/**\n * Valid Bulma size classes for margins and paddings.\n * @example '0', '1', 'auto'\n */\nexport const validSizes = ['0', '1', '2', '3', '4', '5', '6', 'auto'] as const;\n\n/**\n * Valid Bulma gap steps, taken by `gap`, `columnGap` and `rowGap`. Each whole\n * step is 0.5rem, so `2` is 1rem and `8` is 4rem, and the half steps sit\n * between them. They render `is-gap-<value>`, `is-column-gap-<value>` and\n * `is-row-gap-<value>`.\n *\n * This is a different scale from `validSizes`: `gap=\"2\"` is 1rem where\n * `m=\"2\"` is 0.5rem.\n * @example '0', '0.5', '2', '8'\n */\nexport const validGaps = [\n '0',\n '0.5',\n '1',\n '1.5',\n '2',\n '2.5',\n '3',\n '3.5',\n '4',\n '4.5',\n '5',\n '5.5',\n '6',\n '6.5',\n '7',\n '7.5',\n '8',\n] as const;\n\n// Spelled out rather than built from `validGaps` so the API docs can print\n// it; a type test in useSpacingClasses.test.tsx holds both halves to the\n// tuple.\n/**\n * A gap step as `gap`, `columnGap` and `rowGap` take it: a value from\n * `validGaps`, or the same step written as a number (`gap={2}`,\n * `gap={1.5}`). `Grid` took its gaps as numbers before the gap helpers were\n * shared, so every gap prop still does.\n */\nexport type BulmaGapStep =\n | '0'\n | '0.5'\n | '1'\n | '1.5'\n | '2'\n | '2.5'\n | '3'\n | '3.5'\n | '4'\n | '4.5'\n | '5'\n | '5.5'\n | '6'\n | '6.5'\n | '7'\n | '7.5'\n | '8'\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 4.5\n | 5\n | 5.5\n | 6\n | 6.5\n | 7\n | 7.5\n | 8;\n\n/**\n * Valid Bulma text size classes.\n * @example '1', '2', '3'\n */\nexport const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'] as const;\n\n/**\n * Valid Bulma text alignment classes.\n * @example 'centered', 'left', 'right'\n */\nexport const validAlignments = [\n 'centered',\n 'justified',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma text transformation classes.\n * @example 'capitalized', 'uppercase', 'italic'\n */\nexport const validTextTransforms = [\n 'capitalized',\n 'lowercase',\n 'uppercase',\n 'italic',\n] as const;\n\n/**\n * Valid Bulma text weight classes.\n * @example 'light', 'normal', 'bold'\n */\nexport const validTextWeights = [\n 'light',\n 'normal',\n 'medium',\n 'semibold',\n 'bold',\n] as const;\n\n/**\n * Valid Bulma font family classes.\n * @example 'sans-serif', 'monospace', 'code'\n */\nexport const validFontFamilies = [\n 'sans-serif',\n 'monospace',\n 'primary',\n 'secondary',\n 'code',\n] as const;\n\n/**\n * Valid Bulma display classes.\n * @example 'block', 'flex', 'inline'\n */\nexport const validDisplays = [\n 'block',\n 'flex',\n 'inline',\n 'inline-block',\n 'inline-flex',\n 'grid',\n] as const;\n\n/**\n * Valid Bulma visibility classes.\n * These are all the valid visibility options available in Bulma.\n * @example 'hidden', 'sr-only', 'invisible'\n */\nexport const validVisibilities = ['hidden', 'sr-only', 'invisible'] as const;\n\n/**\n * Valid Bulma flex direction classes.\n * @example 'row', 'column', 'row-reverse'\n */\nexport const validFlexDirections = [\n 'row',\n 'row-reverse',\n 'column',\n 'column-reverse',\n] as const;\n\n/**\n * Valid Bulma flex wrap classes.\n * @example 'nowrap', 'wrap', 'wrap-reverse'\n */\nexport const validFlexWraps = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\n/**\n * Valid Bulma justify-content classes.\n * @example 'flex-start', 'center', 'space-between'\n */\nexport const validJustifyContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'start',\n 'end',\n 'left',\n 'right',\n] as const;\n\n/**\n * Valid Bulma align-content classes.\n * @example 'flex-start', 'center', 'stretch'\n */\nexport const validAlignContents = [\n 'flex-start',\n 'flex-end',\n 'center',\n 'space-between',\n 'space-around',\n 'space-evenly',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma align-items classes.\n * @example 'stretch', 'flex-start', 'center'\n */\nexport const validAlignItems = [\n 'stretch',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'start',\n 'end',\n] as const;\n\n/**\n * Valid Bulma align-self classes.\n * @example 'auto', 'flex-start', 'center'\n */\nexport const validAlignSelfs = [\n 'auto',\n 'flex-start',\n 'flex-end',\n 'center',\n 'baseline',\n 'stretch',\n] as const;\n\n/**\n * Valid Bulma flex grow and shrink values.\n * @example '0', '1', '2', '3', '4', '5'\n */\nexport const validFlexGrowShrink = ['0', '1', '2', '3', '4', '5'] as const;\n\n/**\n * Valid Bulma viewport classes for responsive design.\n * @example 'mobile', 'tablet', 'desktop'\n */\nexport const validViewports = [\n 'mobile',\n 'tablet',\n 'tablet-only',\n 'touch',\n 'desktop',\n 'desktop-only',\n 'widescreen',\n 'widescreen-only',\n 'fullhd',\n] as const;\n\n/**\n * Valid Bulma float classes.\n * @example 'left', 'right'\n */\nexport const validFloats = ['left', 'right'] as const;\n\n/**\n * Valid Bulma overflow values for one axis, taken by `overflowX` and\n * `overflowY`. Each renders `is-overflow-x-<value>` or `is-overflow-y-<value>`.\n * @example 'auto', 'hidden', 'scroll'\n */\nexport const validAxisOverflows = [\n 'auto',\n 'clip',\n 'hidden',\n 'scroll',\n 'visible',\n] as const;\n\n/**\n * Valid Bulma overflow values for `overflow`.\n *\n * `clipped` renders `is-clipped`, the helper `overflow` started with. Every\n * other value renders `is-overflow-<value>`.\n * @example 'clipped', 'auto', 'hidden'\n */\nexport const validOverflows = ['clipped', ...validAxisOverflows] as const;\n\n/**\n * Valid Bulma position values, taken by `pos`. Each renders\n * `is-position-<value>`.\n * @example 'relative', 'absolute', 'sticky'\n */\nexport const validPositions = [\n 'absolute',\n 'fixed',\n 'relative',\n 'static',\n 'sticky',\n] as const;\n\n/**\n * Valid Bulma aspect ratios, taken by `aspectRatio`. Each renders\n * `is-aspect-ratio-<value>`.\n * @example '1by1', '4by3', '16by9'\n */\nexport const validAspectRatios = [\n '1by1',\n '5by4',\n '4by3',\n '3by2',\n '5by3',\n '16by9',\n '2by1',\n '3by1',\n '4by5',\n '3by4',\n '2by3',\n '3by5',\n '9by16',\n '1by2',\n '1by3',\n] as const;\n\n/**\n * Valid Bulma interaction classes.\n * @example 'unselectable', 'clickable'\n */\nexport const validInteractions = ['unselectable', 'clickable'] as const;\n\n/**\n * Valid Bulma cursor helper values.\n *\n * These share no class stem: `pointer` renders `is-clickable` and `help`\n * renders `is-cursor-help`, so the class each one emits lives in\n * `cursorClasses` rather than being built from the value.\n * @example 'pointer', 'help'\n */\nexport const validCursors = ['pointer', 'help'] as const;\n\n/**\n * Cursor helper value to the class it renders.\n *\n * A `Record` over `validCursors` on purpose: TypeScript then rejects a value\n * added to the tuple with no class for it, and a class for a value the tuple\n * does not carry, so the accepted set and the rendered classes cannot drift\n * apart.\n */\nexport const cursorClasses: Record<(typeof validCursors)[number], string> = {\n pointer: 'is-clickable',\n help: 'is-cursor-help',\n};\n\n/**\n * Valid Bulma border-radius helper values.\n *\n * `radiusless` renders `is-radiusless` and removes the radius. The sizes\n * render `has-radius-<value>` and set one from Bulma's radius scale.\n * @example 'radiusless', 'small', 'rounded'\n */\nexport const validRadii = [\n 'radiusless',\n 'small',\n 'normal',\n 'large',\n 'rounded',\n] as const;\n\n/**\n * Valid Bulma shadow helper classes.\n * @example 'shadowless'\n */\nexport const validShadows = ['shadowless'] as const;\n\n/**\n * Valid Bulma responsive helper classes.\n * @example 'mobile', 'narrow'\n */\nexport const validResponsives = ['mobile', 'narrow'] as const;\n\n/**\n * Props for applying a Bulma viewport modifier to viewport-aware helper classes.\n */\nexport interface BulmaViewportProps {\n /** Viewport for responsive classes (e.g., 'mobile', 'desktop'). */\n viewport?: (typeof validViewports)[number];\n}\n\n/**\n * Props for applying Bulma display helper classes, including viewport-specific\n * display variants.\n */\nexport interface BulmaDisplayProps {\n /** Display type (e.g., 'block', 'flex'). */\n display?: (typeof validDisplays)[number] | 'none';\n /** Display type for mobile viewport (up to 768px). */\n displayMobile?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet viewport (769px - 1023px). */\n displayTablet?: (typeof validDisplays)[number] | 'none';\n /** Display type for tablet-only viewport (769px - 1023px, excludes desktop+). */\n displayTabletOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for touch viewport (up to 1023px; mobile + tablet). */\n displayTouch?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop viewport (1024px - 1215px). */\n displayDesktop?: (typeof validDisplays)[number] | 'none';\n /** Display type for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n displayDesktopOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen viewport (1216px - 1407px). */\n displayWidescreen?: (typeof validDisplays)[number] | 'none';\n /** Display type for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n displayWidescreenOnly?: (typeof validDisplays)[number] | 'none';\n /** Display type for fullhd viewport (1408px and above). */\n displayFullhd?: (typeof validDisplays)[number] | 'none';\n}\n\n/**\n * Creates the shared class-building helpers used by the Bulma helper hooks.\n *\n * Returns a mutable `classes` array along with the helper functions that push\n * (optionally prefixed, optionally viewport-suffixed) class names onto it.\n *\n * @internal\n * @param classPrefix - Optional prefix applied to all generated class names.\n * @param viewport - Optional viewport modifier for viewport-aware classes.\n */\nexport const createBulmaClassHelpers = (\n classPrefix?: string,\n viewport?: (typeof validViewports)[number]\n) => {\n const classes: string[] = [];\n\n // Helper function to add class with prefix support\n const addPrefixedClass = (className: string) => {\n classes.push(classPrefix ? `${classPrefix}${className}` : className);\n };\n\n // Helper to add class with optional viewport\n //\n // `supportedViewports` narrows which viewports may be suffixed onto this\n // class. It defaults to every viewport, but a few Bulma helper families\n // (notably `is-size-*`, which ships no `-only` bands) support only a subset,\n // so passing the emitting set keeps us from producing dead classes.\n const addClass = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[],\n supportsViewport = false,\n supportedViewports: readonly string[] = validViewports\n ) => {\n if (value && validValues.includes(value)) {\n const className =\n supportsViewport &&\n viewport &&\n validViewports.includes(viewport) &&\n supportedViewports.includes(viewport)\n ? `${prefix}-${value}-${viewport}`\n : `${prefix}-${value}`;\n addPrefixedClass(className);\n }\n };\n\n // Helper specifically for classes that never support viewport modifiers\n const addClassNoViewport = (\n prefix: string,\n value: string | undefined,\n validValues: readonly string[]\n ) => {\n if (value && (!validValues.length || validValues.includes(value))) {\n addPrefixedClass(`${prefix}-${value}`);\n }\n };\n\n return { classes, addPrefixedClass, addClass, addClassNoViewport };\n};\n"],"names":["validSizes"],"mappings":";AAAA;;;AAGG;AACI,MAAM,WAAW,GAAG;IACzB,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,MAAM;IACN,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,WAAW;IACX,OAAO;IACP,MAAM;;AAGR;;;AAGG;AACI,MAAM,gBAAgB,GAAG;IAC9B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,WAAW;;AAGb;;;;;;;AAOG;AACI,MAAM,iBAAiB,GAAG;IAC/B,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,mBAAmB;;AAGrB;;;AAGG;MACUA,YAAU,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM;AAEpE;;;;;;;;;AASG;AACI,MAAM,SAAS,GAAG;IACvB,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;IACH,KAAK;IACL,GAAG;;AAgDL;;;AAGG;AACI,MA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gBAAgB,EAAE,QAAQ,EAAE,kBAAkB,EAAE;AACpE;;"}
package/dist/index.cjs CHANGED
@@ -310,7 +310,7 @@ const validTextSizes = ['1', '2', '3', '4', '5', '6', '7'];
310
310
  * Valid Bulma text alignment classes.
311
311
  * @example 'centered', 'left', 'right'
312
312
  */
313
- const validAlignments$1 = [
313
+ const validAlignments = [
314
314
  'centered',
315
315
  'justified',
316
316
  'left',
@@ -793,7 +793,7 @@ const useTypographyClasses = (props) => {
793
793
  // three `-only` bands, so restrict the viewport suffix to the ones it ships
794
794
  // — otherwise `viewport="tablet-only"` would render a dead `is-size-N-tablet-only`.
795
795
  addClass('is-size', textSize, validTextSizes, true, sizeSupportedViewports); // supports viewport (no `-only` bands)
796
- addClass('has-text', textAlign, validAlignments$1, true); // supports viewport (all bands)
796
+ addClass('has-text', textAlign, validAlignments, true); // supports viewport (all bands)
797
797
  addClassNoViewport('is', textTransform, validTextTransforms); // no viewport support
798
798
  addClassNoViewport('has-text-weight', textWeight, validTextWeights); // no viewport support
799
799
  addClassNoViewport('is-family', fontFamily, validFontFamilies); // no viewport support
@@ -810,7 +810,7 @@ const useTypographyClasses = (props) => {
810
810
  addViewportSpecificTextSizeClass(textSizeFullhd, '-fullhd');
811
811
  // Viewport-specific text alignment
812
812
  const addViewportSpecificTextAlignClass = (value, viewportSuffix) => {
813
- if (value && validAlignments$1.includes(value)) {
813
+ if (value && validAlignments.includes(value)) {
814
814
  addPrefixedClass(`has-text-${value}${viewportSuffix}`);
815
815
  }
816
816
  };
@@ -12130,6 +12130,19 @@ const Tfoot = ({ className, children, ...props }) => {
12130
12130
  return (jsxRuntime.jsx("tfoot", { className: tfootClasses || undefined, ...rest, children: children }));
12131
12131
  };
12132
12132
 
12133
+ /**
12134
+ * The `isAligned` values `Th` and `Td` accept. Each one writes
12135
+ * `has-text-<value>` on the cell, and a value outside the tuple adds no class.
12136
+ *
12137
+ * One copy, imported by both cells, so a header and its body cells always
12138
+ * take the same values.
12139
+ *
12140
+ * Its own module rather than `Th.tsx` or `Td.tsx` because `src/index.ts`
12141
+ * wildcard-exports those files, and everything published there is public
12142
+ * forever. `iconProps.ts` makes the same call.
12143
+ */
12144
+ const validTableAlignments = ['left', 'right', 'centered'];
12145
+
12133
12146
  /**
12134
12147
  * The values the table `color` prop accepts, as a readonly tuple.
12135
12148
  *
@@ -12165,22 +12178,23 @@ const validTableColors = [
12165
12178
  /**
12166
12179
  * Td component for rendering a styled Bulma table cell.
12167
12180
  *
12168
- * Supports Bulma color modifiers and helper classes for additional styling.
12181
+ * Supports alignment, Bulma color modifiers, and helper classes for additional styling.
12169
12182
  *
12170
12183
  * @function
12171
12184
  * @param {TdProps} props - Props for the Td component.
12172
12185
  * @returns {JSX.Element} The rendered table cell element.
12173
12186
  * @see {@link https://bulma.io/documentation/elements/table/#table-body | Bulma Table documentation}
12174
12187
  */
12175
- const Td = ({ className, color, children, ...props }) => {
12176
- const colorClass = usePrefixedClassNames('', {
12188
+ const Td = ({ className, isAligned, color, children, ...props }) => {
12189
+ const bulmaClasses = usePrefixedClassNames('', {
12190
+ [`has-text-${isAligned}`]: isAligned && validTableAlignments.includes(isAligned),
12177
12191
  [`is-${color}`]: color && validTableColors.includes(color),
12178
12192
  });
12179
12193
  /**
12180
12194
  * Generates Bulma helper classes and separates out remaining props.
12181
12195
  */
12182
12196
  const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
12183
- const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
12197
+ const tdClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
12184
12198
  return (jsxRuntime.jsx("td", { className: tdClasses || undefined, ...rest, children: children }));
12185
12199
  };
12186
12200
 
@@ -12207,7 +12221,6 @@ const Tr = ({ className, isSelected, color, children, ...props }) => {
12207
12221
  return (jsxRuntime.jsx("tr", { className: trClasses || undefined, ...rest, children: children }));
12208
12222
  };
12209
12223
 
12210
- const validAlignments = ['left', 'right', 'centered'];
12211
12224
  /**
12212
12225
  * Th component for rendering a styled Bulma table header cell.
12213
12226
  *
@@ -12220,7 +12233,7 @@ const validAlignments = ['left', 'right', 'centered'];
12220
12233
  */
12221
12234
  const Th = ({ className, isAligned, width, color, children, ...props }) => {
12222
12235
  const bulmaClasses = usePrefixedClassNames('', {
12223
- [`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
12236
+ [`has-text-${isAligned}`]: isAligned && validTableAlignments.includes(isAligned),
12224
12237
  [`is-${color}`]: color && validTableColors.includes(color),
12225
12238
  });
12226
12239
  /**
@@ -22468,7 +22481,7 @@ exports.useVisibilityClasses = useVisibilityClasses;
22468
22481
  exports.validAlignContents = validAlignContents;
22469
22482
  exports.validAlignItems = validAlignItems;
22470
22483
  exports.validAlignSelfs = validAlignSelfs;
22471
- exports.validAlignments = validAlignments$1;
22484
+ exports.validAlignments = validAlignments;
22472
22485
  exports.validAspectRatios = validAspectRatios;
22473
22486
  exports.validAxisOverflows = validAxisOverflows;
22474
22487
  exports.validColorShades = validColorShades;