nish-ui 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -104,6 +104,9 @@ import { ServiceTokensSection, useServiceTokens } from "./components/service-tok
104
104
  import { Combobox } from "./components/combobox.js";
105
105
  import { Calendar } from "./components/calendar.js";
106
106
  import { DatePicker } from "./components/date-picker.js";
107
+ import { RangeCalendar } from "./components/range-calendar.js";
108
+ import { DateRangePicker } from "./components/date-range-picker.js";
109
+ import { TimeField } from "./components/time-field.js";
107
110
  import { MultiSelect } from "./components/multi-select.js";
108
111
  import { Carousel } from "./components/carousel.js";
109
112
  import {
@@ -197,6 +200,7 @@ export {
197
200
  DEFAULT_STRINGS,
198
201
  DEFAULT_THEME,
199
202
  DatePicker,
203
+ DateRangePicker,
200
204
  Disclosure,
201
205
  Drawer,
202
206
  DropdownMenu,
@@ -261,6 +265,7 @@ export {
261
265
  Radio,
262
266
  RadioGroup,
263
267
  RangeBar,
268
+ RangeCalendar,
264
269
  RelativeTime,
265
270
  ResponsiveTable,
266
271
  RotateIcon,
@@ -308,6 +313,7 @@ export {
308
313
  Th,
309
314
  ThemeToggle,
310
315
  TickerText,
316
+ TimeField,
311
317
  Toaster,
312
318
  Tooltip,
313
319
  Tr,
@@ -1,5 +1,5 @@
1
1
  // src/runtime.ts
2
- var version = true ? "2.1.3" : "dev";
2
+ var version = true ? "2.2.0" : "dev";
3
3
  var VERSION = version;
4
4
  var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
5
5
  function runtime() {
package/dist/format.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/runtime.ts
2
- var version = true ? "2.1.3" : "dev";
2
+ var version = true ? "2.2.0" : "dev";
3
3
  var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
4
4
  function runtime() {
5
5
  const g = globalThis;
package/dist/index.d.ts CHANGED
@@ -104,6 +104,24 @@ interface NishStrings {
104
104
  monthToken: string;
105
105
  /** DatePicker: year token in the placeholder. */
106
106
  yearToken: string;
107
+ /** DateRangePicker: calendar button name while empty, and the popover name. */
108
+ chooseDates: string;
109
+ /** DateRangePicker: calendar button name once a range is set. */
110
+ changeDates: (range: string) => string;
111
+ /** RangeCalendar, DateRangePicker: two dates read as a range. */
112
+ dateRange: (from: string, to: string) => string;
113
+ /** RangeCalendar: live-region text after the first day is picked. */
114
+ rangeStarted: (start: string) => string;
115
+ /** DateRangePicker: custom validity message for text that is not a range. */
116
+ invalidDateRange: string;
117
+ /** TimeField: name of the hour box. */
118
+ hour: string;
119
+ /** TimeField: name of the minute box. */
120
+ minute: string;
121
+ /** TimeField: name of the AM/PM select. */
122
+ dayPeriod: string;
123
+ /** TimeField: custom validity message for a time that is incomplete or not allowed. */
124
+ invalidTime: string;
107
125
  /** MultiSelect: announcement after a value is added. */
108
126
  optionAdded: (label: string) => string;
109
127
  /** MultiSelect: announcement after a value is removed. */
@@ -3767,16 +3785,18 @@ interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
3767
3785
  declare function Combobox({ ref, options, value: valueProp, defaultValue, onChange, onValueChange, filter, allowCustom, placeholder, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, emptyText, onQueryChange, loading, size, clearLabel, loadingText, resultsText, className, ...rest }: ComboboxProps): react.JSX.Element;
3768
3786
 
3769
3787
  type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
3788
+ /** A span of days, both ends included, as YYYY-MM-DD. from is never after to. */
3789
+ interface DateRange {
3790
+ /** The first day. */
3791
+ from: string;
3792
+ /** The last day, included; equal to from for a one-day range. */
3793
+ to: string;
3794
+ }
3770
3795
 
3771
- interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children'> {
3796
+ /** Props Calendar and RangeCalendar share. */
3797
+ interface CalendarSharedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children'> {
3772
3798
  /** The root element. */
3773
3799
  ref?: Ref<HTMLDivElement>;
3774
- /** The picked day as YYYY-MM-DD (controlled), or null for none. */
3775
- value?: string | null;
3776
- /** The first picked day of an uncontrolled calendar. */
3777
- defaultValue?: string | null;
3778
- /** Called with the day the reader picks (YYYY-MM-DD). */
3779
- onValueChange?: (value: string) => void;
3780
3800
  /** The month shown, as YYYY-MM (controlled). Pair with onMonthChange. */
3781
3801
  month?: string;
3782
3802
  /** The first month shown when uncontrolled. Default: the value's month, else this month. */
@@ -3806,10 +3826,19 @@ interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
3806
3826
  /** Accessible name of the next-month button. Default "Next month". */
3807
3827
  nextMonthLabel?: string;
3808
3828
  }
3829
+
3830
+ interface CalendarProps extends CalendarSharedProps {
3831
+ /** The picked day as YYYY-MM-DD (controlled), or null for none. */
3832
+ value?: string | null;
3833
+ /** The first picked day of an uncontrolled calendar. */
3834
+ defaultValue?: string | null;
3835
+ /** Called with the day the reader picks (YYYY-MM-DD). */
3836
+ onValueChange?: (value: string) => void;
3837
+ }
3809
3838
  /** A month grid that picks one day. Arrow keys move by day and week, Page Up and Page Down by
3810
3839
  * month (with Shift, by year), Home and End to the ends of the week. Values are YYYY-MM-DD
3811
3840
  * strings, the same as `<input type="date">`. */
3812
- declare function Calendar({ value, defaultValue, onValueChange, month: monthProp, defaultMonth, onMonthChange, min: minProp, max: maxProp, isDateDisabled, locale, weekStartsOn, captionLayout, fromYear, toYear, autoFocus, previousMonthLabel, nextMonthLabel, className, ref, ...rest }: CalendarProps): react.JSX.Element;
3841
+ declare function Calendar({ value, defaultValue, onValueChange, ...rest }: CalendarProps): react.JSX.Element;
3813
3842
 
3814
3843
  interface DatePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-invalid' | 'role'> {
3815
3844
  /** The text input. The remaining div attributes go to the wrapper. */
@@ -3867,6 +3896,128 @@ interface DatePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange
3867
3896
  * go to the wrapper. */
3868
3897
  declare function DatePicker({ ref, value: valueProp, defaultValue, onValueChange, min: minProp, max: maxProp, isDateDisabled, locale, weekStartsOn, captionLayout, placeholder, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, size, calendarLabel, className, ...rest }: DatePickerProps): react.JSX.Element;
3869
3898
 
3899
+ interface RangeCalendarProps extends CalendarSharedProps {
3900
+ /** The picked range as { from, to } in YYYY-MM-DD (controlled), or null for none. */
3901
+ value?: DateRange | null;
3902
+ /** The first range of an uncontrolled calendar. */
3903
+ defaultValue?: DateRange | null;
3904
+ /** Called with { from, to } once the second day is picked; from is never after to. A half-picked range is not reported. */
3905
+ onValueChange?: (value: DateRange) => void;
3906
+ /** Let a range cover days isDateDisabled returns true for (weekends inside a vacation). Default false: a second press that would cover one starts a new range there. */
3907
+ allowDisabledInRange?: boolean;
3908
+ }
3909
+ /** A month grid that picks a range of days: the first press sets the start, the second the end, and the days
3910
+ * between light up as the pointer or focus moves. Same keys as Calendar; Escape drops a start with no end. */
3911
+ declare function RangeCalendar({ value, defaultValue, onValueChange, allowDisabledInRange, ...shared }: RangeCalendarProps): react.JSX.Element;
3912
+
3913
+ interface DateRangePickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-invalid' | 'role'> {
3914
+ /** The text input. The remaining div attributes go to the wrapper. */
3915
+ ref?: Ref<HTMLInputElement>;
3916
+ /** The range as { from, to } in YYYY-MM-DD, or null for none (controlled). */
3917
+ value?: DateRange | null;
3918
+ /** The starting range of an uncontrolled picker. */
3919
+ defaultValue?: DateRange | null;
3920
+ /** Called with { from, to }, or null when the field is cleared. */
3921
+ onValueChange?: (value: DateRange | null) => void;
3922
+ /** Earliest date that can be picked or typed (YYYY-MM-DD). */
3923
+ min?: string;
3924
+ /** Latest date that can be picked or typed (YYYY-MM-DD). */
3925
+ max?: string;
3926
+ /** Return true to disable a date in the calendar and refuse a typed range that ends on or covers it. */
3927
+ isDateDisabled?: (date: string) => boolean;
3928
+ /** Let a range cover days isDateDisabled returns true for (weekends inside a vacation). Default false: a second press that would cover one starts a new range there. */
3929
+ allowDisabledInRange?: boolean;
3930
+ /** BCP 47 tag for the field format and the calendar. Default NishProvider locale, then setDefaultLocale(). */
3931
+ locale?: string;
3932
+ /** First column of the calendar: 0 Sunday to 6 Saturday. Default from the locale's region. */
3933
+ weekStartsOn?: WeekDay;
3934
+ /** Passed to the RangeCalendar: 'dropdowns' adds month and year selects (birth dates). */
3935
+ captionLayout?: 'label' | 'dropdowns';
3936
+ /** Shown while empty. Default the locale's pattern twice, e.g. "MM/DD/YYYY – MM/DD/YYYY". */
3937
+ placeholder?: string;
3938
+ /** Accessible name when there is no visible <label htmlFor={id}>. */
3939
+ 'aria-label'?: string;
3940
+ /** Names the field by another element's id. */
3941
+ 'aria-labelledby'?: string;
3942
+ /** Ids of help or error text; reaches the input (Field sets it). */
3943
+ 'aria-describedby'?: string;
3944
+ /** Reaches the input (Field sets it on error). */
3945
+ 'aria-invalid'?: boolean | 'true' | 'false';
3946
+ /** Same as aria-invalid="true". */
3947
+ invalid?: boolean;
3948
+ /** The id of the text input, so a <label htmlFor> and Field reach it. */
3949
+ id?: string;
3950
+ /** Field name for a native form: a hidden input posts from/to (2026-11-05/2026-11-09), or an empty string. */
3951
+ name?: string;
3952
+ /** The id of the <form> the hidden input belongs to, when it is not an ancestor. */
3953
+ form?: string;
3954
+ /** Marks the field required. */
3955
+ required?: boolean;
3956
+ /** Turns off the text input and the calendar button. */
3957
+ disabled?: boolean;
3958
+ /** md h-9 (default) or sm h-8. Both grow to 44px on touch screens. */
3959
+ size?: 'sm' | 'md';
3960
+ /** Accessible name of the calendar button. Default "Choose dates", or "Change dates, <from> to <to>" once set. */
3961
+ calendarLabel?: string;
3962
+ /** Extra classes for the wrapper around the input and the calendar button. */
3963
+ className?: string;
3964
+ }
3965
+ /** A date range field: type both dates in the reader's own numeric order (or ISO), or pick them
3966
+ * from a RangeCalendar in a Popover. The value is { from, to } as YYYY-MM-DD strings. `ref`,
3967
+ * `id`, `aria-*`, `name` and `required` belong to the input; `className` and other attributes
3968
+ * go to the wrapper. */
3969
+ declare function DateRangePicker({ ref, value: valueProp, defaultValue, onValueChange, min: minProp, max: maxProp, isDateDisabled, allowDisabledInRange, locale, weekStartsOn, captionLayout, placeholder, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, size, calendarLabel, className, ...rest }: DateRangePickerProps): react.JSX.Element;
3970
+
3971
+ type HourCycle = 12 | 24;
3972
+
3973
+ interface TimeFieldProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-invalid' | 'role'> {
3974
+ /** The hour box. The remaining div attributes go to the group. */
3975
+ ref?: Ref<HTMLInputElement>;
3976
+ /** The time as HH:mm in 24-hour time, or null for none (controlled). */
3977
+ value?: string | null;
3978
+ /** The starting time of an uncontrolled field. */
3979
+ defaultValue?: string | null;
3980
+ /** Called with HH:mm when both boxes hold a valid time inside min and max, or null when both are emptied. */
3981
+ onValueChange?: (value: string | null) => void;
3982
+ /** Earliest allowed time (HH:mm). An earlier time marks the field invalid and is not reported. */
3983
+ min?: string;
3984
+ /** Latest allowed time (HH:mm). */
3985
+ max?: string;
3986
+ /** Minutes per ArrowUp or ArrowDown on the minute box, 1 to 60. Default 1. Typed minutes are kept as typed. */
3987
+ step?: number;
3988
+ /** 12 shows 1-12 and an AM/PM select, 24 shows 00-23. Default from the locale (12 in en-US, 24 in de-DE). */
3989
+ hourCycle?: 12 | 24;
3990
+ /** BCP 47 tag for the clock and the AM/PM words. Default NishProvider locale, then setDefaultLocale(). */
3991
+ locale?: string;
3992
+ /** Accessible name when there is no Field or visible label; each box is named "<name> Hour", "<name> Minute". */
3993
+ 'aria-label'?: string;
3994
+ /** Names the field by another element's id. */
3995
+ 'aria-labelledby'?: string;
3996
+ /** Ids of help or error text; reaches both boxes (Field sets it). */
3997
+ 'aria-describedby'?: string;
3998
+ /** Reaches both boxes (Field sets it on error). */
3999
+ 'aria-invalid'?: boolean | 'true' | 'false';
4000
+ /** Same as aria-invalid="true". */
4001
+ invalid?: boolean;
4002
+ /** The id of the hour box, so a <label htmlFor> and Field reach it. */
4003
+ id?: string;
4004
+ /** Field name for a native form: a hidden input posts HH:mm, or an empty string. */
4005
+ name?: string;
4006
+ /** The id of the <form> the hidden input belongs to, when it is not an ancestor. */
4007
+ form?: string;
4008
+ /** Marks both boxes required. */
4009
+ required?: boolean;
4010
+ /** Turns off both boxes and the AM/PM select. */
4011
+ disabled?: boolean;
4012
+ /** md h-9 (default) or sm h-8. Both grow to 44px on touch screens. */
4013
+ size?: 'sm' | 'md';
4014
+ /** Extra classes for the group. */
4015
+ className?: string;
4016
+ }
4017
+ /** A time field: an hour box and a minute box (and AM/PM where the locale uses it). Arrow keys step the focused
4018
+ * box, typing moves on to the minutes, and the value is HH:mm in 24-hour time, like <input type="time">. */
4019
+ declare function TimeField({ ref, value: valueProp, defaultValue, onValueChange, min, max, step, hourCycle, locale, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, invalid, id, name, form, required, disabled, size, className, ...rest }: TimeFieldProps): react.JSX.Element;
4020
+
3870
4021
  interface MultiSelectProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'children' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-invalid' | 'role'> {
3871
4022
  /** The text input (the combobox element). The remaining div attributes go to the wrapper. */
3872
4023
  ref?: Ref<HTMLInputElement>;
@@ -4652,5 +4803,5 @@ interface VisuallyHiddenProps extends ComponentPropsWithoutRef<'span'> {
4652
4803
  * without Tailwind or any stylesheet. A `style` prop is merged after the hiding styles. */
4653
4804
  declare function VisuallyHidden({ as, style, ref, ...rest }: VisuallyHiddenProps): react.JSX.Element;
4654
4805
 
4655
- export { Accordion, AccordionItem, ActivityFeed, AgentNode, AlertTriangleIcon, AnimatedList, ApiError, AppErrorBoundary, AppHeader, AppShell, AsyncPanel, Avatar, AvatarGroup, BREAKPOINTS, Badge, BarChart, BellIcon, BottomNav, Breadcrumbs, Button, COLOR_ROLES, Calendar, CalendarIcon, Callout, Card, CardHeader, CardListSkeleton, Carousel, ChartLegend, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Chip, ChipGroup, ClockIcon, Combobox, CommandPalette, ConfirmDialog, ConnectionBanner, ContextMenu, CopyButton, DEFAULT_STRINGS, DEFAULT_THEME, DatePicker, Disclosure, Drawer, DropdownMenu, EmptyState, ErrorState, Favicon, Field, FieldGroup, FileDropzone, FilterBar, FilterSheet, FlowSteps, HUE_ROLES, HoverCard, IconButton, InfoIcon, Input, Kbd, KeyValueList, Label, LayoutPresetIcon, LayoutPresetPicker, LineChart, LinkCard, ListRow, LoaderIcon, LoadingBar, MAX_PANES, MediaChip, MediaRow, MediaThumb, MenuItem, MenuLabel, MenuSeparator, MenuSubHeader, Meter, Modal, MonitorIcon, MoonIcon, MoreIcon, MoreSheet, MultiSelect, NARROW_BREAKPOINT, NARROW_MAX, NARROW_QUERY, NavRail, NishProvider, NumberField, PHONE_QUERY, PRESETS, PageContainer, PageHeader, Pagination, PanelLeftCloseIcon, PanelLeftOpenIcon, PauseIcon, PlayIcon, Popover, Portal, Progress, Radio, RadioGroup, RangeBar, RelativeTime, ResponsiveTable, RotateIcon, SCALE, SHADOWS, SOFT_ROLES, ScrollRow, SearchInput, SectionHeader, SectionNav, Segmented, Select, Separator, SettingRow, SettingsIcon, SettingsSection, Skeleton, SkeletonCard, SkeletonLines, SkeletonRows, Slider, Sparkline, Spinner, SplitDividers, SplitStage, Stat, StatGrid, StatGridSkeleton, StatusDot, StepBar, StickyActionBar, StickyBar, SunIcon, Switch, THEMES, TOGGLE_ORDER, TabPanel, Table, TableWrap, Tabs, TagInput, Td, Textarea, Th, ThemeToggle, TickerText, Toaster, Tooltip, Tr, TreeView, VERSION, VirtualList, VirtualTable, VisuallyHidden, WorkflowBoard, XIcon, addSlot, apiFetch, applyTheme, avatarHueIndex, avatarInitials, badgeClass, buttonClass, cardClass, chipClass, cn, computeDividers, computeRects, configureApi, configureFavicons, confirmDialog, copyText, countLeaves, cycleTheme, defaultPreset, dismissToast, equalize, fieldClass, getDefaultLocale, getThemeChoice, googleFavicon, iconButtonClass, initTheme, isRtl, isThemeName, isValidLayout, linkClass, locationAdapter, menuItemClass, mountChecklist, mountHeightVar, mountScrollspy, mountStuck, mountThemeToggle, mountTooltips, narrowLayout, navigateFromLayer, onThemeChange, openSheet, paginationRange, presetOptions, presetsFor, readToken, registerThemes, removeSlot, resizeAt, resolveTheme, revealClass, safeUrl, schemeOf, setDefaultLocale, setThemeChoice, showToast, signTone, swapSlots, tabClass, tableClass, toast, toneFor, useBreakpoint, useCommandHotkey, useDocumentTitle, useHeightVar, useIsClient, useIsoLayoutEffect, useLocalStorage, useMediaQuery, useNarrow, useNishConfig, useNishStrings, useNow, useOnline, usePhone, usePrefersReducedMotion, useResource, useSaveStatus, useScrollEdges, useScrollSpy, useStuck, useTheme, useToast, useUrlState };
4656
- export type { AccordionHeadingLevel, AccordionItemProps, AccordionMultipleProps, AccordionProps, AccordionSingleProps, ActivityFeedProps, ActivityItem, AgentNodeProps, AgentNodeState, AgoOptions, AnimatedListProps, ApiConfig, ApiFetchOptions, AppErrorBoundaryProps, AppHeaderHub, AppHeaderProps, AppShellProps, AppShellSidebar, AsyncPanelProps, AvatarGroupProps, AvatarProps, AvatarShape, AvatarSize, BadgeClassOptions, BadgeHue, BadgeProps, BadgeTone, BarChartProps, BottomNavProps, BreadcrumbItem, BreadcrumbLinkProps, BreadcrumbsProps, Breakpoint, ButtonClassOptions, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CalloutProps, CalloutTone, CardClassOptions, CardElement, CardHeaderProps, CardListSkeletonProps, CardPadding, CardProps, CarouselProps, ChartLegendItem, ChartLegendProps, ChartLegendTone, ChartTone, CheckboxProps, ChipClassOptions, ChipGroupProps, ChipProps, ChipVariant, Column, ComboboxOption, ComboboxProps, CommandItem, CommandPaletteProps, ConfirmDialogOptions, ConfirmDialogProps, ConnectionBannerProps, ContextMenuProps, CopyButtonProps, DateOptions, DatePickerProps, DisclosureProps, Divider, DrawerProps, DropdownMenuProps, EmptyStateProps, ErrorStateProps, FaviconProps, FaviconResolver, FieldClassOptions, FieldGroupProps, FieldProps, FieldSize, FileDropzoneProps, FilterBarProps, FilterSheetProps, FlowStepItem, FlowStepStatus, FlowStepsProps, HoverCardProps, IconButtonClassOptions, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, KbdProps, KeyValueItem, KeyValueListProps, LabelProps, LayoutNode, LayoutPresetIconProps, LayoutPresetOption, LayoutPresetPickerProps, LineChartProps, LinePoint, LineSeries, LinkCardAccent, LinkCardProps, LinkClassOptions, ListRowProps, LoadingBarProps, LocaleOptions, MediaChipProps, MediaRowProps, MediaThumbProps, MediaThumbShape, MediaThumbSize, MenuItemClassOptions, MenuItemProps, MenuSubHeaderProps, MeterProps, MeterTone, ModalProps, MoreSheetProps, MountScrollspyOptions, MountThemeToggleOptions, MultiSelectProps, NarrowLayout, NavItem, NavRailProps, NishConfig, NishProviderProps, NishStrings, NumberFieldProps, PageContainerProps, PageHeaderProps, PaginationLinkProps, PaginationProps, PaginationSize, PopoverCloseReason, PopoverProps, PortalProps, Preset, ProgressProps, ProgressTone, RadioGroupProps, RadioOption, RadioProps, RangeBarProps, Rect, RejectedFile, RelativeTimeProps, RenderLink, Resource, ResponsiveTableProps, SaveStatus, ScrollAlign, ScrollRowProps, ScrollToIndexOptions, SearchInputProps, SectionHeaderProps, SectionNavItem, SectionNavProps, SegmentedOption, SegmentedProps, SegmentedTone, SelectProps, SeparatorProps, SettingRowProps, SettingsSectionProps, ShowToastOptions, SkeletonCardProps, SkeletonLinesProps, SkeletonProps, SkeletonRowsProps, SliderProps, SliderValue, Sort, SortText, SparklineProps, SparklineTone, SpinnerProps, SplitDividersProps, SplitStageProps, StatGridProps, StatGridSkeletonProps, StatProps, StaticToastTone, StatusDotProps, StatusTone, StepBarProps, StickyActionBarProps, StickyBarProps, SwitchProps, TabItem, TabPanelProps, TableProps, TableWrapProps, TabsBreakpoint, TabsProps, TabsSize, TabsVariant, TagInputProps, TdProps, TextareaProps, ThProps, ThemeChoice, ThemeName, ThemePreset, ThemeState, ThemeToggleLabels, ThemeToggleProps, TickerTextProps, ToastAction, ToastItem, ToastOptions, ToastPromiseMessages, ToastTone, ToasterProps, TooltipProps, TrProps, TreeNode, TreeViewProps, UrlStateAdapter, UrlStateShape, UseResourceOptions, VirtualListHandle, VirtualListProps, VirtualTableProps, VisuallyHiddenProps, WeekDay, WorkflowBoardAgent, WorkflowBoardPhase, WorkflowBoardProps };
4806
+ export { Accordion, AccordionItem, ActivityFeed, AgentNode, AlertTriangleIcon, AnimatedList, ApiError, AppErrorBoundary, AppHeader, AppShell, AsyncPanel, Avatar, AvatarGroup, BREAKPOINTS, Badge, BarChart, BellIcon, BottomNav, Breadcrumbs, Button, COLOR_ROLES, Calendar, CalendarIcon, Callout, Card, CardHeader, CardListSkeleton, Carousel, ChartLegend, CheckCircleIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Chip, ChipGroup, ClockIcon, Combobox, CommandPalette, ConfirmDialog, ConnectionBanner, ContextMenu, CopyButton, DEFAULT_STRINGS, DEFAULT_THEME, DatePicker, DateRangePicker, Disclosure, Drawer, DropdownMenu, EmptyState, ErrorState, Favicon, Field, FieldGroup, FileDropzone, FilterBar, FilterSheet, FlowSteps, HUE_ROLES, HoverCard, IconButton, InfoIcon, Input, Kbd, KeyValueList, Label, LayoutPresetIcon, LayoutPresetPicker, LineChart, LinkCard, ListRow, LoaderIcon, LoadingBar, MAX_PANES, MediaChip, MediaRow, MediaThumb, MenuItem, MenuLabel, MenuSeparator, MenuSubHeader, Meter, Modal, MonitorIcon, MoonIcon, MoreIcon, MoreSheet, MultiSelect, NARROW_BREAKPOINT, NARROW_MAX, NARROW_QUERY, NavRail, NishProvider, NumberField, PHONE_QUERY, PRESETS, PageContainer, PageHeader, Pagination, PanelLeftCloseIcon, PanelLeftOpenIcon, PauseIcon, PlayIcon, Popover, Portal, Progress, Radio, RadioGroup, RangeBar, RangeCalendar, RelativeTime, ResponsiveTable, RotateIcon, SCALE, SHADOWS, SOFT_ROLES, ScrollRow, SearchInput, SectionHeader, SectionNav, Segmented, Select, Separator, SettingRow, SettingsIcon, SettingsSection, Skeleton, SkeletonCard, SkeletonLines, SkeletonRows, Slider, Sparkline, Spinner, SplitDividers, SplitStage, Stat, StatGrid, StatGridSkeleton, StatusDot, StepBar, StickyActionBar, StickyBar, SunIcon, Switch, THEMES, TOGGLE_ORDER, TabPanel, Table, TableWrap, Tabs, TagInput, Td, Textarea, Th, ThemeToggle, TickerText, TimeField, Toaster, Tooltip, Tr, TreeView, VERSION, VirtualList, VirtualTable, VisuallyHidden, WorkflowBoard, XIcon, addSlot, apiFetch, applyTheme, avatarHueIndex, avatarInitials, badgeClass, buttonClass, cardClass, chipClass, cn, computeDividers, computeRects, configureApi, configureFavicons, confirmDialog, copyText, countLeaves, cycleTheme, defaultPreset, dismissToast, equalize, fieldClass, getDefaultLocale, getThemeChoice, googleFavicon, iconButtonClass, initTheme, isRtl, isThemeName, isValidLayout, linkClass, locationAdapter, menuItemClass, mountChecklist, mountHeightVar, mountScrollspy, mountStuck, mountThemeToggle, mountTooltips, narrowLayout, navigateFromLayer, onThemeChange, openSheet, paginationRange, presetOptions, presetsFor, readToken, registerThemes, removeSlot, resizeAt, resolveTheme, revealClass, safeUrl, schemeOf, setDefaultLocale, setThemeChoice, showToast, signTone, swapSlots, tabClass, tableClass, toast, toneFor, useBreakpoint, useCommandHotkey, useDocumentTitle, useHeightVar, useIsClient, useIsoLayoutEffect, useLocalStorage, useMediaQuery, useNarrow, useNishConfig, useNishStrings, useNow, useOnline, usePhone, usePrefersReducedMotion, useResource, useSaveStatus, useScrollEdges, useScrollSpy, useStuck, useTheme, useToast, useUrlState };
4807
+ export type { AccordionHeadingLevel, AccordionItemProps, AccordionMultipleProps, AccordionProps, AccordionSingleProps, ActivityFeedProps, ActivityItem, AgentNodeProps, AgentNodeState, AgoOptions, AnimatedListProps, ApiConfig, ApiFetchOptions, AppErrorBoundaryProps, AppHeaderHub, AppHeaderProps, AppShellProps, AppShellSidebar, AsyncPanelProps, AvatarGroupProps, AvatarProps, AvatarShape, AvatarSize, BadgeClassOptions, BadgeHue, BadgeProps, BadgeTone, BarChartProps, BottomNavProps, BreadcrumbItem, BreadcrumbLinkProps, BreadcrumbsProps, Breakpoint, ButtonClassOptions, ButtonProps, ButtonSize, ButtonVariant, CalendarProps, CalloutProps, CalloutTone, CardClassOptions, CardElement, CardHeaderProps, CardListSkeletonProps, CardPadding, CardProps, CarouselProps, ChartLegendItem, ChartLegendProps, ChartLegendTone, ChartTone, CheckboxProps, ChipClassOptions, ChipGroupProps, ChipProps, ChipVariant, Column, ComboboxOption, ComboboxProps, CommandItem, CommandPaletteProps, ConfirmDialogOptions, ConfirmDialogProps, ConnectionBannerProps, ContextMenuProps, CopyButtonProps, DateOptions, DatePickerProps, DateRange, DateRangePickerProps, DisclosureProps, Divider, DrawerProps, DropdownMenuProps, EmptyStateProps, ErrorStateProps, FaviconProps, FaviconResolver, FieldClassOptions, FieldGroupProps, FieldProps, FieldSize, FileDropzoneProps, FilterBarProps, FilterSheetProps, FlowStepItem, FlowStepStatus, FlowStepsProps, HourCycle, HoverCardProps, IconButtonClassOptions, IconButtonProps, IconButtonSize, IconButtonVariant, InputProps, KbdProps, KeyValueItem, KeyValueListProps, LabelProps, LayoutNode, LayoutPresetIconProps, LayoutPresetOption, LayoutPresetPickerProps, LineChartProps, LinePoint, LineSeries, LinkCardAccent, LinkCardProps, LinkClassOptions, ListRowProps, LoadingBarProps, LocaleOptions, MediaChipProps, MediaRowProps, MediaThumbProps, MediaThumbShape, MediaThumbSize, MenuItemClassOptions, MenuItemProps, MenuSubHeaderProps, MeterProps, MeterTone, ModalProps, MoreSheetProps, MountScrollspyOptions, MountThemeToggleOptions, MultiSelectProps, NarrowLayout, NavItem, NavRailProps, NishConfig, NishProviderProps, NishStrings, NumberFieldProps, PageContainerProps, PageHeaderProps, PaginationLinkProps, PaginationProps, PaginationSize, PopoverCloseReason, PopoverProps, PortalProps, Preset, ProgressProps, ProgressTone, RadioGroupProps, RadioOption, RadioProps, RangeBarProps, RangeCalendarProps, Rect, RejectedFile, RelativeTimeProps, RenderLink, Resource, ResponsiveTableProps, SaveStatus, ScrollAlign, ScrollRowProps, ScrollToIndexOptions, SearchInputProps, SectionHeaderProps, SectionNavItem, SectionNavProps, SegmentedOption, SegmentedProps, SegmentedTone, SelectProps, SeparatorProps, SettingRowProps, SettingsSectionProps, ShowToastOptions, SkeletonCardProps, SkeletonLinesProps, SkeletonProps, SkeletonRowsProps, SliderProps, SliderValue, Sort, SortText, SparklineProps, SparklineTone, SpinnerProps, SplitDividersProps, SplitStageProps, StatGridProps, StatGridSkeletonProps, StatProps, StaticToastTone, StatusDotProps, StatusTone, StepBarProps, StickyActionBarProps, StickyBarProps, SwitchProps, TabItem, TabPanelProps, TableProps, TableWrapProps, TabsBreakpoint, TabsProps, TabsSize, TabsVariant, TagInputProps, TdProps, TextareaProps, ThProps, ThemeChoice, ThemeName, ThemePreset, ThemeState, ThemeToggleLabels, ThemeToggleProps, TickerTextProps, TimeFieldProps, ToastAction, ToastItem, ToastOptions, ToastPromiseMessages, ToastTone, ToasterProps, TooltipProps, TrProps, TreeNode, TreeViewProps, UrlStateAdapter, UrlStateShape, UseResourceOptions, VirtualListHandle, VirtualListProps, VirtualTableProps, VisuallyHiddenProps, WeekDay, WorkflowBoardAgent, WorkflowBoardPhase, WorkflowBoardProps };
package/dist/theme.d.ts CHANGED
@@ -73,6 +73,24 @@ interface NishStrings {
73
73
  monthToken: string;
74
74
  /** DatePicker: year token in the placeholder. */
75
75
  yearToken: string;
76
+ /** DateRangePicker: calendar button name while empty, and the popover name. */
77
+ chooseDates: string;
78
+ /** DateRangePicker: calendar button name once a range is set. */
79
+ changeDates: (range: string) => string;
80
+ /** RangeCalendar, DateRangePicker: two dates read as a range. */
81
+ dateRange: (from: string, to: string) => string;
82
+ /** RangeCalendar: live-region text after the first day is picked. */
83
+ rangeStarted: (start: string) => string;
84
+ /** DateRangePicker: custom validity message for text that is not a range. */
85
+ invalidDateRange: string;
86
+ /** TimeField: name of the hour box. */
87
+ hour: string;
88
+ /** TimeField: name of the minute box. */
89
+ minute: string;
90
+ /** TimeField: name of the AM/PM select. */
91
+ dayPeriod: string;
92
+ /** TimeField: custom validity message for a time that is incomplete or not allowed. */
93
+ invalidTime: string;
76
94
  /** MultiSelect: announcement after a value is added. */
77
95
  optionAdded: (label: string) => string;
78
96
  /** MultiSelect: announcement after a value is removed. */
@@ -314,7 +314,7 @@ var nishTheme = (() => {
314
314
  var DEFAULT_THEME = "dark";
315
315
 
316
316
  // src/runtime.ts
317
- var version = true ? "2.1.3" : "dev";
317
+ var version = true ? "2.2.0" : "dev";
318
318
  var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
319
319
  function runtime() {
320
320
  var _a;
@@ -395,6 +395,15 @@ var nishTheme = (() => {
395
395
  dayToken: "DD",
396
396
  monthToken: "MM",
397
397
  yearToken: "YYYY",
398
+ chooseDates: "Choose dates",
399
+ changeDates: (range) => `Change dates, ${range}`,
400
+ dateRange: (from, to) => `${from} to ${to}`,
401
+ rangeStarted: (start) => `Start date ${start}. Pick the end date.`,
402
+ invalidDateRange: "Enter a valid date range.",
403
+ hour: "Hour",
404
+ minute: "Minute",
405
+ dayPeriod: "AM/PM",
406
+ invalidTime: "Enter a valid time.",
398
407
  optionAdded: (l) => `Added ${l}`,
399
408
  optionRemoved: (l) => `Removed ${l}`,
400
409
  clearAll: "Clear all",
package/dist/theme.js CHANGED
@@ -264,7 +264,7 @@ var THEMES = /* @__PURE__ */ Object.fromEntries(
264
264
  var DEFAULT_THEME = "dark";
265
265
 
266
266
  // src/runtime.ts
267
- var version = true ? "2.1.3" : "dev";
267
+ var version = true ? "2.2.0" : "dev";
268
268
  var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
269
269
  function runtime() {
270
270
  const g = globalThis;
@@ -343,6 +343,15 @@ var DEFAULT_STRINGS = {
343
343
  dayToken: "DD",
344
344
  monthToken: "MM",
345
345
  yearToken: "YYYY",
346
+ chooseDates: "Choose dates",
347
+ changeDates: (range) => `Change dates, ${range}`,
348
+ dateRange: (from, to) => `${from} to ${to}`,
349
+ rangeStarted: (start) => `Start date ${start}. Pick the end date.`,
350
+ invalidDateRange: "Enter a valid date range.",
351
+ hour: "Hour",
352
+ minute: "Minute",
353
+ dayPeriod: "AM/PM",
354
+ invalidTime: "Enter a valid time.",
346
355
  optionAdded: (l) => `Added ${l}`,
347
356
  optionRemoved: (l) => `Removed ${l}`,
348
357
  clearAll: "Clear all",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nish-ui",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "Design tokens, seven themes, flash-free theme switching and accessible React 19 components for Tailwind 4, plain CSS and static HTML. Live docs: https://design.nish.software",
5
5
  "license": "MIT",
6
6
  "author": "Nishant Arora",