@orianatech/pire 0.8.0 → 0.10.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/components/forms/DateRangePicker.d.cts +55 -0
- package/dist/components/forms/DateRangePicker.d.ts +56 -0
- package/dist/components/forms/DateRangePicker.d.ts.map +1 -0
- package/dist/components/forms/FileUpload.d.cts +57 -0
- package/dist/components/forms/FileUpload.d.ts +58 -0
- package/dist/components/forms/FileUpload.d.ts.map +1 -0
- package/dist/components/forms/Input.d.cts +5 -0
- package/dist/components/forms/Input.d.ts +5 -0
- package/dist/components/forms/Input.d.ts.map +1 -1
- package/dist/components/navigation/SideNav.d.cts +15 -9
- package/dist/components/navigation/SideNav.d.ts +15 -9
- package/dist/components/navigation/SideNav.d.ts.map +1 -1
- package/dist/components/patterns/FileDropZone.d.cts +16 -0
- package/dist/components/patterns/FileDropZone.d.ts +17 -0
- package/dist/components/patterns/FileDropZone.d.ts.map +1 -0
- package/dist/components.css +42 -0
- package/dist/i18n/messages.d.cts +10 -0
- package/dist/i18n/messages.d.ts +10 -0
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/index.cjs +700 -318
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +711 -309
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { DateValue } from 'react-aria-components';
|
|
3
|
+
export interface DateRange {
|
|
4
|
+
start: DateValue;
|
|
5
|
+
end: DateValue;
|
|
6
|
+
}
|
|
7
|
+
export interface DateRangePreset {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** The app computes the range: Pire cannot know when a customer's fiscal year starts. */
|
|
11
|
+
range: () => DateRange;
|
|
12
|
+
}
|
|
13
|
+
export interface DateRangePickerProps {
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
value?: DateRange | null;
|
|
16
|
+
defaultValue?: DateRange | null;
|
|
17
|
+
onChange?: (value: DateRange | null) => void;
|
|
18
|
+
minValue?: DateValue;
|
|
19
|
+
maxValue?: DateValue;
|
|
20
|
+
/** Return true for dates that cannot be picked — blocked periods, closed books. */
|
|
21
|
+
isDateUnavailable?: (date: DateValue) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Longest range the caller accepts, in days. Exceeding it marks the field invalid so
|
|
24
|
+
* `errorMessage` shows — the wording is the app's, since only it knows the limit's reason.
|
|
25
|
+
*
|
|
26
|
+
* Days rather than a duration: "12 months" is not a fixed number of days, so pick the bound
|
|
27
|
+
* that matches your rule rather than expecting a calendar-aware one.
|
|
28
|
+
*/
|
|
29
|
+
maxRangeDays?: number;
|
|
30
|
+
/** Shortcuts beside the calendar: "This month", "Last 30 days". */
|
|
31
|
+
presets?: DateRangePreset[];
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
errorMessage?: React.ReactNode;
|
|
34
|
+
isInvalid?: boolean;
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
isReadOnly?: boolean;
|
|
37
|
+
isRequired?: boolean;
|
|
38
|
+
size?: 'sm' | 'md' | 'lg';
|
|
39
|
+
fullWidth?: boolean;
|
|
40
|
+
/** HTML submit names for the two ends. */
|
|
41
|
+
startName?: string;
|
|
42
|
+
endName?: string;
|
|
43
|
+
className?: string;
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
}
|
|
46
|
+
/** Whole days between the two ends, inclusive of both. */
|
|
47
|
+
export declare function rangeLengthInDays(range: DateRange): number;
|
|
48
|
+
/**
|
|
49
|
+
* Two dates that belong together — the default filter on 24 ERP screens.
|
|
50
|
+
*
|
|
51
|
+
* Built on React Aria's `DateRangePicker`, which supplies the segmented ends, the ordering rules
|
|
52
|
+
* between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:
|
|
53
|
+
* `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.
|
|
54
|
+
*/
|
|
55
|
+
export declare function DateRangePicker({ label, description, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, ...rest }: DateRangePickerProps): React.JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { DateValue } from 'react-aria-components';
|
|
3
|
+
export interface DateRange {
|
|
4
|
+
start: DateValue;
|
|
5
|
+
end: DateValue;
|
|
6
|
+
}
|
|
7
|
+
export interface DateRangePreset {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
/** The app computes the range: Pire cannot know when a customer's fiscal year starts. */
|
|
11
|
+
range: () => DateRange;
|
|
12
|
+
}
|
|
13
|
+
export interface DateRangePickerProps {
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
value?: DateRange | null;
|
|
16
|
+
defaultValue?: DateRange | null;
|
|
17
|
+
onChange?: (value: DateRange | null) => void;
|
|
18
|
+
minValue?: DateValue;
|
|
19
|
+
maxValue?: DateValue;
|
|
20
|
+
/** Return true for dates that cannot be picked — blocked periods, closed books. */
|
|
21
|
+
isDateUnavailable?: (date: DateValue) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Longest range the caller accepts, in days. Exceeding it marks the field invalid so
|
|
24
|
+
* `errorMessage` shows — the wording is the app's, since only it knows the limit's reason.
|
|
25
|
+
*
|
|
26
|
+
* Days rather than a duration: "12 months" is not a fixed number of days, so pick the bound
|
|
27
|
+
* that matches your rule rather than expecting a calendar-aware one.
|
|
28
|
+
*/
|
|
29
|
+
maxRangeDays?: number;
|
|
30
|
+
/** Shortcuts beside the calendar: "This month", "Last 30 days". */
|
|
31
|
+
presets?: DateRangePreset[];
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
errorMessage?: React.ReactNode;
|
|
34
|
+
isInvalid?: boolean;
|
|
35
|
+
isDisabled?: boolean;
|
|
36
|
+
isReadOnly?: boolean;
|
|
37
|
+
isRequired?: boolean;
|
|
38
|
+
size?: 'sm' | 'md' | 'lg';
|
|
39
|
+
fullWidth?: boolean;
|
|
40
|
+
/** HTML submit names for the two ends. */
|
|
41
|
+
startName?: string;
|
|
42
|
+
endName?: string;
|
|
43
|
+
className?: string;
|
|
44
|
+
style?: React.CSSProperties;
|
|
45
|
+
}
|
|
46
|
+
/** Whole days between the two ends, inclusive of both. */
|
|
47
|
+
export declare function rangeLengthInDays(range: DateRange): number;
|
|
48
|
+
/**
|
|
49
|
+
* Two dates that belong together — the default filter on 24 ERP screens.
|
|
50
|
+
*
|
|
51
|
+
* Built on React Aria's `DateRangePicker`, which supplies the segmented ends, the ordering rules
|
|
52
|
+
* between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:
|
|
53
|
+
* `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.
|
|
54
|
+
*/
|
|
55
|
+
export declare function DateRangePicker({ label, description, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, ...rest }: DateRangePickerProps): React.JSX.Element;
|
|
56
|
+
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/forms/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAKvD,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,KAAK,EAAE,MAAM,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC,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K,EAAE,GAAG,IAAI,EAC9C,EAAE,oBAAoB,qBAiFtB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PireFile {
|
|
3
|
+
/** The browser's `File`. Pire uploads nothing — that is the app's job. */
|
|
4
|
+
file: File;
|
|
5
|
+
/** Object URL, only for images with `showPreview`. Revoked on unmount. */
|
|
6
|
+
previewUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FileRejection {
|
|
9
|
+
file: File;
|
|
10
|
+
reason: 'size' | 'type';
|
|
11
|
+
}
|
|
12
|
+
export interface FileUploadProps {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
/** Controlled / uncontrolled, the same pair as `Tabs` and `MultiComboBox`. */
|
|
15
|
+
value?: PireFile[];
|
|
16
|
+
defaultValue?: PireFile[];
|
|
17
|
+
onChange?: (files: PireFile[]) => void;
|
|
18
|
+
/** Mime types or extensions, exactly as `FileTrigger.acceptedFileTypes` takes them. */
|
|
19
|
+
acceptedFileTypes?: readonly string[];
|
|
20
|
+
allowsMultiple?: boolean;
|
|
21
|
+
/** Ceiling in bytes. Oversized files are rejected and reported, never held. */
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/** Rejections, so the app can word its own message. */
|
|
24
|
+
onError?: (rejections: FileRejection[]) => void;
|
|
25
|
+
/** Thumbnail for images. Turn it off for CSVs, where a thumbnail says nothing. */
|
|
26
|
+
showPreview?: boolean;
|
|
27
|
+
/** Upload progress 0–100, while the app is doing the uploading. */
|
|
28
|
+
uploadProgress?: number;
|
|
29
|
+
/** Overrides the dictionary's `fileUploadChoose`. */
|
|
30
|
+
chooseLabel?: string;
|
|
31
|
+
description?: React.ReactNode;
|
|
32
|
+
errorMessage?: React.ReactNode;
|
|
33
|
+
isInvalid?: boolean;
|
|
34
|
+
isDisabled?: boolean;
|
|
35
|
+
isRequired?: boolean;
|
|
36
|
+
isReadOnly?: boolean;
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
style?: React.CSSProperties;
|
|
41
|
+
}
|
|
42
|
+
/** Human-readable size. Deliberately not localised digits: `toLocaleString` on the number only. */
|
|
43
|
+
export declare function formatFileSize(bytes: number): string;
|
|
44
|
+
/** Splits a picked list into keepers and rejections, without uploading or mutating anything. */
|
|
45
|
+
export declare function screenFiles(files: File[], { maxSize, acceptedFileTypes }: {
|
|
46
|
+
maxSize?: number;
|
|
47
|
+
acceptedFileTypes?: readonly string[];
|
|
48
|
+
}): {
|
|
49
|
+
accepted: File[];
|
|
50
|
+
rejected: FileRejection[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* File picker with a list of what was chosen. Pire hands back `File`s through `onChange` and
|
|
54
|
+
* uploads nothing: the app owns the `FormData`, the request and the progress it reports back
|
|
55
|
+
* through `uploadProgress`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function FileUpload({ label, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError, showPreview, uploadProgress, chooseLabel, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, fullWidth, className, style, }: FileUploadProps): React.JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PireFile {
|
|
3
|
+
/** The browser's `File`. Pire uploads nothing — that is the app's job. */
|
|
4
|
+
file: File;
|
|
5
|
+
/** Object URL, only for images with `showPreview`. Revoked on unmount. */
|
|
6
|
+
previewUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FileRejection {
|
|
9
|
+
file: File;
|
|
10
|
+
reason: 'size' | 'type';
|
|
11
|
+
}
|
|
12
|
+
export interface FileUploadProps {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
/** Controlled / uncontrolled, the same pair as `Tabs` and `MultiComboBox`. */
|
|
15
|
+
value?: PireFile[];
|
|
16
|
+
defaultValue?: PireFile[];
|
|
17
|
+
onChange?: (files: PireFile[]) => void;
|
|
18
|
+
/** Mime types or extensions, exactly as `FileTrigger.acceptedFileTypes` takes them. */
|
|
19
|
+
acceptedFileTypes?: readonly string[];
|
|
20
|
+
allowsMultiple?: boolean;
|
|
21
|
+
/** Ceiling in bytes. Oversized files are rejected and reported, never held. */
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/** Rejections, so the app can word its own message. */
|
|
24
|
+
onError?: (rejections: FileRejection[]) => void;
|
|
25
|
+
/** Thumbnail for images. Turn it off for CSVs, where a thumbnail says nothing. */
|
|
26
|
+
showPreview?: boolean;
|
|
27
|
+
/** Upload progress 0–100, while the app is doing the uploading. */
|
|
28
|
+
uploadProgress?: number;
|
|
29
|
+
/** Overrides the dictionary's `fileUploadChoose`. */
|
|
30
|
+
chooseLabel?: string;
|
|
31
|
+
description?: React.ReactNode;
|
|
32
|
+
errorMessage?: React.ReactNode;
|
|
33
|
+
isInvalid?: boolean;
|
|
34
|
+
isDisabled?: boolean;
|
|
35
|
+
isRequired?: boolean;
|
|
36
|
+
isReadOnly?: boolean;
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
style?: React.CSSProperties;
|
|
41
|
+
}
|
|
42
|
+
/** Human-readable size. Deliberately not localised digits: `toLocaleString` on the number only. */
|
|
43
|
+
export declare function formatFileSize(bytes: number): string;
|
|
44
|
+
/** Splits a picked list into keepers and rejections, without uploading or mutating anything. */
|
|
45
|
+
export declare function screenFiles(files: File[], { maxSize, acceptedFileTypes }: {
|
|
46
|
+
maxSize?: number;
|
|
47
|
+
acceptedFileTypes?: readonly string[];
|
|
48
|
+
}): {
|
|
49
|
+
accepted: File[];
|
|
50
|
+
rejected: FileRejection[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* File picker with a list of what was chosen. Pire hands back `File`s through `onChange` and
|
|
54
|
+
* uploads nothing: the app owns the `FormData`, the request and the progress it reports back
|
|
55
|
+
* through `uploadProgress`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function FileUpload({ label, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError, showPreview, uploadProgress, chooseLabel, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, fullWidth, className, style, }: FileUploadProps): React.JSX.Element;
|
|
58
|
+
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FileUpload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,MAAM,WAAW,QAAQ;IACvB,0EAA0E;IAC1E,IAAI,EAAE,IAAI,CAAC;IACX,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACvC,uFAAuF;IACvF,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAChD,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,WAAW,CAAC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|
|
9
|
+
/**
|
|
10
|
+
* `date` is accepted for compatibility but reaches for the browser's native picker, which
|
|
11
|
+
* ignores the token palette and behaves differently per browser. Use `DatePicker`, or
|
|
12
|
+
* `DateRangePicker` for two ends.
|
|
13
|
+
*/
|
|
9
14
|
type?: 'text' | 'search' | 'email' | 'number' | 'date' | 'password' | 'tel' | 'url';
|
|
10
15
|
/** Leading icon slug — "search", "calendar", "hash". */
|
|
11
16
|
icon?: string;
|
|
@@ -6,6 +6,11 @@ export interface InputProps {
|
|
|
6
6
|
/** Receives the raw string value. */
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
|
+
/**
|
|
10
|
+
* `date` is accepted for compatibility but reaches for the browser's native picker, which
|
|
11
|
+
* ignores the token palette and behaves differently per browser. Use `DatePicker`, or
|
|
12
|
+
* `DateRangePicker` for two ends.
|
|
13
|
+
*/
|
|
9
14
|
type?: 'text' | 'search' | 'email' | 'number' | 'date' | 'password' | 'tel' | 'url';
|
|
10
15
|
/** Leading icon slug — "search", "calendar", "hash". */
|
|
11
16
|
icon?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC;IACpF,wDAA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EAAE,EAAE,UAAU,qBAmB9E"}
|
|
@@ -40,9 +40,16 @@ export interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'o
|
|
|
40
40
|
defaultExpandedIds?: string[];
|
|
41
41
|
/** Fires with every expanded id after a toggle, controlled or not. */
|
|
42
42
|
onExpandedChange?: (ids: string[]) => void;
|
|
43
|
-
/** 48px icon rail. Labels move into tooltips,
|
|
44
|
-
* see the note on {@link SideNav}. */
|
|
43
|
+
/** 48px icon rail. Labels move into tooltips or, for a group, into its flyout. */
|
|
45
44
|
collapsed?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* In the rail, a group opens its children in a flyout beside it. On by default: without it the
|
|
47
|
+
* rail records an expansion nothing can draw, leaving second-level destinations reachable only
|
|
48
|
+
* by expanding the nav again.
|
|
49
|
+
*
|
|
50
|
+
* Pass `false` for the previous behaviour, where a rail group toggles expansion invisibly.
|
|
51
|
+
*/
|
|
52
|
+
railFlyout?: boolean;
|
|
46
53
|
footer?: React.ReactNode;
|
|
47
54
|
}
|
|
48
55
|
/** Primary navigation. A first-level entry is either a destination (icon + label, selectable) or a
|
|
@@ -63,12 +70,11 @@ export interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'o
|
|
|
63
70
|
* UA's `[hidden] { display: none }`, leaving collapsed children focusable under
|
|
64
71
|
* `aria-hidden="true"`. `.pire-sidenav-subnav[hidden]` in `components.css` is that guard.
|
|
65
72
|
* - **`collapsed` and expansion are different axes, and the rail wins.** With `collapsed` set there
|
|
66
|
-
* are no labels, and a second level is nothing *but* labels
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* everyone, exactly as the labels already are.
|
|
73
|
+
* are no labels, and a second level is nothing *but* labels. A group therefore opens its children
|
|
74
|
+
* in a flyout beside the rail (`railFlyout`, on by default) rather than inline. With
|
|
75
|
+
* `railFlyout={false}` the row falls back to recording the expansion silently — which leaves
|
|
76
|
+
* second-level destinations reachable only by expanding the nav again, so it is off the
|
|
77
|
+
* accessible path and exists for compatibility.
|
|
72
78
|
* - **Several groups can be open at once**, and there is no accordion mode. Closing the group you
|
|
73
79
|
* are in to open another is the wrong trade in a nav whose whole job is showing where you are. */
|
|
74
|
-
export declare function SideNav({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange, collapsed, footer, className, ...rest }: SideNavProps): React.JSX.Element;
|
|
80
|
+
export declare function SideNav({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange, collapsed, railFlyout, footer, className, ...rest }: SideNavProps): React.JSX.Element;
|
|
@@ -40,9 +40,16 @@ export interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'o
|
|
|
40
40
|
defaultExpandedIds?: string[];
|
|
41
41
|
/** Fires with every expanded id after a toggle, controlled or not. */
|
|
42
42
|
onExpandedChange?: (ids: string[]) => void;
|
|
43
|
-
/** 48px icon rail. Labels move into tooltips,
|
|
44
|
-
* see the note on {@link SideNav}. */
|
|
43
|
+
/** 48px icon rail. Labels move into tooltips or, for a group, into its flyout. */
|
|
45
44
|
collapsed?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* In the rail, a group opens its children in a flyout beside it. On by default: without it the
|
|
47
|
+
* rail records an expansion nothing can draw, leaving second-level destinations reachable only
|
|
48
|
+
* by expanding the nav again.
|
|
49
|
+
*
|
|
50
|
+
* Pass `false` for the previous behaviour, where a rail group toggles expansion invisibly.
|
|
51
|
+
*/
|
|
52
|
+
railFlyout?: boolean;
|
|
46
53
|
footer?: React.ReactNode;
|
|
47
54
|
}
|
|
48
55
|
/** Primary navigation. A first-level entry is either a destination (icon + label, selectable) or a
|
|
@@ -63,13 +70,12 @@ export interface SideNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'o
|
|
|
63
70
|
* UA's `[hidden] { display: none }`, leaving collapsed children focusable under
|
|
64
71
|
* `aria-hidden="true"`. `.pire-sidenav-subnav[hidden]` in `components.css` is that guard.
|
|
65
72
|
* - **`collapsed` and expansion are different axes, and the rail wins.** With `collapsed` set there
|
|
66
|
-
* are no labels, and a second level is nothing *but* labels
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* everyone, exactly as the labels already are.
|
|
73
|
+
* are no labels, and a second level is nothing *but* labels. A group therefore opens its children
|
|
74
|
+
* in a flyout beside the rail (`railFlyout`, on by default) rather than inline. With
|
|
75
|
+
* `railFlyout={false}` the row falls back to recording the expansion silently — which leaves
|
|
76
|
+
* second-level destinations reachable only by expanding the nav again, so it is off the
|
|
77
|
+
* accessible path and exists for compatibility.
|
|
72
78
|
* - **Several groups can be open at once**, and there is no accordion mode. Closing the group you
|
|
73
79
|
* are in to open another is the wrong trade in a nav whose whole job is showing where you are. */
|
|
74
|
-
export declare function SideNav({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange, collapsed, footer, className, ...rest }: SideNavProps): React.JSX.Element;
|
|
80
|
+
export declare function SideNav({ groups, value, onChange, expandedIds, defaultExpandedIds, onExpandedChange, collapsed, railFlyout, footer, className, ...rest }: SideNavProps): React.JSX.Element;
|
|
75
81
|
//# sourceMappingURL=SideNav.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/SideNav.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SideNav.d.ts","sourceRoot":"","sources":["../../../src/components/navigation/SideNav.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B;;;;8EAI8E;AAC9E,MAAM,WAAW,gBAAgB;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE;AAE/E,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,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cjs';
|
|
3
|
+
export interface FileDropZoneProps extends Omit<FileUploadProps, 'chooseLabel'> {
|
|
4
|
+
/** Instruction inside the zone. Overrides the dictionary's `fileDropZonePrompt`. */
|
|
5
|
+
promptLabel?: React.ReactNode;
|
|
6
|
+
/** `compact` for an import modal, where the zone competes with a table for height. */
|
|
7
|
+
height?: 'compact' | 'regular';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The large drop surface, for import screens and anywhere a file is the point of the page.
|
|
11
|
+
*
|
|
12
|
+
* Built on React Aria's `DropZone`, so it is a real drop target for keyboard and assistive tech —
|
|
13
|
+
* not a div with `onDragOver`. It still contains a `FileTrigger`, because drag-and-drop alone is
|
|
14
|
+
* not an accessible way to supply a file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FileDropZone({ label, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError, showPreview, uploadProgress, promptLabel, height, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, fullWidth, className, style, }: FileDropZoneProps): React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type FileUploadProps } from '../forms/FileUpload.js';
|
|
3
|
+
export interface FileDropZoneProps extends Omit<FileUploadProps, 'chooseLabel'> {
|
|
4
|
+
/** Instruction inside the zone. Overrides the dictionary's `fileDropZonePrompt`. */
|
|
5
|
+
promptLabel?: React.ReactNode;
|
|
6
|
+
/** `compact` for an import modal, where the zone competes with a table for height. */
|
|
7
|
+
height?: 'compact' | 'regular';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The large drop surface, for import screens and anywhere a file is the point of the page.
|
|
11
|
+
*
|
|
12
|
+
* Built on React Aria's `DropZone`, so it is a real drop target for keyboard and assistive tech —
|
|
13
|
+
* not a div with `onDragOver`. It still contains a `FileTrigger`, because drag-and-drop alone is
|
|
14
|
+
* not an accessible way to supply a file.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FileDropZone({ label, value, defaultValue, onChange, acceptedFileTypes, allowsMultiple, maxSize, onError, showPreview, uploadProgress, promptLabel, height, description, errorMessage, isInvalid, isDisabled, isReadOnly, isRequired, fullWidth, className, style, }: FileDropZoneProps): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=FileDropZone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileDropZone.d.ts","sourceRoot":"","sources":["../../../src/components/patterns/FileDropZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAA+B,KAAK,eAAe,EAAiB,MAAM,qBAAqB,CAAC;AAIvG,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC;IAC7E,oFAAoF;IACpF,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,sFAAsF;IACtF,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EACzF,WAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAkB,EAAE,WAAW,EAAE,YAAY,EAC9F,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,SAAgB,EAAE,SAAS,EAAE,KAAK,GAClF,EAAE,iBAAiB,qBAyFnB"}
|
package/dist/components.css
CHANGED
|
@@ -481,6 +481,48 @@
|
|
|
481
481
|
.pire-menu-section-title{display:block;padding:var(--sp-1) var(--sp-3);font:var(--type-label);letter-spacing:var(--ls-caps);text-transform:uppercase;color:var(--text-secondary)}
|
|
482
482
|
.pire-menu-separator{border:0;border-top:var(--border-w-hairline) solid var(--border-subtle);margin:var(--sp-1) 0}
|
|
483
483
|
|
|
484
|
+
/* ---- DateRangePicker ------------------------------------------------------ */
|
|
485
|
+
.pire-daterange-control{gap:var(--sp-1)}
|
|
486
|
+
.pire-daterange-dash{color:var(--text-tertiary);flex:0 0 auto}
|
|
487
|
+
/* Presets sit beside the calendar, and before it in the DOM so the keyboard reaches a shortcut
|
|
488
|
+
without arrowing through a month first. */
|
|
489
|
+
.pire-daterange-dialog{display:flex;align-items:stretch}
|
|
490
|
+
.pire-daterange-presets{display:flex;flex-direction:column;gap:var(--sp-0h);padding:var(--sp-2);border-right:1px solid var(--border-subtle);min-width:140px}
|
|
491
|
+
.pire-daterange-preset{display:flex;align-items:center;min-height:var(--row-h-condensed);padding:0 var(--sp-2);border:0;border-radius:var(--radius-1);background:transparent;color:var(--text-primary);font:var(--type-body);text-align:left;cursor:pointer}
|
|
492
|
+
.pire-daterange-preset[data-hovered]{background:var(--surface-hover)}
|
|
493
|
+
.pire-daterange-preset[data-focus-visible]{outline:var(--focus-w) solid var(--focus-color);outline-offset:calc(var(--focus-offset) * -1)}
|
|
494
|
+
/* Range highlighting comes off the data attributes React Aria puts on each cell. The two ends
|
|
495
|
+
carry the accent; the span between them uses the subtle pair so the ends stay legible as ends. */
|
|
496
|
+
.pire-calendar-cell[data-selected]{background:var(--accent-subtle-bg);color:var(--accent-subtle-fg);border-radius:0}
|
|
497
|
+
.pire-calendar-cell[data-selection-start]{background:var(--accent-bg);color:var(--text-on-accent);border-radius:var(--radius-1) 0 0 var(--radius-1)}
|
|
498
|
+
.pire-calendar-cell[data-selection-end]{background:var(--accent-bg);color:var(--text-on-accent);border-radius:0 var(--radius-1) var(--radius-1) 0}
|
|
499
|
+
.pire-calendar-cell[data-selection-start][data-selection-end]{border-radius:var(--radius-1)}
|
|
500
|
+
.pire-calendar-cell[data-outside-visible-range]{visibility:hidden}
|
|
501
|
+
|
|
502
|
+
/* ---- FileUpload / FileDropZone ------------------------------------------- */
|
|
503
|
+
.pire-fileupload-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--sp-1)}
|
|
504
|
+
.pire-fileupload-item{display:flex;align-items:center;gap:var(--sp-2);min-height:var(--row-h-condensed);padding:0 var(--sp-2);border:1px solid var(--border-subtle);border-radius:var(--radius-1);background:var(--surface-card)}
|
|
505
|
+
.pire-fileupload-icon{flex:0 0 auto;color:var(--text-secondary)}
|
|
506
|
+
.pire-fileupload-thumb{flex:0 0 auto;width:24px;height:24px;object-fit:cover;border-radius:var(--radius-1)}
|
|
507
|
+
.pire-fileupload-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--type-body)}
|
|
508
|
+
.pire-fileupload-size{flex:0 0 auto;font:var(--type-caption);color:var(--text-secondary);font-variant-numeric:tabular-nums}
|
|
509
|
+
.pire-dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-2);padding:var(--sp-6);border:1px dashed var(--border-default);border-radius:var(--radius-2);background:var(--surface-sunken);color:var(--text-secondary);text-align:center;transition:var(--transition-surface)}
|
|
510
|
+
.pire-dropzone[data-height="compact"]{padding:var(--sp-4)}
|
|
511
|
+
/* React Aria sets data-drop-target while a drag hovers, and data-focus-visible on keyboard
|
|
512
|
+
focus — the zone is a real drop target, so both states have to read as active. */
|
|
513
|
+
.pire-dropzone[data-drop-target]{border-color:var(--accent-bg);border-style:solid;background:var(--accent-subtle-bg)}
|
|
514
|
+
.pire-dropzone[data-focus-visible]{outline:var(--focus-w) solid var(--focus-color);outline-offset:var(--focus-offset)}
|
|
515
|
+
.pire-dropzone[data-disabled]{background:var(--surface-disabled);color:var(--text-disabled);border-color:var(--border-subtle)}
|
|
516
|
+
.pire-dropzone-icon{color:var(--text-tertiary)}
|
|
517
|
+
.pire-dropzone-prompt{font:var(--type-body)}
|
|
518
|
+
|
|
519
|
+
/* ---- SideNav rail flyout -------------------------------------------------- */
|
|
520
|
+
/* Matches the expanded nav's width so the flyout is not visibly narrower than the menu it
|
|
521
|
+
stands in for. The rows drop the second-level indent: there is no first level beside them
|
|
522
|
+
here, so the indent would be measuring against something that is not on screen. */
|
|
523
|
+
.pire-sidenav-flyout{min-width:var(--sidenav-w)}
|
|
524
|
+
.pire-sidenav-flyout .pire-menu-item{padding-left:var(--sp-4)}
|
|
525
|
+
|
|
484
526
|
/* ---- ComboBox async status ----------------------------------------------- */
|
|
485
527
|
/* Same height as an option row so the popover does not resize when results replace the
|
|
486
528
|
loading line — a popover that jumps has already moved the row under the pointer. */
|
package/dist/i18n/messages.d.cts
CHANGED
|
@@ -39,6 +39,8 @@ export interface PireMessages {
|
|
|
39
39
|
datePickerOpenCalendar: string;
|
|
40
40
|
datePickerPreviousMonth: string;
|
|
41
41
|
datePickerNextMonth: string;
|
|
42
|
+
/** Groups the shortcut buttons beside the range calendar. */
|
|
43
|
+
dateRangePresetsLabel: string;
|
|
42
44
|
/** Accessible names of the NumberField steppers. */
|
|
43
45
|
numberFieldIncrease: string;
|
|
44
46
|
numberFieldDecrease: string;
|
|
@@ -63,6 +65,14 @@ export interface PireMessages {
|
|
|
63
65
|
paginationRowsPerPage: string;
|
|
64
66
|
/** Landmark name of the main SideNav. Override it when a screen has more than one nav. */
|
|
65
67
|
sideNavLabel: string;
|
|
68
|
+
/** Button that opens the OS file picker. */
|
|
69
|
+
fileUploadChoose: string;
|
|
70
|
+
/** Removes one picked file. `{name}` is replaced with the file name. */
|
|
71
|
+
fileUploadRemoveNamed: string;
|
|
72
|
+
/** Label on the progress bar while the app uploads. */
|
|
73
|
+
fileUploadUploading: string;
|
|
74
|
+
/** Instruction inside the drop surface. */
|
|
75
|
+
fileDropZonePrompt: string;
|
|
66
76
|
}
|
|
67
77
|
export declare const enMessages: PireMessages;
|
|
68
78
|
export declare const esMessages: PireMessages;
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export interface PireMessages {
|
|
|
39
39
|
datePickerOpenCalendar: string;
|
|
40
40
|
datePickerPreviousMonth: string;
|
|
41
41
|
datePickerNextMonth: string;
|
|
42
|
+
/** Groups the shortcut buttons beside the range calendar. */
|
|
43
|
+
dateRangePresetsLabel: string;
|
|
42
44
|
/** Accessible names of the NumberField steppers. */
|
|
43
45
|
numberFieldIncrease: string;
|
|
44
46
|
numberFieldDecrease: string;
|
|
@@ -63,6 +65,14 @@ export interface PireMessages {
|
|
|
63
65
|
paginationRowsPerPage: string;
|
|
64
66
|
/** Landmark name of the main SideNav. Override it when a screen has more than one nav. */
|
|
65
67
|
sideNavLabel: string;
|
|
68
|
+
/** Button that opens the OS file picker. */
|
|
69
|
+
fileUploadChoose: string;
|
|
70
|
+
/** Removes one picked file. `{name}` is replaced with the file name. */
|
|
71
|
+
fileUploadRemoveNamed: string;
|
|
72
|
+
/** Label on the progress bar while the app uploads. */
|
|
73
|
+
fileUploadUploading: string;
|
|
74
|
+
/** Instruction inside the drop surface. */
|
|
75
|
+
fileDropZonePrompt: string;
|
|
66
76
|
}
|
|
67
77
|
export declare const enMessages: PireMessages;
|
|
68
78
|
export declare const esMessages: PireMessages;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAE1B,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qDAAqD;IACrD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC;IAEzB,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC;IAEvB,6DAA6D;IAC7D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,g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