@alulore/kumiko 0.17.3 → 0.18.2
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/avatar/avatar-name.d.ts +12 -0
- package/dist/avatar/avatar-name.js +42 -0
- package/dist/avatar/avatar.css +274 -0
- package/dist/avatar/avatar.d.ts +72 -0
- package/dist/avatar/avatar.js +45 -0
- package/dist/avatar/index.d.ts +3 -0
- package/dist/avatar/index.js +3 -0
- package/dist/board/board-api.d.ts +1 -0
- package/dist/board/board-selection.d.ts +1 -0
- package/dist/board/board-slots.d.ts +7 -0
- package/dist/board/board-slots.js +2 -1
- package/dist/board/refused-home.js +26 -1
- package/dist/dialog/dialog.css +7 -1
- package/dist/dialog/dialog.d.ts +9 -0
- package/dist/dialog/dialog.js +20 -0
- package/dist/dialog/index.d.ts +4 -3
- package/dist/dialog/index.js +4 -3
- package/dist/drawer/drawer.css +514 -0
- package/dist/drawer/drawer.d.ts +55 -0
- package/dist/drawer/drawer.js +43 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +2 -0
- package/dist/file-input/file-dropzone.d.ts +67 -0
- package/dist/file-input/file-dropzone.js +97 -0
- package/dist/file-input/file-input.css +505 -0
- package/dist/file-input/file-input.d.ts +29 -0
- package/dist/file-input/file-input.js +21 -0
- package/dist/file-input/file-preview.d.ts +15 -0
- package/dist/file-input/file-preview.js +41 -0
- package/dist/file-input/index.d.ts +4 -0
- package/dist/file-input/index.js +4 -0
- package/dist/hover-card/hover-card.js +2 -0
- package/dist/media-viewer/index.d.ts +1 -0
- package/dist/media-viewer/index.js +1 -0
- package/dist/media-viewer/labels.d.ts +27 -0
- package/dist/media-viewer/labels.js +23 -0
- package/dist/media-viewer/media-viewer.d.ts +3 -0
- package/dist/media-viewer/media-viewer.js +6 -3
- package/dist/media-viewer/video-controls.js +4 -2
- package/dist/media-viewer/viewer-chrome.js +11 -5
- package/dist/menu/menu.js +2 -0
- package/dist/motion/settle-close.d.ts +5 -0
- package/dist/motion/settle-close.js +78 -0
- package/dist/otp-input/index.d.ts +2 -0
- package/dist/otp-input/index.js +2 -0
- package/dist/otp-input/otp-input.css +336 -0
- package/dist/otp-input/otp-input.d.ts +56 -0
- package/dist/otp-input/otp-input.js +44 -0
- package/dist/popover/index.d.ts +2 -1
- package/dist/popover/index.js +2 -1
- package/dist/popover/popover.d.ts +3 -0
- package/dist/popover/popover.js +8 -0
- package/dist/server-render.test.d.ts +1 -0
- package/dist/server-render.test.js +57 -0
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/skeleton.css +143 -0
- package/dist/skeleton/skeleton.d.ts +44 -0
- package/dist/skeleton/skeleton.js +22 -0
- package/dist/smooth-caret/smooth-caret.css +4 -2
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/tabs.css +616 -0
- package/dist/tabs/tabs.d.ts +51 -0
- package/dist/tabs/tabs.js +20 -0
- package/dist/titlebar/index.d.ts +1 -1
- package/dist/titlebar/index.js +1 -1
- package/dist/titlebar/titlebar.d.ts +15 -2
- package/dist/titlebar/titlebar.js +18 -9
- package/dist/toast/index.d.ts +2 -1
- package/dist/toast/index.js +2 -1
- package/dist/tooltip/tooltip.js +2 -0
- package/package.json +59 -5
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** How a placeholder moves: a band of light sweeps across it, it fades between two tints, or it holds still. */
|
|
2
|
+
export type SkeletonAnimation = "shimmer" | "pulse" | "still";
|
|
3
|
+
/** A block, a circle (for an avatar), or a line of text. */
|
|
4
|
+
export type SkeletonShape = "rect" | "circle" | "text";
|
|
5
|
+
type Length = number | string;
|
|
6
|
+
export interface SkeletonProps extends Omit<React.ComponentProps<"span">, "children"> {
|
|
7
|
+
/** @defaultValue "rect" */
|
|
8
|
+
shape?: SkeletonShape;
|
|
9
|
+
/** A number is pixels; a string is any CSS length, like `"60%"` or `"12rem"`. */
|
|
10
|
+
width?: Length;
|
|
11
|
+
/** A number is pixels; a string is any CSS length. A circle takes its width when this is left out. */
|
|
12
|
+
height?: Length;
|
|
13
|
+
/**
|
|
14
|
+
* Without it, `data-kumiko-skeleton="pulse"` or `"still"` on any container picks. Reduced and still motion turn
|
|
15
|
+
* the shimmer into a slow pulse.
|
|
16
|
+
* @defaultValue "shimmer"
|
|
17
|
+
*/
|
|
18
|
+
animation?: SkeletonAnimation;
|
|
19
|
+
}
|
|
20
|
+
/** A placeholder in the shape of something still loading. Screen readers skip it; announce loading with `SkeletonGroup`. */
|
|
21
|
+
export declare function Skeleton({ shape, width, height, animation, style, ...props }: SkeletonProps): React.JSX.Element;
|
|
22
|
+
export interface SkeletonTextProps extends Omit<React.ComponentProps<"span">, "children"> {
|
|
23
|
+
/** @defaultValue 3 */
|
|
24
|
+
lines?: number;
|
|
25
|
+
/** How long the last line is, so the block reads as a paragraph. @defaultValue "60%" */
|
|
26
|
+
lastWidth?: Length;
|
|
27
|
+
animation?: SkeletonAnimation;
|
|
28
|
+
}
|
|
29
|
+
/** Lines of text still loading, each as tall as a line of the surrounding text, the last one shorter. */
|
|
30
|
+
export declare function SkeletonText({ lines, lastWidth, animation, ...props }: SkeletonTextProps): React.JSX.Element;
|
|
31
|
+
export interface SkeletonGroupProps extends React.ComponentProps<"div"> {
|
|
32
|
+
/**
|
|
33
|
+
* What screen readers hear while it loads.
|
|
34
|
+
* @defaultValue "Loading"
|
|
35
|
+
*/
|
|
36
|
+
label?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Holds the placeholders for one thing that is loading, and tells screen readers so: it is busy, and a status says
|
|
40
|
+
* `label`. Swap it for the content once it arrives. The status sits just outside the busy box, because screen
|
|
41
|
+
* readers hold back what a busy region says.
|
|
42
|
+
*/
|
|
43
|
+
export declare function SkeletonGroup({ label, children, ...props }: SkeletonGroupProps): React.JSX.Element;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
function length(value) {
|
|
3
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
4
|
+
}
|
|
5
|
+
/** A placeholder in the shape of something still loading. Screen readers skip it; announce loading with `SkeletonGroup`. */
|
|
6
|
+
export function Skeleton({ shape = "rect", width, height, animation, style, ...props }) {
|
|
7
|
+
const size = { inlineSize: length(width), blockSize: length(height) };
|
|
8
|
+
return (_jsx("span", { "aria-hidden": true, "data-slot": "skeleton", "data-shape": shape, "data-animation": animation, style: { ...size, ...style }, ...props }));
|
|
9
|
+
}
|
|
10
|
+
/** Lines of text still loading, each as tall as a line of the surrounding text, the last one shorter. */
|
|
11
|
+
export function SkeletonText({ lines = 3, lastWidth = "60%", animation, ...props }) {
|
|
12
|
+
const count = Math.max(1, Math.floor(lines));
|
|
13
|
+
return (_jsx("span", { "aria-hidden": true, "data-slot": "skeleton-text", ...props, children: Array.from({ length: count }, (_, line) => (_jsx(Skeleton, { shape: "text", animation: animation, width: line === count - 1 && count > 1 ? lastWidth : undefined }, line))) }));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Holds the placeholders for one thing that is loading, and tells screen readers so: it is busy, and a status says
|
|
17
|
+
* `label`. Swap it for the content once it arrives. The status sits just outside the busy box, because screen
|
|
18
|
+
* readers hold back what a busy region says.
|
|
19
|
+
*/
|
|
20
|
+
export function SkeletonGroup({ label = "Loading", children, ...props }) {
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { role: "status", "data-slot": "skeleton-status", children: label }), _jsx("div", { "aria-busy": "true", "data-slot": "skeleton-group", ...props, children: children })] }));
|
|
22
|
+
}
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
transform-origin: center;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
[data-slot="smooth-caret"][data-
|
|
54
|
+
[data-slot="smooth-caret"][data-visible="true"][data-idle="true"]
|
|
55
|
+
[data-slot="smooth-caret-bar"] {
|
|
55
56
|
animation: kumiko-smooth-caret-blink var(--kumiko-smooth-caret-blink-duration) ease-in-out
|
|
56
57
|
infinite;
|
|
57
58
|
}
|
|
@@ -145,7 +146,8 @@
|
|
|
145
146
|
transition: none;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
|
-
[data-slot="smooth-caret"][data-
|
|
149
|
+
[data-slot="smooth-caret"][data-visible="true"][data-idle="true"]
|
|
150
|
+
[data-slot="smooth-caret-bar"] {
|
|
149
151
|
animation: none;
|
|
150
152
|
}
|
|
151
153
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Tabs, TabsCount, TabsList, type TabsCountProps, type TabsGlide, type TabsListProps, type TabsLook, type TabsPanelMotion, type TabsProps, type TabsSize } from "./tabs";
|
|
2
|
+
export { createTabsController, TabsPanel, TabsTab, TabsTabIcon, type TabsApi, type TabsChangeOptions, type TabsController, type TabsDirection, type TabsOrientation, type TabsPanelState, type TabsState, type TabsTabState, type TabsValueChangeReason } from "@ui-sdk/react/tabs";
|