@allxsmith/bestax-bulma 5.45.1 → 5.47.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 (42) hide show
  1. package/dist/esm/components/TreeView.js +5 -2
  2. package/dist/esm/components/TreeView.js.map +1 -1
  3. package/dist/esm/form/Checkbox.js.map +1 -1
  4. package/dist/esm/form/File.js.map +1 -1
  5. package/dist/esm/form/Numberinput.js.map +1 -1
  6. package/dist/esm/form/PinInput.js.map +1 -1
  7. package/dist/esm/form/Radio.js.map +1 -1
  8. package/dist/esm/form/SelectBase.js.map +1 -1
  9. package/dist/esm/form/Slider.js.map +1 -1
  10. package/dist/esm/form/Switch.js.map +1 -1
  11. package/dist/esm/helpers/Theme.js +191 -49
  12. package/dist/esm/helpers/Theme.js.map +1 -1
  13. package/dist/esm/helpers/useTreeView.js +64 -9
  14. package/dist/esm/helpers/useTreeView.js.map +1 -1
  15. package/dist/esm/helpers/useVisibilityClasses.js.map +1 -1
  16. package/dist/index.cjs +258 -59
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/types/components/TreeView.d.ts +2 -0
  19. package/dist/types/form/Checkbox.d.ts +3 -0
  20. package/dist/types/form/File.d.ts +3 -0
  21. package/dist/types/form/Numberinput.d.ts +2 -0
  22. package/dist/types/form/PinInput.d.ts +3 -0
  23. package/dist/types/form/Radio.d.ts +3 -0
  24. package/dist/types/form/SelectBase.d.ts +3 -0
  25. package/dist/types/form/Slider.d.ts +3 -0
  26. package/dist/types/form/Switch.d.ts +2 -0
  27. package/dist/types/helpers/Theme.d.ts +37 -10
  28. package/dist/types/helpers/useTreeView.d.ts +19 -3
  29. package/dist/types/helpers/useVisibilityClasses.d.ts +5 -1
  30. package/dist/types-cjs/components/TreeView.d.ts +2 -0
  31. package/dist/types-cjs/form/Checkbox.d.ts +3 -0
  32. package/dist/types-cjs/form/File.d.ts +3 -0
  33. package/dist/types-cjs/form/Numberinput.d.ts +2 -0
  34. package/dist/types-cjs/form/PinInput.d.ts +3 -0
  35. package/dist/types-cjs/form/Radio.d.ts +3 -0
  36. package/dist/types-cjs/form/SelectBase.d.ts +3 -0
  37. package/dist/types-cjs/form/Slider.d.ts +3 -0
  38. package/dist/types-cjs/form/Switch.d.ts +2 -0
  39. package/dist/types-cjs/helpers/Theme.d.ts +37 -10
  40. package/dist/types-cjs/helpers/useTreeView.d.ts +19 -3
  41. package/dist/types-cjs/helpers/useVisibilityClasses.d.ts +5 -1
  42. package/package.json +2 -1
@@ -20,6 +20,14 @@ export interface TreeViewItemInfo extends TreeViewItemRecord {
20
20
  }
21
21
  /** A box's state: checked, unchecked or mixed. */
22
22
  export type TreeViewCheckState = boolean | 'mixed';
23
+ /**
24
+ * Where an item sits among the items beside it, for its `aria-posinset` and
25
+ * `aria-setsize`: its number, from 1, and how many there are.
26
+ */
27
+ export interface TreeViewPosition {
28
+ posinset: number;
29
+ setsize: number;
30
+ }
23
31
  /**
24
32
  * What an item shows of the selection: `selected` in a `single` tree,
25
33
  * `checked` in a `checkbox` tree, and neither with `none`.
@@ -59,6 +67,12 @@ export interface TreeViewEngine {
59
67
  * the server.
60
68
  */
61
69
  stateOf: (value: string, path: string[], disabled: boolean) => TreeViewItemState;
70
+ /**
71
+ * Where the item with this key sits among the items beside it, read off
72
+ * the page after each render and whenever items move. Nothing until the
73
+ * tree has mounted, as on the server.
74
+ */
75
+ positionOf: (key: string) => TreeViewPosition | undefined;
62
76
  /** Records an item from its layout effect. Returns the function that forgets it. */
63
77
  register: (value: string, record: TreeViewItemRecord) => () => void;
64
78
  /** For each item's `<li>` ref: records it, and notices focus leaving with it. */
@@ -76,9 +90,11 @@ export interface TreeViewEngine {
76
90
  onClick: (element: HTMLLIElement, item: TreeViewItemInfo, onToggle: boolean) => void;
77
91
  }
78
92
  /**
79
- * The open state, the selection, the keys, the tab stop and the registry of
80
- * a TreeView (#1096). Focus moves for real, with a roving tabindex, rather
81
- * than through `aria-activedescendant`.
93
+ * The open state, the selection, the keys, the tab stop, the positions and
94
+ * the registry of a TreeView (#1096). Focus moves for real, with a roving
95
+ * tabindex, rather than through `aria-activedescendant`. Each item's
96
+ * position among the items beside it is declared rather than left to the
97
+ * browser (#1171), read off the page once the tree has mounted.
82
98
  *
83
99
  * Every item registers its value, its parent and whether it's disabled from
84
100
  * a layout effect. In a checkbox tree a closed item's children still render
@@ -3,7 +3,11 @@ import { validVisibilities, BulmaViewportProps, BulmaDisplayProps } from './bulm
3
3
  * Props for applying Bulma visibility and display helper classes.
4
4
  */
5
5
  export interface BulmaVisibilityProps extends BulmaViewportProps, BulmaDisplayProps {
6
- /** Visibility (e.g., 'hidden', 'sr-only'). */
6
+ /**
7
+ * Hides the element. `'hidden'` takes it off the page, `'invisible'` hides
8
+ * it and keeps its space, and `'sr-only'` (screen reader only) hides it
9
+ * visually while screen readers still read it.
10
+ */
7
11
  visibility?: (typeof validVisibilities)[number];
8
12
  /** Visibility for mobile viewport (up to 768px). */
9
13
  visibilityMobile?: (typeof validVisibilities)[number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allxsmith/bestax-bulma",
3
- "version": "5.45.1",
3
+ "version": "5.47.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",
@@ -22,6 +22,7 @@
22
22
  "devDependencies": {
23
23
  "@faker-js/faker": "^10.6.0",
24
24
  "@fortawesome/fontawesome-free": "^7.3.1",
25
+ "@guidepup/virtual-screen-reader": "0.33.0",
25
26
  "@mdi/font": "^7.4.47",
26
27
  "@rollup/plugin-commonjs": "^29.0.3",
27
28
  "@rollup/plugin-node-resolve": "^16.0.1",