@allxsmith/bestax-bulma 5.45.1 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/esm/form/Checkbox.js.map +1 -1
  2. package/dist/esm/form/File.js.map +1 -1
  3. package/dist/esm/form/Numberinput.js.map +1 -1
  4. package/dist/esm/form/PinInput.js.map +1 -1
  5. package/dist/esm/form/Radio.js.map +1 -1
  6. package/dist/esm/form/SelectBase.js.map +1 -1
  7. package/dist/esm/form/Slider.js.map +1 -1
  8. package/dist/esm/form/Switch.js.map +1 -1
  9. package/dist/esm/helpers/Theme.js +191 -49
  10. package/dist/esm/helpers/Theme.js.map +1 -1
  11. package/dist/esm/helpers/useVisibilityClasses.js.map +1 -1
  12. package/dist/index.cjs +190 -49
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/types/form/Checkbox.d.ts +3 -0
  15. package/dist/types/form/File.d.ts +3 -0
  16. package/dist/types/form/Numberinput.d.ts +2 -0
  17. package/dist/types/form/PinInput.d.ts +3 -0
  18. package/dist/types/form/Radio.d.ts +3 -0
  19. package/dist/types/form/SelectBase.d.ts +3 -0
  20. package/dist/types/form/Slider.d.ts +3 -0
  21. package/dist/types/form/Switch.d.ts +2 -0
  22. package/dist/types/helpers/Theme.d.ts +37 -10
  23. package/dist/types/helpers/useVisibilityClasses.d.ts +5 -1
  24. package/dist/types-cjs/form/Checkbox.d.ts +3 -0
  25. package/dist/types-cjs/form/File.d.ts +3 -0
  26. package/dist/types-cjs/form/Numberinput.d.ts +2 -0
  27. package/dist/types-cjs/form/PinInput.d.ts +3 -0
  28. package/dist/types-cjs/form/Radio.d.ts +3 -0
  29. package/dist/types-cjs/form/SelectBase.d.ts +3 -0
  30. package/dist/types-cjs/form/Slider.d.ts +3 -0
  31. package/dist/types-cjs/form/Switch.d.ts +2 -0
  32. package/dist/types-cjs/helpers/Theme.d.ts +37 -10
  33. package/dist/types-cjs/helpers/useVisibilityClasses.d.ts +5 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","sources":["../../../src/helpers/Theme.tsx"],"sourcesContent":["import React, {\n useEffect,\n useMemo,\n useState,\n ReactNode,\n CSSProperties,\n} from 'react';\nimport classNames from './classNames';\nimport { useBulmaClasses, BulmaClassesProps } from './useBulmaClasses';\nimport { validGaps, validRadii, type BulmaGapStep } from './bulmaClassHelpers';\nimport { isDev, warnOnce } from './devWarnings';\nimport { useClassPrefix } from './Config';\n\n// --- Bulma v1 CSS variables Theme sets (originally generated from\n// CSSVAR_KEYS), in two lists by where Bulma declares them ---\n\n/**\n * Variables a value set on an ancestor reaches. Bulma declares them on\n * `:root` (or a theme scope), or on no component in its plain state, so the\n * value Theme writes on its wrapper or at `:root` is the one the components\n * under it use.\n */\nconst bulmaGlobalVars = [\n // scheme\n '--bulma-scheme-h',\n '--bulma-scheme-s',\n '--bulma-scheme-main',\n '--bulma-scheme-main-bis',\n '--bulma-scheme-main-ter',\n '--bulma-scheme-invert',\n '--bulma-scheme-invert-bis',\n '--bulma-scheme-invert-ter',\n '--bulma-light-l',\n '--bulma-light-invert-l',\n '--bulma-dark-l',\n '--bulma-dark-invert-l',\n '--bulma-soft-l',\n '--bulma-bold-l',\n '--bulma-soft-invert-l',\n '--bulma-bold-invert-l',\n '--bulma-hover-background-l-delta',\n '--bulma-active-background-l-delta',\n '--bulma-hover-border-l-delta',\n '--bulma-active-border-l-delta',\n '--bulma-hover-color-l-delta',\n '--bulma-active-color-l-delta',\n '--bulma-hover-shadow-a-delta',\n '--bulma-active-shadow-a-delta',\n // colors\n '--bulma-primary-h',\n '--bulma-primary-s',\n '--bulma-primary-l',\n '--bulma-link-h',\n '--bulma-link-s',\n '--bulma-link-l',\n '--bulma-info-h',\n '--bulma-info-s',\n '--bulma-info-l',\n '--bulma-success-h',\n '--bulma-success-s',\n '--bulma-success-l',\n '--bulma-warning-h',\n '--bulma-warning-s',\n '--bulma-warning-l',\n '--bulma-danger-h',\n '--bulma-danger-s',\n '--bulma-danger-l',\n // shadow (the upstream token .box/.card/.dropdown/.panel derive their own\n // shadow variables from; overriding it from an ancestor is the route that\n // cascades, since those selectors re-declare their derived var on\n // themselves)\n '--bulma-shadow-h',\n '--bulma-shadow-s',\n '--bulma-shadow-l',\n '--bulma-shadow',\n // typography\n '--bulma-family-primary',\n '--bulma-family-secondary',\n '--bulma-family-code',\n '--bulma-size-small',\n '--bulma-size-normal',\n '--bulma-size-medium',\n '--bulma-size-large',\n '--bulma-weight-light',\n '--bulma-weight-normal',\n '--bulma-weight-medium',\n '--bulma-weight-semibold',\n '--bulma-weight-bold',\n '--bulma-weight-extrabold',\n // other\n '--bulma-block-spacing',\n '--bulma-duration',\n '--bulma-easing',\n '--bulma-radius-small',\n '--bulma-radius',\n '--bulma-radius-medium',\n '--bulma-radius-large',\n '--bulma-radius-rounded',\n '--bulma-speed',\n '--bulma-arrow-color',\n '--bulma-loading-color',\n '--bulma-burger-h',\n '--bulma-burger-s',\n '--bulma-burger-l',\n '--bulma-burger-border-radius',\n '--bulma-burger-gap',\n '--bulma-burger-item-height',\n '--bulma-burger-item-width',\n // generic\n '--bulma-body-background-color',\n '--bulma-body-size',\n '--bulma-body-min-width',\n '--bulma-body-rendering',\n '--bulma-body-family',\n '--bulma-body-overflow-x',\n '--bulma-body-overflow-y',\n '--bulma-body-color',\n '--bulma-body-font-size',\n '--bulma-body-weight',\n '--bulma-body-line-height',\n '--bulma-code-family',\n '--bulma-code-padding',\n '--bulma-code-weight',\n '--bulma-code-size',\n '--bulma-small-font-size',\n '--bulma-hr-background-color',\n '--bulma-hr-height',\n '--bulma-hr-margin',\n '--bulma-strong-color',\n '--bulma-strong-weight',\n '--bulma-pre-font-size',\n '--bulma-pre-padding',\n '--bulma-pre-code-font-size',\n // skeleton\n '--bulma-skeleton-background',\n '--bulma-skeleton-radius',\n '--bulma-skeleton-block-min-height',\n '--bulma-skeleton-lines-gap',\n '--bulma-skeleton-line-height',\n // control\n '--bulma-control-radius',\n '--bulma-control-radius-small',\n '--bulma-control-border-width',\n '--bulma-control-height',\n '--bulma-control-line-height',\n '--bulma-control-padding-vertical',\n '--bulma-control-padding-horizontal',\n '--bulma-control-size',\n '--bulma-control-focus-shadow-l',\n // columns\n '--bulma-column-gap',\n // grid\n '--bulma-grid-cell-column-start',\n] as const;\n\n/**\n * Variables Bulma declares on the component's own element, such as\n * `--bulma-card-radius` on `.card`. An element that declares a variable uses\n * its own value whatever its ancestors set, so a value Theme writes for one\n * of these, on its wrapper or at `:root`, never reaches the component.\n *\n * They stay in `BulmaVars`, and so stay valid `bulmaVars` keys and variable\n * props, because taking a key out would be a breaking change. Setting one\n * warns in development instead; see `warnComponentVars`.\n *\n * `scripts/css-var-scopes.test.mjs` holds this split to Bulma's compiled\n * stylesheet in both directions, so a Bulma upgrade that moves a variable\n * fails there.\n */\nconst bulmaComponentVars = [\n // breadcrumb\n '--bulma-breadcrumb-item-color',\n '--bulma-breadcrumb-item-hover-color',\n '--bulma-breadcrumb-item-active-color',\n '--bulma-breadcrumb-item-padding-vertical',\n '--bulma-breadcrumb-item-padding-horizontal',\n '--bulma-breadcrumb-item-separator-color',\n // card\n '--bulma-card-color',\n '--bulma-card-background-color',\n '--bulma-card-shadow',\n '--bulma-card-radius',\n '--bulma-card-header-background-color',\n '--bulma-card-header-color',\n '--bulma-card-header-padding',\n '--bulma-card-header-shadow',\n '--bulma-card-header-weight',\n '--bulma-card-content-background-color',\n '--bulma-card-content-padding',\n '--bulma-card-footer-background-color',\n '--bulma-card-footer-border-top',\n '--bulma-card-footer-padding',\n '--bulma-card-media-margin',\n // dropdown\n '--bulma-dropdown-menu-min-width',\n '--bulma-dropdown-content-background-color',\n '--bulma-dropdown-content-offset',\n '--bulma-dropdown-content-padding-bottom',\n '--bulma-dropdown-content-padding-top',\n '--bulma-dropdown-content-radius',\n '--bulma-dropdown-content-shadow',\n '--bulma-dropdown-content-z',\n '--bulma-dropdown-item-h',\n '--bulma-dropdown-item-s',\n '--bulma-dropdown-item-l',\n '--bulma-dropdown-item-background-l',\n '--bulma-dropdown-item-background-l-delta',\n '--bulma-dropdown-item-hover-background-l-delta',\n '--bulma-dropdown-item-active-background-l-delta',\n '--bulma-dropdown-item-color-l',\n '--bulma-dropdown-item-selected-h',\n '--bulma-dropdown-item-selected-s',\n '--bulma-dropdown-item-selected-l',\n '--bulma-dropdown-item-selected-background-l',\n '--bulma-dropdown-item-selected-color-l',\n '--bulma-dropdown-divider-background-color',\n // menu\n '--bulma-menu-item-h',\n '--bulma-menu-item-s',\n '--bulma-menu-item-l',\n '--bulma-menu-item-background-l',\n '--bulma-menu-item-background-l-delta',\n '--bulma-menu-item-hover-background-l-delta',\n '--bulma-menu-item-active-background-l-delta',\n '--bulma-menu-item-color-l',\n '--bulma-menu-item-radius',\n '--bulma-menu-item-selected-h',\n '--bulma-menu-item-selected-s',\n '--bulma-menu-item-selected-l',\n '--bulma-menu-item-selected-background-l',\n '--bulma-menu-item-selected-color-l',\n '--bulma-menu-list-border-left',\n '--bulma-menu-list-line-height',\n '--bulma-menu-list-link-padding',\n '--bulma-menu-nested-list-margin',\n '--bulma-menu-nested-list-padding-left',\n '--bulma-menu-label-color',\n '--bulma-menu-label-font-size',\n '--bulma-menu-label-letter-spacing',\n '--bulma-menu-label-spacing',\n // message\n '--bulma-message-h',\n '--bulma-message-s',\n '--bulma-message-background-l',\n '--bulma-message-border-l',\n '--bulma-message-border-l-delta',\n '--bulma-message-border-style',\n '--bulma-message-border-width',\n '--bulma-message-color-l',\n '--bulma-message-radius',\n '--bulma-message-header-weight',\n '--bulma-message-header-padding',\n '--bulma-message-header-radius',\n '--bulma-message-header-body-border-width',\n '--bulma-message-header-background-l',\n '--bulma-message-header-color-l',\n '--bulma-message-body-border-width',\n '--bulma-message-body-color',\n '--bulma-message-body-padding',\n '--bulma-message-body-radius',\n '--bulma-message-body-pre-code-background-color',\n // modal\n '--bulma-modal-z',\n '--bulma-modal-background-background-color',\n '--bulma-modal-content-width',\n '--bulma-modal-content-margin-mobile',\n '--bulma-modal-content-spacing-mobile',\n '--bulma-modal-content-spacing-tablet',\n '--bulma-modal-close-dimensions',\n '--bulma-modal-close-right',\n '--bulma-modal-close-top',\n '--bulma-modal-card-spacing',\n '--bulma-modal-card-head-background-color',\n '--bulma-modal-card-head-padding',\n '--bulma-modal-card-head-radius',\n '--bulma-modal-card-title-color',\n '--bulma-modal-card-title-line-height',\n '--bulma-modal-card-title-size',\n '--bulma-modal-card-foot-background-color',\n '--bulma-modal-card-foot-radius',\n '--bulma-modal-card-body-background-color',\n '--bulma-modal-card-body-padding',\n // navbar\n '--bulma-navbar-h',\n '--bulma-navbar-s',\n '--bulma-navbar-l',\n '--bulma-navbar-background-color',\n '--bulma-navbar-box-shadow-size',\n '--bulma-navbar-box-shadow-color',\n '--bulma-navbar-padding-vertical',\n '--bulma-navbar-padding-horizontal',\n '--bulma-navbar-z',\n '--bulma-navbar-fixed-z',\n '--bulma-navbar-item-background-a',\n '--bulma-navbar-item-background-l',\n '--bulma-navbar-item-background-l-delta',\n '--bulma-navbar-item-hover-background-l-delta',\n '--bulma-navbar-item-active-background-l-delta',\n '--bulma-navbar-item-color-l',\n '--bulma-navbar-item-selected-h',\n '--bulma-navbar-item-selected-s',\n '--bulma-navbar-item-selected-l',\n '--bulma-navbar-item-selected-background-l',\n '--bulma-navbar-item-selected-color-l',\n '--bulma-navbar-item-img-max-height',\n '--bulma-navbar-burger-color',\n '--bulma-navbar-tab-hover-background-color',\n '--bulma-navbar-tab-hover-border-bottom-color',\n '--bulma-navbar-tab-active-color',\n '--bulma-navbar-tab-active-background-color',\n '--bulma-navbar-tab-active-border-bottom-color',\n '--bulma-navbar-tab-active-border-bottom-style',\n '--bulma-navbar-tab-active-border-bottom-width',\n '--bulma-navbar-dropdown-background-color',\n '--bulma-navbar-dropdown-border-l',\n '--bulma-navbar-dropdown-border-color',\n '--bulma-navbar-dropdown-border-style',\n '--bulma-navbar-dropdown-border-width',\n '--bulma-navbar-dropdown-offset',\n '--bulma-navbar-dropdown-arrow',\n '--bulma-navbar-dropdown-radius',\n '--bulma-navbar-dropdown-z',\n '--bulma-navbar-dropdown-boxed-radius',\n '--bulma-navbar-dropdown-boxed-shadow',\n '--bulma-navbar-dropdown-item-h',\n '--bulma-navbar-dropdown-item-s',\n '--bulma-navbar-dropdown-item-l',\n '--bulma-navbar-dropdown-item-background-l',\n '--bulma-navbar-dropdown-item-color-l',\n '--bulma-navbar-divider-background-l',\n '--bulma-navbar-divider-height',\n '--bulma-navbar-bottom-box-shadow-size',\n // pagination\n '--bulma-pagination-margin',\n '--bulma-pagination-min-width',\n '--bulma-pagination-item-h',\n '--bulma-pagination-item-s',\n '--bulma-pagination-item-l',\n '--bulma-pagination-item-background-l-delta',\n '--bulma-pagination-item-hover-background-l-delta',\n '--bulma-pagination-item-active-background-l-delta',\n '--bulma-pagination-item-border-style',\n '--bulma-pagination-item-border-width',\n '--bulma-pagination-item-border-l',\n '--bulma-pagination-item-border-l-delta',\n '--bulma-pagination-item-hover-border-l-delta',\n '--bulma-pagination-item-active-border-l-delta',\n '--bulma-pagination-item-focus-border-l-delta',\n '--bulma-pagination-item-color-l',\n '--bulma-pagination-item-font-size',\n '--bulma-pagination-item-margin',\n '--bulma-pagination-item-padding-left',\n '--bulma-pagination-item-padding-right',\n '--bulma-pagination-item-outer-shadow-h',\n '--bulma-pagination-item-outer-shadow-s',\n '--bulma-pagination-item-outer-shadow-l',\n '--bulma-pagination-item-outer-shadow-a',\n '--bulma-pagination-nav-padding-left',\n '--bulma-pagination-nav-padding-right',\n '--bulma-pagination-disabled-color',\n '--bulma-pagination-disabled-background-color',\n '--bulma-pagination-disabled-border-color',\n '--bulma-pagination-current-color',\n '--bulma-pagination-current-background-color',\n '--bulma-pagination-current-border-color',\n '--bulma-pagination-ellipsis-color',\n '--bulma-pagination-shadow-inset',\n '--bulma-pagination-selected-item-h',\n '--bulma-pagination-selected-item-s',\n '--bulma-pagination-selected-item-l',\n '--bulma-pagination-selected-item-background-l',\n '--bulma-pagination-selected-item-border-l',\n '--bulma-pagination-selected-item-color-l',\n // panel\n '--bulma-panel-margin',\n '--bulma-panel-item-border',\n '--bulma-panel-radius',\n '--bulma-panel-shadow',\n '--bulma-panel-heading-line-height',\n '--bulma-panel-heading-padding',\n '--bulma-panel-heading-radius',\n '--bulma-panel-heading-size',\n '--bulma-panel-heading-weight',\n '--bulma-panel-tabs-font-size',\n '--bulma-panel-tab-border-bottom-color',\n '--bulma-panel-tab-border-bottom-style',\n '--bulma-panel-tab-border-bottom-width',\n '--bulma-panel-tab-active-color',\n '--bulma-panel-list-item-color',\n '--bulma-panel-list-item-hover-color',\n '--bulma-panel-block-color',\n '--bulma-panel-block-hover-background-color',\n '--bulma-panel-block-active-border-left-color',\n '--bulma-panel-block-active-color',\n '--bulma-panel-block-active-icon-color',\n '--bulma-panel-icon-color',\n // tabs\n '--bulma-tabs-border-bottom-color',\n '--bulma-tabs-border-bottom-style',\n '--bulma-tabs-border-bottom-width',\n '--bulma-tabs-link-color',\n '--bulma-tabs-link-hover-border-bottom-color',\n '--bulma-tabs-link-hover-color',\n '--bulma-tabs-link-active-border-bottom-color',\n '--bulma-tabs-link-active-color',\n '--bulma-tabs-link-padding',\n '--bulma-tabs-boxed-link-radius',\n '--bulma-tabs-boxed-link-hover-background-color',\n '--bulma-tabs-boxed-link-hover-border-bottom-color',\n '--bulma-tabs-boxed-link-active-background-color',\n '--bulma-tabs-boxed-link-active-border-color',\n '--bulma-tabs-boxed-link-active-border-bottom-color',\n '--bulma-tabs-toggle-link-border-color',\n '--bulma-tabs-toggle-link-border-style',\n '--bulma-tabs-toggle-link-border-width',\n '--bulma-tabs-toggle-link-hover-background-color',\n '--bulma-tabs-toggle-link-hover-border-color',\n '--bulma-tabs-toggle-link-radius',\n '--bulma-tabs-toggle-link-active-background-color',\n '--bulma-tabs-toggle-link-active-border-color',\n '--bulma-tabs-toggle-link-active-color',\n // box\n '--bulma-box-background-color',\n '--bulma-box-color',\n '--bulma-box-radius',\n '--bulma-box-shadow',\n '--bulma-box-padding',\n '--bulma-box-link-hover-shadow',\n '--bulma-box-link-active-shadow',\n // content\n '--bulma-content-heading-color',\n '--bulma-content-heading-weight',\n '--bulma-content-heading-line-height',\n '--bulma-content-block-margin-bottom',\n '--bulma-content-blockquote-background-color',\n '--bulma-content-blockquote-border-left',\n '--bulma-content-blockquote-padding',\n '--bulma-content-pre-padding',\n '--bulma-content-table-cell-border',\n '--bulma-content-table-cell-border-width',\n '--bulma-content-table-cell-padding',\n '--bulma-content-table-cell-heading-color',\n '--bulma-content-table-head-cell-border-width',\n '--bulma-content-table-head-cell-color',\n '--bulma-content-table-body-last-row-cell-border-bottom-width',\n '--bulma-content-table-foot-cell-border-width',\n '--bulma-content-table-foot-cell-color',\n // delete\n '--bulma-delete-dimensions',\n '--bulma-delete-background-l',\n '--bulma-delete-background-alpha',\n '--bulma-delete-color',\n // icon\n '--bulma-icon-dimensions',\n '--bulma-icon-dimensions-small',\n '--bulma-icon-dimensions-medium',\n '--bulma-icon-dimensions-large',\n '--bulma-icon-text-spacing',\n // notification\n '--bulma-notification-h',\n '--bulma-notification-s',\n '--bulma-notification-background-l',\n '--bulma-notification-color-l',\n '--bulma-notification-code-background-color',\n '--bulma-notification-radius',\n '--bulma-notification-padding',\n // progress\n '--bulma-progress-border-radius',\n '--bulma-progress-bar-background-color',\n '--bulma-progress-value-background-color',\n '--bulma-progress-indeterminate-duration',\n // table\n '--bulma-table-color',\n '--bulma-table-background-color',\n '--bulma-table-cell-border-color',\n '--bulma-table-cell-border-style',\n '--bulma-table-cell-border-width',\n '--bulma-table-cell-padding',\n '--bulma-table-cell-heading-color',\n '--bulma-table-cell-text-align',\n '--bulma-table-head-cell-border-width',\n '--bulma-table-head-cell-color',\n '--bulma-table-foot-cell-border-width',\n '--bulma-table-foot-cell-color',\n '--bulma-table-head-background-color',\n '--bulma-table-body-background-color',\n '--bulma-table-foot-background-color',\n '--bulma-table-row-hover-background-color',\n '--bulma-table-row-active-background-color',\n '--bulma-table-row-active-color',\n '--bulma-table-striped-row-even-background-color',\n '--bulma-table-striped-row-even-hover-background-color',\n // tag\n '--bulma-tag-h',\n '--bulma-tag-s',\n '--bulma-tag-background-l',\n '--bulma-tag-background-l-delta',\n '--bulma-tag-hover-background-l-delta',\n '--bulma-tag-active-background-l-delta',\n '--bulma-tag-color-l',\n '--bulma-tag-radius',\n '--bulma-tag-delete-margin',\n // title\n '--bulma-title-color',\n '--bulma-title-family',\n '--bulma-title-size',\n '--bulma-title-weight',\n '--bulma-title-line-height',\n '--bulma-title-strong-color',\n '--bulma-title-strong-weight',\n '--bulma-title-sub-size',\n '--bulma-title-sup-size',\n '--bulma-subtitle-color',\n '--bulma-subtitle-family',\n '--bulma-subtitle-size',\n '--bulma-subtitle-weight',\n '--bulma-subtitle-line-height',\n '--bulma-subtitle-strong-color',\n '--bulma-subtitle-strong-weight',\n // file\n '--bulma-file-radius',\n '--bulma-file-name-border-color',\n '--bulma-file-name-border-style',\n '--bulma-file-name-border-width',\n '--bulma-file-name-max-width',\n '--bulma-file-h',\n '--bulma-file-s',\n '--bulma-file-background-l',\n '--bulma-file-background-l-delta',\n '--bulma-file-hover-background-l-delta',\n '--bulma-file-active-background-l-delta',\n '--bulma-file-border-l',\n '--bulma-file-border-l-delta',\n '--bulma-file-hover-border-l-delta',\n '--bulma-file-active-border-l-delta',\n '--bulma-file-cta-color-l',\n '--bulma-file-name-color-l',\n '--bulma-file-color-l-delta',\n '--bulma-file-hover-color-l-delta',\n '--bulma-file-active-color-l-delta',\n // input\n '--bulma-input-h',\n '--bulma-input-s',\n '--bulma-input-l',\n '--bulma-input-border-style',\n '--bulma-input-border-l',\n '--bulma-input-border-l-delta',\n '--bulma-input-hover-border-l-delta',\n '--bulma-input-active-border-l-delta',\n '--bulma-input-focus-h',\n '--bulma-input-focus-s',\n '--bulma-input-focus-l',\n '--bulma-input-focus-shadow-size',\n '--bulma-input-focus-shadow-alpha',\n '--bulma-input-color-l',\n '--bulma-input-background-l',\n '--bulma-input-background-l-delta',\n '--bulma-input-height',\n '--bulma-input-shadow',\n '--bulma-input-placeholder-color',\n '--bulma-input-disabled-color',\n '--bulma-input-disabled-background-color',\n '--bulma-input-disabled-border-color',\n '--bulma-input-disabled-placeholder-color',\n '--bulma-input-arrow',\n '--bulma-input-icon-color',\n '--bulma-input-icon-hover-color',\n '--bulma-input-icon-focus-color',\n '--bulma-input-radius',\n // grid\n '--bulma-grid-gap',\n '--bulma-grid-column-count',\n '--bulma-grid-column-min',\n '--bulma-grid-cell-column-span',\n // footer\n '--bulma-footer-background-color',\n '--bulma-footer-color',\n '--bulma-footer-padding',\n // hero\n '--bulma-hero-body-padding',\n '--bulma-hero-body-padding-tablet',\n '--bulma-hero-body-padding-small',\n '--bulma-hero-body-padding-medium',\n '--bulma-hero-body-padding-large',\n // media\n '--bulma-media-border-color',\n '--bulma-media-border-size',\n '--bulma-media-spacing',\n '--bulma-media-spacing-large',\n '--bulma-media-content-spacing',\n '--bulma-media-level-1-spacing',\n '--bulma-media-level-1-content-spacing',\n '--bulma-media-level-2-spacing',\n // section\n '--bulma-section-padding',\n '--bulma-section-padding-desktop',\n '--bulma-section-padding-medium',\n '--bulma-section-padding-large',\n] as const;\n\n/** Every Bulma CSS variable Theme accepts: the two lists above. */\nconst bulmaCssVars = [...bulmaGlobalVars, ...bulmaComponentVars] as const;\n\n/** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */\ntype BulmaVarKey = (typeof bulmaCssVars)[number];\n/** A partial record mapping Bulma CSS variable keys to string values. */\ntype BulmaVars = Partial<Record<BulmaVarKey, string>>;\n\n/**\n * Convert a Bulma CSS variable name to a camelCase prop name.\n * @param {string} varName - CSS variable name (e.g., '--bulma-primary-h').\n * @returns {string} The camelCase prop name (e.g., 'primaryH').\n */\nfunction cssVarToProp(varName: string): string {\n return varName\n .replace(/^--bulma-/, '')\n .split('-')\n .map((part, i) =>\n i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)\n )\n .join('');\n}\n\n/**\n * Prop names `cssVarToProp` would mint that are already helper props:\n * `--bulma-shadow` becomes `shadow`, `--bulma-radius` becomes `radius` and\n * `--bulma-column-gap` becomes `columnGap`. They stay out of\n * `bulmaVarPropMap`, so on Theme each is the helper prop it is on every other\n * component, and every one of those variables is still reachable through\n * `bulmaVars`.\n *\n * `radius` was missed here once and set `--bulma-radius` while typed as the\n * helper (#694). It still writes that variable, so what it did then keeps\n * working; see `themeRadiusVar`. `columnGap` joined when the gap helpers\n * became shared helper props, and keeps its old variable route the same way;\n * see `themeColumnGapVar`.\n */\nconst helperPropNames: readonly string[] = ['shadow', 'radius', 'columnGap'];\n\n/**\n * Mapping of camelCase prop names to their Bulma CSS variable counterparts,\n * minus the `helperPropNames` above.\n */\nconst bulmaVarPropMap = Object.fromEntries(\n bulmaCssVars\n .map(cssVar => [cssVarToProp(cssVar), cssVar])\n .filter(([prop]) => !helperPropNames.includes(prop))\n) as Record<string, string>;\n\n/**\n * What each helper value of `radius` writes to `--bulma-radius` on a Theme,\n * alongside its class.\n *\n * Before #694, `radius=\"radiusless\"` wrote `--bulma-radius: radiusless`. That\n * is not a length, and a declaration reading an invalid variable falls back\n * to its property's initial value, which for a border radius is 0. So\n * everything inside the Theme that takes its radius from that variable lost\n * it, and under `isRoot` so did everything on the page that does. Writing a\n * real 0 keeps what\n * people see and makes it valid CSS. Keyed by the helper values, so adding\n * one means saying what it writes.\n *\n * The sizes write nothing and only add their class. Their classes read the\n * radius variables, so `normal` would point `--bulma-radius` at itself, which\n * is invalid and computes to 0, and `rounded` would turn every control inside\n * the Theme into a pill.\n */\nconst radiusHelperVars: Record<\n (typeof validRadii)[number],\n string | undefined\n> = {\n radiusless: '0',\n small: undefined,\n normal: undefined,\n large: undefined,\n rounded: undefined,\n};\n\n/**\n * What `radius` writes to `--bulma-radius` on a Theme, or `undefined` when it\n * writes nothing.\n *\n * A helper value writes its `radiusHelperVars` entry. Any other non-empty\n * string is written as given: before #694 every `radius` on Theme set the\n * variable whatever its type said, and a JavaScript caller passing a length\n * got the radius it asked for. That keeps working so nothing breaks, but the\n * type rejects it, so it warns in development and points at `bulmaVars`.\n *\n * Only a string writes anything, because only a string ever set the variable\n * to something usable: an empty value or zero was dropped, and a boolean or\n * any other bare number is not a length. The helper ignores those too, the\n * way it does on every other component.\n */\nconst themeRadiusVar = (radius: unknown): string | undefined => {\n if (typeof radius !== 'string' || radius === '') {\n return undefined;\n }\n if ((validRadii as readonly string[]).includes(radius)) {\n return radiusHelperVars[radius as keyof typeof radiusHelperVars];\n }\n warnOnce(\n 'Theme:radius-variable',\n `[bestax-bulma] <Theme radius=\"${radius}\">: setting --bulma-radius ` +\n 'through the radius prop is deprecated and will stop working in a ' +\n 'future major version. On Theme, as on every other component, radius ' +\n `is the border radius helper (\"${validRadii.join('\", \"')}\"). Set the variable with ` +\n `bulmaVars={{ '--bulma-radius': '${radius}' }} instead.`\n );\n return radius;\n};\n\n/**\n * What `columnGap` writes to `--bulma-column-gap` on a Theme, or `undefined`\n * when it writes nothing.\n *\n * Until the gap helpers were shared helper props, `columnGap` on Theme was\n * the camelCase prop Theme mints for `--bulma-column-gap`. It was never in\n * `ThemeProps`, so only untyped code reached it, but that code got the\n * columns gutter it asked for. It is the column gap helper now, as on every\n * other component, so a gap step goes to the helper and writes nothing here.\n * Any other non-empty string is still written as given, so a length such as\n * `'1rem'` keeps working, with a development warning pointing at `bulmaVars`.\n *\n * Only a string writes anything, for the reason `themeRadiusVar` gives: a\n * number or a boolean was never a usable length.\n */\nconst themeColumnGapVar = (columnGap: unknown): string | undefined => {\n if (typeof columnGap !== 'string' || columnGap === '') {\n return undefined;\n }\n if ((validGaps as readonly string[]).includes(columnGap)) {\n return undefined;\n }\n warnOnce(\n 'Theme:column-gap-variable',\n `[bestax-bulma] <Theme columnGap=\"${columnGap}\">: setting ` +\n '--bulma-column-gap through the columnGap prop is deprecated and will ' +\n 'stop working in a future major version. On Theme, as on every other ' +\n 'component, columnGap is the column gap helper ' +\n `(\"${validGaps.join('\", \"')}\"). Set the variable with ` +\n `bulmaVars={{ '--bulma-column-gap': '${columnGap}' }} instead.`\n );\n return columnGap;\n};\n\n/**\n * `bulmaComponentVars` as a lookup, built by `warnComponentVars` the first\n * time it is needed.\n */\nlet componentVarKeys: ReadonlySet<string> | undefined;\n\n/**\n * Warn in development when a Theme is given variables Bulma declares on the\n * component itself (`bulmaComponentVars`), whether through `bulmaVars` or a\n * variable prop such as `cardRadius`. Theme writes them where they can never\n * win, so nothing changes on the page, and saying so is the only way to find\n * out short of reading Bulma's stylesheet.\n *\n * Keyed by the set of variables, so a Theme that keeps passing the same ones\n * warns once, and a different set warns again. An empty value writes nothing,\n * so it is not reported.\n *\n * All of this is development-only, so it returns before doing anything in\n * production, and it builds its lookup on the first development call rather\n * than when the module loads.\n */\nconst warnComponentVars = (vars: BulmaVars): void => {\n if (!isDev()) {\n return;\n }\n const keys = (componentVarKeys ??= new Set<string>(bulmaComponentVars));\n const inert = Object.entries(vars)\n .filter(([key, value]) => value && keys.has(key))\n .map(([key]) => key)\n .sort();\n if (inert.length === 0) {\n return;\n }\n const one = inert.length === 1;\n warnOnce(\n `Theme:component-vars:${inert.join(',')}`,\n `[bestax-bulma] <Theme>: Bulma declares ${inert.join(', ')} on the ` +\n `component itself, so a value set on Theme never reaches ` +\n `${one ? 'it' : 'them'}. Set ${one ? 'it' : 'them'} on that ` +\n 'component instead, with className or style, or through Sass.'\n );\n};\n\n/** The one `<style>` element every `isRoot` Theme writes into. */\nconst ROOT_STYLE_ID = 'bestax-bulma-theme-vars';\n\n/**\n * The `:root` rules of every mounted `isRoot` Theme that has any, keyed by the\n * Theme's render order.\n *\n * Root Themes share one `<style>` element, so each keeps its rules here and\n * the element is rebuilt from all of them whenever one mounts, changes or\n * unmounts. Before this each Theme overwrote the element with only its own\n * rules, and the first to unmount removed it for all of them (#736).\n *\n * The key is a number each Theme takes when it first renders. React renders a\n * parent before its children and an earlier sibling before a later one, so an\n * inner or later-mounted root Theme sorts later, comes later in the\n * stylesheet, and wins a variable two of them set, as an inner scoped Theme\n * does. Effects would give the wrong answer for nesting: React runs a child's\n * effects before its parent's. Only the relative order matters, so a number\n * skipped by StrictMode calling the initializer twice, or by a render React\n * throws away, is harmless. The key never changes, so an update keeps its\n * place and re-rendering one Theme never changes which one wins.\n */\nconst rootThemeRules = new Map<number, string>();\nlet nextRootOrder = 0;\n\n/**\n * Write every registered root Theme's rules into the shared element, creating\n * it when needed and removing it once no Theme has any rules left.\n */\nconst renderRootThemeRules = (): void => {\n let element = document.getElementById(ROOT_STYLE_ID);\n if (rootThemeRules.size === 0) {\n element?.remove();\n return;\n }\n if (!element) {\n element = document.createElement('style');\n element.id = ROOT_STYLE_ID;\n document.head.appendChild(element);\n }\n element.textContent = [...rootThemeRules]\n .sort(([a], [b]) => a - b)\n .map(([, rules]) => rules)\n .join('\\n');\n};\n\n/**\n * Record one Theme's `:root` rules, where an empty string means it has none,\n * and rebuild the shared element if that changed anything. A Theme with no\n * rules never touches the element, which is what it did before the registry\n * too.\n */\nconst setRootThemeRules = (order: number, rules: string): void => {\n if ((rootThemeRules.get(order) ?? '') === rules) {\n return;\n }\n if (rules) {\n rootThemeRules.set(order, rules);\n } else {\n rootThemeRules.delete(order);\n }\n renderRootThemeRules();\n};\n\n/**\n * Props for the Theme component.\n */\nexport interface ThemeProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n /** The content the theme applies to. */\n children: ReactNode;\n /**\n * Additional CSS classes for the wrapper div. A root Theme (`isRoot`) has no\n * wrapper, so there this does nothing, and says so in development.\n */\n className?: string;\n /**\n * Inject the variables globally at `:root` instead of scoping them to a\n * wrapper div. Default: false.\n *\n * A root Theme renders its children with no wrapper, so `className` and the\n * helper props, such as `m` or `shadow`, have no element to land on. They\n * do nothing, and say so in development. `radius` and `columnGap` describe\n * what each does at the root.\n *\n * Several root Themes can be mounted at once, and each contributes its own\n * variables. Where two set the same one, the inner or later-mounted Theme\n * wins, as with nested scoped Themes, and unmounting a Theme removes only\n * what it contributed. The variables are written from an effect, so a\n * server render does not include them.\n */\n isRoot?: boolean;\n /**\n * Set Bulma's light/dark scheme by writing its theme attribute on the\n * document root (`<html>`). This is always global, even on a scoped Theme.\n * `'system'` removes the attribute so Bulma follows the OS\n * `prefers-color-scheme`. Omit to leave the current setting untouched.\n *\n * The attribute is `data-theme`. A stylesheet built with a class prefix\n * reads Bulma's prefixed form instead (`data-bestax-theme` for the\n * `bestax-prefixed` builds), so under a `ConfigProvider` `classPrefix`\n * Theme writes both, and `'system'` or unmounting clears or restores both.\n * If the prefix cannot form an attribute name, `'light'` and `'dark'`\n * write only `data-theme` and warn in development.\n *\n * The attribute is written from an effect, so a page rendered in the\n * browser paints its first frame with whatever `<html>` already has, the\n * visitor's OS scheme when that is nothing. Put a scheme that never changes\n * on `<html>` in `index.html` instead, and write a saved choice from an\n * inline `<head>` script, starting `colorMode` from what it wrote.\n */\n colorMode?: 'light' | 'dark' | 'system';\n /**\n * Bulma CSS variables to set, by name, such as\n * `{ '--bulma-primary-h': '210' }`. Only Bulma's own variables, the keys\n * the `BulmaVars` type allows, are applied, and an empty value is skipped.\n * Where a variable prop, such as `primaryH`, sets the same variable, the\n * prop wins.\n *\n * Theme writes them on its wrapper, or at `:root` under `isRoot`, so only a\n * variable that inherits from there changes anything. Bulma declares many\n * component variables, such as `--bulma-card-radius` or\n * `--bulma-delete-dimensions`, on the component's own element, and that\n * declaration beats any value set further up. Those keys are accepted but\n * do nothing here, and warn in development. Set them on the component\n * itself, with `className` or `style`, or through Sass. Each component's\n * API page says where Bulma declares its variables.\n *\n * Some global variables Bulma also declares again on one component, which\n * keeps its own value while everything else takes the Theme's. Those do not\n * warn, because the value still reaches the rest of the page.\n */\n bulmaVars?: BulmaVars;\n /**\n * Border radius helper, as on every other component: `radiusless` adds\n * `is-radiusless` to the wrapper div. On a Theme it also sets\n * `--bulma-radius` to 0, so what is inside the Theme loses its radius too.\n * Under `isRoot` there is no wrapper for the class, and the variable is\n * written at `:root`, which squares everything on the page that takes its\n * radius from it.\n *\n * The sizes (`small`, `normal`, `large`, `rounded`) add their\n * `has-radius-<value>` class to the wrapper div and set no variable, so\n * they round the wrapper and leave what is inside it alone. Under `isRoot`\n * there is no wrapper, so they do nothing, and say so in development.\n *\n * To change the radius of what is inside, set the variable through `bulmaVars`\n * (`bulmaVars={{ '--bulma-radius': '6px' }}`). This prop used to write the\n * variable for every value, so any other non-empty string still does, but\n * that route is deprecated and logs a warning in development. A number or\n * a boolean never produced a usable radius that way, and is now ignored as\n * it is on every other component.\n */\n radius?: (typeof validRadii)[number];\n /**\n * Column gap helper, as on every other component: a gap step adds\n * `is-column-gap-<step>` to the wrapper div, which spaces the wrapper's own\n * children when it is a flex or grid container. Under `isRoot` there is no\n * wrapper, so it does nothing, and says so in development.\n *\n * It does not set `--bulma-column-gap`, the variable `Columns` reads for\n * its gutters; set that through `bulmaVars`\n * (`bulmaVars={{ '--bulma-column-gap': '1rem' }}`). Before `columnGap` was\n * a helper prop, untyped JavaScript could pass it to Theme as that\n * variable. A string that is not a gap step (`'1rem'`) still sets it, but\n * that route is deprecated and logs a warning in development. A gap step\n * does not: `columnGap=\"0\"` used to zero the gutters inside the Theme, and\n * now adds `is-column-gap-0` to the wrapper instead.\n */\n columnGap?: BulmaGapStep;\n // Bulma scheme variables\n /** Base hue for the color scheme, 0 to 360. Sets `--bulma-scheme-h`. */\n schemeH?: string;\n /** Base saturation for the color scheme, as a percentage. Sets `--bulma-scheme-s`. */\n schemeS?: string;\n /** Lightness for light backgrounds. Sets `--bulma-light-l`. */\n lightL?: string;\n /** Inverted lightness for light backgrounds. Sets `--bulma-light-invert-l`. */\n lightInvertL?: string;\n /** Lightness for dark backgrounds. Sets `--bulma-dark-l`. */\n darkL?: string;\n /** Inverted lightness for dark backgrounds. Sets `--bulma-dark-invert-l`. */\n darkInvertL?: string;\n /** Lightness for soft colors. Sets `--bulma-soft-l`. */\n softL?: string;\n /** Lightness for bold colors. Sets `--bulma-bold-l`. */\n boldL?: string;\n /** Inverted lightness for soft colors. Sets `--bulma-soft-invert-l`. */\n softInvertL?: string;\n /** Inverted lightness for bold colors. Sets `--bulma-bold-invert-l`. */\n boldInvertL?: string;\n /** Lightness change of a background on hover. Sets `--bulma-hover-background-l-delta`. */\n hoverBackgroundLDelta?: string;\n /** Lightness change of a background when active. Sets `--bulma-active-background-l-delta`. */\n activeBackgroundLDelta?: string;\n /** Lightness change of a border on hover. Sets `--bulma-hover-border-l-delta`. */\n hoverBorderLDelta?: string;\n /** Lightness change of a border when active. Sets `--bulma-active-border-l-delta`. */\n activeBorderLDelta?: string;\n /** Lightness change of text color on hover. Sets `--bulma-hover-color-l-delta`. */\n hoverColorLDelta?: string;\n /** Lightness change of text color when active. Sets `--bulma-active-color-l-delta`. */\n activeColorLDelta?: string;\n /** Alpha change of a shadow on hover. Sets `--bulma-hover-shadow-a-delta`. */\n hoverShadowADelta?: string;\n /** Alpha change of a shadow when active. Sets `--bulma-active-shadow-a-delta`. */\n activeShadowADelta?: string;\n // Bulma color variables\n /** Primary color hue, 0 to 360. Sets `--bulma-primary-h`. */\n primaryH?: string;\n /** Primary color saturation, as a percentage. Sets `--bulma-primary-s`. */\n primaryS?: string;\n /** Primary color lightness, as a percentage. Sets `--bulma-primary-l`. */\n primaryL?: string;\n /** Link color hue, 0 to 360. Sets `--bulma-link-h`. */\n linkH?: string;\n /** Link color saturation, as a percentage. Sets `--bulma-link-s`. */\n linkS?: string;\n /** Link color lightness, as a percentage. Sets `--bulma-link-l`. */\n linkL?: string;\n /** Info color hue, 0 to 360. Sets `--bulma-info-h`. */\n infoH?: string;\n /** Info color saturation, as a percentage. Sets `--bulma-info-s`. */\n infoS?: string;\n /** Info color lightness, as a percentage. Sets `--bulma-info-l`. */\n infoL?: string;\n /** Success color hue, 0 to 360. Sets `--bulma-success-h`. */\n successH?: string;\n /** Success color saturation, as a percentage. Sets `--bulma-success-s`. */\n successS?: string;\n /** Success color lightness, as a percentage. Sets `--bulma-success-l`. */\n successL?: string;\n /** Warning color hue, 0 to 360. Sets `--bulma-warning-h`. */\n warningH?: string;\n /** Warning color saturation, as a percentage. Sets `--bulma-warning-s`. */\n warningS?: string;\n /** Warning color lightness, as a percentage. Sets `--bulma-warning-l`. */\n warningL?: string;\n /** Danger color hue, 0 to 360. Sets `--bulma-danger-h`. */\n dangerH?: string;\n /** Danger color saturation, as a percentage. Sets `--bulma-danger-s`. */\n dangerS?: string;\n /** Danger color lightness, as a percentage. Sets `--bulma-danger-l`. */\n dangerL?: string;\n // Add other commonly used ones as needed\n}\n\n/**\n * Theme component that injects Bulma CSS variables either globally or locally.\n *\n * When `isRoot` is true, variables are injected at `:root`. Otherwise, a wrapping\n * `<div>` scopes the variables to its children.\n *\n * @function\n * @param {ThemeProps} props - Props for the Theme component.\n * @returns {JSX.Element} The theme wrapper or fragment.\n *\n * @example\n * // Local theme scope\n * <Theme primaryH=\"171\" primaryS=\"100%\" primaryL=\"41%\">\n * <Button color=\"primary\">Themed</Button>\n * </Theme>\n */\nexport const Theme: React.FC<ThemeProps> = ({\n bulmaVars = {},\n children,\n className,\n isRoot = false,\n colorMode,\n radius,\n columnGap,\n ...restProps\n}) => {\n const radiusVar = themeRadiusVar(radius);\n const columnGapVar = themeColumnGapVar(columnGap);\n const radiusHelper = (validRadii as readonly unknown[]).includes(radius)\n ? radius\n : undefined;\n\n // A radius size only adds its class, and a root Theme renders no wrapper to\n // carry one, so on `isRoot` it does nothing at all. Say so, as the other\n // radius routes that do not do what they look like do.\n if (isRoot && radiusHelper && radiusHelperVars[radiusHelper] === undefined) {\n warnOnce(\n 'Theme:root-radius-size',\n `[bestax-bulma] <Theme isRoot radius=\"${radiusHelper}\">: a root Theme ` +\n `has no wrapper element for has-radius-${radiusHelper}, and the ` +\n 'radius sizes set no variable, so this does nothing. To round one ' +\n `element, put radius=\"${radiusHelper}\" on it. To change the radius ` +\n \"across the page, set bulmaVars={{ '--bulma-radius': '…' }} instead.\"\n );\n }\n\n // The same for a gap step in `columnGap`, which reads like the columns\n // gutter it once set and, at the root, has no element for its class.\n const columnGapStep =\n typeof columnGap === 'number' ? String(columnGap) : columnGap;\n if (\n isRoot &&\n columnGapStep !== undefined &&\n (validGaps as readonly unknown[]).includes(columnGapStep)\n ) {\n warnOnce(\n 'Theme:root-column-gap',\n `[bestax-bulma] <Theme isRoot columnGap=\"${columnGapStep}\">: a root ` +\n `Theme has no wrapper element for is-column-gap-${columnGapStep}, ` +\n 'and a gap step sets no variable, so this does nothing. To change ' +\n 'the columns gutter across the page, set ' +\n \"bulmaVars={{ '--bulma-column-gap': '…' }} instead.\"\n );\n }\n\n // Extract Bulma variable props from restProps\n const { bulmaVarProps, otherProps } = useMemo(() => {\n const varProps: Record<string, string | undefined> = {};\n const otherPropsObj: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(restProps)) {\n if (Object.prototype.hasOwnProperty.call(bulmaVarPropMap, key)) {\n varProps[key] = value as string;\n } else {\n otherPropsObj[key] = value;\n }\n }\n\n return { bulmaVarProps: varProps, otherProps: otherPropsObj };\n }, [restProps]);\n\n // Everything left in `otherProps` lands on the wrapper div, as a helper\n // class or an attribute, and so does `className`. A root Theme renders no\n // wrapper, so under `isRoot` all of it is dropped. `radius` and `columnGap`\n // are not in `otherProps`; the checks above cover them.\n if (isRoot) {\n const dropped = Object.entries(otherProps)\n .filter(\n ([, value]) => value !== undefined && value !== null && value !== false\n )\n .map(([key]) => key);\n if (className) {\n dropped.unshift('className');\n }\n if (dropped.length > 0) {\n warnOnce(\n 'Theme:root-dropped-props',\n `[bestax-bulma] <Theme isRoot>: a root Theme renders no wrapper ` +\n `element, so ${dropped.join(', ')} ` +\n `${dropped.length === 1 ? 'has' : 'have'} nothing to apply to. ` +\n 'Put helper props and classes on an element inside the Theme ' +\n 'instead.'\n );\n }\n }\n\n // Use Bulma classes for styling (only when not isRoot). Only a helper value\n // of `radius` reaches the helper; a legacy string went to the variable.\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...otherProps,\n radius: radiusHelper,\n columnGap,\n });\n\n // Merge bulmaVars and individual props, with props taking precedence\n const mergedVars: BulmaVars = useMemo(() => {\n const vars: BulmaVars = { ...bulmaVars };\n for (const [propName, cssVar] of Object.entries(bulmaVarPropMap)) {\n if (bulmaVarProps[propName] !== undefined) {\n vars[cssVar as BulmaVarKey] = bulmaVarProps[propName] as string;\n }\n }\n if (radiusVar !== undefined) {\n vars['--bulma-radius'] = radiusVar;\n }\n if (columnGapVar !== undefined) {\n vars['--bulma-column-gap'] = columnGapVar;\n }\n return vars;\n }, [bulmaVars, bulmaVarProps, radiusVar, columnGapVar]);\n\n // From an effect rather than the render body, so rendering does none of\n // this work, and a server render none at all. In production it returns\n // at its development check before looking at the variables.\n useEffect(() => {\n warnComponentVars(mergedVars);\n }, [mergedVars]);\n\n // This Theme's place among root Themes; see `rootThemeRules`.\n const [rootOrder] = useState(() => nextRootOrder++);\n\n // The `:root` rules this Theme contributes, or '' when it contributes none.\n const rootRules = useMemo(() => {\n if (!isRoot) {\n return '';\n }\n const cssRules = Object.entries(mergedVars)\n .filter(\n ([key, value]) => bulmaCssVars.includes(key as BulmaVarKey) && value\n )\n .map(([key, value]) => `${key}: ${value};`)\n .join(' ');\n return cssRules ? `:root { ${cssRules} }` : '';\n }, [mergedVars, isRoot]);\n\n // Inject CSS variables globally at :root level, alongside any other root\n // Themes. Clearing `isRoot` or every variable passes '', which withdraws\n // this Theme's rules.\n useEffect(() => {\n setRootThemeRules(rootOrder, rootRules);\n }, [rootOrder, rootRules]);\n\n // Withdraw them on unmount. Kept apart from the effect above so a change\n // rewrites the shared element in place rather than removing and recreating\n // it between the cleanup and the next run.\n useEffect(() => () => setRootThemeRules(rootOrder, ''), [rootOrder]);\n\n // Bulma names its scheme attribute after the class prefix a stylesheet was\n // built with (`data-<prefix>theme`), so the prefixed builds read\n // `data-bestax-theme` and never `data-theme`.\n const classPrefix = useClassPrefix();\n\n // Toggle Bulma's light/dark scheme by writing the theme attribute on the\n // document root (<html>). This is always global, even on a scoped Theme.\n // Under a class prefix the prefixed attribute is written as well as\n // `data-theme`, so whichever build is loaded sees it; with no prefix only\n // `data-theme` is. `'system'` removes them so Bulma follows the OS\n // preference.\n useEffect(() => {\n if (colorMode === undefined) {\n return;\n }\n\n const root = document.documentElement;\n const names = classPrefix\n ? ['data-theme', `data-${classPrefix}theme`]\n : ['data-theme'];\n const previous = names.map(name => root.getAttribute(name));\n\n for (const name of names) {\n if (colorMode === 'system') {\n root.removeAttribute(name);\n continue;\n }\n try {\n root.setAttribute(name, colorMode);\n } catch {\n // A class prefix can hold characters an attribute name cannot.\n // `data-theme` is still written, as it was before the prefixed\n // attribute existed, but a sheet built with that prefix keeps its\n // scheme, so say so.\n warnOnce(\n 'Theme:color-mode-prefix',\n `[bestax-bulma] <Theme colorMode=\"${colorMode}\">: the class ` +\n `prefix \"${classPrefix}\" makes ${name} an invalid attribute ` +\n 'name, so only data-theme is written, and a stylesheet built ' +\n 'with that prefix keeps its scheme.'\n );\n }\n }\n\n // Restore the previous values when colorMode changes or the component unmounts.\n return () => {\n names.forEach((name, i) => {\n const value = previous[i];\n if (value === null) {\n root.removeAttribute(name);\n } else {\n root.setAttribute(name, value);\n }\n });\n };\n }, [colorMode, classPrefix]);\n\n // For local injection (when isRoot is false), prepare style object for CSS vars\n const style: CSSProperties = useMemo(() => {\n if (isRoot) {\n return {};\n }\n\n const styleObj: CSSProperties = {};\n for (const [key, value] of Object.entries(mergedVars)) {\n if (bulmaCssVars.includes(key as BulmaVarKey) && value) {\n (styleObj as Record<string, string>)[key] = value;\n }\n }\n return styleObj;\n }, [mergedVars, isRoot]);\n\n // Generate combined class names for the wrapper div\n const combinedClassName = useMemo(() => {\n if (isRoot) {\n return '';\n }\n return classNames(className, bulmaHelperClasses);\n }, [className, bulmaHelperClasses, isRoot]);\n\n return isRoot ? (\n <>{children}</>\n ) : (\n <div className={combinedClassName || undefined} style={style} {...rest}>\n {children}\n </div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AK,SAAS,EAAE,iBAAiB,IAAI,SAAS,EAAE,KAAK,EAAE,KAAK,EAAA,GAAM,IAAI,EAAA,QAAA,EACnE,QAAQ,EAAA,CACL,CACP;AACH;;"}
1
+ {"version":3,"file":"Theme.js","sources":["../../../src/helpers/Theme.tsx"],"sourcesContent":["import React, {\n useEffect,\n useMemo,\n useState,\n ReactNode,\n CSSProperties,\n} from 'react';\nimport classNames from './classNames';\nimport { useBulmaClasses, BulmaClassesProps } from './useBulmaClasses';\nimport { validGaps, validRadii, type BulmaGapStep } from './bulmaClassHelpers';\nimport { isDev, warnOnce } from './devWarnings';\nimport { useClassPrefix } from './Config';\nimport { useClientLayoutEffect } from './useClientLayoutEffect';\n\n// --- Bulma v1 CSS variables Theme sets (originally generated from\n// CSSVAR_KEYS), in two lists by where Bulma declares them ---\n\n/**\n * Variables a value set on an ancestor reaches. Bulma declares them on\n * `:root` (or a theme scope), or on no component in its plain state, so the\n * value Theme writes on its wrapper or at `:root` is the one the components\n * under it use.\n */\nconst bulmaGlobalVars = [\n // scheme\n '--bulma-scheme-h',\n '--bulma-scheme-s',\n '--bulma-scheme-main',\n '--bulma-scheme-main-bis',\n '--bulma-scheme-main-ter',\n '--bulma-scheme-invert',\n '--bulma-scheme-invert-bis',\n '--bulma-scheme-invert-ter',\n '--bulma-light-l',\n '--bulma-light-invert-l',\n '--bulma-dark-l',\n '--bulma-dark-invert-l',\n '--bulma-soft-l',\n '--bulma-bold-l',\n '--bulma-soft-invert-l',\n '--bulma-bold-invert-l',\n '--bulma-hover-background-l-delta',\n '--bulma-active-background-l-delta',\n '--bulma-hover-border-l-delta',\n '--bulma-active-border-l-delta',\n '--bulma-hover-color-l-delta',\n '--bulma-active-color-l-delta',\n '--bulma-hover-shadow-a-delta',\n '--bulma-active-shadow-a-delta',\n // colors\n '--bulma-primary-h',\n '--bulma-primary-s',\n '--bulma-primary-l',\n '--bulma-link-h',\n '--bulma-link-s',\n '--bulma-link-l',\n '--bulma-info-h',\n '--bulma-info-s',\n '--bulma-info-l',\n '--bulma-success-h',\n '--bulma-success-s',\n '--bulma-success-l',\n '--bulma-warning-h',\n '--bulma-warning-s',\n '--bulma-warning-l',\n '--bulma-danger-h',\n '--bulma-danger-s',\n '--bulma-danger-l',\n // the lightness of each color's label on a solid surface, and of its text\n // on the page, which Bulma's Sass build picks for contrast with the color\n // it was built with, so a new trio does not move them\n '--bulma-primary-invert-l',\n '--bulma-primary-on-scheme-l',\n '--bulma-link-invert-l',\n '--bulma-link-on-scheme-l',\n '--bulma-info-invert-l',\n '--bulma-info-on-scheme-l',\n '--bulma-success-invert-l',\n '--bulma-success-on-scheme-l',\n '--bulma-warning-invert-l',\n '--bulma-warning-on-scheme-l',\n '--bulma-danger-invert-l',\n '--bulma-danger-on-scheme-l',\n // shadow (the upstream token .box/.card/.dropdown/.panel derive their own\n // shadow variables from; overriding it from an ancestor is the route that\n // cascades, since those selectors re-declare their derived var on\n // themselves)\n '--bulma-shadow-h',\n '--bulma-shadow-s',\n '--bulma-shadow-l',\n '--bulma-shadow',\n // typography\n '--bulma-family-primary',\n '--bulma-family-secondary',\n '--bulma-family-code',\n '--bulma-size-small',\n '--bulma-size-normal',\n '--bulma-size-medium',\n '--bulma-size-large',\n '--bulma-weight-light',\n '--bulma-weight-normal',\n '--bulma-weight-medium',\n '--bulma-weight-semibold',\n '--bulma-weight-bold',\n '--bulma-weight-extrabold',\n // other\n '--bulma-block-spacing',\n '--bulma-duration',\n '--bulma-easing',\n '--bulma-radius-small',\n '--bulma-radius',\n '--bulma-radius-medium',\n '--bulma-radius-large',\n '--bulma-radius-rounded',\n '--bulma-speed',\n '--bulma-arrow-color',\n '--bulma-loading-color',\n '--bulma-burger-h',\n '--bulma-burger-s',\n '--bulma-burger-l',\n '--bulma-burger-border-radius',\n '--bulma-burger-gap',\n '--bulma-burger-item-height',\n '--bulma-burger-item-width',\n // generic\n '--bulma-body-background-color',\n '--bulma-body-size',\n '--bulma-body-min-width',\n '--bulma-body-rendering',\n '--bulma-body-family',\n '--bulma-body-overflow-x',\n '--bulma-body-overflow-y',\n '--bulma-body-color',\n '--bulma-body-font-size',\n '--bulma-body-weight',\n '--bulma-body-line-height',\n '--bulma-code-family',\n '--bulma-code-padding',\n '--bulma-code-weight',\n '--bulma-code-size',\n '--bulma-small-font-size',\n '--bulma-hr-background-color',\n '--bulma-hr-height',\n '--bulma-hr-margin',\n '--bulma-strong-color',\n '--bulma-strong-weight',\n '--bulma-pre-font-size',\n '--bulma-pre-padding',\n '--bulma-pre-code-font-size',\n // skeleton\n '--bulma-skeleton-background',\n '--bulma-skeleton-radius',\n '--bulma-skeleton-block-min-height',\n '--bulma-skeleton-lines-gap',\n '--bulma-skeleton-line-height',\n // control\n '--bulma-control-radius',\n '--bulma-control-radius-small',\n '--bulma-control-border-width',\n '--bulma-control-height',\n '--bulma-control-line-height',\n '--bulma-control-padding-vertical',\n '--bulma-control-padding-horizontal',\n '--bulma-control-size',\n '--bulma-control-focus-shadow-l',\n // columns\n '--bulma-column-gap',\n // grid\n '--bulma-grid-cell-column-start',\n] as const;\n\n/**\n * Variables Bulma declares on the component's own element, such as\n * `--bulma-card-radius` on `.card`. An element that declares a variable uses\n * its own value whatever its ancestors set, so a value Theme writes for one\n * of these, on its wrapper or at `:root`, never reaches the component.\n *\n * They stay in `BulmaVars`, and so stay valid `bulmaVars` keys and variable\n * props, because taking a key out would be a breaking change. Setting one\n * warns in development instead; see `warnComponentVars`.\n *\n * `scripts/css-var-scopes.test.mjs` holds this split to Bulma's compiled\n * stylesheet in both directions, so a Bulma upgrade that moves a variable\n * fails there.\n */\nconst bulmaComponentVars = [\n // breadcrumb\n '--bulma-breadcrumb-item-color',\n '--bulma-breadcrumb-item-hover-color',\n '--bulma-breadcrumb-item-active-color',\n '--bulma-breadcrumb-item-padding-vertical',\n '--bulma-breadcrumb-item-padding-horizontal',\n '--bulma-breadcrumb-item-separator-color',\n // card\n '--bulma-card-color',\n '--bulma-card-background-color',\n '--bulma-card-shadow',\n '--bulma-card-radius',\n '--bulma-card-header-background-color',\n '--bulma-card-header-color',\n '--bulma-card-header-padding',\n '--bulma-card-header-shadow',\n '--bulma-card-header-weight',\n '--bulma-card-content-background-color',\n '--bulma-card-content-padding',\n '--bulma-card-footer-background-color',\n '--bulma-card-footer-border-top',\n '--bulma-card-footer-padding',\n '--bulma-card-media-margin',\n // dropdown\n '--bulma-dropdown-menu-min-width',\n '--bulma-dropdown-content-background-color',\n '--bulma-dropdown-content-offset',\n '--bulma-dropdown-content-padding-bottom',\n '--bulma-dropdown-content-padding-top',\n '--bulma-dropdown-content-radius',\n '--bulma-dropdown-content-shadow',\n '--bulma-dropdown-content-z',\n '--bulma-dropdown-item-h',\n '--bulma-dropdown-item-s',\n '--bulma-dropdown-item-l',\n '--bulma-dropdown-item-background-l',\n '--bulma-dropdown-item-background-l-delta',\n '--bulma-dropdown-item-hover-background-l-delta',\n '--bulma-dropdown-item-active-background-l-delta',\n '--bulma-dropdown-item-color-l',\n '--bulma-dropdown-item-selected-h',\n '--bulma-dropdown-item-selected-s',\n '--bulma-dropdown-item-selected-l',\n '--bulma-dropdown-item-selected-background-l',\n '--bulma-dropdown-item-selected-color-l',\n '--bulma-dropdown-divider-background-color',\n // menu\n '--bulma-menu-item-h',\n '--bulma-menu-item-s',\n '--bulma-menu-item-l',\n '--bulma-menu-item-background-l',\n '--bulma-menu-item-background-l-delta',\n '--bulma-menu-item-hover-background-l-delta',\n '--bulma-menu-item-active-background-l-delta',\n '--bulma-menu-item-color-l',\n '--bulma-menu-item-radius',\n '--bulma-menu-item-selected-h',\n '--bulma-menu-item-selected-s',\n '--bulma-menu-item-selected-l',\n '--bulma-menu-item-selected-background-l',\n '--bulma-menu-item-selected-color-l',\n '--bulma-menu-list-border-left',\n '--bulma-menu-list-line-height',\n '--bulma-menu-list-link-padding',\n '--bulma-menu-nested-list-margin',\n '--bulma-menu-nested-list-padding-left',\n '--bulma-menu-label-color',\n '--bulma-menu-label-font-size',\n '--bulma-menu-label-letter-spacing',\n '--bulma-menu-label-spacing',\n // message\n '--bulma-message-h',\n '--bulma-message-s',\n '--bulma-message-background-l',\n '--bulma-message-border-l',\n '--bulma-message-border-l-delta',\n '--bulma-message-border-style',\n '--bulma-message-border-width',\n '--bulma-message-color-l',\n '--bulma-message-radius',\n '--bulma-message-header-weight',\n '--bulma-message-header-padding',\n '--bulma-message-header-radius',\n '--bulma-message-header-body-border-width',\n '--bulma-message-header-background-l',\n '--bulma-message-header-color-l',\n '--bulma-message-body-border-width',\n '--bulma-message-body-color',\n '--bulma-message-body-padding',\n '--bulma-message-body-radius',\n '--bulma-message-body-pre-code-background-color',\n // modal\n '--bulma-modal-z',\n '--bulma-modal-background-background-color',\n '--bulma-modal-content-width',\n '--bulma-modal-content-margin-mobile',\n '--bulma-modal-content-spacing-mobile',\n '--bulma-modal-content-spacing-tablet',\n '--bulma-modal-close-dimensions',\n '--bulma-modal-close-right',\n '--bulma-modal-close-top',\n '--bulma-modal-card-spacing',\n '--bulma-modal-card-head-background-color',\n '--bulma-modal-card-head-padding',\n '--bulma-modal-card-head-radius',\n '--bulma-modal-card-title-color',\n '--bulma-modal-card-title-line-height',\n '--bulma-modal-card-title-size',\n '--bulma-modal-card-foot-background-color',\n '--bulma-modal-card-foot-radius',\n '--bulma-modal-card-body-background-color',\n '--bulma-modal-card-body-padding',\n // navbar\n '--bulma-navbar-h',\n '--bulma-navbar-s',\n '--bulma-navbar-l',\n '--bulma-navbar-background-color',\n '--bulma-navbar-box-shadow-size',\n '--bulma-navbar-box-shadow-color',\n '--bulma-navbar-padding-vertical',\n '--bulma-navbar-padding-horizontal',\n '--bulma-navbar-z',\n '--bulma-navbar-fixed-z',\n '--bulma-navbar-item-background-a',\n '--bulma-navbar-item-background-l',\n '--bulma-navbar-item-background-l-delta',\n '--bulma-navbar-item-hover-background-l-delta',\n '--bulma-navbar-item-active-background-l-delta',\n '--bulma-navbar-item-color-l',\n '--bulma-navbar-item-selected-h',\n '--bulma-navbar-item-selected-s',\n '--bulma-navbar-item-selected-l',\n '--bulma-navbar-item-selected-background-l',\n '--bulma-navbar-item-selected-color-l',\n '--bulma-navbar-item-img-max-height',\n '--bulma-navbar-burger-color',\n '--bulma-navbar-tab-hover-background-color',\n '--bulma-navbar-tab-hover-border-bottom-color',\n '--bulma-navbar-tab-active-color',\n '--bulma-navbar-tab-active-background-color',\n '--bulma-navbar-tab-active-border-bottom-color',\n '--bulma-navbar-tab-active-border-bottom-style',\n '--bulma-navbar-tab-active-border-bottom-width',\n '--bulma-navbar-dropdown-background-color',\n '--bulma-navbar-dropdown-border-l',\n '--bulma-navbar-dropdown-border-color',\n '--bulma-navbar-dropdown-border-style',\n '--bulma-navbar-dropdown-border-width',\n '--bulma-navbar-dropdown-offset',\n '--bulma-navbar-dropdown-arrow',\n '--bulma-navbar-dropdown-radius',\n '--bulma-navbar-dropdown-z',\n '--bulma-navbar-dropdown-boxed-radius',\n '--bulma-navbar-dropdown-boxed-shadow',\n '--bulma-navbar-dropdown-item-h',\n '--bulma-navbar-dropdown-item-s',\n '--bulma-navbar-dropdown-item-l',\n '--bulma-navbar-dropdown-item-background-l',\n '--bulma-navbar-dropdown-item-color-l',\n '--bulma-navbar-divider-background-l',\n '--bulma-navbar-divider-height',\n '--bulma-navbar-bottom-box-shadow-size',\n // pagination\n '--bulma-pagination-margin',\n '--bulma-pagination-min-width',\n '--bulma-pagination-item-h',\n '--bulma-pagination-item-s',\n '--bulma-pagination-item-l',\n '--bulma-pagination-item-background-l-delta',\n '--bulma-pagination-item-hover-background-l-delta',\n '--bulma-pagination-item-active-background-l-delta',\n '--bulma-pagination-item-border-style',\n '--bulma-pagination-item-border-width',\n '--bulma-pagination-item-border-l',\n '--bulma-pagination-item-border-l-delta',\n '--bulma-pagination-item-hover-border-l-delta',\n '--bulma-pagination-item-active-border-l-delta',\n '--bulma-pagination-item-focus-border-l-delta',\n '--bulma-pagination-item-color-l',\n '--bulma-pagination-item-font-size',\n '--bulma-pagination-item-margin',\n '--bulma-pagination-item-padding-left',\n '--bulma-pagination-item-padding-right',\n '--bulma-pagination-item-outer-shadow-h',\n '--bulma-pagination-item-outer-shadow-s',\n '--bulma-pagination-item-outer-shadow-l',\n '--bulma-pagination-item-outer-shadow-a',\n '--bulma-pagination-nav-padding-left',\n '--bulma-pagination-nav-padding-right',\n '--bulma-pagination-disabled-color',\n '--bulma-pagination-disabled-background-color',\n '--bulma-pagination-disabled-border-color',\n '--bulma-pagination-current-color',\n '--bulma-pagination-current-background-color',\n '--bulma-pagination-current-border-color',\n '--bulma-pagination-ellipsis-color',\n '--bulma-pagination-shadow-inset',\n '--bulma-pagination-selected-item-h',\n '--bulma-pagination-selected-item-s',\n '--bulma-pagination-selected-item-l',\n '--bulma-pagination-selected-item-background-l',\n '--bulma-pagination-selected-item-border-l',\n '--bulma-pagination-selected-item-color-l',\n // panel\n '--bulma-panel-margin',\n '--bulma-panel-item-border',\n '--bulma-panel-radius',\n '--bulma-panel-shadow',\n '--bulma-panel-heading-line-height',\n '--bulma-panel-heading-padding',\n '--bulma-panel-heading-radius',\n '--bulma-panel-heading-size',\n '--bulma-panel-heading-weight',\n '--bulma-panel-tabs-font-size',\n '--bulma-panel-tab-border-bottom-color',\n '--bulma-panel-tab-border-bottom-style',\n '--bulma-panel-tab-border-bottom-width',\n '--bulma-panel-tab-active-color',\n '--bulma-panel-list-item-color',\n '--bulma-panel-list-item-hover-color',\n '--bulma-panel-block-color',\n '--bulma-panel-block-hover-background-color',\n '--bulma-panel-block-active-border-left-color',\n '--bulma-panel-block-active-color',\n '--bulma-panel-block-active-icon-color',\n '--bulma-panel-icon-color',\n // tabs\n '--bulma-tabs-border-bottom-color',\n '--bulma-tabs-border-bottom-style',\n '--bulma-tabs-border-bottom-width',\n '--bulma-tabs-link-color',\n '--bulma-tabs-link-hover-border-bottom-color',\n '--bulma-tabs-link-hover-color',\n '--bulma-tabs-link-active-border-bottom-color',\n '--bulma-tabs-link-active-color',\n '--bulma-tabs-link-padding',\n '--bulma-tabs-boxed-link-radius',\n '--bulma-tabs-boxed-link-hover-background-color',\n '--bulma-tabs-boxed-link-hover-border-bottom-color',\n '--bulma-tabs-boxed-link-active-background-color',\n '--bulma-tabs-boxed-link-active-border-color',\n '--bulma-tabs-boxed-link-active-border-bottom-color',\n '--bulma-tabs-toggle-link-border-color',\n '--bulma-tabs-toggle-link-border-style',\n '--bulma-tabs-toggle-link-border-width',\n '--bulma-tabs-toggle-link-hover-background-color',\n '--bulma-tabs-toggle-link-hover-border-color',\n '--bulma-tabs-toggle-link-radius',\n '--bulma-tabs-toggle-link-active-background-color',\n '--bulma-tabs-toggle-link-active-border-color',\n '--bulma-tabs-toggle-link-active-color',\n // box\n '--bulma-box-background-color',\n '--bulma-box-color',\n '--bulma-box-radius',\n '--bulma-box-shadow',\n '--bulma-box-padding',\n '--bulma-box-link-hover-shadow',\n '--bulma-box-link-active-shadow',\n // content\n '--bulma-content-heading-color',\n '--bulma-content-heading-weight',\n '--bulma-content-heading-line-height',\n '--bulma-content-block-margin-bottom',\n '--bulma-content-blockquote-background-color',\n '--bulma-content-blockquote-border-left',\n '--bulma-content-blockquote-padding',\n '--bulma-content-pre-padding',\n '--bulma-content-table-cell-border',\n '--bulma-content-table-cell-border-width',\n '--bulma-content-table-cell-padding',\n '--bulma-content-table-cell-heading-color',\n '--bulma-content-table-head-cell-border-width',\n '--bulma-content-table-head-cell-color',\n '--bulma-content-table-body-last-row-cell-border-bottom-width',\n '--bulma-content-table-foot-cell-border-width',\n '--bulma-content-table-foot-cell-color',\n // delete\n '--bulma-delete-dimensions',\n '--bulma-delete-background-l',\n '--bulma-delete-background-alpha',\n '--bulma-delete-color',\n // icon\n '--bulma-icon-dimensions',\n '--bulma-icon-dimensions-small',\n '--bulma-icon-dimensions-medium',\n '--bulma-icon-dimensions-large',\n '--bulma-icon-text-spacing',\n // notification\n '--bulma-notification-h',\n '--bulma-notification-s',\n '--bulma-notification-background-l',\n '--bulma-notification-color-l',\n '--bulma-notification-code-background-color',\n '--bulma-notification-radius',\n '--bulma-notification-padding',\n // progress\n '--bulma-progress-border-radius',\n '--bulma-progress-bar-background-color',\n '--bulma-progress-value-background-color',\n '--bulma-progress-indeterminate-duration',\n // table\n '--bulma-table-color',\n '--bulma-table-background-color',\n '--bulma-table-cell-border-color',\n '--bulma-table-cell-border-style',\n '--bulma-table-cell-border-width',\n '--bulma-table-cell-padding',\n '--bulma-table-cell-heading-color',\n '--bulma-table-cell-text-align',\n '--bulma-table-head-cell-border-width',\n '--bulma-table-head-cell-color',\n '--bulma-table-foot-cell-border-width',\n '--bulma-table-foot-cell-color',\n '--bulma-table-head-background-color',\n '--bulma-table-body-background-color',\n '--bulma-table-foot-background-color',\n '--bulma-table-row-hover-background-color',\n '--bulma-table-row-active-background-color',\n '--bulma-table-row-active-color',\n '--bulma-table-striped-row-even-background-color',\n '--bulma-table-striped-row-even-hover-background-color',\n // tag\n '--bulma-tag-h',\n '--bulma-tag-s',\n '--bulma-tag-background-l',\n '--bulma-tag-background-l-delta',\n '--bulma-tag-hover-background-l-delta',\n '--bulma-tag-active-background-l-delta',\n '--bulma-tag-color-l',\n '--bulma-tag-radius',\n '--bulma-tag-delete-margin',\n // title\n '--bulma-title-color',\n '--bulma-title-family',\n '--bulma-title-size',\n '--bulma-title-weight',\n '--bulma-title-line-height',\n '--bulma-title-strong-color',\n '--bulma-title-strong-weight',\n '--bulma-title-sub-size',\n '--bulma-title-sup-size',\n '--bulma-subtitle-color',\n '--bulma-subtitle-family',\n '--bulma-subtitle-size',\n '--bulma-subtitle-weight',\n '--bulma-subtitle-line-height',\n '--bulma-subtitle-strong-color',\n '--bulma-subtitle-strong-weight',\n // file\n '--bulma-file-radius',\n '--bulma-file-name-border-color',\n '--bulma-file-name-border-style',\n '--bulma-file-name-border-width',\n '--bulma-file-name-max-width',\n '--bulma-file-h',\n '--bulma-file-s',\n '--bulma-file-background-l',\n '--bulma-file-background-l-delta',\n '--bulma-file-hover-background-l-delta',\n '--bulma-file-active-background-l-delta',\n '--bulma-file-border-l',\n '--bulma-file-border-l-delta',\n '--bulma-file-hover-border-l-delta',\n '--bulma-file-active-border-l-delta',\n '--bulma-file-cta-color-l',\n '--bulma-file-name-color-l',\n '--bulma-file-color-l-delta',\n '--bulma-file-hover-color-l-delta',\n '--bulma-file-active-color-l-delta',\n // input\n '--bulma-input-h',\n '--bulma-input-s',\n '--bulma-input-l',\n '--bulma-input-border-style',\n '--bulma-input-border-l',\n '--bulma-input-border-l-delta',\n '--bulma-input-hover-border-l-delta',\n '--bulma-input-active-border-l-delta',\n '--bulma-input-focus-h',\n '--bulma-input-focus-s',\n '--bulma-input-focus-l',\n '--bulma-input-focus-shadow-size',\n '--bulma-input-focus-shadow-alpha',\n '--bulma-input-color-l',\n '--bulma-input-background-l',\n '--bulma-input-background-l-delta',\n '--bulma-input-height',\n '--bulma-input-shadow',\n '--bulma-input-placeholder-color',\n '--bulma-input-disabled-color',\n '--bulma-input-disabled-background-color',\n '--bulma-input-disabled-border-color',\n '--bulma-input-disabled-placeholder-color',\n '--bulma-input-arrow',\n '--bulma-input-icon-color',\n '--bulma-input-icon-hover-color',\n '--bulma-input-icon-focus-color',\n '--bulma-input-radius',\n // grid\n '--bulma-grid-gap',\n '--bulma-grid-column-count',\n '--bulma-grid-column-min',\n '--bulma-grid-cell-column-span',\n // footer\n '--bulma-footer-background-color',\n '--bulma-footer-color',\n '--bulma-footer-padding',\n // hero\n '--bulma-hero-body-padding',\n '--bulma-hero-body-padding-tablet',\n '--bulma-hero-body-padding-small',\n '--bulma-hero-body-padding-medium',\n '--bulma-hero-body-padding-large',\n // media\n '--bulma-media-border-color',\n '--bulma-media-border-size',\n '--bulma-media-spacing',\n '--bulma-media-spacing-large',\n '--bulma-media-content-spacing',\n '--bulma-media-level-1-spacing',\n '--bulma-media-level-1-content-spacing',\n '--bulma-media-level-2-spacing',\n // section\n '--bulma-section-padding',\n '--bulma-section-padding-desktop',\n '--bulma-section-padding-medium',\n '--bulma-section-padding-large',\n] as const;\n\n/** Every Bulma CSS variable Theme accepts: the two lists above. */\nconst bulmaCssVars = [...bulmaGlobalVars, ...bulmaComponentVars] as const;\n\n/** A single Bulma CSS variable key from the `bulmaCssVars` tuple. */\ntype BulmaVarKey = (typeof bulmaCssVars)[number];\n\n/**\n * The keys Bulma gives a value of its own in each scheme: the lightness of a\n * color's text on the page, which has to read on a light page and on a dark\n * one.\n */\ntype BulmaOnSchemeKey = Extract<BulmaVarKey, `--bulma-${string}-on-scheme-l`>;\n\n/**\n * One value for Bulma's light scheme and one for its dark scheme. A scheme\n * left out keeps the stylesheet's own value.\n */\ninterface BulmaSchemeValues {\n /** The value in the light scheme. */\n light?: string;\n /** The value in the dark scheme. */\n dark?: string;\n}\n\n/**\n * A partial record mapping Bulma CSS variable keys to string values. The\n * on-scheme keys also take one value per scheme.\n */\ntype BulmaVars = Partial<\n Record<Exclude<BulmaVarKey, BulmaOnSchemeKey>, string>\n> &\n Partial<Record<BulmaOnSchemeKey, string | BulmaSchemeValues>>;\n\n/** What Theme writes for one variable: a string, or a value per scheme. */\ntype BulmaVarValue = string | BulmaSchemeValues;\n\n/**\n * Convert a Bulma CSS variable name to a camelCase prop name.\n * @param {string} varName - CSS variable name (e.g., '--bulma-primary-h').\n * @returns {string} The camelCase prop name (e.g., 'primaryH').\n */\nfunction cssVarToProp(varName: string): string {\n return varName\n .replace(/^--bulma-/, '')\n .split('-')\n .map((part, i) =>\n i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)\n )\n .join('');\n}\n\n/**\n * Prop names `cssVarToProp` would mint that are already helper props:\n * `--bulma-shadow` becomes `shadow`, `--bulma-radius` becomes `radius` and\n * `--bulma-column-gap` becomes `columnGap`. They stay out of\n * `bulmaVarPropMap`, so on Theme each is the helper prop it is on every other\n * component, and every one of those variables is still reachable through\n * `bulmaVars`.\n *\n * `radius` was missed here once and set `--bulma-radius` while typed as the\n * helper (#694). It still writes that variable, so what it did then keeps\n * working; see `themeRadiusVar`. `columnGap` joined when the gap helpers\n * became shared helper props, and keeps its old variable route the same way;\n * see `themeColumnGapVar`.\n */\nconst helperPropNames: readonly string[] = ['shadow', 'radius', 'columnGap'];\n\n/**\n * Mapping of camelCase prop names to their Bulma CSS variable counterparts,\n * minus the `helperPropNames` above.\n */\nconst bulmaVarPropMap = Object.fromEntries(\n bulmaCssVars\n .map(cssVar => [cssVarToProp(cssVar), cssVar])\n .filter(([prop]) => !helperPropNames.includes(prop))\n) as Record<string, string>;\n\n/**\n * What each helper value of `radius` writes to `--bulma-radius` on a Theme,\n * alongside its class.\n *\n * Before #694, `radius=\"radiusless\"` wrote `--bulma-radius: radiusless`. That\n * is not a length, and a declaration reading an invalid variable falls back\n * to its property's initial value, which for a border radius is 0. So\n * everything inside the Theme that takes its radius from that variable lost\n * it, and under `isRoot` so did everything on the page that does. Writing a\n * real 0 keeps what\n * people see and makes it valid CSS. Keyed by the helper values, so adding\n * one means saying what it writes.\n *\n * The sizes write nothing and only add their class. Their classes read the\n * radius variables, so `normal` would point `--bulma-radius` at itself, which\n * is invalid and computes to 0, and `rounded` would turn every control inside\n * the Theme into a pill.\n */\nconst radiusHelperVars: Record<\n (typeof validRadii)[number],\n string | undefined\n> = {\n radiusless: '0',\n small: undefined,\n normal: undefined,\n large: undefined,\n rounded: undefined,\n};\n\n/**\n * What `radius` writes to `--bulma-radius` on a Theme, or `undefined` when it\n * writes nothing.\n *\n * A helper value writes its `radiusHelperVars` entry. Any other non-empty\n * string is written as given: before #694 every `radius` on Theme set the\n * variable whatever its type said, and a JavaScript caller passing a length\n * got the radius it asked for. That keeps working so nothing breaks, but the\n * type rejects it, so it warns in development and points at `bulmaVars`.\n *\n * Only a string writes anything, because only a string ever set the variable\n * to something usable: an empty value or zero was dropped, and a boolean or\n * any other bare number is not a length. The helper ignores those too, the\n * way it does on every other component.\n */\nconst themeRadiusVar = (radius: unknown): string | undefined => {\n if (typeof radius !== 'string' || radius === '') {\n return undefined;\n }\n if ((validRadii as readonly string[]).includes(radius)) {\n return radiusHelperVars[radius as keyof typeof radiusHelperVars];\n }\n warnOnce(\n 'Theme:radius-variable',\n `[bestax-bulma] <Theme radius=\"${radius}\">: setting --bulma-radius ` +\n 'through the radius prop is deprecated and will stop working in a ' +\n 'future major version. On Theme, as on every other component, radius ' +\n `is the border radius helper (\"${validRadii.join('\", \"')}\"). Set the variable with ` +\n `bulmaVars={{ '--bulma-radius': '${radius}' }} instead.`\n );\n return radius;\n};\n\n/**\n * What `columnGap` writes to `--bulma-column-gap` on a Theme, or `undefined`\n * when it writes nothing.\n *\n * Until the gap helpers were shared helper props, `columnGap` on Theme was\n * the camelCase prop Theme mints for `--bulma-column-gap`. It was never in\n * `ThemeProps`, so only untyped code reached it, but that code got the\n * columns gutter it asked for. It is the column gap helper now, as on every\n * other component, so a gap step goes to the helper and writes nothing here.\n * Any other non-empty string is still written as given, so a length such as\n * `'1rem'` keeps working, with a development warning pointing at `bulmaVars`.\n *\n * Only a string writes anything, for the reason `themeRadiusVar` gives: a\n * number or a boolean was never a usable length.\n */\nconst themeColumnGapVar = (columnGap: unknown): string | undefined => {\n if (typeof columnGap !== 'string' || columnGap === '') {\n return undefined;\n }\n if ((validGaps as readonly string[]).includes(columnGap)) {\n return undefined;\n }\n warnOnce(\n 'Theme:column-gap-variable',\n `[bestax-bulma] <Theme columnGap=\"${columnGap}\">: setting ` +\n '--bulma-column-gap through the columnGap prop is deprecated and will ' +\n 'stop working in a future major version. On Theme, as on every other ' +\n 'component, columnGap is the column gap helper ' +\n `(\"${validGaps.join('\", \"')}\"). Set the variable with ` +\n `bulmaVars={{ '--bulma-column-gap': '${columnGap}' }} instead.`\n );\n return columnGap;\n};\n\n/**\n * `bulmaComponentVars` as a lookup, built by `warnComponentVars` the first\n * time it is needed.\n */\nlet componentVarKeys: ReadonlySet<string> | undefined;\n\n/**\n * Warn in development when a Theme is given variables Bulma declares on the\n * component itself (`bulmaComponentVars`), whether through `bulmaVars` or a\n * variable prop such as `cardRadius`. Theme writes them where they can never\n * win, so nothing changes on the page, and saying so is the only way to find\n * out short of reading Bulma's stylesheet.\n *\n * Keyed by the set of variables, so a Theme that keeps passing the same ones\n * warns once, and a different set warns again. An empty value writes nothing,\n * so it is not reported.\n *\n * All of this is development-only, so it returns before doing anything in\n * production, and it builds its lookup on the first development call rather\n * than when the module loads.\n */\nconst warnComponentVars = (vars: Readonly<Record<string, unknown>>): void => {\n if (!isDev()) {\n return;\n }\n const keys = (componentVarKeys ??= new Set<string>(bulmaComponentVars));\n const inert = Object.entries(vars)\n .filter(([key, value]) => value && keys.has(key))\n .map(([key]) => key)\n .sort();\n if (inert.length === 0) {\n return;\n }\n const one = inert.length === 1;\n warnOnce(\n `Theme:component-vars:${inert.join(',')}`,\n `[bestax-bulma] <Theme>: Bulma declares ${inert.join(', ')} on the ` +\n `component itself, so a value set on Theme never reaches ` +\n `${one ? 'it' : 'them'}. Set ${one ? 'it' : 'them'} on that ` +\n 'component instead, with className or style, or through Sass.'\n );\n};\n\n/** The one `<style>` element every `isRoot` Theme writes into. */\nconst ROOT_STYLE_ID = 'bestax-bulma-theme-vars';\n\n/**\n * The `:root` rules of every mounted `isRoot` Theme that has any, keyed by the\n * Theme's render order.\n *\n * Root Themes share one `<style>` element, so each keeps its rules here and\n * the element is rebuilt from all of them whenever one mounts, changes or\n * unmounts. Before this each Theme overwrote the element with only its own\n * rules, and the first to unmount removed it for all of them (#736).\n *\n * The key is a number each Theme takes when it first renders. React renders a\n * parent before its children and an earlier sibling before a later one, so an\n * inner or later-mounted root Theme sorts later, comes later in the\n * stylesheet, and wins a variable two of them set, as an inner scoped Theme\n * does. Effects would give the wrong answer for nesting: React runs a child's\n * effects before its parent's. Only the relative order matters, so a number\n * skipped by StrictMode calling the initializer twice, or by a render React\n * throws away, is harmless. The key never changes, so an update keeps its\n * place and re-rendering one Theme never changes which one wins.\n */\nconst rootThemeRules = new Map<number, string>();\nlet nextRootOrder = 0;\n\n/**\n * Write every registered root Theme's rules into the shared element, creating\n * it when needed and removing it once no Theme has any rules left.\n */\nconst renderRootThemeRules = (): void => {\n let element = document.getElementById(ROOT_STYLE_ID);\n if (rootThemeRules.size === 0) {\n element?.remove();\n return;\n }\n if (!element) {\n element = document.createElement('style');\n element.id = ROOT_STYLE_ID;\n document.head.appendChild(element);\n }\n element.textContent = [...rootThemeRules]\n .sort(([a], [b]) => a - b)\n .map(([, rules]) => rules)\n .join('\\n');\n};\n\n/**\n * Record one Theme's `:root` rules, where an empty string means it has none,\n * and rebuild the shared element if that changed anything. A Theme with no\n * rules never touches the element, which is what it did before the registry\n * too.\n */\nconst setRootThemeRules = (order: number, rules: string): void => {\n if ((rootThemeRules.get(order) ?? '') === rules) {\n return;\n }\n if (rules) {\n rootThemeRules.set(order, rules);\n } else {\n rootThemeRules.delete(order);\n }\n renderRootThemeRules();\n};\n\n/** A value given per scheme, rather than as one string. */\nconst isSchemeValues = (value: unknown): value is BulmaSchemeValues =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/**\n * The selector of one of Bulma's schemes, as the stylesheet Theme is used\n * with writes it: `[data-theme=dark], .theme-dark`, or with the class prefix\n * in both names (`[data-bestax-theme=dark], .bestax-theme-dark`) for a\n * prefixed build. A prefix that cannot be written into a selector as it\n * stands gets the plain names, which `colorMode` writes under any prefix.\n */\nconst schemeSelector = (classPrefix: string, scheme: 'light' | 'dark') => {\n const prefix = /^[A-Za-z_][\\w-]*$/.test(classPrefix) ? classPrefix : '';\n return `[data-${prefix}theme=${scheme}], .${prefix}theme-${scheme}`;\n};\n\n/**\n * The `:root` rules for variables given a value per scheme, laid out the\n * way Bulma lays out its own schemes so each value applies exactly where\n * Bulma's would: under the visitor's OS preference, unless the page names\n * the other scheme, and wherever the page names this one, on `<html>` or on\n * an element inside. A scheme with no value gets no rules, which leaves the\n * stylesheet's own value there.\n *\n * Every selector is as specific as `:root` (the guard is in `:where()`), so\n * between Themes, and against a plain `:root` rule, the later one still\n * wins, as it does for every other variable.\n */\nconst schemeRules = (\n vars: ReadonlyArray<[string, BulmaSchemeValues]>,\n classPrefix: string\n): string[] => {\n const other = { light: 'dark', dark: 'light' } as const;\n const body = (scheme: 'light' | 'dark') =>\n vars\n .filter(([, values]) => values[scheme])\n .map(([key, values]) => `${key}: ${values[scheme]};`)\n .join(' ');\n const schemes = (['light', 'dark'] as const)\n .map(scheme => [scheme, body(scheme)] as const)\n .filter(([, declarations]) => declarations);\n // Bulma's order: both preferences, then both names, the dark one last.\n return [\n ...schemes.map(\n ([scheme, declarations]) =>\n `@media (prefers-color-scheme: ${scheme}) { :root:where(:not(` +\n `${schemeSelector(classPrefix, other[scheme])})) { ${declarations} } }`\n ),\n ...schemes.map(\n ([scheme, declarations]) =>\n `${schemeSelector(classPrefix, scheme)} { ${declarations} }`\n ),\n ];\n};\n\n/**\n * Every theme attribute on `<html>` that a mounted Theme's `colorMode` has\n * written, by name: what the attribute held before the first of them wrote\n * it, and each Theme's value, the latest writer last.\n *\n * Theme writes the attribute from a layout effect, so it is there before the\n * browser paints, and lets go of it on unmount from a passive one, so a\n * Theme that a `Suspense` fallback hides for a moment keeps the page's\n * scheme: React cleans up a hidden tree's layout effects, but not its\n * passive ones. The two run at different times, so a Theme that replaces\n * another writes before the one it replaces lets go. Keeping every writer\n * here is what stops that letting go from undoing the new Theme's value:\n * only the latest writer's departure changes the page, and the last one's\n * puts back what was there before any of them.\n */\ninterface SchemeAttribute {\n original: string | null;\n writers: Array<{ order: number; value: string | null }>;\n}\nconst schemeAttributes = new Map<string, SchemeAttribute>();\n\n/** Set a theme attribute on `<html>`, or remove it for `null`. */\nconst setSchemeAttribute = (name: string, value: string | null): void => {\n const root = document.documentElement;\n if (value === null) {\n root.removeAttribute(name);\n } else {\n root.setAttribute(name, value);\n }\n};\n\n/**\n * Write one Theme's value for a theme attribute, `null` removing it, and\n * make that Theme the attribute's latest writer. Throws, recording nothing,\n * when `name` cannot be an attribute name.\n *\n * A Theme that writes the value it already holds keeps its place and leaves\n * the page alone. React runs a layout effect again when a `Suspense`\n * boundary shows its tree again, with nothing changed, and that must not\n * take the attribute back from a Theme that wrote after it.\n */\nconst writeSchemeAttribute = (\n order: number,\n name: string,\n value: string | null\n): void => {\n const held = schemeAttributes.get(name);\n if (\n held?.writers.some(\n writer => writer.order === order && writer.value === value\n )\n ) {\n return;\n }\n const entry = held ?? {\n original: document.documentElement.getAttribute(name),\n writers: [],\n };\n setSchemeAttribute(name, value);\n entry.writers = entry.writers.filter(writer => writer.order !== order);\n entry.writers.push({ order, value });\n schemeAttributes.set(name, entry);\n};\n\n/**\n * Take one Theme off every theme attribute it wrote, except those named in\n * `keep`. An attribute it was the latest writer of goes back to the value of\n * the writer before it, or to what it held before any of them.\n */\nconst releaseSchemeAttributes = (\n order: number,\n keep: readonly string[] = []\n): void => {\n for (const [name, entry] of schemeAttributes) {\n const index = entry.writers.findIndex(writer => writer.order === order);\n if (index === -1 || keep.includes(name)) {\n continue;\n }\n const latest = index === entry.writers.length - 1;\n entry.writers.splice(index, 1);\n if (entry.writers.length === 0) {\n schemeAttributes.delete(name);\n setSchemeAttribute(name, entry.original);\n } else if (latest) {\n setSchemeAttribute(name, entry.writers[entry.writers.length - 1].value);\n }\n }\n};\n\n/**\n * Props for the Theme component.\n */\nexport interface ThemeProps extends Omit<\n BulmaClassesProps,\n 'color' | 'backgroundColor'\n> {\n /** The content the theme applies to. */\n children: ReactNode;\n /**\n * Additional CSS classes for the wrapper div. A root Theme (`isRoot`) has no\n * wrapper, so there this does nothing, and says so in development.\n */\n className?: string;\n /**\n * Inject the variables globally at `:root` instead of scoping them to a\n * wrapper div. Default: false.\n *\n * A root Theme renders its children with no wrapper, so `className` and the\n * helper props, such as `m` or `shadow`, have no element to land on. They\n * do nothing, and say so in development. `radius` and `columnGap` describe\n * what each does at the root.\n *\n * Several root Themes can be mounted at once, and each contributes its own\n * variables. Where two set the same one, the inner or later-mounted Theme\n * wins, as with nested scoped Themes, and unmounting a Theme removes only\n * what it contributed.\n *\n * The variables are written before the browser paints. A server render\n * has none of them, so put what a server-rendered page needs at first\n * paint in CSS.\n */\n isRoot?: boolean;\n /**\n * Set Bulma's light/dark scheme by writing its theme attribute on the\n * document root (`<html>`). This is always global, even on a scoped Theme.\n * `'system'` removes the attribute so Bulma follows the OS\n * `prefers-color-scheme`. Omit to leave the current setting untouched.\n *\n * The attribute is `data-theme`. A stylesheet built with a class prefix\n * reads Bulma's prefixed form instead (`data-bestax-theme` for the\n * `bestax-prefixed` builds), so under a `ConfigProvider` `classPrefix`\n * Theme writes both, and `'system'` or unmounting clears or restores both.\n * If the prefix cannot form an attribute name, `'light'` and `'dark'`\n * write only `data-theme` and warn in development.\n *\n * It is written before the browser paints, but the page can paint before\n * the app's script runs, in the scheme `<html>` already has. Put a fixed\n * scheme on `<html>` in `index.html`, and write a saved choice from an\n * inline `<head>` script, starting `colorMode` from it.\n */\n colorMode?: 'light' | 'dark' | 'system';\n /**\n * Bulma CSS variables to set, by name, such as\n * `{ '--bulma-primary-h': '210' }`. Only Bulma's own variables, the keys\n * the `BulmaVars` type allows, are applied, and an empty value is skipped.\n * Where a variable prop, such as `primaryH`, sets the same variable, the\n * prop wins.\n *\n * Theme writes them on its wrapper, or at `:root` under `isRoot`, so only a\n * variable that inherits from there changes anything. Bulma declares many\n * component variables, such as `--bulma-card-radius` or\n * `--bulma-delete-dimensions`, on the component's own element, and that\n * declaration beats any value set further up. Those keys are accepted but\n * do nothing here, and warn in development. Set them on the component\n * itself, with `className` or `style`, or through Sass. Each component's\n * API page says where Bulma declares its variables.\n *\n * Some global variables Bulma also declares again on one component, which\n * keeps its own value while everything else takes the Theme's. Those do not\n * warn, because the value still reaches the rest of the page.\n *\n * A color's trio leaves its label (`--bulma-<color>-invert-l`) and text\n * (`--bulma-<color>-on-scheme-l`) lightnesses where the stylesheet's build\n * put them, so a new color sets them too. On an `isRoot` Theme the\n * on-scheme keys also take `{ light, dark }`, one value per scheme, which a\n * scoped Theme skips with a warning in development.\n */\n bulmaVars?: BulmaVars;\n /**\n * Border radius helper, as on every other component: `radiusless` adds\n * `is-radiusless` to the wrapper div. On a Theme it also sets\n * `--bulma-radius` to 0, so what is inside the Theme loses its radius too.\n * Under `isRoot` there is no wrapper for the class, and the variable is\n * written at `:root`, which squares everything on the page that takes its\n * radius from it.\n *\n * The sizes (`small`, `normal`, `large`, `rounded`) add their\n * `has-radius-<value>` class to the wrapper div and set no variable, so\n * they round the wrapper and leave what is inside it alone. Under `isRoot`\n * there is no wrapper, so they do nothing, and say so in development.\n *\n * To change the radius of what is inside, set the variable through `bulmaVars`\n * (`bulmaVars={{ '--bulma-radius': '6px' }}`). This prop used to write the\n * variable for every value, so any other non-empty string still does, but\n * that route is deprecated and logs a warning in development. A number or\n * a boolean never produced a usable radius that way, and is now ignored as\n * it is on every other component.\n */\n radius?: (typeof validRadii)[number];\n /**\n * Column gap helper, as on every other component: a gap step adds\n * `is-column-gap-<step>` to the wrapper div, which spaces the wrapper's own\n * children when it is a flex or grid container. Under `isRoot` there is no\n * wrapper, so it does nothing, and says so in development.\n *\n * It does not set `--bulma-column-gap`, the variable `Columns` reads for\n * its gutters; set that through `bulmaVars`\n * (`bulmaVars={{ '--bulma-column-gap': '1rem' }}`). Before `columnGap` was\n * a helper prop, untyped JavaScript could pass it to Theme as that\n * variable. A string that is not a gap step (`'1rem'`) still sets it, but\n * that route is deprecated and logs a warning in development. A gap step\n * does not: `columnGap=\"0\"` used to zero the gutters inside the Theme, and\n * now adds `is-column-gap-0` to the wrapper instead.\n */\n columnGap?: BulmaGapStep;\n // Bulma scheme variables\n /** Base hue for the color scheme, 0 to 360. Sets `--bulma-scheme-h`. */\n schemeH?: string;\n /** Base saturation for the color scheme, as a percentage. Sets `--bulma-scheme-s`. */\n schemeS?: string;\n /** Lightness for light backgrounds. Sets `--bulma-light-l`. */\n lightL?: string;\n /** Inverted lightness for light backgrounds. Sets `--bulma-light-invert-l`. */\n lightInvertL?: string;\n /** Lightness for dark backgrounds. Sets `--bulma-dark-l`. */\n darkL?: string;\n /** Inverted lightness for dark backgrounds. Sets `--bulma-dark-invert-l`. */\n darkInvertL?: string;\n /** Lightness for soft colors. Sets `--bulma-soft-l`. */\n softL?: string;\n /** Lightness for bold colors. Sets `--bulma-bold-l`. */\n boldL?: string;\n /** Inverted lightness for soft colors. Sets `--bulma-soft-invert-l`. */\n softInvertL?: string;\n /** Inverted lightness for bold colors. Sets `--bulma-bold-invert-l`. */\n boldInvertL?: string;\n /** Lightness change of a background on hover. Sets `--bulma-hover-background-l-delta`. */\n hoverBackgroundLDelta?: string;\n /** Lightness change of a background when active. Sets `--bulma-active-background-l-delta`. */\n activeBackgroundLDelta?: string;\n /** Lightness change of a border on hover. Sets `--bulma-hover-border-l-delta`. */\n hoverBorderLDelta?: string;\n /** Lightness change of a border when active. Sets `--bulma-active-border-l-delta`. */\n activeBorderLDelta?: string;\n /** Lightness change of text color on hover. Sets `--bulma-hover-color-l-delta`. */\n hoverColorLDelta?: string;\n /** Lightness change of text color when active. Sets `--bulma-active-color-l-delta`. */\n activeColorLDelta?: string;\n /** Alpha change of a shadow on hover. Sets `--bulma-hover-shadow-a-delta`. */\n hoverShadowADelta?: string;\n /** Alpha change of a shadow when active. Sets `--bulma-active-shadow-a-delta`. */\n activeShadowADelta?: string;\n // Bulma color variables\n /** Primary color hue, 0 to 360. Sets `--bulma-primary-h`. */\n primaryH?: string;\n /** Primary color saturation, as a percentage. Sets `--bulma-primary-s`. */\n primaryS?: string;\n /** Primary color lightness, as a percentage. Sets `--bulma-primary-l`. */\n primaryL?: string;\n /** Link color hue, 0 to 360. Sets `--bulma-link-h`. */\n linkH?: string;\n /** Link color saturation, as a percentage. Sets `--bulma-link-s`. */\n linkS?: string;\n /** Link color lightness, as a percentage. Sets `--bulma-link-l`. */\n linkL?: string;\n /** Info color hue, 0 to 360. Sets `--bulma-info-h`. */\n infoH?: string;\n /** Info color saturation, as a percentage. Sets `--bulma-info-s`. */\n infoS?: string;\n /** Info color lightness, as a percentage. Sets `--bulma-info-l`. */\n infoL?: string;\n /** Success color hue, 0 to 360. Sets `--bulma-success-h`. */\n successH?: string;\n /** Success color saturation, as a percentage. Sets `--bulma-success-s`. */\n successS?: string;\n /** Success color lightness, as a percentage. Sets `--bulma-success-l`. */\n successL?: string;\n /** Warning color hue, 0 to 360. Sets `--bulma-warning-h`. */\n warningH?: string;\n /** Warning color saturation, as a percentage. Sets `--bulma-warning-s`. */\n warningS?: string;\n /** Warning color lightness, as a percentage. Sets `--bulma-warning-l`. */\n warningL?: string;\n /** Danger color hue, 0 to 360. Sets `--bulma-danger-h`. */\n dangerH?: string;\n /** Danger color saturation, as a percentage. Sets `--bulma-danger-s`. */\n dangerS?: string;\n /** Danger color lightness, as a percentage. Sets `--bulma-danger-l`. */\n dangerL?: string;\n // Add other commonly used ones as needed\n}\n\n/**\n * Theme component that injects Bulma CSS variables either globally or locally.\n *\n * When `isRoot` is true, variables are injected at `:root`. Otherwise, a wrapping\n * `<div>` scopes the variables to its children.\n *\n * @function\n * @param {ThemeProps} props - Props for the Theme component.\n * @returns {JSX.Element} The theme wrapper or fragment.\n *\n * @example\n * // Local theme scope\n * <Theme primaryH=\"171\" primaryS=\"100%\" primaryL=\"41%\">\n * <Button color=\"primary\">Themed</Button>\n * </Theme>\n */\nexport const Theme: React.FC<ThemeProps> = ({\n bulmaVars = {},\n children,\n className,\n isRoot = false,\n colorMode,\n radius,\n columnGap,\n ...restProps\n}) => {\n const radiusVar = themeRadiusVar(radius);\n const columnGapVar = themeColumnGapVar(columnGap);\n const radiusHelper = (validRadii as readonly unknown[]).includes(radius)\n ? radius\n : undefined;\n\n // A radius size only adds its class, and a root Theme renders no wrapper to\n // carry one, so on `isRoot` it does nothing at all. Say so, as the other\n // radius routes that do not do what they look like do.\n if (isRoot && radiusHelper && radiusHelperVars[radiusHelper] === undefined) {\n warnOnce(\n 'Theme:root-radius-size',\n `[bestax-bulma] <Theme isRoot radius=\"${radiusHelper}\">: a root Theme ` +\n `has no wrapper element for has-radius-${radiusHelper}, and the ` +\n 'radius sizes set no variable, so this does nothing. To round one ' +\n `element, put radius=\"${radiusHelper}\" on it. To change the radius ` +\n \"across the page, set bulmaVars={{ '--bulma-radius': '…' }} instead.\"\n );\n }\n\n // The same for a gap step in `columnGap`, which reads like the columns\n // gutter it once set and, at the root, has no element for its class.\n const columnGapStep =\n typeof columnGap === 'number' ? String(columnGap) : columnGap;\n if (\n isRoot &&\n columnGapStep !== undefined &&\n (validGaps as readonly unknown[]).includes(columnGapStep)\n ) {\n warnOnce(\n 'Theme:root-column-gap',\n `[bestax-bulma] <Theme isRoot columnGap=\"${columnGapStep}\">: a root ` +\n `Theme has no wrapper element for is-column-gap-${columnGapStep}, ` +\n 'and a gap step sets no variable, so this does nothing. To change ' +\n 'the columns gutter across the page, set ' +\n \"bulmaVars={{ '--bulma-column-gap': '…' }} instead.\"\n );\n }\n\n // Extract Bulma variable props from restProps\n const { bulmaVarProps, otherProps } = useMemo(() => {\n const varProps: Record<string, string | undefined> = {};\n const otherPropsObj: Record<string, unknown> = {};\n\n for (const [key, value] of Object.entries(restProps)) {\n if (Object.prototype.hasOwnProperty.call(bulmaVarPropMap, key)) {\n varProps[key] = value as string;\n } else {\n otherPropsObj[key] = value;\n }\n }\n\n return { bulmaVarProps: varProps, otherProps: otherPropsObj };\n }, [restProps]);\n\n // Everything left in `otherProps` lands on the wrapper div, as a helper\n // class or an attribute, and so does `className`. A root Theme renders no\n // wrapper, so under `isRoot` all of it is dropped. `radius` and `columnGap`\n // are not in `otherProps`; the checks above cover them.\n if (isRoot) {\n const dropped = Object.entries(otherProps)\n .filter(\n ([, value]) => value !== undefined && value !== null && value !== false\n )\n .map(([key]) => key);\n if (className) {\n dropped.unshift('className');\n }\n if (dropped.length > 0) {\n warnOnce(\n 'Theme:root-dropped-props',\n `[bestax-bulma] <Theme isRoot>: a root Theme renders no wrapper ` +\n `element, so ${dropped.join(', ')} ` +\n `${dropped.length === 1 ? 'has' : 'have'} nothing to apply to. ` +\n 'Put helper props and classes on an element inside the Theme ' +\n 'instead.'\n );\n }\n }\n\n // Use Bulma classes for styling (only when not isRoot). Only a helper value\n // of `radius` reaches the helper; a legacy string went to the variable.\n const { bulmaHelperClasses, rest } = useBulmaClasses({\n ...otherProps,\n radius: radiusHelper,\n columnGap,\n });\n\n // Merge bulmaVars and individual props, with props taking precedence\n const mergedVars = useMemo(() => {\n const vars: Partial<Record<BulmaVarKey, BulmaVarValue>> = {\n ...bulmaVars,\n };\n for (const [propName, cssVar] of Object.entries(bulmaVarPropMap)) {\n if (bulmaVarProps[propName] !== undefined) {\n vars[cssVar as BulmaVarKey] = bulmaVarProps[propName] as string;\n }\n }\n if (radiusVar !== undefined) {\n vars['--bulma-radius'] = radiusVar;\n }\n if (columnGapVar !== undefined) {\n vars['--bulma-column-gap'] = columnGapVar;\n }\n return vars;\n }, [bulmaVars, bulmaVarProps, radiusVar, columnGapVar]);\n\n // The variables Theme writes, split by form: a value per scheme, or one\n // value for every scheme. A key Theme does not take, or an empty value, is\n // left out. A plain value is written as given, so a number untyped code\n // passes still works.\n const { plainVars, perSchemeVars } = useMemo(() => {\n const plain: Array<[string, unknown]> = [];\n const perScheme: Array<[string, BulmaSchemeValues]> = [];\n for (const [key, value] of Object.entries(mergedVars)) {\n if (!value || !bulmaCssVars.includes(key as BulmaVarKey)) {\n continue;\n }\n if (isSchemeValues(value)) {\n perScheme.push([key, value]);\n } else {\n plain.push([key, value]);\n }\n }\n return { plainVars: plain, perSchemeVars: perScheme };\n }, [mergedVars]);\n\n // From an effect rather than the render body, so rendering does none of\n // this work, and a server render none at all. In production it returns\n // at its development check before looking at the variables.\n useEffect(() => {\n warnComponentVars(mergedVars);\n }, [mergedVars]);\n\n // A scoped Theme writes its variables as an inline style, which has no way\n // to say which scheme a value is for, so it skips a value given per\n // scheme. Say so, since nothing on the page does.\n useEffect(() => {\n if (isRoot || perSchemeVars.length === 0 || !isDev()) {\n return;\n }\n const keys = perSchemeVars.map(([key]) => key).sort();\n warnOnce(\n `Theme:scoped-scheme-values:${keys.join(',')}`,\n `[bestax-bulma] <Theme>: a scoped Theme writes its variables as an ` +\n `inline style, which cannot hold a value per scheme, so ` +\n `${keys.join(', ')} ${keys.length === 1 ? 'is' : 'are'} not set. ` +\n 'Give a single string, set the values on an isRoot Theme, or set ' +\n 'them in your CSS.'\n );\n }, [isRoot, perSchemeVars]);\n\n // This Theme's place among the Themes on the page; see `rootThemeRules`\n // and `schemeAttributes`.\n const [rootOrder] = useState(() => nextRootOrder++);\n\n // Bulma names its scheme attribute after the class prefix a stylesheet was\n // built with (`data-<prefix>theme`), so the prefixed builds read\n // `data-bestax-theme` and never `data-theme`. Its scheme classes take the\n // prefix too (`.bestax-theme-dark`).\n const classPrefix = useClassPrefix();\n\n // The `:root` rules this Theme contributes, or '' when it contributes none:\n // one block for the plain values, then the rules for each value given per\n // scheme.\n const rootRules = useMemo(() => {\n if (!isRoot) {\n return '';\n }\n const plain = plainVars.map(([key, value]) => `${key}: ${value};`);\n return [\n ...(plain.length > 0 ? [`:root { ${plain.join(' ')} }`] : []),\n ...schemeRules(perSchemeVars, classPrefix),\n ].join('\\n');\n }, [plainVars, perSchemeVars, classPrefix, isRoot]);\n\n // Inject CSS variables globally at :root level, alongside any other root\n // Themes. Clearing `isRoot` or every variable passes '', which withdraws\n // this Theme's rules. A layout effect, so they are in place before the\n // browser paints what this Theme rendered.\n useClientLayoutEffect(() => {\n setRootThemeRules(rootOrder, rootRules);\n }, [rootOrder, rootRules]);\n\n // Withdraw them on unmount. Kept apart from the effect above so a change\n // rewrites the shared element in place rather than removing and recreating\n // it between the cleanup and the next run, and passive, so a Theme that a\n // `Suspense` fallback hides keeps its variables meanwhile: React cleans up\n // a hidden tree's layout effects, but not its passive ones.\n useEffect(() => () => setRootThemeRules(rootOrder, ''), [rootOrder]);\n\n // Toggle Bulma's light/dark scheme by writing the theme attribute on the\n // document root (<html>). This is always global, even on a scoped Theme.\n // Under a class prefix the prefixed attribute is written as well as\n // `data-theme`, so whichever build is loaded sees it; with no prefix only\n // `data-theme` is. `'system'` removes them so Bulma follows the OS\n // preference. Written before the browser paints, and handed back on\n // unmount, for the reasons the two effects above give; `schemeAttributes`\n // keeps the two in step.\n useClientLayoutEffect(() => {\n const names =\n colorMode === undefined\n ? []\n : classPrefix\n ? ['data-theme', `data-${classPrefix}theme`]\n : ['data-theme'];\n const value =\n colorMode === undefined || colorMode === 'system' ? null : colorMode;\n releaseSchemeAttributes(rootOrder, names);\n for (const name of names) {\n try {\n writeSchemeAttribute(rootOrder, name, value);\n } catch {\n // A class prefix can hold characters an attribute name cannot.\n // `data-theme` is still written, as it was before the prefixed\n // attribute existed, but a sheet built with that prefix keeps its\n // scheme, so say so.\n warnOnce(\n 'Theme:color-mode-prefix',\n `[bestax-bulma] <Theme colorMode=\"${colorMode}\">: the class ` +\n `prefix \"${classPrefix}\" makes ${name} an invalid attribute ` +\n 'name, so only data-theme is written, and a stylesheet built ' +\n 'with that prefix keeps its scheme.'\n );\n }\n }\n }, [colorMode, classPrefix, rootOrder]);\n\n // Hand the attributes back on unmount.\n useEffect(() => () => releaseSchemeAttributes(rootOrder), [rootOrder]);\n\n // For local injection (when isRoot is false), prepare style object for CSS vars\n const style: CSSProperties = useMemo(() => {\n if (isRoot) {\n return {};\n }\n\n const styleObj: CSSProperties = {};\n for (const [key, value] of plainVars) {\n (styleObj as Record<string, unknown>)[key] = value;\n }\n return styleObj;\n }, [plainVars, isRoot]);\n\n // Generate combined class names for the wrapper div\n const combinedClassName = useMemo(() => {\n if (isRoot) {\n return '';\n }\n return classNames(className, bulmaHelperClasses);\n }, [className, bulmaHelperClasses, isRoot]);\n\n return isRoot ? (\n <>{children}</>\n ) : (\n <div className={combinedClassName || undefined} style={style} {...rest}>\n {children}\n </div>\n );\n};\n"],"names":["_jsx","_Fragment"],"mappings":";;;;;;;;;;AAcA;AACA;AAEA;;;;;AAKG;AACH,MAAM,eAAe,GAAG;;IAEtB,kBAAkB;IAClB,kBAAkB;IAClB,qBAAqB;IACrB,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IAC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xC,IAAI,MAAM,EAAE;AACV,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,QAAQ,GAAkB,EAAE;QAClC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,SAAS,EAAE;AACnC,YAAA,QAAoC,CAAC,GAAG,CAAC,GAAG,KAAK;QACpD;AACA,QAAA,OAAO,QAAQ;AACjB,IAAA,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;;AAGvB,IAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,MAAK;QACrC,IAAI,MAAM,EAAE;AACV,YAAA,OAAO,EAAE;QACX;AACA,QAAA,OAAO,UAAU,CAAC,SAAS,EAAE,kBAAkB,CAAC;IAClD,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAE3C,IAAA,OAAO,MAAM,IACXA,GAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI,KAEfD,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,iBAAiB,IAAI,SAAS,EAAE,KAAK,EAAE,KAAK,EAAA,GAAM,IAAI,EAAA,QAAA,EACnE,QAAQ,EAAA,CACL,CACP;AACH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useVisibilityClasses.js","sources":["../../../src/helpers/useVisibilityClasses.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validDisplays,\n validVisibilities,\n validViewports,\n BulmaViewportProps,\n BulmaDisplayProps,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma visibility and display helper classes.\n */\nexport interface BulmaVisibilityProps\n extends BulmaViewportProps, BulmaDisplayProps {\n /** Visibility (e.g., 'hidden', 'sr-only'). */\n visibility?: (typeof validVisibilities)[number];\n /** Visibility for mobile viewport (up to 768px). */\n visibilityMobile?: (typeof validVisibilities)[number];\n /** Visibility for tablet viewport (769px - 1023px). */\n visibilityTablet?: (typeof validVisibilities)[number];\n /** Visibility for tablet-only viewport (769px - 1023px, excludes desktop+). */\n visibilityTabletOnly?: (typeof validVisibilities)[number];\n /** Visibility for touch viewport (up to 1023px; mobile + tablet). */\n visibilityTouch?: (typeof validVisibilities)[number];\n /** Visibility for desktop viewport (1024px - 1215px). */\n visibilityDesktop?: (typeof validVisibilities)[number];\n /** Visibility for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n visibilityDesktopOnly?: (typeof validVisibilities)[number];\n /** Visibility for widescreen viewport (1216px - 1407px). */\n visibilityWidescreen?: (typeof validVisibilities)[number];\n /** Visibility for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n visibilityWidescreenOnly?: (typeof validVisibilities)[number];\n /** Visibility for fullhd viewport (1408px and above). */\n visibilityFullhd?: (typeof validVisibilities)[number];\n}\n\n/**\n * A hook that generates Bulma visibility and display helper classes. This hook\n * owns all display class emission, including viewport-specific display props,\n * the legacy display/viewport combination, and `display: 'none'` mapping to\n * `is-hidden`.\n *\n * @function useVisibilityClasses\n * @param props - Visibility- and display-related Bulma helper props.\n * @returns A space-separated string of visibility and display helper classes.\n * @example\n * const visibilityClasses = useVisibilityClasses({\n * display: 'flex',\n * visibilityMobile: 'hidden',\n * });\n * // visibilityClasses: 'is-hidden-mobile is-flex'\n */\nexport const useVisibilityClasses = (props: BulmaVisibilityProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClass } = createBulmaClassHelpers(\n classPrefix,\n viewport\n );\n\n // Viewport-specific visibility\n const addViewportSpecificVisibilityClass = (\n value: string | undefined,\n viewportSuffix: string\n ) => {\n if (value === 'hidden') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (value === 'sr-only') {\n addPrefixedClass(`is-sr-only${viewportSuffix}`);\n } else if (value === 'invisible') {\n addPrefixedClass(`is-invisible${viewportSuffix}`);\n }\n };\n\n addViewportSpecificVisibilityClass(visibilityMobile, '-mobile');\n addViewportSpecificVisibilityClass(visibilityTablet, '-tablet');\n addViewportSpecificVisibilityClass(visibilityTabletOnly, '-tablet-only');\n addViewportSpecificVisibilityClass(visibilityTouch, '-touch');\n addViewportSpecificVisibilityClass(visibilityDesktop, '-desktop');\n addViewportSpecificVisibilityClass(visibilityDesktopOnly, '-desktop-only');\n addViewportSpecificVisibilityClass(visibilityWidescreen, '-widescreen');\n addViewportSpecificVisibilityClass(\n visibilityWidescreenOnly,\n '-widescreen-only'\n );\n addViewportSpecificVisibilityClass(visibilityFullhd, '-fullhd');\n\n // Visibility and Display\n // Handle viewport-specific display properties first (they take precedence)\n const addDisplayClass = (\n displayValue: string | undefined,\n viewportSuffix: string\n ) => {\n if (displayValue) {\n if (displayValue === 'none') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (\n (validDisplays as readonly string[]).includes(displayValue)\n ) {\n addPrefixedClass(`is-${displayValue}${viewportSuffix}`);\n }\n }\n };\n\n // Apply viewport-specific display classes\n addDisplayClass(displayMobile, '-mobile');\n addDisplayClass(displayTablet, '-tablet');\n addDisplayClass(displayTabletOnly, '-tablet-only');\n addDisplayClass(displayTouch, '-touch');\n addDisplayClass(displayDesktop, '-desktop');\n addDisplayClass(displayDesktopOnly, '-desktop-only');\n addDisplayClass(displayWidescreen, '-widescreen');\n addDisplayClass(displayWidescreenOnly, '-widescreen-only');\n addDisplayClass(displayFullhd, '-fullhd');\n\n // Apply legacy display/viewport combination if no viewport-specific display props are set\n const hasViewportSpecificDisplay = !!(\n displayMobile ||\n displayTablet ||\n displayTabletOnly ||\n displayTouch ||\n displayDesktop ||\n displayDesktopOnly ||\n displayWidescreen ||\n displayWidescreenOnly ||\n displayFullhd\n );\n\n if (!hasViewportSpecificDisplay) {\n // Legacy display handling\n if (display === 'none') {\n if (viewport && validViewports.includes(viewport)) {\n addPrefixedClass(`is-hidden-${viewport}`);\n } else {\n addPrefixedClass('is-hidden');\n }\n } else {\n addClass('is', display, [...validDisplays], true); // display supports viewport\n }\n }\n\n // Visibility (always applied regardless of display settings)\n if (visibility) {\n if (\n (visibility === 'hidden' || visibility === 'invisible') &&\n viewport &&\n validViewports.includes(viewport)\n ) {\n addPrefixedClass(`is-${visibility}-${viewport}`);\n } else if (validVisibilities.includes(visibility)) {\n addPrefixedClass(`is-${visibility}`);\n }\n }\n\n return classNames(classes);\n }, [\n classPrefix,\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n ]);\n};\n"],"names":[],"mappings":";;;;;;AAuCA;;;;;;;;;;;;;;;AAeG;AACI,MAAM,oBAAoB,GAAG,CAAC,KAA2B,KAAY;AAC1E,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;IAEnC,MAAM,EACJ,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,QAAQ,GACT,GAAG,KA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AAI,UAAU,EAAE;YACd,IACE,CAAC,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,WAAW;gBACtD,QAAQ;AACR,gBAAA,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,EACjC;AACA,gBAAA,gBAAgB,CAAC,CAAA,GAAA,EAAM,UAAU,IAAI,QAAQ,CAAA,CAAE,CAAC;YAClD;AAAO,iBAAA,IAAI,iBAAiB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;AACjD,gBAAA,gBAAgB,CAAC,CAAA,GAAA,EAAM,UAAU,CAAA,CAAE,CAAC;YACtC;QACF;AAEA,QAAA,OAAO,UAAU,CAAC,OAAO,CAAC;AAC5B,IAAA,CAAC,EAAE;QACD,WAAW;QACX,UAAU;QACV,gBAAgB;QAChB,gBAAgB;QAChB,oBAAoB;QACpB,eAAe;QACf,iBAAiB;QACjB,qBAAqB;QACrB,oBAAoB;QACpB,wBAAwB;QACxB,gBAAgB;QAChB,OAAO;QACP,aAAa;QACb,aAAa;QACb,iBAAiB;QACjB,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,iBAAiB;QACjB,qBAAqB;QACrB,aAAa;QACb,QAAQ;AACT,KAAA,CAAC;AACJ;;"}
1
+ {"version":3,"file":"useVisibilityClasses.js","sources":["../../../src/helpers/useVisibilityClasses.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { classNames } from './classNames';\nimport { useConfig } from './Config';\nimport {\n createBulmaClassHelpers,\n validDisplays,\n validVisibilities,\n validViewports,\n BulmaViewportProps,\n BulmaDisplayProps,\n} from './bulmaClassHelpers';\n\n/**\n * Props for applying Bulma visibility and display helper classes.\n */\nexport interface BulmaVisibilityProps\n extends BulmaViewportProps, BulmaDisplayProps {\n /**\n * Hides the element. `'hidden'` takes it off the page, `'invisible'` hides\n * it and keeps its space, and `'sr-only'` (screen reader only) hides it\n * visually while screen readers still read it.\n */\n visibility?: (typeof validVisibilities)[number];\n /** Visibility for mobile viewport (up to 768px). */\n visibilityMobile?: (typeof validVisibilities)[number];\n /** Visibility for tablet viewport (769px - 1023px). */\n visibilityTablet?: (typeof validVisibilities)[number];\n /** Visibility for tablet-only viewport (769px - 1023px, excludes desktop+). */\n visibilityTabletOnly?: (typeof validVisibilities)[number];\n /** Visibility for touch viewport (up to 1023px; mobile + tablet). */\n visibilityTouch?: (typeof validVisibilities)[number];\n /** Visibility for desktop viewport (1024px - 1215px). */\n visibilityDesktop?: (typeof validVisibilities)[number];\n /** Visibility for desktop-only viewport (1024px - 1215px, excludes widescreen+). */\n visibilityDesktopOnly?: (typeof validVisibilities)[number];\n /** Visibility for widescreen viewport (1216px - 1407px). */\n visibilityWidescreen?: (typeof validVisibilities)[number];\n /** Visibility for widescreen-only viewport (1216px - 1407px, excludes fullhd). */\n visibilityWidescreenOnly?: (typeof validVisibilities)[number];\n /** Visibility for fullhd viewport (1408px and above). */\n visibilityFullhd?: (typeof validVisibilities)[number];\n}\n\n/**\n * A hook that generates Bulma visibility and display helper classes. This hook\n * owns all display class emission, including viewport-specific display props,\n * the legacy display/viewport combination, and `display: 'none'` mapping to\n * `is-hidden`.\n *\n * @function useVisibilityClasses\n * @param props - Visibility- and display-related Bulma helper props.\n * @returns A space-separated string of visibility and display helper classes.\n * @example\n * const visibilityClasses = useVisibilityClasses({\n * display: 'flex',\n * visibilityMobile: 'hidden',\n * });\n * // visibilityClasses: 'is-hidden-mobile is-flex'\n */\nexport const useVisibilityClasses = (props: BulmaVisibilityProps): string => {\n const { classPrefix } = useConfig();\n\n const {\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n } = props;\n\n return useMemo(() => {\n const { classes, addPrefixedClass, addClass } = createBulmaClassHelpers(\n classPrefix,\n viewport\n );\n\n // Viewport-specific visibility\n const addViewportSpecificVisibilityClass = (\n value: string | undefined,\n viewportSuffix: string\n ) => {\n if (value === 'hidden') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (value === 'sr-only') {\n addPrefixedClass(`is-sr-only${viewportSuffix}`);\n } else if (value === 'invisible') {\n addPrefixedClass(`is-invisible${viewportSuffix}`);\n }\n };\n\n addViewportSpecificVisibilityClass(visibilityMobile, '-mobile');\n addViewportSpecificVisibilityClass(visibilityTablet, '-tablet');\n addViewportSpecificVisibilityClass(visibilityTabletOnly, '-tablet-only');\n addViewportSpecificVisibilityClass(visibilityTouch, '-touch');\n addViewportSpecificVisibilityClass(visibilityDesktop, '-desktop');\n addViewportSpecificVisibilityClass(visibilityDesktopOnly, '-desktop-only');\n addViewportSpecificVisibilityClass(visibilityWidescreen, '-widescreen');\n addViewportSpecificVisibilityClass(\n visibilityWidescreenOnly,\n '-widescreen-only'\n );\n addViewportSpecificVisibilityClass(visibilityFullhd, '-fullhd');\n\n // Visibility and Display\n // Handle viewport-specific display properties first (they take precedence)\n const addDisplayClass = (\n displayValue: string | undefined,\n viewportSuffix: string\n ) => {\n if (displayValue) {\n if (displayValue === 'none') {\n addPrefixedClass(`is-hidden${viewportSuffix}`);\n } else if (\n (validDisplays as readonly string[]).includes(displayValue)\n ) {\n addPrefixedClass(`is-${displayValue}${viewportSuffix}`);\n }\n }\n };\n\n // Apply viewport-specific display classes\n addDisplayClass(displayMobile, '-mobile');\n addDisplayClass(displayTablet, '-tablet');\n addDisplayClass(displayTabletOnly, '-tablet-only');\n addDisplayClass(displayTouch, '-touch');\n addDisplayClass(displayDesktop, '-desktop');\n addDisplayClass(displayDesktopOnly, '-desktop-only');\n addDisplayClass(displayWidescreen, '-widescreen');\n addDisplayClass(displayWidescreenOnly, '-widescreen-only');\n addDisplayClass(displayFullhd, '-fullhd');\n\n // Apply legacy display/viewport combination if no viewport-specific display props are set\n const hasViewportSpecificDisplay = !!(\n displayMobile ||\n displayTablet ||\n displayTabletOnly ||\n displayTouch ||\n displayDesktop ||\n displayDesktopOnly ||\n displayWidescreen ||\n displayWidescreenOnly ||\n displayFullhd\n );\n\n if (!hasViewportSpecificDisplay) {\n // Legacy display handling\n if (display === 'none') {\n if (viewport && validViewports.includes(viewport)) {\n addPrefixedClass(`is-hidden-${viewport}`);\n } else {\n addPrefixedClass('is-hidden');\n }\n } else {\n addClass('is', display, [...validDisplays], true); // display supports viewport\n }\n }\n\n // Visibility (always applied regardless of display settings)\n if (visibility) {\n if (\n (visibility === 'hidden' || visibility === 'invisible') &&\n viewport &&\n validViewports.includes(viewport)\n ) {\n addPrefixedClass(`is-${visibility}-${viewport}`);\n } else if (validVisibilities.includes(visibility)) {\n addPrefixedClass(`is-${visibility}`);\n }\n }\n\n return classNames(classes);\n }, [\n classPrefix,\n visibility,\n visibilityMobile,\n visibilityTablet,\n visibilityTabletOnly,\n visibilityTouch,\n visibilityDesktop,\n visibilityDesktopOnly,\n visibilityWidescreen,\n visibilityWidescreenOnly,\n visibilityFullhd,\n display,\n displayMobile,\n displayTablet,\n displayTabletOnly,\n displayTouch,\n displayDesktop,\n displayDesktopOnly,\n displayWidescreen,\n displayWidescreenOnly,\n displayFullhd,\n viewport,\n ]);\n};\n"],"names":[],"mappings":";;;;;;AA2CA;;;;;;;;;;;;;;;AAeG;AACI,MAAM,oBAAoB,GAAG,CAAC,KAA2B,KAAY;AAC1E,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE;IAEnC,MAAM,EACJ,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,gBAAgB,EAChB,OAAO,EACP,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,qBAAq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