@webority/ui-react 0.7.5 → 0.7.6
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/types/components/AppAutocomplete.d.ts +5 -28
- package/dist/types/components/AppAvatar.d.ts +24 -2
- package/dist/types/components/AppAvatarGroup.d.ts +8 -0
- package/dist/types/components/AppCard.d.ts +31 -5
- package/dist/types/components/AppCopyButton.d.ts +27 -0
- package/dist/types/components/AppDatePicker.d.ts +3 -18
- package/dist/types/components/AppDateRangePicker.d.ts +3 -23
- package/dist/types/components/AppDescriptions.d.ts +30 -0
- package/dist/types/components/AppDropdown.d.ts +53 -11
- package/dist/types/components/AppFormActions.d.ts +19 -0
- package/dist/types/components/AppFormRow.d.ts +17 -0
- package/dist/types/components/AppFormSection.d.ts +19 -0
- package/dist/types/components/AppKpiTile.d.ts +3 -1
- package/dist/types/components/AppModal.d.ts +4 -1
- package/dist/types/components/AppMultiSelect.d.ts +5 -21
- package/dist/types/components/AppNumberInput.d.ts +36 -0
- package/dist/types/components/AppPageHeader.d.ts +10 -1
- package/dist/types/components/AppPagination.d.ts +25 -0
- package/dist/types/components/AppPhoneNumberInput.d.ts +2 -13
- package/dist/types/components/AppResult.d.ts +27 -0
- package/dist/types/components/AppScrollbar.d.ts +1 -2
- package/dist/types/components/AppSearch.d.ts +5 -3
- package/dist/types/components/AppSelect.d.ts +2 -27
- package/dist/types/components/AppSlider.d.ts +37 -0
- package/dist/types/components/AppStepper.d.ts +24 -7
- package/dist/types/components/AppTagInput.d.ts +28 -0
- package/dist/types/components/AppTimePicker.d.ts +33 -0
- package/dist/types/components/AppToastContainer.d.ts +6 -1
- package/dist/types/components/AppTooltip.d.ts +21 -0
- package/dist/types/components/toast.d.ts +5 -2
- package/dist/types/components/toastStore.d.ts +3 -3
- package/dist/types/index.d.ts +13 -0
- package/dist/types/lib/FileItemRow.d.ts +20 -0
- package/dist/types/lib/fileItem.d.ts +16 -0
- package/dist/ui-react.js +2503 -1147
- package/package.json +3 -3
|
@@ -1,28 +1,3 @@
|
|
|
1
1
|
import '@webority/ui-elements';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"aria-describedby": any;
|
|
5
|
-
"aria-label": any;
|
|
6
|
-
"aria-labelledby": any;
|
|
7
|
-
className?: string;
|
|
8
|
-
clearable?: boolean;
|
|
9
|
-
disabled: any;
|
|
10
|
-
error: any;
|
|
11
|
-
fieldClassName?: string;
|
|
12
|
-
floatingLabel?: boolean;
|
|
13
|
-
help: any;
|
|
14
|
-
helpLabel?: string;
|
|
15
|
-
hint: any;
|
|
16
|
-
icon: any;
|
|
17
|
-
id: any;
|
|
18
|
-
label: any;
|
|
19
|
-
name: any;
|
|
20
|
-
onChange: any;
|
|
21
|
-
options?: any[];
|
|
22
|
-
placeholder?: string;
|
|
23
|
-
required?: boolean;
|
|
24
|
-
searchPlaceholder?: string;
|
|
25
|
-
searchable?: boolean;
|
|
26
|
-
size: any;
|
|
27
|
-
value: any;
|
|
28
|
-
}): import("react").JSX.Element;
|
|
2
|
+
declare const AppSelect: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
3
|
+
export default AppSelect;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import '@webority/ui-elements';
|
|
2
|
+
/**
|
|
3
|
+
* Thin React wrapper over the shared `<wui-slider>` element (single or dual-thumb slider).
|
|
4
|
+
*
|
|
5
|
+
* Single-thumb mode (default): `value` + `onChange` with string value.
|
|
6
|
+
* Dual-thumb mode (range): `start`/`end` + `onChange` callback receives `{ start, end }`.
|
|
7
|
+
*
|
|
8
|
+
* Wraps it in the standard `.field` shell — label / required mark / hint / error.
|
|
9
|
+
* The shell is omitted entirely when there is nothing to render around the control.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {number} [props.value] Current value (single mode)
|
|
13
|
+
* @param {number} [props.start] Range start (range mode)
|
|
14
|
+
* @param {number} [props.end] Range end (range mode)
|
|
15
|
+
* @param {boolean} [props.range] Enables dual-thumb range mode
|
|
16
|
+
* @param {(value: number|{start, end}) => void} [props.onChange]
|
|
17
|
+
* @param {number} [props.min=0]
|
|
18
|
+
* @param {number} [props.max=100]
|
|
19
|
+
* @param {number} [props.step=1]
|
|
20
|
+
* @param {string} [props.label]
|
|
21
|
+
* @param {boolean} [props.required]
|
|
22
|
+
* @param {string} [props.hint]
|
|
23
|
+
* @param {string} [props.error]
|
|
24
|
+
* @param {string} [props.name] Form field name (single mode)
|
|
25
|
+
* @param {string} [props.startName] Form field name for range start
|
|
26
|
+
* @param {string} [props.endName] Form field name for range end
|
|
27
|
+
* @param {boolean} [props.disabled]
|
|
28
|
+
* @param {'sm'|'md'|'lg'} [props.size] Control size tier
|
|
29
|
+
* @param {boolean} [props.showValue] Shows a label with current value(s)
|
|
30
|
+
* @param {string} [props.unit] Suffix for the value label (e.g. '%')
|
|
31
|
+
* @param {string} [props.id]
|
|
32
|
+
* @param {string} [props.ariaLabel]
|
|
33
|
+
* @param {string} [props.className]
|
|
34
|
+
* @param {import('react').Ref} [ref]
|
|
35
|
+
*/
|
|
36
|
+
declare const AppSlider: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
37
|
+
export default AppSlider;
|
|
@@ -7,28 +7,45 @@
|
|
|
7
7
|
* `variant="journey"` wide — a large dot beside a "STEP 2" index and a title.
|
|
8
8
|
* For a page masthead above the whole flow.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Either variant can run `orientation="vertical"` to stack the steps down a side
|
|
11
|
+
* rail — for a narrow column, a drawer, or a settings wizard.
|
|
12
12
|
*
|
|
13
|
-
* A step
|
|
14
|
-
* the
|
|
13
|
+
* A completed step shows a tick, not its number; a failed step shows an alert; a
|
|
14
|
+
* step may carry its own `icon` in place of the number. The number says "which",
|
|
15
|
+
* these glyphs say "what happened", and once something has happened the glyph is
|
|
16
|
+
* the more useful of the two.
|
|
17
|
+
*
|
|
18
|
+
* A step with `href` becomes a link back to that stage; passing `onStepClick`
|
|
19
|
+
* instead makes every step a button that reports its index — for a wizard whose
|
|
20
|
+
* navigation is driven in JS rather than by routing. Use one or the other.
|
|
15
21
|
*
|
|
16
22
|
* @param {object} props
|
|
17
|
-
* @param {{ key?: string, label: string, status?: 'done'|'active'|'pending', href?: string }[]} props.steps
|
|
23
|
+
* @param {{ key?: string, label: string, description?: string, status?: 'done'|'active'|'pending'|'error', href?: string, icon?: string }[]} props.steps
|
|
18
24
|
* @param {'steps'|'journey'} [props.variant='steps']
|
|
25
|
+
* @param {'horizontal'|'vertical'} [props.orientation='horizontal']
|
|
26
|
+
* @param {number} [props.activeStep] When set, statuses are DERIVED from the index —
|
|
27
|
+
* steps before it are `done`, the one at it is `active`, the rest `pending`. A step's
|
|
28
|
+
* own explicit `status` still wins, so a failed step can be marked `error`.
|
|
29
|
+
* @param {(step: object, index: number) => void} [props.onStepClick] Makes each step a
|
|
30
|
+
* button that reports the step it stands for. React-only (no Razor counterpart).
|
|
19
31
|
* @param {string} [props.label='Progress'] Accessible name for the list.
|
|
20
32
|
* @param {import('react').ElementType} [props.linkComponent] Router link for a revisitable
|
|
21
33
|
* step; it receives `to` instead of `href`.
|
|
22
34
|
* @param {string} [props.className]
|
|
23
35
|
*/
|
|
24
|
-
export default function AppStepper({ steps, variant, label, linkComponent: Link, className, ...rest }: {
|
|
36
|
+
export default function AppStepper({ steps, variant, orientation, activeStep, onStepClick, label, linkComponent: Link, className, ...rest }: {
|
|
25
37
|
steps: {
|
|
26
38
|
key?: string;
|
|
27
39
|
label: string;
|
|
28
|
-
|
|
40
|
+
description?: string;
|
|
41
|
+
status?: 'done' | 'active' | 'pending' | 'error';
|
|
29
42
|
href?: string;
|
|
43
|
+
icon?: string;
|
|
30
44
|
}[];
|
|
31
45
|
variant?: 'steps' | 'journey';
|
|
46
|
+
orientation?: 'horizontal' | 'vertical';
|
|
47
|
+
activeStep?: number;
|
|
48
|
+
onStepClick?: (step: object, index: number) => void;
|
|
32
49
|
label?: string;
|
|
33
50
|
linkComponent?: import('react').ElementType;
|
|
34
51
|
className?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import '@webority/ui-elements';
|
|
2
|
+
/**
|
|
3
|
+
* Free-text token entry field (emails, tags, keywords) over the shared `<wui-taginput>`
|
|
4
|
+
* custom element. Type text and press Enter/comma to add a chip; Backspace removes the last.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {string[]} [props.values] Current tag values.
|
|
8
|
+
* @param {(values: string[]) => void} [props.onChange]
|
|
9
|
+
* @param {string} [props.placeholder] Placeholder for the input field.
|
|
10
|
+
* @param {string} [props.name]
|
|
11
|
+
* @param {import('react').ReactNode} [props.label]
|
|
12
|
+
* @param {string} [props.error]
|
|
13
|
+
* @param {string} [props.hint]
|
|
14
|
+
* @param {boolean} [props.required]
|
|
15
|
+
* @param {'sm'|'lg'} [props.size] Control size around the default.
|
|
16
|
+
* @param {number} [props.maxTags] Maximum number of tags allowed.
|
|
17
|
+
* @param {boolean} [props.allowDuplicates=false] Allow case-sensitive duplicate values.
|
|
18
|
+
* @param {boolean} [props.disabled]
|
|
19
|
+
* @param {string} [props.id]
|
|
20
|
+
* @param {string} [props.ariaLabel] Accessible name for the input.
|
|
21
|
+
* @param {string} [props.className] Class to apply to the control element.
|
|
22
|
+
* @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
|
|
23
|
+
* @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
|
|
24
|
+
* @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
|
|
25
|
+
* @param {import('react').Ref} [ref]
|
|
26
|
+
*/
|
|
27
|
+
declare const AppTagInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
28
|
+
export default AppTagInput;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '@webority/ui-elements';
|
|
2
|
+
/**
|
|
3
|
+
* Thin React wrapper over the shared `<wui-timepicker>` element (single
|
|
4
|
+
* implementation, so React and Razor render the same control).
|
|
5
|
+
*
|
|
6
|
+
* Wraps it in the standard `.field` shell — label / required mark / hint /
|
|
7
|
+
* error — the same as `AppDatePicker` and every other field primitive.
|
|
8
|
+
* Without that a caller had to hand-roll the label, which is exactly the
|
|
9
|
+
* per-screen divergence this library exists to prevent. The shell is omitted
|
|
10
|
+
* entirely when there is nothing to render around the control.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} props
|
|
13
|
+
* @param {string} [props.value] Time string in "HH:mm" format (24-hour, wire format)
|
|
14
|
+
* @param {(value: string) => void} [props.onChange]
|
|
15
|
+
* @param {string} [props.label]
|
|
16
|
+
* @param {boolean} [props.required]
|
|
17
|
+
* @param {string} [props.hint]
|
|
18
|
+
* @param {string} [props.error]
|
|
19
|
+
* @param {string} [props.name]
|
|
20
|
+
* @param {string} [props.min] Time in "HH:mm" format
|
|
21
|
+
* @param {string} [props.max] Time in "HH:mm" format
|
|
22
|
+
* @param {number} [props.step=30] Step granularity in minutes
|
|
23
|
+
* @param {'12'|'24'} [props.format='24'] Display format — 12 or 24 hour (wire stays 24h)
|
|
24
|
+
* @param {string} [props.placeholder="Select time"]
|
|
25
|
+
* @param {boolean} [props.disabled]
|
|
26
|
+
* @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput
|
|
27
|
+
* @param {string} [props.id]
|
|
28
|
+
* @param {string} [props.ariaLabel]
|
|
29
|
+
* @param {string} [props.className]
|
|
30
|
+
* @param {import('react').Ref} [ref]
|
|
31
|
+
*/
|
|
32
|
+
declare const AppTimePicker: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
33
|
+
export default AppTimePicker;
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
* auto-dismiss, the ARIA live region, the slide/fade — comes from react-bootstrap's Toast, so
|
|
4
4
|
* there is no toast library and no bespoke stylesheet; the look is Bootstrap + the shared theme.
|
|
5
5
|
*
|
|
6
|
+
* Supports new toast options:
|
|
7
|
+
* - title: optional bold first line
|
|
8
|
+
* - duration: auto-dismiss delay in ms (0 = sticky/persistent; from toastStore, not this prop)
|
|
9
|
+
* - action: { label, onClick } renders an action button
|
|
10
|
+
*
|
|
6
11
|
* @param {object} props
|
|
7
12
|
* @param {'top-start'|'top-center'|'top-end'|'middle-center'|'bottom-start'|'bottom-center'|'bottom-end'} [props.position='bottom-end']
|
|
8
|
-
* @param {number} [props.autoDismiss=5000]
|
|
13
|
+
* @param {number} [props.autoDismiss=5000] Default auto-dismiss delay (legacy; overridden by individual toast.duration)
|
|
9
14
|
*/
|
|
10
15
|
export default function AppToastContainer({ position, autoDismiss }: {
|
|
11
16
|
position?: 'top-start' | 'top-center' | 'top-end' | 'middle-center' | 'bottom-start' | 'bottom-center' | 'bottom-end';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plain tooltip on any element (hover or focus to reveal). Distinct from AppInfoTip (a help
|
|
3
|
+
* "?" icon beside a label) and AppPopover (a click-opened panel). Wraps react-bootstrap's
|
|
4
|
+
* OverlayTrigger/Tooltip (Popper positioning); the Razor counterpart `<app-tooltip>` uses
|
|
5
|
+
* Bootstrap's own tooltip, so both surfaces stay in lockstep.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props
|
|
8
|
+
* @param {import('react').ReactNode} props.content The tooltip text or node (required).
|
|
9
|
+
* @param {import('react').ReactElement} props.children A single trigger element that forwards
|
|
10
|
+
* a ref (a DOM element, or a react-bootstrap-based App* like AppButton/ActionIcon). It
|
|
11
|
+
* renders as written; hovering or focusing it reveals the tooltip.
|
|
12
|
+
* @param {'top'|'bottom'|'start'|'end'} [props.placement='top'] Where the tooltip appears;
|
|
13
|
+
* prefers the given direction, flips if needed to stay in view.
|
|
14
|
+
* @param {string} [props.className] Class on the tooltip element.
|
|
15
|
+
*/
|
|
16
|
+
export default function AppTooltip({ content, children, placement, className, ...rest }: {
|
|
17
|
+
content: import('react').ReactNode;
|
|
18
|
+
children: import('react').ReactElement;
|
|
19
|
+
placement?: 'top' | 'bottom' | 'start' | 'end';
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export declare function toast(
|
|
1
|
+
export declare function toast(message: any, variantOrOptions?: string): void;
|
|
2
|
+
export declare namespace toast {
|
|
3
|
+
var promise: (promise: Promise<any>, messages: object, opts?: object) => Promise<any>;
|
|
4
|
+
}
|
|
2
5
|
/** Error toast — red. De-duped by message so the same backend error shows once, not stacked. */
|
|
3
|
-
export declare function errorToast(
|
|
6
|
+
export declare function errorToast(message: any, opts?: {}): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Subscribe to the active-toast list. Calls back immediately, and returns an unsubscribe fn. */
|
|
2
2
|
export declare function subscribeToasts(listener: any): () => boolean;
|
|
3
3
|
/**
|
|
4
|
-
* Raise a toast. De-duped by `variant:message` while one is still on screen,
|
|
5
|
-
*
|
|
4
|
+
* Raise a toast. De-duped by `variant:message` while one is still on screen, or by explicit `id`.
|
|
5
|
+
* When `opts.id` is provided, a toast with that id replaces any existing one (refresh/update).
|
|
6
6
|
*/
|
|
7
|
-
export declare function pushToast(message: any, variant: any): void;
|
|
7
|
+
export declare function pushToast(message: any, variant: any, opts?: {}): void;
|
|
8
8
|
/** Remove a toast — its auto-dismiss timer fired, or the user closed it. */
|
|
9
9
|
export declare function dismissToast(id: any): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { default as AppAlert } from './components/AppAlert.jsx';
|
|
|
4
4
|
export { default as AppAsyncBlock } from './components/AppAsyncBlock.jsx';
|
|
5
5
|
export { default as AppAutocomplete } from './components/AppAutocomplete.jsx';
|
|
6
6
|
export { default as AppAvatar } from './components/AppAvatar.jsx';
|
|
7
|
+
export { default as AppAvatarGroup } from './components/AppAvatarGroup.jsx';
|
|
7
8
|
export { default as AppBadge } from './components/AppBadge.jsx';
|
|
8
9
|
export { default as AppBanner } from './components/AppBanner.jsx';
|
|
9
10
|
export { default as AppBreadcrumbs } from './components/AppBreadcrumbs.jsx';
|
|
@@ -17,13 +18,18 @@ export { default as AppChoiceChip } from './components/AppChoiceChip.jsx';
|
|
|
17
18
|
export { default as AppColorField } from './components/AppColorField.jsx';
|
|
18
19
|
export { default as AppCompareTable } from './components/AppCompareTable.jsx';
|
|
19
20
|
export { default as AppConfirmDialog } from './components/AppConfirmDialog.jsx';
|
|
21
|
+
export { default as AppCopyButton } from './components/AppCopyButton.jsx';
|
|
20
22
|
export { default as AppDataTable } from './components/AppDataTable.jsx';
|
|
21
23
|
export { default as AppDatePicker } from './components/AppDatePicker.jsx';
|
|
22
24
|
export { default as AppDateRangePicker } from './components/AppDateRangePicker.jsx';
|
|
25
|
+
export { default as AppDescriptions } from './components/AppDescriptions.jsx';
|
|
23
26
|
export { default as AppDropdown } from './components/AppDropdown.jsx';
|
|
24
27
|
export { default as AppEmptyState } from './components/AppEmptyState.jsx';
|
|
25
28
|
export { default as AppFileAttachment } from './components/AppFileAttachment.jsx';
|
|
26
29
|
export { default as AppFilePicker } from './components/AppFilePicker.jsx';
|
|
30
|
+
export { default as AppFormActions } from './components/AppFormActions.jsx';
|
|
31
|
+
export { default as AppFormRow } from './components/AppFormRow.jsx';
|
|
32
|
+
export { default as AppFormSection } from './components/AppFormSection.jsx';
|
|
27
33
|
export { default as AppInfoList } from './components/AppInfoList.jsx';
|
|
28
34
|
export { default as AppInfoTip } from './components/AppInfoTip.jsx';
|
|
29
35
|
export { default as AppInput } from './components/AppInput.jsx';
|
|
@@ -32,8 +38,10 @@ export { default as AppLogoPicker } from './components/AppLogoPicker.jsx';
|
|
|
32
38
|
export { default as AppMeter } from './components/AppMeter.jsx';
|
|
33
39
|
export { default as AppModal } from './components/AppModal.jsx';
|
|
34
40
|
export { default as AppMultiSelect } from './components/AppMultiSelect.jsx';
|
|
41
|
+
export { default as AppNumberInput } from './components/AppNumberInput.jsx';
|
|
35
42
|
export { default as AppOtpInput } from './components/AppOtpInput.jsx';
|
|
36
43
|
export { default as AppPageHeader } from './components/AppPageHeader.jsx';
|
|
44
|
+
export { default as AppPagination } from './components/AppPagination.jsx';
|
|
37
45
|
export { default as AppPhoneNumberInput } from './components/AppPhoneNumberInput.jsx';
|
|
38
46
|
export { default as AppPopover } from './components/AppPopover.jsx';
|
|
39
47
|
export { default as AppPricingCard } from './components/AppPricingCard.jsx';
|
|
@@ -41,6 +49,7 @@ export { default as AppProgress } from './components/AppProgress.jsx';
|
|
|
41
49
|
export { default as AppRadio } from './components/AppRadio.jsx';
|
|
42
50
|
export { default as AppRepeater } from './components/AppRepeater.jsx';
|
|
43
51
|
export { default as AppResourceCard } from './components/AppResourceCard.jsx';
|
|
52
|
+
export { default as AppResult } from './components/AppResult.jsx';
|
|
44
53
|
export { default as AppScrollbar } from './components/AppScrollbar.jsx';
|
|
45
54
|
export { default as AppSearch } from './components/AppSearch.jsx';
|
|
46
55
|
export { default as AppSegmented } from './components/AppSegmented.jsx';
|
|
@@ -49,6 +58,7 @@ export { default as AppSelectMini } from './components/AppSelectMini.jsx';
|
|
|
49
58
|
export { default as AppShell } from './components/AppShell.jsx';
|
|
50
59
|
export { default as AppSidebarMenu } from './components/AppSidebarMenu.jsx';
|
|
51
60
|
export { AppSkeletonRows, default as AppSkeleton } from './components/AppSkeleton.jsx';
|
|
61
|
+
export { default as AppSlider } from './components/AppSlider.jsx';
|
|
52
62
|
export { default as AppSpinner } from './components/AppSpinner.jsx';
|
|
53
63
|
export { default as AppSplash } from './components/AppSplash.jsx';
|
|
54
64
|
export { default as AppStatusBadge } from './components/AppStatusBadge.jsx';
|
|
@@ -57,9 +67,12 @@ export { default as AppSwitch } from './components/AppSwitch.jsx';
|
|
|
57
67
|
export { default as AppTableEmptyState } from './components/AppTableEmptyState.jsx';
|
|
58
68
|
export { default as AppTablePagination } from './components/AppTablePagination.jsx';
|
|
59
69
|
export { default as AppTabs } from './components/AppTabs.jsx';
|
|
70
|
+
export { default as AppTagInput } from './components/AppTagInput.jsx';
|
|
60
71
|
export { default as AppTextarea } from './components/AppTextarea.jsx';
|
|
61
72
|
export { default as AppTimeline } from './components/AppTimeline.jsx';
|
|
73
|
+
export { default as AppTimePicker } from './components/AppTimePicker.jsx';
|
|
62
74
|
export { default as AppToastContainer } from './components/AppToastContainer.jsx';
|
|
75
|
+
export { default as AppTooltip } from './components/AppTooltip.jsx';
|
|
63
76
|
export { default as Icon, iconNames, registerIcons } from './components/Icon.jsx';
|
|
64
77
|
export { MODAL_ICONS } from './components/ModalIcons.jsx';
|
|
65
78
|
export { default as RequiredMark } from './components/RequiredMark.jsx';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact picked-file row — image thumbnail or file-type icon + name/size + inline remove.
|
|
3
|
+
* Internal: shared by AppFileAttachment and AppFilePicker so the two fields cannot drift.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {File|{ url?: string, name?: string }} props.item
|
|
7
|
+
* @param {boolean} props.isImage Whether to show a thumbnail (the caller owns the accept rules).
|
|
8
|
+
* @param {() => void} props.onRemove
|
|
9
|
+
* @param {string} [props.noun="attachment"] Fallback word in the remove button's label when the
|
|
10
|
+
* item has no name.
|
|
11
|
+
*/
|
|
12
|
+
export default function FileItemRow({ item, isImage, onRemove, noun }: {
|
|
13
|
+
item: File | {
|
|
14
|
+
url?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
isImage: boolean;
|
|
18
|
+
onRemove: () => void;
|
|
19
|
+
noun?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared file-item helpers for the two file fields (AppFileAttachment, AppFilePicker). Both
|
|
3
|
+
* render the same compact picked-file row over the same value shape — a freshly-picked `File`
|
|
4
|
+
* or an existing `{ url, name }` — so the key, name, size and blob-URL rules live once.
|
|
5
|
+
*/
|
|
6
|
+
/** Stable-ish key for an item: name+size for a File, url/name for an existing value. */
|
|
7
|
+
export declare function keyOf(item: any): any;
|
|
8
|
+
export declare function nameOf(item: any): any;
|
|
9
|
+
/** `123 KB` for a freshly-picked File; null for an existing attachment (size unknown). */
|
|
10
|
+
export declare function sizeLabelOf(item: any): string;
|
|
11
|
+
/**
|
|
12
|
+
* A freshly-picked File has no URL of its own; mint one (for images) and revoke it on
|
|
13
|
+
* change/unmount. An existing attachment already carries `url`. Non-images get no URL — the
|
|
14
|
+
* caller renders a file-type icon instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useItemUrl(item: any, isImage: any): any;
|