@lobehub/ui 5.63.4 → 5.64.1
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/base-ui/DatePicker/DatePicker.d.mts +7 -2
- package/es/base-ui/DatePicker/DatePicker.mjs +13 -83
- package/es/base-ui/DatePicker/DatePicker.mjs.map +1 -1
- package/es/base-ui/DatePicker/DateRangePicker.d.mts +3 -2
- package/es/base-ui/DatePicker/DateRangePicker.mjs +3 -123
- package/es/base-ui/DatePicker/DateRangePicker.mjs.map +1 -1
- package/es/base-ui/DatePicker/PurePanel.mjs +80 -0
- package/es/base-ui/DatePicker/PurePanel.mjs.map +1 -0
- package/es/base-ui/DatePicker/RangePicker.mjs +120 -0
- package/es/base-ui/DatePicker/RangePicker.mjs.map +1 -0
- package/es/base-ui/DatePicker/SinglePicker.mjs +143 -0
- package/es/base-ui/DatePicker/SinglePicker.mjs.map +1 -0
- package/es/base-ui/DatePicker/generateConfig.mjs +12 -0
- package/es/base-ui/DatePicker/generateConfig.mjs.map +1 -0
- package/es/base-ui/DatePicker/generatePicker.d.mts +12 -0
- package/es/base-ui/DatePicker/generatePicker.mjs +22 -0
- package/es/base-ui/DatePicker/generatePicker.mjs.map +1 -0
- package/es/base-ui/DatePicker/index.d.mts +4 -3
- package/es/base-ui/DatePicker/locale.d.mts +16 -0
- package/es/base-ui/DatePicker/locale.mjs +136 -0
- package/es/base-ui/DatePicker/locale.mjs.map +1 -0
- package/es/base-ui/DatePicker/semantic.mjs +34 -0
- package/es/base-ui/DatePicker/semantic.mjs.map +1 -0
- package/es/base-ui/DatePicker/style.mjs +990 -139
- package/es/base-ui/DatePicker/style.mjs.map +1 -1
- package/es/base-ui/DatePicker/type.d.mts +281 -25
- package/es/base-ui/DatePicker/usePanelKeyboard.mjs +230 -0
- package/es/base-ui/DatePicker/usePanelKeyboard.mjs.map +1 -0
- package/es/base-ui/DatePicker/usePickerShared.mjs +136 -0
- package/es/base-ui/DatePicker/usePickerShared.mjs.map +1 -0
- package/es/base-ui/DatePicker/usePresetActive.mjs +48 -0
- package/es/base-ui/DatePicker/usePresetActive.mjs.map +1 -0
- package/es/base-ui/Text/style.d.mts +1 -1
- package/es/base-ui/index.d.mts +4 -3
- package/es/base-ui/index.mjs +3 -1
- package/es/i18n/resources/en/datePicker.d.mts +47 -0
- package/es/i18n/resources/en/datePicker.mjs +48 -1
- package/es/i18n/resources/en/datePicker.mjs.map +1 -1
- package/es/i18n/resources/zhCn/datePicker.d.mts +47 -0
- package/es/i18n/resources/zhCn/datePicker.mjs +48 -1
- package/es/i18n/resources/zhCn/datePicker.mjs.map +1 -1
- package/es/i18n/resources/zhCn/index.mjs +1 -1
- package/es/utils/styleEngine.mjs +1 -0
- package/package.json +2 -1
- package/es/base-ui/DatePicker/CalendarPanel.mjs +0 -188
- package/es/base-ui/DatePicker/CalendarPanel.mjs.map +0 -1
- package/es/base-ui/DatePicker/PickerShell.mjs +0 -43
- package/es/base-ui/DatePicker/PickerShell.mjs.map +0 -1
- package/es/base-ui/DatePicker/calendar.d.mts +0 -5
- package/es/base-ui/DatePicker/calendar.mjs +0 -46
- package/es/base-ui/DatePicker/calendar.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelKeyboard.mjs","names":["dayjsGenerateConfig"],"sources":["../../../src/base-ui/DatePicker/usePanelKeyboard.tsx"],"sourcesContent":["'use client';\n\nimport type { GenerateConfig } from '@rc-component/picker/generate';\nimport type { CellRender, PanelMode, PickerMode } from '@rc-component/picker/interface';\nimport { useCallback, useEffect, useId, useRef, useState } from 'react';\n\nimport dayjsGenerateConfig from './generateConfig';\nimport { PREFIX_CLS } from './style';\n\n/** Panels with a fixed grid of month / quarter / year / decade tiles. */\nexport type GridPanelMode = 'decade' | 'month' | 'quarter' | 'year';\n\nconst isGridMode = (mode?: PanelMode): mode is GridPanelMode =>\n mode === 'month' || mode === 'quarter' || mode === 'year' || mode === 'decade';\n\n/** Cell steps per panel: one cell (←/→), one row (↑/↓) and one page (PageUp/PageDown). */\nconst GRID: Record<\n GridPanelMode,\n { col: number; page: number; row: number; unit: 'month' | 'year' }\n> = {\n decade: { col: 10, page: 100, row: 30, unit: 'year' },\n month: { col: 1, page: 12, row: 3, unit: 'month' },\n quarter: { col: 3, page: 12, row: 12, unit: 'month' },\n year: { col: 1, page: 10, row: 3, unit: 'year' },\n};\n\n// Date math goes through rc-picker's `generateConfig`, so `generatePicker` works with any\n// date library; the default is the Dayjs one.\nconst defaultConfig = dayjsGenerateConfig as GenerateConfig<any>;\n\n/** Months since year 0, to compare tiles by position. */\nconst monthIndex = <D,>(date: D, config: GenerateConfig<D>) =>\n config.getYear(date) * 12 + config.getMonth(date);\n\n/** First cell of the page `date` is on: Jan / Q1 of its year, first year of its decade… */\nexport const getPageStart = <D,>(\n date: D,\n mode: GridPanelMode,\n config: GenerateConfig<D> = defaultConfig,\n) => {\n const year = config.getYear(date);\n const startYear =\n mode === 'year'\n ? Math.floor(year / 10) * 10\n : mode === 'decade'\n ? Math.floor(year / 100) * 100\n : year;\n const start = config.setDate(config.setMonth(config.setYear(date, startYear), 0), 1);\n return config.setHour(\n config.setMinute(config.setSecond(config.setMillisecond(start, 0), 0), 0),\n 0,\n );\n};\n\nconst getPageEnd = <D,>(date: D, mode: GridPanelMode, config: GenerateConfig<D>) => {\n const start = getPageStart(date, mode, config);\n if (mode === 'month') return config.setMonth(start, 11);\n if (mode === 'quarter') return config.setMonth(start, 9);\n return config.addYear(start, mode === 'year' ? 9 : 90);\n};\n\n/** Whether `a` and `b` fall in the same tile of a `mode` panel. */\nexport const isSameCell = <D,>(\n a: D,\n b: D,\n mode: GridPanelMode,\n config: GenerateConfig<D> = defaultConfig,\n) => {\n const yearA = config.getYear(a);\n const yearB = config.getYear(b);\n if (mode === 'decade') return Math.floor(yearA / 10) === Math.floor(yearB / 10);\n if (mode === 'year') return yearA === yearB;\n if (mode === 'quarter') {\n return (\n yearA === yearB && Math.floor(config.getMonth(a) / 3) === Math.floor(config.getMonth(b) / 3)\n );\n }\n return yearA === yearB && config.getMonth(a) === config.getMonth(b);\n};\n\n/**\n * Where `key` moves the active tile of a `mode` panel, or `undefined` for other keys.\n * `rtl` mirrors ←/→.\n */\nexport const moveGridCell = <D,>(\n date: D,\n key: string,\n mode: GridPanelMode,\n rtl = false,\n config: GenerateConfig<D> = defaultConfig,\n) => {\n const { col, page, row, unit } = GRID[mode];\n const add = (diff: number) =>\n unit === 'year' ? config.addYear(date, diff) : config.addMonth(date, diff);\n switch (key) {\n case 'ArrowLeft': {\n return add(rtl ? col : -col);\n }\n case 'ArrowRight': {\n return add(rtl ? -col : col);\n }\n case 'ArrowUp': {\n return add(-row);\n }\n case 'ArrowDown': {\n return add(row);\n }\n case 'PageUp': {\n return add(-page);\n }\n case 'PageDown': {\n return add(page);\n }\n case 'Home': {\n return getPageStart(date, mode, config);\n }\n case 'End': {\n return getPageEnd(date, mode, config);\n }\n }\n};\n\nconst ACTIVE_CLS = `${PREFIX_CLS}-cell-keyboard-active`;\n\n/** A date of the picker's library (`Dayjs` by default). */\ntype DateValue = object;\ntype Pair = [DateValue | undefined, DateValue | undefined];\ntype MaybePair<T> = T | [T, T] | null | undefined;\n\nconst toPair = (value: MaybePair<DateValue | null | undefined>): Pair =>\n Array.isArray(value)\n ? [value[0] ?? undefined, value[1] ?? undefined]\n : [value ?? undefined, undefined];\n\n/** The selection the keys start from; with `multiple`, the last picked date. */\nconst toValuePair = (\n value: MaybePair<DateValue | null | undefined> | DateValue[],\n range?: boolean,\n) =>\n !range && Array.isArray(value) ? toPair(value.at(-1)) : toPair(value as MaybePair<DateValue>);\n\nexport interface PanelKeyboardOptions {\n cellRender?: CellRender<any>;\n dateRender?: (currentDate: any, today: any) => React.ReactNode;\n defaultOpen?: boolean;\n defaultPickerValue?: MaybePair<DateValue | null | undefined>;\n /** An array with DatePicker `multiple`. */\n defaultValue?: MaybePair<DateValue | null | undefined> | DateValue[];\n direction?: 'ltr' | 'rtl';\n generateConfig?: GenerateConfig<any>;\n mode?: MaybePair<PanelMode>;\n monthCellRender?: (currentDate: any, locale: any) => React.ReactNode;\n onChange?: (...args: any[]) => void;\n onFocus?: (...args: any[]) => void;\n onOpenChange?: (open: boolean) => void;\n onPanelChange?: (...args: any[]) => void;\n onPickerValueChange?: (...args: any[]) => void;\n open?: boolean;\n picker?: PickerMode;\n pickerValue?: MaybePair<DateValue | null | undefined>;\n /** RangePicker: values, panel modes and picker values are `[start, end]` tuples. */\n range?: boolean;\n value?: MaybePair<DateValue | null | undefined> | DateValue[];\n}\n\n/**\n * lobe enhancement over rc-picker (ADR §8 step 6): arrow keys, PageUp / PageDown and\n * Home / End move an active tile on the month, quarter, year and decade panels while\n * focus stays in the input, and Enter picks it — as a click on that tile would.\n *\n * rc-picker has no grid navigation of its own, so this is layered on top: a capture\n * listener reads the keys before rc-picker's input handlers, the active tile is marked\n * through `cellRender`, and `pickerValue` is driven so the active tile stays on screen.\n * The date and week panels keep the input's text-editing keys, as in antd.\n */\nexport const usePanelKeyboard = ({\n cellRender,\n dateRender,\n defaultOpen,\n defaultPickerValue,\n defaultValue,\n direction,\n generateConfig: config = defaultConfig,\n mode,\n monthCellRender,\n onChange,\n onFocus,\n onOpenChange,\n onPanelChange,\n onPickerValueChange,\n open,\n picker = 'date',\n pickerValue,\n range,\n value,\n}: PanelKeyboardOptions) => {\n const scopeId = useId();\n const scopeClassName = `${PREFIX_CLS}-kb-${scopeId.replaceAll(/[^\\w-]/g, '')}`;\n\n const [innerOpen, setInnerOpen] = useState(!!defaultOpen);\n const mergedOpen = open ?? innerOpen;\n const [activeIndex, setActiveIndex] = useState<0 | 1>(0);\n const [innerMode, setInnerMode] = useState<PanelMode>(picker);\n const [innerPickerValue, setInnerPickerValue] = useState<Pair>([undefined, undefined]);\n const [activeCell, setActiveCell] = useState<DateValue>();\n // Uncontrolled: the last committed value, so the first key starts from it.\n const [innerValue, setInnerValue] = useState<Pair>();\n\n const controlledMode = Array.isArray(mode) ? mode[activeIndex] : mode;\n const panelMode = controlledMode ?? innerMode;\n\n // rc-picker resets the panel to `picker` on every opening and field switch; a new\n // panel starts without a highlighted tile.\n const resetKey = `${mergedOpen}|${activeIndex}|${picker}`;\n const [prevResetKey, setPrevResetKey] = useState(resetKey);\n if (prevResetKey !== resetKey) {\n setPrevResetKey(resetKey);\n setInnerMode(picker);\n setActiveCell(undefined);\n }\n const [prevPanelMode, setPrevPanelMode] = useState(panelMode);\n if (prevPanelMode !== panelMode) {\n setPrevPanelMode(panelMode);\n setActiveCell(undefined);\n }\n\n const mergedPickerValue: Pair =\n pickerValue === undefined ? innerPickerValue : toPair(pickerValue);\n\n const state = {\n activeCell,\n activeIndex,\n config,\n defaultPickerValue: toPair(defaultPickerValue),\n direction,\n mergedPickerValue,\n onPickerValueChange,\n panelMode,\n picker,\n range,\n value:\n value === undefined\n ? (innerValue ?? toValuePair(defaultValue, range))\n : toValuePair(value, range),\n };\n const stateRef = useRef(state);\n stateRef.current = state;\n\n const commitPickerValue = useCallback((next: DateValue) => {\n const { activeIndex, mergedPickerValue, onPickerValueChange, panelMode, range } =\n stateRef.current;\n const nextPair: Pair = [...mergedPickerValue];\n nextPair[activeIndex] = next;\n setInnerPickerValue(nextPair);\n if (range) {\n onPickerValueChange?.(nextPair, {\n mode: [panelMode, panelMode],\n range: activeIndex === 1 ? 'end' : 'start',\n source: 'panel',\n });\n } else {\n onPickerValueChange?.(next, { mode: panelMode, source: 'panel' });\n }\n }, []);\n\n useEffect(() => {\n if (!mergedOpen) return;\n\n const onKeyDown = (event: KeyboardEvent) => {\n const {\n activeCell,\n activeIndex,\n config,\n defaultPickerValue,\n direction,\n mergedPickerValue,\n panelMode,\n picker,\n range,\n value,\n } = stateRef.current;\n if (!isGridMode(panelMode) || event.altKey || event.ctrlKey || event.metaKey) return;\n if (!(event.target instanceof Element) || !event.target.closest(`.${scopeClassName}`)) return;\n\n if (event.key === 'Enter') {\n if (!activeCell) return;\n const cells = [...document.querySelectorAll(`.${scopeClassName} .${ACTIVE_CLS}`)]\n .map((node) => node.closest('td'))\n .filter((node): node is HTMLTableCellElement => !!node);\n const cell = cells.find((node) => node.classList.contains(`${PREFIX_CLS}-cell-in-view`));\n event.preventDefault();\n event.stopPropagation();\n (cell ?? cells[0])?.click();\n return;\n }\n\n // Until rc-picker reports a change, its panel date is the same fallback chain.\n const pageDate =\n mergedPickerValue[activeIndex] ??\n defaultPickerValue[activeIndex] ??\n value[activeIndex] ??\n config.getNow();\n const rtl = direction === 'rtl';\n // Two side-by-side pages on a RangePicker showing its own `picker` panel.\n const pages = range && panelMode === picker ? 2 : 1;\n const pageIndex = (date: DateValue) =>\n monthIndex(getPageStart(date, panelMode, config), config);\n const firstPage = pageIndex(pageDate);\n const lastPage = pageIndex(moveGridCell(pageDate, 'PageDown', panelMode, rtl, config)!);\n const isVisible = (date: DateValue) => {\n const page = pageIndex(date);\n return page === firstPage || (pages === 2 && page === lastPage);\n };\n\n // The first key starts from the selected tile when on screen, otherwise from the page.\n const selected = value[activeIndex];\n const base =\n activeCell && isVisible(activeCell)\n ? activeCell\n : selected && isVisible(selected)\n ? selected\n : undefined;\n const next = base\n ? moveGridCell(base, event.key, panelMode, rtl, config)\n : moveGridCell(pageDate, event.key, panelMode, rtl, config) && pageDate;\n if (!next) return;\n\n event.preventDefault();\n event.stopPropagation();\n setActiveCell(next);\n\n if (pageIndex(next) < firstPage) {\n commitPickerValue(next);\n } else if (!isVisible(next)) {\n commitPickerValue(\n pages === 2 ? moveGridCell(next, 'PageUp', panelMode, rtl, config)! : next,\n );\n }\n };\n\n document.addEventListener('keydown', onKeyDown, true);\n return () => document.removeEventListener('keydown', onKeyDown, true);\n }, [mergedOpen, scopeClassName, commitPickerValue]);\n\n const mergedCellRender: CellRender<any> = (current, info) => {\n let node: React.ReactNode = info.originNode;\n if (cellRender) node = cellRender(current, info);\n // rc-picker's legacy aliases: only date / month cells, which always get a date.\n else if (dateRender && info.type === 'date') node = dateRender(current, info.today);\n else if (monthCellRender && info.type === 'month') {\n node = monthCellRender(current, info.locale);\n }\n\n if (!activeCell || info.type !== panelMode || !isGridMode(info.type)) return node;\n if (!isSameCell(current as DateValue, activeCell, info.type, config)) return node;\n return (\n <>\n {node}\n <span aria-hidden className={ACTIVE_CLS} />\n </>\n );\n };\n\n const hasPickerValue = pickerValue !== undefined || innerPickerValue.some(Boolean);\n\n return {\n cellRender: mergedCellRender,\n onChange: (date: any, dateString: any) => {\n setInnerValue(toValuePair(date, range));\n onChange?.(date, dateString);\n },\n onFocus: (event: any, info?: { range?: 'end' | 'start' }) => {\n if (range && info?.range) setActiveIndex(info.range === 'end' ? 1 : 0);\n onFocus?.(event, info);\n },\n onOpenChange: (next: boolean) => {\n setInnerOpen(next);\n onOpenChange?.(next);\n },\n onPanelChange: (date: any, nextMode: any) => {\n setInnerMode(Array.isArray(nextMode) ? nextMode[stateRef.current.activeIndex] : nextMode);\n onPanelChange?.(date, nextMode);\n },\n onPickerValueChange: (date: any, info: any) => {\n setInnerPickerValue(toPair(date));\n onPickerValueChange?.(date, info);\n },\n /** Controlled once known, so a key can move the visible page. */\n pickerValue: hasPickerValue\n ? range\n ? (mergedPickerValue as any)\n : mergedPickerValue[0]\n : undefined,\n scopeClassName,\n };\n};\n"],"mappings":";;;;;;AAYA,MAAM,cAAc,SAClB,SAAS,WAAW,SAAS,aAAa,SAAS,UAAU,SAAS;;AAGxE,MAAM,OAGF;CACF,QAAQ;EAAE,KAAK;EAAI,MAAM;EAAK,KAAK;EAAI,MAAM;CAAO;CACpD,OAAO;EAAE,KAAK;EAAG,MAAM;EAAI,KAAK;EAAG,MAAM;CAAQ;CACjD,SAAS;EAAE,KAAK;EAAG,MAAM;EAAI,KAAK;EAAI,MAAM;CAAQ;CACpD,MAAM;EAAE,KAAK;EAAG,MAAM;EAAI,KAAK;EAAG,MAAM;CAAO;AACjD;AAIA,MAAM,gBAAgBA;;AAGtB,MAAM,cAAkB,MAAS,WAC/B,OAAO,QAAQ,IAAI,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gBAAgB,MAAW,aAAkB;GAC3C,aAAa,MAAM,QAAQ,QAAQ,IAAI,SAAS,SAAS,QAAQ,eAAe,QAAQ;GACxF,gBAAgB,MAAM,QAAQ;EAChC;EACA,sBAAsB,MAAW,SAAc;GAC7C,oBAAoB,OAAO,IAAI,CAAC;GAChC,sBAAsB,MAAM,IAAI;EAClC;;EAEA,aAzBqB,gBAAgB,KAAA,KAAa,iBAAiB,KAAK,OAAO,IA0B3E,QACG,oBACD,kBAAkB,KACpB,KAAA;EACJ;CACF;AACF"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useFloatingLayer } from "../../hooks/useFloatingLayer.mjs";
|
|
3
|
+
import { useAppElement } from "../../ThemeProvider/AppElementContext.mjs";
|
|
4
|
+
import Icon from "../../Icon/Icon.mjs";
|
|
5
|
+
import Button from "../Button/Button.mjs";
|
|
6
|
+
import { acquireLayerZIndex } from "../zIndex/manager.mjs";
|
|
7
|
+
import { rootVariants } from "../Input/style.mjs";
|
|
8
|
+
import generateConfig from "./generateConfig.mjs";
|
|
9
|
+
import { cx, useThemeMode } from "../../utils/styleEngine.mjs";
|
|
10
|
+
import { PREFIX_CLS, styles } from "./style.mjs";
|
|
11
|
+
import { mergePickerSemantic } from "./semantic.mjs";
|
|
12
|
+
import { useCallback, useLayoutEffect, useMemo, useState } from "react";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
import { CalendarIcon, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Clock, X } from "lucide-react";
|
|
15
|
+
//#region src/base-ui/DatePicker/usePickerShared.tsx
|
|
16
|
+
/** antd's `PickerButton`: the panel's OK button is a small primary button. */
|
|
17
|
+
const PickerButton = (props) => /* @__PURE__ */ jsx(Button, {
|
|
18
|
+
size: "small",
|
|
19
|
+
type: "primary",
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
const defaultClearIcon = /* @__PURE__ */ jsx(Icon, {
|
|
23
|
+
icon: X,
|
|
24
|
+
size: 10,
|
|
25
|
+
style: { strokeWidth: 3 }
|
|
26
|
+
});
|
|
27
|
+
/** `undefined` falls back to the lobe icon; `null` (as in antd) renders nothing. */
|
|
28
|
+
const withDefault = (node, fallback) => node === void 0 ? fallback : node;
|
|
29
|
+
/**
|
|
30
|
+
* Wiring shared by DatePicker and RangePicker: lobe prefix, dayjs adapter, base-ui
|
|
31
|
+
* Input look, lucide icons, and the popup container / z-index.
|
|
32
|
+
*
|
|
33
|
+
* rc-trigger keeps the popup inside every clipping ancestor of its container, so like
|
|
34
|
+
* antd it mounts on `document.body` and carries the theme's `css-var-*` scope class —
|
|
35
|
+
* except inside a base-ui floating layer or dialog, where it nests so picking a date is
|
|
36
|
+
* not an outside press for the host.
|
|
37
|
+
*/
|
|
38
|
+
const usePickerShared = ({ allowClear = true, bordered, changeOnBlur, className, clearIcon, classNames, components, defaultOpen, dropdownClassName, generateConfig: generateConfig$1 = generateConfig, getPopupContainer, max, maxDate, min, minDate, needConfirm, nextIcon, onKeyDown, onOpenChange, open, picker, popupClassName, popupStyle, prevIcon, rootClassName, semanticProps, shadow, size, status, styles: styles$1, suffixIcon, superNextIcon, superPrevIcon, transitionName, variant }) => {
|
|
39
|
+
const { isDarkMode } = useThemeMode();
|
|
40
|
+
const floatingLayer = useFloatingLayer();
|
|
41
|
+
const appElement = useAppElement();
|
|
42
|
+
const mergedVariant = variant ?? (bordered === false ? "borderless" : isDarkMode ? "filled" : "outlined");
|
|
43
|
+
const [innerOpen, setInnerOpen] = useState(!!defaultOpen);
|
|
44
|
+
const mergedOpen = open ?? innerOpen;
|
|
45
|
+
const [zIndex, setZIndex] = useState();
|
|
46
|
+
useLayoutEffect(() => {
|
|
47
|
+
if (mergedOpen) setZIndex(acquireLayerZIndex("floating"));
|
|
48
|
+
}, [mergedOpen]);
|
|
49
|
+
const defaultPopupContainer = useCallback((trigger) => floatingLayer ?? trigger.closest("[role=\"dialog\"]") ?? document.body, [floatingLayer]);
|
|
50
|
+
const themeScopeClassName = useMemo(() => {
|
|
51
|
+
const scope = appElement?.closest("[class*=\"css-var-\"]");
|
|
52
|
+
if (!scope) return void 0;
|
|
53
|
+
return [...scope.classList].filter((name) => name.startsWith("css-var-")).join(" ");
|
|
54
|
+
}, [appElement]);
|
|
55
|
+
const [semanticClassNames, semanticStyles] = mergePickerSemantic({
|
|
56
|
+
classNames,
|
|
57
|
+
popupClassName: popupClassName ?? dropdownClassName,
|
|
58
|
+
popupStyle,
|
|
59
|
+
props: {
|
|
60
|
+
...semanticProps,
|
|
61
|
+
size: size ?? "medium"
|
|
62
|
+
},
|
|
63
|
+
styles: styles$1
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
allowClear: allowClear && { clearIcon: (typeof allowClear === "object" ? allowClear.clearIcon : void 0) ?? clearIcon ?? defaultClearIcon },
|
|
67
|
+
classNames: {
|
|
68
|
+
...semanticClassNames,
|
|
69
|
+
popup: {
|
|
70
|
+
...semanticClassNames.popup,
|
|
71
|
+
root: cx(themeScopeClassName, isDarkMode && `lobe-picker-dropdown-dark`, semanticClassNames.popup.root)
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
className: cx(rootVariants({
|
|
75
|
+
shadow,
|
|
76
|
+
size: size === "medium" ? "middle" : size,
|
|
77
|
+
variant: mergedVariant === "underlined" ? "borderless" : mergedVariant
|
|
78
|
+
}), mergedVariant === "underlined" && styles.underlined, (size === "small" || size === "large") && `lobe-picker-${size}`, status && `lobe-picker-status-${status}`, `${PREFIX_CLS}-${mergedVariant}`, className),
|
|
79
|
+
components: {
|
|
80
|
+
button: PickerButton,
|
|
81
|
+
...components
|
|
82
|
+
},
|
|
83
|
+
defaultOpen,
|
|
84
|
+
generateConfig: generateConfig$1,
|
|
85
|
+
getPopupContainer: getPopupContainer ?? defaultPopupContainer,
|
|
86
|
+
maxDate: maxDate ?? max,
|
|
87
|
+
minDate: minDate ?? min,
|
|
88
|
+
needConfirm: needConfirm ?? (changeOnBlur ? false : void 0),
|
|
89
|
+
nextIcon: withDefault(nextIcon, /* @__PURE__ */ jsx(Icon, {
|
|
90
|
+
icon: ChevronRight,
|
|
91
|
+
size: 16
|
|
92
|
+
})),
|
|
93
|
+
onKeyDown: (event, preventDefault) => {
|
|
94
|
+
if (event.key === "Escape" && mergedOpen) event.stopPropagation();
|
|
95
|
+
onKeyDown?.(event, preventDefault);
|
|
96
|
+
},
|
|
97
|
+
onOpenChange: (next) => {
|
|
98
|
+
setInnerOpen(next);
|
|
99
|
+
onOpenChange?.(next);
|
|
100
|
+
},
|
|
101
|
+
open,
|
|
102
|
+
prefixCls: PREFIX_CLS,
|
|
103
|
+
prevIcon: withDefault(prevIcon, /* @__PURE__ */ jsx(Icon, {
|
|
104
|
+
icon: ChevronLeft,
|
|
105
|
+
size: 16
|
|
106
|
+
})),
|
|
107
|
+
rootClassName: cx(styles.root, rootClassName),
|
|
108
|
+
styles: {
|
|
109
|
+
...semanticStyles,
|
|
110
|
+
popup: {
|
|
111
|
+
...semanticStyles.popup,
|
|
112
|
+
root: {
|
|
113
|
+
zIndex,
|
|
114
|
+
...semanticStyles.popup.root
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
suffixIcon: withDefault(suffixIcon, /* @__PURE__ */ jsx(Icon, {
|
|
119
|
+
icon: picker === "time" ? Clock : CalendarIcon,
|
|
120
|
+
size: 14
|
|
121
|
+
})),
|
|
122
|
+
superNextIcon: withDefault(superNextIcon, /* @__PURE__ */ jsx(Icon, {
|
|
123
|
+
icon: ChevronsRight,
|
|
124
|
+
size: 16
|
|
125
|
+
})),
|
|
126
|
+
superPrevIcon: withDefault(superPrevIcon, /* @__PURE__ */ jsx(Icon, {
|
|
127
|
+
icon: ChevronsLeft,
|
|
128
|
+
size: 16
|
|
129
|
+
})),
|
|
130
|
+
transitionName: transitionName ?? `lobe-picker-slide-up`
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { usePickerShared, withDefault };
|
|
135
|
+
|
|
136
|
+
//# sourceMappingURL=usePickerShared.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePickerShared.mjs","names":["dayjsGenerateConfig","pickerStyles"],"sources":["../../../src/base-ui/DatePicker/usePickerShared.tsx"],"sourcesContent":["'use client';\n\nimport type { PickerProps as RcPickerProps } from '@rc-component/picker';\nimport type { GenerateConfig } from '@rc-component/picker/generate';\nimport {\n CalendarIcon,\n ChevronLeft,\n ChevronRight,\n ChevronsLeft,\n ChevronsRight,\n Clock,\n X,\n} from 'lucide-react';\nimport { type ReactNode, useCallback, useLayoutEffect, useMemo, useState } from 'react';\n\nimport Button from '@/base-ui/Button';\nimport { rootVariants } from '@/base-ui/Input/style';\nimport { acquireLayerZIndex } from '@/base-ui/zIndex';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport Icon from '@/Icon';\nimport { useAppElement } from '@/ThemeProvider/AppElementContext';\nimport { cx, useThemeMode } from '@/utils/styleEngine';\n\nimport dayjsGenerateConfig from './generateConfig';\nimport {\n type FilledPickerClassNames,\n type FilledPickerStyles,\n mergePickerSemantic,\n} from './semantic';\nimport { PREFIX_CLS, styles as pickerStyles } from './style';\nimport type { DatePickerBaseProps, PickerClassNames, PickerStyles } from './type';\n\ntype SharedInput = Pick<\n DatePickerBaseProps<any>,\n | 'allowClear'\n | 'bordered'\n | 'changeOnBlur'\n | 'className'\n | 'clearIcon'\n | 'components'\n | 'defaultOpen'\n | 'getPopupContainer'\n | 'max'\n | 'maxDate'\n | 'min'\n | 'minDate'\n | 'needConfirm'\n | 'nextIcon'\n | 'onKeyDown'\n | 'onOpenChange'\n | 'open'\n | 'picker'\n | 'prevIcon'\n | 'rootClassName'\n | 'dropdownClassName'\n | 'popupClassName'\n | 'popupStyle'\n | 'shadow'\n | 'size'\n | 'status'\n | 'suffixIcon'\n | 'superNextIcon'\n | 'superPrevIcon'\n | 'transitionName'\n | 'variant'\n> & {\n classNames?: PickerClassNames;\n /** The date library adapter, from `generatePicker`; Dayjs by default. */\n generateConfig?: GenerateConfig<any>;\n /** The picker's props, passed as `info.props` to the function forms of `classNames` / `styles`. */\n semanticProps: object;\n styles?: PickerStyles;\n};\n\ntype SharedOutput = Pick<\n RcPickerProps<any>,\n | 'allowClear'\n | 'className'\n | 'components'\n | 'defaultOpen'\n | 'generateConfig'\n | 'getPopupContainer'\n | 'maxDate'\n | 'minDate'\n | 'needConfirm'\n | 'nextIcon'\n | 'onKeyDown'\n | 'onOpenChange'\n | 'open'\n | 'prefixCls'\n | 'prevIcon'\n | 'rootClassName'\n | 'suffixIcon'\n | 'superNextIcon'\n | 'superPrevIcon'\n | 'transitionName'\n> & { classNames: FilledPickerClassNames; styles: FilledPickerStyles };\n\n/** antd's `PickerButton`: the panel's OK button is a small primary button. */\nconst PickerButton = (props: {\n children?: ReactNode;\n disabled?: boolean;\n onClick?: () => void;\n}) => <Button size=\"small\" type=\"primary\" {...props} />;\n\nconst defaultClearIcon = <Icon icon={X} size={10} style={{ strokeWidth: 3 }} />;\n\n/** `undefined` falls back to the lobe icon; `null` (as in antd) renders nothing. */\nexport const withDefault = (node: ReactNode, fallback: ReactNode) =>\n node === undefined ? fallback : node;\n\n/**\n * Wiring shared by DatePicker and RangePicker: lobe prefix, dayjs adapter, base-ui\n * Input look, lucide icons, and the popup container / z-index.\n *\n * rc-trigger keeps the popup inside every clipping ancestor of its container, so like\n * antd it mounts on `document.body` and carries the theme's `css-var-*` scope class —\n * except inside a base-ui floating layer or dialog, where it nests so picking a date is\n * not an outside press for the host.\n */\nexport const usePickerShared = ({\n allowClear = true,\n bordered,\n changeOnBlur,\n className,\n clearIcon,\n classNames,\n components,\n defaultOpen,\n dropdownClassName,\n generateConfig = dayjsGenerateConfig,\n getPopupContainer,\n max,\n maxDate,\n min,\n minDate,\n needConfirm,\n nextIcon,\n onKeyDown,\n onOpenChange,\n open,\n picker,\n popupClassName,\n popupStyle,\n prevIcon,\n rootClassName,\n semanticProps,\n shadow,\n size,\n status,\n styles,\n suffixIcon,\n superNextIcon,\n superPrevIcon,\n transitionName,\n variant,\n}: SharedInput): SharedOutput => {\n const { isDarkMode } = useThemeMode();\n const floatingLayer = useFloatingLayer();\n const appElement = useAppElement();\n\n // As in antd: an explicit `variant` wins over the deprecated `bordered`.\n const mergedVariant =\n variant ?? (bordered === false ? 'borderless' : isDarkMode ? 'filled' : 'outlined');\n\n const [innerOpen, setInnerOpen] = useState(!!defaultOpen);\n const mergedOpen = open ?? innerOpen;\n const [zIndex, setZIndex] = useState<number>();\n\n // Each opening takes the next slot, so a picker opened from a Modal / Popover stacks above it.\n useLayoutEffect(() => {\n if (mergedOpen) setZIndex(acquireLayerZIndex('floating'));\n }, [mergedOpen]);\n\n const defaultPopupContainer = useCallback(\n (trigger: HTMLElement) =>\n floatingLayer ?? trigger.closest<HTMLElement>('[role=\"dialog\"]') ?? document.body,\n [floatingLayer],\n );\n\n // The CSS variables behind `cssVar` tokens (incl. dark mode) live on this class.\n const themeScopeClassName = useMemo(() => {\n const scope = appElement?.closest('[class*=\"css-var-\"]');\n if (!scope) return undefined;\n return [...scope.classList].filter((name) => name.startsWith('css-var-')).join(' ');\n }, [appElement]);\n\n // As in antd, `info.props` carries the merged size.\n const [semanticClassNames, semanticStyles] = mergePickerSemantic({\n classNames,\n popupClassName: popupClassName ?? dropdownClassName,\n popupStyle,\n props: { ...semanticProps, size: size ?? 'medium' },\n styles,\n });\n\n return {\n allowClear: allowClear && {\n clearIcon:\n (typeof allowClear === 'object' ? allowClear.clearIcon : undefined) ??\n clearIcon ??\n defaultClearIcon,\n },\n classNames: {\n ...semanticClassNames,\n popup: {\n ...semanticClassNames.popup,\n root: cx(\n themeScopeClassName,\n isDarkMode && `${PREFIX_CLS}-dropdown-dark`,\n semanticClassNames.popup.root,\n ),\n },\n },\n className: cx(\n rootVariants({\n shadow,\n size: size === 'medium' ? 'middle' : size,\n variant: mergedVariant === 'underlined' ? 'borderless' : mergedVariant,\n }),\n mergedVariant === 'underlined' && pickerStyles.underlined,\n (size === 'small' || size === 'large') && `${PREFIX_CLS}-${size}`,\n status && `${PREFIX_CLS}-status-${status}`,\n `${PREFIX_CLS}-${mergedVariant}`,\n className,\n ),\n components: { button: PickerButton, ...components },\n defaultOpen,\n generateConfig,\n getPopupContainer: getPopupContainer ?? defaultPopupContainer,\n maxDate: maxDate ?? max,\n minDate: minDate ?? min,\n // rc-picker dropped `changeOnBlur`; committing on close is what `needConfirm={false}` does.\n needConfirm: needConfirm ?? (changeOnBlur ? false : undefined),\n nextIcon: withDefault(nextIcon, <Icon icon={ChevronRight} size={16} />),\n // Escape closes only the popup, not a Modal / Popover hosting the picker.\n onKeyDown: (event, preventDefault) => {\n if (event.key === 'Escape' && mergedOpen) event.stopPropagation();\n onKeyDown?.(event, preventDefault);\n },\n onOpenChange: (next: boolean) => {\n setInnerOpen(next);\n onOpenChange?.(next);\n },\n open,\n prefixCls: PREFIX_CLS,\n prevIcon: withDefault(prevIcon, <Icon icon={ChevronLeft} size={16} />),\n rootClassName: cx(pickerStyles.root, rootClassName),\n styles: {\n ...semanticStyles,\n popup: { ...semanticStyles.popup, root: { zIndex, ...semanticStyles.popup.root } },\n },\n suffixIcon: withDefault(\n suffixIcon,\n <Icon icon={picker === 'time' ? Clock : CalendarIcon} size={14} />,\n ),\n superNextIcon: withDefault(superNextIcon, <Icon icon={ChevronsRight} size={16} />),\n superPrevIcon: withDefault(superPrevIcon, <Icon icon={ChevronsLeft} size={16} />),\n transitionName: transitionName ?? `${PREFIX_CLS}-slide-up`,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAmGA,MAAM,gBAAgB,UAIhB,oBAAC,QAAD;CAAQ,MAAK;CAAQ,MAAK;CAAU,GAAI;AAAQ,CAAA;AAEtD,MAAM,mBAAmB,oBAAC,MAAD;CAAM,MAAM;CAAG,MAAM;CAAI,OAAO,EAAE,aAAa,EAAE;AAAI,CAAA;;AAG9E,MAAa,eAAe,MAA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CAAA,CAAC;EAChF,gBAAgB,kBAAkB;CACpC;AACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PREFIX_CLS } from "./style.mjs";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/base-ui/DatePicker/usePresetActive.tsx
|
|
5
|
+
const sameDay = (a, b) => {
|
|
6
|
+
if (!a || !b) return !a && !b;
|
|
7
|
+
if (typeof a.isSame === "function") return a.isSame(b, "day");
|
|
8
|
+
return a === b;
|
|
9
|
+
};
|
|
10
|
+
const sameValue = (a, b) => {
|
|
11
|
+
if (Array.isArray(a) || Array.isArray(b)) {
|
|
12
|
+
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
13
|
+
return a.every((item, i) => sameDay(item, b[i]));
|
|
14
|
+
}
|
|
15
|
+
return sameDay(a, b);
|
|
16
|
+
};
|
|
17
|
+
const PRESET_ACTIVE_CLS = `${PREFIX_CLS}-preset-active`;
|
|
18
|
+
/**
|
|
19
|
+
* rc-picker renders `presets` as the popup sidebar but has no "current preset" state.
|
|
20
|
+
* Mirror the picked value (controlled or not) and wrap the matching preset's label so the
|
|
21
|
+
* sidebar can show it as selected (`li:has(> .lobe-picker-preset-active)`).
|
|
22
|
+
*/
|
|
23
|
+
const usePresetActive = (presets, value, defaultValue) => {
|
|
24
|
+
const [inner, setInner] = useState(defaultValue);
|
|
25
|
+
const current = value !== void 0 ? value : inner;
|
|
26
|
+
const track = useCallback((next) => setInner(next), []);
|
|
27
|
+
return {
|
|
28
|
+
presets: useMemo(() => {
|
|
29
|
+
if (!presets?.length || !current) return presets;
|
|
30
|
+
return presets.map((preset) => {
|
|
31
|
+
const v = typeof preset.value === "function" ? preset.value() : preset.value;
|
|
32
|
+
if (!sameValue(v, current)) return preset;
|
|
33
|
+
return {
|
|
34
|
+
...preset,
|
|
35
|
+
label: /* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: PRESET_ACTIVE_CLS,
|
|
37
|
+
children: preset.label
|
|
38
|
+
})
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}, [presets, current]),
|
|
42
|
+
track
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { PRESET_ACTIVE_CLS, usePresetActive };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=usePresetActive.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePresetActive.mjs","names":[],"sources":["../../../src/base-ui/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_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({
|
|
|
42
42
|
mark?: boolean | null | undefined;
|
|
43
43
|
shiny?: boolean | null | undefined;
|
|
44
44
|
strong?: boolean | null | undefined;
|
|
45
|
-
type?: "danger" | "
|
|
45
|
+
type?: "danger" | "warning" | "success" | "info" | "secondary" | null | undefined;
|
|
46
46
|
underline?: boolean | null | undefined;
|
|
47
47
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
48
48
|
//#endregion
|
package/es/base-ui/index.d.mts
CHANGED
|
@@ -122,10 +122,11 @@ import { ColorPickerProps } from "./ColorPicker/type.mjs";
|
|
|
122
122
|
import ColorPicker from "./ColorPicker/ColorPicker.mjs";
|
|
123
123
|
import "./ColorPicker/index.mjs";
|
|
124
124
|
import { ControlSize, controlHeight } from "./controlSize.mjs";
|
|
125
|
-
import { CalendarMode } from "./DatePicker/
|
|
126
|
-
import { DatePickerProps, DateRangePickerProps, DateRangeValue } from "./DatePicker/type.mjs";
|
|
125
|
+
import { CalendarMode, CellRender, CellRenderInfo, DatePickerBaseProps, DatePickerProps, DatePickerSemanticType, DatePickerType, DateRangePickerProps, DateRangeValue, GeneratedDatePicker, GenericTimePickerProps, MonthPickerProps, PanelMode, PickerClassNames, PickerComponents, PickerDateStrings, PickerLocale, PickerLocaleInput, PickerLocaleLang, PickerMode, PickerPanelProps, PickerPlacement, PickerPopupSemanticName, PickerProps, PickerPropsWithMultiple, PickerRef, PickerSemanticClassNames, PickerSemanticName, PickerSemanticStyles, PickerSize, PickerStatus, PickerStyles, PickerTagProps, PickerVariant, PresetDate, PresetPickerProps, QuarterPickerProps, RangeDisabledDate, RangeInfo, RangePickerComponent, RangePickerProps, RangePickerRef, SinglePickerComponent, TimePickerLocale, TimePickerProps, WeekPickerProps, YearPickerProps } from "./DatePicker/type.mjs";
|
|
127
126
|
import DatePicker from "./DatePicker/DatePicker.mjs";
|
|
128
127
|
import DateRangePicker from "./DatePicker/DateRangePicker.mjs";
|
|
128
|
+
import generatePicker from "./DatePicker/generatePicker.mjs";
|
|
129
|
+
import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "./DatePicker/locale.mjs";
|
|
129
130
|
import "./DatePicker/index.mjs";
|
|
130
131
|
import { DescriptionsItem, DescriptionsProps } from "./Descriptions/type.mjs";
|
|
131
132
|
import Descriptions from "./Descriptions/Descriptions.mjs";
|
|
@@ -230,4 +231,4 @@ import { TreeClassNames, TreeDataNode, TreeFlatRow, TreeProps, TreeStyles } from
|
|
|
230
231
|
import Tree from "./Tree/Tree.mjs";
|
|
231
232
|
import { conductCheck, flattenVisible, getAllKeys } from "./Tree/utils.mjs";
|
|
232
233
|
import "./Tree/index.mjs";
|
|
233
|
-
export { 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, 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 BaseModalProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, Divider, type DividerOrientation, type DividerProps, 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, 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, type FilterValue, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, 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, type IconSpaceMode, type ImperativeModalProps, _default$1 as Input, type InputClassNames, _default$2 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$3 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, 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, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, 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, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rate, type RateProps, 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, 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, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, type SortOrder, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$4 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, 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, Table, type TableBreakpoint, type TableCellAttributes, type TableClassNames, type TableColumn, 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, type TableCurrentDataSource, type TableExpandIconProps, type TableExpandableConfig, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, type TableHeaderCellAttributes, type TableLegacySemanticName, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePaginationPosition, type TableProps, type TableRef, type TableRenderedCell, type TableRowClassName, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, type TableScrollToConfig, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, type TableSummaryProps, type TableSummaryRowProps, 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$5 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, 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, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
|
|
234
|
+
export { 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, 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 BaseModalProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, Divider, type DividerOrientation, type DividerProps, 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, 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, type FilterValue, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, 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, type GeneratedDatePicker, type GenericTimePickerProps, type IconSpaceMode, type ImperativeModalProps, _default$1 as Input, type InputClassNames, _default$2 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$3 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, 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, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, 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, 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 PresetDate, type PresetPickerProps, 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, 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, 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, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, type SortOrder, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$4 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, 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, Table, type TableBreakpoint, type TableCellAttributes, type TableClassNames, type TableColumn, 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, type TableCurrentDataSource, type TableExpandIconProps, type TableExpandableConfig, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, type TableHeaderCellAttributes, type TableLegacySemanticName, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePaginationPosition, type TableProps, type TableRef, type TableRenderedCell, type TableRowClassName, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, type TableScrollToConfig, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, type TableSummaryProps, type TableSummaryRowProps, 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$5 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, 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, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, type WeekPickerProps, type YearPickerProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, generatePicker, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
|
package/es/base-ui/index.mjs
CHANGED
|
@@ -78,6 +78,8 @@ import { styles as styles$5 } from "./Checkbox/style.mjs";
|
|
|
78
78
|
import Checkbox_default from "./Checkbox/Checkbox.mjs";
|
|
79
79
|
import CheckboxGroup from "./Checkbox/CheckboxGroup.mjs";
|
|
80
80
|
import Collapsible from "./Collapsible/Collapsible.mjs";
|
|
81
|
+
import { createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN } from "./DatePicker/locale.mjs";
|
|
82
|
+
import generatePicker from "./DatePicker/generatePicker.mjs";
|
|
81
83
|
import DatePicker from "./DatePicker/DatePicker.mjs";
|
|
82
84
|
import DateRangePicker from "./DatePicker/DateRangePicker.mjs";
|
|
83
85
|
import Descriptions from "./Descriptions/Descriptions.mjs";
|
|
@@ -122,4 +124,4 @@ import Text from "./Text/Text.mjs";
|
|
|
122
124
|
import { styles as styles$13 } from "./ToggleGroup/style.mjs";
|
|
123
125
|
import { ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot } from "./ToggleGroup/atoms.mjs";
|
|
124
126
|
import ToggleGroup from "./ToggleGroup/ToggleGroup.mjs";
|
|
125
|
-
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Breadcrumb, Burger, Button, Carousel, Checkbox_default as Checkbox, CheckboxGroup, Collapsible, ColorPicker, ContextMenuHost, ContextMenuTrigger, DatePicker, DateRangePicker, Descriptions, Divider, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, 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, FloatingPanel, FloatingSheet, FocusScope, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, List, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, Pagination, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, 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, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, Table, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Upload, UploadDragger, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
|
|
127
|
+
export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Breadcrumb, Burger, Button, Carousel, Checkbox_default as Checkbox, CheckboxGroup, Collapsible, ColorPicker, ContextMenuHost, ContextMenuTrigger, DatePicker, DateRangePicker, Descriptions, Divider, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, 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, FloatingPanel, FloatingSheet, FocusScope, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, List, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, Pagination, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, 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, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, Table, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Upload, UploadDragger, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, createPickerLocale, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, generatePicker, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
|
|
@@ -1,12 +1,59 @@
|
|
|
1
1
|
//#region src/i18n/resources/en/datePicker.d.ts
|
|
2
2
|
declare const _default: {
|
|
3
|
+
readonly 'datePicker.backToToday': "Back to today";
|
|
4
|
+
readonly 'datePicker.cellDateFormat': "D";
|
|
5
|
+
readonly 'datePicker.cellQuarterFormat': "[Q]Q";
|
|
6
|
+
readonly 'datePicker.cellYearFormat': "YYYY";
|
|
7
|
+
readonly 'datePicker.clear': "Clear";
|
|
8
|
+
readonly 'datePicker.dateSelect': "select date";
|
|
9
|
+
readonly 'datePicker.decadeSelect': "Choose a decade";
|
|
3
10
|
readonly 'datePicker.endPlaceholder': "End date";
|
|
11
|
+
readonly 'datePicker.fieldDateFormat': "YYYY-MM-DD";
|
|
12
|
+
readonly 'datePicker.fieldMonthFormat': "YYYY-MM";
|
|
13
|
+
readonly 'datePicker.fieldQuarterFormat': "YYYY-[Q]Q";
|
|
14
|
+
readonly 'datePicker.fieldWeekFormat': "gggg-wo";
|
|
15
|
+
readonly 'datePicker.fieldYearFormat': "YYYY";
|
|
16
|
+
readonly 'datePicker.month': "Month";
|
|
17
|
+
readonly 'datePicker.monthBeforeYear': "true";
|
|
4
18
|
readonly 'datePicker.monthPlaceholder': "Select month";
|
|
19
|
+
readonly 'datePicker.monthSelect': "Choose a month";
|
|
5
20
|
readonly 'datePicker.next': "Next";
|
|
21
|
+
readonly 'datePicker.nextCentury': "Next century";
|
|
22
|
+
readonly 'datePicker.nextDecade': "Next decade";
|
|
23
|
+
readonly 'datePicker.nextMonth': "Next month";
|
|
24
|
+
readonly 'datePicker.nextYear': "Next year";
|
|
25
|
+
readonly 'datePicker.now': "Now";
|
|
26
|
+
readonly 'datePicker.ok': "OK";
|
|
6
27
|
readonly 'datePicker.placeholder': "Select date";
|
|
7
28
|
readonly 'datePicker.previous': "Previous";
|
|
29
|
+
readonly 'datePicker.previousCentury': "Last century";
|
|
30
|
+
readonly 'datePicker.previousDecade': "Last decade";
|
|
31
|
+
readonly 'datePicker.previousMonth': "Previous month";
|
|
32
|
+
readonly 'datePicker.previousYear': "Last year";
|
|
33
|
+
readonly 'datePicker.quarterPlaceholder': "Select quarter";
|
|
34
|
+
readonly 'datePicker.rangeMonthPlaceholder.end': "End month";
|
|
35
|
+
readonly 'datePicker.rangeMonthPlaceholder.start': "Start month";
|
|
36
|
+
readonly 'datePicker.rangeQuarterPlaceholder.end': "End quarter";
|
|
37
|
+
readonly 'datePicker.rangeQuarterPlaceholder.start': "Start quarter";
|
|
38
|
+
readonly 'datePicker.rangeTimePlaceholder.end': "End time";
|
|
39
|
+
readonly 'datePicker.rangeTimePlaceholder.start': "Start time";
|
|
40
|
+
readonly 'datePicker.rangeWeekPlaceholder.end': "End week";
|
|
41
|
+
readonly 'datePicker.rangeWeekPlaceholder.start': "Start week";
|
|
42
|
+
readonly 'datePicker.rangeYearPlaceholder.end': "End year";
|
|
43
|
+
readonly 'datePicker.rangeYearPlaceholder.start': "Start year";
|
|
44
|
+
readonly 'datePicker.shortMonths': "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec";
|
|
45
|
+
readonly 'datePicker.shortWeekDays': "Su,Mo,Tu,We,Th,Fr,Sa";
|
|
8
46
|
readonly 'datePicker.startPlaceholder': "Start date";
|
|
47
|
+
readonly 'datePicker.timePlaceholder': "Select time";
|
|
48
|
+
readonly 'datePicker.timeSelect': "select time";
|
|
49
|
+
readonly 'datePicker.today': "Today";
|
|
50
|
+
readonly 'datePicker.week': "Week";
|
|
51
|
+
readonly 'datePicker.weekPlaceholder': "Select week";
|
|
52
|
+
readonly 'datePicker.weekSelect': "Choose a week";
|
|
53
|
+
readonly 'datePicker.year': "Year";
|
|
54
|
+
readonly 'datePicker.yearFormat': "YYYY";
|
|
9
55
|
readonly 'datePicker.yearPlaceholder': "Select year";
|
|
56
|
+
readonly 'datePicker.yearSelect': "Choose a year";
|
|
10
57
|
};
|
|
11
58
|
//#endregion
|
|
12
59
|
export { _default as default };
|
|
@@ -1,12 +1,59 @@
|
|
|
1
1
|
//#region src/i18n/resources/en/datePicker.ts
|
|
2
2
|
var datePicker_default = {
|
|
3
|
+
"datePicker.backToToday": "Back to today",
|
|
4
|
+
"datePicker.cellDateFormat": "D",
|
|
5
|
+
"datePicker.cellQuarterFormat": "[Q]Q",
|
|
6
|
+
"datePicker.cellYearFormat": "YYYY",
|
|
7
|
+
"datePicker.clear": "Clear",
|
|
8
|
+
"datePicker.dateSelect": "select date",
|
|
9
|
+
"datePicker.decadeSelect": "Choose a decade",
|
|
3
10
|
"datePicker.endPlaceholder": "End date",
|
|
11
|
+
"datePicker.fieldDateFormat": "YYYY-MM-DD",
|
|
12
|
+
"datePicker.fieldMonthFormat": "YYYY-MM",
|
|
13
|
+
"datePicker.fieldQuarterFormat": "YYYY-[Q]Q",
|
|
14
|
+
"datePicker.fieldWeekFormat": "gggg-wo",
|
|
15
|
+
"datePicker.fieldYearFormat": "YYYY",
|
|
16
|
+
"datePicker.month": "Month",
|
|
17
|
+
"datePicker.monthBeforeYear": "true",
|
|
4
18
|
"datePicker.monthPlaceholder": "Select month",
|
|
19
|
+
"datePicker.monthSelect": "Choose a month",
|
|
5
20
|
"datePicker.next": "Next",
|
|
21
|
+
"datePicker.nextCentury": "Next century",
|
|
22
|
+
"datePicker.nextDecade": "Next decade",
|
|
23
|
+
"datePicker.nextMonth": "Next month",
|
|
24
|
+
"datePicker.nextYear": "Next year",
|
|
25
|
+
"datePicker.now": "Now",
|
|
26
|
+
"datePicker.ok": "OK",
|
|
6
27
|
"datePicker.placeholder": "Select date",
|
|
7
28
|
"datePicker.previous": "Previous",
|
|
29
|
+
"datePicker.previousCentury": "Last century",
|
|
30
|
+
"datePicker.previousDecade": "Last decade",
|
|
31
|
+
"datePicker.previousMonth": "Previous month",
|
|
32
|
+
"datePicker.previousYear": "Last year",
|
|
33
|
+
"datePicker.quarterPlaceholder": "Select quarter",
|
|
34
|
+
"datePicker.rangeMonthPlaceholder.end": "End month",
|
|
35
|
+
"datePicker.rangeMonthPlaceholder.start": "Start month",
|
|
36
|
+
"datePicker.rangeQuarterPlaceholder.end": "End quarter",
|
|
37
|
+
"datePicker.rangeQuarterPlaceholder.start": "Start quarter",
|
|
38
|
+
"datePicker.rangeTimePlaceholder.end": "End time",
|
|
39
|
+
"datePicker.rangeTimePlaceholder.start": "Start time",
|
|
40
|
+
"datePicker.rangeWeekPlaceholder.end": "End week",
|
|
41
|
+
"datePicker.rangeWeekPlaceholder.start": "Start week",
|
|
42
|
+
"datePicker.rangeYearPlaceholder.end": "End year",
|
|
43
|
+
"datePicker.rangeYearPlaceholder.start": "Start year",
|
|
44
|
+
"datePicker.shortMonths": "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
|
|
45
|
+
"datePicker.shortWeekDays": "Su,Mo,Tu,We,Th,Fr,Sa",
|
|
8
46
|
"datePicker.startPlaceholder": "Start date",
|
|
9
|
-
"datePicker.
|
|
47
|
+
"datePicker.timePlaceholder": "Select time",
|
|
48
|
+
"datePicker.timeSelect": "select time",
|
|
49
|
+
"datePicker.today": "Today",
|
|
50
|
+
"datePicker.week": "Week",
|
|
51
|
+
"datePicker.weekPlaceholder": "Select week",
|
|
52
|
+
"datePicker.weekSelect": "Choose a week",
|
|
53
|
+
"datePicker.year": "Year",
|
|
54
|
+
"datePicker.yearFormat": "YYYY",
|
|
55
|
+
"datePicker.yearPlaceholder": "Select year",
|
|
56
|
+
"datePicker.yearSelect": "Choose a year"
|
|
10
57
|
};
|
|
11
58
|
//#endregion
|
|
12
59
|
export { datePicker_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datePicker.mjs","names":[],"sources":["../../../../src/i18n/resources/en/datePicker.ts"],"sourcesContent":["export default {\n 'datePicker.endPlaceholder': 'End date',\n 'datePicker.monthPlaceholder': 'Select month',\n 'datePicker.next': 'Next',\n 'datePicker.placeholder': 'Select date',\n 'datePicker.previous': 'Previous',\n 'datePicker.startPlaceholder': 'Start date',\n 'datePicker.yearPlaceholder': 'Select year',\n} as const;\n"],"mappings":";AAAA,IAAA,qBAAe;CACb,6BAA6B;CAC7B,+BAA+B;CAC/B,mBAAmB;CACnB,0BAA0B;CAC1B,uBAAuB;CACvB,+BAA+B;CAC/B,8BAA8B;
|
|
1
|
+
{"version":3,"file":"datePicker.mjs","names":[],"sources":["../../../../src/i18n/resources/en/datePicker.ts"],"sourcesContent":["export default {\n 'datePicker.backToToday': 'Back to today',\n 'datePicker.cellDateFormat': 'D',\n 'datePicker.cellQuarterFormat': '[Q]Q',\n 'datePicker.cellYearFormat': 'YYYY',\n 'datePicker.clear': 'Clear',\n 'datePicker.dateSelect': 'select date',\n 'datePicker.decadeSelect': 'Choose a decade',\n 'datePicker.endPlaceholder': 'End date',\n 'datePicker.fieldDateFormat': 'YYYY-MM-DD',\n 'datePicker.fieldMonthFormat': 'YYYY-MM',\n 'datePicker.fieldQuarterFormat': 'YYYY-[Q]Q',\n 'datePicker.fieldWeekFormat': 'gggg-wo',\n 'datePicker.fieldYearFormat': 'YYYY',\n 'datePicker.month': 'Month',\n 'datePicker.monthBeforeYear': 'true',\n 'datePicker.monthPlaceholder': 'Select month',\n 'datePicker.monthSelect': 'Choose a month',\n 'datePicker.next': 'Next',\n 'datePicker.nextCentury': 'Next century',\n 'datePicker.nextDecade': 'Next decade',\n 'datePicker.nextMonth': 'Next month',\n 'datePicker.nextYear': 'Next year',\n 'datePicker.now': 'Now',\n 'datePicker.ok': 'OK',\n 'datePicker.placeholder': 'Select date',\n 'datePicker.previous': 'Previous',\n 'datePicker.previousCentury': 'Last century',\n 'datePicker.previousDecade': 'Last decade',\n 'datePicker.previousMonth': 'Previous month',\n 'datePicker.previousYear': 'Last year',\n 'datePicker.quarterPlaceholder': 'Select quarter',\n 'datePicker.rangeMonthPlaceholder.end': 'End month',\n 'datePicker.rangeMonthPlaceholder.start': 'Start month',\n 'datePicker.rangeQuarterPlaceholder.end': 'End quarter',\n 'datePicker.rangeQuarterPlaceholder.start': 'Start quarter',\n 'datePicker.rangeTimePlaceholder.end': 'End time',\n 'datePicker.rangeTimePlaceholder.start': 'Start time',\n 'datePicker.rangeWeekPlaceholder.end': 'End week',\n 'datePicker.rangeWeekPlaceholder.start': 'Start week',\n 'datePicker.rangeYearPlaceholder.end': 'End year',\n 'datePicker.rangeYearPlaceholder.start': 'Start year',\n 'datePicker.shortMonths': 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec',\n 'datePicker.shortWeekDays': 'Su,Mo,Tu,We,Th,Fr,Sa',\n 'datePicker.startPlaceholder': 'Start date',\n 'datePicker.timePlaceholder': 'Select time',\n 'datePicker.timeSelect': 'select time',\n 'datePicker.today': 'Today',\n 'datePicker.week': 'Week',\n 'datePicker.weekPlaceholder': 'Select week',\n 'datePicker.weekSelect': 'Choose a week',\n 'datePicker.year': 'Year',\n 'datePicker.yearFormat': 'YYYY',\n 'datePicker.yearPlaceholder': 'Select year',\n 'datePicker.yearSelect': 'Choose a year',\n} as const;\n"],"mappings":";AAAA,IAAA,qBAAe;CACb,0BAA0B;CAC1B,6BAA6B;CAC7B,gCAAgC;CAChC,6BAA6B;CAC7B,oBAAoB;CACpB,yBAAyB;CACzB,2BAA2B;CAC3B,6BAA6B;CAC7B,8BAA8B;CAC9B,+BAA+B;CAC/B,iCAAiC;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,oBAAoB;CACpB,8BAA8B;CAC9B,+BAA+B;CAC/B,0BAA0B;CAC1B,mBAAmB;CACnB,0BAA0B;CAC1B,yBAAyB;CACzB,wBAAwB;CACxB,uBAAuB;CACvB,kBAAkB;CAClB,iBAAiB;CACjB,0BAA0B;CAC1B,uBAAuB;CACvB,8BAA8B;CAC9B,6BAA6B;CAC7B,4BAA4B;CAC5B,2BAA2B;CAC3B,iCAAiC;CACjC,wCAAwC;CACxC,0CAA0C;CAC1C,0CAA0C;CAC1C,4CAA4C;CAC5C,uCAAuC;CACvC,yCAAyC;CACzC,uCAAuC;CACvC,yCAAyC;CACzC,uCAAuC;CACvC,yCAAyC;CACzC,0BAA0B;CAC1B,4BAA4B;CAC5B,+BAA+B;CAC/B,8BAA8B;CAC9B,yBAAyB;CACzB,oBAAoB;CACpB,mBAAmB;CACnB,8BAA8B;CAC9B,yBAAyB;CACzB,mBAAmB;CACnB,yBAAyB;CACzB,8BAA8B;CAC9B,yBAAyB;AAC3B"}
|
|
@@ -1,12 +1,59 @@
|
|
|
1
1
|
//#region src/i18n/resources/zhCn/datePicker.d.ts
|
|
2
2
|
declare const _default: {
|
|
3
|
+
readonly 'datePicker.backToToday': "返回今天";
|
|
4
|
+
readonly 'datePicker.cellDateFormat': "D";
|
|
5
|
+
readonly 'datePicker.cellQuarterFormat': "[Q]Q";
|
|
6
|
+
readonly 'datePicker.cellYearFormat': "YYYY";
|
|
7
|
+
readonly 'datePicker.clear': "清除";
|
|
8
|
+
readonly 'datePicker.dateSelect': "选择日期";
|
|
9
|
+
readonly 'datePicker.decadeSelect': "选择年代";
|
|
3
10
|
readonly 'datePicker.endPlaceholder': "结束日期";
|
|
11
|
+
readonly 'datePicker.fieldDateFormat': "YYYY-MM-DD";
|
|
12
|
+
readonly 'datePicker.fieldMonthFormat': "YYYY-MM";
|
|
13
|
+
readonly 'datePicker.fieldQuarterFormat': "YYYY-[Q]Q";
|
|
14
|
+
readonly 'datePicker.fieldWeekFormat': "gggg-wo";
|
|
15
|
+
readonly 'datePicker.fieldYearFormat': "YYYY";
|
|
16
|
+
readonly 'datePicker.month': "月";
|
|
17
|
+
readonly 'datePicker.monthBeforeYear': "false";
|
|
4
18
|
readonly 'datePicker.monthPlaceholder': "选择月份";
|
|
19
|
+
readonly 'datePicker.monthSelect': "选择月份";
|
|
5
20
|
readonly 'datePicker.next': "下一页";
|
|
21
|
+
readonly 'datePicker.nextCentury': "下一世纪";
|
|
22
|
+
readonly 'datePicker.nextDecade': "下一年代";
|
|
23
|
+
readonly 'datePicker.nextMonth': "下个月";
|
|
24
|
+
readonly 'datePicker.nextYear': "下一年";
|
|
25
|
+
readonly 'datePicker.now': "此刻";
|
|
26
|
+
readonly 'datePicker.ok': "确定";
|
|
6
27
|
readonly 'datePicker.placeholder': "选择日期";
|
|
7
28
|
readonly 'datePicker.previous': "上一页";
|
|
29
|
+
readonly 'datePicker.previousCentury': "上一世纪";
|
|
30
|
+
readonly 'datePicker.previousDecade': "上一年代";
|
|
31
|
+
readonly 'datePicker.previousMonth': "上个月";
|
|
32
|
+
readonly 'datePicker.previousYear': "上一年";
|
|
33
|
+
readonly 'datePicker.quarterPlaceholder': "选择季度";
|
|
34
|
+
readonly 'datePicker.rangeMonthPlaceholder.end': "结束月份";
|
|
35
|
+
readonly 'datePicker.rangeMonthPlaceholder.start': "开始月份";
|
|
36
|
+
readonly 'datePicker.rangeQuarterPlaceholder.end': "结束季度";
|
|
37
|
+
readonly 'datePicker.rangeQuarterPlaceholder.start': "开始季度";
|
|
38
|
+
readonly 'datePicker.rangeTimePlaceholder.end': "结束时间";
|
|
39
|
+
readonly 'datePicker.rangeTimePlaceholder.start': "开始时间";
|
|
40
|
+
readonly 'datePicker.rangeWeekPlaceholder.end': "结束周";
|
|
41
|
+
readonly 'datePicker.rangeWeekPlaceholder.start': "开始周";
|
|
42
|
+
readonly 'datePicker.rangeYearPlaceholder.end': "结束年份";
|
|
43
|
+
readonly 'datePicker.rangeYearPlaceholder.start': "开始年份";
|
|
44
|
+
readonly 'datePicker.shortMonths': "1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月";
|
|
45
|
+
readonly 'datePicker.shortWeekDays': "日,一,二,三,四,五,六";
|
|
8
46
|
readonly 'datePicker.startPlaceholder': "开始日期";
|
|
47
|
+
readonly 'datePicker.timePlaceholder': "选择时间";
|
|
48
|
+
readonly 'datePicker.timeSelect': "选择时间";
|
|
49
|
+
readonly 'datePicker.today': "今天";
|
|
50
|
+
readonly 'datePicker.week': "周";
|
|
51
|
+
readonly 'datePicker.weekPlaceholder': "选择周";
|
|
52
|
+
readonly 'datePicker.weekSelect': "选择周";
|
|
53
|
+
readonly 'datePicker.year': "年";
|
|
54
|
+
readonly 'datePicker.yearFormat': "YYYY年";
|
|
9
55
|
readonly 'datePicker.yearPlaceholder': "选择年份";
|
|
56
|
+
readonly 'datePicker.yearSelect': "选择年份";
|
|
10
57
|
};
|
|
11
58
|
//#endregion
|
|
12
59
|
export { _default as default };
|