@utk09/finra-ui 0.0.7 → 0.0.8

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 (55) hide show
  1. package/README.md +8 -4
  2. package/dist/ComboBox-B7w5n-lW.js +451 -0
  3. package/dist/ComboBox-B7w5n-lW.js.map +1 -0
  4. package/dist/components/componentIds.d.ts +0 -6
  5. package/dist/cx-Cj1p8CM7.js +15 -0
  6. package/dist/cx-Cj1p8CM7.js.map +1 -0
  7. package/dist/index.d.ts +2 -4
  8. package/dist/index.js +613 -593
  9. package/dist/index.js.map +1 -1
  10. package/dist/styles.css +1 -1
  11. package/dist/types/global.d.ts +1 -0
  12. package/dist/unstyled.d.ts +1 -5
  13. package/dist/unstyled.js +83 -84
  14. package/dist/unstyled.js.map +1 -1
  15. package/dist/utils.d.ts +1 -4
  16. package/dist/utils.js +2 -3
  17. package/package.json +3 -6
  18. package/dist/Calendar.module-AHlPlLw_.js +0 -362
  19. package/dist/Calendar.module-AHlPlLw_.js.map +0 -1
  20. package/dist/DateInput-D3AUs_l2.js +0 -224
  21. package/dist/DateInput-D3AUs_l2.js.map +0 -1
  22. package/dist/assets/icons/CalendarIcon.d.ts +0 -2
  23. package/dist/assets/icons/CheckIcon.d.ts +0 -2
  24. package/dist/assets/icons/ChevronDownIcon.d.ts +0 -2
  25. package/dist/assets/icons/ChevronLeftIcon.d.ts +0 -2
  26. package/dist/assets/icons/ChevronRightIcon.d.ts +0 -2
  27. package/dist/assets/icons/CloseIcon.d.ts +0 -2
  28. package/dist/assets/icons/CloseSmallIcon.d.ts +0 -2
  29. package/dist/assets/icons/DashIcon.d.ts +0 -2
  30. package/dist/assets/icons/MinusIcon.d.ts +0 -2
  31. package/dist/assets/icons/PlusIcon.d.ts +0 -2
  32. package/dist/assets/icons/SpinnerIcon.d.ts +0 -2
  33. package/dist/assets/icons/UploadIcon.d.ts +0 -2
  34. package/dist/assets/icons/index.d.ts +0 -12
  35. package/dist/components/Calendar/Calendar.d.ts +0 -6
  36. package/dist/components/DateInput/DateInput.d.ts +0 -16
  37. package/dist/components/DateTenorInput/DateTenorInput.d.ts +0 -16
  38. package/dist/components/TenorInput/TenorInput.d.ts +0 -14
  39. package/dist/dateFormat-CdClN4CU.js +0 -200
  40. package/dist/dateFormat-CdClN4CU.js.map +0 -1
  41. package/dist/dateInput-4sdYyWq0.js +0 -551
  42. package/dist/dateInput-4sdYyWq0.js.map +0 -1
  43. package/dist/finance.d.ts +0 -8
  44. package/dist/finance.js +0 -390
  45. package/dist/finance.js.map +0 -1
  46. package/dist/logic/calendar.d.ts +0 -27
  47. package/dist/logic/dateInput.d.ts +0 -13
  48. package/dist/tenor-GS2kfKqC.js +0 -111
  49. package/dist/tenor-GS2kfKqC.js.map +0 -1
  50. package/dist/unstyled/Calendar/Calendar.d.ts +0 -48
  51. package/dist/unstyled/DateInput/DateInput.d.ts +0 -58
  52. package/dist/unstyled/DateTenorInput/DateTenorInput.d.ts +0 -78
  53. package/dist/unstyled/TenorInput/TenorInput.d.ts +0 -27
  54. package/dist/utils/dateFormat.d.ts +0 -17
  55. package/dist/utils/tenor.d.ts +0 -15
@@ -1,48 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface CalendarClassNames {
3
- root?: string;
4
- header?: string;
5
- navButton?: string;
6
- title?: string;
7
- weekdayRow?: string;
8
- weekday?: string;
9
- grid?: string;
10
- row?: string;
11
- day?: string;
12
- dayToday?: string;
13
- daySelected?: string;
14
- dayDisabled?: string;
15
- dayOutside?: string;
16
- footer?: string;
17
- }
18
- export interface CalendarBaseProps {
19
- /** Currently selected date. */
20
- value?: Date | null;
21
- /** Called when a day is selected. */
22
- onSelect?: (date: Date) => void;
23
- /** Controlled displayed month (uses year and month from this Date). */
24
- month?: Date;
25
- /** Called when the displayed month changes via navigation. */
26
- onMonthChange?: (month: Date) => void;
27
- /** Minimum selectable date. */
28
- min?: Date;
29
- /** Maximum selectable date. */
30
- max?: Date;
31
- /** Dates that cannot be selected. */
32
- disabledDates?: Date[] | ((date: Date) => boolean);
33
- /** 0 = Sunday, 1 = Monday. Default: 1 (Monday). */
34
- weekStartsOn?: 0 | 1;
35
- /** CSS class overrides. */
36
- classNames?: CalendarClassNames;
37
- /** data-* attributes injected by the styled layer. */
38
- dataAttributes?: Record<string, string>;
39
- /** Icon for previous month navigation. */
40
- renderNavPrev?: () => ReactNode;
41
- /** Icon for next month navigation. */
42
- renderNavNext?: () => ReactNode;
43
- /** Content rendered below the grid (e.g. "Today" button). */
44
- footer?: ReactNode;
45
- /** Override "today" for testing. */
46
- today?: Date;
47
- }
48
- export declare const CalendarBase: import('react').ForwardRefExoticComponent<CalendarBaseProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,58 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { DateFormat, DateParseResult } from '../../utils/dateFormat';
3
- import { CalendarClassNames } from '../Calendar/Calendar';
4
- export interface DateInputClassNames {
5
- root?: string;
6
- calendarOpen?: string;
7
- input?: string;
8
- adornment?: string;
9
- popup?: string;
10
- calendar?: CalendarClassNames;
11
- }
12
- export interface DateInputBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
13
- /** Date format pattern. Determines separator and segment order. */
14
- format?: DateFormat;
15
- /** Controlled date value. */
16
- value?: Date | null;
17
- /** Initial date value for uncontrolled mode. */
18
- defaultValue?: Date | null;
19
- /** Called with parsed Date on valid input, or null when cleared. */
20
- onChange?: (date: Date | null) => void;
21
- /** Called with raw text on every keystroke. */
22
- onInputChange?: (text: string) => void;
23
- /** Minimum allowed date. */
24
- min?: Date;
25
- /** Maximum allowed date. */
26
- max?: Date;
27
- /** Dates that cannot be selected. Array or predicate function. */
28
- disabledDates?: Date[] | ((date: Date) => boolean);
29
- /** Input placeholder. Defaults to the format pattern (e.g. "YYYY-MM-DD"). */
30
- placeholder?: string;
31
- /** Disable the input. */
32
- disabled?: boolean;
33
- /** Make the input read-only. */
34
- readOnly?: boolean;
35
- /** Called after blur with validation result. */
36
- onValidation?: (result: DateParseResult) => void;
37
- /** CSS class names injected by the styled layer. */
38
- classNames?: DateInputClassNames;
39
- /** data-* attributes injected by the styled layer. */
40
- dataAttributes?: Record<string, string>;
41
- /** Render the calendar toggle icon (e.g. CalendarIcon). */
42
- renderCalendarIcon?: () => ReactNode;
43
- /** Render previous month nav icon for the calendar. */
44
- renderCalendarNavPrev?: () => ReactNode;
45
- /** Render next month nav icon for the calendar. */
46
- renderCalendarNavNext?: () => ReactNode;
47
- /** 0 = Sunday, 1 = Monday. Default: 1. */
48
- weekStartsOn?: 0 | 1;
49
- /** id for the input element. */
50
- id?: string;
51
- /** aria-describedby for the input element. */
52
- "aria-describedby"?: string;
53
- /** aria-invalid for the input element. */
54
- "aria-invalid"?: boolean;
55
- /** aria-label for the input element. */
56
- "aria-label"?: string;
57
- }
58
- export declare const DateInputBase: import('react').ForwardRefExoticComponent<DateInputBaseProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,78 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { DateFormat } from '../../utils/dateFormat';
3
- import { TenorResolver } from '../../utils/tenor';
4
- import { CalendarClassNames } from '../Calendar/Calendar';
5
- export interface DateTenorInputClassNames {
6
- root?: string;
7
- trigger?: string;
8
- triggerOpen?: string;
9
- dateInput?: string;
10
- tenorBadge?: string;
11
- calendarButton?: string;
12
- indicator?: string;
13
- indicatorOpen?: string;
14
- popup?: string;
15
- calendarSection?: string;
16
- tenorSection?: string;
17
- tenorTitle?: string;
18
- tenorGrid?: string;
19
- tenor?: string;
20
- tenorSelected?: string;
21
- calendar?: CalendarClassNames;
22
- }
23
- export interface DateTenorInputBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
24
- /** Current date value. */
25
- dateValue?: Date | null;
26
- /** Current tenor value. */
27
- tenorValue?: string | null;
28
- /** Called when either field changes. */
29
- onChange?: (values: {
30
- date: Date | null;
31
- tenor: string | null;
32
- }) => void;
33
- /** Reference date for tenor resolution (defaults to today). */
34
- referenceDate?: Date;
35
- /** Custom tenor-to-date resolver (for business day logic, holidays). */
36
- tenorResolver?: TenorResolver;
37
- /** Date format pattern. */
38
- dateFormat?: DateFormat;
39
- /** Minimum allowed date. */
40
- minDate?: Date;
41
- /** Maximum allowed date. */
42
- maxDate?: Date;
43
- /** Dates that cannot be selected. */
44
- disabledDates?: Date[] | ((date: Date) => boolean);
45
- /** Additional tenors beyond the standard set. */
46
- extraTenors?: string[];
47
- /** Restrict to only these tenors. */
48
- allowedTenors?: string[];
49
- /** Disable both fields. */
50
- disabled?: boolean;
51
- /** Make both fields read-only. */
52
- readOnly?: boolean;
53
- /** Placeholder for the date input. */
54
- datePlaceholder?: string;
55
- /** Placeholder for the tenor section title. */
56
- tenorSectionTitle?: string;
57
- /** 0 = Sunday, 1 = Monday. Default: 1. */
58
- weekStartsOn?: 0 | 1;
59
- /** CSS class names injected by the styled layer. */
60
- classNames?: DateTenorInputClassNames;
61
- /** data-* attributes injected by the styled layer. */
62
- dataAttributes?: Record<string, string>;
63
- /** Render the calendar icon for the trigger. */
64
- renderCalendarIcon?: () => ReactNode;
65
- /** Render the dropdown indicator. */
66
- renderIndicator?: (isOpen: boolean) => ReactNode;
67
- /** Render the calendar prev month nav icon. */
68
- renderCalendarNavPrev?: () => ReactNode;
69
- /** Render the calendar next month nav icon. */
70
- renderCalendarNavNext?: () => ReactNode;
71
- /** id for the date input element. */
72
- dateId?: string;
73
- /** aria-label for the date input. */
74
- dateAriaLabel?: string;
75
- /** aria-label for the tenor section. */
76
- tenorAriaLabel?: string;
77
- }
78
- export declare const DateTenorInputBase: import('react').ForwardRefExoticComponent<DateTenorInputBaseProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,27 +0,0 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
2
- import { ComboBoxClassNames } from '../ComboBox/ComboBox';
3
- export interface TenorInputClassNames extends ComboBoxClassNames {
4
- }
5
- export interface TenorInputBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
6
- /** Selected tenor value. */
7
- value?: string | null;
8
- /** Called when tenor changes. */
9
- onChange?: (tenor: string | null) => void;
10
- /** Additional tenors beyond the standard set. */
11
- extraTenors?: string[];
12
- /** Restrict to only these tenors. */
13
- allowedTenors?: string[];
14
- /** Allow free-text tenor input (e.g. "4M"). */
15
- allowCustom?: boolean;
16
- placeholder?: string;
17
- disabled?: boolean;
18
- open?: boolean;
19
- onOpenChange?: (open: boolean) => void;
20
- classNames?: TenorInputClassNames;
21
- dataAttributes?: Record<string, string>;
22
- renderCheckIcon?: () => ReactNode;
23
- renderIndicator?: (isOpen: boolean) => ReactNode;
24
- renderPillRemoveIcon?: () => ReactNode;
25
- renderLoading?: () => ReactNode;
26
- }
27
- export declare const TenorInputBase: import('react').ForwardRefExoticComponent<TenorInputBaseProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,17 +0,0 @@
1
- export type DateFormat = "YYYY-MM-DD" | "MM/DD/YYYY" | "DD/MM/YYYY" | "DD-MM-YYYY" | "MM-DD-YYYY" | "YYYY/MM/DD";
2
- export interface DateConstraints {
3
- min?: Date;
4
- max?: Date;
5
- disabledDates?: Date[] | ((date: Date) => boolean);
6
- }
7
- export interface DateParseResult {
8
- valid: boolean;
9
- date: Date | null;
10
- error?: "invalid-format" | "invalid-date" | "out-of-range" | "disabled-date";
11
- }
12
- export declare function getFormatSeparator(format: DateFormat): string;
13
- export declare function getFormatPlaceholder(format: DateFormat): string;
14
- export declare function getFormatSegmentLengths(format: DateFormat): readonly number[];
15
- export declare function formatDate(date: Date, format: DateFormat): string;
16
- export declare function parseDate(input: string, format: DateFormat): DateParseResult;
17
- export declare function validateDate(date: Date, constraints: DateConstraints): DateParseResult;
@@ -1,15 +0,0 @@
1
- export declare const STANDARD_TENORS: readonly ["ON", "TN", "SN", "SW", "1W", "2W", "1M", "2M", "3M", "6M", "9M", "1Y", "2Y", "3Y", "5Y", "10Y", "15Y", "20Y", "30Y"];
2
- export type StandardTenor = (typeof STANDARD_TENORS)[number];
3
- export type TenorUnit = "D" | "W" | "M" | "Y";
4
- export interface TenorParseResult {
5
- valid: boolean;
6
- tenor: string | null;
7
- value?: number;
8
- unit?: TenorUnit;
9
- error?: "invalid-format" | "invalid-value";
10
- }
11
- export type TenorResolver = (tenor: string, referenceDate: Date) => Date | null;
12
- export declare function parseTenor(input: string): TenorParseResult;
13
- export declare function isStandardTenor(input: string): input is StandardTenor;
14
- export declare function resolveTenor(tenor: string, referenceDate: Date): Date | null;
15
- export declare function dateToTenor(date: Date, referenceDate: Date): StandardTenor | null;