@allxsmith/bestax-bulma 5.6.2 → 5.8.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/AGENTS.md +28 -0
- package/CLAUDE.md +28 -0
- package/README.md +15 -15
- package/dist/index.cjs.js +3885 -243
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3884 -242
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Column.d.ts +43 -0
- package/dist/types/columns/Columns.d.ts +41 -1
- package/dist/types/components/Avatar.d.ts +37 -0
- package/dist/types/components/Avatars.d.ts +15 -2
- package/dist/types/components/Badge.d.ts +42 -0
- package/dist/types/components/Breadcrumb.d.ts +28 -0
- package/dist/types/components/Card.d.ts +70 -18
- package/dist/types/components/Carousel.d.ts +70 -0
- package/dist/types/components/Collapse.d.ts +53 -0
- package/dist/types/components/Dialog.d.ts +94 -0
- package/dist/types/components/Dropdown.d.ts +44 -0
- package/dist/types/components/Loading.d.ts +55 -0
- package/dist/types/components/Menu.d.ts +48 -0
- package/dist/types/components/Message.d.ts +27 -9
- package/dist/types/components/Modal.d.ts +65 -17
- package/dist/types/components/Navbar.d.ts +171 -12
- package/dist/types/components/Pagination.d.ts +84 -7
- package/dist/types/components/Panel.d.ts +109 -9
- package/dist/types/components/Reveal.d.ts +43 -0
- package/dist/types/components/Sidebar.d.ts +40 -0
- package/dist/types/components/Steps.d.ts +66 -1
- package/dist/types/components/Tabs.d.ts +100 -11
- package/dist/types/components/Toast.d.ts +109 -0
- package/dist/types/components/Tooltip.d.ts +50 -0
- package/dist/types/elements/Block.d.ts +20 -0
- package/dist/types/elements/Box.d.ts +23 -1
- package/dist/types/elements/Button.d.ts +26 -0
- package/dist/types/elements/Buttons.d.ts +16 -1
- package/dist/types/elements/Code.d.ts +19 -0
- package/dist/types/elements/Content.d.ts +21 -0
- package/dist/types/elements/Delete.d.ts +22 -0
- package/dist/types/elements/Divider.d.ts +16 -0
- package/dist/types/elements/Emphasis.d.ts +19 -0
- package/dist/types/elements/Figure.d.ts +25 -0
- package/dist/types/elements/Icon.d.ts +28 -0
- package/dist/types/elements/IconText.d.ts +20 -1
- package/dist/types/elements/Image.d.ts +27 -0
- package/dist/types/elements/Link.d.ts +24 -0
- package/dist/types/elements/LinkButton.d.ts +26 -0
- package/dist/types/elements/ListItem.d.ts +20 -0
- package/dist/types/elements/Notification.d.ts +101 -0
- package/dist/types/elements/OrderedList.d.ts +14 -1
- package/dist/types/elements/Paragraph.d.ts +19 -0
- package/dist/types/elements/Pre.d.ts +19 -0
- package/dist/types/elements/Progress.d.ts +20 -0
- package/dist/types/elements/Skeleton.d.ts +31 -0
- package/dist/types/elements/Span.d.ts +18 -0
- package/dist/types/elements/Strong.d.ts +19 -0
- package/dist/types/elements/SubTitle.d.ts +27 -0
- package/dist/types/elements/Table.d.ts +23 -1
- package/dist/types/elements/Tag.d.ts +28 -0
- package/dist/types/elements/Tags.d.ts +11 -1
- package/dist/types/elements/Tbody.d.ts +19 -0
- package/dist/types/elements/Td.d.ts +24 -0
- package/dist/types/elements/Tfoot.d.ts +19 -0
- package/dist/types/elements/Th.d.ts +25 -0
- package/dist/types/elements/Thead.d.ts +19 -0
- package/dist/types/elements/Title.d.ts +28 -0
- package/dist/types/elements/Tr.d.ts +21 -0
- package/dist/types/elements/UnorderedList.d.ts +11 -1
- package/dist/types/form/Autocomplete.d.ts +67 -0
- package/dist/types/form/Checkbox.d.ts +44 -0
- package/dist/types/form/Checkboxes.d.ts +13 -1
- package/dist/types/form/Control.d.ts +36 -0
- package/dist/types/form/DateInput.d.ts +44 -0
- package/dist/types/form/DateInputBase.d.ts +47 -0
- package/dist/types/form/DateTimeInput.d.ts +42 -0
- package/dist/types/form/DateTimeInputBase.d.ts +56 -0
- package/dist/types/form/Field.d.ts +66 -2
- package/dist/types/form/File.d.ts +26 -0
- package/dist/types/form/FormContext.d.ts +46 -0
- package/dist/types/form/Input.d.ts +49 -0
- package/dist/types/form/InputBase.d.ts +22 -0
- package/dist/types/form/Numberinput.d.ts +46 -0
- package/dist/types/form/Radio.d.ts +44 -0
- package/dist/types/form/Radios.d.ts +13 -1
- package/dist/types/form/Rate.d.ts +71 -0
- package/dist/types/form/Select.d.ts +39 -0
- package/dist/types/form/SelectBase.d.ts +25 -0
- package/dist/types/form/Slider.d.ts +71 -0
- package/dist/types/form/Switch.d.ts +53 -0
- package/dist/types/form/Taginput.d.ts +77 -0
- package/dist/types/form/TextArea.d.ts +38 -0
- package/dist/types/form/TextAreaBase.d.ts +25 -0
- package/dist/types/form/TimeInput.d.ts +39 -0
- package/dist/types/form/TimeInputBase.d.ts +72 -0
- package/dist/types/form/_pickerInternals/Calendar.d.ts +6 -0
- package/dist/types/form/_pickerInternals/TimeWheels.d.ts +13 -0
- package/dist/types/form/_pickerInternals/audioTick.d.ts +47 -0
- package/dist/types/form/_pickerInternals/dateUtils.d.ts +13 -0
- package/dist/types/form/_pickerInternals/formatters.d.ts +19 -0
- package/dist/types/form/_pickerInternals/haptics.d.ts +23 -0
- package/dist/types/form/_pickerInternals/pickerTypes.d.ts +8 -0
- package/dist/types/form/_pickerInternals/segmentMap.d.ts +48 -0
- package/dist/types/form/_pickerInternals/useNativeMobilePicker.d.ts +1 -0
- package/dist/types/form/_pickerInternals/useSegmentedEntry.d.ts +30 -0
- package/dist/types/form/fieldProps.d.ts +12 -0
- package/dist/types/grid/Cell.d.ts +26 -0
- package/dist/types/grid/Grid.d.ts +36 -1
- package/dist/types/helpers/Config.d.ts +50 -0
- package/dist/types/helpers/Theme.d.ts +66 -0
- package/dist/types/helpers/bulmaClassHelpers.d.ts +97 -0
- package/dist/types/helpers/classNames.d.ts +50 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +22 -0
- package/dist/types/helpers/useColorClasses.d.ts +20 -0
- package/dist/types/helpers/useFlexboxClasses.d.ts +34 -0
- package/dist/types/helpers/useOtherClasses.d.ts +27 -0
- package/dist/types/helpers/useSpacingClasses.d.ts +27 -0
- package/dist/types/helpers/useTypographyClasses.d.ts +32 -0
- package/dist/types/helpers/useVisibilityClasses.d.ts +25 -0
- package/dist/types/helpers/withSubComponents.d.ts +16 -0
- package/dist/types/layout/Container.d.ts +26 -0
- package/dist/types/layout/Footer.d.ts +23 -0
- package/dist/types/layout/Hero.d.ts +66 -5
- package/dist/types/layout/Level.d.ts +68 -5
- package/dist/types/layout/Media.d.ts +63 -5
- package/dist/types/layout/Section.d.ts +21 -0
- package/dist/types/skill-examples/ExampleMeta.d.ts +5 -0
- package/dist/types/skill-examples/ProfileCard.d.ts +13 -0
- package/llms.txt +9 -0
- package/package.json +13 -11
|
@@ -1,17 +1,67 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
/** Supported icon library identifiers. */
|
|
2
3
|
type IconLibrary = 'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols';
|
|
4
|
+
/**
|
|
5
|
+
* Shape of the configuration context value.
|
|
6
|
+
*
|
|
7
|
+
* @property {string} [classPrefix] - Prefix applied to all Bulma class names.
|
|
8
|
+
* @property {IconLibrary} [iconLibrary] - Default icon library for Icon components.
|
|
9
|
+
*/
|
|
3
10
|
export interface ConfigContextProps {
|
|
4
11
|
classPrefix?: string;
|
|
5
12
|
iconLibrary?: IconLibrary;
|
|
6
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* Hook to access the bulma-ui configuration context.
|
|
16
|
+
*
|
|
17
|
+
* @function
|
|
18
|
+
* @returns {ConfigContextProps} The current configuration values.
|
|
19
|
+
*/
|
|
7
20
|
export declare const useConfig: () => ConfigContextProps;
|
|
21
|
+
/**
|
|
22
|
+
* Props for the ConfigProvider component.
|
|
23
|
+
*
|
|
24
|
+
* @property {React.ReactNode} children - Child components to receive configuration.
|
|
25
|
+
* @property {string} [classPrefix] - Prefix applied to all Bulma class names.
|
|
26
|
+
* @property {IconLibrary} [iconLibrary] - Default icon library for Icon components.
|
|
27
|
+
*/
|
|
8
28
|
export interface ConfigProviderProps {
|
|
9
29
|
children: ReactNode;
|
|
10
30
|
classPrefix?: string;
|
|
11
31
|
iconLibrary?: IconLibrary;
|
|
12
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* ConfigProvider injects configuration into all child components via React context.
|
|
35
|
+
*
|
|
36
|
+
* @function
|
|
37
|
+
* @param {ConfigProviderProps} props - Provider props.
|
|
38
|
+
* @returns {JSX.Element} The context provider wrapping children.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <ConfigProvider classPrefix="my-" iconLibrary="mdi">
|
|
42
|
+
* <App />
|
|
43
|
+
* </ConfigProvider>
|
|
44
|
+
*/
|
|
13
45
|
export declare const ConfigProvider: React.FC<ConfigProviderProps>;
|
|
46
|
+
/**
|
|
47
|
+
* Utility hook to get the configured class prefix string.
|
|
48
|
+
*
|
|
49
|
+
* @function
|
|
50
|
+
* @returns {string} The class prefix, or empty string if none configured.
|
|
51
|
+
*/
|
|
14
52
|
export declare const useClassPrefix: () => string;
|
|
53
|
+
/**
|
|
54
|
+
* Hook that returns a function to prefix a class name with the configured prefix.
|
|
55
|
+
*
|
|
56
|
+
* @function
|
|
57
|
+
* @returns {(className: string) => string} A function that applies the class prefix.
|
|
58
|
+
*/
|
|
15
59
|
export declare const usePrefixedClass: () => (className: string) => string;
|
|
60
|
+
/**
|
|
61
|
+
* Hook to get the default icon library from configuration.
|
|
62
|
+
*
|
|
63
|
+
* @function
|
|
64
|
+
* @returns {IconLibrary | undefined} The configured icon library, or undefined.
|
|
65
|
+
*/
|
|
16
66
|
export declare const useIconLibrary: () => IconLibrary | undefined;
|
|
17
67
|
export {};
|
|
@@ -1,8 +1,58 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BulmaClassesProps } from './useBulmaClasses';
|
|
3
3
|
declare const bulmaCssVars: readonly ["--bulma-scheme-h", "--bulma-scheme-s", "--bulma-light-l", "--bulma-light-invert-l", "--bulma-dark-l", "--bulma-dark-invert-l", "--bulma-soft-l", "--bulma-bold-l", "--bulma-soft-invert-l", "--bulma-bold-invert-l", "--bulma-hover-background-l-delta", "--bulma-active-background-l-delta", "--bulma-hover-border-l-delta", "--bulma-active-border-l-delta", "--bulma-hover-color-l-delta", "--bulma-active-color-l-delta", "--bulma-hover-shadow-a-delta", "--bulma-active-shadow-a-delta", "--bulma-primary-h", "--bulma-primary-s", "--bulma-primary-l", "--bulma-link-h", "--bulma-link-s", "--bulma-link-l", "--bulma-info-h", "--bulma-info-s", "--bulma-info-l", "--bulma-success-h", "--bulma-success-s", "--bulma-success-l", "--bulma-warning-h", "--bulma-warning-s", "--bulma-warning-l", "--bulma-danger-h", "--bulma-danger-s", "--bulma-danger-l", "--bulma-family-primary", "--bulma-family-secondary", "--bulma-family-code", "--bulma-size-small", "--bulma-size-normal", "--bulma-size-medium", "--bulma-size-large", "--bulma-weight-light", "--bulma-weight-normal", "--bulma-weight-medium", "--bulma-weight-semibold", "--bulma-weight-bold", "--bulma-weight-extrabold", "--bulma-block-spacing", "--bulma-duration", "--bulma-easing", "--bulma-radius-small", "--bulma-radius", "--bulma-radius-medium", "--bulma-radius-large", "--bulma-radius-rounded", "--bulma-speed", "--bulma-arrow-color", "--bulma-loading-color", "--bulma-burger-h", "--bulma-burger-s", "--bulma-burger-l", "--bulma-burger-border-radius", "--bulma-burger-gap", "--bulma-burger-item-height", "--bulma-burger-item-width", "--bulma-body-background-color", "--bulma-body-size", "--bulma-body-min-width", "--bulma-body-rendering", "--bulma-body-family", "--bulma-body-overflow-x", "--bulma-body-overflow-y", "--bulma-body-color", "--bulma-body-font-size", "--bulma-body-weight", "--bulma-body-line-height", "--bulma-code-family", "--bulma-code-padding", "--bulma-code-weight", "--bulma-code-size", "--bulma-small-font-size", "--bulma-hr-background-color", "--bulma-hr-height", "--bulma-hr-margin", "--bulma-strong-color", "--bulma-strong-weight", "--bulma-pre-font-size", "--bulma-pre-padding", "--bulma-pre-code-font-size", "--bulma-skeleton-background", "--bulma-skeleton-radius", "--bulma-skeleton-block-min-height", "--bulma-skeleton-lines-gap", "--bulma-skeleton-line-height", "--bulma-breadcrumb-item-color", "--bulma-breadcrumb-item-hover-color", "--bulma-breadcrumb-item-active-color", "--bulma-breadcrumb-item-padding-vertical", "--bulma-breadcrumb-item-padding-horizontal", "--bulma-breadcrumb-item-separator-color", "--bulma-card-color", "--bulma-card-background-color", "--bulma-card-shadow", "--bulma-card-radius", "--bulma-card-header-background-color", "--bulma-card-header-color", "--bulma-card-header-padding", "--bulma-card-header-shadow", "--bulma-card-header-weight", "--bulma-card-content-background-color", "--bulma-card-content-padding", "--bulma-card-footer-background-color", "--bulma-card-footer-border-top", "--bulma-card-footer-padding", "--bulma-card-media-margin", "--bulma-dropdown-menu-min-width", "--bulma-dropdown-content-background-color", "--bulma-dropdown-content-offset", "--bulma-dropdown-content-padding-bottom", "--bulma-dropdown-content-padding-top", "--bulma-dropdown-content-radius", "--bulma-dropdown-content-shadow", "--bulma-dropdown-content-z", "--bulma-dropdown-item-h", "--bulma-dropdown-item-s", "--bulma-dropdown-item-l", "--bulma-dropdown-item-background-l", "--bulma-dropdown-item-background-l-delta", "--bulma-dropdown-item-hover-background-l-delta", "--bulma-dropdown-item-active-background-l-delta", "--bulma-dropdown-item-color-l", "--bulma-dropdown-item-selected-h", "--bulma-dropdown-item-selected-s", "--bulma-dropdown-item-selected-l", "--bulma-dropdown-item-selected-background-l", "--bulma-dropdown-item-selected-color-l", "--bulma-dropdown-divider-background-color", "--bulma-menu-item-h", "--bulma-menu-item-s", "--bulma-menu-item-l", "--bulma-menu-item-background-l", "--bulma-menu-item-background-l-delta", "--bulma-menu-item-hover-background-l-delta", "--bulma-menu-item-active-background-l-delta", "--bulma-menu-item-color-l", "--bulma-menu-item-radius", "--bulma-menu-item-selected-h", "--bulma-menu-item-selected-s", "--bulma-menu-item-selected-l", "--bulma-menu-item-selected-background-l", "--bulma-menu-item-selected-color-l", "--bulma-menu-list-border-left", "--bulma-menu-list-line-height", "--bulma-menu-list-link-padding", "--bulma-menu-nested-list-margin", "--bulma-menu-nested-list-padding-left", "--bulma-menu-label-color", "--bulma-menu-label-font-size", "--bulma-menu-label-letter-spacing", "--bulma-menu-label-spacing", "--bulma-message-h", "--bulma-message-s", "--bulma-message-background-l", "--bulma-message-border-l", "--bulma-message-border-l-delta", "--bulma-message-border-style", "--bulma-message-border-width", "--bulma-message-color-l", "--bulma-message-radius", "--bulma-message-header-weight", "--bulma-message-header-padding", "--bulma-message-header-radius", "--bulma-message-header-body-border-width", "--bulma-message-header-background-l", "--bulma-message-header-color-l", "--bulma-message-body-border-width", "--bulma-message-body-color", "--bulma-message-body-padding", "--bulma-message-body-radius", "--bulma-message-body-pre-code-background-color", "--bulma-modal-z", "--bulma-modal-background-background-color", "--bulma-modal-content-width", "--bulma-modal-content-margin-mobile", "--bulma-modal-content-spacing-mobile", "--bulma-modal-content-spacing-tablet", "--bulma-modal-close-dimensions", "--bulma-modal-close-right", "--bulma-modal-close-top", "--bulma-modal-card-spacing", "--bulma-modal-card-head-background-color", "--bulma-modal-card-head-padding", "--bulma-modal-card-head-radius", "--bulma-modal-card-title-color", "--bulma-modal-card-title-line-height", "--bulma-modal-card-title-size", "--bulma-modal-card-foot-background-color", "--bulma-modal-card-foot-radius", "--bulma-modal-card-body-background-color", "--bulma-modal-card-body-padding", "--bulma-navbar-h", "--bulma-navbar-s", "--bulma-navbar-l", "--bulma-navbar-background-color", "--bulma-navbar-box-shadow-size", "--bulma-navbar-box-shadow-color", "--bulma-navbar-padding-vertical", "--bulma-navbar-padding-horizontal", "--bulma-navbar-z", "--bulma-navbar-fixed-z", "--bulma-navbar-item-background-a", "--bulma-navbar-item-background-l", "--bulma-navbar-item-background-l-delta", "--bulma-navbar-item-hover-background-l-delta", "--bulma-navbar-item-active-background-l-delta", "--bulma-navbar-item-color-l", "--bulma-navbar-item-selected-h", "--bulma-navbar-item-selected-s", "--bulma-navbar-item-selected-l", "--bulma-navbar-item-selected-background-l", "--bulma-navbar-item-selected-color-l", "--bulma-navbar-item-img-max-height", "--bulma-navbar-burger-color", "--bulma-navbar-tab-hover-background-color", "--bulma-navbar-tab-hover-border-bottom-color", "--bulma-navbar-tab-active-color", "--bulma-navbar-tab-active-background-color", "--bulma-navbar-tab-active-border-bottom-color", "--bulma-navbar-tab-active-border-bottom-style", "--bulma-navbar-tab-active-border-bottom-width", "--bulma-navbar-dropdown-background-color", "--bulma-navbar-dropdown-border-l", "--bulma-navbar-dropdown-border-color", "--bulma-navbar-dropdown-border-style", "--bulma-navbar-dropdown-border-width", "--bulma-navbar-dropdown-offset", "--bulma-navbar-dropdown-arrow", "--bulma-navbar-dropdown-radius", "--bulma-navbar-dropdown-z", "--bulma-navbar-dropdown-boxed-radius", "--bulma-navbar-dropdown-boxed-shadow", "--bulma-navbar-dropdown-item-h", "--bulma-navbar-dropdown-item-s", "--bulma-navbar-dropdown-item-l", "--bulma-navbar-dropdown-item-background-l", "--bulma-navbar-dropdown-item-color-l", "--bulma-navbar-divider-background-l", "--bulma-navbar-divider-height", "--bulma-navbar-bottom-box-shadow-size", "--bulma-pagination-margin", "--bulma-pagination-min-width", "--bulma-pagination-item-h", "--bulma-pagination-item-s", "--bulma-pagination-item-l", "--bulma-pagination-item-background-l-delta", "--bulma-pagination-item-hover-background-l-delta", "--bulma-pagination-item-active-background-l-delta", "--bulma-pagination-item-border-style", "--bulma-pagination-item-border-width", "--bulma-pagination-item-border-l", "--bulma-pagination-item-border-l-delta", "--bulma-pagination-item-hover-border-l-delta", "--bulma-pagination-item-active-border-l-delta", "--bulma-pagination-item-focus-border-l-delta", "--bulma-pagination-item-color-l", "--bulma-pagination-item-font-size", "--bulma-pagination-item-margin", "--bulma-pagination-item-padding-left", "--bulma-pagination-item-padding-right", "--bulma-pagination-item-outer-shadow-h", "--bulma-pagination-item-outer-shadow-s", "--bulma-pagination-item-outer-shadow-l", "--bulma-pagination-item-outer-shadow-a", "--bulma-pagination-nav-padding-left", "--bulma-pagination-nav-padding-right", "--bulma-pagination-disabled-color", "--bulma-pagination-disabled-background-color", "--bulma-pagination-disabled-border-color", "--bulma-pagination-current-color", "--bulma-pagination-current-background-color", "--bulma-pagination-current-border-color", "--bulma-pagination-ellipsis-color", "--bulma-pagination-shadow-inset", "--bulma-pagination-selected-item-h", "--bulma-pagination-selected-item-s", "--bulma-pagination-selected-item-l", "--bulma-pagination-selected-item-background-l", "--bulma-pagination-selected-item-border-l", "--bulma-pagination-selected-item-color-l", "--bulma-panel-margin", "--bulma-panel-item-border", "--bulma-panel-radius", "--bulma-panel-shadow", "--bulma-panel-heading-line-height", "--bulma-panel-heading-padding", "--bulma-panel-heading-radius", "--bulma-panel-heading-size", "--bulma-panel-heading-weight", "--bulma-panel-tabs-font-size", "--bulma-panel-tab-border-bottom-color", "--bulma-panel-tab-border-bottom-style", "--bulma-panel-tab-border-bottom-width", "--bulma-panel-tab-active-color", "--bulma-panel-list-item-color", "--bulma-panel-list-item-hover-color", "--bulma-panel-block-color", "--bulma-panel-block-hover-background-color", "--bulma-panel-block-active-border-left-color", "--bulma-panel-block-active-color", "--bulma-panel-block-active-icon-color", "--bulma-panel-icon-color", "--bulma-tabs-border-bottom-color", "--bulma-tabs-border-bottom-style", "--bulma-tabs-border-bottom-width", "--bulma-tabs-link-color", "--bulma-tabs-link-hover-border-bottom-color", "--bulma-tabs-link-hover-color", "--bulma-tabs-link-active-border-bottom-color", "--bulma-tabs-link-active-color", "--bulma-tabs-link-padding", "--bulma-tabs-boxed-link-radius", "--bulma-tabs-boxed-link-hover-background-color", "--bulma-tabs-boxed-link-hover-border-bottom-color", "--bulma-tabs-boxed-link-active-background-color", "--bulma-tabs-boxed-link-active-border-color", "--bulma-tabs-boxed-link-active-border-bottom-color", "--bulma-tabs-toggle-link-border-color", "--bulma-tabs-toggle-link-border-style", "--bulma-tabs-toggle-link-border-width", "--bulma-tabs-toggle-link-hover-background-color", "--bulma-tabs-toggle-link-hover-border-color", "--bulma-tabs-toggle-link-radius", "--bulma-tabs-toggle-link-active-background-color", "--bulma-tabs-toggle-link-active-border-color", "--bulma-tabs-toggle-link-active-color", "--bulma-box-background-color", "--bulma-box-color", "--bulma-box-radius", "--bulma-box-shadow", "--bulma-box-padding", "--bulma-box-link-hover-shadow", "--bulma-box-link-active-shadow", "--bulma-content-heading-color", "--bulma-content-heading-weight", "--bulma-content-heading-line-height", "--bulma-content-block-margin-bottom", "--bulma-content-blockquote-background-color", "--bulma-content-blockquote-border-left", "--bulma-content-blockquote-padding", "--bulma-content-pre-padding", "--bulma-content-table-cell-border", "--bulma-content-table-cell-border-width", "--bulma-content-table-cell-padding", "--bulma-content-table-cell-heading-color", "--bulma-content-table-head-cell-border-width", "--bulma-content-table-head-cell-color", "--bulma-content-table-body-last-row-cell-border-bottom-width", "--bulma-content-table-foot-cell-border-width", "--bulma-content-table-foot-cell-color", "--bulma-delete-dimensions", "--bulma-delete-background-l", "--bulma-delete-background-alpha", "--bulma-delete-color", "--bulma-icon-dimensions", "--bulma-icon-dimensions-small", "--bulma-icon-dimensions-medium", "--bulma-icon-dimensions-large", "--bulma-icon-text-spacing", "--bulma-notification-h", "--bulma-notification-s", "--bulma-notification-background-l", "--bulma-notification-color-l", "--bulma-notification-code-background-color", "--bulma-notification-radius", "--bulma-notification-padding", "--bulma-progress-border-radius", "--bulma-progress-bar-background-color", "--bulma-progress-value-background-color", "--bulma-progress-indeterminate-duration", "--bulma-table-color", "--bulma-table-background-color", "--bulma-table-cell-border-color", "--bulma-table-cell-border-style", "--bulma-table-cell-border-width", "--bulma-table-cell-padding", "--bulma-table-cell-heading-color", "--bulma-table-cell-text-align", "--bulma-table-head-cell-border-width", "--bulma-table-head-cell-color", "--bulma-table-foot-cell-border-width", "--bulma-table-foot-cell-color", "--bulma-table-head-background-color", "--bulma-table-body-background-color", "--bulma-table-foot-background-color", "--bulma-table-row-hover-background-color", "--bulma-table-row-active-background-color", "--bulma-table-row-active-color", "--bulma-table-striped-row-even-background-color", "--bulma-table-striped-row-even-hover-background-color", "--bulma-tag-h", "--bulma-tag-s", "--bulma-tag-background-l", "--bulma-tag-background-l-delta", "--bulma-tag-hover-background-l-delta", "--bulma-tag-active-background-l-delta", "--bulma-tag-color-l", "--bulma-tag-radius", "--bulma-tag-delete-margin", "--bulma-title-color", "--bulma-title-family", "--bulma-title-size", "--bulma-title-weight", "--bulma-title-line-height", "--bulma-title-strong-color", "--bulma-title-strong-weight", "--bulma-title-sub-size", "--bulma-title-sup-size", "--bulma-subtitle-color", "--bulma-subtitle-family", "--bulma-subtitle-size", "--bulma-subtitle-weight", "--bulma-subtitle-line-height", "--bulma-subtitle-strong-color", "--bulma-subtitle-strong-weight", "--bulma-control-radius", "--bulma-control-radius-small", "--bulma-control-border-width", "--bulma-control-height", "--bulma-control-line-height", "--bulma-control-padding-vertical", "--bulma-control-padding-horizontal", "--bulma-control-size", "--bulma-control-focus-shadow-l", "--bulma-file-radius", "--bulma-file-name-border-color", "--bulma-file-name-border-style", "--bulma-file-name-border-width", "--bulma-file-name-max-width", "--bulma-file-h", "--bulma-file-s", "--bulma-file-background-l", "--bulma-file-background-l-delta", "--bulma-file-hover-background-l-delta", "--bulma-file-active-background-l-delta", "--bulma-file-border-l", "--bulma-file-border-l-delta", "--bulma-file-hover-border-l-delta", "--bulma-file-active-border-l-delta", "--bulma-file-cta-color-l", "--bulma-file-name-color-l", "--bulma-file-color-l-delta", "--bulma-file-hover-color-l-delta", "--bulma-file-active-color-l-delta", "--bulma-input-h", "--bulma-input-s", "--bulma-input-l", "--bulma-input-border-style", "--bulma-input-border-l", "--bulma-input-border-l-delta", "--bulma-input-hover-border-l-delta", "--bulma-input-active-border-l-delta", "--bulma-input-focus-h", "--bulma-input-focus-s", "--bulma-input-focus-l", "--bulma-input-focus-shadow-size", "--bulma-input-focus-shadow-alpha", "--bulma-input-color-l", "--bulma-input-background-l", "--bulma-input-background-l-delta", "--bulma-input-height", "--bulma-input-shadow", "--bulma-input-placeholder-color", "--bulma-input-disabled-color", "--bulma-input-disabled-background-color", "--bulma-input-disabled-border-color", "--bulma-input-disabled-placeholder-color", "--bulma-input-arrow", "--bulma-input-icon-color", "--bulma-input-icon-hover-color", "--bulma-input-icon-focus-color", "--bulma-input-radius", "--bulma-column-gap", "--bulma-grid-gap", "--bulma-grid-column-count", "--bulma-grid-column-min", "--bulma-grid-cell-column-span", "--bulma-grid-cell-column-start", "--bulma-footer-background-color", "--bulma-footer-color", "--bulma-footer-padding", "--bulma-hero-body-padding", "--bulma-hero-body-padding-tablet", "--bulma-hero-body-padding-small", "--bulma-hero-body-padding-medium", "--bulma-hero-body-padding-large", "--bulma-media-border-color", "--bulma-media-border-size", "--bulma-media-spacing", "--bulma-media-spacing-large", "--bulma-media-content-spacing", "--bulma-media-level-1-spacing", "--bulma-media-level-1-content-spacing", "--bulma-media-level-2-spacing", "--bulma-section-padding", "--bulma-section-padding-desktop", "--bulma-section-padding-medium", "--bulma-section-padding-large"];
|
|
4
|
+
/** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */
|
|
4
5
|
type BulmaVarKey = (typeof bulmaCssVars)[number];
|
|
6
|
+
/** A partial record mapping Bulma CSS variable keys to string values. */
|
|
5
7
|
type BulmaVars = Partial<Record<BulmaVarKey, string>>;
|
|
8
|
+
/**
|
|
9
|
+
* Props for the Theme component.
|
|
10
|
+
*
|
|
11
|
+
* @property {React.ReactNode} children - Content to render inside the theme scope.
|
|
12
|
+
* @property {string} [className] - Additional CSS classes (only when isRoot is false).
|
|
13
|
+
* @property {boolean} [isRoot] - Inject CSS variables globally at :root level. Default: false.
|
|
14
|
+
* @property {'light' | 'dark' | 'system'} [colorMode] - Set Bulma's light/dark scheme by writing
|
|
15
|
+
* the `data-theme` attribute on the document root (`<html>`). This is always global, even on a
|
|
16
|
+
* scoped Theme. `'system'` removes the attribute so Bulma follows the OS `prefers-color-scheme`.
|
|
17
|
+
* Omit to leave the current setting untouched.
|
|
18
|
+
* @property {BulmaVars} [bulmaVars] - Object mapping Bulma CSS variable names to values.
|
|
19
|
+
* @property {string} [schemeH] - Scheme hue value.
|
|
20
|
+
* @property {string} [schemeS] - Scheme saturation value.
|
|
21
|
+
* @property {string} [lightL] - Light theme lightness value.
|
|
22
|
+
* @property {string} [lightInvertL] - Light theme inverted lightness value.
|
|
23
|
+
* @property {string} [darkL] - Dark theme lightness value.
|
|
24
|
+
* @property {string} [darkInvertL] - Dark theme inverted lightness value.
|
|
25
|
+
* @property {string} [softL] - Soft lightness value.
|
|
26
|
+
* @property {string} [boldL] - Bold lightness value.
|
|
27
|
+
* @property {string} [softInvertL] - Soft inverted lightness value.
|
|
28
|
+
* @property {string} [boldInvertL] - Bold inverted lightness value.
|
|
29
|
+
* @property {string} [hoverBackgroundLDelta] - Background lightness delta on hover.
|
|
30
|
+
* @property {string} [activeBackgroundLDelta] - Background lightness delta on active.
|
|
31
|
+
* @property {string} [hoverBorderLDelta] - Border lightness delta on hover.
|
|
32
|
+
* @property {string} [activeBorderLDelta] - Border lightness delta on active.
|
|
33
|
+
* @property {string} [hoverColorLDelta] - Text color lightness delta on hover.
|
|
34
|
+
* @property {string} [activeColorLDelta] - Text color lightness delta on active.
|
|
35
|
+
* @property {string} [hoverShadowADelta] - Shadow alpha delta on hover.
|
|
36
|
+
* @property {string} [activeShadowADelta] - Shadow alpha delta on active.
|
|
37
|
+
* @property {string} [primaryH] - Primary color hue.
|
|
38
|
+
* @property {string} [primaryS] - Primary color saturation.
|
|
39
|
+
* @property {string} [primaryL] - Primary color lightness.
|
|
40
|
+
* @property {string} [linkH] - Link color hue.
|
|
41
|
+
* @property {string} [linkS] - Link color saturation.
|
|
42
|
+
* @property {string} [linkL] - Link color lightness.
|
|
43
|
+
* @property {string} [infoH] - Info color hue.
|
|
44
|
+
* @property {string} [infoS] - Info color saturation.
|
|
45
|
+
* @property {string} [infoL] - Info color lightness.
|
|
46
|
+
* @property {string} [successH] - Success color hue.
|
|
47
|
+
* @property {string} [successS] - Success color saturation.
|
|
48
|
+
* @property {string} [successL] - Success color lightness.
|
|
49
|
+
* @property {string} [warningH] - Warning color hue.
|
|
50
|
+
* @property {string} [warningS] - Warning color saturation.
|
|
51
|
+
* @property {string} [warningL] - Warning color lightness.
|
|
52
|
+
* @property {string} [dangerH] - Danger color hue.
|
|
53
|
+
* @property {string} [dangerS] - Danger color saturation.
|
|
54
|
+
* @property {string} [dangerL] - Danger color lightness.
|
|
55
|
+
*/
|
|
6
56
|
export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroundColor'> {
|
|
7
57
|
children: ReactNode;
|
|
8
58
|
className?: string;
|
|
@@ -46,5 +96,21 @@ export interface ThemeProps extends Omit<BulmaClassesProps, 'color' | 'backgroun
|
|
|
46
96
|
dangerS?: string;
|
|
47
97
|
dangerL?: string;
|
|
48
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Theme component that injects Bulma CSS variables either globally or locally.
|
|
101
|
+
*
|
|
102
|
+
* When `isRoot` is true, variables are injected at `:root`. Otherwise, a wrapping
|
|
103
|
+
* `<div>` scopes the variables to its children.
|
|
104
|
+
*
|
|
105
|
+
* @function
|
|
106
|
+
* @param {ThemeProps} props - Props for the Theme component.
|
|
107
|
+
* @returns {JSX.Element} The theme wrapper or fragment.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* // Local theme scope
|
|
111
|
+
* <Theme primaryH="171" primaryS="100%" primaryL="41%">
|
|
112
|
+
* <Button color="primary">Themed</Button>
|
|
113
|
+
* </Theme>
|
|
114
|
+
*/
|
|
49
115
|
export declare const Theme: React.FC<ThemeProps>;
|
|
50
116
|
export {};
|
|
@@ -1,32 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid Bulma color classes.
|
|
3
|
+
* @example 'primary', 'link', 'info'
|
|
4
|
+
*/
|
|
1
5
|
export declare const validColors: readonly ["primary", "link", "info", "success", "warning", "danger", "black", "black-bis", "black-ter", "grey-darker", "grey-dark", "grey", "grey-light", "grey-lighter", "white", "light", "dark"];
|
|
6
|
+
/**
|
|
7
|
+
* Valid Bulma color shade suffixes.
|
|
8
|
+
* @example '00', '05', 'invert', 'light', 'dark', 'soft', 'bold', 'on-scheme'
|
|
9
|
+
*/
|
|
2
10
|
export declare const validColorShades: readonly ["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "invert", "light", "dark", "soft", "bold", "on-scheme"];
|
|
11
|
+
/**
|
|
12
|
+
* Valid Bulma size classes for margins and paddings.
|
|
13
|
+
* @example '0', '1', 'auto'
|
|
14
|
+
*/
|
|
3
15
|
export declare const validSizes: readonly ["0", "1", "2", "3", "4", "5", "6", "auto"];
|
|
16
|
+
/**
|
|
17
|
+
* Valid Bulma text size classes.
|
|
18
|
+
* @example '1', '2', '3'
|
|
19
|
+
*/
|
|
4
20
|
export declare const validTextSizes: readonly ["1", "2", "3", "4", "5", "6", "7"];
|
|
21
|
+
/**
|
|
22
|
+
* Valid Bulma text alignment classes.
|
|
23
|
+
* @example 'centered', 'left', 'right'
|
|
24
|
+
*/
|
|
5
25
|
export declare const validAlignments: readonly ["centered", "justified", "left", "right"];
|
|
26
|
+
/**
|
|
27
|
+
* Valid Bulma text transformation classes.
|
|
28
|
+
* @example 'capitalized', 'uppercase', 'italic'
|
|
29
|
+
*/
|
|
6
30
|
export declare const validTextTransforms: readonly ["capitalized", "lowercase", "uppercase", "italic"];
|
|
31
|
+
/**
|
|
32
|
+
* Valid Bulma text weight classes.
|
|
33
|
+
* @example 'light', 'normal', 'bold'
|
|
34
|
+
*/
|
|
7
35
|
export declare const validTextWeights: readonly ["light", "normal", "medium", "semibold", "bold"];
|
|
36
|
+
/**
|
|
37
|
+
* Valid Bulma font family classes.
|
|
38
|
+
* @example 'sans-serif', 'monospace', 'code'
|
|
39
|
+
*/
|
|
8
40
|
export declare const validFontFamilies: readonly ["sans-serif", "monospace", "primary", "secondary", "code"];
|
|
41
|
+
/**
|
|
42
|
+
* Valid Bulma display classes.
|
|
43
|
+
* @example 'block', 'flex', 'inline'
|
|
44
|
+
*/
|
|
9
45
|
export declare const validDisplays: readonly ["block", "flex", "inline", "inline-block", "inline-flex"];
|
|
46
|
+
/**
|
|
47
|
+
* Valid Bulma visibility classes.
|
|
48
|
+
* These are all the valid visibility options available in Bulma.
|
|
49
|
+
* @example 'hidden', 'sr-only', 'invisible'
|
|
50
|
+
*/
|
|
10
51
|
export declare const validVisibilities: readonly ["hidden", "sr-only", "invisible"];
|
|
52
|
+
/**
|
|
53
|
+
* Valid Bulma flex direction classes.
|
|
54
|
+
* @example 'row', 'column', 'row-reverse'
|
|
55
|
+
*/
|
|
11
56
|
export declare const validFlexDirections: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
57
|
+
/**
|
|
58
|
+
* Valid Bulma flex wrap classes.
|
|
59
|
+
* @example 'nowrap', 'wrap', 'wrap-reverse'
|
|
60
|
+
*/
|
|
12
61
|
export declare const validFlexWraps: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
62
|
+
/**
|
|
63
|
+
* Valid Bulma justify-content classes.
|
|
64
|
+
* @example 'flex-start', 'center', 'space-between'
|
|
65
|
+
*/
|
|
13
66
|
export declare const validJustifyContents: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly", "start", "end", "left", "right"];
|
|
67
|
+
/**
|
|
68
|
+
* Valid Bulma align-content classes.
|
|
69
|
+
* @example 'flex-start', 'center', 'stretch'
|
|
70
|
+
*/
|
|
14
71
|
export declare const validAlignContents: readonly ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly", "stretch"];
|
|
72
|
+
/**
|
|
73
|
+
* Valid Bulma align-items classes.
|
|
74
|
+
* @example 'stretch', 'flex-start', 'center'
|
|
75
|
+
*/
|
|
15
76
|
export declare const validAlignItems: readonly ["stretch", "flex-start", "flex-end", "center", "baseline", "start", "end"];
|
|
77
|
+
/**
|
|
78
|
+
* Valid Bulma align-self classes.
|
|
79
|
+
* @example 'auto', 'flex-start', 'center'
|
|
80
|
+
*/
|
|
16
81
|
export declare const validAlignSelfs: readonly ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"];
|
|
82
|
+
/**
|
|
83
|
+
* Valid Bulma flex grow and shrink values.
|
|
84
|
+
* @example '0', '1', '2', '3', '4', '5'
|
|
85
|
+
*/
|
|
17
86
|
export declare const validFlexGrowShrink: readonly ["0", "1", "2", "3", "4", "5"];
|
|
87
|
+
/**
|
|
88
|
+
* Valid Bulma viewport classes for responsive design.
|
|
89
|
+
* @example 'mobile', 'tablet', 'desktop'
|
|
90
|
+
*/
|
|
18
91
|
export declare const validViewports: readonly ["mobile", "tablet", "desktop", "widescreen", "fullhd"];
|
|
92
|
+
/**
|
|
93
|
+
* Props for applying a Bulma viewport modifier to viewport-aware helper classes.
|
|
94
|
+
*/
|
|
19
95
|
export interface BulmaViewportProps {
|
|
96
|
+
/** Viewport for responsive classes (e.g., 'mobile', 'desktop'). */
|
|
20
97
|
viewport?: (typeof validViewports)[number];
|
|
21
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Props for applying Bulma display helper classes, including viewport-specific
|
|
101
|
+
* display variants.
|
|
102
|
+
*/
|
|
22
103
|
export interface BulmaDisplayProps {
|
|
104
|
+
/** Display type (e.g., 'block', 'flex'). */
|
|
23
105
|
display?: (typeof validDisplays)[number] | 'none';
|
|
106
|
+
/** Display type for mobile viewport (up to 768px). */
|
|
24
107
|
displayMobile?: (typeof validDisplays)[number] | 'none';
|
|
108
|
+
/** Display type for tablet viewport (769px - 1023px). */
|
|
25
109
|
displayTablet?: (typeof validDisplays)[number] | 'none';
|
|
110
|
+
/** Display type for desktop viewport (1024px - 1215px). */
|
|
26
111
|
displayDesktop?: (typeof validDisplays)[number] | 'none';
|
|
112
|
+
/** Display type for widescreen viewport (1216px - 1407px). */
|
|
27
113
|
displayWidescreen?: (typeof validDisplays)[number] | 'none';
|
|
114
|
+
/** Display type for fullhd viewport (1408px and above). */
|
|
28
115
|
displayFullhd?: (typeof validDisplays)[number] | 'none';
|
|
29
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates the shared class-building helpers used by the Bulma helper hooks.
|
|
119
|
+
*
|
|
120
|
+
* Returns a mutable `classes` array along with the helper functions that push
|
|
121
|
+
* (optionally prefixed, optionally viewport-suffixed) class names onto it.
|
|
122
|
+
*
|
|
123
|
+
* @internal
|
|
124
|
+
* @param classPrefix - Optional prefix applied to all generated class names.
|
|
125
|
+
* @param viewport - Optional viewport modifier for viewport-aware classes.
|
|
126
|
+
*/
|
|
30
127
|
export declare const createBulmaClassHelpers: (classPrefix?: string, viewport?: (typeof validViewports)[number]) => {
|
|
31
128
|
classes: string[];
|
|
32
129
|
addPrefixedClass: (className: string) => void;
|
|
@@ -1,5 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a space-separated string of class names based on input arguments.
|
|
3
|
+
*
|
|
4
|
+
* Accepts any mix of strings, numbers, arrays, or objects. Falsy values are ignored.
|
|
5
|
+
* Array and object values are recursively flattened, and object keys are included
|
|
6
|
+
* if their value is truthy. Duplicate class names are removed.
|
|
7
|
+
*
|
|
8
|
+
* @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.
|
|
9
|
+
* @returns {string} A space-separated string of unique class names.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* classNames('foo', ['bar', { baz: true }], { qux: false, quux: true });
|
|
13
|
+
* // => 'foo bar baz quux'
|
|
14
|
+
*/
|
|
1
15
|
export declare function classNames(...args: (string | number | undefined | null | false | Record<string, unknown> | unknown[])[]): string;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a prefixed version of classNames that automatically applies a prefix to all class names.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} classPrefix - The prefix to apply to all class names.
|
|
20
|
+
* @returns {Function} A classNames function that applies the prefix.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const prefixedClassNames = createPrefixedClassNames('bulma-');
|
|
24
|
+
* prefixedClassNames('button', { 'is-primary': true });
|
|
25
|
+
* // => 'bulma-button bulma-is-primary'
|
|
26
|
+
*/
|
|
2
27
|
export declare function createPrefixedClassNames(classPrefix: string): (...args: (string | number | undefined | null | false | Record<string, unknown> | unknown[])[]) => string;
|
|
3
28
|
export default classNames;
|
|
29
|
+
/**
|
|
30
|
+
* A simple wrapper around classNames that applies an optional prefix to all class names.
|
|
31
|
+
*
|
|
32
|
+
* @param {string | undefined} prefix - The prefix to apply to all class names. If undefined, no prefix is applied.
|
|
33
|
+
* @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.
|
|
34
|
+
* @returns {string} A space-separated string of unique class names, with prefix applied if provided.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* prefixedClassNames('bulma-', 'button', { 'is-primary': true });
|
|
38
|
+
* // => 'bulma-button bulma-is-primary'
|
|
39
|
+
*
|
|
40
|
+
* prefixedClassNames(undefined, 'button', { 'is-primary': true });
|
|
41
|
+
* // => 'button is-primary'
|
|
42
|
+
*/
|
|
4
43
|
export declare function prefixedClassNames(prefix: string | undefined, ...args: (string | number | undefined | null | false | Record<string, unknown> | unknown[])[]): string;
|
|
44
|
+
/**
|
|
45
|
+
* Hook that automatically applies the classPrefix from Config context to class names.
|
|
46
|
+
*
|
|
47
|
+
* @param {...(string | number | undefined | null | false | Record<string, unknown> | unknown[])} args - Class values to join.
|
|
48
|
+
* @returns {string} A space-separated string of unique class names with prefix applied from context.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // With ConfigProvider providing classPrefix="bulma-"
|
|
52
|
+
* const classes = usePrefixedClassNames('button', { 'is-primary': true });
|
|
53
|
+
* // => 'bulma-button bulma-is-primary'
|
|
54
|
+
*/
|
|
5
55
|
export declare function usePrefixedClassNames(...args: (string | number | undefined | null | false | Record<string, unknown> | unknown[])[]): string;
|
|
@@ -5,8 +5,30 @@ import { BulmaTypographyProps } from './useTypographyClasses';
|
|
|
5
5
|
import { BulmaVisibilityProps } from './useVisibilityClasses';
|
|
6
6
|
import { BulmaFlexboxProps } from './useFlexboxClasses';
|
|
7
7
|
import { BulmaOtherProps } from './useOtherClasses';
|
|
8
|
+
/**
|
|
9
|
+
* Props for applying Bulma helper classes to components.
|
|
10
|
+
*/
|
|
8
11
|
export interface BulmaClassesProps extends BulmaColorProps, BulmaSpacingProps, BulmaTypographyProps, BulmaVisibilityProps, BulmaFlexboxProps, BulmaOtherProps {
|
|
9
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* A hook that generates Bulma helper classes from props and separates unhandled props.
|
|
15
|
+
*
|
|
16
|
+
* Composed from the per-concern mini hooks (useColorClasses, useSpacingClasses,
|
|
17
|
+
* useTypographyClasses, useVisibilityClasses, useFlexboxClasses, and
|
|
18
|
+
* useOtherClasses), which can also be used individually.
|
|
19
|
+
*
|
|
20
|
+
* @function useBulmaClasses
|
|
21
|
+
* @param props - Combination of BulmaClassesProps and additional props.
|
|
22
|
+
* @returns An object containing the Bulma helper classes and unhandled props.
|
|
23
|
+
* @example
|
|
24
|
+
* const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
25
|
+
* color: 'primary',
|
|
26
|
+
* textSize: '3',
|
|
27
|
+
* className: 'custom-class'
|
|
28
|
+
* });
|
|
29
|
+
* // bulmaHelperClasses: 'has-text-primary is-size-3'
|
|
30
|
+
* // rest: { className: 'custom-class' }
|
|
31
|
+
*/
|
|
10
32
|
export declare const useBulmaClasses: <T extends Record<string, unknown>>(props: BulmaClassesProps & T) => {
|
|
11
33
|
bulmaHelperClasses: string;
|
|
12
34
|
rest: Omit<T, keyof BulmaClassesProps>;
|
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import { validColors, validColorShades } from './bulmaClassHelpers';
|
|
2
|
+
/**
|
|
3
|
+
* Props for applying Bulma text and background color helper classes.
|
|
4
|
+
*/
|
|
2
5
|
export interface BulmaColorProps {
|
|
6
|
+
/** Text color class (e.g., 'primary', 'info'). */
|
|
3
7
|
color?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
8
|
+
/** Text color shade suffix (e.g., '00', 'invert'). */
|
|
4
9
|
colorShade?: (typeof validColorShades)[number];
|
|
10
|
+
/** Background color class (e.g., 'primary', 'info'). */
|
|
5
11
|
backgroundColor?: (typeof validColors)[number] | 'inherit' | 'current';
|
|
12
|
+
/** Background color shade suffix (e.g., '00', 'invert'). */
|
|
6
13
|
backgroundColorShade?: (typeof validColorShades)[number];
|
|
7
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* A hook that generates Bulma text and background color helper classes.
|
|
17
|
+
*
|
|
18
|
+
* @function useColorClasses
|
|
19
|
+
* @param props - Color-related Bulma helper props.
|
|
20
|
+
* @returns A space-separated string of color helper classes.
|
|
21
|
+
* @example
|
|
22
|
+
* const colorClasses = useColorClasses({
|
|
23
|
+
* color: 'primary',
|
|
24
|
+
* backgroundColor: 'info',
|
|
25
|
+
* });
|
|
26
|
+
* // colorClasses: 'has-text-primary has-background-info'
|
|
27
|
+
*/
|
|
8
28
|
export declare const useColorClasses: (props: BulmaColorProps) => string;
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
import { validFlexDirections, validFlexWraps, validJustifyContents, validAlignContents, validAlignItems, validAlignSelfs, validFlexGrowShrink, BulmaDisplayProps } from './bulmaClassHelpers';
|
|
2
|
+
/**
|
|
3
|
+
* Props for applying Bulma flexbox helper classes. The display props are read
|
|
4
|
+
* only to gate the flex container helpers; this hook never emits display
|
|
5
|
+
* classes itself.
|
|
6
|
+
*/
|
|
2
7
|
export interface BulmaFlexboxProps extends BulmaDisplayProps {
|
|
8
|
+
/** Flex direction (e.g., 'row', 'column'). */
|
|
3
9
|
flexDirection?: (typeof validFlexDirections)[number];
|
|
10
|
+
/** Flex wrap (e.g., 'wrap', 'nowrap'). */
|
|
4
11
|
flexWrap?: (typeof validFlexWraps)[number];
|
|
12
|
+
/** Justify content (e.g., 'center', 'space-between'). */
|
|
5
13
|
justifyContent?: (typeof validJustifyContents)[number];
|
|
14
|
+
/** Align content (e.g., 'center', 'stretch'). */
|
|
6
15
|
alignContent?: (typeof validAlignContents)[number];
|
|
16
|
+
/** Align items (e.g., 'center', 'flex-start'). */
|
|
7
17
|
alignItems?: (typeof validAlignItems)[number];
|
|
18
|
+
/** Align self (e.g., 'auto', 'center'). */
|
|
8
19
|
alignSelf?: (typeof validAlignSelfs)[number];
|
|
20
|
+
/** Flex grow value (e.g., '0', '1', '2', '3', '4', '5'). */
|
|
9
21
|
flexGrow?: (typeof validFlexGrowShrink)[number];
|
|
22
|
+
/** Flex shrink value (e.g., '0', '1', '2', '3', '4', '5'). */
|
|
10
23
|
flexShrink?: (typeof validFlexGrowShrink)[number];
|
|
11
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* A hook that generates Bulma flexbox helper classes. Flex container helpers
|
|
27
|
+
* (direction, wrap, justify/align content, align items) are only emitted when
|
|
28
|
+
* one of the display props indicates a flex display; flex item helpers
|
|
29
|
+
* (align self, grow, shrink) are always emitted.
|
|
30
|
+
*
|
|
31
|
+
* Note: this hook reads the display props purely as a gate and never emits
|
|
32
|
+
* display classes — `is-flex` and friends come from useVisibilityClasses (or
|
|
33
|
+
* the useBulmaClasses aggregate).
|
|
34
|
+
*
|
|
35
|
+
* @function useFlexboxClasses
|
|
36
|
+
* @param props - Flexbox-related Bulma helper props.
|
|
37
|
+
* @returns A space-separated string of flexbox helper classes.
|
|
38
|
+
* @example
|
|
39
|
+
* const flexboxClasses = useFlexboxClasses({
|
|
40
|
+
* display: 'flex', // gates the container helpers, but emits no 'is-flex'
|
|
41
|
+
* justifyContent: 'center',
|
|
42
|
+
* });
|
|
43
|
+
* // flexboxClasses: 'is-justify-content-center'
|
|
44
|
+
* // ('is-flex' itself comes from useVisibilityClasses/useBulmaClasses)
|
|
45
|
+
*/
|
|
12
46
|
export declare const useFlexboxClasses: (props: BulmaFlexboxProps) => string;
|
|
@@ -1,15 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for applying miscellaneous Bulma helper classes.
|
|
3
|
+
*/
|
|
1
4
|
export interface BulmaOtherProps {
|
|
5
|
+
/** Float direction (e.g., 'left', 'right'). */
|
|
2
6
|
float?: 'left' | 'right';
|
|
7
|
+
/** Overflow behavior (e.g., 'clipped'). */
|
|
3
8
|
overflow?: 'clipped';
|
|
9
|
+
/** Applies overlay styling if true. */
|
|
4
10
|
overlay?: boolean;
|
|
11
|
+
/** Interaction behavior (e.g., 'unselectable', 'clickable'). */
|
|
5
12
|
interaction?: 'unselectable' | 'clickable';
|
|
13
|
+
/** Cursor style (e.g., 'pointer', 'help'). */
|
|
6
14
|
cursor?: 'pointer' | 'help';
|
|
15
|
+
/** Border radius style (e.g., 'radiusless'). */
|
|
7
16
|
radius?: 'radiusless';
|
|
17
|
+
/** Shadow style (e.g., 'shadowless'). */
|
|
8
18
|
shadow?: 'shadowless';
|
|
19
|
+
/** Responsive behavior (e.g., 'mobile', 'narrow'). */
|
|
9
20
|
responsive?: 'mobile' | 'narrow';
|
|
21
|
+
/** Add Bulma skeleton class if true. */
|
|
10
22
|
skeleton?: boolean;
|
|
23
|
+
/** Applies clearfix to fix floating children if true. */
|
|
11
24
|
clearfix?: boolean;
|
|
25
|
+
/** Applies position: relative if true. */
|
|
12
26
|
relative?: boolean;
|
|
27
|
+
/** Applies height: 100% if true. */
|
|
13
28
|
fullHeight?: boolean;
|
|
14
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A hook that generates miscellaneous Bulma helper classes (float, overflow,
|
|
32
|
+
* overlay, interaction, cursor, radius, shadow, responsive, skeleton,
|
|
33
|
+
* clearfix, relative, and full height).
|
|
34
|
+
*
|
|
35
|
+
* @function useOtherClasses
|
|
36
|
+
* @param props - Miscellaneous Bulma helper props.
|
|
37
|
+
* @returns A space-separated string of helper classes.
|
|
38
|
+
* @example
|
|
39
|
+
* const otherClasses = useOtherClasses({ float: 'left', skeleton: true });
|
|
40
|
+
* // otherClasses: 'is-pulled-left is-skeleton'
|
|
41
|
+
*/
|
|
15
42
|
export declare const useOtherClasses: (props: BulmaOtherProps) => string;
|
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
import { validSizes } from './bulmaClassHelpers';
|
|
2
|
+
/**
|
|
3
|
+
* Props for applying Bulma margin and padding helper classes.
|
|
4
|
+
*/
|
|
2
5
|
export interface BulmaSpacingProps {
|
|
6
|
+
/** Margin (e.g., '0', '1'). */
|
|
3
7
|
m?: (typeof validSizes)[number];
|
|
8
|
+
/** Margin top. */
|
|
4
9
|
mt?: (typeof validSizes)[number];
|
|
10
|
+
/** Margin right. */
|
|
5
11
|
mr?: (typeof validSizes)[number];
|
|
12
|
+
/** Margin bottom. */
|
|
6
13
|
mb?: (typeof validSizes)[number];
|
|
14
|
+
/** Margin left. */
|
|
7
15
|
ml?: (typeof validSizes)[number];
|
|
16
|
+
/** Margin horizontal (left and right). */
|
|
8
17
|
mx?: (typeof validSizes)[number];
|
|
18
|
+
/** Margin vertical (top and bottom). */
|
|
9
19
|
my?: (typeof validSizes)[number];
|
|
20
|
+
/** Padding (e.g., '0', '1'). */
|
|
10
21
|
p?: (typeof validSizes)[number];
|
|
22
|
+
/** Padding top. */
|
|
11
23
|
pt?: (typeof validSizes)[number];
|
|
24
|
+
/** Padding right. */
|
|
12
25
|
pr?: (typeof validSizes)[number];
|
|
26
|
+
/** Padding bottom. */
|
|
13
27
|
pb?: (typeof validSizes)[number];
|
|
28
|
+
/** Padding left. */
|
|
14
29
|
pl?: (typeof validSizes)[number];
|
|
30
|
+
/** Padding horizontal (left and right). */
|
|
15
31
|
px?: (typeof validSizes)[number];
|
|
32
|
+
/** Padding vertical (top and bottom). */
|
|
16
33
|
py?: (typeof validSizes)[number];
|
|
17
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A hook that generates Bulma margin and padding helper classes.
|
|
37
|
+
*
|
|
38
|
+
* @function useSpacingClasses
|
|
39
|
+
* @param props - Spacing-related Bulma helper props.
|
|
40
|
+
* @returns A space-separated string of spacing helper classes.
|
|
41
|
+
* @example
|
|
42
|
+
* const spacingClasses = useSpacingClasses({ m: '2', px: '4' });
|
|
43
|
+
* // spacingClasses: 'm-2 px-4'
|
|
44
|
+
*/
|
|
18
45
|
export declare const useSpacingClasses: (props: BulmaSpacingProps) => string;
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
import { validTextSizes, validAlignments, validTextTransforms, validTextWeights, validFontFamilies, BulmaViewportProps } from './bulmaClassHelpers';
|
|
2
|
+
/**
|
|
3
|
+
* Props for applying Bulma typography helper classes.
|
|
4
|
+
*/
|
|
2
5
|
export interface BulmaTypographyProps extends BulmaViewportProps {
|
|
6
|
+
/** Text size (e.g., '1', '2'). */
|
|
3
7
|
textSize?: (typeof validTextSizes)[number];
|
|
8
|
+
/** Text alignment (e.g., 'centered', 'left'). */
|
|
4
9
|
textAlign?: (typeof validAlignments)[number];
|
|
10
|
+
/** Text transformation (e.g., 'uppercase', 'italic'). */
|
|
5
11
|
textTransform?: (typeof validTextTransforms)[number];
|
|
12
|
+
/** Text weight (e.g., 'light', 'bold'). */
|
|
6
13
|
textWeight?: (typeof validTextWeights)[number];
|
|
14
|
+
/** Font family (e.g., 'sans-serif', 'code'). */
|
|
7
15
|
fontFamily?: (typeof validFontFamilies)[number];
|
|
16
|
+
/** Text size for mobile viewport (up to 768px). */
|
|
8
17
|
textSizeMobile?: (typeof validTextSizes)[number];
|
|
18
|
+
/** Text size for tablet viewport (769px - 1023px). */
|
|
9
19
|
textSizeTablet?: (typeof validTextSizes)[number];
|
|
20
|
+
/** Text size for desktop viewport (1024px - 1215px). */
|
|
10
21
|
textSizeDesktop?: (typeof validTextSizes)[number];
|
|
22
|
+
/** Text size for widescreen viewport (1216px - 1407px). */
|
|
11
23
|
textSizeWidescreen?: (typeof validTextSizes)[number];
|
|
24
|
+
/** Text size for fullhd viewport (1408px and above). */
|
|
12
25
|
textSizeFullhd?: (typeof validTextSizes)[number];
|
|
26
|
+
/** Text alignment for mobile viewport (up to 768px). */
|
|
13
27
|
textAlignMobile?: (typeof validAlignments)[number];
|
|
28
|
+
/** Text alignment for tablet viewport (769px - 1023px). */
|
|
14
29
|
textAlignTablet?: (typeof validAlignments)[number];
|
|
30
|
+
/** Text alignment for desktop viewport (1024px - 1215px). */
|
|
15
31
|
textAlignDesktop?: (typeof validAlignments)[number];
|
|
32
|
+
/** Text alignment for widescreen viewport (1216px - 1407px). */
|
|
16
33
|
textAlignWidescreen?: (typeof validAlignments)[number];
|
|
34
|
+
/** Text alignment for fullhd viewport (1408px and above). */
|
|
17
35
|
textAlignFullhd?: (typeof validAlignments)[number];
|
|
18
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A hook that generates Bulma typography helper classes, including
|
|
39
|
+
* viewport-specific text size and alignment variants.
|
|
40
|
+
*
|
|
41
|
+
* @function useTypographyClasses
|
|
42
|
+
* @param props - Typography-related Bulma helper props.
|
|
43
|
+
* @returns A space-separated string of typography helper classes.
|
|
44
|
+
* @example
|
|
45
|
+
* const typographyClasses = useTypographyClasses({
|
|
46
|
+
* textSize: '3',
|
|
47
|
+
* textWeight: 'bold',
|
|
48
|
+
* });
|
|
49
|
+
* // typographyClasses: 'is-size-3 has-text-weight-bold'
|
|
50
|
+
*/
|
|
19
51
|
export declare const useTypographyClasses: (props: BulmaTypographyProps) => string;
|