@allxsmith/bestax-bulma 5.52.0 → 5.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bestax.css +1 -1
- package/dist/bestax.css.map +1 -1
- package/dist/esm/components/Modal.js +2 -1
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Sidebar.js +3 -1
- package/dist/esm/components/Sidebar.js.map +1 -1
- package/dist/esm/components/Toast.js +8 -5
- package/dist/esm/components/Toast.js.map +1 -1
- package/dist/esm/elements/Notification.js +4 -2
- package/dist/esm/elements/Notification.js.map +1 -1
- package/dist/esm/form/Autocomplete.js +3 -2
- package/dist/esm/form/Autocomplete.js.map +1 -1
- package/dist/esm/form/Checkbox.js +3 -2
- package/dist/esm/form/Checkbox.js.map +1 -1
- package/dist/esm/form/CheckboxCard.js +3 -2
- package/dist/esm/form/CheckboxCard.js.map +1 -1
- package/dist/esm/form/Combobox.js +3 -2
- package/dist/esm/form/Combobox.js.map +1 -1
- package/dist/esm/form/DateInputBase.js +15 -6
- package/dist/esm/form/DateInputBase.js.map +1 -1
- package/dist/esm/form/DateRangeInputBase.js +15 -5
- package/dist/esm/form/DateRangeInputBase.js.map +1 -1
- package/dist/esm/form/DateTimeInputBase.js +15 -6
- package/dist/esm/form/DateTimeInputBase.js.map +1 -1
- package/dist/esm/form/Fieldset.js +64 -0
- package/dist/esm/form/Fieldset.js.map +1 -0
- package/dist/esm/form/FormContext.js +17 -1
- package/dist/esm/form/FormContext.js.map +1 -1
- package/dist/esm/form/InputBase.js +3 -2
- package/dist/esm/form/InputBase.js.map +1 -1
- package/dist/esm/form/Numberinput.js +3 -2
- package/dist/esm/form/Numberinput.js.map +1 -1
- package/dist/esm/form/PinInput.js +3 -2
- package/dist/esm/form/PinInput.js.map +1 -1
- package/dist/esm/form/Radio.js +3 -2
- package/dist/esm/form/Radio.js.map +1 -1
- package/dist/esm/form/RadioCard.js +3 -2
- package/dist/esm/form/RadioCard.js.map +1 -1
- package/dist/esm/form/Rate.js +3 -2
- package/dist/esm/form/Rate.js.map +1 -1
- package/dist/esm/form/SelectBase.js +3 -2
- package/dist/esm/form/SelectBase.js.map +1 -1
- package/dist/esm/form/Slider.js +3 -2
- package/dist/esm/form/Slider.js.map +1 -1
- package/dist/esm/form/Switch.js +3 -1
- package/dist/esm/form/Switch.js.map +1 -1
- package/dist/esm/form/Taginput.js +3 -2
- package/dist/esm/form/Taginput.js.map +1 -1
- package/dist/esm/form/TextAreaBase.js +3 -2
- package/dist/esm/form/TextAreaBase.js.map +1 -1
- package/dist/esm/form/TimeInputBase.js +13 -6
- package/dist/esm/form/TimeInputBase.js.map +1 -1
- package/dist/esm/form/_pickerInternals/PickerPopover.js +4 -2
- package/dist/esm/form/_pickerInternals/PickerPopover.js.map +1 -1
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js +80 -0
- package/dist/esm/form/_pickerInternals/useLocaleDefaults.js.map +1 -0
- package/dist/esm/helpers/LocaleProvider.js +153 -0
- package/dist/esm/helpers/LocaleProvider.js.map +1 -0
- package/dist/esm/helpers/localeInfo.js +109 -0
- package/dist/esm/helpers/localeInfo.js.map +1 -0
- package/dist/esm/helpers/portal.js +14 -1
- package/dist/esm/helpers/portal.js.map +1 -1
- package/dist/extras.css +1 -1
- package/dist/extras.css.map +1 -1
- package/dist/index.cjs +504 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/form/DateInputBase.d.ts +25 -3
- package/dist/types/form/DateRangeInputBase.d.ts +25 -3
- package/dist/types/form/DateTimeInputBase.d.ts +25 -3
- package/dist/types/form/Fieldset.d.ts +86 -0
- package/dist/types/form/FormContext.d.ts +12 -0
- package/dist/types/form/TimeInputBase.d.ts +5 -1
- package/dist/types/form/_pickerInternals/PickerPopover.d.ts +6 -0
- package/dist/types/form/_pickerInternals/useLocaleDefaults.d.ts +49 -0
- package/dist/types/helpers/LocaleProvider.d.ts +128 -0
- package/dist/types/helpers/localeInfo.d.ts +23 -0
- package/dist/types/helpers/portal.d.ts +11 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types-cjs/form/DateInputBase.d.ts +25 -3
- package/dist/types-cjs/form/DateRangeInputBase.d.ts +25 -3
- package/dist/types-cjs/form/DateTimeInputBase.d.ts +25 -3
- package/dist/types-cjs/form/Fieldset.d.ts +86 -0
- package/dist/types-cjs/form/FormContext.d.ts +12 -0
- package/dist/types-cjs/form/TimeInputBase.d.ts +5 -1
- package/dist/types-cjs/form/_pickerInternals/PickerPopover.d.ts +6 -0
- package/dist/types-cjs/form/_pickerInternals/useLocaleDefaults.d.ts +49 -0
- package/dist/types-cjs/helpers/LocaleProvider.d.ts +128 -0
- package/dist/types-cjs/helpers/localeInfo.d.ts +23 -0
- package/dist/types-cjs/helpers/portal.d.ts +11 -0
- package/dist/types-cjs/index.d.ts +3 -0
- package/dist/versions/bestax-no-dark-mode.css +1 -1
- package/dist/versions/bestax-no-dark-mode.css.map +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css +1 -1
- package/dist/versions/bestax-no-helpers-prefixed.css.map +1 -1
- package/dist/versions/bestax-no-helpers.css +1 -1
- package/dist/versions/bestax-no-helpers.css.map +1 -1
- package/dist/versions/bestax-prefixed.css +1 -1
- package/dist/versions/bestax-prefixed.css.map +1 -1
- package/package.json +1 -1
- package/src/scss/form/_fieldset.scss +108 -0
- package/src/scss/form/_index.scss +1 -0
package/dist/index.cjs
CHANGED
|
@@ -3909,6 +3909,255 @@ function useIsHydrated() {
|
|
|
3909
3909
|
return React.useSyncExternalStore(subscribeToNothing, getClientSnapshot, getServerSnapshot);
|
|
3910
3910
|
}
|
|
3911
3911
|
|
|
3912
|
+
// INTERNAL: deliberately not exported from src/index.ts. What a locale says
|
|
3913
|
+
// about its direction, read from `Intl.Locale` where the engine has the data,
|
|
3914
|
+
// and about its week, read from a copy of CLDR's week data.
|
|
3915
|
+
/**
|
|
3916
|
+
* Scripts written right to left: every script for which ICU's text info
|
|
3917
|
+
* says `rtl`, as Node reported it, and `Aran`, the Nastaliq form of Arabic
|
|
3918
|
+
* that WebKit fills in for Urdu. Read only where the engine has no text info
|
|
3919
|
+
* of its own, which includes Firefox before 153.
|
|
3920
|
+
*/
|
|
3921
|
+
const RTL_SCRIPTS = ' Adlm Arab Aran Armi Avst Chrs Cprt Elym Gara Hatr Hebr Hung Khar Lydi ' +
|
|
3922
|
+
'Mand Mani Mend Merc Mero Narb Nbat Nkoo Orkh Ougr Palm Phli Phlp Phnx ' +
|
|
3923
|
+
'Prti Rohg Samr Sarb Sidt Sogd Sogo Syrc Thaa Yezi ';
|
|
3924
|
+
/**
|
|
3925
|
+
* Widely used languages whose usual script reads right to left, for an engine
|
|
3926
|
+
* that can't fill in a locale's script with `maximize()`.
|
|
3927
|
+
*/
|
|
3928
|
+
const RTL_LANGUAGES = ' ar ckb dv fa he iw ji ks mzn nqo pnb ps sd syr ug ur yi ';
|
|
3929
|
+
/**
|
|
3930
|
+
* The regions whose week doesn't start on Monday, by the day it starts on
|
|
3931
|
+
* (0 = Sunday, 5 = Friday, 6 = Saturday), from CLDR 48's week data as Node
|
|
3932
|
+
* reported it. The library reads this rather than `Intl.Locale`'s week info
|
|
3933
|
+
* because engines disagree: Firefox before 153 has none, and WebKit's differs
|
|
3934
|
+
* from Node's, Chromium's and current Firefox's for China, Algeria, Jordan and
|
|
3935
|
+
* Iceland among others, so an inline calendar rendered on the server would
|
|
3936
|
+
* fail to hydrate there. With one table, the server and every browser agree.
|
|
3937
|
+
*/
|
|
3938
|
+
const WEEK_STARTS = [
|
|
3939
|
+
[
|
|
3940
|
+
0,
|
|
3941
|
+
' AG AS BD BR BS BT BU BW BZ CA CO DM DO ET GT GU HK HN ID IL IN IS JM JP ' +
|
|
3942
|
+
'KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY RH SA SG SV TH ' +
|
|
3943
|
+
'TT TW UM US VE VI WS YD YE ZA ZW ',
|
|
3944
|
+
],
|
|
3945
|
+
[5, ' MV '],
|
|
3946
|
+
[6, ' AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY '],
|
|
3947
|
+
];
|
|
3948
|
+
/** Whether a space-separated list, padded with spaces, holds `code`. */
|
|
3949
|
+
const listed = (list, code) => list.includes(` ${code} `);
|
|
3950
|
+
/** The `-u-fw-` keyword's values, by the day they name. */
|
|
3951
|
+
const FW_DAYS = {
|
|
3952
|
+
sun: 0,
|
|
3953
|
+
mon: 1,
|
|
3954
|
+
tue: 2,
|
|
3955
|
+
wed: 3,
|
|
3956
|
+
thu: 4,
|
|
3957
|
+
fri: 5,
|
|
3958
|
+
sat: 6,
|
|
3959
|
+
};
|
|
3960
|
+
/**
|
|
3961
|
+
* The canonical form of a BCP 47 tag (`"en-us"` becomes `"en-US"`), or
|
|
3962
|
+
* `undefined` for an empty or missing one. Throws a `RangeError` for a tag
|
|
3963
|
+
* `Intl` refuses, as `Intl.DateTimeFormat` would.
|
|
3964
|
+
*/
|
|
3965
|
+
function canonicalLocale(tag) {
|
|
3966
|
+
if (!tag)
|
|
3967
|
+
return undefined;
|
|
3968
|
+
return Intl.getCanonicalLocales(tag)[0];
|
|
3969
|
+
}
|
|
3970
|
+
/**
|
|
3971
|
+
* The direction a locale's script is written in: from `Intl.Locale`'s text
|
|
3972
|
+
* info, else from the script `maximize()` fills in, else from the language.
|
|
3973
|
+
*
|
|
3974
|
+
* @param locale - A canonical tag, as `canonicalLocale` returns.
|
|
3975
|
+
*/
|
|
3976
|
+
function localeDirection(locale) {
|
|
3977
|
+
const intlLocale = new Intl.Locale(locale);
|
|
3978
|
+
const info = intlLocale;
|
|
3979
|
+
const direction = typeof info.getTextInfo === 'function'
|
|
3980
|
+
? info.getTextInfo().direction
|
|
3981
|
+
: info.textInfo?.direction;
|
|
3982
|
+
if (direction === 'rtl' || direction === 'ltr')
|
|
3983
|
+
return direction;
|
|
3984
|
+
if (typeof intlLocale.maximize === 'function') {
|
|
3985
|
+
const script = intlLocale.maximize().script;
|
|
3986
|
+
return script && listed(RTL_SCRIPTS, script) ? 'rtl' : 'ltr';
|
|
3987
|
+
}
|
|
3988
|
+
return listed(RTL_LANGUAGES, intlLocale.language) ? 'rtl' : 'ltr';
|
|
3989
|
+
}
|
|
3990
|
+
/**
|
|
3991
|
+
* The day a locale's week starts on, 0 for Sunday, as `getWeekInfo()` reads
|
|
3992
|
+
* it: the tag's `-u-fw-` keyword, else the region its `-u-rg-` keyword names,
|
|
3993
|
+
* else its own region or the one `maximize()` fills in, looked up in CLDR's
|
|
3994
|
+
* week data, where a region not listed starts on Monday.
|
|
3995
|
+
*
|
|
3996
|
+
* @param locale - A canonical tag, as `canonicalLocale` returns.
|
|
3997
|
+
*/
|
|
3998
|
+
function localeFirstDay(locale) {
|
|
3999
|
+
const fw = /-u(?:-[a-z0-9]{2,8})*?-fw-([a-z]{3})(?=-|$)/i.exec(locale);
|
|
4000
|
+
if (fw && fw[1].toLowerCase() in FW_DAYS)
|
|
4001
|
+
return FW_DAYS[fw[1].toLowerCase()];
|
|
4002
|
+
const rg = /-u(?:-[a-z0-9]{2,8})*?-rg-([a-z]{2})[a-z0-9]{1,4}(?=-|$)/i.exec(locale);
|
|
4003
|
+
const intlLocale = new Intl.Locale(locale);
|
|
4004
|
+
const region = rg
|
|
4005
|
+
? rg[1].toUpperCase()
|
|
4006
|
+
: typeof intlLocale.maximize === 'function'
|
|
4007
|
+
? intlLocale.maximize().region
|
|
4008
|
+
: intlLocale.region;
|
|
4009
|
+
if (region) {
|
|
4010
|
+
for (const [day, regions] of WEEK_STARTS) {
|
|
4011
|
+
if (listed(regions, region))
|
|
4012
|
+
return day;
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
return 1;
|
|
4016
|
+
}
|
|
4017
|
+
|
|
4018
|
+
const LocaleContext = React.createContext(null);
|
|
4019
|
+
/** The nearest provider's wrapper element, for `LocalePortalScope` to test targets against. */
|
|
4020
|
+
const LocaleElementContext = React.createContext(null);
|
|
4021
|
+
/** A tag in canonical form, or `undefined`, warning about one `Intl` refuses. */
|
|
4022
|
+
function validLocale(tag) {
|
|
4023
|
+
try {
|
|
4024
|
+
return canonicalLocale(tag);
|
|
4025
|
+
}
|
|
4026
|
+
catch {
|
|
4027
|
+
warnOnce(`locale-provider-invalid:${tag}`, `[bestax-bulma] <LocaleProvider locale="${tag}">: not a language ` +
|
|
4028
|
+
'tag Intl accepts, so it is ignored. Use a BCP 47 tag such as ' +
|
|
4029
|
+
'"en-US", with a hyphen rather than an underscore.');
|
|
4030
|
+
return undefined;
|
|
4031
|
+
}
|
|
4032
|
+
}
|
|
4033
|
+
/**
|
|
4034
|
+
* Sets the language and writing direction for the part of the app inside it, on a wrapper `<div>` and on what the library portals out of it.
|
|
4035
|
+
*
|
|
4036
|
+
* The wrapper carries `dir` and `lang`, so CSS and the components that read
|
|
4037
|
+
* the computed direction follow it, as they follow `<html dir>`. A `locale`
|
|
4038
|
+
* alone sets the direction of its script, and a `dir` sets the direction
|
|
4039
|
+
* whatever the locale. A nested provider keeps whatever it leaves unset.
|
|
4040
|
+
*
|
|
4041
|
+
* Inside it, the date and time pickers take its `locale` unless given their
|
|
4042
|
+
* own, and their week starts on the first day of the locale they use unless
|
|
4043
|
+
* `firstDayOfWeek` is set, and a picker with a `locale` of its own is read
|
|
4044
|
+
* like a nested provider. The library's portaled content, such as a
|
|
4045
|
+
* `Popover` panel, a `Modal` with `portal`, a `Toast` or a `Portal`'s
|
|
4046
|
+
* children, keeps the same `dir` and `lang` though it renders outside the
|
|
4047
|
+
* wrapper: in a container outside the wrapper, it sits in a
|
|
4048
|
+
* `display: contents` element that carries them. Without a provider none of
|
|
4049
|
+
* this changes.
|
|
4050
|
+
*
|
|
4051
|
+
* @function
|
|
4052
|
+
* @param {LocaleProviderProps} props - Props for the LocaleProvider.
|
|
4053
|
+
* @returns {JSX.Element} The wrapper, inside the context.
|
|
4054
|
+
*
|
|
4055
|
+
* @example
|
|
4056
|
+
* <LocaleProvider locale="ar-EG">
|
|
4057
|
+
* <App />
|
|
4058
|
+
* </LocaleProvider>
|
|
4059
|
+
*/
|
|
4060
|
+
const LocaleProvider = React.forwardRef(({ locale: localeProp, dir: dirProp, className, children, ...props }, ref) => {
|
|
4061
|
+
const outer = React.useContext(LocaleContext);
|
|
4062
|
+
const ownLocale = React.useMemo(() => validLocale(localeProp), [localeProp]);
|
|
4063
|
+
const ownLocaleDir = React.useMemo(() => (ownLocale ? localeDirection(ownLocale) : undefined), [ownLocale]);
|
|
4064
|
+
const locale = ownLocale || outer?.locale;
|
|
4065
|
+
const dir = dirProp || ownLocaleDir || outer?.dir;
|
|
4066
|
+
const value = React.useMemo(() => ({ locale, dir }), [locale, dir]);
|
|
4067
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
4068
|
+
// The wrapper, for portaled content to tell whether its target is inside
|
|
4069
|
+
// it, and the caller's ref. A callback ref's cleanup is held and run on
|
|
4070
|
+
// detach, as Toast and Modal do, since React 18 discards the return value.
|
|
4071
|
+
const elementRef = React.useRef(null);
|
|
4072
|
+
const consumerCleanupRef = React.useRef(null);
|
|
4073
|
+
const setElement = React.useCallback((node) => {
|
|
4074
|
+
elementRef.current = node;
|
|
4075
|
+
if (typeof ref === 'function') {
|
|
4076
|
+
if (node === null) {
|
|
4077
|
+
const consumerCleanup = consumerCleanupRef.current;
|
|
4078
|
+
consumerCleanupRef.current = null;
|
|
4079
|
+
if (consumerCleanup)
|
|
4080
|
+
consumerCleanup();
|
|
4081
|
+
else
|
|
4082
|
+
ref(null);
|
|
4083
|
+
return;
|
|
4084
|
+
}
|
|
4085
|
+
const cleanup = ref(node);
|
|
4086
|
+
consumerCleanupRef.current =
|
|
4087
|
+
typeof cleanup === 'function' ? cleanup : null;
|
|
4088
|
+
}
|
|
4089
|
+
else if (ref) {
|
|
4090
|
+
ref.current = node;
|
|
4091
|
+
}
|
|
4092
|
+
}, [ref]);
|
|
4093
|
+
return (jsxRuntime.jsx(LocaleContext.Provider, { value: value, children: jsxRuntime.jsx(LocaleElementContext.Provider, { value: elementRef, children: jsxRuntime.jsx("div", { ref: setElement, className: classNames(bulmaHelperClasses, className) || undefined, ...rest, dir: dir, lang: locale, children: children }) }) }));
|
|
4094
|
+
});
|
|
4095
|
+
LocaleProvider.displayName = 'LocaleProvider';
|
|
4096
|
+
/** What `useLocale` returns outside a provider, the same object each time. */
|
|
4097
|
+
const noLocale = {};
|
|
4098
|
+
/**
|
|
4099
|
+
* The locale and direction the nearest `LocaleProvider` sets, for an app's own `Intl` calls or its own portaled content; both are `undefined` outside one.
|
|
4100
|
+
*
|
|
4101
|
+
* It isn't the page's direction: with no provider, or one that sets no
|
|
4102
|
+
* direction, the page's `<html dir>` still decides. To act on the direction
|
|
4103
|
+
* an element is laid out in, read `getComputedStyle(element).direction`, as
|
|
4104
|
+
* the library's components do.
|
|
4105
|
+
*
|
|
4106
|
+
* @function
|
|
4107
|
+
* @returns {LocaleContextValue} The nearest provider's `locale` and `dir`.
|
|
4108
|
+
*
|
|
4109
|
+
* @example
|
|
4110
|
+
* const { locale } = useLocale();
|
|
4111
|
+
* const price = new Intl.NumberFormat(locale, {
|
|
4112
|
+
* style: 'currency',
|
|
4113
|
+
* currency: 'EUR',
|
|
4114
|
+
* }).format(12.5);
|
|
4115
|
+
*/
|
|
4116
|
+
function useLocale() {
|
|
4117
|
+
return React.useContext(LocaleContext) ?? noLocale;
|
|
4118
|
+
}
|
|
4119
|
+
/**
|
|
4120
|
+
* INTERNAL, deliberately not exported from `src/index.ts`. The nearest
|
|
4121
|
+
* provider's settings, or `null` outside any provider, so a caller can tell
|
|
4122
|
+
* "no provider" from "a provider that sets nothing".
|
|
4123
|
+
*/
|
|
4124
|
+
function useLocaleScope() {
|
|
4125
|
+
return React.useContext(LocaleContext);
|
|
4126
|
+
}
|
|
4127
|
+
const displayContents = { display: 'contents' };
|
|
4128
|
+
/**
|
|
4129
|
+
* INTERNAL, deliberately not exported from `src/index.ts`. Keeps the `dir`
|
|
4130
|
+
* and `lang` of the nearest provider, or the `scope` given in their place,
|
|
4131
|
+
* on content the library portals into `target`, which has left the
|
|
4132
|
+
* provider's wrapper behind.
|
|
4133
|
+
*
|
|
4134
|
+
* A target inside the provider's own wrapper gets the content as it is: it
|
|
4135
|
+
* inherits from the wrapper, and follows it when the provider changes.
|
|
4136
|
+
* Content that must be its container's direct child, a `<tr>` portaled into
|
|
4137
|
+
* a `<tbody>` there, stays one. Any other target, `document.body` included,
|
|
4138
|
+
* gets the content inside a `display: contents` element carrying the
|
|
4139
|
+
* values, which adds no box. So does content with a `scope` of its own, a
|
|
4140
|
+
* picker's panel, since the provider's values aren't its own.
|
|
4141
|
+
*
|
|
4142
|
+
* Which of the two is decided once, when the content mounts, and kept while
|
|
4143
|
+
* it stays: switching between them would put a different element in its
|
|
4144
|
+
* place and remount everything inside, losing typed text, focus and timers.
|
|
4145
|
+
* A change of locale or direction updates the wrapper's attributes instead.
|
|
4146
|
+
* A target is never left bare because something else, such as `<html>`,
|
|
4147
|
+
* happens to carry the same values, since that can stop being true without
|
|
4148
|
+
* the content remounting. Outside a provider it renders the children alone,
|
|
4149
|
+
* so nothing changes there.
|
|
4150
|
+
*/
|
|
4151
|
+
function LocalePortalScope({ children, target, scope, }) {
|
|
4152
|
+
const provider = React.useContext(LocaleContext);
|
|
4153
|
+
const element = React.useContext(LocaleElementContext);
|
|
4154
|
+
const [wrap] = React.useState(() => scope !== undefined || !element?.current?.contains(target));
|
|
4155
|
+
if (!provider || !wrap)
|
|
4156
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
4157
|
+
const values = scope ?? provider;
|
|
4158
|
+
return (jsxRuntime.jsx("div", { dir: values.dir, lang: values.locale, style: displayContents, children: children }));
|
|
4159
|
+
}
|
|
4160
|
+
|
|
3912
4161
|
/**
|
|
3913
4162
|
* Resolves a portal target: an `HTMLElement` is used directly, a non-empty
|
|
3914
4163
|
* `string` is treated as a `document.querySelector` selector (falling back to
|
|
@@ -3970,6 +4219,17 @@ function usePortalContainer() {
|
|
|
3970
4219
|
* also reaches what the library's components portal, such as Popover's
|
|
3971
4220
|
* `appendToBody` panel or a `Modal` with `portal`.
|
|
3972
4221
|
*
|
|
4222
|
+
* Inside a `LocaleProvider`, the children keep its `dir` and `lang`. A
|
|
4223
|
+
* container inside the provider's own wrapper takes the children as they
|
|
4224
|
+
* are, and they follow the provider through the page. Any other,
|
|
4225
|
+
* `document.body` included, gets them inside one `<div>` carrying the
|
|
4226
|
+
* provider's values, with `display: contents` so it adds no box. It is
|
|
4227
|
+
* still an element, so content that must be the container's direct child,
|
|
4228
|
+
* a `<tr>` in a `<tbody>`, or that a direct-child selector styles, belongs
|
|
4229
|
+
* in a container inside the provider. Which of the two is settled when the
|
|
4230
|
+
* children mount, so a change of locale updates them in place rather than
|
|
4231
|
+
* remounting them.
|
|
4232
|
+
*
|
|
3973
4233
|
* Tab order and focus follow the DOM too. Content portaled from inside a
|
|
3974
4234
|
* focus trap is no longer inside the trapped element, so the trap neither
|
|
3975
4235
|
* reaches it nor holds focus there: render nested overlays inside the
|
|
@@ -3999,7 +4259,8 @@ function Portal({ children, container, disabled = false }) {
|
|
|
3999
4259
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
4000
4260
|
if (!hydrated)
|
|
4001
4261
|
return null;
|
|
4002
|
-
|
|
4262
|
+
const target = resolveContainer(container);
|
|
4263
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, children: children }), target);
|
|
4003
4264
|
}
|
|
4004
4265
|
|
|
4005
4266
|
// INTERNAL: deliberately not exported from src/index.ts.
|
|
@@ -4911,7 +5172,7 @@ const ModalRoot = React.forwardRef(function ModalRoot({ active, isActive, onClos
|
|
|
4911
5172
|
modalElement = (jsxRuntime.jsx(ModalCloseContext.Provider, { value: onClose, children: modalElement }));
|
|
4912
5173
|
if (isPortaled) {
|
|
4913
5174
|
const target = resolveContainer(typeof portal === 'boolean' ? undefined : portal);
|
|
4914
|
-
return reactDom.createPortal(modalElement, target);
|
|
5175
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, children: modalElement }), target);
|
|
4915
5176
|
}
|
|
4916
5177
|
return modalElement;
|
|
4917
5178
|
});
|
|
@@ -8786,7 +9047,8 @@ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left',
|
|
|
8786
9047
|
}
|
|
8787
9048
|
// Render to portal for proper stacking
|
|
8788
9049
|
if (typeof document !== 'undefined') {
|
|
8789
|
-
|
|
9050
|
+
const target = resolveContainer();
|
|
9051
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, children: sidebarContent }), target);
|
|
8790
9052
|
}
|
|
8791
9053
|
return null;
|
|
8792
9054
|
});
|
|
@@ -9051,7 +9313,8 @@ const Toast = React.forwardRef(({ message, type = 'default', actionType, positio
|
|
|
9051
9313
|
}
|
|
9052
9314
|
const toastContent = jsxRuntime.jsx("div", { className: containerClasses, children: toastElement });
|
|
9053
9315
|
if (typeof document !== 'undefined') {
|
|
9054
|
-
|
|
9316
|
+
const target = resolveContainer(container);
|
|
9317
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, children: toastContent }), target);
|
|
9055
9318
|
}
|
|
9056
9319
|
return null;
|
|
9057
9320
|
});
|
|
@@ -9213,10 +9476,11 @@ const ToastContainer = ({ position = 'top-right' }) => {
|
|
|
9213
9476
|
return null;
|
|
9214
9477
|
}
|
|
9215
9478
|
const stacks = groupIntoPositionStacks(toastList, t => t.props.position, position, toastStackOrder);
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9479
|
+
const target = resolveContainer();
|
|
9480
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, children: stacks.map(stack => (jsxRuntime.jsx("div", { className: `toast-container is-${stack.position}`, children: stack.items.map(t => {
|
|
9481
|
+
const { queue: _queue, ...toastProps } = t.props;
|
|
9482
|
+
return (jsxRuntime.jsx(Toast, { ...toastProps, position: stack.position, onClose: () => toast.close(t.id) }, t.id));
|
|
9483
|
+
}) }, stack.key))) }), target);
|
|
9220
9484
|
};
|
|
9221
9485
|
|
|
9222
9486
|
/**
|
|
@@ -10566,6 +10830,22 @@ const useInsideControl = () => React.useContext(ControlContext);
|
|
|
10566
10830
|
const FieldProvider = FieldContext.Provider;
|
|
10567
10831
|
/** Provider for Control context — used internally by Control component. */
|
|
10568
10832
|
const ControlProvider = ControlContext.Provider;
|
|
10833
|
+
const FieldsetDisabledContext = React.createContext(false);
|
|
10834
|
+
/**
|
|
10835
|
+
* An input's `disabled`: its own prop when the caller set one, otherwise
|
|
10836
|
+
* whether a disabled `Fieldset` holds it. A `<fieldset disabled>` disables the
|
|
10837
|
+
* native controls inside on its own, and this carries the same state to what
|
|
10838
|
+
* the browser doesn't reach, such as Rate's stars, the time wheels, and the
|
|
10839
|
+
* `is-disabled` classes. The content of a Fieldset's legend reads the state
|
|
10840
|
+
* from outside that Fieldset, as the browser leaves the first legend's
|
|
10841
|
+
* controls enabled. Internal; not part of the public API.
|
|
10842
|
+
*/
|
|
10843
|
+
const useFieldsetDisabled = (disabled) => {
|
|
10844
|
+
const inherited = React.useContext(FieldsetDisabledContext);
|
|
10845
|
+
return disabled ?? inherited;
|
|
10846
|
+
};
|
|
10847
|
+
/** Provider for a Fieldset's disabled state, used internally by Fieldset. */
|
|
10848
|
+
const FieldsetDisabledProvider = FieldsetDisabledContext.Provider;
|
|
10569
10849
|
// Each Field-shaping prop, with what takes its place on a `Field` the caller
|
|
10570
10850
|
// wraps around the `Control`. `message` needs nothing there, because the
|
|
10571
10851
|
// wrapper still renders it inside `Field > Control`. The other Field-level
|
|
@@ -10847,7 +11127,8 @@ const checkboxSizes = ['small', 'normal', 'medium', 'large'];
|
|
|
10847
11127
|
* <Checkbox value="vue">Vue</Checkbox>
|
|
10848
11128
|
* </Checkboxes>
|
|
10849
11129
|
*/
|
|
10850
|
-
const Checkbox = React.forwardRef(({ color, size, className, children, textColor, disabled, name, value, checked, defaultChecked, indeterminate, onChange, ...props }, ref) => {
|
|
11130
|
+
const Checkbox = React.forwardRef(({ color, size, className, children, textColor, disabled: disabledProp, name, value, checked, defaultChecked, indeterminate, onChange, ...props }, ref) => {
|
|
11131
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
10851
11132
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
10852
11133
|
color: textColor,
|
|
10853
11134
|
...props,
|
|
@@ -12082,7 +12363,8 @@ const Field = withSubComponents(FieldComponent, {
|
|
|
12082
12363
|
* @returns {JSX.Element} The rendered input element.
|
|
12083
12364
|
* @see {@link https://bulma.io/documentation/form/input/ | Bulma Input documentation}
|
|
12084
12365
|
*/
|
|
12085
|
-
const InputBase = React.forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, className, disabled, readOnly, ...props }, ref) => {
|
|
12366
|
+
const InputBase = React.forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, className, disabled: disabledProp, readOnly, ...props }, ref) => {
|
|
12367
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
12086
12368
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
12087
12369
|
color,
|
|
12088
12370
|
...props,
|
|
@@ -13740,7 +14022,8 @@ const NotificationContainer = ({ position = 'top-right' }) => {
|
|
|
13740
14022
|
return null;
|
|
13741
14023
|
}
|
|
13742
14024
|
const stacks = groupIntoPositionStacks(items, item => item.options.position, position, notificationStackOrder);
|
|
13743
|
-
|
|
14025
|
+
const target = resolveContainer();
|
|
14026
|
+
return reactDom.createPortal(jsxRuntime.jsxs(LocalePortalScope, { target: target, children: [stacks.map(stack => (jsxRuntime.jsx("div", { style: notificationStackStyle(stack.position), children: stack.items.map(item => (jsxRuntime.jsx(NotificationItem, { instance: item, onClose: notification.close, registerMessage: registerMessage }, item.id))) }, stack.key))), jsxRuntime.jsx(StatusRegion, { items: politeItems, describe: describe })] }), target);
|
|
13744
14027
|
};
|
|
13745
14028
|
|
|
13746
14029
|
/**
|
|
@@ -14349,7 +14632,8 @@ const checkboxCardColors = [
|
|
|
14349
14632
|
* <CheckboxCard value="domain" title="Custom domain" description="Bring your own." />
|
|
14350
14633
|
* </Checkboxes>
|
|
14351
14634
|
*/
|
|
14352
|
-
const CheckboxCard = React.forwardRef(({ title, description, children, hasIndicator = true, color, className, textColor, disabled, name, value, checked, defaultChecked, indeterminate, onChange, ...props }, ref) => {
|
|
14635
|
+
const CheckboxCard = React.forwardRef(({ title, description, children, hasIndicator = true, color, className, textColor, disabled: disabledProp, name, value, checked, defaultChecked, indeterminate, onChange, ...props }, ref) => {
|
|
14636
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
14353
14637
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
14354
14638
|
color: textColor,
|
|
14355
14639
|
...props,
|
|
@@ -14544,6 +14828,61 @@ const CheckboxesComponent = ({ label, labelSize, labelProps, horizontal, message
|
|
|
14544
14828
|
};
|
|
14545
14829
|
const Checkboxes = withSubComponents(CheckboxesComponent, { Checkbox }, 'Checkboxes');
|
|
14546
14830
|
|
|
14831
|
+
// What an unlabeled Field passes on: no label names anything inside.
|
|
14832
|
+
const NO_LABEL = {};
|
|
14833
|
+
/**
|
|
14834
|
+
* The `Fieldset` component groups a section of a form in a native
|
|
14835
|
+
* `<fieldset>`, named by its `legend`, which a `disabled` switches off as a
|
|
14836
|
+
* whole.
|
|
14837
|
+
*
|
|
14838
|
+
* It starts its own Field scope: inside it, nothing reads as inside a
|
|
14839
|
+
* `Field` or `Control`, so the convenience inputs render their own `Field`,
|
|
14840
|
+
* and a labeled `Field` around the Fieldset names nothing in it.
|
|
14841
|
+
*
|
|
14842
|
+
* @function
|
|
14843
|
+
* @param {FieldsetProps} props - Props for the Fieldset component.
|
|
14844
|
+
* @returns {JSX.Element} The rendered fieldset.
|
|
14845
|
+
*
|
|
14846
|
+
* @example
|
|
14847
|
+
* <Fieldset legend="Shipping address" message="We only ship within the EU.">
|
|
14848
|
+
* <Input label="Street" name="street" />
|
|
14849
|
+
* <Input label="City" name="city" />
|
|
14850
|
+
* </Fieldset>
|
|
14851
|
+
*
|
|
14852
|
+
* @example
|
|
14853
|
+
* // A form that's saving
|
|
14854
|
+
* <Fieldset disabled={saving} variant="unstyled">
|
|
14855
|
+
* <Input label="Name" name="name" />
|
|
14856
|
+
* <Rate label="Rating" name="rating" />
|
|
14857
|
+
* </Fieldset>
|
|
14858
|
+
*/
|
|
14859
|
+
const Fieldset = React.forwardRef(({ legend, legendProps, variant = 'default', disabled, message, messageColor, textColor, bgColor, className, children, 'aria-describedby': ariaDescribedBy, ...props }, ref) => {
|
|
14860
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
14861
|
+
color: textColor,
|
|
14862
|
+
backgroundColor: bgColor,
|
|
14863
|
+
...props,
|
|
14864
|
+
});
|
|
14865
|
+
const mainClass = usePrefixedClassNames('fieldset', {
|
|
14866
|
+
'is-filled': variant === 'filled',
|
|
14867
|
+
'is-unstyled': variant === 'unstyled',
|
|
14868
|
+
});
|
|
14869
|
+
const legendClass = usePrefixedClassNames('fieldset-legend');
|
|
14870
|
+
const helpClass = usePrefixedClassNames('help', {
|
|
14871
|
+
[`is-${messageColor}`]: !!messageColor,
|
|
14872
|
+
});
|
|
14873
|
+
// The legend's controls take the state from outside, as the browser
|
|
14874
|
+
// leaves the first legend's controls enabled, and the content takes this
|
|
14875
|
+
// Fieldset's on top of it, as a disabled one disables those inside it.
|
|
14876
|
+
const outerDisabled = useFieldsetDisabled(undefined);
|
|
14877
|
+
const groupDisabled = !!disabled || outerDisabled;
|
|
14878
|
+
const messageId = `${React.useId()}-message`;
|
|
14879
|
+
const describedBy = [ariaDescribedBy, message ? messageId : undefined]
|
|
14880
|
+
.filter(Boolean)
|
|
14881
|
+
.join(' ') || undefined;
|
|
14882
|
+
return (jsxRuntime.jsx(FieldProvider, { value: false, children: jsxRuntime.jsx(ControlProvider, { value: false, children: jsxRuntime.jsx(FieldLabelIdProvider, { value: undefined, children: jsxRuntime.jsx(FieldLabelElementIdProvider, { value: undefined, children: jsxRuntime.jsx(FieldLabelForProvider, { value: NO_LABEL, children: jsxRuntime.jsx(FieldLabelForReportProvider, { value: undefined, children: jsxRuntime.jsxs("fieldset", { ref: ref, className: classNames(mainClass, bulmaHelperClasses, className), disabled: disabled, "aria-describedby": describedBy, ...rest, children: [legend ? (jsxRuntime.jsx("legend", { ...legendProps, className: classNames(legendClass, legendProps?.className), children: legend })) : null, jsxRuntime.jsx(FieldsetDisabledProvider, { value: groupDisabled, children: children }), message ? (jsxRuntime.jsx("p", { id: messageId, className: helpClass, children: message })) : null] }) }) }) }) }) }) }));
|
|
14883
|
+
});
|
|
14884
|
+
Fieldset.displayName = 'Fieldset';
|
|
14885
|
+
|
|
14547
14886
|
/**
|
|
14548
14887
|
* The `File` component provides a Bulma-styled file input, supporting color, size, boxed/fullwidth/align styles, icons, "has name", and filename display.
|
|
14549
14888
|
*
|
|
@@ -14704,7 +15043,8 @@ const radioSizes = ['small', 'normal', 'medium', 'large'];
|
|
|
14704
15043
|
* <Radio value="blue">Blue</Radio>
|
|
14705
15044
|
* </Radios>
|
|
14706
15045
|
*/
|
|
14707
|
-
const Radio = React.forwardRef(({ color, size, className, children, textColor, disabled, name, value, checked, defaultChecked, onChange, ...props }, ref) => {
|
|
15046
|
+
const Radio = React.forwardRef(({ color, size, className, children, textColor, disabled: disabledProp, name, value, checked, defaultChecked, onChange, ...props }, ref) => {
|
|
15047
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
14708
15048
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
14709
15049
|
color: textColor,
|
|
14710
15050
|
...props,
|
|
@@ -14774,7 +15114,8 @@ const radioCardColors = [
|
|
|
14774
15114
|
* <RadioCard value="express" title="Express" description="Arrives tomorrow." />
|
|
14775
15115
|
* </Radios>
|
|
14776
15116
|
*/
|
|
14777
|
-
const RadioCard = React.forwardRef(({ title, description, children, hasIndicator = true, color, className, textColor, disabled, name, value, checked, defaultChecked, onChange, ...props }, ref) => {
|
|
15117
|
+
const RadioCard = React.forwardRef(({ title, description, children, hasIndicator = true, color, className, textColor, disabled: disabledProp, name, value, checked, defaultChecked, onChange, ...props }, ref) => {
|
|
15118
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
14778
15119
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
14779
15120
|
color: textColor,
|
|
14780
15121
|
...props,
|
|
@@ -14973,7 +15314,8 @@ const switchSizes = ['small', 'normal', 'medium', 'large'];
|
|
|
14973
15314
|
* Feature enabled
|
|
14974
15315
|
* </Switch>
|
|
14975
15316
|
*/
|
|
14976
|
-
const Switch = React.forwardRef(({ color, size, isRounded, isThin, isOutlined, isRtl, passiveType, className, children, textColor, disabled, ...props }, ref) => {
|
|
15317
|
+
const Switch = React.forwardRef(({ color, size, isRounded, isThin, isOutlined, isRtl, passiveType, className, children, textColor, disabled: disabledProp, ...props }, ref) => {
|
|
15318
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
14977
15319
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
14978
15320
|
color: textColor,
|
|
14979
15321
|
...props,
|
|
@@ -15075,10 +15417,11 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
15075
15417
|
}
|
|
15076
15418
|
// Destructure base / shared props from a `SliderBaseProps` view. None of
|
|
15077
15419
|
// these fields differ between the two branches, so this view is safe.
|
|
15078
|
-
const { label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, min = 0, max = 100, step = 1, size, color, isRounded = false, isCircle = false, disabled
|
|
15420
|
+
const { label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, min = 0, max = 100, step = 1, size, color, isRounded = false, isCircle = false, disabled: disabledProp, showOutput = false, tooltip, ticks, marks, orientation = 'horizontal', scale, getAriaValueText, formatOutput, className,
|
|
15079
15421
|
// Strip the discriminated/union fields from `restProps` so they don't
|
|
15080
15422
|
// flow back into `useBulmaClasses` / spread onto inputs.
|
|
15081
15423
|
range: _range, value: _value, defaultValue: _defaultValue, onChange: _onChange, ariaLabel: _ariaLabel, minDistance: _minDistance, nameLow: _nameLow, nameHigh: _nameHigh, ...restProps } = props;
|
|
15424
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
15082
15425
|
const insideField = useInsideField();
|
|
15083
15426
|
const insideControl = useInsideControl();
|
|
15084
15427
|
const ownField = rendersOwnField('Slider', {
|
|
@@ -15498,7 +15841,8 @@ const ArrowDropDown = () => (jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill:
|
|
|
15498
15841
|
*/
|
|
15499
15842
|
const Numberinput = React.forwardRef(({
|
|
15500
15843
|
// Field props
|
|
15501
|
-
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue, min, max, step = 1, size, color, inputColor, controlsPosition = 'both', controlsRounded = false, compact = false, bare, variant = 'plusminus', disabled
|
|
15844
|
+
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue, min, max, step = 1, size, color, inputColor, controlsPosition = 'both', controlsRounded = false, compact = false, bare, variant = 'plusminus', disabled: disabledProp, editable = true, isLoading = false, exponential = false, onChange, className, ...props }, ref) => {
|
|
15845
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
15502
15846
|
const insideField = useInsideField();
|
|
15503
15847
|
// Bare controls join their parent's row, which a `.control` does not lay
|
|
15504
15848
|
// out. `useInsideControl()` is true anywhere below a `Control`, even past
|
|
@@ -15708,7 +16052,8 @@ const toAsciiDigits = (text) => text.replace(/\p{Nd}/gu, digit => {
|
|
|
15708
16052
|
*/
|
|
15709
16053
|
const PinInput = React.forwardRef(({
|
|
15710
16054
|
// Field props
|
|
15711
|
-
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, length = 6, value: controlledValue, defaultValue = '', type = 'number', isMasked = false, color, size, isRounded = false, disabled
|
|
16055
|
+
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, length = 6, value: controlledValue, defaultValue = '', type = 'number', isMasked = false, color, size, isRounded = false, disabled: disabledProp, onChange, onComplete, onPaste, onFocus, onBlur, className, ...props }, ref) => {
|
|
16056
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
15712
16057
|
const insideField = useInsideField();
|
|
15713
16058
|
const insideControl = useInsideControl();
|
|
15714
16059
|
const ownField = rendersOwnField('PinInput', {
|
|
@@ -15891,7 +16236,8 @@ function getFillPercent(iconIndex, value) {
|
|
|
15891
16236
|
* // With Font Awesome icons
|
|
15892
16237
|
* <Rate iconName="star" iconLibrary="fa" iconVariant="solid" />
|
|
15893
16238
|
*/
|
|
15894
|
-
const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue = 0, max = 5, size, disabled
|
|
16239
|
+
const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue = 0, max = 5, size, disabled: disabledProp, showScore = false, showText = false, texts, onChange, customIcon, spaced = false, rtl = false, iconName, iconLibrary: iconLibraryProp, iconVariant, iconFeatures, color, precision = 1, customText, name, form, className, ...props }, ref) => {
|
|
16240
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
15895
16241
|
const insideField = useInsideField();
|
|
15896
16242
|
const insideControl = useInsideControl();
|
|
15897
16243
|
const ownField = rendersOwnField('Rate', {
|
|
@@ -16161,7 +16507,7 @@ const isEnabled = (item) => typeof item === 'string' || !item.disabled;
|
|
|
16161
16507
|
* onSelect={(item) => console.log(item)}
|
|
16162
16508
|
* />
|
|
16163
16509
|
*/
|
|
16164
|
-
const Autocomplete = React.forwardRef(({ data = [], value: controlledValue, placeholder, field = 'label', clearable = false, openOnFocus = false, keepFirst = false, keepOpen = false, selectOnClickOutside = false, maxHeight = 200, loading = false, disabled
|
|
16510
|
+
const Autocomplete = React.forwardRef(({ data = [], value: controlledValue, placeholder, field = 'label', clearable = false, openOnFocus = false, keepFirst = false, keepOpen = false, selectOnClickOutside = false, maxHeight = 200, loading = false, disabled: disabledProp, checkInfiniteScroll = false, infiniteScrollDistance = 50, color, size, onInput, onSelect, onActiveChange, onInfiniteScroll, itemTemplate, header, footer, empty, name, form, required, id,
|
|
16165
16511
|
// Deprecated no-ops, taken here so they stay off the wrapper.
|
|
16166
16512
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- deprecated no-op
|
|
16167
16513
|
selected,
|
|
@@ -16169,6 +16515,7 @@ selected,
|
|
|
16169
16515
|
dropdown,
|
|
16170
16516
|
// Field props
|
|
16171
16517
|
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, className, ...props }, ref) => {
|
|
16518
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
16172
16519
|
const insideField = useInsideField();
|
|
16173
16520
|
// The suggestion list points `aria-labelledby` at the label that names
|
|
16174
16521
|
// the input, so it needs that label's id.
|
|
@@ -16891,7 +17238,8 @@ const asList = (value) => value == null ? [] : Array.isArray(value) ? value : [v
|
|
|
16891
17238
|
const ComboboxFromData = React.forwardRef((props, ref) => {
|
|
16892
17239
|
const { data, value, defaultValue,
|
|
16893
17240
|
// Called below through `props`, which knows which value it takes.
|
|
16894
|
-
onChange: _onChange, multiple = false, placeholder, name, empty, itemTemplate, onSelect, onOpenChange, inline = false, disabled
|
|
17241
|
+
onChange: _onChange, multiple = false, placeholder, name, empty, itemTemplate, onSelect, onOpenChange, inline = false, disabled: disabledProp, required = false, form, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ariaCloseLabel, children, ...rest } = props;
|
|
17242
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
16895
17243
|
// A name given in place of a label is the field's and the list's, not
|
|
16896
17244
|
// the wrapper's. Only the ones given are passed, since an
|
|
16897
17245
|
// `aria-labelledby` that's there at all, even undefined, keeps the
|
|
@@ -17086,7 +17434,8 @@ const isComposing = (e) => e.nativeEvent.isComposing || e.nativeEvent.keyCode ==
|
|
|
17086
17434
|
*/
|
|
17087
17435
|
const Taginput = React.forwardRef(({
|
|
17088
17436
|
// Field props
|
|
17089
|
-
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue = [], data: dataProp, placeholder, field = 'label', allowNew = true, allowDuplicates = false, openOnFocus = false, removeOnKeys = true, confirmKeys = ['Enter', ','], closable = true, attached = false, maxTags, maxlength, disabled
|
|
17437
|
+
label, labelSize, labelProps, horizontal, message, messageColor, fieldClassName, value: controlledValue, defaultValue = [], data: dataProp, placeholder, field = 'label', allowNew = true, allowDuplicates = false, openOnFocus = false, removeOnKeys = true, confirmKeys = ['Enter', ','], closable = true, attached = false, maxTags, maxlength, disabled: disabledProp, readonly = false, rounded = false, ellipsis = false, hasCounter = true, onPasteSeparators = [','], beforeAdding, createTag, keepFirst = false, keepOpen = true, loading = false, ariaCloseLabel, icon, iconLibrary: iconLibraryProp, iconVariant, iconFeatures, color, tagColor, size, onChange, onAdd, onRemove, onTyping, tagTemplate, name, form, id, className, ...props }, ref) => {
|
|
17438
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
17090
17439
|
const insideField = useInsideField();
|
|
17091
17440
|
const insideControl = useInsideControl();
|
|
17092
17441
|
const ownField = rendersOwnField('Taginput', {
|
|
@@ -17457,7 +17806,8 @@ const TagInput = Taginput;
|
|
|
17457
17806
|
* @returns {JSX.Element} The rendered select element.
|
|
17458
17807
|
* @see {@link https://bulma.io/documentation/form/select/ | Bulma Select documentation}
|
|
17459
17808
|
*/
|
|
17460
|
-
const SelectBase = React.forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, isFullWidth, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
|
|
17809
|
+
const SelectBase = React.forwardRef(({ color, size, isRounded, isLoading, isActive, isHovered, isFocused, isFullwidth, isFullWidth, className, disabled: disabledProp, children, multiple, multipleSize, ...props }, ref) => {
|
|
17810
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
17461
17811
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
17462
17812
|
color,
|
|
17463
17813
|
...props,
|
|
@@ -17504,7 +17854,8 @@ SelectBase.displayName = 'SelectBase';
|
|
|
17504
17854
|
* @returns {JSX.Element} The rendered textarea element.
|
|
17505
17855
|
* @see {@link https://bulma.io/documentation/form/textarea/ | Bulma Textarea documentation}
|
|
17506
17856
|
*/
|
|
17507
|
-
const TextAreaBase = React.forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading: _isLoading, isActive, hasFixedSize, className, disabled, readOnly, rows, ...props }, ref) => {
|
|
17857
|
+
const TextAreaBase = React.forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading: _isLoading, isActive, hasFixedSize, className, disabled: disabledProp, readOnly, rows, ...props }, ref) => {
|
|
17858
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
17508
17859
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
17509
17860
|
color,
|
|
17510
17861
|
...props,
|
|
@@ -19051,7 +19402,7 @@ const Calendar = ({ value, focusedDate, onSelect, onFocusedDateChange, min: minP
|
|
|
19051
19402
|
Calendar.displayName = 'Calendar';
|
|
19052
19403
|
|
|
19053
19404
|
const isBrowser = typeof window !== 'undefined';
|
|
19054
|
-
const PickerPopover = ({ isOpen, onClose, anchorRef, children, position = 'bottom-left', appendToBody = false, className, trapFocus = true, closeOnClickOutside = true, closeOnEscape = true, ariaLabel, ariaLabelledBy, role = 'dialog', id, restoreFocusRef, initialFocusSelector, }) => {
|
|
19405
|
+
const PickerPopover = ({ isOpen, onClose, anchorRef, children, position = 'bottom-left', appendToBody = false, className, trapFocus = true, closeOnClickOutside = true, closeOnEscape = true, ariaLabel, ariaLabelledBy, role = 'dialog', id, restoreFocusRef, initialFocusSelector, localeScope, }) => {
|
|
19055
19406
|
const panelRef = React.useRef(null);
|
|
19056
19407
|
const resolveContainer = usePortalContainer();
|
|
19057
19408
|
// Read as the trap turns on, once the panel's content has rendered.
|
|
@@ -19149,7 +19500,8 @@ const PickerPopover = ({ isOpen, onClose, anchorRef, children, position = 'botto
|
|
|
19149
19500
|
e.preventDefault();
|
|
19150
19501
|
}, children: children }));
|
|
19151
19502
|
if (appendToBody && isBrowser) {
|
|
19152
|
-
|
|
19503
|
+
const target = resolveContainer();
|
|
19504
|
+
return reactDom.createPortal(jsxRuntime.jsx(LocalePortalScope, { target: target, scope: localeScope, children: panel }), target);
|
|
19153
19505
|
}
|
|
19154
19506
|
return panel;
|
|
19155
19507
|
};
|
|
@@ -19951,6 +20303,79 @@ function supportsInputType(type) {
|
|
|
19951
20303
|
return supported;
|
|
19952
20304
|
}
|
|
19953
20305
|
|
|
20306
|
+
/**
|
|
20307
|
+
* A picker's locale: its own `locale`, else the one a `LocaleProvider` around
|
|
20308
|
+
* it sets, else `undefined`, which leaves `Intl` to use the runtime's.
|
|
20309
|
+
*/
|
|
20310
|
+
function usePickerLocale(own) {
|
|
20311
|
+
const scope = useLocaleScope();
|
|
20312
|
+
return own || scope?.locale;
|
|
20313
|
+
}
|
|
20314
|
+
const NO_ROOT_ATTRS = {};
|
|
20315
|
+
/**
|
|
20316
|
+
* A picker's language and direction inside a `LocaleProvider`, by the rule a
|
|
20317
|
+
* nested provider follows: its `lang` is its own `locale`, else the
|
|
20318
|
+
* provider's, and its `dir` is the `dir` passed to it, else its own locale's
|
|
20319
|
+
* direction when it has one, else the provider's. Outside a provider it
|
|
20320
|
+
* changes nothing. A `locale` `Intl` refuses counts as none here, since the
|
|
20321
|
+
* picker's own formatting reports it.
|
|
20322
|
+
*/
|
|
20323
|
+
function usePickerLocaleScope(ownLocale, ownDir) {
|
|
20324
|
+
const scope = useLocaleScope();
|
|
20325
|
+
return React.useMemo(() => {
|
|
20326
|
+
if (!scope)
|
|
20327
|
+
return { rootAttrs: NO_ROOT_ATTRS };
|
|
20328
|
+
let own;
|
|
20329
|
+
try {
|
|
20330
|
+
own = canonicalLocale(ownLocale);
|
|
20331
|
+
}
|
|
20332
|
+
catch {
|
|
20333
|
+
own = undefined;
|
|
20334
|
+
}
|
|
20335
|
+
const dir = ownDir || (own ? localeDirection(own) : scope.dir);
|
|
20336
|
+
return {
|
|
20337
|
+
rootAttrs: own ? { lang: own, dir } : NO_ROOT_ATTRS,
|
|
20338
|
+
panel: { locale: own || scope.locale, dir },
|
|
20339
|
+
};
|
|
20340
|
+
}, [scope, ownLocale, ownDir]);
|
|
20341
|
+
}
|
|
20342
|
+
/**
|
|
20343
|
+
* Whether a picker's `dayNames` replace the calendar's own, which `Calendar`
|
|
20344
|
+
* does only for a full week of seven.
|
|
20345
|
+
*/
|
|
20346
|
+
function hasOwnDayNames(dayNames) {
|
|
20347
|
+
return dayNames !== undefined && dayNames.length === 7;
|
|
20348
|
+
}
|
|
20349
|
+
/**
|
|
20350
|
+
* The day a picker's week starts on: its own `firstDayOfWeek`, else, inside a
|
|
20351
|
+
* `LocaleProvider`, the first day of the locale the picker uses, else Sunday.
|
|
20352
|
+
* Outside a provider it stays Sunday whatever the locale, as it always has,
|
|
20353
|
+
* and so does a picker inside one with no locale from either, since the
|
|
20354
|
+
* runtime's own differs between the server and the browser.
|
|
20355
|
+
*
|
|
20356
|
+
* It also stays Sunday for a picker that brings its own `dayNames`. The
|
|
20357
|
+
* calendar shows those exactly as given, in calendar order, and before the
|
|
20358
|
+
* provider an unset `firstDayOfWeek` was always Sunday, so names written
|
|
20359
|
+
* Sunday first would sit a day or more off their columns if the week moved
|
|
20360
|
+
* under them.
|
|
20361
|
+
*/
|
|
20362
|
+
function usePickerFirstDayOfWeek(own, locale, hasDayNames) {
|
|
20363
|
+
const inProvider = useLocaleScope() !== null;
|
|
20364
|
+
return React.useMemo(() => {
|
|
20365
|
+
if (own !== undefined)
|
|
20366
|
+
return own;
|
|
20367
|
+
if (!inProvider || !locale || hasDayNames)
|
|
20368
|
+
return 0;
|
|
20369
|
+
try {
|
|
20370
|
+
return localeFirstDay(canonicalLocale(locale));
|
|
20371
|
+
}
|
|
20372
|
+
catch {
|
|
20373
|
+
// A tag Intl refuses: the picker's own formatting says so.
|
|
20374
|
+
return 0;
|
|
20375
|
+
}
|
|
20376
|
+
}, [own, inProvider, locale, hasDayNames]);
|
|
20377
|
+
}
|
|
20378
|
+
|
|
19954
20379
|
const DEFAULT_FORMATS = {
|
|
19955
20380
|
day: DEFAULT_DATE_FORMAT,
|
|
19956
20381
|
month: DEFAULT_MONTH_FORMAT,
|
|
@@ -19971,7 +20396,15 @@ const SKIPPED_SEGMENTS = {
|
|
|
19971
20396
|
* @returns {JSX.Element}
|
|
19972
20397
|
*/
|
|
19973
20398
|
const DateInputBase = React.forwardRef((props, ref) => {
|
|
19974
|
-
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled, readOnly, placeholder, granularity = 'day', format, parse, locale, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = true, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, firstDayOfWeek
|
|
20399
|
+
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled: disabledProp, readOnly, placeholder, granularity = 'day', format, parse, locale: localeProp, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = true, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, firstDayOfWeek: firstDayOfWeekProp, dayNames, monthNames, nearbyMonthDays = true, className, name, form, required, id: idProp, onFocus, onClick, onKeyDown, onBlur, iconLeftName: _iconLeftName, triggerIcon: triggerIconProp, triggerIconName = 'chevron-down', labels, ...rest } = props;
|
|
20400
|
+
// A LocaleProvider around the picker sets its default locale and, through
|
|
20401
|
+
// that locale, the day its week starts on.
|
|
20402
|
+
const locale = usePickerLocale(localeProp);
|
|
20403
|
+
// Its own language and direction, which its root and a portaled panel
|
|
20404
|
+
// carry inside a provider.
|
|
20405
|
+
const localeScope = usePickerLocaleScope(localeProp, props.dir);
|
|
20406
|
+
const firstDayOfWeek = usePickerFirstDayOfWeek(firstDayOfWeekProp, locale, hasOwnDayNames(dayNames));
|
|
20407
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
19975
20408
|
// Inside a labeled Field the input takes the id the label points at
|
|
19976
20409
|
// when the caller set none, as InputBase does, and the popover's ids
|
|
19977
20410
|
// follow it. Inline there is no input to name, so nothing takes the
|
|
@@ -20171,7 +20604,7 @@ const DateInputBase = React.forwardRef((props, ref) => {
|
|
|
20171
20604
|
// Native mobile path renders <input type="date"> (type="month" for a
|
|
20172
20605
|
// month picker).
|
|
20173
20606
|
if (useNative) {
|
|
20174
|
-
return (jsxRuntime.jsx("input", { ...cleanRest, ref: combinedRef, type: isDayGranularity ? 'date' : 'month', className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoValue(value, granularity) : '', onChange: e => {
|
|
20607
|
+
return (jsxRuntime.jsx("input", { ...localeScope.rootAttrs, ...cleanRest, ref: combinedRef, type: isDayGranularity ? 'date' : 'month', className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoValue(value, granularity) : '', onChange: e => {
|
|
20175
20608
|
const parsed = e.target.value
|
|
20176
20609
|
? fromIsoValue(e.target.value, granularity)
|
|
20177
20610
|
: null;
|
|
@@ -20191,12 +20624,12 @@ const DateInputBase = React.forwardRef((props, ref) => {
|
|
|
20191
20624
|
// keeps the id it released with.
|
|
20192
20625
|
id: inline ? popoverId : `${popoverId}-cal`, autoFocusCell: open, labels: labels }, granularity));
|
|
20193
20626
|
if (inline) {
|
|
20194
|
-
return (jsxRuntime.jsxs("div", { ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [calendar, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoValue(value, granularity) : '', required: required }))] }));
|
|
20627
|
+
return (jsxRuntime.jsxs("div", { ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [calendar, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoValue(value, granularity) : '', required: required }))] }));
|
|
20195
20628
|
}
|
|
20196
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
20629
|
+
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...localeScope.rootAttrs, ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
20197
20630
|
if (canOpen)
|
|
20198
20631
|
setOpen(!open);
|
|
20199
|
-
}, disabled: !canOpen, "aria-label": chooseLabel, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { isOpen: open, onClose: handlePopoverClose, anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: chooseLabel, id: popoverId, restoreFocusRef: inputRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: calendar }))] }));
|
|
20632
|
+
}, disabled: !canOpen, "aria-label": chooseLabel, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { localeScope: localeScope.panel, isOpen: open, onClose: handlePopoverClose, anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: chooseLabel, id: popoverId, restoreFocusRef: inputRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: calendar }))] }));
|
|
20200
20633
|
});
|
|
20201
20634
|
DateInputBase.displayName = 'DateInputBase';
|
|
20202
20635
|
|
|
@@ -21152,7 +21585,13 @@ const fromIsoTime = (s) => {
|
|
|
21152
21585
|
* @returns {JSX.Element}
|
|
21153
21586
|
*/
|
|
21154
21587
|
const TimeInputBase = React.forwardRef((props, ref) => {
|
|
21155
|
-
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled, readOnly, placeholder, format, parse, locale, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = false, position = 'bottom-left', appendToBody = false, color, size, isRounded, hourFormat = '24', enableSeconds = false, incrementHours = 1, incrementMinutes = 1, incrementSeconds = 1, unselectableTimes, className, name, form, required, id: idProp, onFocus, onClick, onKeyDown, onBlur, iconLeftName: _iconLeftName, triggerIcon: triggerIconProp, triggerIconName = 'chevron-down', labels, audioTick = false, haptics = false, ...rest } = props;
|
|
21588
|
+
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled: disabledProp, readOnly, placeholder, format, parse, locale: localeProp, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = false, position = 'bottom-left', appendToBody = false, color, size, isRounded, hourFormat = '24', enableSeconds = false, incrementHours = 1, incrementMinutes = 1, incrementSeconds = 1, unselectableTimes, className, name, form, required, id: idProp, onFocus, onClick, onKeyDown, onBlur, iconLeftName: _iconLeftName, triggerIcon: triggerIconProp, triggerIconName = 'chevron-down', labels, audioTick = false, haptics = false, ...rest } = props;
|
|
21589
|
+
// A LocaleProvider around the picker sets its default locale.
|
|
21590
|
+
const locale = usePickerLocale(localeProp);
|
|
21591
|
+
// Its own language and direction, which its root and a portaled panel
|
|
21592
|
+
// carry inside a provider.
|
|
21593
|
+
const localeScope = usePickerLocaleScope(localeProp, props.dir);
|
|
21594
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
21156
21595
|
// Inside a labeled Field the input takes the id the label points at
|
|
21157
21596
|
// when the caller set none, as InputBase does, and the popover's ids
|
|
21158
21597
|
// follow it. Inline there is no input to name, so nothing takes the
|
|
@@ -21320,7 +21759,7 @@ const TimeInputBase = React.forwardRef((props, ref) => {
|
|
|
21320
21759
|
const nativeStep = enableSeconds
|
|
21321
21760
|
? incrementSeconds
|
|
21322
21761
|
: incrementMinutes * 60;
|
|
21323
|
-
return (jsxRuntime.jsx("input", { ...cleanRest, ref: combinedRef, type: "time", step: nativeStep, className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoTime(value, enableSeconds) : '', onChange: e => {
|
|
21762
|
+
return (jsxRuntime.jsx("input", { ...localeScope.rootAttrs, ...cleanRest, ref: combinedRef, type: "time", step: nativeStep, className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoTime(value, enableSeconds) : '', onChange: e => {
|
|
21324
21763
|
const parsed = e.target.value ? fromIsoTime(e.target.value) : null;
|
|
21325
21764
|
commitValue(parsed);
|
|
21326
21765
|
}, min: min ? toIsoTime(min, enableSeconds) : undefined, max: max ? toIsoTime(max, enableSeconds) : undefined, disabled: disabled, readOnly: readOnly, placeholder: placeholder, name: name, form: form, required: required, id: id }));
|
|
@@ -21350,12 +21789,12 @@ const TimeInputBase = React.forwardRef((props, ref) => {
|
|
|
21350
21789
|
setOpen(false);
|
|
21351
21790
|
}, children: t.reset }), jsxRuntime.jsx("button", { type: "button", className: mobileFooterDoneClass, "aria-label": t.done, onClick: () => setOpen(false), children: jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "M5 11l4 4 8-8", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] }))] }));
|
|
21352
21791
|
if (inline) {
|
|
21353
|
-
return (jsxRuntime.jsxs("div", { ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoTime(value, enableSeconds) : '', required: required }))] }));
|
|
21792
|
+
return (jsxRuntime.jsxs("div", { ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoTime(value, enableSeconds) : '', required: required }))] }));
|
|
21354
21793
|
}
|
|
21355
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
21794
|
+
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...localeScope.rootAttrs, ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
21356
21795
|
if (canOpen)
|
|
21357
21796
|
setOpen(!open);
|
|
21358
|
-
}, disabled: !canOpen, "aria-label": t.chooseTime, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { isOpen: open, onClose: () => setOpen(false), anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseTime, id: popoverId, restoreFocusRef: inputRef, children: panel }))] }));
|
|
21797
|
+
}, disabled: !canOpen, "aria-label": t.chooseTime, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { localeScope: localeScope.panel, isOpen: open, onClose: () => setOpen(false), anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseTime, id: popoverId, restoreFocusRef: inputRef, children: panel }))] }));
|
|
21359
21798
|
});
|
|
21360
21799
|
TimeInputBase.displayName = 'TimeInputBase';
|
|
21361
21800
|
|
|
@@ -21467,9 +21906,17 @@ const fromIsoDateTime = (s) => {
|
|
|
21467
21906
|
* @returns {JSX.Element}
|
|
21468
21907
|
*/
|
|
21469
21908
|
const DateTimeInputBase = React.forwardRef((props, ref) => {
|
|
21470
|
-
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled, readOnly, placeholder, format, parse, locale, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = false, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, firstDayOfWeek
|
|
21909
|
+
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled: disabledProp, readOnly, placeholder, format, parse, locale: localeProp, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = false, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, firstDayOfWeek: firstDayOfWeekProp, dayNames, monthNames, nearbyMonthDays = true, hourFormat = '24', enableSeconds = false, incrementHours = 1,
|
|
21471
21910
|
// Step between visible wheel values; 1 gives the iOS-style every-minute wheel.
|
|
21472
21911
|
incrementMinutes = 1, incrementSeconds = 1, unselectableTimes, className, name, form, required, id: idProp, onFocus, onClick, onKeyDown, onBlur, iconLeftName: _iconLeftName, triggerIcon: triggerIconProp, triggerIconName = 'chevron-down', audioTick = false, haptics = false, labels, ...rest } = props;
|
|
21912
|
+
// A LocaleProvider around the picker sets its default locale and, through
|
|
21913
|
+
// that locale, the day its week starts on.
|
|
21914
|
+
const locale = usePickerLocale(localeProp);
|
|
21915
|
+
// Its own language and direction, which its root and a portaled panel
|
|
21916
|
+
// carry inside a provider.
|
|
21917
|
+
const localeScope = usePickerLocaleScope(localeProp, props.dir);
|
|
21918
|
+
const firstDayOfWeek = usePickerFirstDayOfWeek(firstDayOfWeekProp, locale, hasOwnDayNames(dayNames));
|
|
21919
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
21473
21920
|
// Inside a labeled Field the input takes the id the label points at
|
|
21474
21921
|
// when the caller set none, as InputBase does, and the popover's ids
|
|
21475
21922
|
// follow it. Inline there is no input to name, so nothing takes the
|
|
@@ -21709,7 +22156,7 @@ const DateTimeInputBase = React.forwardRef((props, ref) => {
|
|
|
21709
22156
|
}, [ref]);
|
|
21710
22157
|
if (useNative) {
|
|
21711
22158
|
const nativeStep = enableSeconds ? incrementSeconds : incrementMinutes * 60;
|
|
21712
|
-
return (jsxRuntime.jsx("input", { ...cleanRest, ref: combinedRef, type: "datetime-local", step: nativeStep, className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoDateTime(value, enableSeconds) : '', onChange: e => {
|
|
22159
|
+
return (jsxRuntime.jsx("input", { ...localeScope.rootAttrs, ...cleanRest, ref: combinedRef, type: "datetime-local", step: nativeStep, className: classNames(inputClass, bulmaHelperClasses, className), value: value ? toIsoDateTime(value, enableSeconds) : '', onChange: e => {
|
|
21713
22160
|
const parsed = e.target.value
|
|
21714
22161
|
? fromIsoDateTime(e.target.value)
|
|
21715
22162
|
: null;
|
|
@@ -21740,12 +22187,12 @@ const DateTimeInputBase = React.forwardRef((props, ref) => {
|
|
|
21740
22187
|
// is no popover, the wheels, as Escape does.
|
|
21741
22188
|
onCommit: () => (inline ? closeTime() : setOpen(false)) }) }) }))] }), jsxRuntime.jsxs("div", { className: footerClass, children: [jsxRuntime.jsxs("button", { ref: timeButtonRef, type: "button", className: footerTimeClass, onClick: () => (timeOpen ? closeTime() : setTimeOpen(true)), "aria-expanded": timeOpen, "aria-controls": timeOpen ? timeWheelsId : undefined, disabled: disabled, children: [jsxRuntime.jsx("span", { children: t.time }), jsxRuntime.jsx("span", { className: footerTimePillClass, children: value ? formatTime(value, timeDisplayFormat, locale) : '—' })] }), jsxRuntime.jsxs("div", { className: footerActionsClass, children: [jsxRuntime.jsx("button", { type: "button", className: footerResetClass, onClick: () => commitValue(valueAtOpenRef.current), children: t.reset }), jsxRuntime.jsx("button", { type: "button", className: footerDoneClass, "aria-label": t.done, onClick: () => setOpen(false), children: jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 22 22", "aria-hidden": "true", children: jsxRuntime.jsx("path", { d: "M5 11l4 4 8-8", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })] })] })] }));
|
|
21742
22189
|
if (inline) {
|
|
21743
|
-
return (jsxRuntime.jsxs("div", { ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoDateTime(value, enableSeconds) : '', required: required }))] }));
|
|
22190
|
+
return (jsxRuntime.jsxs("div", { ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), children: [panel, name && (jsxRuntime.jsx("input", { type: "hidden", name: name, form: form, value: value ? toIsoDateTime(value, enableSeconds) : '', required: required }))] }));
|
|
21744
22191
|
}
|
|
21745
|
-
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
22192
|
+
return (jsxRuntime.jsxs("div", { ref: containerRef, className: classNames(containerClass, bulmaHelperClasses, className), ...localeScope.rootAttrs, ...cleanRest, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "text", role: "combobox", "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": popoverId, autoComplete: "off", className: inputClass, value: text, placeholder: placeholder, disabled: disabled, readOnly: inputReadOnlyAttr, name: name, form: form, required: required, id: id, ...inputHandlers }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass, onClick: () => {
|
|
21746
22193
|
if (canOpen)
|
|
21747
22194
|
setOpen(!open);
|
|
21748
|
-
}, disabled: !canOpen, "aria-label": t.chooseDateTime, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { isOpen: open, onClose: () => setOpen(false), anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseDateTime, id: popoverId, restoreFocusRef: inputRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: panel }))] }));
|
|
22195
|
+
}, disabled: !canOpen, "aria-label": t.chooseDateTime, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { localeScope: localeScope.panel, isOpen: open, onClose: () => setOpen(false), anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseDateTime, id: popoverId, restoreFocusRef: inputRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: panel }))] }));
|
|
21749
22196
|
});
|
|
21750
22197
|
DateTimeInputBase.displayName = 'DateTimeInputBase';
|
|
21751
22198
|
|
|
@@ -21844,7 +22291,15 @@ const today = () => startOfDay(new Date());
|
|
|
21844
22291
|
* @returns {JSX.Element}
|
|
21845
22292
|
*/
|
|
21846
22293
|
const DateRangeInputBase = React.forwardRef((props, ref) => {
|
|
21847
|
-
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled, readOnly, placeholder, format, parse, locale, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = true, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, allowDisabledInRange = false, firstDayOfWeek
|
|
22294
|
+
const { value: controlledValue, defaultValue, onChange, onOpen, onClose, min, max, disabled: disabledProp, readOnly, placeholder, format, parse, locale: localeProp, inline = false, mobileNative = 'auto', editable = true, popover = true, openOnFocus = true, closeOnSelect = true, position = 'bottom-left', appendToBody = false, color, size, isRounded, shouldDisableDate, unselectableDates, allowDisabledInRange = false, firstDayOfWeek: firstDayOfWeekProp, dayNames, monthNames, nearbyMonthDays = true, iconLeftName: _iconLeftName, triggerIcon: triggerIconProp, triggerIconName = 'chevron-down', labels, name, startName, endName, form, required, id, className, onFocus, onFocusCapture, ...rest } = props;
|
|
22295
|
+
// A LocaleProvider around the picker sets its default locale and, through
|
|
22296
|
+
// that locale, the day its week starts on.
|
|
22297
|
+
const locale = usePickerLocale(localeProp);
|
|
22298
|
+
// Its own language and direction, which its root and a portaled panel
|
|
22299
|
+
// carry inside a provider.
|
|
22300
|
+
const localeScope = usePickerLocaleScope(localeProp, props.dir);
|
|
22301
|
+
const firstDayOfWeek = usePickerFirstDayOfWeek(firstDayOfWeekProp, locale, hasOwnDayNames(dayNames));
|
|
22302
|
+
const disabled = useFieldsetDisabled(disabledProp);
|
|
21848
22303
|
// The launcher gives way to the loading spinner of a Control this sits in.
|
|
21849
22304
|
const controlLoading = useControlLoading();
|
|
21850
22305
|
const triggerIcon = triggerIconProp ?? !controlLoading;
|
|
@@ -22075,14 +22530,14 @@ const DateRangeInputBase = React.forwardRef((props, ref) => {
|
|
|
22075
22530
|
};
|
|
22076
22531
|
const minIso = min ? isoDay(lowerBound) : undefined;
|
|
22077
22532
|
const maxIso = max ? isoDay(max) : undefined;
|
|
22078
|
-
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: onFocus, onFocusCapture: onFocusCapture, children: [jsxRuntime.jsxs("div", { className: fieldClass, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "date", id: id, "aria-label": t.rangeStart, className: inputClass, value: isoDay(start), onChange: nativeChange(commitStart, isBlockedDay), min: minIso, max: maxIso, disabled: disabled, readOnly: readOnly, required: required }), separator, jsxRuntime.jsx("input", { ref: endRef, type: "date", id: id ? `${id}-end` : undefined, "aria-label": t.rangeEnd, className: inputClass, value: isoDay(end), onChange: nativeChange(commitEnd, isBlockedEnd), min: start ? isoDay(start) : minIso, max: maxIso, disabled: disabled, readOnly: readOnly, required: required })] }), hiddenInputs] }));
|
|
22533
|
+
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: onFocus, onFocusCapture: onFocusCapture, children: [jsxRuntime.jsxs("div", { className: fieldClass, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "date", id: id, "aria-label": t.rangeStart, className: inputClass, value: isoDay(start), onChange: nativeChange(commitStart, isBlockedDay), min: minIso, max: maxIso, disabled: disabled, readOnly: readOnly, required: required }), separator, jsxRuntime.jsx("input", { ref: endRef, type: "date", id: id ? `${id}-end` : undefined, "aria-label": t.rangeEnd, className: inputClass, value: isoDay(end), onChange: nativeChange(commitEnd, isBlockedEnd), min: start ? isoDay(start) : minIso, max: maxIso, disabled: disabled, readOnly: readOnly, required: required })] }), hiddenInputs] }));
|
|
22079
22534
|
}
|
|
22080
22535
|
const calendar = (jsxRuntime.jsx(Calendar, { range: range, onRangeSelect: handleRangeSelect, allowDisabledInRange: allowDisabledInRange, focusedDate: focusedDate, onFocusedDateChange: setFocusedDate, min: min, max: max, shouldDisableDate: shouldDisableDate, unselectableDates: unselectableDates, firstDayOfWeek: firstDayOfWeek, locale: locale, dayNames: dayNames, monthNames: monthNames, nearbyMonthDays: nearbyMonthDays, color: color, size: size,
|
|
22081
22536
|
// The popover panel takes `popoverId`, so the calendar inside it takes
|
|
22082
22537
|
// one of its own. Inline there is no panel.
|
|
22083
22538
|
id: inline ? popoverId : `${popoverId}-cal`, autoFocusCell: open, labels: labels }));
|
|
22084
22539
|
if (inline) {
|
|
22085
|
-
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: onFocus, onFocusCapture: onFocusCapture, children: [calendar, hiddenInputs] }));
|
|
22540
|
+
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: onFocus, onFocusCapture: onFocusCapture, children: [calendar, hiddenInputs] }));
|
|
22086
22541
|
}
|
|
22087
22542
|
const canOpen = !!popover && !disabled && !readOnly;
|
|
22088
22543
|
const inputReadOnly = !!readOnly || !editable;
|
|
@@ -22117,9 +22572,9 @@ const DateRangeInputBase = React.forwardRef((props, ref) => {
|
|
|
22117
22572
|
readOnly: inputReadOnly,
|
|
22118
22573
|
required,
|
|
22119
22574
|
};
|
|
22120
|
-
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: handleFocus, onFocusCapture: handleFocusCapture, children: [jsxRuntime.jsxs("div", { className: fieldClass, onMouseDown: handleFieldMouseDown, children: [jsxRuntime.jsx("input", { ...comboboxProps, ref: combinedRef, id: id, "aria-label": t.rangeStart, value: startText, ...startHandlers }), separator, jsxRuntime.jsx("input", { ...comboboxProps, ref: endRef, id: id ? `${id}-end` : undefined, "aria-label": t.rangeEnd, value: endText, ...endHandlers })] }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass,
|
|
22575
|
+
return (jsxRuntime.jsxs("div", { "aria-labelledby": ariaLabelledBy, ...localeScope.rootAttrs, ...cleanRest, ref: containerRef, role: "group", className: classNames(containerClass, bulmaHelperClasses, className), onFocus: handleFocus, onFocusCapture: handleFocusCapture, children: [jsxRuntime.jsxs("div", { className: fieldClass, onMouseDown: handleFieldMouseDown, children: [jsxRuntime.jsx("input", { ...comboboxProps, ref: combinedRef, id: id, "aria-label": t.rangeStart, value: startText, ...startHandlers }), separator, jsxRuntime.jsx("input", { ...comboboxProps, ref: endRef, id: id ? `${id}-end` : undefined, "aria-label": t.rangeEnd, value: endText, ...endHandlers })] }), popover && triggerIcon && (jsxRuntime.jsx("button", { type: "button", className: triggerClass,
|
|
22121
22576
|
// Disabled whenever the popover can't open, so a click can.
|
|
22122
|
-
onClick: () => setOpen(!open), disabled: !canOpen, "aria-label": t.chooseDateRange, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { isOpen: open, onClose: handlePopoverClose, anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseDateRange, id: popoverId, restoreFocusRef: restoreFocusRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: calendar })), hiddenInputs] }));
|
|
22577
|
+
onClick: () => setOpen(!open), disabled: !canOpen, "aria-label": t.chooseDateRange, "aria-haspopup": "dialog", "aria-controls": popoverId, "aria-expanded": open, tabIndex: canOpen ? 0 : -1, children: jsxRuntime.jsx(Icon, { name: triggerIconName, size: size }) })), popover && (jsxRuntime.jsx(PickerPopover, { localeScope: localeScope.panel, isOpen: open, onClose: handlePopoverClose, anchorRef: containerRef, position: position, appendToBody: appendToBody, ariaLabel: t.chooseDateRange, id: popoverId, restoreFocusRef: restoreFocusRef, initialFocusSelector: CALENDAR_FOCUSED_CELL, children: calendar })), hiddenInputs] }));
|
|
22123
22578
|
});
|
|
22124
22579
|
DateRangeInputBase.displayName = 'DateRangeInputBase';
|
|
22125
22580
|
|
|
@@ -24369,6 +24824,7 @@ exports.EmptyStateTitle = EmptyStateTitle;
|
|
|
24369
24824
|
exports.Field = Field;
|
|
24370
24825
|
exports.FieldBody = FieldBody;
|
|
24371
24826
|
exports.FieldLabel = FieldLabel;
|
|
24827
|
+
exports.Fieldset = Fieldset;
|
|
24372
24828
|
exports.Figure = Figure;
|
|
24373
24829
|
exports.File = File;
|
|
24374
24830
|
exports.Footer = Footer;
|
|
@@ -24394,6 +24850,7 @@ exports.LinkButton = LinkButton;
|
|
|
24394
24850
|
exports.ListItem = ListItem;
|
|
24395
24851
|
exports.Loader = Loader;
|
|
24396
24852
|
exports.Loading = Loading;
|
|
24853
|
+
exports.LocaleProvider = LocaleProvider;
|
|
24397
24854
|
exports.Media = Media;
|
|
24398
24855
|
exports.MediaContent = MediaContent;
|
|
24399
24856
|
exports.MediaLeft = MediaLeft;
|
|
@@ -24524,6 +24981,7 @@ exports.useIconLibrary = useIconLibrary;
|
|
|
24524
24981
|
exports.useInsideControl = useInsideControl;
|
|
24525
24982
|
exports.useInsideField = useInsideField;
|
|
24526
24983
|
exports.useIsHydrated = useIsHydrated;
|
|
24984
|
+
exports.useLocale = useLocale;
|
|
24527
24985
|
exports.useOtherClasses = useOtherClasses;
|
|
24528
24986
|
exports.usePrefixedClass = usePrefixedClass;
|
|
24529
24987
|
exports.usePrefixedClassNames = usePrefixedClassNames;
|