@allxsmith/bestax-bulma 5.67.10 → 5.67.12
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/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Message.js +4 -1
- package/dist/esm/components/Message.js.map +1 -1
- package/dist/esm/components/Modal.js +5 -2
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/elements/Button.js +3 -1
- package/dist/esm/elements/Button.js.map +1 -1
- package/dist/esm/elements/Notification.js +16 -5
- package/dist/esm/elements/Notification.js.map +1 -1
- package/dist/esm/elements/Tag.js +3 -1
- package/dist/esm/elements/Tag.js.map +1 -1
- package/dist/esm/form/ColorInputBase.js +3 -1
- package/dist/esm/form/ColorInputBase.js.map +1 -1
- package/dist/esm/helpers/scrollLock.js +29 -4
- package/dist/esm/helpers/scrollLock.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +61 -14
- package/dist/index.cjs.map +1 -1
- package/dist/types/components/Modal.d.ts +9 -5
- package/dist/types/elements/Notification.d.ts +16 -12
- package/dist/types/elements/Tag.d.ts +11 -2
- package/dist/types/helpers/scrollLock.d.ts +13 -0
- package/dist/types-cjs/components/Modal.d.ts +9 -5
- package/dist/types-cjs/elements/Notification.d.ts +16 -12
- package/dist/types-cjs/elements/Tag.d.ts +11 -2
- package/dist/types-cjs/helpers/scrollLock.d.ts +13 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/CLAUDE.md +5 -0
- package/src/scss/_variables.scss +6 -0
- package/src/scss/components/_affix.scss +10 -5
- package/src/scss/components/_navbar.scss +19 -1
- package/src/scss/components/_toast.scss +18 -7
- package/src/scss/elements/_index.scss +1 -0
- package/src/scss/elements/_notification.scss +19 -1
- package/src/scss/elements/_tag.scss +29 -0
|
@@ -49,11 +49,15 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
49
49
|
closeOnEscape?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* Lock page scroll while the modal is active, padding the page by the room
|
|
52
|
-
* its scrollbar took so the content stays put.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* its scrollbar took so the content stays put. A `fixed` Navbar, the toast
|
|
53
|
+
* and notification stacks and an Affix stay put too. The padding doesn't
|
|
54
|
+
* reach an element of your own fixed to the window's edge, which moves by
|
|
55
|
+
* the scrollbar's width unless it adds
|
|
56
|
+
* `var(--bulma-scroll-lock-offset-right, 0px)` to its `right` (the `-left`
|
|
57
|
+
* one to its `left`), which the lock sets on `<html>` while it's on.
|
|
58
|
+
* Ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so
|
|
59
|
+
* whichever overlay closes first does not unlock the page underneath one
|
|
60
|
+
* that is still open.
|
|
57
61
|
* @defaultValue true
|
|
58
62
|
*/
|
|
59
63
|
lockScroll?: boolean;
|
|
@@ -15,17 +15,19 @@ export interface NotificationProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
15
15
|
* notification renders unstyled; those log a console warning in development
|
|
16
16
|
* and will be removed from this union in the next major version.
|
|
17
17
|
*
|
|
18
|
-
* `dark`
|
|
19
|
-
* stylesheets, as a dark `Button` has. With Bulma's CSS
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* `dark` and `light` take their color's own text and background from
|
|
19
|
+
* bestax's stylesheets, as a dark or light `Button` has. With Bulma's CSS
|
|
20
|
+
* alone, their text inherits the color around it, which on a light page is
|
|
21
|
+
* one shade off a dark notification's background, and on a dark page is
|
|
22
|
+
* hard to read on a light one.
|
|
22
23
|
*/
|
|
23
24
|
color?: (typeof validColors)[number];
|
|
24
25
|
/** Text color helper. */
|
|
25
26
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
26
27
|
/**
|
|
27
|
-
* Use the light color variant. The dark
|
|
28
|
-
* with `isLight` looks the same as
|
|
28
|
+
* Use the light color variant. The light and dark colors have none, so
|
|
29
|
+
* `color="light"` or `color="dark"` with `isLight` looks the same as
|
|
30
|
+
* without it, as a light or dark `Button` does.
|
|
29
31
|
*/
|
|
30
32
|
isLight?: boolean;
|
|
31
33
|
/**
|
|
@@ -80,15 +82,17 @@ export interface NotificationOptions {
|
|
|
80
82
|
* notification renders unstyled; those log a console warning in development
|
|
81
83
|
* and will be removed from this union in the next major version.
|
|
82
84
|
*
|
|
83
|
-
* `dark`
|
|
84
|
-
* stylesheets, as a dark `Button` has. With Bulma's CSS
|
|
85
|
-
*
|
|
86
|
-
*
|
|
85
|
+
* `dark` and `light` take their color's own text and background from
|
|
86
|
+
* bestax's stylesheets, as a dark or light `Button` has. With Bulma's CSS
|
|
87
|
+
* alone, their text inherits the color around it, which on a light page is
|
|
88
|
+
* one shade off a dark notification's background, and on a dark page is
|
|
89
|
+
* hard to read on a light one.
|
|
87
90
|
*/
|
|
88
91
|
color?: (typeof validColors)[number];
|
|
89
92
|
/**
|
|
90
|
-
* Use the light color variant. The dark
|
|
91
|
-
* with `isLight` looks the same as
|
|
93
|
+
* Use the light color variant. The light and dark colors have none, so
|
|
94
|
+
* `color="light"` or `color="dark"` with `isLight` looks the same as
|
|
95
|
+
* without it, as a light or dark `Button` does.
|
|
92
96
|
*/
|
|
93
97
|
isLight?: boolean;
|
|
94
98
|
/** Duration in ms before auto-close. Default 3000. */
|
|
@@ -16,11 +16,20 @@ export type TagSize = (typeof validTagSizes)[number];
|
|
|
16
16
|
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, Omit<BulmaClassesProps, 'color'> {
|
|
17
17
|
/** Additional CSS classes to apply. */
|
|
18
18
|
className?: string;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Bulma color modifier for the tag.
|
|
21
|
+
*
|
|
22
|
+
* `light` takes the light color's own text from bestax's stylesheets. With
|
|
23
|
+
* Bulma's CSS alone, a light tag's text inherits the color around it, which
|
|
24
|
+
* on a dark page is hard to read.
|
|
25
|
+
*/
|
|
20
26
|
color?: TagColor;
|
|
21
27
|
/** Tag size. */
|
|
22
28
|
size?: TagSize;
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Use the light color variant. The light color has none, so
|
|
31
|
+
* `color="light"` with `isLight` looks the same as without it.
|
|
32
|
+
*/
|
|
24
33
|
isLight?: boolean;
|
|
25
34
|
/** Renders a rounded tag. */
|
|
26
35
|
isRounded?: boolean;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/** A side of the window the page's scrollbar can take room on. */
|
|
2
|
+
type ScrollLockSide = 'left' | 'right';
|
|
3
|
+
/**
|
|
4
|
+
* The room the page's scrollbar gave back on one side while a lock is on,
|
|
5
|
+
* and `0px` otherwise, as a CSS value. An element fixed to that edge of the
|
|
6
|
+
* window adds it to its offset there, so it stays where it was as the
|
|
7
|
+
* scrollbar goes.
|
|
8
|
+
*
|
|
9
|
+
* @param side - The edge of the window the element is fixed to.
|
|
10
|
+
* @returns A `var()` with a `0px` fallback.
|
|
11
|
+
*/
|
|
12
|
+
export declare const scrollLockOffset: (side: ScrollLockSide) => string;
|
|
1
13
|
/**
|
|
2
14
|
* Locks (and ref-counted-ly unlocks) the page's scrolling while `active` is
|
|
3
15
|
* true. Safe to call from multiple components at once: the page is only
|
|
@@ -7,3 +19,4 @@
|
|
|
7
19
|
* @param active - Whether this caller wants the page's scrolling locked.
|
|
8
20
|
*/
|
|
9
21
|
export declare function useScrollLock(active: boolean): void;
|
|
22
|
+
export {};
|
|
@@ -49,11 +49,15 @@ export interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
49
49
|
closeOnEscape?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* Lock page scroll while the modal is active, padding the page by the room
|
|
52
|
-
* its scrollbar took so the content stays put.
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
52
|
+
* its scrollbar took so the content stays put. A `fixed` Navbar, the toast
|
|
53
|
+
* and notification stacks and an Affix stay put too. The padding doesn't
|
|
54
|
+
* reach an element of your own fixed to the window's edge, which moves by
|
|
55
|
+
* the scrollbar's width unless it adds
|
|
56
|
+
* `var(--bulma-scroll-lock-offset-right, 0px)` to its `right` (the `-left`
|
|
57
|
+
* one to its `left`), which the lock sets on `<html>` while it's on.
|
|
58
|
+
* Ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so
|
|
59
|
+
* whichever overlay closes first does not unlock the page underneath one
|
|
60
|
+
* that is still open.
|
|
57
61
|
* @defaultValue true
|
|
58
62
|
*/
|
|
59
63
|
lockScroll?: boolean;
|
|
@@ -15,17 +15,19 @@ export interface NotificationProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
15
15
|
* notification renders unstyled; those log a console warning in development
|
|
16
16
|
* and will be removed from this union in the next major version.
|
|
17
17
|
*
|
|
18
|
-
* `dark`
|
|
19
|
-
* stylesheets, as a dark `Button` has. With Bulma's CSS
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* `dark` and `light` take their color's own text and background from
|
|
19
|
+
* bestax's stylesheets, as a dark or light `Button` has. With Bulma's CSS
|
|
20
|
+
* alone, their text inherits the color around it, which on a light page is
|
|
21
|
+
* one shade off a dark notification's background, and on a dark page is
|
|
22
|
+
* hard to read on a light one.
|
|
22
23
|
*/
|
|
23
24
|
color?: (typeof validColors)[number];
|
|
24
25
|
/** Text color helper. */
|
|
25
26
|
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
26
27
|
/**
|
|
27
|
-
* Use the light color variant. The dark
|
|
28
|
-
* with `isLight` looks the same as
|
|
28
|
+
* Use the light color variant. The light and dark colors have none, so
|
|
29
|
+
* `color="light"` or `color="dark"` with `isLight` looks the same as
|
|
30
|
+
* without it, as a light or dark `Button` does.
|
|
29
31
|
*/
|
|
30
32
|
isLight?: boolean;
|
|
31
33
|
/**
|
|
@@ -80,15 +82,17 @@ export interface NotificationOptions {
|
|
|
80
82
|
* notification renders unstyled; those log a console warning in development
|
|
81
83
|
* and will be removed from this union in the next major version.
|
|
82
84
|
*
|
|
83
|
-
* `dark`
|
|
84
|
-
* stylesheets, as a dark `Button` has. With Bulma's CSS
|
|
85
|
-
*
|
|
86
|
-
*
|
|
85
|
+
* `dark` and `light` take their color's own text and background from
|
|
86
|
+
* bestax's stylesheets, as a dark or light `Button` has. With Bulma's CSS
|
|
87
|
+
* alone, their text inherits the color around it, which on a light page is
|
|
88
|
+
* one shade off a dark notification's background, and on a dark page is
|
|
89
|
+
* hard to read on a light one.
|
|
87
90
|
*/
|
|
88
91
|
color?: (typeof validColors)[number];
|
|
89
92
|
/**
|
|
90
|
-
* Use the light color variant. The dark
|
|
91
|
-
* with `isLight` looks the same as
|
|
93
|
+
* Use the light color variant. The light and dark colors have none, so
|
|
94
|
+
* `color="light"` or `color="dark"` with `isLight` looks the same as
|
|
95
|
+
* without it, as a light or dark `Button` does.
|
|
92
96
|
*/
|
|
93
97
|
isLight?: boolean;
|
|
94
98
|
/** Duration in ms before auto-close. Default 3000. */
|
|
@@ -16,11 +16,20 @@ export type TagSize = (typeof validTagSizes)[number];
|
|
|
16
16
|
export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'>, Omit<BulmaClassesProps, 'color'> {
|
|
17
17
|
/** Additional CSS classes to apply. */
|
|
18
18
|
className?: string;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Bulma color modifier for the tag.
|
|
21
|
+
*
|
|
22
|
+
* `light` takes the light color's own text from bestax's stylesheets. With
|
|
23
|
+
* Bulma's CSS alone, a light tag's text inherits the color around it, which
|
|
24
|
+
* on a dark page is hard to read.
|
|
25
|
+
*/
|
|
20
26
|
color?: TagColor;
|
|
21
27
|
/** Tag size. */
|
|
22
28
|
size?: TagSize;
|
|
23
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Use the light color variant. The light color has none, so
|
|
31
|
+
* `color="light"` with `isLight` looks the same as without it.
|
|
32
|
+
*/
|
|
24
33
|
isLight?: boolean;
|
|
25
34
|
/** Renders a rounded tag. */
|
|
26
35
|
isRounded?: boolean;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/** A side of the window the page's scrollbar can take room on. */
|
|
2
|
+
type ScrollLockSide = 'left' | 'right';
|
|
3
|
+
/**
|
|
4
|
+
* The room the page's scrollbar gave back on one side while a lock is on,
|
|
5
|
+
* and `0px` otherwise, as a CSS value. An element fixed to that edge of the
|
|
6
|
+
* window adds it to its offset there, so it stays where it was as the
|
|
7
|
+
* scrollbar goes.
|
|
8
|
+
*
|
|
9
|
+
* @param side - The edge of the window the element is fixed to.
|
|
10
|
+
* @returns A `var()` with a `0px` fallback.
|
|
11
|
+
*/
|
|
12
|
+
export declare const scrollLockOffset: (side: ScrollLockSide) => string;
|
|
1
13
|
/**
|
|
2
14
|
* Locks (and ref-counted-ly unlocks) the page's scrolling while `active` is
|
|
3
15
|
* true. Safe to call from multiple components at once: the page is only
|
|
@@ -7,3 +19,4 @@
|
|
|
7
19
|
* @param active - Whether this caller wants the page's scrolling locked.
|
|
8
20
|
*/
|
|
9
21
|
export declare function useScrollLock(active: boolean): void;
|
|
22
|
+
export {};
|