@allxsmith/bestax-bulma 5.58.0 → 5.60.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/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Affix.js +46 -0
- package/dist/esm/components/Affix.js.map +1 -0
- package/dist/esm/components/Dialog.js +2 -6
- package/dist/esm/components/Dialog.js.map +1 -1
- package/dist/esm/components/Modal.js +12 -24
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/elements/Buttons.js +2 -0
- package/dist/esm/elements/Buttons.js.map +1 -1
- package/dist/esm/elements/IconButton.js +114 -0
- package/dist/esm/elements/IconButton.js.map +1 -0
- package/dist/esm/helpers/containerBreakpoints.js +14 -0
- package/dist/esm/helpers/containerBreakpoints.js.map +1 -0
- package/dist/esm/helpers/polymorphic.js.map +1 -1
- package/dist/esm/helpers/portal.js +28 -1
- package/dist/esm/helpers/portal.js.map +1 -1
- package/dist/esm/helpers/stackLayout.js +30 -0
- package/dist/esm/helpers/stackLayout.js.map +1 -0
- package/dist/esm/helpers/useBulmaClasses.js +8 -2
- package/dist/esm/helpers/useBulmaClasses.js.map +1 -1
- package/dist/esm/helpers/useFlexboxClasses.js +17 -4
- package/dist/esm/helpers/useFlexboxClasses.js.map +1 -1
- package/dist/esm/layout/Center.js +33 -0
- package/dist/esm/layout/Center.js.map +1 -0
- package/dist/esm/layout/Container.js +2 -6
- package/dist/esm/layout/Container.js.map +1 -1
- package/dist/esm/layout/Flex.js +34 -0
- package/dist/esm/layout/Flex.js.map +1 -0
- package/dist/esm/layout/Group.js +43 -0
- package/dist/esm/layout/Group.js.map +1 -0
- package/dist/esm/layout/Stack.js +34 -0
- package/dist/esm/layout/Stack.js.map +1 -0
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +476 -160
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +6 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/components/Affix.d.ts +67 -0
- package/dist/types/elements/Buttons.d.ts +1 -0
- package/dist/types/elements/IconButton.d.ts +110 -0
- package/dist/types/helpers/containerBreakpoints.d.ts +2 -0
- package/dist/types/helpers/polymorphic.d.ts +19 -0
- package/dist/types/helpers/portal.d.ts +42 -0
- package/dist/types/helpers/stackLayout.d.ts +62 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +8 -2
- package/dist/types/helpers/useFlexboxClasses.d.ts +26 -3
- package/dist/types/index.d.ts +8 -1
- package/dist/types/layout/Center.d.ts +54 -0
- package/dist/types/layout/Flex.d.ts +92 -0
- package/dist/types/layout/Group.d.ts +86 -0
- package/dist/types/layout/Stack.d.ts +63 -0
- package/dist/types-cjs/components/Affix.d.ts +67 -0
- package/dist/types-cjs/elements/Buttons.d.ts +1 -0
- package/dist/types-cjs/elements/IconButton.d.ts +110 -0
- package/dist/types-cjs/helpers/containerBreakpoints.d.ts +2 -0
- package/dist/types-cjs/helpers/polymorphic.d.ts +19 -0
- package/dist/types-cjs/helpers/portal.d.ts +42 -0
- package/dist/types-cjs/helpers/stackLayout.d.ts +62 -0
- package/dist/types-cjs/helpers/useBulmaClasses.d.ts +8 -2
- package/dist/types-cjs/helpers/useFlexboxClasses.d.ts +26 -3
- package/dist/types-cjs/index.d.ts +8 -1
- package/dist/types-cjs/layout/Center.d.ts +54 -0
- package/dist/types-cjs/layout/Flex.d.ts +92 -0
- package/dist/types-cjs/layout/Group.d.ts +86 -0
- package/dist/types-cjs/layout/Stack.d.ts +63 -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/components/_affix.scss +74 -0
- package/src/scss/components/_index.scss +1 -0
- package/src/scss/elements/_iconbutton.scss +36 -0
- package/src/scss/elements/_index.scss +1 -0
- package/src/scss/layout/_index.scss +1 -0
- package/src/scss/layout/_stack.scss +145 -0
package/dist/index.esm.js
CHANGED
|
@@ -34,6 +34,7 @@ export { TreeView, TreeViewItem } from './esm/components/TreeView.js';
|
|
|
34
34
|
export { ScrollArea } from './esm/components/ScrollArea.js';
|
|
35
35
|
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from './esm/components/Command.js';
|
|
36
36
|
export { DataTable } from './esm/components/DataTable.js';
|
|
37
|
+
export { Affix } from './esm/components/Affix.js';
|
|
37
38
|
export { Block } from './esm/elements/Block.js';
|
|
38
39
|
export { Box } from './esm/elements/Box.js';
|
|
39
40
|
export { Button } from './esm/elements/Button.js';
|
|
@@ -49,6 +50,7 @@ export { Divider } from './esm/elements/Divider.js';
|
|
|
49
50
|
export { Emphasis } from './esm/elements/Emphasis.js';
|
|
50
51
|
export { Figure } from './esm/elements/Figure.js';
|
|
51
52
|
export { Icon } from './esm/elements/Icon.js';
|
|
53
|
+
export { IconButton } from './esm/elements/IconButton.js';
|
|
52
54
|
export { IconText } from './esm/elements/IconText.js';
|
|
53
55
|
export { Image } from './esm/elements/Image.js';
|
|
54
56
|
export { Kbd, KbdGroup } from './esm/elements/Kbd.js';
|
|
@@ -127,13 +129,17 @@ export { Portal } from './esm/helpers/portal.js';
|
|
|
127
129
|
export { LocaleProvider, useLocale } from './esm/helpers/LocaleProvider.js';
|
|
128
130
|
export { useNumberFormat } from './esm/helpers/localeFormat.js';
|
|
129
131
|
export { useFocusTrap } from './esm/helpers/useFocusTrap.js';
|
|
132
|
+
export { Center } from './esm/layout/Center.js';
|
|
130
133
|
export { Container } from './esm/layout/Container.js';
|
|
134
|
+
export { Flex } from './esm/layout/Flex.js';
|
|
131
135
|
export { Footer } from './esm/layout/Footer.js';
|
|
136
|
+
export { Group } from './esm/layout/Group.js';
|
|
132
137
|
export { Hero, HeroBody, HeroFoot, HeroHead } from './esm/layout/Hero.js';
|
|
133
138
|
export { Level, LevelItem, LevelLeft, LevelRight } from './esm/layout/Level.js';
|
|
134
139
|
export { Media, MediaContent, MediaLeft, MediaRight } from './esm/layout/Media.js';
|
|
135
140
|
export { Section } from './esm/layout/Section.js';
|
|
136
141
|
export { Splitter, SplitterPane } from './esm/layout/Splitter.js';
|
|
142
|
+
export { Stack } from './esm/layout/Stack.js';
|
|
137
143
|
export { useColorClasses, useColorStyles } from './esm/helpers/useColorClasses.js';
|
|
138
144
|
export { useDataTable } from './esm/components/useDataTable.js';
|
|
139
145
|
export { useFlexboxClasses } from './esm/helpers/useFlexboxClasses.js';
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BulmaClassesProps } from '../helpers/useBulmaClasses.js';
|
|
3
|
+
import type { BadgePosition } from './Badge.js';
|
|
4
|
+
/** A corner of the viewport: the same four values as `BadgePosition`. */
|
|
5
|
+
export type AffixPosition = BadgePosition;
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Affix component. The helper props, the other attributes and
|
|
8
|
+
* the `ref` land on its `<div>`.
|
|
9
|
+
*
|
|
10
|
+
* @extraProp {React.Ref<HTMLDivElement>} [ref] - Ref forwarded to the `<div>`, wherever it renders.
|
|
11
|
+
*/
|
|
12
|
+
export interface AffixProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
13
|
+
/** Additional CSS classes to apply. */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** What stays in the corner. */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* The corner of the viewport it's fixed to. Physical, as Badge's and
|
|
19
|
+
* Toast's are: `'bottom-right'` stays on the right in right-to-left text.
|
|
20
|
+
* Its distance from the edges is `--bulma-affix-offset-vertical` and
|
|
21
|
+
* `--bulma-affix-offset-horizontal` plus the device's safe-area inset; a
|
|
22
|
+
* margin from the spacing helpers (`mb`, `mr`, …) adds to it. A margin on
|
|
23
|
+
* one side also takes that much of the width its content can have, which
|
|
24
|
+
* the offset variables don't, so move it far with those.
|
|
25
|
+
* @defaultValue 'bottom-right'
|
|
26
|
+
*/
|
|
27
|
+
position?: AffixPosition;
|
|
28
|
+
/**
|
|
29
|
+
* Renders it into another container, for a page where an ancestor's
|
|
30
|
+
* `transform`, `filter` or `contain` would capture `position: fixed`.
|
|
31
|
+
* `true` portals to the `portalContainer` a `ConfigProvider` sets,
|
|
32
|
+
* `document.body` by default; a string is used as a
|
|
33
|
+
* `document.querySelector` selector; an element is used directly. Renders
|
|
34
|
+
* in place on the server and while hydrating, moving into the portal once
|
|
35
|
+
* the client takes over, so hydration matches. Portaled, it's appended to
|
|
36
|
+
* that container when it mounts, so it comes after what's already there in
|
|
37
|
+
* the reading and Tab order.
|
|
38
|
+
* @defaultValue false
|
|
39
|
+
*/
|
|
40
|
+
portal?: boolean | string | HTMLElement;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The `Affix` component keeps its content fixed to a corner of the viewport while the page scrolls under it.
|
|
44
|
+
*
|
|
45
|
+
* It's a `<div>` with no role, so what's inside keeps its own. It sits
|
|
46
|
+
* `--bulma-affix-offset-vertical` and `--bulma-affix-offset-horizontal`
|
|
47
|
+
* from its corner's edges, plus the device's safe-area inset, and stacks at
|
|
48
|
+
* `--bulma-affix-z-index`, over the page's content and under its navbar,
|
|
49
|
+
* static or fixed, its menus, popovers, the Sidebar, the modals, Tooltip and
|
|
50
|
+
* Toast. It's as wide as its
|
|
51
|
+
* content and never wider than the viewport less its offsets. It doesn't
|
|
52
|
+
* scroll, so nothing inside it is clipped, and content that can be taller
|
|
53
|
+
* than the screen scrolls itself. Its place in the reading and Tab order is
|
|
54
|
+
* its place in the DOM, whatever corner it shows in.
|
|
55
|
+
*
|
|
56
|
+
* @function
|
|
57
|
+
* @param {AffixProps} props - Props for the Affix component.
|
|
58
|
+
* @param {React.Ref<HTMLDivElement>} ref - Forwarded ref to the `<div>`.
|
|
59
|
+
* @returns The `<div>`, in place or in its portal.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* <Affix position="bottom-left">
|
|
63
|
+
* <Button color="primary">Feedback</Button>
|
|
64
|
+
* </Affix>
|
|
65
|
+
*/
|
|
66
|
+
export declare const Affix: React.ForwardRefExoticComponent<AffixProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
export default Affix;
|
|
@@ -37,5 +37,6 @@ export declare const Buttons: React.FC<ButtonsProps> & {
|
|
|
37
37
|
Button: import("../index.js").PolymorphicComponent<import("./Button.js").ButtonOwnProps, "button", never>;
|
|
38
38
|
LinkButton: import("../index.js").PolymorphicComponent<import("./LinkButton.js").LinkButtonOwnProps, "button", never>;
|
|
39
39
|
ToggleButton: React.ForwardRefExoticComponent<import("./ToggleButton.js").ToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
40
|
+
IconButton: import("../index.js").PolymorphicComponent<import("./IconButton.js").IconButtonOwnProps & import("./IconButton.js").IconButtonName, "button", never>;
|
|
40
41
|
};
|
|
41
42
|
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonOwnProps } from './Button.js';
|
|
3
|
+
import type { PolymorphicComponent } from '../helpers/polymorphic.js';
|
|
4
|
+
/**
|
|
5
|
+
* The IconButton component's own props: everything `Button` takes, plus the
|
|
6
|
+
* icon.
|
|
7
|
+
*/
|
|
8
|
+
export interface IconButtonOwnProps extends ButtonOwnProps {
|
|
9
|
+
/**
|
|
10
|
+
* The glyph. A string is an `Icon` name, drawn from the icon library
|
|
11
|
+
* `ConfigProvider` sets. An `<Icon>` renders as given, so it can carry its
|
|
12
|
+
* own `variant` or `library`. Any other node, such as an SVG or a component
|
|
13
|
+
* from an icon package, goes inside an `Icon`, which gives it the `.icon`
|
|
14
|
+
* wrapper Bulma keeps square. It's decorative: the button's name says what
|
|
15
|
+
* it does. Give the glyph here or as `children`, not both: with both, it
|
|
16
|
+
* draws `icon` and warns in development. With neither, such as an empty
|
|
17
|
+
* string from `cond ? 'trash' : ''`, the button is an empty square, and that
|
|
18
|
+
* warns in development too.
|
|
19
|
+
*/
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* The glyph as children, the way Mantine, MUI and Chakra take it: an
|
|
23
|
+
* `<Icon>` renders as given, and any other node, such as an SVG, goes
|
|
24
|
+
* inside an `Icon`, as with `icon`. Left out when `icon` is given, which
|
|
25
|
+
* warns in development. Text warns too, since `aria-label` replaces it as
|
|
26
|
+
* the name: a button with text is a `Button`.
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Makes the button a circle the size of its square. The circle comes from
|
|
31
|
+
* bestax's CSS, in `bestax.css` and its variants, or in `extras.css` next
|
|
32
|
+
* to your own Bulma. Without it, Bulma's `is-rounded` draws a pill a little
|
|
33
|
+
* wider than it is tall.
|
|
34
|
+
*/
|
|
35
|
+
isRounded?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Names an IconButton by the text of another element. */
|
|
38
|
+
export interface IconButtonLabelledBy {
|
|
39
|
+
/** The id of the element whose text names the button, in place of `aria-label`. */
|
|
40
|
+
'aria-labelledby': string;
|
|
41
|
+
/**
|
|
42
|
+
* @internal Not with `aria-labelledby`, which already names the button.
|
|
43
|
+
* Declared so the two can't be passed together.
|
|
44
|
+
*/
|
|
45
|
+
'aria-label'?: undefined;
|
|
46
|
+
}
|
|
47
|
+
/** Names an IconButton with `aria-label`, the usual way. */
|
|
48
|
+
export interface IconButtonLabel {
|
|
49
|
+
/**
|
|
50
|
+
* The button's name: what a screen reader announces and what a voice
|
|
51
|
+
* control user says to press it. Required, or `aria-labelledby` in its
|
|
52
|
+
* place, since an icon has no text to name it by. Name the action
|
|
53
|
+
* ("Delete"), not the picture ("Trash"). An empty or blank one warns in
|
|
54
|
+
* development.
|
|
55
|
+
*/
|
|
56
|
+
'aria-label': string;
|
|
57
|
+
/**
|
|
58
|
+
* @internal Not with `aria-label`. Declared so the two can't be passed
|
|
59
|
+
* together.
|
|
60
|
+
*/
|
|
61
|
+
'aria-labelledby'?: undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* How an IconButton gets its name: `aria-label`, or `aria-labelledby` in its
|
|
65
|
+
* place. `IconButtonLabel` comes last because TypeScript names the union's
|
|
66
|
+
* last member when neither is given: under "No overload matches this call",
|
|
67
|
+
* each overload's error ends "Property ''aria-label'' is missing … but
|
|
68
|
+
* required in type 'IconButtonLabel'".
|
|
69
|
+
*/
|
|
70
|
+
export type IconButtonName = IconButtonLabelledBy | IconButtonLabel;
|
|
71
|
+
/**
|
|
72
|
+
* Props for the IconButton component. The DOM attributes and the `ref` follow
|
|
73
|
+
* `as`, exactly as they do on `Button`.
|
|
74
|
+
*
|
|
75
|
+
* @extraProp {string} [type='button'] - On a `<button>`, `'button'`, `'submit'` or `'reset'`, and `'button'` unless you pass one of the other two, so it never submits a form by accident. With another `as`, whatever that element or component takes, passed through as given, such as an `<a>`'s MIME type.
|
|
76
|
+
* @extraProp {PolymorphicRef<React.ElementType>} [ref] - Ref forwarded to the element `as` renders, typed from `as`.
|
|
77
|
+
*/
|
|
78
|
+
export type IconButtonProps<T extends React.ElementType = 'button'> = IconButtonOwnProps & IconButtonName & Omit<React.ComponentPropsWithoutRef<T>, keyof IconButtonOwnProps | 'aria-label' | 'aria-labelledby' | 'as'> & {
|
|
79
|
+
/**
|
|
80
|
+
* Render as a `<button>`, an `<a>`, or a custom component such as a
|
|
81
|
+
* router `Link`, as on `Button`.
|
|
82
|
+
* @defaultValue 'button'
|
|
83
|
+
*/
|
|
84
|
+
as?: T;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* The `IconButton` component renders a button that shows only an icon, and requires a name for it.
|
|
88
|
+
*
|
|
89
|
+
* It renders through `Button`, so it takes everything `Button` takes, and
|
|
90
|
+
* adds the icon and a name the types require: `aria-label`, or
|
|
91
|
+
* `aria-labelledby` in its place. Bulma keeps a button whose only child is an
|
|
92
|
+
* `.icon` square at every size, and `isRounded` makes it a circle. It has no
|
|
93
|
+
* tooltip of its own: wrap it in `Tooltip` for a description.
|
|
94
|
+
*
|
|
95
|
+
* @function
|
|
96
|
+
* @param {IconButtonProps} props - Props for the IconButton component.
|
|
97
|
+
* @param {React.Ref} ref - Forwarded ref to the element `as` renders.
|
|
98
|
+
* @returns {JSX.Element} The rendered button, anchor, or custom element.
|
|
99
|
+
* @see {@link https://bulma.io/documentation/elements/button/ | Bulma Button documentation}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* <IconButton icon="trash" aria-label="Delete" color="danger" />
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* <IconButton aria-label="Settings">
|
|
106
|
+
* <Icon name="cog" />
|
|
107
|
+
* </IconButton>
|
|
108
|
+
*/
|
|
109
|
+
export declare const IconButton: PolymorphicComponent<IconButtonOwnProps & IconButtonName, "button">;
|
|
110
|
+
export default IconButton;
|
|
@@ -170,3 +170,22 @@ export interface ConstrainedPolymorphicComponentWithoutRef<Own, Allowed extends
|
|
|
170
170
|
(props: PolymorphicProps<Default, Own, Forwarded>): React.ReactElement | null;
|
|
171
171
|
displayName?: string;
|
|
172
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* `ConstrainedPolymorphicComponentWithoutRef` with a forwarded ref: the props
|
|
175
|
+
* and the ref both follow `as`, and `as` is one of `Allowed`.
|
|
176
|
+
*
|
|
177
|
+
* For a component whose `as` is a closed set of tags that don't share one
|
|
178
|
+
* prop surface. `Stack` renders a `<div>`, a `<form>`, an `<ol>` or a
|
|
179
|
+
* `<fieldset>` among others, which take different attributes (`action`,
|
|
180
|
+
* `start`, `disabled`) and give the ref a different element, so pinning them
|
|
181
|
+
* all to `HTMLAttributes<HTMLElement>` would refuse attributes that work.
|
|
182
|
+
*/
|
|
183
|
+
export interface ConstrainedPolymorphicComponent<Own, Allowed extends React.ElementType, Default extends Allowed, Forwarded extends keyof Own = never> {
|
|
184
|
+
<T extends Allowed = Default>(props: PolymorphicProps<T, Own, Forwarded> & {
|
|
185
|
+
ref?: PolymorphicRef<T>;
|
|
186
|
+
}): React.ReactElement | null;
|
|
187
|
+
(props: PolymorphicProps<Default, Own, Forwarded> & {
|
|
188
|
+
ref?: PolymorphicRef<Default>;
|
|
189
|
+
}): React.ReactElement | null;
|
|
190
|
+
displayName?: string;
|
|
191
|
+
}
|
|
@@ -30,6 +30,48 @@ export declare function resolvePortalContainer(container?: string | HTMLElement)
|
|
|
30
30
|
* returns the DOM node to portal into.
|
|
31
31
|
*/
|
|
32
32
|
export declare function usePortalContainer(): (container?: string | HTMLElement) => HTMLElement;
|
|
33
|
+
/**
|
|
34
|
+
* What a component that takes Modal's `portal` prop does with it now. See
|
|
35
|
+
* `usePortalProp`.
|
|
36
|
+
*/
|
|
37
|
+
export interface PortalPropState {
|
|
38
|
+
/**
|
|
39
|
+
* Whether the content renders in its portal: `portal` is set and
|
|
40
|
+
* hydration is over. Before that it renders in place.
|
|
41
|
+
*/
|
|
42
|
+
isPortaled: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The target to pass `Portal` as its `container`: the selector or element
|
|
45
|
+
* `portal` names, or `undefined` for `true`, which leaves the choice to the
|
|
46
|
+
* `portalContainer` a `ConfigProvider` sets and then `document.body`.
|
|
47
|
+
*/
|
|
48
|
+
container?: string | HTMLElement;
|
|
49
|
+
/**
|
|
50
|
+
* The `portalContainer` a `ConfigProvider` sets, while it's what places the
|
|
51
|
+
* content (portaled, with `portal` set to `true`), else `undefined`. A
|
|
52
|
+
* change to it moves the content, so effects that hold its nodes depend
|
|
53
|
+
* on it.
|
|
54
|
+
*/
|
|
55
|
+
defaultTarget?: string | HTMLElement;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reads Modal's `portal` prop (`boolean | string | HTMLElement`) for a
|
|
59
|
+
* component that takes it: whether the content is in its portal yet, and
|
|
60
|
+
* where it goes.
|
|
61
|
+
*
|
|
62
|
+
* A portal has no server-rendered counterpart, so such a component renders in
|
|
63
|
+
* place on the server and while hydrating, and moves into its portal once the
|
|
64
|
+
* client takes over. Render the content in `Portal` with
|
|
65
|
+
* `disabled={!isPortaled}` and this `container`. Moving remounts the content,
|
|
66
|
+
* so an effect that holds one of its nodes depends on `isPortaled`, `portal`
|
|
67
|
+
* and `defaultTarget`.
|
|
68
|
+
*
|
|
69
|
+
* @function usePortalProp
|
|
70
|
+
* @param portal - The component's `portal` prop.
|
|
71
|
+
* @returns Whether it's portaled now, its `container`, and the provider's
|
|
72
|
+
* target while that places it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function usePortalProp(portal?: boolean | string | HTMLElement): PortalPropState;
|
|
33
75
|
/**
|
|
34
76
|
* Props for the Portal component.
|
|
35
77
|
*/
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BulmaClassesProps, type validColors, type validFlexDirections } from './useBulmaClasses.js';
|
|
3
|
+
/**
|
|
4
|
+
* The elements Stack, Group, Center and Flex can render as: Container's
|
|
5
|
+
* landmarks and sections, a list, a form or a fieldset.
|
|
6
|
+
*/
|
|
7
|
+
export type LayoutElement = 'div' | 'main' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'ul' | 'ol' | 'form' | 'fieldset';
|
|
8
|
+
/**
|
|
9
|
+
* What Stack, Group, Center and Flex take in common. The helper props, the
|
|
10
|
+
* other attributes and the `ref` land on the root.
|
|
11
|
+
*
|
|
12
|
+
* @flexContainer The root is a flex container by its own stylesheet, so the
|
|
13
|
+
* flex container helper props apply with no `display` prop. The API docs
|
|
14
|
+
* extractor reads this tag off a component's props type or its bases, and
|
|
15
|
+
* the ESLint plugin's `no-inert-flex-props` takes its flex containers from it.
|
|
16
|
+
*/
|
|
17
|
+
export interface LayoutOwnProps extends Omit<BulmaClassesProps, 'color' | 'backgroundColor' | 'flexDirection'> {
|
|
18
|
+
/**
|
|
19
|
+
* Not accepted. `color` here would be the deprecated presentational HTML
|
|
20
|
+
* attribute. Use `textColor`.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
color?: never;
|
|
24
|
+
/**
|
|
25
|
+
* Not accepted under this name. Use `bgColor`.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
backgroundColor?: never;
|
|
29
|
+
/** Additional CSS classes. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* What it lays out. The top and bottom margins Bulma gives them are
|
|
33
|
+
* zeroed, so `gap` is the only space between them, and a spacing helper
|
|
34
|
+
* such as `mt="2"` still adds to it. A `Columns` child keeps its own top and side
|
|
35
|
+
* margins, and takes at the bottom the one Bulma gives the last Columns in
|
|
36
|
+
* a container, the column gap pulled back in (none when gapless), so its
|
|
37
|
+
* columns line up. A `Pagination` child keeps its negative margins too,
|
|
38
|
+
* so its links line up.
|
|
39
|
+
*/
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
/** Text color helper. */
|
|
42
|
+
textColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
43
|
+
/** Background color helper. */
|
|
44
|
+
bgColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
45
|
+
}
|
|
46
|
+
/** The props `StackLayout` reads, from whichever of the four renders it. */
|
|
47
|
+
export interface StackLayoutProps extends LayoutOwnProps, Omit<React.HTMLAttributes<HTMLElement>, 'color'> {
|
|
48
|
+
/** The element to render. */
|
|
49
|
+
as?: LayoutElement;
|
|
50
|
+
/** Flex's direction. The other three pass `undefined`, so they never reorder. */
|
|
51
|
+
flexDirection?: (typeof validFlexDirections)[number];
|
|
52
|
+
/** The modifier classes beside `stack`, as `usePrefixedClassNames` takes them. */
|
|
53
|
+
modifiers?: Record<string, boolean | undefined>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The `.stack` element behind Stack, Group, Center and Flex.
|
|
57
|
+
*
|
|
58
|
+
* With `as="ul"` or `as="ol"` it renders `role="list"`, which Safari needs:
|
|
59
|
+
* WebKit stops exposing a list as one once its markers are hidden, and
|
|
60
|
+
* Bulma's reset hides a `<ul>`'s. Menu.List restates it for the same reason.
|
|
61
|
+
*/
|
|
62
|
+
export declare const StackLayout: React.ForwardRefExoticComponent<StackLayoutProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -4,7 +4,7 @@ import { BulmaColorProps, BulmaColorPropsWithScheme } from './useColorClasses.js
|
|
|
4
4
|
import { BulmaSpacingProps } from './useSpacingClasses.js';
|
|
5
5
|
import { BulmaTypographyProps } from './useTypographyClasses.js';
|
|
6
6
|
import { BulmaVisibilityProps } from './useVisibilityClasses.js';
|
|
7
|
-
import { BulmaFlexboxProps } from './useFlexboxClasses.js';
|
|
7
|
+
import { BulmaFlexboxProps, type UseFlexboxClassesOptions } from './useFlexboxClasses.js';
|
|
8
8
|
import { BulmaOtherProps } from './useOtherClasses.js';
|
|
9
9
|
/**
|
|
10
10
|
* Props for applying Bulma helper classes to components.
|
|
@@ -31,8 +31,14 @@ export type BulmaClassesPropsWithScheme = Omit<BulmaClassesProps, keyof BulmaCol
|
|
|
31
31
|
* `background-color: var(--bulma-scheme-*)` style (`undefined` for all other
|
|
32
32
|
* inputs). Merge it with a user `style` prop via `mergeBulmaStyles`.
|
|
33
33
|
*
|
|
34
|
+
* The flex container props (`flexDirection`, `flexWrap`, `justifyContent`,
|
|
35
|
+
* `alignContent`, `alignItems`) emit a class only on a flex container: when a
|
|
36
|
+
* `display` prop is `flex` or `inline-flex`, or when `options.flexContainer`
|
|
37
|
+
* says the element's own stylesheet makes it one.
|
|
38
|
+
*
|
|
34
39
|
* @function useBulmaClasses
|
|
35
40
|
* @param props - Combination of BulmaClassesPropsWithScheme and additional props.
|
|
41
|
+
* @param options - Passed to `useFlexboxClasses`: whether the element is a flex container without a display prop.
|
|
36
42
|
* @returns An object containing the Bulma helper classes, optional helper
|
|
37
43
|
* styles, and unhandled props.
|
|
38
44
|
* @example
|
|
@@ -45,7 +51,7 @@ export type BulmaClassesPropsWithScheme = Omit<BulmaClassesProps, keyof BulmaCol
|
|
|
45
51
|
* // bulmaHelperStyles: { backgroundColor: 'var(--bulma-scheme-main-bis)' }
|
|
46
52
|
* // rest: { className: 'custom-class' }
|
|
47
53
|
*/
|
|
48
|
-
export declare const useBulmaClasses: <T extends object>(props: BulmaClassesPropsWithScheme & T) => {
|
|
54
|
+
export declare const useBulmaClasses: <T extends object>(props: BulmaClassesPropsWithScheme & T, options?: UseFlexboxClassesOptions) => {
|
|
49
55
|
bulmaHelperClasses: string;
|
|
50
56
|
bulmaHelperStyles?: CSSProperties;
|
|
51
57
|
rest: Omit<T, keyof BulmaClassesProps>;
|
|
@@ -22,11 +22,25 @@ export interface BulmaFlexboxProps extends BulmaDisplayProps {
|
|
|
22
22
|
/** Flex shrink value (e.g., '0', '1', '2', '3', '4', '5'). */
|
|
23
23
|
flexShrink?: (typeof validFlexGrowShrink)[number];
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Options for `useFlexboxClasses`, which `useBulmaClasses` passes through.
|
|
27
|
+
*/
|
|
28
|
+
export interface UseFlexboxClassesOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Whether the element is a flex container by its own CSS, as `Stack` and
|
|
31
|
+
* `Group` are, so the container helpers apply with no `display` prop. It
|
|
32
|
+
* adds no display class: the element's own stylesheet has to make it a flex
|
|
33
|
+
* container.
|
|
34
|
+
* @defaultValue false
|
|
35
|
+
*/
|
|
36
|
+
flexContainer?: boolean;
|
|
37
|
+
}
|
|
25
38
|
/**
|
|
26
39
|
* A hook that generates Bulma flexbox helper classes. Flex container helpers
|
|
27
40
|
* (direction, wrap, justify/align content, align items) are only emitted when
|
|
28
|
-
* one of the display props indicates a flex display
|
|
29
|
-
*
|
|
41
|
+
* one of the display props indicates a flex display, or when `options` says
|
|
42
|
+
* the element is a flex container by its own CSS; flex item helpers (align
|
|
43
|
+
* self, grow, shrink) are always emitted.
|
|
30
44
|
*
|
|
31
45
|
* Note: this hook reads the display props purely as a gate and never emits
|
|
32
46
|
* display classes — `is-flex` and friends come from useVisibilityClasses (or
|
|
@@ -34,6 +48,7 @@ export interface BulmaFlexboxProps extends BulmaDisplayProps {
|
|
|
34
48
|
*
|
|
35
49
|
* @function useFlexboxClasses
|
|
36
50
|
* @param props - Flexbox-related Bulma helper props.
|
|
51
|
+
* @param options - Whether the element is a flex container without a display prop.
|
|
37
52
|
* @returns A space-separated string of flexbox helper classes.
|
|
38
53
|
* @example
|
|
39
54
|
* const flexboxClasses = useFlexboxClasses({
|
|
@@ -42,5 +57,13 @@ export interface BulmaFlexboxProps extends BulmaDisplayProps {
|
|
|
42
57
|
* });
|
|
43
58
|
* // flexboxClasses: 'is-justify-content-center'
|
|
44
59
|
* // ('is-flex' itself comes from useVisibilityClasses/useBulmaClasses)
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* // An element whose own stylesheet makes it a flex container
|
|
63
|
+
* const flexboxClasses = useFlexboxClasses(
|
|
64
|
+
* { alignItems: 'center' },
|
|
65
|
+
* { flexContainer: true }
|
|
66
|
+
* );
|
|
67
|
+
* // flexboxClasses: 'is-align-items-center'
|
|
45
68
|
*/
|
|
46
|
-
export declare const useFlexboxClasses: (props: BulmaFlexboxProps) => string;
|
|
69
|
+
export declare const useFlexboxClasses: (props: BulmaFlexboxProps, options?: UseFlexboxClassesOptions) => string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from './components/TreeView.js';
|
|
|
33
33
|
export * from './components/ScrollArea.js';
|
|
34
34
|
export * from './components/Command.js';
|
|
35
35
|
export * from './components/DataTable.js';
|
|
36
|
+
export * from './components/Affix.js';
|
|
36
37
|
export * from './elements/Block.js';
|
|
37
38
|
export * from './elements/Box.js';
|
|
38
39
|
export * from './elements/Button.js';
|
|
@@ -48,6 +49,7 @@ export * from './elements/Divider.js';
|
|
|
48
49
|
export * from './elements/Emphasis.js';
|
|
49
50
|
export * from './elements/Figure.js';
|
|
50
51
|
export * from './elements/Icon.js';
|
|
52
|
+
export * from './elements/IconButton.js';
|
|
51
53
|
export * from './elements/IconText.js';
|
|
52
54
|
export * from './elements/Image.js';
|
|
53
55
|
export * from './elements/Kbd.js';
|
|
@@ -133,7 +135,7 @@ export type { FormFieldProps } from './form/fieldProps.js';
|
|
|
133
135
|
export * from './grid/Cell.js';
|
|
134
136
|
export * from './grid/Grid.js';
|
|
135
137
|
export * from './helpers/classNames.js';
|
|
136
|
-
export type { ConstrainedPolymorphicComponentWithoutRef, PolymorphicComponent, PolymorphicComponentWithoutRef, PolymorphicProps, PolymorphicRef, } from './helpers/polymorphic.js';
|
|
138
|
+
export type { ConstrainedPolymorphicComponent, ConstrainedPolymorphicComponentWithoutRef, PolymorphicComponent, PolymorphicComponentWithoutRef, PolymorphicProps, PolymorphicRef, } from './helpers/polymorphic.js';
|
|
137
139
|
export * from './helpers/mergeBulmaStyles.js';
|
|
138
140
|
export * from './helpers/useBulmaClasses.js';
|
|
139
141
|
export * from './helpers/Theme.js';
|
|
@@ -149,10 +151,15 @@ export { useNumberFormat } from './helpers/localeFormat.js';
|
|
|
149
151
|
export type { NumberFormatFunction } from './helpers/localeFormat.js';
|
|
150
152
|
export { useFocusTrap } from './helpers/useFocusTrap.js';
|
|
151
153
|
export type { UseFocusTrapOptions } from './helpers/useFocusTrap.js';
|
|
154
|
+
export * from './layout/Center.js';
|
|
152
155
|
export * from './layout/Container.js';
|
|
156
|
+
export * from './layout/Flex.js';
|
|
153
157
|
export * from './layout/Footer.js';
|
|
158
|
+
export * from './layout/Group.js';
|
|
154
159
|
export * from './layout/Hero.js';
|
|
155
160
|
export * from './layout/Level.js';
|
|
156
161
|
export * from './layout/Media.js';
|
|
157
162
|
export * from './layout/Section.js';
|
|
158
163
|
export * from './layout/Splitter.js';
|
|
164
|
+
export * from './layout/Stack.js';
|
|
165
|
+
export type { LayoutElement } from './helpers/stackLayout.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConstrainedPolymorphicComponent } from '../helpers/polymorphic.js';
|
|
3
|
+
import { type LayoutElement, type LayoutOwnProps } from '../helpers/stackLayout.js';
|
|
4
|
+
import type { BulmaGapStep, validDisplays } from '../helpers/useBulmaClasses.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Center component's own props, beside the attributes of the element
|
|
7
|
+
* `as` renders.
|
|
8
|
+
*/
|
|
9
|
+
export interface CenterOwnProps extends LayoutOwnProps {
|
|
10
|
+
/**
|
|
11
|
+
* Space between children, when there are several. None by default. Needs
|
|
12
|
+
* Bulma's helper classes: under `bestax-no-helpers.css` the default stays.
|
|
13
|
+
*/
|
|
14
|
+
gap?: BulmaGapStep;
|
|
15
|
+
/**
|
|
16
|
+
* `'inline-flex'` sizes it to its content, to center something inside a line
|
|
17
|
+
* of text. Needs Bulma's helper classes: under `bestax-no-helpers.css` the
|
|
18
|
+
* default stays.
|
|
19
|
+
*/
|
|
20
|
+
display?: (typeof validDisplays)[number] | 'none';
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props for the Center component. The attributes and the `ref` follow `as`.
|
|
24
|
+
*
|
|
25
|
+
* @extraProp {PolymorphicRef<LayoutElement>} [ref] - Ref forwarded to the element `as` renders.
|
|
26
|
+
*/
|
|
27
|
+
export type CenterProps<T extends LayoutElement = LayoutElement> = CenterOwnProps & Omit<React.ComponentPropsWithoutRef<T>, keyof CenterOwnProps | 'as'> & {
|
|
28
|
+
/**
|
|
29
|
+
* The element to render. With `ul` or `ol`, give it `li` children: it
|
|
30
|
+
* restates `role="list"`, which Bulma's list reset takes away in Safari.
|
|
31
|
+
* @defaultValue 'div'
|
|
32
|
+
*/
|
|
33
|
+
as?: T;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The `Center` component centers its content on both axes.
|
|
37
|
+
*
|
|
38
|
+
* Use it for a loader, an icon or an empty state in the middle of a box, a
|
|
39
|
+
* card or a section. Give it a height, or put it in something that has one,
|
|
40
|
+
* to center down the middle as well as across. Several children sit side by
|
|
41
|
+
* side in the middle, with no gap unless you set one.
|
|
42
|
+
*
|
|
43
|
+
* @function
|
|
44
|
+
* @param {CenterProps} props - Props for the Center component.
|
|
45
|
+
* @param {React.Ref} ref - Forwarded ref to the element `as` renders.
|
|
46
|
+
* @returns {JSX.Element} The rendered center.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* <Center p="6">
|
|
50
|
+
* <Loader />
|
|
51
|
+
* </Center>
|
|
52
|
+
*/
|
|
53
|
+
export declare const Center: ConstrainedPolymorphicComponent<CenterOwnProps, LayoutElement, "div">;
|
|
54
|
+
export default Center;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConstrainedPolymorphicComponent } from '../helpers/polymorphic.js';
|
|
3
|
+
import { type LayoutElement, type LayoutOwnProps } from '../helpers/stackLayout.js';
|
|
4
|
+
import type { BulmaGapStep, validAlignContents, validAlignItems, validFlexDirections, validFlexWraps, validJustifyContents } from '../helpers/useBulmaClasses.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Flex component's own props, beside the attributes of the element `as`
|
|
7
|
+
* renders.
|
|
8
|
+
*/
|
|
9
|
+
export interface FlexOwnProps extends LayoutOwnProps {
|
|
10
|
+
/**
|
|
11
|
+
* The main axis. `row-reverse` and `column-reverse` change only what's seen:
|
|
12
|
+
* reading and Tab order still follow the children's order (WCAG 1.3.2 and
|
|
13
|
+
* 2.4.3). Needs Bulma's helper classes: under `bestax-no-helpers.css` the
|
|
14
|
+
* default stays.
|
|
15
|
+
* @defaultValue 'row'
|
|
16
|
+
*/
|
|
17
|
+
flexDirection?: (typeof validFlexDirections)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Whether children move to a new line when they don't fit. Needs Bulma's
|
|
20
|
+
* helper classes: under `bestax-no-helpers.css` the default stays.
|
|
21
|
+
* @defaultValue 'nowrap'
|
|
22
|
+
*/
|
|
23
|
+
flexWrap?: (typeof validFlexWraps)[number];
|
|
24
|
+
/**
|
|
25
|
+
* How each child sits across the main axis. Needs Bulma's helper classes:
|
|
26
|
+
* under `bestax-no-helpers.css` the default stays.
|
|
27
|
+
* @defaultValue 'stretch'
|
|
28
|
+
*/
|
|
29
|
+
alignItems?: (typeof validAlignItems)[number];
|
|
30
|
+
/**
|
|
31
|
+
* Where the children sit along the main axis. Needs Bulma's helper classes:
|
|
32
|
+
* under `bestax-no-helpers.css` the default stays.
|
|
33
|
+
*/
|
|
34
|
+
justifyContent?: (typeof validJustifyContents)[number];
|
|
35
|
+
/**
|
|
36
|
+
* How wrapped lines share the space across the main axis. Needs Bulma's
|
|
37
|
+
* helper classes: under `bestax-no-helpers.css` the default stays.
|
|
38
|
+
*/
|
|
39
|
+
alignContent?: (typeof validAlignContents)[number];
|
|
40
|
+
/**
|
|
41
|
+
* Space between children, a step of Bulma's gap scale. None by default. Needs
|
|
42
|
+
* Bulma's helper classes: under `bestax-no-helpers.css` the default stays.
|
|
43
|
+
*/
|
|
44
|
+
gap?: BulmaGapStep;
|
|
45
|
+
/**
|
|
46
|
+
* Space between wrapped lines, when it differs from `gap`. Needs Bulma's
|
|
47
|
+
* helper classes: under `bestax-no-helpers.css` the default stays.
|
|
48
|
+
*/
|
|
49
|
+
rowGap?: BulmaGapStep;
|
|
50
|
+
/**
|
|
51
|
+
* Space between children along a row, when it differs from `gap`. Needs
|
|
52
|
+
* Bulma's helper classes: under `bestax-no-helpers.css` the default stays.
|
|
53
|
+
*/
|
|
54
|
+
columnGap?: BulmaGapStep;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Props for the Flex component. The attributes and the `ref` follow `as`, so
|
|
58
|
+
* `as="form"` takes `action` and `as="fieldset"` takes `disabled`.
|
|
59
|
+
*
|
|
60
|
+
* @extraProp {PolymorphicRef<LayoutElement>} [ref] - Ref forwarded to the element `as` renders.
|
|
61
|
+
*/
|
|
62
|
+
export type FlexProps<T extends LayoutElement = LayoutElement> = FlexOwnProps & Omit<React.ComponentPropsWithoutRef<T>, keyof FlexOwnProps | 'as'> & {
|
|
63
|
+
/**
|
|
64
|
+
* The element to render. With `ul` or `ol`, give it `li` children: it
|
|
65
|
+
* restates `role="list"`, which Bulma's list reset takes away in Safari.
|
|
66
|
+
* @defaultValue 'div'
|
|
67
|
+
*/
|
|
68
|
+
as?: T;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* The `Flex` component is a flex container with CSS's own defaults, taking the flex container's properties as props.
|
|
72
|
+
*
|
|
73
|
+
* It's a row that doesn't wrap, with its children stretched across it and no
|
|
74
|
+
* gap, until you set otherwise. Use it for a layout of your own, such as a
|
|
75
|
+
* fixed side beside a growing one, with `flexGrow` and `flexShrink` on the
|
|
76
|
+
* children. Its children's own block margins are zeroed, so the gap is the
|
|
77
|
+
* only space. For a column of blocks or a row of controls with Bulma's
|
|
78
|
+
* spacing already in place, `Stack` and `Group` start closer.
|
|
79
|
+
*
|
|
80
|
+
* @function
|
|
81
|
+
* @param {FlexProps} props - Props for the Flex component.
|
|
82
|
+
* @param {React.Ref} ref - Forwarded ref to the element `as` renders.
|
|
83
|
+
* @returns {JSX.Element} The rendered flex container.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* <Flex gap="4" alignItems="flex-start">
|
|
87
|
+
* <Box flexShrink="0">…</Box>
|
|
88
|
+
* <Box flexGrow="1">…</Box>
|
|
89
|
+
* </Flex>
|
|
90
|
+
*/
|
|
91
|
+
export declare const Flex: ConstrainedPolymorphicComponent<FlexOwnProps, LayoutElement, "div">;
|
|
92
|
+
export default Flex;
|