@gridkitjs/forms-core 0.0.0-dev-20261206115313 → 0.0.0-dev-20261206155240

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/index.d.ts CHANGED
@@ -444,6 +444,8 @@ interface FormsMessages {
444
444
  requiredChecked: string;
445
445
  /** A required switch is off. */
446
446
  requiredOn: string;
447
+ /** A required choice list has nothing chosen. */
448
+ requiredChoice: string;
447
449
  /** The text is shorter than `minLength`. */
448
450
  tooShort: (min: number) => string;
449
451
  /** The text is longer than `maxLength`. */
@@ -612,12 +614,48 @@ interface FormsMessages {
612
614
  fieldHelp: string;
613
615
  /** A search input's placeholder. */
614
616
  searchPlaceholder: string;
617
+ /** The button beside a choice list's search box that opens its options. */
618
+ showOptions: string;
619
+ /** Shown in a choice list that has no options at all. */
620
+ noOptions: string;
615
621
  /** Announced once a choice list's search has settled on its options. */
616
622
  resultCount: (count: number) => string;
617
623
  /** Announced once a choice list's search has settled on none; `query` as typed. */
618
624
  noMatches: (query: string) => string;
619
625
  /** Announced as an option is ticked or unticked in a list taking several values. */
620
626
  selectedCount: (count: number) => string;
627
+ /** Shown in a choice list whose source searches only from `min` characters. */
628
+ typeMore: (min: number) => string;
629
+ /** Shown and announced when a choice list's options failed to load. */
630
+ optionsFailed: string;
631
+ /** The row that asks a failed choice list's source again. */
632
+ retry: string;
633
+ /** The count of chosen options a collapsed field does not show: "+3". */
634
+ moreChosen: (count: number) => string;
635
+ /** The same count read by a screen reader: "and 3 more". */
636
+ moreChosenLabel: (count: number) => string;
637
+ /** The name of the list of chosen options' chips. */
638
+ chosenList: string;
639
+ /** A chip's remove button. */
640
+ removeChoice: (label: string) => string;
641
+ /** Announced as a chip is removed. */
642
+ choiceRemoved: (label: string) => string;
643
+ /** The row that chooses every option shown. */
644
+ selectAll: string;
645
+ /** The same row when the list holds only the options loaded so far. */
646
+ selectAllLoaded: (count: number) => string;
647
+ /** The row that creates an option from the search text. */
648
+ createOption: (text: string) => string;
649
+ /** Shown when the app could not create an option from `text`. */
650
+ createFailed: (text: string) => string;
651
+ /** A chosen key whose option no longer exists; `label` is the key as text. */
652
+ optionMissing: (label: string) => string;
653
+ /** More options chosen than `maxCount` allows. */
654
+ tooManyChoices: (max: number) => string;
655
+ /** Fewer options chosen than `minCount` asks for. */
656
+ tooFewChoices: (min: number) => string;
657
+ /** Shown and announced once `maxCount` options are chosen. */
658
+ maxChoicesReached: (max: number) => string;
621
659
  /** Read before a message, naming its severity. */
622
660
  severityLabel: (severity: Severity) => string;
623
661
  /** How many messages of one severity a summary holds. */
@@ -2441,6 +2479,21 @@ type ValidationResult = FieldMessageInput | readonly FieldMessageInput[] | null
2441
2479
  type Validator<V> = (value: V | null, context: ValidatorContext) => ValidationResult;
2442
2480
  /** `null`, or a string of only whitespace, is `messages.required`. */
2443
2481
  declare function requiredRule<V>(): Validator<V>;
2482
+ /**
2483
+ * `null` is `messages.requiredChoice`: a choice input with nothing
2484
+ * chosen. Its value holds keys, so an empty string is a key like any other.
2485
+ */
2486
+ declare function requiredChoiceRule<V>(): Validator<V>;
2487
+ /**
2488
+ * More than `max` keys is `messages.tooManyChoices`: a choice input with
2489
+ * several values, given one over its limit. `null` passes.
2490
+ */
2491
+ declare function maxCountRule<K>(max: number): Validator<readonly K[]>;
2492
+ /**
2493
+ * Fewer than `min` keys is `messages.tooFewChoices`. `null` passes, as an
2494
+ * empty text passes `minLengthRule`: `required` asks for a first choice.
2495
+ */
2496
+ declare function minCountRule<K>(min: number): Validator<readonly K[]>;
2444
2497
  /** Fewer than `min` code points is `messages.tooShort`. `null` passes. */
2445
2498
  declare function minLengthRule(min: number): Validator<string>;
2446
2499
  /** More than `max` code points is `messages.tooLong`. `null` passes. */
@@ -4318,4 +4371,4 @@ interface VisibleRange {
4318
4371
  */
4319
4372
  declare function visibleRange(heights: RowHeights, estimatedHeight: number, scrollTop: number, viewportHeight: number, overscan: number): VisibleRange;
4320
4373
 
4321
- export { ALL_DAY, type AbortFactory, type ActiveMove, type AssembleContext, type BeforeInputDecision, type BooleanWords, CALENDAR_FISCAL_YEAR, CHECKBOX_WORDS, CHILDREN_UNLOADED, type CalendarAction, type CalendarContext, type CalendarDay, type CalendarLimits, type CalendarMonth, type CalendarMove, type CalendarState, type CalendarUnit, type CalendarView, type CalendarWeek, type ChangeCause, type ChangeSource, type ChildrenLoad, type ChildrenLoadAction, type ChoiceDetails, type ChoiceOption, type CleanedNumber, type CommitOutcome, type CommitTrigger, type CompiledMask, type CompositeController, type CompositeDetailsContext, type CompositeFieldOptions, type CompositeState, type CreateEvent, DEFAULT_MATCH_FIELDS, DEFAULT_SOURCE_DEBOUNCE, DEFAULT_SOURCE_PAGE_SIZE, type DateDetails, type DateFieldOptions, type DateLayout, type DateLayoutFields, type DateLayoutOptions, type DateLayoutPart, type DateParts, type DatePreset, type DateRange, type DateReadOptions, type DateReadingInfo, type DateRuleContext, type DateSegment, type DateSegmentType, type DateTextReading, type DateTimeDetails, type DateTimeFieldOptions, type DateUnreadableReason, type DecimalString, type DefaultTimes, type DisabledOptions, type DurationDetails, type DurationLike, type DurationNotation, type DurationOptions, type DurationReading, type DurationUnit, type FieldAction, type FieldBeforeChangeEvent, type FieldBeforeCommitEvent, type FieldBeforeInputEvent, type FieldChangeEvent, type FieldCommitEvent, type FieldController, type FieldDraft, type FieldEventBase, type FieldFocusEvent, type FieldHandlers, type FieldInputEvent, type FieldMessage, type FieldMessageInput, type FieldOptions, type FieldPhase, type FieldRegistry, type FieldState, type FieldValidateEvent, type FiscalMonthPeriod, type FiscalQuarterPeriod, type FiscalYear, type FiscalYearPeriod, type FoldedText, type FormatContext, type FormatPurpose, type Formatter, type FormsMessages, type FractionDigits, type HighlightChangeEvent, type InputFilter, type InputFilterDecision, type Instant, type InstantFieldOptions, type KeyChanges, type KeyList, type KeyLookup, type KeyOf, type LoadErrorEvent, type LoadedOptions, type MaskCompileResult, type MaskDetails, type MaskEdit, type MaskInputHints, type MaskLetterCase, type MaskOptions, type MaskPreset, type MaskPresets, type MaskResult, type MaskSlot, type MaskSource, type MaskTokenDefinition, type MaskTokens, type MaskValueFormat, type MaskedText, type MatchContext, type MatchMode, type MessageSummary, type MonthGrid, type MonthGridOptions, type MonthPeriod, NO_TIME, type NavigableRow, type NegativeStyle, type NoDetails, type NoFlags, type NumberAffixes, type NumberDetails, type NumberEntry, type NumberEntryOptions, type NumberFieldOptions, type NumberLike, type NumberOptions, type NumberReading, type NumberReadingInfo, type NumberStep, type NumberStyle, type NumberSymbolOverrides, type NumberSymbols, type NumberTextForm, type NumberUnreadableReason, type NumberValue, type NumberValueType, type OptionAction, type OptionCache, type OptionCacheOptions, type OptionCursor, type OptionHit, type OptionIndex, type OptionKey, type OptionMatch, type OptionMatcher, type OptionPage, type OptionQuery, type OptionRow, type OptionRowActions, type OptionSearch, type OptionSource, type OptionSourceController, type OptionSourceOptions, type OvernightFlags, POPUP_CLOSED, type PageKey, type ParseContext, type ParseResult, type Parser, type PartChange, type PartController, type PartOptions, type PartTexts, type PartValues, type PercentScale, type Period, type PeriodDetails, type PeriodFieldOptions, type PeriodGranularity, type PeriodLayoutOptions, type PeriodParts, type PeriodValues, type PickedDays, type PivotOptions, type PlainDate, type PlainDateTime, type PlainTime, type PopupAction, type PopupCloseReason, type PopupOpenChange, type PopupOpenReason, type PopupState, type PopupStep, type QuarterPeriod, type QueryChangeEvent, type Range, type RangeBounds, type RangeDetails, type RangeEnd, type RangeEnds, type RangeKind, type RangeOptions, type RangeOrientation, type RangePick, type RangePickAction, type RangePickStep, type RangeReading, type RangeTextOptions, type RangeValue, type RegisteredField, type RelativeDateRule, type RelativeRange, type ResolveRequest, type RoundingMode, type RowHeights, SOURCE_IDLE, SWITCH_WORDS, type Schedule, type ScopeState, type SegmentAction, type SegmentAria, type SegmentContext, type SegmentEntry, type SegmentRun, type SegmentState, type SegmentStep, type SegmentType, type Severity, type SeverityCount, type SingleChoiceDetails, type SourceAction, type SourceState, type SpanFormatter, type StepDirection, type StepRequest, type StepSize, type SummaryItem, type TextEdit, type TextInputDetails, type TextParseOptions, type TextRange, type TextReading, type TickState, type TimeColumn, type TimeColumnOption, type TimeColumnType, type TimeColumnsOptions, type TimeDetails, type TimeFieldOptions, type TimeLimits, type TimeParts, type TimeRange, type TimeRangeContext, type TimeZoneDisambiguation, type TreeIndex, type TreeOption, type TreeRow, type TreeSearch, type TreeSource, type TreeValueMode, type TypeaheadRow, type ValidationResult, type Validator, type ValidatorContext, type VisibleRange, type WeekInfo, type WeekNumbering, type WeekOfYear, type Weekday, type WritingDirection, type YearPeriod, type ZonedRangeContext, type ZonedReading, addDays, addDecimals, addKeys, addMonths, addPeriods, addYears, appendPage, applyMaskEdit, availableDateRule, booleanFormatter, booleanParser, calendarMonth, calendarMonthParts, calendarReducer, calendarStart, calendarYears, canAddKey, canSelectAll, checkedRule, childrenLoadReducer, choiceDetails, clampCalendarDate, clampCalendarMonth, clampTime, cleanPastedNumber, clearKeys, commonDatePresets, compareCalendarMonths, compareDateTimes, compareDates, compareDecimals, compareInstants, comparePeriods, compareTimes, compileMask, convertDuration, countCharacters, counterAnnouncement, createCompositeController, createDefaultFormsMessages, createFieldController, createFieldRegistry, createOptionCache, createOptionIndex, createOptionSourceController, createTreeIndex, dateDetails, dateFormatter, dateFromInstant, dateFromPlainDate, dateFromPlainDateTime, dateLayout, dateParser, dateParts, datePresetLabel, dateRangeKind, dateTimeDetails, dateTimeFormatter, dateTimeParser, dateTimeRangeKind, dayOfWeek, dayTimeLimits, daysBetween, daysInMonth, daysToDateTimeRange, daysToInstantRange, decimalRangeKind, decimalToNumber, defaultFormsMessages, defaultWeekNumbering, durationDetails, durationFormatter, durationParser, endOfMonth, endsRule, exactInstantOf, fieldMessages, fieldReducer, fieldText, filterMaskEdit, filterNumberEdit, filtersKey, findDuplicateKeys, fixedFractionDigits, flattenOptions, flattenTree, foldText, formatCalendarMonth, formatCalendarYear, formatDate, formatDateRange, formatDateSegments, formatDateTime, formatDateTimeSegments, formatDayOfMonth, formatDaySpan, formatDuration, formatInstant, formatMasked, formatMonthName, formatNumber, formatNumberRange, formatPeriod, formatPeriodPage, formatPeriodPlace, formatPeriodSegments, formatText, formatTime, formatTimeRange, formatTimeSegments, formatTimeSpan, formatWeekday, hasError, hasKey, ibanRule, idleSegments, inlineStep, instantDetails, instantFormatter, instantFromDate, instantOf, instantParser, instantRangeKind, instantZoneMessage, ipv4Rule, isCalendarDayDisabled, isCalendarMonth, isCalendarMonthDisabled, isDecimalString, isInstant, isLandingRow, isLeapYear, isPeriod, isPlainDate, isPlainDateTime, isPlainTime, isRelativeDateRule, isRelativeRange, isTimeZone, isValidMaskStart, joinSegments, keyChanges, keyText, luhnRule, maskDetails, maskFormatter, maskInputHints, maskParser, maskPresets, matchOption, matchText, maxDateRule, maxDateTimeRule, maxDurationRule, maxInstantRule, maxLengthRule, maxPeriodRule, maxRule, maxSpanRule, maxTimeRule, minDateRule, minDateTimeRule, minDurationRule, minInstantRule, minLengthRule, minPeriodRule, minRule, minSpanRule, minTimeRule, minutesOfDay, monthGrid, monthOfDate, mostSevere, moveActive, moveCalendarDate, nextCheckedValue, normalizeDecimal, nowIn, numberAffixes, numberCaret, numberDetails, numberFormatter, numberFractionDigits, numberParser, numberRangeKind, numberRangeKindOf, numberSymbols, numberToDecimal, offsetOf, orderRange, parseDuration, parseNumber, parsed, patternRule, periodDetails, periodFormatter, periodGranularity, periodLayout, periodOf, periodPage, periodPageYears, periodParser, periodParts, periodRange, pickedDays, pivotYear, plainDate, plainDateFromDate, plainDateTime, plainTime, popupReducer, rangeDetails, rangeEnds, rangeFlags, rangeIncludes, rangeKeys, rangePickPreview, rangePickReducer, rangeSpan, readDateShortcut, readDateText, readRangeEnds, readTimeText, relativePreset, removeKeys, requiredRule, resolveDateRange, resolveDateRule, resolveFormsMessages, resolveRange, roundDecimal, runtimeTimeZone, sameDayIn, sameFilters, sameKey, sameKeys, sameRange, sameRule, scopeState, searchTree, segmentAria, segmentReducer, segmentRuns, segmentSpans, segmentValue, segmentsTime, selectAll, setTimeColumn, shiftDecimal, shownEnd, shownMessages, singleChoiceDetails, snapTime, sortFieldMessages, sourceReducer, spanOf, splitDateTime, splitSegments, standInOption, startOfDayIn, startOfMonth, startOfWeek, stepNumber, stepNumberValue, stepRule, subtractDecimals, summarizeMessages, textParser, tickNode, tickState, tickedFromValue, timeColumns, timeDetails, timeFormatter, timeParser, timeParts, timeRangeKind, toFieldMessages, toInstant, toKeyList, toOptionPage, toPeriod, toPlainDate, toPlainDateTime, toPlainTime, todayIn, toggleKey, treeValue, typeaheadIndex, typeaheadRow, unreadable, valueKeys, visibleRange, wallClockOf, weekInfo, weekOf, writeSegment };
4374
+ export { ALL_DAY, type AbortFactory, type ActiveMove, type AssembleContext, type BeforeInputDecision, type BooleanWords, CALENDAR_FISCAL_YEAR, CHECKBOX_WORDS, CHILDREN_UNLOADED, type CalendarAction, type CalendarContext, type CalendarDay, type CalendarLimits, type CalendarMonth, type CalendarMove, type CalendarState, type CalendarUnit, type CalendarView, type CalendarWeek, type ChangeCause, type ChangeSource, type ChildrenLoad, type ChildrenLoadAction, type ChoiceDetails, type ChoiceOption, type CleanedNumber, type CommitOutcome, type CommitTrigger, type CompiledMask, type CompositeController, type CompositeDetailsContext, type CompositeFieldOptions, type CompositeState, type CreateEvent, DEFAULT_MATCH_FIELDS, DEFAULT_SOURCE_DEBOUNCE, DEFAULT_SOURCE_PAGE_SIZE, type DateDetails, type DateFieldOptions, type DateLayout, type DateLayoutFields, type DateLayoutOptions, type DateLayoutPart, type DateParts, type DatePreset, type DateRange, type DateReadOptions, type DateReadingInfo, type DateRuleContext, type DateSegment, type DateSegmentType, type DateTextReading, type DateTimeDetails, type DateTimeFieldOptions, type DateUnreadableReason, type DecimalString, type DefaultTimes, type DisabledOptions, type DurationDetails, type DurationLike, type DurationNotation, type DurationOptions, type DurationReading, type DurationUnit, type FieldAction, type FieldBeforeChangeEvent, type FieldBeforeCommitEvent, type FieldBeforeInputEvent, type FieldChangeEvent, type FieldCommitEvent, type FieldController, type FieldDraft, type FieldEventBase, type FieldFocusEvent, type FieldHandlers, type FieldInputEvent, type FieldMessage, type FieldMessageInput, type FieldOptions, type FieldPhase, type FieldRegistry, type FieldState, type FieldValidateEvent, type FiscalMonthPeriod, type FiscalQuarterPeriod, type FiscalYear, type FiscalYearPeriod, type FoldedText, type FormatContext, type FormatPurpose, type Formatter, type FormsMessages, type FractionDigits, type HighlightChangeEvent, type InputFilter, type InputFilterDecision, type Instant, type InstantFieldOptions, type KeyChanges, type KeyList, type KeyLookup, type KeyOf, type LoadErrorEvent, type LoadedOptions, type MaskCompileResult, type MaskDetails, type MaskEdit, type MaskInputHints, type MaskLetterCase, type MaskOptions, type MaskPreset, type MaskPresets, type MaskResult, type MaskSlot, type MaskSource, type MaskTokenDefinition, type MaskTokens, type MaskValueFormat, type MaskedText, type MatchContext, type MatchMode, type MessageSummary, type MonthGrid, type MonthGridOptions, type MonthPeriod, NO_TIME, type NavigableRow, type NegativeStyle, type NoDetails, type NoFlags, type NumberAffixes, type NumberDetails, type NumberEntry, type NumberEntryOptions, type NumberFieldOptions, type NumberLike, type NumberOptions, type NumberReading, type NumberReadingInfo, type NumberStep, type NumberStyle, type NumberSymbolOverrides, type NumberSymbols, type NumberTextForm, type NumberUnreadableReason, type NumberValue, type NumberValueType, type OptionAction, type OptionCache, type OptionCacheOptions, type OptionCursor, type OptionHit, type OptionIndex, type OptionKey, type OptionMatch, type OptionMatcher, type OptionPage, type OptionQuery, type OptionRow, type OptionRowActions, type OptionSearch, type OptionSource, type OptionSourceController, type OptionSourceOptions, type OvernightFlags, POPUP_CLOSED, type PageKey, type ParseContext, type ParseResult, type Parser, type PartChange, type PartController, type PartOptions, type PartTexts, type PartValues, type PercentScale, type Period, type PeriodDetails, type PeriodFieldOptions, type PeriodGranularity, type PeriodLayoutOptions, type PeriodParts, type PeriodValues, type PickedDays, type PivotOptions, type PlainDate, type PlainDateTime, type PlainTime, type PopupAction, type PopupCloseReason, type PopupOpenChange, type PopupOpenReason, type PopupState, type PopupStep, type QuarterPeriod, type QueryChangeEvent, type Range, type RangeBounds, type RangeDetails, type RangeEnd, type RangeEnds, type RangeKind, type RangeOptions, type RangeOrientation, type RangePick, type RangePickAction, type RangePickStep, type RangeReading, type RangeTextOptions, type RangeValue, type RegisteredField, type RelativeDateRule, type RelativeRange, type ResolveRequest, type RoundingMode, type RowHeights, SOURCE_IDLE, SWITCH_WORDS, type Schedule, type ScopeState, type SegmentAction, type SegmentAria, type SegmentContext, type SegmentEntry, type SegmentRun, type SegmentState, type SegmentStep, type SegmentType, type Severity, type SeverityCount, type SingleChoiceDetails, type SourceAction, type SourceState, type SpanFormatter, type StepDirection, type StepRequest, type StepSize, type SummaryItem, type TextEdit, type TextInputDetails, type TextParseOptions, type TextRange, type TextReading, type TickState, type TimeColumn, type TimeColumnOption, type TimeColumnType, type TimeColumnsOptions, type TimeDetails, type TimeFieldOptions, type TimeLimits, type TimeParts, type TimeRange, type TimeRangeContext, type TimeZoneDisambiguation, type TreeIndex, type TreeOption, type TreeRow, type TreeSearch, type TreeSource, type TreeValueMode, type TypeaheadRow, type ValidationResult, type Validator, type ValidatorContext, type VisibleRange, type WeekInfo, type WeekNumbering, type WeekOfYear, type Weekday, type WritingDirection, type YearPeriod, type ZonedRangeContext, type ZonedReading, addDays, addDecimals, addKeys, addMonths, addPeriods, addYears, appendPage, applyMaskEdit, availableDateRule, booleanFormatter, booleanParser, calendarMonth, calendarMonthParts, calendarReducer, calendarStart, calendarYears, canAddKey, canSelectAll, checkedRule, childrenLoadReducer, choiceDetails, clampCalendarDate, clampCalendarMonth, clampTime, cleanPastedNumber, clearKeys, commonDatePresets, compareCalendarMonths, compareDateTimes, compareDates, compareDecimals, compareInstants, comparePeriods, compareTimes, compileMask, convertDuration, countCharacters, counterAnnouncement, createCompositeController, createDefaultFormsMessages, createFieldController, createFieldRegistry, createOptionCache, createOptionIndex, createOptionSourceController, createTreeIndex, dateDetails, dateFormatter, dateFromInstant, dateFromPlainDate, dateFromPlainDateTime, dateLayout, dateParser, dateParts, datePresetLabel, dateRangeKind, dateTimeDetails, dateTimeFormatter, dateTimeParser, dateTimeRangeKind, dayOfWeek, dayTimeLimits, daysBetween, daysInMonth, daysToDateTimeRange, daysToInstantRange, decimalRangeKind, decimalToNumber, defaultFormsMessages, defaultWeekNumbering, durationDetails, durationFormatter, durationParser, endOfMonth, endsRule, exactInstantOf, fieldMessages, fieldReducer, fieldText, filterMaskEdit, filterNumberEdit, filtersKey, findDuplicateKeys, fixedFractionDigits, flattenOptions, flattenTree, foldText, formatCalendarMonth, formatCalendarYear, formatDate, formatDateRange, formatDateSegments, formatDateTime, formatDateTimeSegments, formatDayOfMonth, formatDaySpan, formatDuration, formatInstant, formatMasked, formatMonthName, formatNumber, formatNumberRange, formatPeriod, formatPeriodPage, formatPeriodPlace, formatPeriodSegments, formatText, formatTime, formatTimeRange, formatTimeSegments, formatTimeSpan, formatWeekday, hasError, hasKey, ibanRule, idleSegments, inlineStep, instantDetails, instantFormatter, instantFromDate, instantOf, instantParser, instantRangeKind, instantZoneMessage, ipv4Rule, isCalendarDayDisabled, isCalendarMonth, isCalendarMonthDisabled, isDecimalString, isInstant, isLandingRow, isLeapYear, isPeriod, isPlainDate, isPlainDateTime, isPlainTime, isRelativeDateRule, isRelativeRange, isTimeZone, isValidMaskStart, joinSegments, keyChanges, keyText, luhnRule, maskDetails, maskFormatter, maskInputHints, maskParser, maskPresets, matchOption, matchText, maxCountRule, maxDateRule, maxDateTimeRule, maxDurationRule, maxInstantRule, maxLengthRule, maxPeriodRule, maxRule, maxSpanRule, maxTimeRule, minCountRule, minDateRule, minDateTimeRule, minDurationRule, minInstantRule, minLengthRule, minPeriodRule, minRule, minSpanRule, minTimeRule, minutesOfDay, monthGrid, monthOfDate, mostSevere, moveActive, moveCalendarDate, nextCheckedValue, normalizeDecimal, nowIn, numberAffixes, numberCaret, numberDetails, numberFormatter, numberFractionDigits, numberParser, numberRangeKind, numberRangeKindOf, numberSymbols, numberToDecimal, offsetOf, orderRange, parseDuration, parseNumber, parsed, patternRule, periodDetails, periodFormatter, periodGranularity, periodLayout, periodOf, periodPage, periodPageYears, periodParser, periodParts, periodRange, pickedDays, pivotYear, plainDate, plainDateFromDate, plainDateTime, plainTime, popupReducer, rangeDetails, rangeEnds, rangeFlags, rangeIncludes, rangeKeys, rangePickPreview, rangePickReducer, rangeSpan, readDateShortcut, readDateText, readRangeEnds, readTimeText, relativePreset, removeKeys, requiredChoiceRule, requiredRule, resolveDateRange, resolveDateRule, resolveFormsMessages, resolveRange, roundDecimal, runtimeTimeZone, sameDayIn, sameFilters, sameKey, sameKeys, sameRange, sameRule, scopeState, searchTree, segmentAria, segmentReducer, segmentRuns, segmentSpans, segmentValue, segmentsTime, selectAll, setTimeColumn, shiftDecimal, shownEnd, shownMessages, singleChoiceDetails, snapTime, sortFieldMessages, sourceReducer, spanOf, splitDateTime, splitSegments, standInOption, startOfDayIn, startOfMonth, startOfWeek, stepNumber, stepNumberValue, stepRule, subtractDecimals, summarizeMessages, textParser, tickNode, tickState, tickedFromValue, timeColumns, timeDetails, timeFormatter, timeParser, timeParts, timeRangeKind, toFieldMessages, toInstant, toKeyList, toOptionPage, toPeriod, toPlainDate, toPlainDateTime, toPlainTime, todayIn, toggleKey, treeValue, typeaheadIndex, typeaheadRow, unreadable, valueKeys, visibleRange, wallClockOf, weekInfo, weekOf, writeSegment };
package/dist/index.js CHANGED
@@ -5268,6 +5268,15 @@ function counterAnnouncement(count, max, messages) {
5268
5268
  function requiredRule() {
5269
5269
  return (value, { messages }) => value === null || typeof value === "string" && value.trim() === "" ? { text: messages.required, code: "required" } : null;
5270
5270
  }
5271
+ function requiredChoiceRule() {
5272
+ return (value, { messages }) => value === null ? { text: messages.requiredChoice, code: "required" } : null;
5273
+ }
5274
+ function maxCountRule(max) {
5275
+ return (value, { messages }) => value !== null && value.length > max ? { text: messages.tooManyChoices(max), code: "tooManyChoices" } : null;
5276
+ }
5277
+ function minCountRule(min) {
5278
+ return (value, { messages }) => value !== null && value.length < min ? { text: messages.tooFewChoices(min), code: "tooFewChoices" } : null;
5279
+ }
5271
5280
  function minLengthRule(min) {
5272
5281
  return (value, { messages }) => value !== null && countCharacters(value) < min ? { text: messages.tooShort(min), code: "tooShort" } : null;
5273
5282
  }
@@ -7561,6 +7570,7 @@ function createDefaultFormsMessages(locale) {
7561
7570
  required: "Enter a value",
7562
7571
  requiredChecked: "Check this box to continue",
7563
7572
  requiredOn: "Turn this on to continue",
7573
+ requiredChoice: "Choose an option",
7564
7574
  tooShort: (min) => `Enter at least ${counted(n, min, characters)}`,
7565
7575
  tooLong: (max) => `Enter no more than ${counted(n, max, characters)}`,
7566
7576
  patternMismatch: "Enter a value in the expected format",
@@ -7645,9 +7655,27 @@ function createDefaultFormsMessages(locale) {
7645
7655
  optional: "optional",
7646
7656
  fieldHelp: "More information",
7647
7657
  searchPlaceholder: "Search",
7658
+ showOptions: "Show options",
7659
+ noOptions: "No options",
7648
7660
  resultCount: (count) => counted(n, count, ["result", "results"]),
7649
7661
  noMatches: (query) => `No matches for \u201C${query}\u201D`,
7650
7662
  selectedCount: (count) => `${n(count)} selected`,
7663
+ typeMore: (min) => `Type at least ${counted(n, min, characters)}`,
7664
+ optionsFailed: "Couldn't load the options.",
7665
+ retry: "Try again",
7666
+ moreChosen: (count) => `+${n(count)}`,
7667
+ moreChosenLabel: (count) => `and ${n(count)} more`,
7668
+ chosenList: "Chosen",
7669
+ removeChoice: (label) => `Remove ${label}`,
7670
+ choiceRemoved: (label) => `${label} removed`,
7671
+ selectAll: "Select all",
7672
+ selectAllLoaded: (count) => `Select all ${n(count)} loaded`,
7673
+ createOption: (text) => `Create \u201C${text}\u201D`,
7674
+ createFailed: (text) => `Couldn't create \u201C${text}\u201D`,
7675
+ optionMissing: (label) => `\u201C${label}\u201D is no longer available`,
7676
+ tooManyChoices: (max) => `Choose no more than ${n(max)}`,
7677
+ tooFewChoices: (min) => `Choose at least ${n(min)}`,
7678
+ maxChoicesReached: (max) => max === 1 ? "Up to 1 choice" : `Up to ${n(max)} choices`,
7651
7679
  severityLabel: (severity) => SEVERITY_LABELS[severity],
7652
7680
  severityCount: (severity, count) => counted(n, count, SEVERITY_NOUNS[severity]),
7653
7681
  messageSummaryTitle: (count) => count === 1 ? "There is 1 problem with this form" : `There are ${n(count)} problems with this form`
@@ -9450,6 +9478,7 @@ export {
9450
9478
  maskPresets,
9451
9479
  matchOption,
9452
9480
  matchText,
9481
+ maxCountRule,
9453
9482
  maxDateRule,
9454
9483
  maxDateTimeRule,
9455
9484
  maxDurationRule,
@@ -9459,6 +9488,7 @@ export {
9459
9488
  maxRule,
9460
9489
  maxSpanRule,
9461
9490
  maxTimeRule,
9491
+ minCountRule,
9462
9492
  minDateRule,
9463
9493
  minDateTimeRule,
9464
9494
  minDurationRule,
@@ -9524,6 +9554,7 @@ export {
9524
9554
  readTimeText,
9525
9555
  relativePreset,
9526
9556
  removeKeys,
9557
+ requiredChoiceRule,
9527
9558
  requiredRule,
9528
9559
  resolveDateRange,
9529
9560
  resolveDateRule,