@nepdatejs/react 0.0.0-stage → 0.1.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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/date-text-BX3Uag0O.cjs +84 -0
  4. package/dist/date-text-BX3Uag0O.cjs.map +1 -0
  5. package/dist/date-text-DLwhBmYj.js +61 -0
  6. package/dist/date-text-DLwhBmYj.js.map +1 -0
  7. package/dist/date-text-Dipetpbp.d.cts +37 -0
  8. package/dist/date-text-Dipetpbp.d.ts +37 -0
  9. package/dist/headless-AEI6dxTJ.cjs +619 -0
  10. package/dist/headless-AEI6dxTJ.cjs.map +1 -0
  11. package/dist/headless-CVj0DhD4.js +560 -0
  12. package/dist/headless-CVj0DhD4.js.map +1 -0
  13. package/dist/headless-ChE3zuYj.d.ts +195 -0
  14. package/dist/headless-CrIIPnOF.d.cts +195 -0
  15. package/dist/headless.cjs +11 -0
  16. package/dist/headless.d.cts +2 -0
  17. package/dist/headless.d.ts +2 -0
  18. package/dist/headless.js +2 -0
  19. package/dist/index.cjs +915 -0
  20. package/dist/index.cjs.map +1 -0
  21. package/dist/index.d.cts +245 -0
  22. package/dist/index.d.ts +245 -0
  23. package/dist/index.js +895 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/server.cjs +6 -0
  26. package/dist/server.d.cts +2 -0
  27. package/dist/server.d.ts +2 -0
  28. package/dist/server.js +1 -0
  29. package/package.json +110 -3
  30. package/src/bindings.ts +247 -0
  31. package/src/calendar-body.tsx +133 -0
  32. package/src/calendar.tsx +34 -0
  33. package/src/date-picker.tsx +343 -0
  34. package/src/date-range-picker.tsx +225 -0
  35. package/src/date-text.tsx +110 -0
  36. package/src/date-time-picker.tsx +289 -0
  37. package/src/headless.ts +21 -0
  38. package/src/hooks.ts +476 -0
  39. package/src/icons.tsx +35 -0
  40. package/src/index.ts +21 -0
  41. package/src/multi-date-picker.tsx +245 -0
  42. package/src/page-locale.ts +23 -0
  43. package/src/panel.ts +67 -0
  44. package/src/presets.tsx +44 -0
  45. package/src/server.ts +8 -0
  46. package/src/time-columns.tsx +60 -0
  47. package/src/use-store.ts +196 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":["useCalendar","getConfig","useSyncExternalStore","useRef","trackPosition","onOutsidePointer","onBackdropPointer","onEscape","useDatePicker","getLocale","useRef","useDateRangePicker","getLocale","useRef","useRef","getLocale","useDateTimePicker","getLocale","useRef","popupProps","useMultiDatePicker","getLocale","useRef"],"sources":["../src/icons.tsx","../src/calendar-body.tsx","../src/calendar.tsx","../src/page-locale.ts","../src/panel.ts","../src/presets.tsx","../src/date-picker.tsx","../src/date-range-picker.tsx","../src/time-columns.tsx","../src/date-time-picker.tsx","../src/multi-date-picker.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nconst PATHS = {\n 'chevron-left': ['M10 3.5 5.5 8l4.5 4.5'],\n 'chevron-right': ['M6 3.5 10.5 8 6 12.5'],\n calendar: [\n 'M2 6.5h12',\n 'M5.5 1.5v3',\n 'M10.5 1.5v3',\n 'M4 3h8a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z',\n ],\n close: ['M4 4l8 8', 'M12 4l-8 8'],\n} as const;\n\nexport type IconName = keyof typeof PATHS;\n\n/** The Figma icon set, 16px, stroked with currentColor. */\nexport function Icon({ name }: { name: IconName }): ReactElement {\n return (\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {PATHS[name].map((d) => (\n <path key={d} d={d} />\n ))}\n </svg>\n );\n}\n","import type { CSSProperties, ReactElement } from 'react';\nimport type { CalendarBindings } from './bindings';\nimport { Icon } from './icons';\n\n/** The calendar markup (@nepdatejs/styles contract) for any set of bindings. */\nexport function CalendarBody({\n bindings,\n className,\n theme,\n}: {\n bindings: CalendarBindings;\n className?: string | undefined;\n theme?: string | undefined;\n}): ReactElement {\n const { state } = bindings;\n const tiles =\n state.view === 'month'\n ? state.months\n : state.view === 'year'\n ? state.years\n : state.fiscalYears;\n\n return (\n <div\n className={className ? `ndp-calendar ${className}` : 'ndp-calendar'}\n data-ndp-theme={theme}\n >\n <div className=\"ndp-calendar__header\">\n <button className=\"ndp-icon-button\" {...bindings.getPrevProps()}>\n <Icon name=\"chevron-left\" />\n </button>\n <div className=\"ndp-calendar__title\" aria-live=\"polite\">\n {bindings.getTitleButtons().map((button) => (\n <button\n key={button.key}\n className=\"ndp-calendar__title-button\"\n {...button.props}\n >\n {button.label}\n </button>\n ))}\n </div>\n <button className=\"ndp-icon-button\" {...bindings.getNextProps()}>\n <Icon name=\"chevron-right\" />\n </button>\n </div>\n {state.view === 'day' ? (\n <table className=\"ndp-grid\" {...bindings.getGridProps()}>\n <thead>\n <tr role=\"row\">\n {state.weekdays.map((weekday) => (\n <th\n key={weekday.index}\n className=\"ndp-weekday\"\n scope=\"col\"\n role=\"columnheader\"\n abbr={weekday.longLabel}\n data-weekend={weekday.isWeekend || undefined}\n >\n {weekday.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {state.weeks.map((week, row) => (\n <tr key={row} role=\"row\">\n {week.map((cell, column) =>\n cell ? (\n <td\n key={cell.key}\n role=\"gridcell\"\n aria-selected={cell.isSelected || undefined}\n >\n <button className=\"ndp-day\" {...bindings.getDayProps(cell)}>\n <span className=\"ndp-sr-only\">{cell.ariaLabel}</span>\n <span className=\"ndp-day__label\" aria-hidden=\"true\">\n {cell.label}\n </span>\n {cell.subLabel !== null && (\n <span className=\"ndp-day__sub\" aria-hidden=\"true\">\n {cell.subLabel}\n </span>\n )}\n {cell.events[0] && (\n <span\n className=\"ndp-day__dot\"\n aria-hidden=\"true\"\n style={\n cell.events[0].color\n ? ({\n '--ndp-dot-color': cell.events[0].color,\n } as CSSProperties)\n : undefined\n }\n />\n )}\n </button>\n </td>\n ) : (\n <td key={`empty-${column}`} role=\"gridcell\" />\n ),\n )}\n </tr>\n ))}\n </tbody>\n </table>\n ) : (\n <div className=\"ndp-options\" role=\"group\" aria-label={state.title}>\n {tiles.map((tile, index) => (\n <button\n key={tile.value}\n className=\"ndp-option\"\n {...bindings.getOptionProps(tile, index, tiles)}\n >\n <span className=\"ndp-sr-only\">\n {tile.subLabel ? `${tile.label} (${tile.subLabel})` : tile.label}\n </span>\n <span className=\"ndp-option__label\" aria-hidden=\"true\">\n {tile.label}\n </span>\n {tile.subLabel !== null && (\n <span className=\"ndp-option__sub\" aria-hidden=\"true\">\n {tile.subLabel}\n </span>\n )}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import type { ReactElement } from 'react';\nimport type { CalendarDate } from '@nepdatejs/core';\nimport type { CalendarOptions, CalendarSelection } from '@nepdatejs/calendar';\nimport { CalendarBody } from './calendar-body';\nimport { useCalendar } from './hooks';\n\nexport interface CalendarProps extends Omit<\n CalendarOptions,\n 'onSelect' | 'visibleMonth' | 'onVisibleMonthChange'\n> {\n /** Show this month (any day in it); pair with onMonthChange to control it. */\n month?: CalendarDate | undefined;\n onMonthChange?: ((month: CalendarDate) => void) | undefined;\n onSelect?: ((selection: CalendarSelection) => void) | undefined;\n className?: string | undefined;\n theme?: 'light' | 'dark' | 'auto' | undefined;\n}\n\n/** A standalone BS/AD month view with keyboard support. */\nexport function Calendar({\n month,\n onMonthChange,\n className,\n theme,\n ...options\n}: CalendarProps): ReactElement {\n const bindings = useCalendar({\n ...options,\n visibleMonth: month,\n onVisibleMonthChange: onMonthChange,\n });\n\n return <CalendarBody bindings={bindings} className={className} theme={theme} />;\n}\n","import { useSyncExternalStore } from 'react';\nimport { getConfig, type LocaleCode } from '@nepdatejs/core';\n\nconst neverChanges = (): (() => void) => () => undefined;\n\n/** Used on the server and while hydrating, so both render the same text. */\nfunction defaultLocale(): LocaleCode {\n return getConfig().defaultLocale;\n}\n\n/** Nepali names and digits when the page language is Nepali. Browser only. */\nfunction pageLocale(): LocaleCode {\n return document.documentElement.lang.toLowerCase().startsWith('ne')\n ? 'ne'\n : defaultLocale();\n}\n\n/** The given locale, or else the page's language. */\nexport function usePageLocale(given: LocaleCode | undefined): LocaleCode {\n const page = useSyncExternalStore(neverChanges, pageLocale, defaultLocale);\n\n return given ?? page;\n}\n","import { useEffect, useRef, type RefObject } from 'react';\nimport {\n onBackdropPointer,\n onEscape,\n onOutsidePointer,\n restoreFocus,\n trackPosition,\n type PanelLayout,\n} from '@nepdatejs/dom';\nimport { useIsomorphicLayoutEffect } from './use-store';\n\n/**\n * While `open`: show the panel in the top layer beside the anchor, close on an\n * outside pointer, a tap on a bottom sheet's backdrop, or Escape (returning focus to `returnFocus`), and move focus\n * into the calendar.\n */\nexport function usePanel(\n open: boolean,\n refs: {\n anchor: RefObject<HTMLElement | null>;\n panel: RefObject<HTMLDivElement | null>;\n field: RefObject<HTMLElement | null>;\n returnFocus: RefObject<HTMLElement | null>;\n },\n close: () => void,\n focusGrid: () => void,\n width = 320,\n layout: PanelLayout = 'auto',\n): void {\n const closeRef = useRef(close);\n closeRef.current = close;\n\n useIsomorphicLayoutEffect(() => {\n const anchor = refs.anchor.current;\n const panel = refs.panel.current;\n if (!open || !anchor || !panel) {\n return undefined;\n }\n const stopTracking = trackPosition(anchor, panel, { width, layout });\n const stopOutside = onOutsidePointer(\n () => [refs.field.current, refs.panel.current],\n () => {\n closeRef.current();\n },\n );\n const stopBackdrop = onBackdropPointer(panel, () => {\n closeRef.current();\n });\n const stopEscape = onEscape(() => {\n closeRef.current();\n restoreFocus(refs.returnFocus.current);\n });\n\n return () => {\n stopTracking();\n stopOutside();\n stopBackdrop();\n stopEscape();\n };\n }, [open, width, layout]);\n\n useEffect(() => {\n if (open) {\n focusGrid();\n }\n }, [open]);\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport type { PresetState } from '@nepdatejs/datepicker';\n\n/** Panel widths: calendar alone, plus presets column, plus time columns. */\nexport const PANEL_WIDTH = 320;\nexport const PANEL_WIDTH_WITH_PRESETS = 492;\nexport const TIME_COLUMNS_WIDTH = 136;\n\n/** The panel body: the shortcut list (when there are presets), then the calendar and anything else. */\nexport function PanelBody({\n presets,\n label,\n onPreset,\n children,\n}: {\n presets: readonly PresetState[];\n label: string;\n onPreset: (id: string) => void;\n children: ReactNode;\n}): ReactElement {\n return (\n <div className=\"ndp-panel__body\">\n {presets.length > 0 && (\n <div className=\"ndp-presets\" role=\"group\" aria-label={label}>\n {presets.map((preset) => (\n <button\n key={preset.id}\n type=\"button\"\n className=\"ndp-preset\"\n aria-pressed={preset.isActive}\n disabled={preset.isDisabled}\n onClick={() => {\n onPreset(preset.id);\n }}\n >\n {preset.label}\n </button>\n ))}\n </div>\n )}\n {children}\n </div>\n );\n}\n","import { useEffect, useRef, type CSSProperties, type ReactElement } from 'react';\nimport {\n getLocale,\n type CalendarDate,\n type CalendarSystem,\n type DateFormatPattern,\n type LocaleCode,\n type Weekday,\n} from '@nepdatejs/core';\nimport type { EventMarker, HolidayInput, HolidayLookup } from '@nepdatejs/calendar';\nimport type { DateDetail, SinglePreset } from '@nepdatejs/datepicker';\nimport { restoreFocus } from '@nepdatejs/dom';\nimport { CalendarBody } from './calendar-body';\nimport { useDatePicker } from './hooks';\nimport { Icon } from './icons';\nimport { usePageLocale } from './page-locale';\nimport { usePanel } from './panel';\nimport type { PanelLayout } from '@nepdatejs/dom';\nimport { PANEL_WIDTH, PANEL_WIDTH_WITH_PRESETS, PanelBody } from './presets';\n\nexport interface DatePickerProps {\n /** The AD date as \"YYYY-MM-DD\", or \"\": the same value a native date input uses. */\n value?: string | undefined;\n /** The starting value when the field keeps its own state, as in a plain form with `name`. */\n defaultValue?: string | undefined;\n onChange?: ((value: string, date: DateDetail | null) => void) | undefined;\n /** Show and type dates in this calendar only, and hide the BS/AD switch. */\n calendar?: CalendarSystem | undefined;\n /** The calendar shown first when the viewer has not chosen one. */\n defaultCalendar?: CalendarSystem | undefined;\n /** Called when the viewer switches BS/AD. */\n onCalendarChange?: ((calendar: CalendarSystem) => void) | undefined;\n /** Earliest and latest allowed days, as AD \"YYYY-MM-DD\". */\n min?: string | undefined;\n max?: string | undefined;\n isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;\n /** Names, digits and messages; defaults to the page language (ne when <html lang=\"ne\">). */\n locale?: LocaleCode | undefined;\n /** Submit the AD value with a plain form under this name. */\n name?: string | undefined;\n id?: string | undefined;\n placeholder?: string | undefined;\n required?: boolean | undefined;\n disabled?: boolean | undefined;\n clearable?: boolean | undefined;\n /** Show the same day in the other calendar under the field. */\n showEquivalent?: boolean | undefined;\n holidays?: readonly HolidayInput[] | HolidayLookup | undefined;\n events?: ((date: CalendarDate) => readonly EventMarker[]) | undefined;\n weekStartsOn?: Weekday | undefined;\n weekendDays?: readonly Weekday[] | undefined;\n /** Show the other calendar's day number under each day. Default true. */\n showOtherCalendar?: boolean | undefined;\n displayFormat?: DateFormatPattern | undefined;\n closeOnSelect?: boolean | undefined;\n /** Shortcuts beside the calendar: 'today', 'yesterday', 'tomorrow' or { id, label, resolve }. */\n presets?: readonly SinglePreset[] | undefined;\n /** Remember the viewer's BS/AD choice in localStorage under this key. */\n persistCalendar?: string | undefined;\n /** Override \"today\" (tests, server rendering). */\n today?: CalendarDate | undefined;\n /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */\n mask?: boolean | undefined;\n /** Show the calendar in the page, always open, instead of in a popover. */\n inline?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n panelLayout?: PanelLayout | undefined;\n theme?: 'light' | 'dark' | 'auto' | undefined;\n className?: string | undefined;\n 'aria-label'?: string | undefined;\n 'aria-invalid'?: boolean | undefined;\n 'aria-describedby'?: string | undefined;\n}\n\n/**\n * A BS/AD date field: type a date or pick it from a calendar. The value is\n * always the AD day as \"YYYY-MM-DD\", so forms, validation and storage are\n * unchanged and a BS date can never be sent as if it were AD.\n */\nexport function DatePicker(props: DatePickerProps): ReactElement {\n const {\n name,\n placeholder,\n required,\n disabled = false,\n clearable = true,\n showEquivalent = true,\n persistCalendar,\n panelLayout,\n theme,\n className,\n 'aria-label': ariaLabel,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n locale: localeProp,\n onCalendarChange,\n ...options\n } = props;\n const locale = usePageLocale(localeProp);\n const picker = useDatePicker({\n ...options,\n locale,\n onCalendarChange: (calendar: CalendarSystem) => {\n remember(persistCalendar, calendar);\n onCalendarChange?.(calendar);\n },\n });\n const { state, store, calendar } = picker;\n const labels = getLocale(locale);\n const field = useRef<HTMLDivElement | null>(null);\n const box = useRef<HTMLDivElement | null>(null);\n const panel = useRef<HTMLDivElement | null>(null);\n const input = useRef<HTMLInputElement | null>(null);\n const hidden = useRef<HTMLInputElement | null>(null);\n\n const panelWidth = state.presets.length > 0 ? PANEL_WIDTH_WITH_PRESETS : PANEL_WIDTH;\n usePanel(\n state.open && !state.inline,\n { anchor: box, panel, field, returnFocus: input },\n () => {\n store.actions.close();\n },\n calendar.focusGrid,\n panelWidth,\n panelLayout,\n );\n\n // The viewer's last BS/AD choice, read after hydration so server and client render alike.\n useEffect(() => {\n const stored = read(persistCalendar);\n if (stored) {\n store.actions.switchCalendar(stored);\n }\n }, [persistCalendar, store]);\n\n // A form reset puts the field back to its default value.\n useEffect(() => {\n const form = hidden.current?.form ?? input.current?.form;\n if (!form) {\n return undefined;\n }\n const reset = (): void => {\n store.actions.reset();\n };\n form.addEventListener('reset', reset);\n\n return () => {\n form.removeEventListener('reset', reset);\n };\n }, [store]);\n\n useEffect(() => {\n input.current?.setCustomValidity(state.error?.message ?? '');\n }, [state.error]);\n\n const hint = state.error?.message ?? (showEquivalent ? state.equivalentText : null);\n const inputProps = picker.getInputProps();\n const describedBy =\n [ariaDescribedBy, hint ? picker.ids.hint : undefined].filter(Boolean).join(' ') ||\n undefined;\n const invalid = ariaInvalid === true || state.error !== null;\n\n return (\n <div\n ref={field}\n className={className ? `ndp-field ${className}` : 'ndp-field'}\n data-ndp-theme={theme}\n >\n <div\n ref={box}\n className=\"ndp-input\"\n data-invalid={invalid || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n ref={input}\n className=\"ndp-input__control\"\n {...inputProps}\n aria-describedby={describedBy}\n aria-invalid={invalid || undefined}\n aria-label={ariaLabel}\n placeholder={placeholder ?? state.placeholder}\n required={required}\n disabled={disabled}\n />\n <span className=\"ndp-input__actions\">\n {clearable && state.text !== '' && !disabled && (\n <button\n className=\"ndp-icon-button\"\n {...picker.getClearProps()}\n onClick={() => {\n store.actions.clear();\n input.current?.focus();\n }}\n >\n <Icon name=\"close\" />\n </button>\n )}\n {state.canSwitchCalendar && (\n <button\n className=\"ndp-input__switch\"\n disabled={disabled}\n {...picker.getSwitchProps()}\n >\n {labels.calendarNames[state.calendar]}\n </button>\n )}\n {!state.inline && (\n <button\n className=\"ndp-icon-button\"\n disabled={disabled}\n {...picker.getToggleProps()}\n >\n <Icon name=\"calendar\" />\n </button>\n )}\n </span>\n </div>\n {hint !== null && (\n <p\n id={picker.ids.hint}\n className=\"ndp-hint\"\n data-error={state.error ? true : undefined}\n aria-live=\"polite\"\n >\n {hint}\n </p>\n )}\n {name !== undefined && (\n <input\n ref={hidden}\n type=\"hidden\"\n name={name}\n value={state.value}\n disabled={disabled}\n />\n )}\n {state.open && (\n <div\n ref={panel}\n className=\"ndp-panel\"\n popover={state.inline ? undefined : 'manual'}\n data-layout={state.inline ? 'inline' : undefined}\n style={\n state.inline\n ? ({ '--ndp-panel-width': `${String(panelWidth)}px` } as CSSProperties)\n : undefined\n }\n data-ndp-theme={theme}\n {...picker.getPanelProps()}\n aria-label={\n ariaLabel\n ? `${ariaLabel}: ${labels.labels.calendar}`\n : labels.labels.chooseDate\n }\n >\n <PanelBody\n presets={state.presets}\n label={labels.labels.presets}\n onPreset={(id) => {\n if (store.actions.applyPreset(id) && !store.getState().open) {\n restoreFocus(input.current);\n }\n }}\n >\n <CalendarBody\n bindings={{\n ...calendar,\n getDayProps: (cell) => ({\n ...calendar.getDayProps(cell),\n onClick: () => {\n if (\n !cell.isDisabled &&\n store.actions.select(cell.date) &&\n !store.getState().open\n ) {\n restoreFocus(input.current);\n }\n },\n }),\n }}\n />\n </PanelBody>\n <div className=\"ndp-panel__footer\">\n {state.canSwitchCalendar ? (\n <div\n className=\"ndp-segment\"\n role=\"group\"\n aria-label={labels.labels.calendar}\n >\n {(['BS', 'AD'] as const).map((option) => (\n <button\n key={option}\n className=\"ndp-segment__item\"\n {...picker.getCalendarOptionProps(option)}\n >\n {labels.calendarNames[option]}\n </button>\n ))}\n </div>\n ) : (\n <span />\n )}\n <button\n className=\"ndp-button\"\n {...picker.getTodayProps()}\n onClick={() => {\n if (store.actions.selectToday()) {\n restoreFocus(input.current);\n }\n }}\n >\n {labels.labels.today}\n </button>\n </div>\n </div>\n )}\n </div>\n );\n}\n\nfunction read(key: string | undefined): CalendarSystem | null {\n if (!key) {\n return null;\n }\n try {\n const stored = window.localStorage.getItem(key);\n return stored === 'AD' || stored === 'BS' ? stored : null;\n } catch {\n return null;\n }\n}\n\nfunction remember(key: string | undefined, calendar: CalendarSystem): void {\n if (!key) {\n return;\n }\n try {\n window.localStorage.setItem(key, calendar);\n } catch {\n // Storage can be unavailable (private mode); the choice then lasts for this page only.\n }\n}\n","import { useRef, type CSSProperties, type ReactElement } from 'react';\nimport {\n getLocale,\n type CalendarDate,\n type CalendarSystem,\n type LocaleCode,\n type Weekday,\n} from '@nepdatejs/core';\nimport type { HolidayInput, HolidayLookup } from '@nepdatejs/calendar';\nimport type { RangeDetail, RangePreset, RangeValue } from '@nepdatejs/datepicker';\nimport { restoreFocus } from '@nepdatejs/dom';\nimport { CalendarBody } from './calendar-body';\nimport { useDateRangePicker } from './hooks';\nimport { Icon } from './icons';\nimport { usePageLocale } from './page-locale';\nimport { usePanel } from './panel';\nimport type { PanelLayout } from '@nepdatejs/dom';\nimport { PANEL_WIDTH, PANEL_WIDTH_WITH_PRESETS, PanelBody } from './presets';\n\nexport interface DateRangePickerProps {\n value?: RangeValue | undefined;\n defaultValue?: RangeValue | undefined;\n onChange?: ((value: RangeValue, detail: RangeDetail) => void) | undefined;\n calendar?: CalendarSystem | undefined;\n defaultCalendar?: CalendarSystem | undefined;\n min?: string | undefined;\n max?: string | undefined;\n minDays?: number | undefined;\n maxDays?: number | undefined;\n /** Shortcuts beside the calendar: 'last7Days', 'thisMonth', 'thisFiscalYear', … or { id, label, resolve }. */\n presets?: readonly RangePreset[] | undefined;\n isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;\n holidays?: readonly HolidayInput[] | HolidayLookup | undefined;\n locale?: LocaleCode | undefined;\n weekStartsOn?: Weekday | undefined;\n weekendDays?: readonly Weekday[] | undefined;\n showOtherCalendar?: boolean | undefined;\n today?: CalendarDate | undefined;\n /** Field names for plain form posts. */\n startName?: string | undefined;\n endName?: string | undefined;\n startLabel?: string | undefined;\n endLabel?: string | undefined;\n /** Show a \"Fiscal year\" button that switches the panel to fiscal-year tiles. */\n fiscalYearView?: boolean | undefined;\n disabled?: boolean | undefined;\n /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */\n mask?: boolean | undefined;\n /** Show the calendar in the page, always open, instead of in a popover. */\n inline?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n panelLayout?: PanelLayout | undefined;\n theme?: 'light' | 'dark' | 'auto' | undefined;\n className?: string | undefined;\n}\n\n/** Two BS/AD date fields sharing one calendar panel in range mode. */\nexport function DateRangePicker({\n startName,\n endName,\n startLabel,\n endLabel,\n fiscalYearView = false,\n disabled = false,\n panelLayout,\n theme,\n className,\n ...options\n}: DateRangePickerProps): ReactElement {\n const locale = usePageLocale(options.locale);\n const picker = useDateRangePicker({ ...options, locale });\n const { state, store, calendar } = picker;\n const labels = getLocale(locale);\n const field = useRef<HTMLDivElement | null>(null);\n const row = useRef<HTMLDivElement | null>(null);\n const panel = useRef<HTMLDivElement | null>(null);\n const start = useRef<HTMLInputElement | null>(null);\n\n const panelWidth = state.presets.length > 0 ? PANEL_WIDTH_WITH_PRESETS : PANEL_WIDTH;\n usePanel(\n state.open && !state.inline,\n { anchor: row, panel, field, returnFocus: start },\n () => {\n store.actions.close();\n },\n calendar.focusGrid,\n panelWidth,\n panelLayout,\n );\n\n const invalid = (which: 'start' | 'end'): boolean =>\n state.error !== null &&\n (state.error.field === which || state.error.field === 'range');\n\n return (\n <div\n ref={field}\n className={className ? `ndp-field ${className}` : 'ndp-field'}\n data-ndp-theme={theme}\n >\n <div ref={row} className=\"ndp-range\">\n <div\n className=\"ndp-input\"\n data-invalid={invalid('start') || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n ref={start}\n className=\"ndp-input__control\"\n {...picker.getInputProps('start')}\n aria-label={startLabel}\n disabled={disabled}\n />\n </div>\n <span className=\"ndp-range__separator\" aria-hidden=\"true\">\n →\n </span>\n <div\n className=\"ndp-input\"\n data-invalid={invalid('end') || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n className=\"ndp-input__control\"\n {...picker.getInputProps('end')}\n aria-label={endLabel}\n disabled={disabled}\n />\n {!state.inline && (\n <span className=\"ndp-input__actions\">\n <button\n className=\"ndp-icon-button\"\n disabled={disabled}\n {...picker.getToggleProps()}\n >\n <Icon name=\"calendar\" />\n </button>\n </span>\n )}\n </div>\n </div>\n {state.error && (\n <p id={picker.ids.hint} className=\"ndp-hint\" data-error aria-live=\"polite\">\n {state.error.message}\n </p>\n )}\n {startName !== undefined && (\n <input\n type=\"hidden\"\n name={startName}\n value={state.value.start}\n disabled={disabled}\n />\n )}\n {endName !== undefined && (\n <input type=\"hidden\" name={endName} value={state.value.end} disabled={disabled} />\n )}\n {state.open && (\n <div\n ref={panel}\n className=\"ndp-panel\"\n popover={state.inline ? undefined : 'manual'}\n data-layout={state.inline ? 'inline' : undefined}\n style={\n state.inline\n ? ({ '--ndp-panel-width': `${String(panelWidth)}px` } as CSSProperties)\n : undefined\n }\n data-ndp-theme={theme}\n {...picker.getPanelProps()}\n >\n <PanelBody\n presets={state.presets}\n label={labels.labels.presets}\n onPreset={(id) => {\n if (store.actions.applyPreset(id) && !store.getState().open) {\n restoreFocus(start.current);\n }\n }}\n >\n <CalendarBody bindings={calendar} />\n </PanelBody>\n {(state.canSwitchCalendar || fiscalYearView) && (\n <div className=\"ndp-panel__footer\">\n {state.canSwitchCalendar ? (\n <div\n className=\"ndp-segment\"\n role=\"group\"\n aria-label={labels.labels.calendar}\n >\n {(['BS', 'AD'] as const).map((option) => (\n <button\n key={option}\n className=\"ndp-segment__item\"\n {...picker.getCalendarOptionProps(option)}\n >\n {labels.calendarNames[option]}\n </button>\n ))}\n </div>\n ) : (\n <span />\n )}\n {fiscalYearView && (\n <button\n type=\"button\"\n className=\"ndp-button\"\n aria-pressed={state.calendarState.view === 'fiscal'}\n onClick={() => {\n store.calendar.actions.setView(\n state.calendarState.view === 'fiscal' ? 'day' : 'fiscal',\n );\n calendar.focusGrid();\n }}\n >\n {labels.labels.fiscalYear}\n </button>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n );\n}\n","import { useEffect, useRef, type ReactElement } from 'react';\nimport { getLocale, type LocaleCode } from '@nepdatejs/core';\nimport type { TimeCell } from '@nepdatejs/datepicker';\n\n/** Hour and minute columns (Figma \"Time Item\"); the selected items scroll into view. */\nexport function TimeColumns({\n hours,\n minutes,\n locale,\n onHour,\n onMinute,\n}: {\n hours: readonly TimeCell[];\n minutes: readonly TimeCell[];\n locale?: LocaleCode | undefined;\n onHour: (hour: number) => void;\n onMinute: (minute: number) => void;\n}): ReactElement {\n const root = useRef<HTMLDivElement | null>(null);\n const labels = getLocale(locale).labels;\n\n useEffect(() => {\n for (const item of root.current?.querySelectorAll<HTMLElement>(\n '[aria-pressed=\"true\"]',\n ) ?? []) {\n if (typeof item.scrollIntoView === 'function') {\n item.scrollIntoView({ block: 'nearest' });\n }\n }\n }, []);\n\n const column = (\n label: string,\n cells: readonly TimeCell[],\n pick: (value: number) => void,\n ): ReactElement => (\n <div className=\"ndp-time__column\" role=\"group\" aria-label={label}>\n {cells.map((cell) => (\n <button\n key={cell.value}\n type=\"button\"\n className=\"ndp-time-item\"\n aria-pressed={cell.isSelected}\n onClick={() => {\n pick(cell.value);\n }}\n >\n {cell.label}\n </button>\n ))}\n </div>\n );\n\n return (\n <div ref={root} className=\"ndp-time\" role=\"group\" aria-label={labels.time}>\n {column(labels.hour, hours, onHour)}\n {column(labels.minute, minutes, onMinute)}\n </div>\n );\n}\n","import { useRef, type CSSProperties, type ReactElement } from 'react';\nimport {\n getLocale,\n type CalendarDate,\n type CalendarSystem,\n type LocaleCode,\n type Weekday,\n} from '@nepdatejs/core';\nimport type { HolidayInput, HolidayLookup } from '@nepdatejs/calendar';\nimport type { DateTimeDetail, SinglePreset } from '@nepdatejs/datepicker';\nimport { CalendarBody } from './calendar-body';\nimport { popupProps, useDateTimePicker } from './hooks';\nimport { Icon } from './icons';\nimport { usePageLocale } from './page-locale';\nimport { usePanel } from './panel';\nimport type { PanelLayout } from '@nepdatejs/dom';\nimport {\n PANEL_WIDTH,\n PANEL_WIDTH_WITH_PRESETS,\n PanelBody,\n TIME_COLUMNS_WIDTH,\n} from './presets';\nimport { TimeColumns } from './time-columns';\n\nexport interface DateTimePickerProps {\n /** ISO timestamp with offset (\"2026-10-18T14:30:00+05:45\") or \"\". */\n value?: string | undefined;\n defaultValue?: string | undefined;\n onChange?: ((value: string, detail: DateTimeDetail | null) => void) | undefined;\n /** The zone the picker shows and the value's offset. Default Asia/Kathmandu (core config). */\n timeZone?: string | undefined;\n hour12?: boolean | undefined;\n /** Minutes in the column (1–30). Default 5. */\n minuteStep?: number | undefined;\n /** Time used when a day is picked first. Default \"00:00\". */\n defaultTime?: string | undefined;\n calendar?: CalendarSystem | undefined;\n defaultCalendar?: CalendarSystem | undefined;\n /** Earliest and latest days, AD \"YYYY-MM-DD\". */\n min?: string | undefined;\n max?: string | undefined;\n isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;\n holidays?: readonly HolidayInput[] | HolidayLookup | undefined;\n presets?: readonly SinglePreset[] | undefined;\n locale?: LocaleCode | undefined;\n weekStartsOn?: Weekday | undefined;\n today?: CalendarDate | undefined;\n /** Submit the ISO value with a plain form. */\n name?: string | undefined;\n id?: string | undefined;\n required?: boolean | undefined;\n disabled?: boolean | undefined;\n /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */\n mask?: boolean | undefined;\n /** Show the calendar in the page, always open, instead of in a popover. */\n inline?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n panelLayout?: PanelLayout | undefined;\n theme?: 'light' | 'dark' | 'auto' | undefined;\n className?: string | undefined;\n /** Accessible names for the two inputs. */\n 'aria-label'?: string | undefined;\n timeLabel?: string | undefined;\n}\n\n/** A BS/AD date and time field. The value is one instant, with the zone's offset. */\nexport function DateTimePicker({\n name,\n required,\n disabled = false,\n panelLayout,\n theme,\n className,\n 'aria-label': ariaLabel,\n timeLabel,\n ...options\n}: DateTimePickerProps): ReactElement {\n const locale = usePageLocale(options.locale);\n const picker = useDateTimePicker({ ...options, locale });\n const { state, store, calendar, ids } = picker;\n const labels = getLocale(locale);\n const field = useRef<HTMLDivElement | null>(null);\n const row = useRef<HTMLDivElement | null>(null);\n const panel = useRef<HTMLDivElement | null>(null);\n const dateInput = useRef<HTMLInputElement | null>(null);\n\n const panelWidth =\n (state.presets.length > 0 ? PANEL_WIDTH_WITH_PRESETS : PANEL_WIDTH) +\n TIME_COLUMNS_WIDTH;\n usePanel(\n state.open && !state.inline,\n { anchor: row, panel, field, returnFocus: dateInput },\n () => {\n store.actions.close();\n },\n calendar.focusGrid,\n panelWidth,\n panelLayout,\n );\n\n const hint = state.error?.message ?? state.equivalentText;\n const invalid = (which: 'date' | 'time'): boolean => state.error?.field === which;\n\n return (\n <div\n ref={field}\n className={className ? `ndp-field ${className}` : 'ndp-field'}\n data-ndp-theme={theme}\n >\n <div ref={row} className=\"ndp-datetime\">\n <div\n className=\"ndp-input\"\n data-invalid={invalid('date') || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n ref={dateInput}\n id={ids.date}\n className=\"ndp-input__control\"\n {...popupProps(state)}\n type=\"text\"\n inputMode=\"numeric\"\n autoComplete=\"off\"\n value={state.dateText}\n placeholder={state.placeholder}\n aria-label={ariaLabel}\n aria-controls={ids.panel}\n aria-invalid={invalid('date') || undefined}\n aria-describedby={hint ? ids.hint : undefined}\n required={required}\n disabled={disabled}\n onChange={(event) => {\n store.actions.typeDate(event.target.value);\n }}\n onBlur={() => {\n store.actions.blurDate();\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowDown' && (event.altKey || state.dateText === '')) {\n event.preventDefault();\n store.actions.open();\n }\n }}\n />\n {!state.inline && (\n <span className=\"ndp-input__actions\">\n <button\n type=\"button\"\n className=\"ndp-icon-button\"\n disabled={disabled}\n aria-label={labels.labels.openCalendar}\n aria-expanded={state.open}\n aria-controls={ids.panel}\n onClick={() => {\n store.actions.toggle();\n }}\n >\n <Icon name=\"calendar\" />\n </button>\n </span>\n )}\n </div>\n <div\n className=\"ndp-input ndp-input--time\"\n data-invalid={invalid('time') || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n id={ids.time}\n className=\"ndp-input__control\"\n type=\"text\"\n inputMode=\"text\"\n autoComplete=\"off\"\n value={state.timeText}\n placeholder={state.timePlaceholder}\n aria-label={timeLabel ?? labels.labels.time}\n aria-invalid={invalid('time') || undefined}\n aria-describedby={hint ? ids.hint : undefined}\n disabled={disabled}\n onChange={(event) => {\n store.actions.typeTime(event.target.value);\n }}\n onBlur={() => {\n store.actions.blurTime();\n }}\n />\n </div>\n </div>\n {hint !== null && (\n <p\n id={ids.hint}\n className=\"ndp-hint\"\n data-error={state.error ? true : undefined}\n aria-live=\"polite\"\n >\n {hint}\n </p>\n )}\n {name !== undefined && (\n <input type=\"hidden\" name={name} value={state.value} disabled={disabled} />\n )}\n {state.open && (\n <div\n ref={panel}\n id={ids.panel}\n className=\"ndp-panel\"\n popover={state.inline ? undefined : 'manual'}\n data-layout={state.inline ? 'inline' : undefined}\n style={\n state.inline\n ? ({ '--ndp-panel-width': `${String(panelWidth)}px` } as CSSProperties)\n : undefined\n }\n role={state.inline ? 'group' : 'dialog'}\n aria-label={labels.labels.chooseDate}\n data-ndp-theme={theme}\n >\n <PanelBody\n presets={state.presets}\n label={labels.labels.presets}\n onPreset={(presetId) => {\n store.actions.applyPreset(presetId);\n }}\n >\n <CalendarBody bindings={calendar} />\n <TimeColumns\n hours={state.hours}\n minutes={state.minutes}\n locale={options.locale}\n onHour={(hour) => {\n store.actions.selectHour(hour);\n }}\n onMinute={(minute) => {\n store.actions.selectMinute(minute);\n }}\n />\n </PanelBody>\n <div className=\"ndp-panel__footer\">\n {state.canSwitchCalendar ? (\n <div\n className=\"ndp-segment\"\n role=\"group\"\n aria-label={labels.labels.calendar}\n >\n {(['BS', 'AD'] as const).map((option) => (\n <button\n key={option}\n type=\"button\"\n className=\"ndp-segment__item\"\n aria-pressed={state.calendar === option}\n onClick={() => {\n store.actions.switchCalendar(option);\n }}\n >\n {labels.calendarNames[option]}\n </button>\n ))}\n </div>\n ) : (\n <span />\n )}\n <span>\n <button\n type=\"button\"\n className=\"ndp-button\"\n onClick={() => {\n store.actions.selectNow();\n }}\n >\n {labels.labels.now}\n </button>\n <button\n type=\"button\"\n className=\"ndp-button\"\n data-variant=\"primary\"\n onClick={() => {\n store.actions.close();\n dateInput.current?.focus();\n }}\n >\n {labels.labels.done}\n </button>\n </span>\n </div>\n </div>\n )}\n </div>\n );\n}\n","import { useEffect, useRef, type CSSProperties, type ReactElement } from 'react';\nimport {\n getLocale,\n type CalendarDate,\n type CalendarSystem,\n type LocaleCode,\n type Weekday,\n} from '@nepdatejs/core';\nimport type { EventMarker, HolidayInput, HolidayLookup } from '@nepdatejs/calendar';\nimport type { DateDetail } from '@nepdatejs/datepicker';\nimport { restoreFocus, type PanelLayout } from '@nepdatejs/dom';\nimport { CalendarBody } from './calendar-body';\nimport { useMultiDatePicker } from './hooks';\nimport { Icon } from './icons';\nimport { usePageLocale } from './page-locale';\nimport { usePanel } from './panel';\nimport { PANEL_WIDTH } from './presets';\n\nexport interface MultiDatePickerProps {\n /** AD \"YYYY-MM-DD\" days. */\n value?: readonly string[] | undefined;\n defaultValue?: readonly string[] | undefined;\n onChange?:\n ((value: readonly string[], dates: readonly DateDetail[]) => void) | undefined;\n calendar?: CalendarSystem | undefined;\n defaultCalendar?: CalendarSystem | undefined;\n onCalendarChange?: ((calendar: CalendarSystem) => void) | undefined;\n /** Earliest and latest allowed days, as AD \"YYYY-MM-DD\". */\n min?: string | undefined;\n max?: string | undefined;\n /** The most days that may be chosen. */\n maxDates?: number | undefined;\n isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;\n holidays?: readonly HolidayInput[] | HolidayLookup | undefined;\n events?: ((date: CalendarDate) => readonly EventMarker[]) | undefined;\n locale?: LocaleCode | undefined;\n weekStartsOn?: Weekday | undefined;\n weekendDays?: readonly Weekday[] | undefined;\n showOtherCalendar?: boolean | undefined;\n /** Close the panel after each click. Default false. */\n closeOnSelect?: boolean | undefined;\n /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */\n mask?: boolean | undefined;\n /** Show the calendar in the page, always open, instead of in a popover. */\n inline?: boolean | undefined;\n /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */\n panelLayout?: PanelLayout | undefined;\n /** Submit each day under this name, one hidden input per day. */\n name?: string | undefined;\n id?: string | undefined;\n placeholder?: string | undefined;\n required?: boolean | undefined;\n disabled?: boolean | undefined;\n clearable?: boolean | undefined;\n today?: CalendarDate | undefined;\n theme?: 'light' | 'dark' | 'auto' | undefined;\n className?: string | undefined;\n 'aria-label'?: string | undefined;\n}\n\n/**\n * Several separate BS/AD days in one field (PICK-001): click days in the\n * panel to add or remove them, or type them separated by commas. The value is\n * the sorted AD days as \"YYYY-MM-DD\" strings.\n */\nexport function MultiDatePicker({\n name,\n placeholder,\n required,\n disabled = false,\n clearable = true,\n panelLayout,\n theme,\n className,\n 'aria-label': ariaLabel,\n ...options\n}: MultiDatePickerProps): ReactElement {\n const locale = usePageLocale(options.locale);\n const picker = useMultiDatePicker({ ...options, locale });\n const { state, store, calendar } = picker;\n const labels = getLocale(locale);\n const field = useRef<HTMLDivElement | null>(null);\n const box = useRef<HTMLDivElement | null>(null);\n const panel = useRef<HTMLDivElement | null>(null);\n const input = useRef<HTMLInputElement | null>(null);\n\n usePanel(\n state.open && !state.inline,\n { anchor: box, panel, field, returnFocus: input },\n () => {\n store.actions.close();\n },\n calendar.focusGrid,\n PANEL_WIDTH,\n panelLayout,\n );\n\n // A form reset puts the field back to its default value.\n useEffect(() => {\n const form = input.current?.form;\n if (!form) {\n return undefined;\n }\n const reset = (): void => {\n store.actions.reset();\n };\n form.addEventListener('reset', reset);\n\n return () => {\n form.removeEventListener('reset', reset);\n };\n }, [store]);\n\n useEffect(() => {\n input.current?.setCustomValidity(state.error?.message ?? '');\n }, [state.error]);\n\n return (\n <div\n ref={field}\n className={className ? `ndp-field ${className}` : 'ndp-field'}\n data-ndp-theme={theme}\n >\n <div\n ref={box}\n className=\"ndp-input\"\n data-invalid={state.error !== null || undefined}\n data-disabled={disabled || undefined}\n >\n <input\n ref={input}\n className=\"ndp-input__control\"\n {...picker.getInputProps()}\n aria-label={ariaLabel}\n placeholder={placeholder ?? state.placeholder}\n required={required}\n disabled={disabled}\n />\n <span className=\"ndp-input__actions\">\n {clearable && state.text !== '' && !disabled && (\n <button\n className=\"ndp-icon-button\"\n {...picker.getClearProps()}\n onClick={() => {\n store.actions.clear();\n input.current?.focus();\n }}\n >\n <Icon name=\"close\" />\n </button>\n )}\n {!state.inline && (\n <button\n className=\"ndp-icon-button\"\n disabled={disabled}\n {...picker.getToggleProps()}\n >\n <Icon name=\"calendar\" />\n </button>\n )}\n </span>\n </div>\n {state.error && (\n <p id={picker.ids.hint} className=\"ndp-hint\" data-error aria-live=\"polite\">\n {state.error.message}\n </p>\n )}\n {name !== undefined &&\n state.value.map((day) => (\n <input key={day} type=\"hidden\" name={name} value={day} disabled={disabled} />\n ))}\n {state.open && (\n <div\n ref={panel}\n className=\"ndp-panel\"\n popover={state.inline ? undefined : 'manual'}\n data-layout={state.inline ? 'inline' : undefined}\n style={\n state.inline\n ? ({ '--ndp-panel-width': `${String(PANEL_WIDTH)}px` } as CSSProperties)\n : undefined\n }\n data-ndp-theme={theme}\n {...picker.getPanelProps()}\n aria-label={\n ariaLabel\n ? `${ariaLabel}: ${labels.labels.calendar}`\n : labels.labels.chooseDate\n }\n >\n <CalendarBody\n bindings={{\n ...calendar,\n getDayProps: (cell) => ({\n ...calendar.getDayProps(cell),\n onClick: () => {\n if (\n !cell.isDisabled &&\n store.actions.select(cell.date) &&\n !store.getState().open\n ) {\n restoreFocus(input.current);\n }\n },\n }),\n }}\n />\n <div className=\"ndp-panel__footer\">\n {state.canSwitchCalendar ? (\n <div\n className=\"ndp-segment\"\n role=\"group\"\n aria-label={labels.labels.calendar}\n >\n {(['BS', 'AD'] as const).map((option) => (\n <button\n key={option}\n className=\"ndp-segment__item\"\n {...picker.getCalendarOptionProps(option)}\n >\n {labels.calendarNames[option]}\n </button>\n ))}\n </div>\n ) : (\n <span />\n )}\n {!state.inline && (\n <button\n type=\"button\"\n className=\"ndp-button\"\n onClick={() => {\n store.actions.close();\n restoreFocus(input.current);\n }}\n >\n {labels.labels.done}\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAEA,MAAM,QAAQ;CACZ,gBAAgB,CAAC,uBAAuB;CACxC,iBAAiB,CAAC,sBAAsB;CACxC,UAAU;EACR;EACA;EACA;EACA;CACF;CACA,OAAO,CAAC,YAAY,YAAY;AAClC;;AAKA,SAAgB,KAAK,EAAE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CAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACG,MAAM,oBACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;MACE,WAAU;MACV,MAAK;MACL,cAAY,OAAO,OAAO;MAExB,UAAA,CAAC,MAAM,IAAI,CAAC,CAAW,KAAK,WAC5B,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;OAEE,WAAU;OACV,GAAI,OAAO,uBAAuB,MAAM;OAEvC,UAAA,OAAO,cAAc;MAChB,GALD,MAKC,CACT;KACE,CAAA,IAEL,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,CAAO,CAAA,GAER,CAAC,MAAM,UACN,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;MACE,MAAK;MACL,WAAU;MACV,eAAe;OACb,MAAM,QAAQ,MAAM;OACpB,CAAA,GAAA,eAAA,aAAA,CAAa,MAAM,OAAO;MAC5B;MAEC,UAAA,OAAO,OAAO;KACT,CAAA,CAEP;IACF,CAAA,CAAA;;EAEJ;;AAET"}
@@ -0,0 +1,245 @@
1
+ import { _ as useCalendarBindings, a as DateTimePickerBindings, c as PanelProps, d as useDateRangePicker, f as useDateTimePicker, g as GridProps, h as CalendarBindings, i as DateRangePickerBindings, l as useCalendar, m as ButtonProps, n as useStore, o as InputProps, p as useMultiDatePicker, r as DatePickerBindings, s as MultiDatePickerBindings, t as deepEqual, u as useDatePicker } from "./headless-CrIIPnOF.cjs";
2
+ import { a as shortDate, i as bothDates, n as DateTextProps, r as ShortDate, t as DateText } from "./date-text-Dipetpbp.cjs";
3
+ import { ReactElement } from "react";
4
+ import { CalendarDate, CalendarSystem, DateFormatPattern, LocaleCode, Weekday } from "@nepdatejs/core";
5
+ import { CalendarOptions, CalendarSelection, EventMarker, HolidayInput, HolidayLookup } from "@nepdatejs/calendar";
6
+ import { DateDetail, DateTimeDetail, RangeDetail, RangePreset, RangeValue, SinglePreset, TimeCell } from "@nepdatejs/datepicker";
7
+ import { PanelLayout } from "@nepdatejs/dom";
8
+ //#region src/calendar.d.ts
9
+ interface CalendarProps extends Omit<CalendarOptions, "onSelect" | "visibleMonth" | "onVisibleMonthChange"> {
10
+ /** Show this month (any day in it); pair with onMonthChange to control it. */
11
+ month?: CalendarDate | undefined;
12
+ onMonthChange?: ((month: CalendarDate) => void) | undefined;
13
+ onSelect?: ((selection: CalendarSelection) => void) | undefined;
14
+ className?: string | undefined;
15
+ theme?: "light" | "dark" | "auto" | undefined;
16
+ }
17
+ /** A standalone BS/AD month view with keyboard support. */
18
+ export declare function Calendar({ month, onMonthChange, className, theme, ...options }: CalendarProps): ReactElement;
19
+ //#endregion
20
+ //#region src/date-picker.d.ts
21
+ interface DatePickerProps {
22
+ /** The AD date as "YYYY-MM-DD", or "": the same value a native date input uses. */
23
+ value?: string | undefined;
24
+ /** The starting value when the field keeps its own state, as in a plain form with `name`. */
25
+ defaultValue?: string | undefined;
26
+ onChange?: ((value: string, date: DateDetail | null) => void) | undefined;
27
+ /** Show and type dates in this calendar only, and hide the BS/AD switch. */
28
+ calendar?: CalendarSystem | undefined;
29
+ /** The calendar shown first when the viewer has not chosen one. */
30
+ defaultCalendar?: CalendarSystem | undefined;
31
+ /** Called when the viewer switches BS/AD. */
32
+ onCalendarChange?: ((calendar: CalendarSystem) => void) | undefined;
33
+ /** Earliest and latest allowed days, as AD "YYYY-MM-DD". */
34
+ min?: string | undefined;
35
+ max?: string | undefined;
36
+ isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;
37
+ /** Names, digits and messages; defaults to the page language (ne when <html lang="ne">). */
38
+ locale?: LocaleCode | undefined;
39
+ /** Submit the AD value with a plain form under this name. */
40
+ name?: string | undefined;
41
+ id?: string | undefined;
42
+ placeholder?: string | undefined;
43
+ required?: boolean | undefined;
44
+ disabled?: boolean | undefined;
45
+ clearable?: boolean | undefined;
46
+ /** Show the same day in the other calendar under the field. */
47
+ showEquivalent?: boolean | undefined;
48
+ holidays?: readonly HolidayInput[] | HolidayLookup | undefined;
49
+ events?: ((date: CalendarDate) => readonly EventMarker[]) | undefined;
50
+ weekStartsOn?: Weekday | undefined;
51
+ weekendDays?: readonly Weekday[] | undefined;
52
+ /** Show the other calendar's day number under each day. Default true. */
53
+ showOtherCalendar?: boolean | undefined;
54
+ displayFormat?: DateFormatPattern | undefined;
55
+ closeOnSelect?: boolean | undefined;
56
+ /** Shortcuts beside the calendar: 'today', 'yesterday', 'tomorrow' or { id, label, resolve }. */
57
+ presets?: readonly SinglePreset[] | undefined;
58
+ /** Remember the viewer's BS/AD choice in localStorage under this key. */
59
+ persistCalendar?: string | undefined;
60
+ /** Override "today" (tests, server rendering). */
61
+ today?: CalendarDate | undefined;
62
+ /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */
63
+ mask?: boolean | undefined;
64
+ /** Show the calendar in the page, always open, instead of in a popover. */
65
+ inline?: boolean | undefined;
66
+ /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */
67
+ panelLayout?: PanelLayout | undefined;
68
+ theme?: "light" | "dark" | "auto" | undefined;
69
+ className?: string | undefined;
70
+ "aria-label"?: string | undefined;
71
+ "aria-invalid"?: boolean | undefined;
72
+ "aria-describedby"?: string | undefined;
73
+ }
74
+ /**
75
+ * A BS/AD date field: type a date or pick it from a calendar. The value is
76
+ * always the AD day as "YYYY-MM-DD", so forms, validation and storage are
77
+ * unchanged and a BS date can never be sent as if it were AD.
78
+ */
79
+ export declare function DatePicker(props: DatePickerProps): ReactElement;
80
+ //#endregion
81
+ //#region src/date-range-picker.d.ts
82
+ interface DateRangePickerProps {
83
+ value?: RangeValue | undefined;
84
+ defaultValue?: RangeValue | undefined;
85
+ onChange?: ((value: RangeValue, detail: RangeDetail) => void) | undefined;
86
+ calendar?: CalendarSystem | undefined;
87
+ defaultCalendar?: CalendarSystem | undefined;
88
+ min?: string | undefined;
89
+ max?: string | undefined;
90
+ minDays?: number | undefined;
91
+ maxDays?: number | undefined;
92
+ /** Shortcuts beside the calendar: 'last7Days', 'thisMonth', 'thisFiscalYear', … or { id, label, resolve }. */
93
+ presets?: readonly RangePreset[] | undefined;
94
+ isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;
95
+ holidays?: readonly HolidayInput[] | HolidayLookup | undefined;
96
+ locale?: LocaleCode | undefined;
97
+ weekStartsOn?: Weekday | undefined;
98
+ weekendDays?: readonly Weekday[] | undefined;
99
+ showOtherCalendar?: boolean | undefined;
100
+ today?: CalendarDate | undefined;
101
+ /** Field names for plain form posts. */
102
+ startName?: string | undefined;
103
+ endName?: string | undefined;
104
+ startLabel?: string | undefined;
105
+ endLabel?: string | undefined;
106
+ /** Show a "Fiscal year" button that switches the panel to fiscal-year tiles. */
107
+ fiscalYearView?: boolean | undefined;
108
+ disabled?: boolean | undefined;
109
+ /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */
110
+ mask?: boolean | undefined;
111
+ /** Show the calendar in the page, always open, instead of in a popover. */
112
+ inline?: boolean | undefined;
113
+ /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */
114
+ panelLayout?: PanelLayout | undefined;
115
+ theme?: "light" | "dark" | "auto" | undefined;
116
+ className?: string | undefined;
117
+ }
118
+ /** Two BS/AD date fields sharing one calendar panel in range mode. */
119
+ export declare function DateRangePicker({ startName, endName, startLabel, endLabel, fiscalYearView, disabled, panelLayout, theme, className, ...options }: DateRangePickerProps): ReactElement;
120
+ //#endregion
121
+ //#region src/date-time-picker.d.ts
122
+ interface DateTimePickerProps {
123
+ /** ISO timestamp with offset ("2026-10-18T14:30:00+05:45") or "". */
124
+ value?: string | undefined;
125
+ defaultValue?: string | undefined;
126
+ onChange?: ((value: string, detail: DateTimeDetail | null) => void) | undefined;
127
+ /** The zone the picker shows and the value's offset. Default Asia/Kathmandu (core config). */
128
+ timeZone?: string | undefined;
129
+ hour12?: boolean | undefined;
130
+ /** Minutes in the column (1–30). Default 5. */
131
+ minuteStep?: number | undefined;
132
+ /** Time used when a day is picked first. Default "00:00". */
133
+ defaultTime?: string | undefined;
134
+ calendar?: CalendarSystem | undefined;
135
+ defaultCalendar?: CalendarSystem | undefined;
136
+ /** Earliest and latest days, AD "YYYY-MM-DD". */
137
+ min?: string | undefined;
138
+ max?: string | undefined;
139
+ isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;
140
+ holidays?: readonly HolidayInput[] | HolidayLookup | undefined;
141
+ presets?: readonly SinglePreset[] | undefined;
142
+ locale?: LocaleCode | undefined;
143
+ weekStartsOn?: Weekday | undefined;
144
+ today?: CalendarDate | undefined;
145
+ /** Submit the ISO value with a plain form. */
146
+ name?: string | undefined;
147
+ id?: string | undefined;
148
+ required?: boolean | undefined;
149
+ disabled?: boolean | undefined;
150
+ /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */
151
+ mask?: boolean | undefined;
152
+ /** Show the calendar in the page, always open, instead of in a popover. */
153
+ inline?: boolean | undefined;
154
+ /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */
155
+ panelLayout?: PanelLayout | undefined;
156
+ theme?: "light" | "dark" | "auto" | undefined;
157
+ className?: string | undefined;
158
+ /** Accessible names for the two inputs. */
159
+ "aria-label"?: string | undefined;
160
+ timeLabel?: string | undefined;
161
+ }
162
+ /** A BS/AD date and time field. The value is one instant, with the zone's offset. */
163
+ export declare function DateTimePicker({ name, required, disabled, panelLayout, theme, className, "aria-label": ariaLabel, timeLabel, ...options }: DateTimePickerProps): ReactElement;
164
+ //#endregion
165
+ //#region src/multi-date-picker.d.ts
166
+ interface MultiDatePickerProps {
167
+ /** AD "YYYY-MM-DD" days. */
168
+ value?: readonly string[] | undefined;
169
+ defaultValue?: readonly string[] | undefined;
170
+ onChange?: ((value: readonly string[], dates: readonly DateDetail[]) => void) | undefined;
171
+ calendar?: CalendarSystem | undefined;
172
+ defaultCalendar?: CalendarSystem | undefined;
173
+ onCalendarChange?: ((calendar: CalendarSystem) => void) | undefined;
174
+ /** Earliest and latest allowed days, as AD "YYYY-MM-DD". */
175
+ min?: string | undefined;
176
+ max?: string | undefined;
177
+ /** The most days that may be chosen. */
178
+ maxDates?: number | undefined;
179
+ isDateDisabled?: ((date: CalendarDate) => boolean) | undefined;
180
+ holidays?: readonly HolidayInput[] | HolidayLookup | undefined;
181
+ events?: ((date: CalendarDate) => readonly EventMarker[]) | undefined;
182
+ locale?: LocaleCode | undefined;
183
+ weekStartsOn?: Weekday | undefined;
184
+ weekendDays?: readonly Weekday[] | undefined;
185
+ showOtherCalendar?: boolean | undefined;
186
+ /** Close the panel after each click. Default false. */
187
+ closeOnSelect?: boolean | undefined;
188
+ /** Add the dashes of YYYY-MM-DD while the user types digits. Default true. */
189
+ mask?: boolean | undefined;
190
+ /** Show the calendar in the page, always open, instead of in a popover. */
191
+ inline?: boolean | undefined;
192
+ /** 'sheet' opens a bottom sheet; 'popover' sits beside the field; 'auto' (default) uses the sheet below 480px. */
193
+ panelLayout?: PanelLayout | undefined;
194
+ /** Submit each day under this name, one hidden input per day. */
195
+ name?: string | undefined;
196
+ id?: string | undefined;
197
+ placeholder?: string | undefined;
198
+ required?: boolean | undefined;
199
+ disabled?: boolean | undefined;
200
+ clearable?: boolean | undefined;
201
+ today?: CalendarDate | undefined;
202
+ theme?: "light" | "dark" | "auto" | undefined;
203
+ className?: string | undefined;
204
+ "aria-label"?: string | undefined;
205
+ }
206
+ /**
207
+ * Several separate BS/AD days in one field (PICK-001): click days in the
208
+ * panel to add or remove them, or type them separated by commas. The value is
209
+ * the sorted AD days as "YYYY-MM-DD" strings.
210
+ */
211
+ export declare function MultiDatePicker({ name, placeholder, required, disabled, clearable, panelLayout, theme, className, "aria-label": ariaLabel, ...options }: MultiDatePickerProps): ReactElement;
212
+ //#endregion
213
+ //#region src/time-columns.d.ts
214
+ /** Hour and minute columns (Figma "Time Item"); the selected items scroll into view. */
215
+ export declare function TimeColumns({ hours, minutes, locale, onHour, onMinute }: {
216
+ hours: readonly TimeCell[];
217
+ minutes: readonly TimeCell[];
218
+ locale?: LocaleCode | undefined;
219
+ onHour: (hour: number) => void;
220
+ onMinute: (minute: number) => void;
221
+ }): ReactElement;
222
+ //#endregion
223
+ //#region src/calendar-body.d.ts
224
+ /** The calendar markup (@nepdatejs/styles contract) for any set of bindings. */
225
+ export declare function CalendarBody({ bindings, className, theme }: {
226
+ bindings: CalendarBindings;
227
+ className?: string | undefined;
228
+ theme?: string | undefined;
229
+ }): ReactElement;
230
+ //#endregion
231
+ //#region src/icons.d.ts
232
+ declare const PATHS: {
233
+ readonly "chevron-left": readonly ["M10 3.5 5.5 8l4.5 4.5"];
234
+ readonly "chevron-right": readonly ["M6 3.5 10.5 8 6 12.5"];
235
+ readonly calendar: readonly ["M2 6.5h12", "M5.5 1.5v3", "M10.5 1.5v3", "M4 3h8a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z"];
236
+ readonly close: readonly ["M4 4l8 8", "M12 4l-8 8"];
237
+ };
238
+ type IconName = keyof typeof PATHS;
239
+ /** The Figma icon set, 16px, stroked with currentColor. */
240
+ export declare function Icon({ name }: {
241
+ name: IconName;
242
+ }): ReactElement;
243
+ //#endregion
244
+ export { type ButtonProps, type CalendarBindings, type CalendarProps, type DatePickerBindings, type DatePickerProps, type DateRangePickerBindings, type DateRangePickerProps, DateText, type DateTextProps, type DateTimePickerBindings, type DateTimePickerProps, type GridProps, type IconName, type InputProps, type MultiDatePickerBindings, type MultiDatePickerProps, type PanelProps, ShortDate, bothDates, deepEqual, shortDate, useCalendar, useCalendarBindings, useDatePicker, useDateRangePicker, useDateTimePicker, useMultiDatePicker, useStore };
245
+ //# sourceMappingURL=index.d.cts.map