@allxsmith/bestax-bulma 5.66.2 → 5.67.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 (73) hide show
  1. package/dist/bestax.css +1 -1
  2. package/dist/bestax.css.map +1 -1
  3. package/dist/esm/components/Command.js.map +1 -1
  4. package/dist/esm/components/HoverCard.js.map +1 -1
  5. package/dist/esm/components/Loading.js +3 -3
  6. package/dist/esm/components/Loading.js.map +1 -1
  7. package/dist/esm/components/Modal.js.map +1 -1
  8. package/dist/esm/components/Popover.js.map +1 -1
  9. package/dist/esm/components/Sidebar.js +21 -29
  10. package/dist/esm/components/Sidebar.js.map +1 -1
  11. package/dist/esm/components/Toast.js +6 -8
  12. package/dist/esm/components/Toast.js.map +1 -1
  13. package/dist/esm/elements/IconButton.js.map +1 -1
  14. package/dist/esm/form/Combobox.js.map +1 -1
  15. package/dist/esm/form/DateInputBase.js.map +1 -1
  16. package/dist/esm/form/DateRangeInputBase.js.map +1 -1
  17. package/dist/esm/form/DateTimeInputBase.js.map +1 -1
  18. package/dist/esm/form/TreeSelect.js.map +1 -1
  19. package/dist/esm/form/_pickerInternals/Calendar.js +12 -5
  20. package/dist/esm/form/_pickerInternals/Calendar.js.map +1 -1
  21. package/dist/esm/form/_pickerInternals/PickerPopover.js +6 -2
  22. package/dist/esm/form/_pickerInternals/PickerPopover.js.map +1 -1
  23. package/dist/esm/helpers/scrollLock.js +47 -11
  24. package/dist/esm/helpers/scrollLock.js.map +1 -1
  25. package/dist/esm/helpers/useAnchoredPosition.js +35 -11
  26. package/dist/esm/helpers/useAnchoredPosition.js.map +1 -1
  27. package/dist/esm/layout/Level.js +2 -2
  28. package/dist/esm/layout/Level.js.map +1 -1
  29. package/dist/extras.css +1 -1
  30. package/dist/extras.css.map +1 -1
  31. package/dist/index.cjs +128 -65
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/types/components/Command.d.ts +5 -5
  34. package/dist/types/components/HoverCard.d.ts +2 -4
  35. package/dist/types/components/Modal.d.ts +6 -3
  36. package/dist/types/components/Popover.d.ts +1 -3
  37. package/dist/types/components/Sidebar.d.ts +6 -2
  38. package/dist/types/components/Toast.d.ts +3 -1
  39. package/dist/types/elements/IconButton.d.ts +2 -5
  40. package/dist/types/form/Combobox.d.ts +13 -13
  41. package/dist/types/form/DateInputBase.d.ts +8 -1
  42. package/dist/types/form/DateRangeInputBase.d.ts +5 -0
  43. package/dist/types/form/DateTimeInputBase.d.ts +8 -1
  44. package/dist/types/form/TreeSelect.d.ts +4 -4
  45. package/dist/types/helpers/scrollLock.d.ts +4 -4
  46. package/dist/types/helpers/useAnchoredPosition.d.ts +14 -12
  47. package/dist/types/layout/Level.d.ts +10 -0
  48. package/dist/types-cjs/components/Command.d.ts +5 -5
  49. package/dist/types-cjs/components/HoverCard.d.ts +2 -4
  50. package/dist/types-cjs/components/Modal.d.ts +6 -3
  51. package/dist/types-cjs/components/Popover.d.ts +1 -3
  52. package/dist/types-cjs/components/Sidebar.d.ts +6 -2
  53. package/dist/types-cjs/components/Toast.d.ts +3 -1
  54. package/dist/types-cjs/elements/IconButton.d.ts +2 -5
  55. package/dist/types-cjs/form/Combobox.d.ts +13 -13
  56. package/dist/types-cjs/form/DateInputBase.d.ts +8 -1
  57. package/dist/types-cjs/form/DateRangeInputBase.d.ts +5 -0
  58. package/dist/types-cjs/form/DateTimeInputBase.d.ts +8 -1
  59. package/dist/types-cjs/form/TreeSelect.d.ts +4 -4
  60. package/dist/types-cjs/helpers/scrollLock.d.ts +4 -4
  61. package/dist/types-cjs/helpers/useAnchoredPosition.d.ts +14 -12
  62. package/dist/types-cjs/layout/Level.d.ts +10 -0
  63. package/dist/versions/bestax-no-dark-mode.css +1 -1
  64. package/dist/versions/bestax-no-dark-mode.css.map +1 -1
  65. package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
  66. package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
  67. package/dist/versions/bestax-no-helpers.css +1 -1
  68. package/dist/versions/bestax-no-helpers.css.map +1 -1
  69. package/dist/versions/bestax-prefixed.css +1 -1
  70. package/dist/versions/bestax-prefixed.css.map +1 -1
  71. package/package.json +1 -1
  72. package/src/scss/components/_loading.scss +17 -3
  73. package/src/scss/form/_radio.scss +5 -2
@@ -62,11 +62,11 @@ export interface UseAnchoredPositionOptions {
62
62
  */
63
63
  matchWidth?: boolean;
64
64
  /**
65
- * Measures again after each render of the component holding the hook, for
66
- * a panel whose content changes while it's open, as a filtered list's
67
- * does. A fixed panel above its anchor is placed from its height, and
68
- * `auto` reads the height too, so a measurement taken when it opened goes
69
- * stale as the content changes.
65
+ * Measures again after each render of the component holding the hook,
66
+ * before the panel paints, for a panel whose content that component
67
+ * changes while it's open, as a filtered list's does. A change in size is
68
+ * followed without it too, but a frame later, so a panel above its anchor
69
+ * would show for a frame where its old height put it.
70
70
  * @defaultValue false
71
71
  */
72
72
  followContent?: boolean;
@@ -80,14 +80,16 @@ export declare function marginGap(panel: HTMLElement): number;
80
80
  /**
81
81
  * Places a floating panel against its anchor: resolves `auto` to a corner
82
82
  * and, for a panel fixed to the viewport, works out its coordinates. It
83
- * measures again on resize and on any scroll of the anchor's window (an
84
- * iframe's, when the anchor renders into one), so a fixed panel follows its
85
- * anchor, and with `followContent` after each render too. A measurement that
86
- * changes nothing doesn't render again.
83
+ * measures again on resize, on any scroll of the anchor's window (an
84
+ * iframe's, when the anchor renders into one), and when the panel or the
85
+ * anchor changes size, so a fixed panel follows its anchor and its own
86
+ * content. Those measure once in the next frame, however many arrive before
87
+ * it. With `followContent` it also measures after each render. A
88
+ * measurement that changes nothing doesn't render again.
87
89
  *
88
- * Measuring happens in a layout effect, so the panel is placed before it
89
- * paints. It needs both elements on the page while `active` is on, and
90
- * keeps the last placement when either is missing.
90
+ * The first measurement happens in a layout effect, so the panel is placed
91
+ * before it paints. It needs both elements on the page while `active` is
92
+ * on, and keeps the last placement when either is missing.
91
93
  *
92
94
  * @function useAnchoredPosition
93
95
  * @param anchorRef - The element the panel opens from.
@@ -5,6 +5,16 @@ import { BulmaClassesProps, validColors } from '../helpers/useBulmaClasses.js';
5
5
  * Props for the Level component.
6
6
  */
7
7
  export interface LevelProps extends React.HTMLAttributes<HTMLElement>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
8
+ /**
9
+ * HTML element to render (default: `nav`, as in Bulma's markup). A `nav` is
10
+ * a `navigation` landmark, so keep it for a row of links. A row that is not
11
+ * navigation, such as figures or a toolbar, takes `div`, which is no
12
+ * landmark. `header` suits a level that opens a section and `footer` one
13
+ * that closes it. A `header` is a `banner` landmark, and a `footer` a
14
+ * `contentinfo` one, only when no `section`, `article`, `aside`, `nav` or
15
+ * `main` is around it.
16
+ */
17
+ as?: 'nav' | 'div' | 'header' | 'footer';
8
18
  /** Keeps the level horizontal on mobile (Bulma `is-mobile`). Without it
9
19
  * the level stacks vertically below tablet. */
10
20
  isMobile?: boolean;