@lobehub/ui 6.0.0-beta.8 → 6.0.0-beta.9
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/es/Accordion/style.d.mts +1 -1
- package/es/DatePicker/DatePicker.d.mts +5 -3
- package/es/DatePicker/DatePicker.mjs +7 -5
- package/es/DatePicker/DatePicker.mjs.map +1 -1
- package/es/DatePicker/DateRangePicker.d.mts +1 -1
- package/es/DatePicker/DayjsDatePicker.d.mts +12 -0
- package/es/DatePicker/DayjsDatePicker.mjs +19 -0
- package/es/DatePicker/DayjsDatePicker.mjs.map +1 -0
- package/es/DatePicker/DayjsDateRangePicker.d.mts +7 -0
- package/es/DatePicker/DayjsDateRangePicker.mjs +8 -0
- package/es/DatePicker/DayjsDateRangePicker.mjs.map +1 -0
- package/es/DatePicker/RangePicker.mjs +7 -1
- package/es/DatePicker/RangePicker.mjs.map +1 -1
- package/es/DatePicker/SinglePicker.mjs +3 -1
- package/es/DatePicker/SinglePicker.mjs.map +1 -1
- package/es/DatePicker/dateGenerateConfig.mjs +52 -0
- package/es/DatePicker/dateGenerateConfig.mjs.map +1 -0
- package/es/DatePicker/index.d.mts +4 -2
- package/es/DatePicker/index.mjs +3 -1
- package/es/DatePicker/legacyDate.mjs +58 -0
- package/es/DatePicker/legacyDate.mjs.map +1 -0
- package/es/DatePicker/type.d.mts +60 -34
- package/es/DatePicker/usePresetActive.mjs +1 -0
- package/es/DatePicker/usePresetActive.mjs.map +1 -1
- package/es/ProTable/parts/FieldControl.mjs +4 -4
- package/es/ProTable/parts/FieldControl.mjs.map +1 -1
- package/es/Tabs/style.d.mts +1 -1
- package/es/index.d.mts +4 -2
- package/es/index.mjs +3 -1
- package/package.json +1 -1
package/es/Accordion/style.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { DatePickerType } from "./type.mjs";
|
|
2
2
|
//#region src/DatePicker/DatePicker.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* DatePicker over
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* DatePicker over native `Date` — the previous lobe DatePicker API: values, `onChange`
|
|
5
|
+
* and `disabledDate` use `Date`, a cleared range is `[null, null]`; inputs may also be
|
|
6
|
+
* `Dayjs`, date strings or timestamps. Statics as in antd: `DatePicker.RangePicker`,
|
|
7
|
+
* `WeekPicker`, `MonthPicker`, `YearPicker`, `QuarterPicker`, `TimePicker`, the pure panels
|
|
8
|
+
* and `generatePicker`. For the antd `Dayjs` API use `DayjsDatePicker`.
|
|
7
9
|
*/
|
|
8
10
|
declare const DatePicker: DatePickerType;
|
|
9
11
|
//#endregion
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import dateGenerateConfig from "./dateGenerateConfig.mjs";
|
|
3
3
|
import generatePicker from "./generatePicker.mjs";
|
|
4
4
|
import genPurePanel from "./PurePanel.mjs";
|
|
5
5
|
//#region src/DatePicker/DatePicker.tsx
|
|
6
6
|
/**
|
|
7
|
-
* DatePicker over
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* DatePicker over native `Date` — the previous lobe DatePicker API: values, `onChange`
|
|
8
|
+
* and `disabledDate` use `Date`, a cleared range is `[null, null]`; inputs may also be
|
|
9
|
+
* `Dayjs`, date strings or timestamps. Statics as in antd: `DatePicker.RangePicker`,
|
|
10
|
+
* `WeekPicker`, `MonthPicker`, `YearPicker`, `QuarterPicker`, `TimePicker`, the pure panels
|
|
11
|
+
* and `generatePicker`. For the antd `Dayjs` API use `DayjsDatePicker`.
|
|
10
12
|
*/
|
|
11
|
-
const DatePicker = generatePicker(
|
|
13
|
+
const DatePicker = generatePicker(dateGenerateConfig);
|
|
12
14
|
DatePicker._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(DatePicker);
|
|
13
15
|
DatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = genPurePanel(DatePicker.RangePicker);
|
|
14
16
|
DatePicker.generatePicker = generatePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.mjs","names":[
|
|
1
|
+
{"version":3,"file":"DatePicker.mjs","names":[],"sources":["../../src/DatePicker/DatePicker.tsx"],"sourcesContent":["'use client';\n\nimport dateGenerateConfig from './dateGenerateConfig';\nimport generatePicker from './generatePicker';\nimport genPurePanel from './PurePanel';\nimport type { DatePickerType } from './type';\n\n/**\n * DatePicker over native `Date` — the previous lobe DatePicker API: values, `onChange`\n * and `disabledDate` use `Date`, a cleared range is `[null, null]`; inputs may also be\n * `Dayjs`, date strings or timestamps. Statics as in antd: `DatePicker.RangePicker`,\n * `WeekPicker`, `MonthPicker`, `YearPicker`, `QuarterPicker`, `TimePicker`, the pure panels\n * and `generatePicker`. For the antd `Dayjs` API use `DayjsDatePicker`.\n */\nconst DatePicker = generatePicker(dateGenerateConfig) as DatePickerType;\n\nDatePicker._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(DatePicker);\nDatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = genPurePanel(DatePicker.RangePicker);\nDatePicker.generatePicker = generatePicker;\n\nexport default DatePicker;\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,aAAa,eAAe,kBAAkB;AAEpD,WAAW,yCAAyC,aAAa,UAAU;AAC3E,WAAW,8CAA8C,aAAa,WAAW,WAAW;AAC5F,WAAW,iBAAiB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RangePickerComponent } from "./type.mjs";
|
|
2
2
|
//#region src/DatePicker/DateRangePicker.d.ts
|
|
3
3
|
/** `DatePicker.RangePicker`, kept as a standalone export. */
|
|
4
|
-
declare const DateRangePicker: RangePickerComponent<
|
|
4
|
+
declare const DateRangePicker: RangePickerComponent<Date>;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { DateRangePicker as default };
|
|
7
7
|
//# sourceMappingURL=DateRangePicker.d.mts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DayjsDatePickerType } from "./type.mjs";
|
|
2
|
+
//#region src/DatePicker/DayjsDatePicker.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* antd-aligned DatePicker over `Dayjs` (values, callbacks and `disabledDate` are `Dayjs`),
|
|
5
|
+
* with antd's statics: `RangePicker`, `WeekPicker`, `MonthPicker`, `YearPicker`,
|
|
6
|
+
* `QuarterPicker`, `TimePicker`, the debug-only pure panels and `generatePicker`.
|
|
7
|
+
* The default `DatePicker` export works with native `Date` (the previous lobe API).
|
|
8
|
+
*/
|
|
9
|
+
declare const DayjsDatePicker: DayjsDatePickerType;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { DayjsDatePicker as default };
|
|
12
|
+
//# sourceMappingURL=DayjsDatePicker.d.mts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import generateConfig from "./generateConfig.mjs";
|
|
3
|
+
import generatePicker from "./generatePicker.mjs";
|
|
4
|
+
import genPurePanel from "./PurePanel.mjs";
|
|
5
|
+
//#region src/DatePicker/DayjsDatePicker.tsx
|
|
6
|
+
/**
|
|
7
|
+
* antd-aligned DatePicker over `Dayjs` (values, callbacks and `disabledDate` are `Dayjs`),
|
|
8
|
+
* with antd's statics: `RangePicker`, `WeekPicker`, `MonthPicker`, `YearPicker`,
|
|
9
|
+
* `QuarterPicker`, `TimePicker`, the debug-only pure panels and `generatePicker`.
|
|
10
|
+
* The default `DatePicker` export works with native `Date` (the previous lobe API).
|
|
11
|
+
*/
|
|
12
|
+
const DayjsDatePicker = generatePicker(generateConfig);
|
|
13
|
+
DayjsDatePicker._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(DayjsDatePicker);
|
|
14
|
+
DayjsDatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = genPurePanel(DayjsDatePicker.RangePicker);
|
|
15
|
+
DayjsDatePicker.generatePicker = generatePicker;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { DayjsDatePicker as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=DayjsDatePicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DayjsDatePicker.mjs","names":["dayjsGenerateConfig"],"sources":["../../src/DatePicker/DayjsDatePicker.tsx"],"sourcesContent":["'use client';\n\nimport dayjsGenerateConfig from './generateConfig';\nimport generatePicker from './generatePicker';\nimport genPurePanel from './PurePanel';\nimport type { DayjsDatePickerType } from './type';\n\n/**\n * antd-aligned DatePicker over `Dayjs` (values, callbacks and `disabledDate` are `Dayjs`),\n * with antd's statics: `RangePicker`, `WeekPicker`, `MonthPicker`, `YearPicker`,\n * `QuarterPicker`, `TimePicker`, the debug-only pure panels and `generatePicker`.\n * The default `DatePicker` export works with native `Date` (the previous lobe API).\n */\nconst DayjsDatePicker = generatePicker(dayjsGenerateConfig) as DayjsDatePickerType;\n\nDayjsDatePicker._InternalPanelDoNotUseOrYouWillBeFired = genPurePanel(DayjsDatePicker);\nDayjsDatePicker._InternalRangePanelDoNotUseOrYouWillBeFired = genPurePanel(\n DayjsDatePicker.RangePicker,\n);\nDayjsDatePicker.generatePicker = generatePicker;\n\nexport default DayjsDatePicker;\n"],"mappings":";;;;;;;;;;;AAaA,MAAM,kBAAkB,eAAeA,cAAmB;AAE1D,gBAAgB,yCAAyC,aAAa,eAAe;AACrF,gBAAgB,8CAA8C,aAC5D,gBAAgB,WAClB;AACA,gBAAgB,iBAAiB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RangePickerComponent } from "./type.mjs";
|
|
2
|
+
//#region src/DatePicker/DayjsDateRangePicker.d.ts
|
|
3
|
+
/** `DayjsDatePicker.RangePicker` (values are `Dayjs`), kept as a standalone export. */
|
|
4
|
+
declare const DayjsDateRangePicker: RangePickerComponent<import("dayjs").Dayjs>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { DayjsDateRangePicker as default };
|
|
7
|
+
//# sourceMappingURL=DayjsDateRangePicker.d.mts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import DayjsDatePicker from "./DayjsDatePicker.mjs";
|
|
2
|
+
//#region src/DatePicker/DayjsDateRangePicker.tsx
|
|
3
|
+
/** `DayjsDatePicker.RangePicker` (values are `Dayjs`), kept as a standalone export. */
|
|
4
|
+
const DayjsDateRangePicker = DayjsDatePicker.RangePicker;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { DayjsDateRangePicker as default };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=DayjsDateRangePicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DayjsDateRangePicker.mjs","names":[],"sources":["../../src/DatePicker/DayjsDateRangePicker.tsx"],"sourcesContent":["import DayjsDatePicker from './DayjsDatePicker';\n\n/** `DayjsDatePicker.RangePicker` (values are `Dayjs`), kept as a standalone export. */\nconst DayjsDateRangePicker = DayjsDatePicker.RangePicker;\n\nexport default DayjsDateRangePicker;\n"],"mappings":";;;AAGA,MAAM,uBAAuB,gBAAgB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import Icon from "../Icon/Icon.mjs";
|
|
3
3
|
import RefRangePicker from "./core/PickerInput/RangePicker.mjs";
|
|
4
|
+
import { isNativeDateConfig, normalizeLegacyDateProps } from "./legacyDate.mjs";
|
|
4
5
|
import { usePickerLocale } from "./locale.mjs";
|
|
5
6
|
import { usePanelKeyboard } from "./usePanelKeyboard.mjs";
|
|
6
7
|
import { usePickerShared } from "./usePickerShared.mjs";
|
|
@@ -10,7 +11,12 @@ import clsx$1 from "clsx";
|
|
|
10
11
|
import { ArrowRight } from "lucide-react";
|
|
11
12
|
//#region src/DatePicker/RangePicker.tsx
|
|
12
13
|
const generateRangePicker = (generateConfig) => {
|
|
13
|
-
const RangePicker = (
|
|
14
|
+
const RangePicker = (rawProps) => {
|
|
15
|
+
const normalized = normalizeLegacyDateProps(rawProps, generateConfig);
|
|
16
|
+
const props = isNativeDateConfig(generateConfig) && normalized.onChange ? {
|
|
17
|
+
...normalized,
|
|
18
|
+
onChange: (dates, dateStrings) => normalized.onChange(dates ?? [null, null], dateStrings ?? ["", ""])
|
|
19
|
+
} : normalized;
|
|
14
20
|
const { allowClear, allowEmpty, cellRender, changeOnBlur, className, clearIcon, classNames, components, dateRender, defaultOpen, defaultPickerValue, defaultValue, dropdownClassName, direction, disabled, disabledDate, getPopupContainer, id, locale: localeOverride, maxDate, minDate, mode, monthCellRender, needConfirm, nextIcon, onBlur, onKeyDown, onCalendarChange, onChange, onFocus, onOk, onOpenChange, onPanelChange, onPickerValueChange, open, order, picker = "date", pickerValue, placeholder, popupClassName, popupStyle, prevIcon, renderExtraFooter, rootClassName, separator, shadow, size, status, styles, suffixIcon, superNextIcon, superPrevIcon, value, variant, ...rest } = props;
|
|
15
21
|
const { locale, rangePlaceholder } = usePickerLocale(localeOverride);
|
|
16
22
|
const keyboard = usePanelKeyboard({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangePicker.mjs","names":["clsx","RcRangePicker"],"sources":["../../src/DatePicker/RangePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { ArrowRight } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport { RangePicker as RcRangePicker } from './core';\nimport type { GenerateConfig } from './core/generate';\nimport { usePickerLocale } from './locale';\nimport type { DateRangePickerProps, RangePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst generateRangePicker = <DateType extends object>(generateConfig: GenerateConfig<DateType>) => {\n const RangePicker = (
|
|
1
|
+
{"version":3,"file":"RangePicker.mjs","names":["clsx","RcRangePicker"],"sources":["../../src/DatePicker/RangePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { ArrowRight } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport { RangePicker as RcRangePicker } from './core';\nimport type { GenerateConfig } from './core/generate';\nimport { isNativeDateConfig, normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport type { DateRangePickerProps, RangePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst generateRangePicker = <DateType extends object>(generateConfig: GenerateConfig<DateType>) => {\n const RangePicker = (rawProps: DateRangePickerProps<DateType>) => {\n const normalized = normalizeLegacyDateProps(rawProps, generateConfig);\n // The default (native Date) picker keeps the previous lobe contract: a cleared range is\n // `[null, null]` with empty strings, never `null`.\n const props =\n isNativeDateConfig(generateConfig) && normalized.onChange\n ? {\n ...normalized,\n onChange: (dates: any, dateStrings: any) =>\n (normalized.onChange as any)(dates ?? [null, null], dateStrings ?? ['', '']),\n }\n : normalized;\n const {\n allowClear,\n allowEmpty,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n disabled,\n disabledDate,\n getPopupContainer,\n id,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n needConfirm,\n nextIcon,\n onBlur,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n order,\n picker = 'date',\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n renderExtraFooter,\n rootClassName,\n separator,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const { locale, rangePlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n range: true,\n value,\n });\n const shared = usePickerShared({\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive((rest as any).presets, value, defaultValue);\n\n return (\n <RcRangePicker<DateType>\n {...rest}\n {...shared}\n allowEmpty={allowEmpty}\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue as any}\n direction={direction}\n disabled={disabled}\n disabledDate={disabledDate}\n id={id}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n order={order}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? rangePlaceholder(picker)}\n presets={presetActive.presets as any}\n renderExtraFooter={renderExtraFooter}\n separator={separator ?? <Icon icon={ArrowRight} size={14} />}\n value={value as any}\n onBlur={onBlur as any}\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n RangePicker.displayName = 'RangePicker';\n return RangePicker as RangePickerComponent<DateType>;\n};\n\nexport default generateRangePicker;\n"],"mappings":";;;;;;;;;;;;AAgBA,MAAM,uBAAgD,mBAA6C;CACjG,MAAM,eAAe,aAA6C;EAChE,MAAM,aAAa,yBAAyB,UAAU,cAAc;EAGpE,MAAM,QACJ,mBAAmB,cAAc,KAAK,WAAW,WAC7C;GACE,GAAG;GACH,WAAW,OAAY,gBACpB,WAAW,SAAiB,SAAS,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC;EAC/E,IACA;EACN,MAAM,EACJ,YACA,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,UACA,cACA,mBACA,IACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,aACA,UACA,QACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,OACA,SAAS,QACT,aACA,aACA,gBACA,YACA,UACA,mBACA,eACA,WACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;EACJ,MAAM,EAAE,QAAQ,qBAAqB,gBAAgB,cAAc;EACnE,MAAM,WAAW,iBAAiB;GAChC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;EACF,CAAC;EACD,MAAM,SAAS,gBAAgB;GAC7B;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,cAAc,SAAS;GACvB;GACA;GACA;GACA;GACA;GACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;GAC1D,eAAe;GACf;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EAED,MAAM,eAAe,gBAAiB,KAAa,SAAS,OAAO,YAAY;EAE/E,OACE,oBAACC,gBAAD;GACE,GAAI;GACJ,GAAI;GACQ;GACZ,YAAY,SAAS;GACT;GACQ;GACN;GACH;GACD;GACI;GACV;GACJ,QAAQ,OAAO;GACT;GACW;GACV;GACC;GACR,aAAa,SAAS;GACtB,aAAa,eAAe,iBAAiB,MAAM;GACnD,SAAS,aAAa;GACH;GACnB,WAAW,aAAa,oBAAC,MAAD;IAAM,MAAM;IAAY,MAAM;GAAK,CAAA;GACpD;GACC;GACU;GAClB,SAAS,SAAS;GACZ;GACN,eAAe,SAAS;GACxB,qBAAqB,SAAS;GAC9B,WAAW,GAAG,SAAgB;IAC5B,aAAa,MAAM,KAAK,EAAE;IAC1B,SAAU,SAAiB,GAAG,IAAI;GACpC;EACD,CAAA;CAEL;CACA,YAAY,cAAc;CAC1B,OAAO;AACT"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import Icon from "../Icon/Icon.mjs";
|
|
3
3
|
import core_default from "./core/index.mjs";
|
|
4
|
+
import { normalizeLegacyDateProps } from "./legacyDate.mjs";
|
|
4
5
|
import { usePickerLocale } from "./locale.mjs";
|
|
5
6
|
import { PREFIX_CLS } from "./style.mjs";
|
|
6
7
|
import { usePanelKeyboard } from "./usePanelKeyboard.mjs";
|
|
@@ -17,7 +18,8 @@ const defaultRemoveIcon = /* @__PURE__ */ jsx(Icon, {
|
|
|
17
18
|
});
|
|
18
19
|
const generateSinglePicker = (generateConfig) => {
|
|
19
20
|
const getPicker = (presetPicker, displayName = "DatePicker") => {
|
|
20
|
-
const Picker = (
|
|
21
|
+
const Picker = (rawProps) => {
|
|
22
|
+
const props = normalizeLegacyDateProps(rawProps, generateConfig);
|
|
21
23
|
const { allowClear, cellRender, changeOnBlur, className, clearIcon, classNames, components, dateRender, defaultOpen, defaultPickerValue, defaultValue, dropdownClassName, direction, getPopupContainer, locale: localeOverride, maxDate, minDate, mode, monthCellRender, multiple, needConfirm, nextIcon, onKeyDown, onCalendarChange, onChange, onFocus, onOk, onOpenChange, onPanelChange, onPickerValueChange, open, picker: pickerProp, pickerValue, placeholder, popupClassName, popupStyle, prevIcon, ref, removeIcon, renderExtraFooter, rootClassName, shadow, size, status, styles, suffixIcon, superNextIcon, superPrevIcon, value, variant, ...rest } = props;
|
|
22
24
|
const picker = presetPicker ?? pickerProp ?? "date";
|
|
23
25
|
const { locale, placeholder: defaultPlaceholder } = usePickerLocale(localeOverride);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SinglePicker.mjs","names":["clsx","RcPicker"],"sources":["../../src/DatePicker/SinglePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport RcPicker from './core';\nimport type { GenerateConfig } from './core/generate';\nimport type { PickerMode } from './core/interface';\nimport { usePickerLocale } from './locale';\nimport { PREFIX_CLS } from './style';\nimport type { GeneratedDatePicker, PickerProps, SinglePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared, withDefault } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst defaultRemoveIcon = <Icon icon={X} size={10} style={{ strokeWidth: 3 }} />;\n\nconst generateSinglePicker = <DateType extends object>(\n generateConfig: GenerateConfig<DateType>,\n) => {\n const getPicker = (presetPicker?: PickerMode, displayName = 'DatePicker') => {\n const Picker = (
|
|
1
|
+
{"version":3,"file":"SinglePicker.mjs","names":["clsx","RcPicker"],"sources":["../../src/DatePicker/SinglePicker.tsx"],"sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\n\nimport Icon from '@/Icon';\n\nimport RcPicker from './core';\nimport type { GenerateConfig } from './core/generate';\nimport type { PickerMode } from './core/interface';\nimport { normalizeLegacyDateProps } from './legacyDate';\nimport { usePickerLocale } from './locale';\nimport { PREFIX_CLS } from './style';\nimport type { GeneratedDatePicker, PickerProps, SinglePickerComponent } from './type';\nimport { usePanelKeyboard } from './usePanelKeyboard';\nimport { usePickerShared, withDefault } from './usePickerShared';\nimport { usePresetActive } from './usePresetActive';\n\nconst defaultRemoveIcon = <Icon icon={X} size={10} style={{ strokeWidth: 3 }} />;\n\nconst generateSinglePicker = <DateType extends object>(\n generateConfig: GenerateConfig<DateType>,\n) => {\n const getPicker = (presetPicker?: PickerMode, displayName = 'DatePicker') => {\n const Picker = (rawProps: PickerProps<DateType, any>) => {\n const props = normalizeLegacyDateProps(rawProps, generateConfig);\n const {\n allowClear,\n cellRender,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n dropdownClassName,\n direction,\n getPopupContainer,\n locale: localeOverride,\n maxDate,\n minDate,\n mode,\n monthCellRender,\n multiple,\n needConfirm,\n nextIcon,\n onKeyDown,\n onCalendarChange,\n onChange,\n onFocus,\n onOk,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker: pickerProp,\n pickerValue,\n placeholder,\n popupClassName,\n popupStyle,\n prevIcon,\n ref,\n removeIcon,\n renderExtraFooter,\n rootClassName,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n value,\n variant,\n ...rest\n } = props;\n const picker = presetPicker ?? pickerProp ?? 'date';\n const { locale, placeholder: defaultPlaceholder } = usePickerLocale(localeOverride);\n const keyboard = usePanelKeyboard({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker,\n pickerValue,\n value,\n });\n const shared = usePickerShared({\n allowClear,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig,\n getPopupContainer,\n maxDate,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange: keyboard.onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName: clsx(keyboard.scopeClassName, rootClassName),\n semanticProps: props,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n variant,\n });\n\n const presetActive = usePresetActive(\n (rest as any).presets,\n multiple ? undefined : value,\n multiple ? undefined : defaultValue,\n );\n\n return (\n <RcPicker<DateType>\n {...rest}\n {...shared}\n presets={presetActive.presets as any}\n // No footer row by default: Today / Now only when asked for (showNow or the\n // deprecated showToday); showTime + needConfirm still shows OK.\n cellRender={keyboard.cellRender}\n dateRender={dateRender}\n defaultPickerValue={defaultPickerValue as any}\n defaultValue={defaultValue ?? undefined}\n direction={direction}\n locale={locale.lang}\n mode={mode as any}\n monthCellRender={monthCellRender}\n multiple={multiple}\n picker={picker}\n pickerValue={keyboard.pickerValue}\n placeholder={placeholder ?? defaultPlaceholder(picker)}\n ref={ref}\n removeIcon={withDefault(removeIcon, defaultRemoveIcon)}\n renderExtraFooter={renderExtraFooter}\n showNow={(rest as any).showNow ?? (rest as any).showToday ?? false}\n value={value as any}\n classNames={\n multiple\n ? {\n ...shared.classNames,\n popup: {\n ...shared.classNames.popup,\n root: clsx(shared.classNames.popup.root, `${PREFIX_CLS}-dropdown-multiple`),\n },\n }\n : shared.classNames\n }\n onCalendarChange={onCalendarChange as any}\n onFocus={keyboard.onFocus}\n onOk={onOk as any}\n onPanelChange={keyboard.onPanelChange}\n onPickerValueChange={keyboard.onPickerValueChange}\n onChange={(...args: any[]) => {\n presetActive.track(args[0]);\n (keyboard.onChange as any)(...args);\n }}\n />\n );\n };\n Picker.displayName = displayName;\n return Picker as SinglePickerComponent<DateType, any>;\n };\n\n return {\n DatePicker: getPicker() as GeneratedDatePicker<DateType>,\n MonthPicker: getPicker('month', 'MonthPicker'),\n QuarterPicker: getPicker('quarter', 'QuarterPicker'),\n TimePicker: getPicker('time', 'TimePicker'),\n WeekPicker: getPicker('week', 'WeekPicker'),\n YearPicker: getPicker('year', 'YearPicker'),\n };\n};\n\nexport default generateSinglePicker;\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,oBAAoB,oBAAC,MAAD;CAAM,MAAM;CAAG,MAAM;CAAI,OAAO,EAAE,aAAa,EAAE;AAAI,CAAA;AAE/E,MAAM,wBACJ,mBACG;CACH,MAAM,aAAa,cAA2B,cAAc,iBAAiB;EAC3E,MAAM,UAAU,aAAyC;GACvD,MAAM,QAAQ,yBAAyB,UAAU,cAAc;GAC/D,MAAM,EACJ,YACA,YACA,cACA,WACA,WACA,YACA,YACA,YACA,aACA,oBACA,cACA,mBACA,WACA,mBACA,QAAQ,gBACR,SACA,SACA,MACA,iBACA,UACA,aACA,UACA,WACA,kBACA,UACA,SACA,MACA,cACA,eACA,qBACA,MACA,QAAQ,YACR,aACA,aACA,gBACA,YACA,UACA,KACA,YACA,mBACA,eACA,QACA,MACA,QACA,QACA,YACA,eACA,eACA,OACA,SACA,GAAG,SACD;GACJ,MAAM,SAAS,gBAAgB,cAAc;GAC7C,MAAM,EAAE,QAAQ,aAAa,uBAAuB,gBAAgB,cAAc;GAClF,MAAM,WAAW,iBAAiB;IAChC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GACD,MAAM,SAAS,gBAAgB;IAC7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,cAAc,SAAS;IACvB;IACA;IACA;IACA;IACA;IACA,eAAeA,OAAK,SAAS,gBAAgB,aAAa;IAC1D,eAAe;IACf;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF,CAAC;GAED,MAAM,eAAe,gBAClB,KAAa,SACd,WAAW,KAAA,IAAY,OACvB,WAAW,KAAA,IAAY,YACzB;GAEA,OACE,oBAACC,cAAD;IACE,GAAI;IACJ,GAAI;IACJ,SAAS,aAAa;IAGtB,YAAY,SAAS;IACT;IACQ;IACpB,cAAc,gBAAgB,KAAA;IACnB;IACX,QAAQ,OAAO;IACT;IACW;IACP;IACF;IACR,aAAa,SAAS;IACtB,aAAa,eAAe,mBAAmB,MAAM;IAChD;IACL,YAAY,YAAY,YAAY,iBAAiB;IAClC;IACnB,SAAU,KAAa,WAAY,KAAa,aAAa;IACtD;IACP,YACE,WACI;KACE,GAAG,OAAO;KACV,OAAO;MACL,GAAG,OAAO,WAAW;MACrB,MAAMD,OAAK,OAAO,WAAW,MAAM,MAAM,GAAG,WAAW,mBAAmB;KAC5E;IACF,IACA,OAAO;IAEK;IAClB,SAAS,SAAS;IACZ;IACN,eAAe,SAAS;IACxB,qBAAqB,SAAS;IAC9B,WAAW,GAAG,SAAgB;KAC5B,aAAa,MAAM,KAAK,EAAE;KAC1B,SAAU,SAAiB,GAAG,IAAI;IACpC;GACD,CAAA;EAEL;EACA,OAAO,cAAc;EACrB,OAAO;CACT;CAEA,OAAO;EACL,YAAY,UAAU;EACtB,aAAa,UAAU,SAAS,aAAa;EAC7C,eAAe,UAAU,WAAW,eAAe;EACnD,YAAY,UAAU,QAAQ,YAAY;EAC1C,YAAY,UAAU,QAAQ,YAAY;EAC1C,YAAY,UAAU,QAAQ,YAAY;CAC5C;AACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import generateConfig from "./generateConfig.mjs";
|
|
2
|
+
import dayjs from "dayjs";
|
|
3
|
+
//#region src/DatePicker/dateGenerateConfig.ts
|
|
4
|
+
const c = generateConfig;
|
|
5
|
+
const inn = (value) => dayjs(value);
|
|
6
|
+
const out = (value) => value.toDate();
|
|
7
|
+
/**
|
|
8
|
+
* rc-picker config over native `Date`, built on the dayjs config (parsing, formatting, week
|
|
9
|
+
* rules and locales stay dayjs'). The default `DatePicker` / `DateRangePicker` use it so
|
|
10
|
+
* values, callbacks and `disabledDate` are native `Date`, as in the previous lobe DatePicker.
|
|
11
|
+
*/
|
|
12
|
+
const dateGenerateConfig = {
|
|
13
|
+
addDate: (value, diff) => out(c.addDate(inn(value), diff)),
|
|
14
|
+
addMonth: (value, diff) => out(c.addMonth(inn(value), diff)),
|
|
15
|
+
addYear: (value, diff) => out(c.addYear(inn(value), diff)),
|
|
16
|
+
getDate: (value) => c.getDate(inn(value)),
|
|
17
|
+
getEndDate: (value) => out(c.getEndDate(inn(value))),
|
|
18
|
+
getFixedDate: (fixed) => out(c.getFixedDate(fixed)),
|
|
19
|
+
getHour: (value) => c.getHour(inn(value)),
|
|
20
|
+
getMillisecond: (value) => c.getMillisecond(inn(value)),
|
|
21
|
+
getMinute: (value) => c.getMinute(inn(value)),
|
|
22
|
+
getMonth: (value) => c.getMonth(inn(value)),
|
|
23
|
+
getNow: () => /* @__PURE__ */ new Date(),
|
|
24
|
+
getSecond: (value) => c.getSecond(inn(value)),
|
|
25
|
+
getWeekDay: (value) => c.getWeekDay(inn(value)),
|
|
26
|
+
getYear: (value) => c.getYear(inn(value)),
|
|
27
|
+
isAfter: (date1, date2) => c.isAfter(inn(date1), inn(date2)),
|
|
28
|
+
isValidate: (date) => date instanceof Date && !Number.isNaN(date.getTime()),
|
|
29
|
+
locale: {
|
|
30
|
+
format: (locale, date, format) => c.locale.format(locale, inn(date), format),
|
|
31
|
+
getShortMonths: c.locale.getShortMonths,
|
|
32
|
+
getShortWeekDays: c.locale.getShortWeekDays,
|
|
33
|
+
getWeek: (locale, value) => c.locale.getWeek(locale, inn(value)),
|
|
34
|
+
getWeekFirstDate: (locale, value) => out(c.locale.getWeekFirstDate(locale, inn(value))),
|
|
35
|
+
getWeekFirstDay: c.locale.getWeekFirstDay,
|
|
36
|
+
parse: (locale, text, formats) => {
|
|
37
|
+
const parsed = c.locale.parse(locale, text, formats);
|
|
38
|
+
return parsed ? out(parsed) : null;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setDate: (value, date) => out(c.setDate(inn(value), date)),
|
|
42
|
+
setHour: (value, hour) => out(c.setHour(inn(value), hour)),
|
|
43
|
+
setMillisecond: (value, ms) => out(c.setMillisecond(inn(value), ms)),
|
|
44
|
+
setMinute: (value, minute) => out(c.setMinute(inn(value), minute)),
|
|
45
|
+
setMonth: (value, month) => out(c.setMonth(inn(value), month)),
|
|
46
|
+
setSecond: (value, second) => out(c.setSecond(inn(value), second)),
|
|
47
|
+
setYear: (value, year) => out(c.setYear(inn(value), year))
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { dateGenerateConfig as default };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=dateGenerateConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateGenerateConfig.mjs","names":["dayjsGenerateConfig"],"sources":["../../src/DatePicker/dateGenerateConfig.ts"],"sourcesContent":["import dayjs, { type Dayjs } from 'dayjs';\n\nimport type { GenerateConfig } from './core/generate';\nimport dayjsGenerateConfig from './generateConfig';\n\nconst c = dayjsGenerateConfig;\nconst inn = (value: Date): Dayjs => dayjs(value);\nconst out = (value: Dayjs): Date => value.toDate();\n\n/**\n * rc-picker config over native `Date`, built on the dayjs config (parsing, formatting, week\n * rules and locales stay dayjs'). The default `DatePicker` / `DateRangePicker` use it so\n * values, callbacks and `disabledDate` are native `Date`, as in the previous lobe DatePicker.\n */\nconst dateGenerateConfig: GenerateConfig<Date> = {\n addDate: (value, diff) => out(c.addDate(inn(value), diff)),\n addMonth: (value, diff) => out(c.addMonth(inn(value), diff)),\n addYear: (value, diff) => out(c.addYear(inn(value), diff)),\n getDate: (value) => c.getDate(inn(value)),\n getEndDate: (value) => out(c.getEndDate(inn(value))),\n getFixedDate: (fixed) => out(c.getFixedDate(fixed)),\n getHour: (value) => c.getHour(inn(value)),\n getMillisecond: (value) => c.getMillisecond(inn(value)),\n getMinute: (value) => c.getMinute(inn(value)),\n getMonth: (value) => c.getMonth(inn(value)),\n getNow: () => new Date(),\n getSecond: (value) => c.getSecond(inn(value)),\n getWeekDay: (value) => c.getWeekDay(inn(value)),\n getYear: (value) => c.getYear(inn(value)),\n isAfter: (date1, date2) => c.isAfter(inn(date1), inn(date2)),\n isValidate: (date) => date instanceof Date && !Number.isNaN(date.getTime()),\n locale: {\n format: (locale, date, format) => c.locale.format(locale, inn(date), format),\n getShortMonths: c.locale.getShortMonths,\n getShortWeekDays: c.locale.getShortWeekDays,\n getWeek: (locale, value) => c.locale.getWeek(locale, inn(value)),\n getWeekFirstDate: (locale, value) => out(c.locale.getWeekFirstDate(locale, inn(value))),\n getWeekFirstDay: c.locale.getWeekFirstDay,\n parse: (locale, text, formats) => {\n const parsed = c.locale.parse(locale, text, formats);\n return parsed ? out(parsed) : null;\n },\n },\n setDate: (value, date) => out(c.setDate(inn(value), date)),\n setHour: (value, hour) => out(c.setHour(inn(value), hour)),\n setMillisecond: (value, ms) => out(c.setMillisecond(inn(value), ms)),\n setMinute: (value, minute) => out(c.setMinute(inn(value), minute)),\n setMonth: (value, month) => out(c.setMonth(inn(value), month)),\n setSecond: (value, second) => out(c.setSecond(inn(value), second)),\n setYear: (value, year) => out(c.setYear(inn(value), year)),\n};\n\nexport default dateGenerateConfig;\n"],"mappings":";;;AAKA,MAAM,IAAIA;AACV,MAAM,OAAO,UAAuB,MAAM,KAAK;AAC/C,MAAM,OAAO,UAAuB,MAAM,OAAO;;;;;;AAOjD,MAAM,qBAA2C;CAC/C,UAAU,OAAO,SAAS,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;CACzD,WAAW,OAAO,SAAS,IAAI,EAAE,SAAS,IAAI,KAAK,GAAG,IAAI,CAAC;CAC3D,UAAU,OAAO,SAAS,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;CACzD,UAAU,UAAU,EAAE,QAAQ,IAAI,KAAK,CAAC;CACxC,aAAa,UAAU,IAAI,EAAE,WAAW,IAAI,KAAK,CAAC,CAAC;CACnD,eAAe,UAAU,IAAI,EAAE,aAAa,KAAK,CAAC;CAClD,UAAU,UAAU,EAAE,QAAQ,IAAI,KAAK,CAAC;CACxC,iBAAiB,UAAU,EAAE,eAAe,IAAI,KAAK,CAAC;CACtD,YAAY,UAAU,EAAE,UAAU,IAAI,KAAK,CAAC;CAC5C,WAAW,UAAU,EAAE,SAAS,IAAI,KAAK,CAAC;CAC1C,8BAAc,IAAI,KAAK;CACvB,YAAY,UAAU,EAAE,UAAU,IAAI,KAAK,CAAC;CAC5C,aAAa,UAAU,EAAE,WAAW,IAAI,KAAK,CAAC;CAC9C,UAAU,UAAU,EAAE,QAAQ,IAAI,KAAK,CAAC;CACxC,UAAU,OAAO,UAAU,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC;CAC3D,aAAa,SAAS,gBAAgB,QAAQ,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC;CAC1E,QAAQ;EACN,SAAS,QAAQ,MAAM,WAAW,EAAE,OAAO,OAAO,QAAQ,IAAI,IAAI,GAAG,MAAM;EAC3E,gBAAgB,EAAE,OAAO;EACzB,kBAAkB,EAAE,OAAO;EAC3B,UAAU,QAAQ,UAAU,EAAE,OAAO,QAAQ,QAAQ,IAAI,KAAK,CAAC;EAC/D,mBAAmB,QAAQ,UAAU,IAAI,EAAE,OAAO,iBAAiB,QAAQ,IAAI,KAAK,CAAC,CAAC;EACtF,iBAAiB,EAAE,OAAO;EAC1B,QAAQ,QAAQ,MAAM,YAAY;GAChC,MAAM,SAAS,EAAE,OAAO,MAAM,QAAQ,MAAM,OAAO;GACnD,OAAO,SAAS,IAAI,MAAM,IAAI;EAChC;CACF;CACA,UAAU,OAAO,SAAS,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;CACzD,UAAU,OAAO,SAAS,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;CACzD,iBAAiB,OAAO,OAAO,IAAI,EAAE,eAAe,IAAI,KAAK,GAAG,EAAE,CAAC;CACnE,YAAY,OAAO,WAAW,IAAI,EAAE,UAAU,IAAI,KAAK,GAAG,MAAM,CAAC;CACjE,WAAW,OAAO,UAAU,IAAI,EAAE,SAAS,IAAI,KAAK,GAAG,KAAK,CAAC;CAC7D,YAAY,OAAO,WAAW,IAAI,EAAE,UAAU,IAAI,KAAK,GAAG,MAAM,CAAC;CACjE,UAAU,OAAO,SAAS,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;AAC3D"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { GenerateConfig } from "./core/generate/index.mjs";
|
|
2
2
|
import { CellRender, CellRenderInfo, PanelMode, PickerMode, PickerRef, RangePickerRef } from "./core/interface.mjs";
|
|
3
|
-
import { CalendarMode, DatePickerBaseProps, DatePickerProps, DatePickerSemanticType, DatePickerType, DateRangePickerProps, DateRangeValue, GeneratedDatePicker, GenericTimePickerProps, MonthPickerProps, PickerClassNames, PickerComponents, PickerDateStrings, PickerLocale, PickerLocaleInput, PickerLocaleLang, PickerPanelProps, PickerPlacement, PickerPopupSemanticName, PickerProps, PickerPropsWithMultiple, PickerSemanticClassNames, PickerSemanticName, PickerSemanticStyles, PickerSize, PickerStatus, PickerStyles, PickerTagProps, PickerVariant, PresetDate, PresetPickerProps, QuarterPickerProps, RangeDisabledDate, RangeInfo, RangePickerComponent, RangePickerProps, SinglePickerComponent, TimePickerLocale, TimePickerProps, WeekPickerProps, YearPickerProps } from "./type.mjs";
|
|
3
|
+
import { CalendarMode, DatePickerBaseProps, DatePickerProps, DatePickerSemanticType, DatePickerType, DateRangePickerProps, DateRangeValue, DayjsDatePickerProps, DayjsDatePickerType, DayjsDateRangePickerProps, DayjsDateRangeValue, GeneratedDatePicker, GenericTimePickerProps, LegacyDateInput, MonthPickerProps, PickerClassNames, PickerComponents, PickerDateInput, PickerDateStrings, PickerLocale, PickerLocaleInput, PickerLocaleLang, PickerPanelProps, PickerPlacement, PickerPopupSemanticName, PickerProps, PickerPropsWithMultiple, PickerSemanticClassNames, PickerSemanticName, PickerSemanticStyles, PickerSize, PickerStatus, PickerStyles, PickerTagProps, PickerValueInput, PickerVariant, PresetDate, PresetPickerProps, QuarterPickerProps, RangeChangeDates, RangeChangeStrings, RangeDisabledDate, RangeInfo, RangePickerComponent, RangePickerProps, SinglePickerComponent, TimePickerLocale, TimePickerProps, WeekPickerProps, YearPickerProps } from "./type.mjs";
|
|
4
4
|
import DatePicker from "./DatePicker.mjs";
|
|
5
5
|
import DateRangePicker from "./DateRangePicker.mjs";
|
|
6
|
+
import DayjsDatePicker from "./DayjsDatePicker.mjs";
|
|
7
|
+
import DayjsDateRangePicker from "./DayjsDateRangePicker.mjs";
|
|
6
8
|
import generatePicker from "./generatePicker.mjs";
|
|
7
9
|
import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "./locale.mjs";
|
|
8
|
-
export { type CalendarMode, type CellRender, type CellRenderInfo, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, type GenerateConfig, type GeneratedDatePicker, type GenericTimePickerProps, type MonthPickerProps, type PanelMode, type PickerClassNames, type PickerComponents, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerVariant, type PresetDate, type PresetPickerProps, type QuarterPickerProps, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, type SinglePickerComponent, type TimePickerLocale, type TimePickerProps, type WeekPickerProps, type YearPickerProps, createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN, generatePicker };
|
|
10
|
+
export { type CalendarMode, type CellRender, type CellRenderInfo, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, type GenerateConfig, type GeneratedDatePicker, type GenericTimePickerProps, type LegacyDateInput, type MonthPickerProps, type PanelMode, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type PresetDate, type PresetPickerProps, type QuarterPickerProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, type SinglePickerComponent, type TimePickerLocale, type TimePickerProps, type WeekPickerProps, type YearPickerProps, createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN, generatePicker };
|
package/es/DatePicker/index.mjs
CHANGED
|
@@ -2,4 +2,6 @@ import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "
|
|
|
2
2
|
import generatePicker from "./generatePicker.mjs";
|
|
3
3
|
import DatePicker from "./DatePicker.mjs";
|
|
4
4
|
import DateRangePicker from "./DateRangePicker.mjs";
|
|
5
|
-
|
|
5
|
+
import DayjsDatePicker from "./DayjsDatePicker.mjs";
|
|
6
|
+
import DayjsDateRangePicker from "./DayjsDateRangePicker.mjs";
|
|
7
|
+
export { DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN, generatePicker };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import generateConfig from "./generateConfig.mjs";
|
|
2
|
+
import dateGenerateConfig from "./dateGenerateConfig.mjs";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
//#region src/DatePicker/legacyDate.ts
|
|
5
|
+
const DATE_KEYS = [
|
|
6
|
+
"defaultPickerValue",
|
|
7
|
+
"defaultValue",
|
|
8
|
+
"max",
|
|
9
|
+
"maxDate",
|
|
10
|
+
"min",
|
|
11
|
+
"minDate",
|
|
12
|
+
"pickerValue",
|
|
13
|
+
"value"
|
|
14
|
+
];
|
|
15
|
+
const toDayjs = (v) => v instanceof Date || typeof v === "string" || typeof v === "number" ? dayjs(v) : v;
|
|
16
|
+
const toDate = (v) => {
|
|
17
|
+
if (dayjs.isDayjs(v)) return v.toDate();
|
|
18
|
+
if (typeof v === "string" || typeof v === "number") return dayjs(v).toDate();
|
|
19
|
+
return v;
|
|
20
|
+
};
|
|
21
|
+
const convertValue = (v, convert) => {
|
|
22
|
+
if (!Array.isArray(v)) return convert(v);
|
|
23
|
+
let changed = false;
|
|
24
|
+
const next = v.map((item) => {
|
|
25
|
+
const converted = item === null || item === void 0 ? item : convert(item);
|
|
26
|
+
if (converted !== item) changed = true;
|
|
27
|
+
return converted;
|
|
28
|
+
});
|
|
29
|
+
return changed ? next : v;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Normalises date props to the picker's date type, so both pickers take any of
|
|
33
|
+
* `Date` / `Dayjs` / date string / timestamp (also inside a range tuple or `multiple` array):
|
|
34
|
+
* the default (native `Date`) pickers convert `Dayjs` / strings / timestamps to `Date`, the
|
|
35
|
+
* dayjs pickers convert `Date` / strings / timestamps to `Dayjs`. Pickers generated over
|
|
36
|
+
* another date library get their props untouched.
|
|
37
|
+
*/
|
|
38
|
+
const normalizeLegacyDateProps = (props, generateConfig$1) => {
|
|
39
|
+
const convert = generateConfig$1 === generateConfig ? toDayjs : generateConfig$1 === dateGenerateConfig ? toDate : void 0;
|
|
40
|
+
if (!convert) return props;
|
|
41
|
+
let next;
|
|
42
|
+
for (const key of DATE_KEYS) {
|
|
43
|
+
const v = props[key];
|
|
44
|
+
if (v === void 0 || v === null) continue;
|
|
45
|
+
const converted = convertValue(v, convert);
|
|
46
|
+
if (converted !== v) {
|
|
47
|
+
next ??= { ...props };
|
|
48
|
+
next[key] = converted;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return next ?? props;
|
|
52
|
+
};
|
|
53
|
+
/** The previous lobe DateRangePicker never passed `null`: a cleared range is `[null, null]`. */
|
|
54
|
+
const isNativeDateConfig = (generateConfig) => generateConfig === dateGenerateConfig;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { isNativeDateConfig, normalizeLegacyDateProps };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=legacyDate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacyDate.mjs","names":["generateConfig","dayjsGenerateConfig"],"sources":["../../src/DatePicker/legacyDate.ts"],"sourcesContent":["import dayjs from 'dayjs';\n\nimport dateGenerateConfig from './dateGenerateConfig';\nimport dayjsGenerateConfig from './generateConfig';\n\nconst DATE_KEYS = [\n 'defaultPickerValue',\n 'defaultValue',\n 'max',\n 'maxDate',\n 'min',\n 'minDate',\n 'pickerValue',\n 'value',\n] as const;\n\ntype Convert = (v: unknown) => unknown;\n\nconst toDayjs: Convert = (v) =>\n v instanceof Date || typeof v === 'string' || typeof v === 'number' ? dayjs(v) : v;\n\nconst toDate: Convert = (v) => {\n if (dayjs.isDayjs(v)) return v.toDate();\n if (typeof v === 'string' || typeof v === 'number') return dayjs(v).toDate();\n return v;\n};\n\nconst convertValue = (v: unknown, convert: Convert): unknown => {\n if (!Array.isArray(v)) return convert(v);\n let changed = false;\n const next = v.map((item) => {\n const converted = item === null || item === undefined ? item : convert(item);\n if (converted !== item) changed = true;\n return converted;\n });\n return changed ? next : v;\n};\n\n/**\n * Normalises date props to the picker's date type, so both pickers take any of\n * `Date` / `Dayjs` / date string / timestamp (also inside a range tuple or `multiple` array):\n * the default (native `Date`) pickers convert `Dayjs` / strings / timestamps to `Date`, the\n * dayjs pickers convert `Date` / strings / timestamps to `Dayjs`. Pickers generated over\n * another date library get their props untouched.\n */\nexport const normalizeLegacyDateProps = <P extends object>(\n props: P,\n generateConfig: unknown,\n): P => {\n const convert =\n generateConfig === dayjsGenerateConfig\n ? toDayjs\n : generateConfig === dateGenerateConfig\n ? toDate\n : undefined;\n if (!convert) return props;\n let next: P | undefined;\n for (const key of DATE_KEYS) {\n const v = (props as any)[key];\n if (v === undefined || v === null) continue;\n const converted = convertValue(v, convert);\n if (converted !== v) {\n next ??= { ...props };\n (next as any)[key] = converted;\n }\n }\n return next ?? props;\n};\n\n/** The previous lobe DateRangePicker never passed `null`: a cleared range is `[null, null]`. */\nexport const isNativeDateConfig = (generateConfig: unknown) =>\n generateConfig === dateGenerateConfig;\n"],"mappings":";;;;AAKA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAM,WAAoB,MACxB,aAAa,QAAQ,OAAO,MAAM,YAAY,OAAO,MAAM,WAAW,MAAM,CAAC,IAAI;AAEnF,MAAM,UAAmB,MAAM;CAC7B,IAAI,MAAM,QAAQ,CAAC,GAAG,OAAO,EAAE,OAAO;CACtC,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UAAU,OAAO,MAAM,CAAC,CAAC,CAAC,OAAO;CAC3E,OAAO;AACT;AAEA,MAAM,gBAAgB,GAAY,YAA8B;CAC9D,IAAI,CAAC,MAAM,QAAQ,CAAC,GAAG,OAAO,QAAQ,CAAC;CACvC,IAAI,UAAU;CACd,MAAM,OAAO,EAAE,KAAK,SAAS;EAC3B,MAAM,YAAY,SAAS,QAAQ,SAAS,KAAA,IAAY,OAAO,QAAQ,IAAI;EAC3E,IAAI,cAAc,MAAM,UAAU;EAClC,OAAO;CACT,CAAC;CACD,OAAO,UAAU,OAAO;AAC1B;;;;;;;;AASA,MAAa,4BACX,OACA,qBACM;CACN,MAAM,UACJA,qBAAmBC,iBACf,UACAD,qBAAmB,qBACjB,SACA,KAAA;CACR,IAAI,CAAC,SAAS,OAAO;CACrB,IAAI;CACJ,KAAK,MAAM,OAAO,WAAW;EAC3B,MAAM,IAAK,MAAc;EACzB,IAAI,MAAM,KAAA,KAAa,MAAM,MAAM;EACnC,MAAM,YAAY,aAAa,GAAG,OAAO;EACzC,IAAI,cAAc,GAAG;GACnB,SAAS,EAAE,GAAG,MAAM;GACpB,KAAc,OAAO;EACvB;CACF;CACA,OAAO,QAAQ;AACjB;;AAGA,MAAa,sBAAsB,mBACjC,mBAAmB"}
|
package/es/DatePicker/type.d.mts
CHANGED
|
@@ -47,11 +47,11 @@ export type PickerLocaleInput = Omit<Partial<PickerLocale>, 'lang' | 'timePicker
|
|
|
47
47
|
timePickerLocale?: TimePickerLocale;
|
|
48
48
|
};
|
|
49
49
|
/** A `presets` entry: `value` may be a function, evaluated when the preset is hovered or picked. */
|
|
50
|
-
export type PresetDate<T =
|
|
50
|
+
export type PresetDate<T = Date> = ValueDate<T>;
|
|
51
51
|
/** `components`: replace a panel (`date` / `week` / … / `time`), the `input` or the OK `button`. */
|
|
52
|
-
export type PickerComponents = Components<
|
|
52
|
+
export type PickerComponents = Components<Date>;
|
|
53
53
|
/** Props a custom panel in `components` receives (`value`, `onSelect`, `onHover`, …). */
|
|
54
|
-
export type PickerPanelProps = SharedPanelProps<
|
|
54
|
+
export type PickerPanelProps<DateType extends object = Date> = SharedPanelProps<DateType>;
|
|
55
55
|
export type PickerSize = 'large' | 'medium' | 'small';
|
|
56
56
|
export type PickerVariant = 'outlined' | 'borderless' | 'filled' | 'underlined';
|
|
57
57
|
export type PickerStatus = 'error' | 'warning';
|
|
@@ -107,7 +107,7 @@ interface LobePickerProps {
|
|
|
107
107
|
variant?: PickerVariant;
|
|
108
108
|
}
|
|
109
109
|
/** Props `tagRender` receives for each picked date in `multiple` mode. */
|
|
110
|
-
export interface PickerTagProps<DateType extends object =
|
|
110
|
+
export interface PickerTagProps<DateType extends object = Date> {
|
|
111
111
|
closable: boolean;
|
|
112
112
|
disabled: boolean;
|
|
113
113
|
/** The date formatted with `format`. */
|
|
@@ -118,25 +118,39 @@ export interface PickerTagProps<DateType extends object = Dayjs> {
|
|
|
118
118
|
}
|
|
119
119
|
/** `dateString` of a value: a string per date in `multiple` mode. */
|
|
120
120
|
export type PickerDateStrings<ValueType> = ValueType extends readonly unknown[] ? string[] : string | null;
|
|
121
|
+
/**
|
|
122
|
+
* Date inputs the previous lobe DatePicker took (native `Date`), plus date strings and
|
|
123
|
+
* timestamps. On the dayjs pickers they are converted to `Dayjs`; callbacks always get `Dayjs`.
|
|
124
|
+
*/
|
|
125
|
+
export type LegacyDateInput = Date | string | number;
|
|
126
|
+
/** A date prop value: `Dayjs` or a `LegacyDateInput` on the dayjs pickers, else `DateType`. */
|
|
127
|
+
export type PickerDateInput<DateType> = DateType extends Dayjs ? Dayjs | LegacyDateInput : DateType extends Date ? Dayjs | LegacyDateInput : DateType;
|
|
128
|
+
/** Range `onChange` dates: never `null` on the default (native `Date`) picker, as before. */
|
|
129
|
+
export type RangeChangeDates<DateType extends object> = DateType extends Date ? DateRangeValue<DateType> : DateRangeValue<DateType> | null;
|
|
130
|
+
export type RangeChangeStrings<DateType extends object> = DateType extends Date ? [string, string] : [string, string] | null;
|
|
131
|
+
/** `PickerDateInput` for a single value or each date of a `multiple` array. */
|
|
132
|
+
export type PickerValueInput<ValueType> = ValueType extends readonly (infer D)[] ? PickerDateInput<D>[] : PickerDateInput<ValueType>;
|
|
121
133
|
/**
|
|
122
134
|
* antd's `PickerPropsWithMultiple`: `InnerPickerProps` with the value props typed by
|
|
123
135
|
* `ValueType` — `DateType` for one date, `DateType[]` with `multiple`.
|
|
124
136
|
*/
|
|
125
137
|
export type PickerPropsWithMultiple<DateType, InnerPickerProps, ValueType = DateType> = Omit<InnerPickerProps, 'defaultValue' | 'onCalendarChange' | 'onChange' | 'onOk' | 'value'> & {
|
|
126
|
-
|
|
127
|
-
|
|
138
|
+
/** Also takes a native `Date`, date string or timestamp (converted to `Dayjs`). */
|
|
139
|
+
defaultValue?: PickerValueInput<ValueType> | null;
|
|
140
|
+
onCalendarChange?(date: ValueType | null, dateString: PickerDateStrings<ValueType>, info: BaseInfo): void;
|
|
128
141
|
/** Cleared: `null` for one date, `[]` with `multiple`. */
|
|
129
|
-
onChange
|
|
130
|
-
onOk
|
|
131
|
-
|
|
142
|
+
onChange?(date: ValueType | null, dateString: PickerDateStrings<ValueType>): void;
|
|
143
|
+
onOk?(date?: ValueType | null): void;
|
|
144
|
+
/** Also takes a native `Date`, date string or timestamp (converted to `Dayjs`). */
|
|
145
|
+
value?: PickerValueInput<ValueType> | null;
|
|
132
146
|
};
|
|
133
147
|
/**
|
|
134
148
|
* DatePicker props other than the value ones, which `PickerPropsWithMultiple` adds.
|
|
135
149
|
* `DateType` is the date library's type (`Dayjs`, or another one with `generatePicker`).
|
|
136
150
|
*/
|
|
137
|
-
export interface DatePickerBaseProps<DateType extends object =
|
|
151
|
+
export interface DatePickerBaseProps<DateType extends object = Date> extends Omit<PickerProps$1<DateType>, InternalRcProps | MultipleRcProps | ValueRcProps>, LobePickerProps {
|
|
138
152
|
/** Semantic DOM class names: `root` / `prefix` / `input` / `suffix` and `popup.*`. */
|
|
139
|
-
classNames?: PickerClassNames<
|
|
153
|
+
classNames?: PickerClassNames<DatePickerBaseProps<DateType>>;
|
|
140
154
|
/**
|
|
141
155
|
* antd `PickerLocale`: `lang` texts and formats (`fieldDateFormat`, `yearFormat`,
|
|
142
156
|
* `shortWeekDays`, …) and `timePickerLocale`. Defaults to the locale generated from the
|
|
@@ -165,7 +179,7 @@ export interface DatePickerBaseProps<DateType extends object = Dayjs> extends Om
|
|
|
165
179
|
/** `multiple`: the remove icon of each tag. */
|
|
166
180
|
removeIcon?: ReactNode;
|
|
167
181
|
/** Semantic DOM styles: `root` / `prefix` / `input` / `suffix` and `popup.*`. */
|
|
168
|
-
styles?: PickerStyles<
|
|
182
|
+
styles?: PickerStyles<DatePickerBaseProps<DateType>>;
|
|
169
183
|
/** `multiple`: render each picked date's tag, e.g. with base-ui `Tag`. */
|
|
170
184
|
tagRender?: (props: PickerTagProps<DateType>) => ReactNode;
|
|
171
185
|
}
|
|
@@ -173,19 +187,19 @@ export interface DatePickerBaseProps<DateType extends object = Dayjs> extends Om
|
|
|
173
187
|
* `ValueType` is `Dayjs` (default) or `Dayjs[]` with `multiple`; `<DatePicker multiple>`
|
|
174
188
|
* infers `Dayjs[]` by itself.
|
|
175
189
|
*/
|
|
176
|
-
export type DatePickerProps<ValueType =
|
|
177
|
-
export type DateRangeValue<DateType extends object =
|
|
190
|
+
export type DatePickerProps<ValueType = Date> = PickerPropsWithMultiple<Date, DatePickerBaseProps, ValueType>;
|
|
191
|
+
export type DateRangeValue<DateType extends object = Date> = [DateType | null, DateType | null];
|
|
178
192
|
/** Which end of a range an event belongs to. */
|
|
179
193
|
export interface RangeInfo {
|
|
180
194
|
range: 'start' | 'end';
|
|
181
195
|
}
|
|
182
196
|
/** `info.from` is the end picked first in the current range selection. */
|
|
183
|
-
export type RangeDisabledDate<DateType extends object =
|
|
197
|
+
export type RangeDisabledDate<DateType extends object = Date> = (current: DateType, info: {
|
|
184
198
|
from?: DateType;
|
|
185
199
|
type: PanelMode;
|
|
186
200
|
}) => boolean;
|
|
187
201
|
type RangeRcProps = 'allowEmpty' | 'disabled' | 'disabledDate' | 'id' | 'onBlur' | 'onFocus' | 'order';
|
|
188
|
-
export interface DateRangePickerProps<DateType extends object =
|
|
202
|
+
export interface DateRangePickerProps<DateType extends object = Date> extends Omit<RangePickerProps$1<DateType>, InternalRcProps | RangeRcProps | ValueRcProps>, LobePickerProps {
|
|
189
203
|
/**
|
|
190
204
|
* Allow leaving the start / end empty; `true` applies to both ends.
|
|
191
205
|
* @default [false, false]
|
|
@@ -193,7 +207,8 @@ export interface DateRangePickerProps<DateType extends object = Dayjs> extends O
|
|
|
193
207
|
allowEmpty?: boolean | [boolean, boolean];
|
|
194
208
|
/** Semantic DOM class names, see `DatePickerProps['classNames']`. */
|
|
195
209
|
classNames?: PickerClassNames<DateRangePickerProps<DateType>>;
|
|
196
|
-
|
|
210
|
+
/** Each end also takes a native `Date`, date string or timestamp (converted to `Dayjs`). */
|
|
211
|
+
defaultValue?: [PickerDateInput<DateType> | null | undefined, PickerDateInput<DateType> | null | undefined];
|
|
197
212
|
/** Disable the whole picker, or each end separately with `[start, end]`. */
|
|
198
213
|
disabled?: boolean | [boolean, boolean];
|
|
199
214
|
/** Receives `info.from` once one end is picked, e.g. to limit the range length. */
|
|
@@ -206,10 +221,12 @@ export interface DateRangePickerProps<DateType extends object = Dayjs> extends O
|
|
|
206
221
|
/** antd `PickerLocale`, see `DatePickerProps['locale']`. */
|
|
207
222
|
locale?: PickerLocaleInput;
|
|
208
223
|
onBlur?: (event: FocusEvent<HTMLElement>, info: RangeInfo) => void;
|
|
209
|
-
onCalendarChange
|
|
210
|
-
|
|
224
|
+
onCalendarChange?(dates: DateRangeValue<DateType>, dateStrings: [string, string], info: RangeInfo): void;
|
|
225
|
+
/** Cleared: `null` (antd). */
|
|
226
|
+
/** Cleared: `[null, null]` on the default (native `Date`) picker, `null` on the dayjs one (antd). */
|
|
227
|
+
onChange?(dates: RangeChangeDates<DateType>, dateStrings: RangeChangeStrings<DateType>): void;
|
|
211
228
|
onFocus?: (event: FocusEvent<HTMLElement>, info: RangeInfo) => void;
|
|
212
|
-
onOk
|
|
229
|
+
onOk?(dates: DateRangeValue<DateType>): void;
|
|
213
230
|
/**
|
|
214
231
|
* Swap the ends when the end is earlier than the start; `false` keeps them as entered.
|
|
215
232
|
* @default true
|
|
@@ -220,21 +237,22 @@ export interface DateRangePickerProps<DateType extends object = Dayjs> extends O
|
|
|
220
237
|
ref?: Ref<RangePickerRef>;
|
|
221
238
|
/** Semantic DOM styles, see `DatePickerProps['styles']`. */
|
|
222
239
|
styles?: PickerStyles<DateRangePickerProps<DateType>>;
|
|
223
|
-
|
|
240
|
+
/** Each end also takes a native `Date`, date string or timestamp (converted to `Dayjs`). */
|
|
241
|
+
value?: [PickerDateInput<DateType> | null | undefined, PickerDateInput<DateType> | null | undefined] | null;
|
|
224
242
|
}
|
|
225
243
|
/** antd `PickerProps<DateType>`: DatePicker props over any date library's type. */
|
|
226
|
-
export type PickerProps<DateType extends object =
|
|
244
|
+
export type PickerProps<DateType extends object = Date, ValueType = DateType> = PickerPropsWithMultiple<DateType, DatePickerBaseProps<DateType>, ValueType>;
|
|
227
245
|
/** Props of `DatePicker.WeekPicker` / `MonthPicker` / … : `picker` is fixed. */
|
|
228
|
-
export type PresetPickerProps<DateType extends object =
|
|
229
|
-
export type WeekPickerProps<ValueType =
|
|
230
|
-
export type MonthPickerProps<ValueType =
|
|
231
|
-
export type YearPickerProps<ValueType =
|
|
232
|
-
export type QuarterPickerProps<ValueType =
|
|
246
|
+
export type PresetPickerProps<DateType extends object = Date, ValueType = DateType> = Omit<PickerProps<DateType, ValueType>, 'picker'>;
|
|
247
|
+
export type WeekPickerProps<ValueType = Date> = PresetPickerProps<Date, ValueType>;
|
|
248
|
+
export type MonthPickerProps<ValueType = Date> = PresetPickerProps<Date, ValueType>;
|
|
249
|
+
export type YearPickerProps<ValueType = Date> = PresetPickerProps<Date, ValueType>;
|
|
250
|
+
export type QuarterPickerProps<ValueType = Date> = PresetPickerProps<Date, ValueType>;
|
|
233
251
|
/** antd `GenericTimePickerProps`: `DatePicker.TimePicker` has no `picker` / `showTime`. */
|
|
234
|
-
export type GenericTimePickerProps<DateType extends object =
|
|
235
|
-
export type TimePickerProps<ValueType =
|
|
252
|
+
export type GenericTimePickerProps<DateType extends object = Date, ValueType = DateType> = Omit<PickerProps<DateType, ValueType>, 'picker' | 'showTime'>;
|
|
253
|
+
export type TimePickerProps<ValueType = Date> = GenericTimePickerProps<Date, ValueType>;
|
|
236
254
|
/** antd-style alias of `DateRangePickerProps`. */
|
|
237
|
-
export type RangePickerProps<DateType extends object =
|
|
255
|
+
export type RangePickerProps<DateType extends object = Date> = DateRangePickerProps<DateType>;
|
|
238
256
|
/** antd `DatePickerSemanticType`: the Semantic DOM `classNames` / `styles` shapes. */
|
|
239
257
|
export interface DatePickerSemanticType {
|
|
240
258
|
classNames?: PickerSemanticClassNames;
|
|
@@ -263,14 +281,22 @@ export interface GeneratedDatePicker<DateType extends object> extends SinglePick
|
|
|
263
281
|
WeekPicker: SinglePickerComponent<DateType, Omit<DatePickerBaseProps<DateType>, 'picker'>>;
|
|
264
282
|
YearPicker: SinglePickerComponent<DateType, Omit<DatePickerBaseProps<DateType>, 'picker'>>;
|
|
265
283
|
}
|
|
266
|
-
/** The default `DatePicker` (
|
|
267
|
-
export interface DatePickerType extends GeneratedDatePicker<
|
|
284
|
+
/** The default `DatePicker` (native `Date`) or `DayjsDatePicker`, with antd's pure panels and `generatePicker`. */
|
|
285
|
+
export interface DatePickerType<D extends object = Date> extends GeneratedDatePicker<D> {
|
|
268
286
|
/** Debug only: the popup panel rendered inline, always open (antd `render-panel`). */
|
|
269
|
-
_InternalPanelDoNotUseOrYouWillBeFired: ComponentType<
|
|
287
|
+
_InternalPanelDoNotUseOrYouWillBeFired: ComponentType<PickerPropsWithMultiple<D, DatePickerBaseProps<D>, any>>;
|
|
270
288
|
/** Debug only: the RangePicker popup panel rendered inline, always open. */
|
|
271
|
-
_InternalRangePanelDoNotUseOrYouWillBeFired: ComponentType<DateRangePickerProps
|
|
289
|
+
_InternalRangePanelDoNotUseOrYouWillBeFired: ComponentType<DateRangePickerProps<D>>;
|
|
272
290
|
generatePicker: <DateType extends object>(generateConfig: GenerateConfig<DateType>) => GeneratedDatePicker<DateType>;
|
|
273
291
|
}
|
|
292
|
+
/** `DayjsDatePicker`: the antd-aligned DatePicker over `Dayjs`. */
|
|
293
|
+
export type DayjsDatePickerType = DatePickerType<Dayjs>;
|
|
294
|
+
/** `DayjsDatePicker` props: values and callbacks use `Dayjs` (`Dayjs[]` with `multiple`). */
|
|
295
|
+
export type DayjsDatePickerProps<ValueType = Dayjs> = PickerPropsWithMultiple<Dayjs, DatePickerBaseProps<Dayjs>, ValueType>;
|
|
296
|
+
/** `DayjsDateRangePicker` props. */
|
|
297
|
+
export type DayjsDateRangePickerProps = DateRangePickerProps<Dayjs>;
|
|
298
|
+
/** `DayjsDateRangePicker` value: `[Dayjs | null, Dayjs | null]`. */
|
|
299
|
+
export type DayjsDateRangeValue = DateRangeValue<Dayjs>;
|
|
274
300
|
//#endregion
|
|
275
301
|
export type { CellRender, CellRenderInfo, GenerateConfig, PanelMode, PickerMode, PickerRef, RangePickerRef };
|
|
276
302
|
//# sourceMappingURL=type.d.mts.map
|
|
@@ -5,6 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
const sameDay = (a, b) => {
|
|
6
6
|
if (!a || !b) return !a && !b;
|
|
7
7
|
if (typeof a.isSame === "function") return a.isSame(b, "day");
|
|
8
|
+
if (a instanceof Date && b instanceof Date) return a.toDateString() === b.toDateString();
|
|
8
9
|
return a === b;
|
|
9
10
|
};
|
|
10
11
|
const sameValue = (a, b) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePresetActive.mjs","names":[],"sources":["../../src/DatePicker/usePresetActive.tsx"],"sourcesContent":["import { type ReactNode, useCallback, useMemo, useState } from 'react';\n\nimport { PREFIX_CLS } from './style';\n\ninterface Preset {\n label: ReactNode;\n value: unknown;\n}\n\nconst sameDay = (a: any, b: any): boolean => {\n if (!a || !b) return !a && !b;\n if (typeof a.isSame === 'function') return a.isSame(b, 'day');\n return a === b;\n};\n\nconst sameValue = (a: any, b: any): boolean => {\n if (Array.isArray(a) || Array.isArray(b)) {\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;\n return a.every((item, i) => sameDay(item, b[i]));\n }\n return sameDay(a, b);\n};\n\nexport const PRESET_ACTIVE_CLS = `${PREFIX_CLS}-preset-active`;\n\n/**\n * rc-picker renders `presets` as the popup sidebar but has no \"current preset\" state.\n * Mirror the picked value (controlled or not) and wrap the matching preset's label so the\n * sidebar can show it as selected (`li:has(> .lobe-picker-preset-active)`).\n */\nexport const usePresetActive = <P extends Preset>(\n presets: P[] | undefined,\n value: unknown,\n defaultValue: unknown,\n) => {\n const [inner, setInner] = useState<unknown>(defaultValue);\n const current = value !== undefined ? value : inner;\n\n const track = useCallback((next: unknown) => setInner(next), []);\n\n const mapped = useMemo(() => {\n if (!presets?.length || !current) return presets;\n return presets.map((preset) => {\n const v =\n typeof preset.value === 'function' ? (preset.value as () => unknown)() : preset.value;\n if (!sameValue(v, current)) return preset;\n return { ...preset, label: <span className={PRESET_ACTIVE_CLS}>{preset.label}</span> };\n });\n }, [presets, current]);\n\n return { presets: mapped, track };\n};\n"],"mappings":";;;;AASA,MAAM,WAAW,GAAQ,MAAoB;CAC3C,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;CAC5B,IAAI,OAAO,EAAE,WAAW,YAAY,OAAO,EAAE,OAAO,GAAG,KAAK;CAC5D,OAAO,MAAM;AACf;AAEA,MAAM,aAAa,GAAQ,MAAoB;CAC7C,IAAI,MAAM,QAAQ,CAAC,KAAK,MAAM,QAAQ,CAAC,GAAG;EACxC,IAAI,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,OAAO;EAC5E,OAAO,EAAE,OAAO,MAAM,MAAM,QAAQ,MAAM,EAAE,EAAE,CAAC;CACjD;CACA,OAAO,QAAQ,GAAG,CAAC;AACrB;AAEA,MAAa,oBAAoB,GAAG,WAAW;;;;;;AAO/C,MAAa,mBACX,SACA,OACA,iBACG;CACH,MAAM,CAAC,OAAO,YAAY,SAAkB,YAAY;CACxD,MAAM,UAAU,UAAU,KAAA,IAAY,QAAQ;CAE9C,MAAM,QAAQ,aAAa,SAAkB,SAAS,IAAI,GAAG,CAAC,CAAC;CAY/D,OAAO;EAAE,SAVM,cAAc;GAC3B,IAAI,CAAC,SAAS,UAAU,CAAC,SAAS,OAAO;GACzC,OAAO,QAAQ,KAAK,WAAW;IAC7B,MAAM,IACJ,OAAO,OAAO,UAAU,aAAc,OAAO,MAAwB,IAAI,OAAO;IAClF,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,OAAO;IACnC,OAAO;KAAE,GAAG;KAAQ,OAAO,oBAAC,QAAD;MAAM,WAAW;MAAoB,UAAA,OAAO;KAAY,CAAA;IAAE;GACvF,CAAC;EACH,GAAG,CAAC,SAAS,OAAO,CAEG;EAAG;CAAM;AAClC"}
|
|
1
|
+
{"version":3,"file":"usePresetActive.mjs","names":[],"sources":["../../src/DatePicker/usePresetActive.tsx"],"sourcesContent":["import { type ReactNode, useCallback, useMemo, useState } from 'react';\n\nimport { PREFIX_CLS } from './style';\n\ninterface Preset {\n label: ReactNode;\n value: unknown;\n}\n\nconst sameDay = (a: any, b: any): boolean => {\n if (!a || !b) return !a && !b;\n if (typeof a.isSame === 'function') return a.isSame(b, 'day');\n if (a instanceof Date && b instanceof Date) return a.toDateString() === b.toDateString();\n return a === b;\n};\n\nconst sameValue = (a: any, b: any): boolean => {\n if (Array.isArray(a) || Array.isArray(b)) {\n if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;\n return a.every((item, i) => sameDay(item, b[i]));\n }\n return sameDay(a, b);\n};\n\nexport const PRESET_ACTIVE_CLS = `${PREFIX_CLS}-preset-active`;\n\n/**\n * rc-picker renders `presets` as the popup sidebar but has no \"current preset\" state.\n * Mirror the picked value (controlled or not) and wrap the matching preset's label so the\n * sidebar can show it as selected (`li:has(> .lobe-picker-preset-active)`).\n */\nexport const usePresetActive = <P extends Preset>(\n presets: P[] | undefined,\n value: unknown,\n defaultValue: unknown,\n) => {\n const [inner, setInner] = useState<unknown>(defaultValue);\n const current = value !== undefined ? value : inner;\n\n const track = useCallback((next: unknown) => setInner(next), []);\n\n const mapped = useMemo(() => {\n if (!presets?.length || !current) return presets;\n return presets.map((preset) => {\n const v =\n typeof preset.value === 'function' ? (preset.value as () => unknown)() : preset.value;\n if (!sameValue(v, current)) return preset;\n return { ...preset, label: <span className={PRESET_ACTIVE_CLS}>{preset.label}</span> };\n });\n }, [presets, current]);\n\n return { presets: mapped, track };\n};\n"],"mappings":";;;;AASA,MAAM,WAAW,GAAQ,MAAoB;CAC3C,IAAI,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;CAC5B,IAAI,OAAO,EAAE,WAAW,YAAY,OAAO,EAAE,OAAO,GAAG,KAAK;CAC5D,IAAI,aAAa,QAAQ,aAAa,MAAM,OAAO,EAAE,aAAa,MAAM,EAAE,aAAa;CACvF,OAAO,MAAM;AACf;AAEA,MAAM,aAAa,GAAQ,MAAoB;CAC7C,IAAI,MAAM,QAAQ,CAAC,KAAK,MAAM,QAAQ,CAAC,GAAG;EACxC,IAAI,CAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,OAAO;EAC5E,OAAO,EAAE,OAAO,MAAM,MAAM,QAAQ,MAAM,EAAE,EAAE,CAAC;CACjD;CACA,OAAO,QAAQ,GAAG,CAAC;AACrB;AAEA,MAAa,oBAAoB,GAAG,WAAW;;;;;;AAO/C,MAAa,mBACX,SACA,OACA,iBACG;CACH,MAAM,CAAC,OAAO,YAAY,SAAkB,YAAY;CACxD,MAAM,UAAU,UAAU,KAAA,IAAY,QAAQ;CAE9C,MAAM,QAAQ,aAAa,SAAkB,SAAS,IAAI,GAAG,CAAC,CAAC;CAY/D,OAAO;EAAE,SAVM,cAAc;GAC3B,IAAI,CAAC,SAAS,UAAU,CAAC,SAAS,OAAO;GACzC,OAAO,QAAQ,KAAK,WAAW;IAC7B,MAAM,IACJ,OAAO,OAAO,UAAU,aAAc,OAAO,MAAwB,IAAI,OAAO;IAClF,IAAI,CAAC,UAAU,GAAG,OAAO,GAAG,OAAO;IACnC,OAAO;KAAE,GAAG;KAAQ,OAAO,oBAAC,QAAD;MAAM,WAAW;MAAoB,UAAA,OAAO;KAAY,CAAA;IAAE;GACvF,CAAC;EACH,GAAG,CAAC,SAAS,OAAO,CAEG;EAAG;CAAM;AAClC"}
|
|
@@ -3,8 +3,8 @@ import Switch from "../../Switch/Switch.mjs";
|
|
|
3
3
|
import Input_default from "../../Input/Input.mjs";
|
|
4
4
|
import InputNumber_default from "../../Input/InputNumber.mjs";
|
|
5
5
|
import Select from "../../Select/Select.mjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import DayjsDatePicker from "../../DatePicker/DayjsDatePicker.mjs";
|
|
7
|
+
import DayjsDateRangePicker from "../../DatePicker/DayjsDateRangePicker.mjs";
|
|
8
8
|
import { resolveValueEnum, resolveValueType, valueEnumToList } from "../utils.mjs";
|
|
9
9
|
import { useColumnRequest } from "../hooks/useColumnRequest.mjs";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -75,7 +75,7 @@ const FieldControl = ({ column, form, light, onChange, placeholder, value }) =>
|
|
|
75
75
|
onChange: (next) => onChange(next)
|
|
76
76
|
});
|
|
77
77
|
case "date":
|
|
78
|
-
case "dateTime": return /* @__PURE__ */ jsx(
|
|
78
|
+
case "dateTime": return /* @__PURE__ */ jsx(DayjsDatePicker, {
|
|
79
79
|
allowClear: true,
|
|
80
80
|
placeholder: light ? label : placeholder.select,
|
|
81
81
|
size,
|
|
@@ -86,7 +86,7 @@ const FieldControl = ({ column, form, light, onChange, placeholder, value }) =>
|
|
|
86
86
|
onChange: (next) => onChange(toDate(next) ?? void 0)
|
|
87
87
|
});
|
|
88
88
|
case "dateRange":
|
|
89
|
-
case "dateTimeRange": return /* @__PURE__ */ jsx(
|
|
89
|
+
case "dateTimeRange": return /* @__PURE__ */ jsx(DayjsDateRangePicker, {
|
|
90
90
|
allowClear: true,
|
|
91
91
|
size,
|
|
92
92
|
style: { width: "100%" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldControl.mjs","names":["InputNumber","Input"],"sources":["../../../src/ProTable/parts/FieldControl.tsx"],"sourcesContent":["import dayjs, { type Dayjs } from 'dayjs';\nimport { type ReactNode } from 'react';\n\nimport DatePicker from '@/DatePicker/
|
|
1
|
+
{"version":3,"file":"FieldControl.mjs","names":["InputNumber","DatePicker","DateRangePicker","Input"],"sources":["../../../src/ProTable/parts/FieldControl.tsx"],"sourcesContent":["import dayjs, { type Dayjs } from 'dayjs';\nimport { type ReactNode } from 'react';\n\nimport DatePicker from '@/DatePicker/DayjsDatePicker';\nimport DateRangePicker from '@/DatePicker/DayjsDateRangePicker';\nimport Input from '@/Input/Input';\nimport InputNumber from '@/Input/InputNumber';\nimport Select from '@/Select';\nimport { useThemeMode } from '@/styles/theme/scope';\nimport Switch from '@/Switch';\n\nimport { useColumnRequest } from '../hooks/useColumnRequest';\nimport type { ProColumnType, ProTableFormInstance, ProTableValueType } from '../type';\nimport { resolveValueEnum, resolveValueType, valueEnumToList } from '../utils';\n\nexport interface FieldControlProps {\n column: ProColumnType<any>;\n form: ProTableFormInstance;\n light?: boolean;\n onChange: (value: any) => void;\n placeholder: { input: string; select: string };\n value: any;\n}\n\nconst SELECT_TYPES = new Set<ProTableValueType>(['select', 'radio', 'checkbox']);\n\n// Form values stay native Date (ProTable's contract); the picker works in Dayjs.\nconst toDayjs = (value: unknown) => (value ? dayjs(value as Date) : null);\nconst toDate = (value: Dayjs | null | undefined) => value?.toDate() ?? null;\n\nconst FieldControl = ({ column, form, light, onChange, placeholder, value }: FieldControlProps) => {\n const valueType = resolveValueType(column) ?? 'text';\n const valueEnum = resolveValueEnum(column);\n const { fieldProps = {} } = column;\n const label = typeof column.title === 'string' ? column.title : undefined;\n const size = light ? 'small' : undefined;\n const { isDarkMode } = useThemeMode();\n // Light filter: outlined on light backgrounds, filled in dark mode.\n const variant = light ? (isDarkMode ? 'filled' : 'outlined') : undefined;\n const remote = useColumnRequest(column);\n\n if (column.renderFormItem) {\n return column.renderFormItem(\n column,\n { form, isQuery: !light, onChange, value },\n form,\n ) as ReactNode;\n }\n\n if (remote.enabled || valueEnum || SELECT_TYPES.has(valueType)) {\n const options =\n remote.options ??\n fieldProps.options ??\n valueEnumToList(valueEnum).map((item) => ({\n disabled: item.disabled,\n label: item.text,\n value: item.value,\n }));\n return (\n <Select\n allowClear\n loading={remote.loading}\n mode={valueType === 'checkbox' ? 'multiple' : undefined}\n options={options as any}\n placeholder={light ? label : placeholder.select}\n size={size}\n style={{ width: '100%' }}\n value={value ?? (valueType === 'checkbox' ? [] : null)}\n variant={variant}\n {...fieldProps}\n onChange={(next) => onChange(next ?? undefined)}\n onSearch={\n remote.onSearch\n ? (keyWords: string) => {\n remote.onSearch!(keyWords);\n fieldProps.onSearch?.(keyWords);\n }\n : fieldProps.onSearch\n }\n />\n );\n }\n\n switch (valueType) {\n case 'digit':\n case 'money':\n case 'percent':\n case 'progress': {\n return (\n <InputNumber\n placeholder={light ? label : placeholder.input}\n size={size}\n style={{ width: '100%' }}\n value={value ?? null}\n variant={variant}\n {...fieldProps}\n onChange={(next) => onChange(next ?? undefined)}\n />\n );\n }\n case 'switch': {\n return <Switch checked={!!value} {...fieldProps} onChange={(next) => onChange(next)} />;\n }\n case 'date':\n case 'dateTime': {\n return (\n <DatePicker\n allowClear\n placeholder={light ? label : placeholder.select}\n size={size}\n style={{ width: '100%' }}\n value={toDayjs(value)}\n variant={variant}\n {...fieldProps}\n onChange={(next) => onChange(toDate(next) ?? undefined)}\n />\n );\n }\n case 'dateRange':\n case 'dateTimeRange': {\n return (\n <DateRangePicker\n allowClear\n size={size}\n style={{ width: '100%' }}\n value={value ? [toDayjs(value[0]), toDayjs(value[1])] : null}\n variant={variant}\n {...fieldProps}\n onChange={(next) =>\n onChange(next && (next[0] || next[1]) ? [toDate(next[0]), toDate(next[1])] : undefined)\n }\n />\n );\n }\n default: {\n return (\n <Input\n allowClear\n placeholder={light ? label : placeholder.input}\n size={size}\n type={valueType === 'password' ? 'password' : undefined}\n value={value ?? ''}\n variant={variant}\n {...fieldProps}\n onChange={(event) => onChange(event.target.value === '' ? undefined : event.target.value)}\n onClear={() => {\n onChange(undefined);\n fieldProps.onClear?.();\n }}\n />\n );\n }\n }\n};\n\nexport default FieldControl;\n"],"mappings":";;;;;;;;;;;;AAwBA,MAAM,+BAAe,IAAI,IAAuB;CAAC;CAAU;CAAS;AAAU,CAAC;AAG/E,MAAM,WAAW,UAAoB,QAAQ,MAAM,KAAa,IAAI;AACpE,MAAM,UAAU,UAAoC,OAAO,OAAO,KAAK;AAEvE,MAAM,gBAAgB,EAAE,QAAQ,MAAM,OAAO,UAAU,aAAa,YAA+B;CACjG,MAAM,YAAY,iBAAiB,MAAM,KAAK;CAC9C,MAAM,YAAY,iBAAiB,MAAM;CACzC,MAAM,EAAE,aAAa,CAAC,MAAM;CAC5B,MAAM,QAAQ,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAA;CAChE,MAAM,OAAO,QAAQ,UAAU,KAAA;CAC/B,MAAM,EAAE,eAAe,aAAa;CAEpC,MAAM,UAAU,QAAS,aAAa,WAAW,aAAc,KAAA;CAC/D,MAAM,SAAS,iBAAiB,MAAM;CAEtC,IAAI,OAAO,gBACT,OAAO,OAAO,eACZ,QACA;EAAE;EAAM,SAAS,CAAC;EAAO;EAAU;CAAM,GACzC,IACF;CAGF,IAAI,OAAO,WAAW,aAAa,aAAa,IAAI,SAAS,GAAG;EAC9D,MAAM,UACJ,OAAO,WACP,WAAW,WACX,gBAAgB,SAAS,CAAC,CAAC,KAAK,UAAU;GACxC,UAAU,KAAK;GACf,OAAO,KAAK;GACZ,OAAO,KAAK;EACd,EAAE;EACJ,OACE,oBAAC,QAAD;GACE,YAAA;GACA,SAAS,OAAO;GAChB,MAAM,cAAc,aAAa,aAAa,KAAA;GACrC;GACT,aAAa,QAAQ,QAAQ,YAAY;GACnC;GACN,OAAO,EAAE,OAAO,OAAO;GACvB,OAAO,UAAU,cAAc,aAAa,CAAC,IAAI;GACxC;GACT,GAAI;GACJ,WAAW,SAAS,SAAS,QAAQ,KAAA,CAAS;GAC9C,UACE,OAAO,YACF,aAAqB;IACpB,OAAO,SAAU,QAAQ;IACzB,WAAW,WAAW,QAAQ;GAChC,IACA,WAAW;EAElB,CAAA;CAEL;CAEA,QAAQ,WAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,YACH,OACE,oBAACA,qBAAD;GACE,aAAa,QAAQ,QAAQ,YAAY;GACnC;GACN,OAAO,EAAE,OAAO,OAAO;GACvB,OAAO,SAAS;GACP;GACT,GAAI;GACJ,WAAW,SAAS,SAAS,QAAQ,KAAA,CAAS;EAC/C,CAAA;EAGL,KAAK,UACH,OAAO,oBAAC,QAAD;GAAQ,SAAS,CAAC,CAAC;GAAO,GAAI;GAAY,WAAW,SAAS,SAAS,IAAI;EAAI,CAAA;EAExF,KAAK;EACL,KAAK,YACH,OACE,oBAACC,iBAAD;GACE,YAAA;GACA,aAAa,QAAQ,QAAQ,YAAY;GACnC;GACN,OAAO,EAAE,OAAO,OAAO;GACvB,OAAO,QAAQ,KAAK;GACX;GACT,GAAI;GACJ,WAAW,SAAS,SAAS,OAAO,IAAI,KAAK,KAAA,CAAS;EACvD,CAAA;EAGL,KAAK;EACL,KAAK,iBACH,OACE,oBAACC,sBAAD;GACE,YAAA;GACM;GACN,OAAO,EAAE,OAAO,OAAO;GACvB,OAAO,QAAQ,CAAC,QAAQ,MAAM,EAAE,GAAG,QAAQ,MAAM,EAAE,CAAC,IAAI;GAC/C;GACT,GAAI;GACJ,WAAW,SACT,SAAS,SAAS,KAAK,MAAM,KAAK,MAAM,CAAC,OAAO,KAAK,EAAE,GAAG,OAAO,KAAK,EAAE,CAAC,IAAI,KAAA,CAAS;EAEzF,CAAA;EAGL,SACE,OACE,oBAACC,eAAD;GACE,YAAA;GACA,aAAa,QAAQ,QAAQ,YAAY;GACnC;GACN,MAAM,cAAc,aAAa,aAAa,KAAA;GAC9C,OAAO,SAAS;GACP;GACT,GAAI;GACJ,WAAW,UAAU,SAAS,MAAM,OAAO,UAAU,KAAK,KAAA,IAAY,MAAM,OAAO,KAAK;GACxF,eAAe;IACb,SAAS,KAAA,CAAS;IAClB,WAAW,UAAU;GACvB;EACD,CAAA;CAGP;AACF"}
|
package/es/Tabs/style.d.mts
CHANGED
package/es/index.d.mts
CHANGED
|
@@ -127,9 +127,11 @@ import CopyButton from "./CopyButton/CopyButton.mjs";
|
|
|
127
127
|
import "./CopyButton/index.mjs";
|
|
128
128
|
import { GenerateConfig } from "./DatePicker/core/generate/index.mjs";
|
|
129
129
|
import { CellRender, CellRenderInfo, PanelMode, PickerMode, PickerRef, RangePickerRef } from "./DatePicker/core/interface.mjs";
|
|
130
|
-
import { CalendarMode, DatePickerBaseProps, DatePickerProps, DatePickerSemanticType, DatePickerType, DateRangePickerProps, DateRangeValue, GeneratedDatePicker, GenericTimePickerProps, MonthPickerProps, PickerClassNames, PickerComponents, PickerDateStrings, PickerLocale, PickerLocaleInput, PickerLocaleLang, PickerPanelProps, PickerPlacement, PickerPopupSemanticName, PickerProps, PickerPropsWithMultiple, PickerSemanticClassNames, PickerSemanticName, PickerSemanticStyles, PickerSize, PickerStatus, PickerStyles, PickerTagProps, PickerVariant, PresetDate, PresetPickerProps, QuarterPickerProps, RangeDisabledDate, RangeInfo, RangePickerComponent, RangePickerProps, SinglePickerComponent, TimePickerLocale, TimePickerProps, WeekPickerProps, YearPickerProps } from "./DatePicker/type.mjs";
|
|
130
|
+
import { CalendarMode, DatePickerBaseProps, DatePickerProps, DatePickerSemanticType, DatePickerType, DateRangePickerProps, DateRangeValue, DayjsDatePickerProps, DayjsDatePickerType, DayjsDateRangePickerProps, DayjsDateRangeValue, GeneratedDatePicker, GenericTimePickerProps, LegacyDateInput, MonthPickerProps, PickerClassNames, PickerComponents, PickerDateInput, PickerDateStrings, PickerLocale, PickerLocaleInput, PickerLocaleLang, PickerPanelProps, PickerPlacement, PickerPopupSemanticName, PickerProps, PickerPropsWithMultiple, PickerSemanticClassNames, PickerSemanticName, PickerSemanticStyles, PickerSize, PickerStatus, PickerStyles, PickerTagProps, PickerValueInput, PickerVariant, PresetDate, PresetPickerProps, QuarterPickerProps, RangeChangeDates, RangeChangeStrings, RangeDisabledDate, RangeInfo, RangePickerComponent, RangePickerProps, SinglePickerComponent, TimePickerLocale, TimePickerProps, WeekPickerProps, YearPickerProps } from "./DatePicker/type.mjs";
|
|
131
131
|
import DatePicker from "./DatePicker/DatePicker.mjs";
|
|
132
132
|
import DateRangePicker from "./DatePicker/DateRangePicker.mjs";
|
|
133
|
+
import DayjsDatePicker from "./DatePicker/DayjsDatePicker.mjs";
|
|
134
|
+
import DayjsDateRangePicker from "./DatePicker/DayjsDateRangePicker.mjs";
|
|
133
135
|
import generatePicker from "./DatePicker/generatePicker.mjs";
|
|
134
136
|
import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "./DatePicker/locale.mjs";
|
|
135
137
|
import "./DatePicker/index.mjs";
|
|
@@ -414,4 +416,4 @@ import { useFormContext } from "./Form/context.mjs";
|
|
|
414
416
|
import { Form } from "./Form/index.mjs";
|
|
415
417
|
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
416
418
|
import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
|
|
417
|
-
export { A, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, type LobePrimaryColor, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
|
|
419
|
+
export { A, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, type LegacyDateInput, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, type LobePrimaryColor, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
|
package/es/index.mjs
CHANGED
|
@@ -109,6 +109,8 @@ import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "
|
|
|
109
109
|
import generatePicker from "./DatePicker/generatePicker.mjs";
|
|
110
110
|
import DatePicker from "./DatePicker/DatePicker.mjs";
|
|
111
111
|
import DateRangePicker from "./DatePicker/DateRangePicker.mjs";
|
|
112
|
+
import DayjsDatePicker from "./DatePicker/DayjsDatePicker.mjs";
|
|
113
|
+
import DayjsDateRangePicker from "./DatePicker/DayjsDateRangePicker.mjs";
|
|
112
114
|
import Descriptions from "./Descriptions/Descriptions.mjs";
|
|
113
115
|
import Divider from "./Divider/Divider.mjs";
|
|
114
116
|
import DownloadButton from "./DownloadButton/DownloadButton.mjs";
|
|
@@ -220,4 +222,4 @@ import { ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroup
|
|
|
220
222
|
import ToggleGroup from "./ToggleGroup/ToggleGroup.mjs";
|
|
221
223
|
import { rehypeStreamAnimated } from "@lobehub/streamdown";
|
|
222
224
|
import { ErrorBoundary } from "react-error-boundary";
|
|
223
|
-
export { A, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
|
|
225
|
+
export { A, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
|