@coolms/ui-react 0.1.0-alpha.2 → 0.1.0-alpha.21
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/CHANGELOG.md +222 -4
- package/design-tokens.lock.json +30 -6
- package/dist/components/Call.d.ts +71 -0
- package/dist/components/Collections.d.ts +14 -5
- package/dist/components/Dialogs.d.ts +11 -3
- package/dist/components/Fields.d.ts +48 -4
- package/dist/components/FilePicker.d.ts +83 -0
- package/dist/components/FileViewer.d.ts +106 -0
- package/dist/components/Icon.d.ts +29 -0
- package/dist/components/Notification.d.ts +38 -0
- package/dist/components/PaneToolbar.d.ts +57 -0
- package/dist/components/ScreenShell.d.ts +71 -0
- package/dist/components/SignIn.d.ts +46 -0
- package/dist/components/State.d.ts +31 -0
- package/dist/components/Status.d.ts +6 -2
- package/dist/components/Structure.d.ts +24 -4
- package/dist/components/Workspace.d.ts +185 -0
- package/dist/components/internal.d.ts +2 -0
- package/dist/components/pull.d.ts +21 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +1889 -374
- package/kit.contract.json +9 -3
- package/package.json +9 -6
- package/src/fonts/OFL.txt +92 -0
- package/src/fonts/inter-cyrillic.woff2 +0 -0
- package/src/fonts/inter-latin-ext.woff2 +0 -0
- package/src/fonts/inter-latin.woff2 +0 -0
- package/src/fonts/inter.css +27 -0
- package/src/kit.css +485 -6
- package/src/tokens/coolms-tokens.css +95 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
/** How far down a pull has to go before letting go refreshes, in px (contract screen-shell, pull). */
|
|
3
|
+
export declare const PULL_AT = 64;
|
|
4
|
+
/**
|
|
5
|
+
* Pull to refresh on a scroll region at its top: a touch dragged down from the very top shows how far it has gone (up
|
|
6
|
+
* to half again the threshold) and, let go past the threshold, calls `onPull`. A drag that starts lower, in the region or
|
|
7
|
+
* in a list scrolling inside it, or goes up, is that scroll's own. Returns how far it is pulled now, 0 at rest.
|
|
8
|
+
*/
|
|
9
|
+
export declare function usePull(region: RefObject<HTMLElement | null>, onPull: (() => void) | null): number;
|
|
10
|
+
/** The content's pull, as the shell has it: a list inside draws it as its `pulled` state. */
|
|
11
|
+
export interface PullState {
|
|
12
|
+
/** How far it is pulled now, in px; 0 at rest. */
|
|
13
|
+
readonly distance: number;
|
|
14
|
+
/** The refresh it started is under way. */
|
|
15
|
+
readonly refreshing: boolean;
|
|
16
|
+
/** What the pull says while pulled: the time of the last sync. */
|
|
17
|
+
readonly text: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const PullContext: import("react").Context<PullState | null>;
|
|
20
|
+
/** The pull of the screen around a list, or null outside a screen that takes one. */
|
|
21
|
+
export declare function usePullState(): PullState | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
export { Button, type ButtonProps } from './components/Button';
|
|
2
|
-
export { TextField, Select, Toggle, type TextFieldProps, type SelectProps, type SelectOption, type ToggleProps } from './components/Fields';
|
|
2
|
+
export { TextField, TextArea, Select, Toggle, writtenOut, type TextFieldProps, type TextFieldType, type TextAreaProps, type SelectProps, type SelectOption, type ToggleProps } from './components/Fields';
|
|
3
3
|
export { Modal, ConfirmDialog, MODAL_CLOSE_MS, type ModalProps, type ConfirmDialogProps } from './components/Dialogs';
|
|
4
4
|
export { Toast, ToastRegion, Loading, EmptyState, ErrorBanner, type ToastProps, type LoadingProps, type EmptyStateProps, type ErrorBannerProps } from './components/Status';
|
|
5
|
-
export {
|
|
5
|
+
export { State, STATE_DELAY_MS, type StateKind, type StatePlacement, type StateProps } from './components/State';
|
|
6
|
+
export { FileViewer, type FileViewerAction, type FileViewerConflict, type FileViewerEditing, type FileViewerProps, type FileViewerSiblings, type FileViewerState } from './components/FileViewer';
|
|
7
|
+
export { FilePicker, FilePickerDenied, type FilePickerBudget, type FilePickerChoice, type FilePickerEntry, type FilePickerLabels, type FilePickerPage, type FilePickerProps, type FilePickerSpace } from './components/FilePicker';
|
|
8
|
+
export { PageHeader, TabStrip, Avatar, initialsOf, tintOf, type PageHeaderProps, type Tab, type TabStripProps, type AvatarProps, type AvatarPresence, type AvatarConnection } from './components/Structure';
|
|
9
|
+
export { Icon, ICON_NAMES, BOOTSTRAP_ICONS, NamedIcon, iconForName, type IconName, type IconProps } from './components/Icon';
|
|
10
|
+
export { AppShell, Badge, SearchField, FilterChips, SplitPanes, fitPanes, MailRow, ChatBubble, Composer, MAIL_ROW_LABELS, type MailRowLabels, type AppShellProps, type RailItem, type BadgeProps, type SearchFieldProps, type FilterChipsProps, type FilterOption, type SplitPanesProps, type PaneSize, type Pane, type MailRowProps, type ChatBubbleProps, type ComposerProps } from './components/Workspace';
|
|
11
|
+
export { IncomingCall, CallPanel, CallBar, CALL_LABELS, type CallLabels, type IncomingCallProps, type CallPanelProps, type CallBarProps } from './components/Call';
|
|
12
|
+
export { SignInLayout, SignInForm, SIGN_IN_LABELS, type SignInLabels, type SignInLayoutProps, type SignInFormProps, type SignInFeature } from './components/SignIn';
|
|
6
13
|
export { List, ContextMenu, type ListRow, type ListProps, type MenuItem, type ContextMenuProps } from './components/Collections';
|
|
14
|
+
export { PaneToolbar, type PaneToolbarAction, type PaneToolbarProps } from './components/PaneToolbar';
|
|
15
|
+
export { Notification, type NotificationAction, type NotificationProps } from './components/Notification';
|
|
7
16
|
export { offerFor, isCapability, type Capability, type Offer, type OfferOptions } from './server/capability';
|
|
8
17
|
export { readRefusal, refusalText, type Refusal } from './server/refusal';
|
|
9
18
|
export { useReread, rereadAll, type Reread } from './server/reread';
|
|
10
19
|
export { readConflict, type Conflict } from './server/conflict';
|
|
11
20
|
export { needsClientUpdate, versionBelow, CLIENT_UPDATE_REQUIRED } from './server/client-update';
|
|
21
|
+
export { ScreenShell, type ScreenShellProps, type ScreenPrimary } from './components/ScreenShell';
|
|
22
|
+
export { PULL_AT, usePull, usePullState, type PullState } from './components/pull';
|