prime-ui-kit 0.9.1 → 0.9.3
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/README.md +30 -12
- package/dist/chunks/{chunk-NHOWNIAR.js → chunk-6JTZOA5I.js} +1472 -671
- package/dist/chunks/{chunk-DB2Y3XXA.js → chunk-OAE4IQX2.js} +2845 -1732
- package/dist/chunks/{chunk-KCQFOORX.js → chunk-U5SR2LZR.js} +17 -4
- package/dist/color-picker.js +2 -2
- package/dist/components/button/Button.d.ts +19 -2
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +1 -1
- package/dist/components/data-table/DataTable.d.ts +6 -1
- package/dist/components/data-table/Row.d.ts +3 -1
- package/dist/components/data-table/rows.d.ts +4 -0
- package/dist/components/data-table/types.d.ts +5 -0
- package/dist/components/digit-input/DigitInput.d.ts +6 -1
- package/dist/components/dnd/Dnd.d.ts +1 -1
- package/dist/components/dnd/dragSession.d.ts +9 -0
- package/dist/components/dnd/useDropTarget.d.ts +5 -0
- package/dist/components/dnd/useFlipList.d.ts +3 -3
- package/dist/components/drawer/Drawer.d.ts +8 -5
- package/dist/components/dropdown/Dropdown.d.ts +17 -0
- package/dist/components/index.d.ts +9 -2
- package/dist/components/input/Input.d.ts +16 -1
- package/dist/components/input/passwordStrength.d.ts +9 -0
- package/dist/components/kanban/Kanban.d.ts +129 -0
- package/dist/components/modal/Modal.d.ts +5 -2
- package/dist/components/page-toolbar/PageToolbar.d.ts +53 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +16 -1
- package/dist/components/segmented-control/SegmentedControl.d.ts +5 -2
- package/dist/components/sparkline/Sparkline.d.ts +26 -0
- package/dist/components/tabs/Tabs.d.ts +5 -2
- package/dist/hooks/useEdgeOverflow.d.ts +16 -0
- package/dist/hooks/useMediaQuery.d.ts +7 -0
- package/dist/hooks/useSwipeDismiss.d.ts +34 -0
- package/dist/icons/registry.d.ts +2 -0
- package/dist/index.css +2977 -1306
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -3
- package/dist/internal/CheckMark.d.ts +12 -0
- package/dist/internal/MorphText.d.ts +12 -0
- package/dist/internal/RollingNumber.d.ts +14 -0
- package/dist/internal/overlay/FloatingPanel.d.ts +3 -1
- package/dist/internal/overlay/useFloatingLayer.d.ts +11 -1
- package/dist/internal/surfaceDepth.d.ts +25 -0
- package/dist/internal/swatch.d.ts +4 -1
- package/dist/internal/touchTarget.d.ts +4 -0
- package/dist/layout/app-header/AppHeader.d.ts +110 -0
- package/dist/layout/app-shell/AppShell.d.ts +16 -11
- package/dist/layout/bottom-nav/BottomNav.d.ts +80 -0
- package/dist/layout/index.d.ts +5 -1
- package/dist/motion/celebrate.d.ts +18 -0
- package/dist/tokens/layers.d.ts +37 -0
- package/dist/tokens/naming.d.ts +1 -1
- package/dist/tokens/primitives.d.ts +4 -0
- package/dist/tokens/semantic.d.ts +122 -56
- package/dist/tokens/themes/dark.d.ts +10 -14
- package/package.json +3 -2
- package/src/components/accordion/COMPONENT.md +5 -5
- package/src/components/avatar/COMPONENT.md +1 -1
- package/src/components/badge/COMPONENT.md +2 -2
- package/src/components/banner/COMPONENT.md +1 -1
- package/src/components/button/COMPONENT.md +26 -5
- package/src/components/button/examples/download.tsx +45 -0
- package/src/components/button/examples/hold-to-confirm.tsx +23 -0
- package/src/components/button/examples/label-morph.tsx +33 -0
- package/src/components/card/COMPONENT.md +4 -2
- package/src/components/card/examples/narrow.tsx +2 -2
- package/src/components/card/examples/panel-chart.tsx +1 -1
- package/src/components/card/examples/variants.tsx +1 -1
- package/src/components/checkbox/examples/examples.module.css +5 -3
- package/src/components/code-block/COMPONENT.md +6 -6
- package/src/components/code-block/examples/overview.tsx +1 -1
- package/src/components/code-block/examples/variants.tsx +1 -1
- package/src/components/color-picker/COMPONENT.md +1 -1
- package/src/components/color-swatches/COMPONENT.md +5 -5
- package/src/components/command-menu/COMPONENT.md +1 -1
- package/src/components/crossfade/COMPONENT.md +1 -1
- package/src/components/crossfade/examples/overview.tsx +3 -3
- package/src/components/data-table/COMPONENT.md +24 -10
- package/src/components/data-table/examples/columns-visibility.tsx +167 -0
- package/src/components/digit-input/COMPONENT.md +15 -13
- package/src/components/digit-input/examples/examples.module.css +8 -0
- package/src/components/digit-input/examples/in-form.tsx +2 -5
- package/src/components/digit-input/examples/on-complete.tsx +7 -6
- package/src/components/digit-input/examples/sizes.tsx +1 -1
- package/src/components/divider/COMPONENT.md +1 -1
- package/src/components/dnd/COMPONENT.md +3 -3
- package/src/components/dnd/examples/examples.module.css +4 -4
- package/src/components/drawer/COMPONENT.md +17 -9
- package/src/components/drawer/examples/date-sheet.tsx +41 -0
- package/src/components/drawer/examples/examples.module.css +5 -0
- package/src/components/drawer/examples/placement.tsx +4 -2
- package/src/components/dropdown/COMPONENT.md +20 -6
- package/src/components/dropdown/examples/checkbox-items.tsx +48 -0
- package/src/components/dropdown/examples/examples.module.css +1 -1
- package/src/components/empty-page/COMPONENT.md +1 -1
- package/src/components/empty-page/examples/examples.module.css +1 -1
- package/src/components/example-frame/COMPONENT.md +1 -1
- package/src/components/input/COMPONENT.md +10 -1
- package/src/components/input/examples/password-strength.tsx +12 -0
- package/src/components/kanban/COMPONENT.md +181 -0
- package/src/components/kanban/examples/controlled.tsx +78 -0
- package/src/components/kanban/examples/examples.module.css +31 -0
- package/src/components/kanban/examples/limits.tsx +58 -0
- package/src/components/kanban/examples/narrow.tsx +76 -0
- package/src/components/kanban/examples/overview.tsx +130 -0
- package/src/components/kanban/examples/states.tsx +75 -0
- package/src/components/kanban/examples/structure.tsx +76 -0
- package/src/components/login-form/COMPONENT.md +5 -5
- package/src/components/login-form/examples/register.tsx +2 -2
- package/src/components/login-form/examples/reset-password.tsx +2 -2
- package/src/components/modal/COMPONENT.md +11 -8
- package/src/components/modal/examples/examples.module.css +2 -2
- package/src/components/notification/COMPONENT.md +2 -2
- package/src/components/page-content/COMPONENT.md +1 -1
- package/src/components/page-content/examples/examples.module.css +1 -1
- package/src/components/page-toolbar/COMPONENT.md +142 -0
- package/src/components/page-toolbar/examples/examples.module.css +16 -0
- package/src/components/page-toolbar/examples/narrow.tsx +103 -0
- package/src/components/page-toolbar/examples/overview.tsx +113 -0
- package/src/components/page-toolbar/examples/save-changes.tsx +40 -0
- package/src/components/page-toolbar/examples/without-search.tsx +60 -0
- package/src/components/popover/COMPONENT.md +5 -4
- package/src/components/progress-bar/COMPONENT.md +6 -2
- package/src/components/progress-bar/examples/examples.module.css +7 -0
- package/src/components/progress-bar/examples/milestone.tsx +43 -0
- package/src/components/progress-bar/examples/steps.tsx +35 -0
- package/src/components/progress-circle/COMPONENT.md +1 -1
- package/src/components/scroll-container/COMPONENT.md +1 -1
- package/src/components/segmented-control/COMPONENT.md +8 -8
- package/src/components/segmented-control/examples/full-width.tsx +1 -1
- package/src/components/select/COMPONENT.md +2 -1
- package/src/components/skeleton/COMPONENT.md +1 -1
- package/src/components/skeleton/examples/with-crossfade.tsx +3 -3
- package/src/components/smart-filter/COMPONENT.md +2 -0
- package/src/components/sparkline/COMPONENT.md +98 -0
- package/src/components/sparkline/examples/examples.module.css +13 -0
- package/src/components/sparkline/examples/overview.tsx +27 -0
- package/src/components/sparkline/examples/period.tsx +46 -0
- package/src/components/spinner/COMPONENT.md +1 -1
- package/src/components/tabs/COMPONENT.md +24 -22
- package/src/components/tabs/examples/closable.tsx +1 -1
- package/src/components/tabs/examples/examples.module.css +14 -0
- package/src/components/tabs/examples/orientation.tsx +87 -33
- package/src/components/tooltip/COMPONENT.md +8 -6
- package/src/components/tooltip/examples/examples.module.css +2 -2
- package/src/layout/app-header/COMPONENT.md +178 -0
- package/src/layout/app-header/examples/breadcrumbs.tsx +36 -0
- package/src/layout/app-header/examples/examples.module.css +47 -0
- package/src/layout/app-header/examples/in-app-shell.tsx +70 -0
- package/src/layout/app-header/examples/narrow.tsx +29 -0
- package/src/layout/app-header/examples/overview.tsx +36 -0
- package/src/layout/app-shell/COMPONENT.md +35 -29
- package/src/layout/app-shell/examples/examples.module.css +17 -2
- package/src/layout/app-shell/examples/footer.tsx +59 -0
- package/src/layout/app-shell/examples/overview.tsx +19 -8
- package/src/layout/bottom-nav/COMPONENT.md +153 -0
- package/src/layout/bottom-nav/examples/examples.module.css +39 -0
- package/src/layout/bottom-nav/examples/floating.tsx +89 -0
- package/src/layout/bottom-nav/examples/icon-only.tsx +41 -0
- package/src/layout/bottom-nav/examples/in-app-shell.tsx +64 -0
- package/src/layout/bottom-nav/examples/overview.tsx +44 -0
- package/src/layout/bottom-nav/examples/router.tsx +31 -0
- package/src/layout/bottom-nav/examples/structure.tsx +47 -0
- package/src/layout/sidebar/COMPONENT.md +14 -13
- package/src/layout/sidebar/examples/examples.module.css +5 -5
- package/src/styles/globals.css +125 -2
- package/src/styles/theme-dark.css +39 -13
- package/src/styles/theme-light.css +84 -16
- package/src/styles/tokens.css +2 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type DivProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
4
|
+
};
|
|
5
|
+
export type PageToolbarRootProps = DivProps;
|
|
6
|
+
/**
|
|
7
|
+
* The panel at the top of a page: sections, tools, view options and the primary action. It lays
|
|
8
|
+
* itself out from its own width — one row when wide, exactly two rows when narrow — so the slots
|
|
9
|
+
* keep fixed places at any width. Parts may be left out; the JSX order is the Tab order.
|
|
10
|
+
*/
|
|
11
|
+
declare function PageToolbarRoot({ className, children, ref, ...rest }: PageToolbarRootProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace PageToolbarRoot {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export type PageToolbarSectionsProps = DivProps;
|
|
16
|
+
/** Sections of the page — a `fullWidth` SegmentedControl; top row, stretches when narrow. */
|
|
17
|
+
declare function PageToolbarSections({ className, ...rest }: PageToolbarSectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare namespace PageToolbarSections {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export type PageToolbarToolsProps = DivProps;
|
|
22
|
+
/** Filter button and search (`SmartFilter.Toolbar`): takes the free space of its row. */
|
|
23
|
+
declare function PageToolbarTools({ className, ...rest }: PageToolbarToolsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare namespace PageToolbarTools {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export type PageToolbarViewProps = DivProps;
|
|
28
|
+
/** How the data is shown: period, table / cards, columns. Sized by content; alone in a row, its controls share the row. */
|
|
29
|
+
declare function PageToolbarView({ className, ...rest }: PageToolbarViewProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare namespace PageToolbarView {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export type PageToolbarActionsProps = DivProps;
|
|
34
|
+
/** The primary action of the page: the top row's end at every width, never wraps down. */
|
|
35
|
+
declare function PageToolbarActions({ className, ...rest }: PageToolbarActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare namespace PageToolbarActions {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
39
|
+
export type PageToolbarChipsProps = DivProps;
|
|
40
|
+
/** Active filters (`SmartFilter.Chips`) in their own row under the panel; the row disappears when empty. */
|
|
41
|
+
declare function PageToolbarChips({ className, ...rest }: PageToolbarChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare namespace PageToolbarChips {
|
|
43
|
+
var displayName: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const PageToolbar: {
|
|
46
|
+
Root: typeof PageToolbarRoot;
|
|
47
|
+
Sections: typeof PageToolbarSections;
|
|
48
|
+
Tools: typeof PageToolbarTools;
|
|
49
|
+
View: typeof PageToolbarView;
|
|
50
|
+
Actions: typeof PageToolbarActions;
|
|
51
|
+
Chips: typeof PageToolbarChips;
|
|
52
|
+
};
|
|
53
|
+
export {};
|
|
@@ -13,9 +13,24 @@ export type ProgressBarProps = Omit<React.HTMLAttributes<HTMLDivElement>, "child
|
|
|
13
13
|
/** Shows the rounded filled percentage at the end of the label row. */
|
|
14
14
|
showValue?: boolean;
|
|
15
15
|
ref?: React.Ref<HTMLDivElement>;
|
|
16
|
-
} &
|
|
16
|
+
} & ProgressBarModeProps;
|
|
17
|
+
/** Value mode may draw its scale as steps; segments already are parts. */
|
|
18
|
+
type ProgressBarModeProps = (Extract<ProgressModeProps, {
|
|
19
|
+
value: number;
|
|
20
|
+
}> & {
|
|
21
|
+
/**
|
|
22
|
+
* Draws the scale as `max` equal cells (2–12), each filled whole: a level out of a few
|
|
23
|
+
* (password strength, a step of onboarding). `value` rounds to a whole cell.
|
|
24
|
+
*/
|
|
25
|
+
steps?: boolean;
|
|
26
|
+
}) | (Extract<ProgressModeProps, {
|
|
27
|
+
segments: unknown;
|
|
28
|
+
}> & {
|
|
29
|
+
steps?: never;
|
|
30
|
+
});
|
|
17
31
|
/**
|
|
18
32
|
* A linear progress line: a single `value` (native `<progress>` for assistive tech) or
|
|
19
33
|
* `segments` — parts of a whole in one bar (`role="group"` named by the distribution).
|
|
20
34
|
*/
|
|
21
35
|
export declare function ProgressBar(props: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -6,7 +6,10 @@ export type SegmentedControlRootProps = Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
6
6
|
onValueChange?: (value: string) => void;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
size?: ControlSize;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Stretch to the container width. Single-line segments tend to equal widths but never get narrower
|
|
11
|
+
* than their label; when they do not fit, the row scrolls.
|
|
12
|
+
*/
|
|
10
13
|
fullWidth?: boolean;
|
|
11
14
|
ref?: React.Ref<HTMLDivElement>;
|
|
12
15
|
};
|
|
@@ -49,7 +52,7 @@ export type SegmentedControlLabelProps = {
|
|
|
49
52
|
className?: string;
|
|
50
53
|
ref?: React.Ref<HTMLSpanElement>;
|
|
51
54
|
} & Omit<React.HTMLAttributes<HTMLSpanElement>, "children">;
|
|
52
|
-
/** Segment title
|
|
55
|
+
/** Segment title on one line; never truncated. Plain text children are wrapped automatically. */
|
|
53
56
|
declare function SegmentedControlLabel({ children, className, ...rest }: SegmentedControlLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
54
57
|
declare namespace SegmentedControlLabel {
|
|
55
58
|
var displayName: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SparklinePoint = {
|
|
3
|
+
/** Name of the point on the axis: a date, a week, a month («8 окт»). */
|
|
4
|
+
label: string;
|
|
5
|
+
value: number;
|
|
6
|
+
};
|
|
7
|
+
export type SparklineLabels = {
|
|
8
|
+
/** Spoken value of the chosen point; `{label}` and `{value}` are replaced. */
|
|
9
|
+
point: string;
|
|
10
|
+
};
|
|
11
|
+
export type SparklineProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
12
|
+
/** Points in order, oldest first; at least two draw a line. */
|
|
13
|
+
data: SparklinePoint[];
|
|
14
|
+
/** Visible title above the value and the accessible name of the chart. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Display of a value («312 400 ₽»). Default: the number with Russian digit groups. */
|
|
17
|
+
formatValue?: (value: number) => string;
|
|
18
|
+
labels?: Partial<SparklineLabels>;
|
|
19
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A small line chart with its headline: the latest value, its change against the point before and
|
|
23
|
+
* its date. Scrubbing (pointer, touch, or the arrow keys on the chart) shows any point; the header
|
|
24
|
+
* follows instantly, the trend arrow turns, and leaving glides the cursor back to the latest point.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Sparkline({ data, label, formatValue, labels: labelsProp, className, ref, ...rest }: SparklineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,9 +14,12 @@ export type TabsRootProps = Omit<React.HTMLAttributes<HTMLDivElement>, "defaultV
|
|
|
14
14
|
size?: ControlSize;
|
|
15
15
|
/** Text and icon colour of the active tab. Default `neutral`: primary text, accent icon. */
|
|
16
16
|
tone?: "neutral" | "accent";
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Horizontal tabs fill the list and tend to equal widths, never narrower than their content.
|
|
19
|
+
* Default `true`; `false` sizes each tab to its content.
|
|
20
|
+
*/
|
|
18
21
|
fullWidth?: boolean;
|
|
19
|
-
/** Narrowest a horizontal tab with a label gets
|
|
22
|
+
/** Narrowest a horizontal tab with a label gets (px or a CSS length); never below its content. */
|
|
20
23
|
minItemWidth?: number | string;
|
|
21
24
|
/** Widest a horizontal tab gets (px or a CSS length); a longer label ends with an ellipsis. */
|
|
22
25
|
maxItemWidth?: number | string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type EdgeOverflow = {
|
|
3
|
+
start: boolean;
|
|
4
|
+
end: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Tracks whether a scroll region hides content before / after its visible part along one axis
|
|
8
|
+
* (`ScrollContainer` `fade`, the DataTable edge cue). Measured at most once per frame on scroll,
|
|
9
|
+
* on resize of the region or any child, and when children are added. RTL-aware: the start is the
|
|
10
|
+
* inline start of the region.
|
|
11
|
+
*
|
|
12
|
+
* It also writes how far the hidden content reaches on each side to the region itself
|
|
13
|
+
* (`--edge-start` / `--edge-end`, px), so a fade can be as deep as that distance at most: it grows
|
|
14
|
+
* as the region scrolls away from an edge and melts as it comes back, instead of switching.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useEdgeOverflow(ref: React.RefObject<HTMLElement | null>, enabled: boolean, horizontal: boolean): EdgeOverflow;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Viewport below the first breakpoint (foundation §9): overlays become bottom sheets. */
|
|
2
|
+
export declare const COMPACT_QUERY = "(max-width: 639px)";
|
|
3
|
+
/**
|
|
4
|
+
* Whether a media query matches, kept in sync with the viewport. `false` on the server, while
|
|
5
|
+
* `enabled` is off, and where `matchMedia` is missing.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useMediaQuery(query: string, enabled?: boolean): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** The direction a panel leaves in: toward the screen edge it came from. */
|
|
3
|
+
export type SwipeDirection = "down" | "left" | "right";
|
|
4
|
+
export type UseSwipeDismissOptions = {
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
direction: SwipeDirection;
|
|
7
|
+
onDismiss: () => void;
|
|
8
|
+
/** Selector of the zones a drag starts from by any pointer: the grab handle, the header. */
|
|
9
|
+
handle: string;
|
|
10
|
+
/**
|
|
11
|
+
* A touch drag may also start anywhere else in the panel (side drawers, whose content scrolls
|
|
12
|
+
* across the swipe axis). Mouse and pen drags start from `handle` only, so text stays selectable.
|
|
13
|
+
*/
|
|
14
|
+
touchAnywhere?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* How far out the panel is, 0 (at rest) … 1 (off its edge), on every move and on release (0 back,
|
|
17
|
+
* 1 out) — for parts that follow the drag, such as the scrim's opacity.
|
|
18
|
+
*/
|
|
19
|
+
onProgress?: (progress: number) => void;
|
|
20
|
+
};
|
|
21
|
+
/** The custom property the panel CSS maps onto its own axis (`transform`). */
|
|
22
|
+
export declare const SWIPE_OFFSET_VAR = "--swipe-offset";
|
|
23
|
+
/**
|
|
24
|
+
* Swipe-to-close for a panel at a screen edge (Drawer, a bottom sheet). Attach `onPointerDown` to
|
|
25
|
+
* the panel: a drag from `handle` (or, with `touchAnywhere`, any touch) along the closing axis moves
|
|
26
|
+
* the panel with the pointer through `--swipe-offset` and `data-swiping`, which its CSS maps onto
|
|
27
|
+
* `transform`. On release the panel closes past 30% of its size or on a flick — gliding the rest of
|
|
28
|
+
* the way out from the release point (`data-swipe-dismissed`) — otherwise it glides back;
|
|
29
|
+
* `onProgress` follows along. A drag across the axis is left to scrolling. The gesture is an extra
|
|
30
|
+
* way out: the panel keeps its close button and Escape (WCAG 2.5.7).
|
|
31
|
+
*/
|
|
32
|
+
export declare function useSwipeDismiss({ enabled, direction, onDismiss, handle, touchAnywhere, onProgress, }: UseSwipeDismissOptions): {
|
|
33
|
+
onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
|
|
34
|
+
};
|
package/dist/icons/registry.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export declare const iconRegistry: {
|
|
|
73
73
|
readonly "status.locked": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
74
74
|
readonly "status.offline": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
75
75
|
readonly "status.success": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
76
|
+
/** A rising trend; a falling one is the same arrow turned half a turn (it rotates between them). */
|
|
77
|
+
readonly "status.trendUp": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
76
78
|
readonly "status.warning": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
77
79
|
readonly "theme.dark": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
78
80
|
readonly "theme.light": import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|