@apliteni/apliteni-ui 0.77.0 → 0.79.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/guidelines/file-drop.md +87 -0
- package/package.json +1 -1
- package/react/README.md +114 -0
- package/react/dist/index.css +309 -2
- package/react/dist/index.d.ts +105 -1
- package/react/dist/index.js +920 -297
- package/src/index.css +1 -0
- package/src/inline.js +2 -0
- package/src/styles/file-drop.css +83 -0
- package/src/styles/tap-zone.css +42 -2
package/react/dist/index.d.ts
CHANGED
|
@@ -325,6 +325,69 @@ type DeniedProps = {
|
|
|
325
325
|
};
|
|
326
326
|
declare function Denied({ title, sub, need, icon, className, children, }: DeniedProps): react.JSX.Element;
|
|
327
327
|
|
|
328
|
+
/**
|
|
329
|
+
* `'month'` and `'range'` work in whole months, `'day'` and `'day-range'` in
|
|
330
|
+
* whole dates. The two range modes behave alike: a start, then an end, with the
|
|
331
|
+
* days or months between them shown as the span.
|
|
332
|
+
*/
|
|
333
|
+
type DatePickerMode = 'month' | 'range' | 'day' | 'day-range';
|
|
334
|
+
/** Either end may be null while the reader is still picking. */
|
|
335
|
+
type DatePickerRange = {
|
|
336
|
+
start: string | null;
|
|
337
|
+
end: string | null;
|
|
338
|
+
};
|
|
339
|
+
type DatePickerPreset = {
|
|
340
|
+
label: string;
|
|
341
|
+
range: DatePickerRange;
|
|
342
|
+
};
|
|
343
|
+
type DatePickerProps = {
|
|
344
|
+
mode?: DatePickerMode;
|
|
345
|
+
/** `'YYYY-MM'` in month mode, `'YYYY-MM-DD'` in day mode. Controlled. */
|
|
346
|
+
value?: string | null;
|
|
347
|
+
/** Where an uncontrolled picker starts. */
|
|
348
|
+
defaultValue?: string | null;
|
|
349
|
+
onChange?: (value: string | null) => void;
|
|
350
|
+
/** Range mode, controlled. */
|
|
351
|
+
range?: DatePickerRange;
|
|
352
|
+
defaultRange?: DatePickerRange;
|
|
353
|
+
/** Fires on each end, so a half-picked range is visible to the host too. */
|
|
354
|
+
onRangeChange?: (range: DatePickerRange) => void;
|
|
355
|
+
/** Bounds, inclusive, in the mode's own grain. */
|
|
356
|
+
min?: string;
|
|
357
|
+
max?: string;
|
|
358
|
+
/** Periods that cannot be picked, in the mode's own grain. */
|
|
359
|
+
disabledPeriods?: readonly string[];
|
|
360
|
+
/** Range mode: the shortcuts beside the grid. */
|
|
361
|
+
presets?: readonly DatePickerPreset[];
|
|
362
|
+
placeholder?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Names the trigger and the panel where the screen around them does not.
|
|
365
|
+
* With a value, the trigger's own text is already its name.
|
|
366
|
+
*/
|
|
367
|
+
ariaLabel?: string;
|
|
368
|
+
id?: string;
|
|
369
|
+
disabled?: boolean;
|
|
370
|
+
/** The edge the panel hugs. */
|
|
371
|
+
align?: 'start' | 'end';
|
|
372
|
+
/** Month and weekday names come from here. */
|
|
373
|
+
locale?: string;
|
|
374
|
+
/** 0 is Sunday. Day mode only. */
|
|
375
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
376
|
+
/** `'YYYY-MM-DD'`. Given one, the grid marks it; stories and tests pass it to stay fixed. */
|
|
377
|
+
today?: string;
|
|
378
|
+
/**
|
|
379
|
+
* Render the sheet rather than the popover whatever the viewport is. Left
|
|
380
|
+
* out, the picker follows the kit's narrowest step. A host that already knows
|
|
381
|
+
* it is on a phone — or renders on a server, where no viewport is readable —
|
|
382
|
+
* says so here.
|
|
383
|
+
*/
|
|
384
|
+
sheet?: boolean;
|
|
385
|
+
open?: boolean;
|
|
386
|
+
defaultOpen?: boolean;
|
|
387
|
+
onOpenChange?: (open: boolean) => void;
|
|
388
|
+
};
|
|
389
|
+
declare function DatePicker({ mode, value, defaultValue, onChange, range, defaultRange, onRangeChange, min, max, disabledPeriods, presets, placeholder, ariaLabel, id, disabled, align, locale, weekStartsOn, today, sheet, open: openProp, defaultOpen, onOpenChange, }: DatePickerProps): react.JSX.Element;
|
|
390
|
+
|
|
328
391
|
type DropdownBadge = string | {
|
|
329
392
|
text: string;
|
|
330
393
|
tone?: string;
|
|
@@ -607,6 +670,47 @@ type FileFieldProps = FieldMessage & Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
607
670
|
};
|
|
608
671
|
declare function FileField({ label, hint, error, required, disabled, onFileChange, className, ...props }: FileFieldProps): react.JSX.Element;
|
|
609
672
|
|
|
673
|
+
type FileDropStatus = 'uploading' | 'done' | 'error';
|
|
674
|
+
/** The file the consumer is uploading. */
|
|
675
|
+
type FileDropFile = {
|
|
676
|
+
name: string;
|
|
677
|
+
/** Already written for a reader; the kit picks no unit. */
|
|
678
|
+
size?: string;
|
|
679
|
+
/** Left out, the file is uploading: the kit never reports a success nobody claimed. */
|
|
680
|
+
status?: FileDropStatus;
|
|
681
|
+
/** 0 to 100. Left out, the word stands without a bar. */
|
|
682
|
+
progress?: number;
|
|
683
|
+
/** What this file did wrong, when the status is an error. */
|
|
684
|
+
error?: string;
|
|
685
|
+
/** Replaces the word the status carries. */
|
|
686
|
+
state?: string;
|
|
687
|
+
};
|
|
688
|
+
type FileDropProps = {
|
|
689
|
+
/** The button that opens the picker. */
|
|
690
|
+
label?: string;
|
|
691
|
+
/** The accepted types and the size limit, stated once beside the button. */
|
|
692
|
+
note?: string;
|
|
693
|
+
/** Filters the system picker only; the consumer still validates the file. */
|
|
694
|
+
accept?: string;
|
|
695
|
+
/** The words on the drop target. */
|
|
696
|
+
dropLabel?: string;
|
|
697
|
+
/** Names the icon-only remove button; it carries no visible word. */
|
|
698
|
+
removeLabel?: string;
|
|
699
|
+
retryLabel?: string;
|
|
700
|
+
/** The file the consumer is holding. Left out, the row is at rest. */
|
|
701
|
+
file?: FileDropFile | null;
|
|
702
|
+
/** Drives the target from a parent that owns the drag region. */
|
|
703
|
+
dragging?: boolean;
|
|
704
|
+
disabled?: boolean;
|
|
705
|
+
onFile?: (file: File) => void;
|
|
706
|
+
onRemove?: () => void;
|
|
707
|
+
onRetry?: () => void;
|
|
708
|
+
/** What the region accepts the file for; the target covers it while dragging. */
|
|
709
|
+
children?: ReactNode;
|
|
710
|
+
className?: string;
|
|
711
|
+
};
|
|
712
|
+
declare function FileDrop({ label, note, accept, dropLabel, removeLabel, retryLabel, file, dragging, disabled, onFile, onRemove, onRetry, children, className, }: FileDropProps): react.JSX.Element;
|
|
713
|
+
|
|
610
714
|
type SearchFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'aria-label'> & {
|
|
611
715
|
/** The control's name. A toolbar search box shows no label, so this is the
|
|
612
716
|
only name it has. */
|
|
@@ -827,4 +931,4 @@ declare const SidebarNav: react.ForwardRefExoticComponent<Omit<Omit<react.Detail
|
|
|
827
931
|
declare const PAGE_SIZES: readonly number[];
|
|
828
932
|
declare const DEFAULT_PAGE_SIZE: number;
|
|
829
933
|
|
|
830
|
-
export { AppShell, type AppShellProps, type AppShellSection, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonLinkProps, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, Checkbox, type CheckboxProps, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, Field, type FieldControlProps, type FieldProps, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, type NativeButtonProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, SearchField, type SearchFieldProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, SidebarNav, type SidebarNavBadge, type SidebarNavItem, type SidebarNavLeaf, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, Success, SuccessCheck, type SuccessCheckProps, type SuccessCountdown, SuccessPanel, type SuccessPanelProps, type SuccessProps, Switch, type SwitchProps, THEME_INIT_SCRIPT, type TabItem, type TableSort, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineEvent, type TimelineEventKind, type TimelineProps, Toast, type ToastNotice, type ToastProps, Tooltip, type TooltipProps, sortTableRows, useToast };
|
|
934
|
+
export { AppShell, type AppShellProps, type AppShellSection, BackLink, type BackLinkOwnProps, type BackLinkProps, Badge, BusyRegion, type BusyRegionProps, Button, type ButtonLinkProps, type ButtonProps, Callout, type CalloutProps, type CalloutVariant, Card, Checkbox, type CheckboxProps, type Column, type CommandGroup, type CommandItem, CommandPalette, type CommandPaletteProps, Confirm, type ConfirmProps, DEFAULT_PAGE_SIZE, DataTable, type DataTableProps, DatePicker, type DatePickerMode, type DatePickerPreset, type DatePickerProps, type DatePickerRange, DeltaValue, type DeltaValueProps, Denied, type DeniedProps, Drawer, type DrawerProps, DrawerSection, type DrawerSectionProps, Dropdown, type DropdownBadge, type DropdownEntry, type DropdownItem, type DropdownProps, type DropdownRowProps, type DropdownSearch, type DropdownSection, type DropdownSeparator, EmptyState, type EmptyStateProps, type EmptyStateVariant, Field, type FieldControlProps, type FieldProps, FileDrop, type FileDropFile, type FileDropProps, type FileDropStatus, FileField, type FileFieldProps, type Filter, FilterBar, type FilterBarProps, Icon, KeyValueList, type KeyValueListProps, type KeyValueRow, Modal, type ModalProps, type NativeButtonProps, NumericValue, type NumericValueProps, PAGE_SIZES, Pagination, type PaginationProps, Pill, type PillProps, RowIdentity, type RowIdentityProps, SearchField, type SearchFieldProps, type SegmentOption, Segmented, type SegmentedProps, SelectField, type SelectFieldProps, SidebarNav, type SidebarNavBadge, type SidebarNavItem, type SidebarNavLeaf, type SidebarNavProps, type SidebarNavSection, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, Snippet, type SnippetProps, StatBand, type StatBandProps, type StatDelta, type StatFigure, type StatTone, type StatVariant, StatusDot, type StatusDotProps, Success, SuccessCheck, type SuccessCheckProps, type SuccessCountdown, SuccessPanel, type SuccessPanelProps, type SuccessProps, Switch, type SwitchProps, THEME_INIT_SCRIPT, type TabItem, type TableSort, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, ThemeToggle, type ThemeToggleProps, Timeline, type TimelineEvent, type TimelineEventKind, type TimelineProps, Toast, type ToastNotice, type ToastProps, Tooltip, type TooltipProps, sortTableRows, useToast };
|