@cloudwick/astral-ui 7.0.1 → 8.1.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/README.md +3 -1
- package/dist/components/accordion/accordion.d.ts +5 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +5 -6
- package/dist/components/button/reloadButton.d.ts +20 -0
- package/dist/components/card/card.d.ts +7 -8
- package/dist/components/card/cardVariants.d.ts +3 -3
- package/dist/components/dropdown/dropdown.d.ts +17 -0
- package/dist/components/emptyState/emptyState.d.ts +1 -4
- package/dist/components/emptyState/emptyStateVariants.d.ts +3 -3
- package/dist/components/modal/modal.d.ts +6 -7
- package/dist/components/multiSelectTransfer/index.d.ts +3 -0
- package/dist/components/multiSelectTransfer/multiSelectTransfer.d.ts +7 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferDropdown.d.ts +50 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferModal.d.ts +46 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferPill.d.ts +28 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferTrigger.d.ts +26 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferVariants.d.ts +202 -0
- package/dist/components/multiSelectTransfer/types.d.ts +138 -0
- package/dist/components/multiSelectTransfer/useMultiSelectTransferDraft.d.ts +24 -0
- package/dist/components/multiSelectTransfer/useMultiSelectTransferOptionSource.d.ts +56 -0
- package/dist/components/panel/panel.d.ts +1 -2
- package/dist/components/radioGroup/index.d.ts +1 -1
- package/dist/components/radioGroup/radioGroup.d.ts +76 -12
- package/dist/components/radioGroup/radioGroupVariants.d.ts +30 -9
- package/dist/components/scrollbar/scrollbar.d.ts +7 -0
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/select.d.ts +7 -46
- package/dist/components/select/selectComponents.d.ts +29 -0
- package/dist/components/select/selectMenu.d.ts +12 -0
- package/dist/components/select/selectVariants.d.ts +21 -0
- package/dist/components/select/types.d.ts +252 -1
- package/dist/components/select/useSelectOptionSource.d.ts +39 -0
- package/dist/components/select/useSelectOutsideClose.d.ts +16 -0
- package/dist/components/select/utils.d.ts +3 -0
- package/dist/components/tabs/tabs.d.ts +4 -5
- package/dist/components/tabs/tabsVariants.d.ts +12 -0
- package/dist/components/tooltip/tooltip.d.ts +17 -6
- package/dist/components/tooltip/tooltipVariants.d.ts +6 -6
- package/dist/components/transferList/index.d.ts +3 -0
- package/dist/components/transferList/transferList.d.ts +9 -0
- package/dist/components/transferList/transferListItem.d.ts +35 -0
- package/dist/components/transferList/transferListPanel.d.ts +64 -0
- package/dist/components/transferList/transferListPanelHeader.d.ts +29 -0
- package/dist/components/transferList/transferListVariants.d.ts +211 -0
- package/dist/components/transferList/types.d.ts +152 -0
- package/dist/components/transferList/useDragAutoScroll.d.ts +13 -0
- package/dist/components/transferList/useTransferList.d.ts +28 -0
- package/dist/components/transferList/useTransferListPanelKeys.d.ts +28 -0
- package/dist/components/transferList/useTransferListSource.d.ts +49 -0
- package/dist/css/fonts.min.css +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/fonts/NotoSans-Bold.woff2 +0 -0
- package/dist/fonts/NotoSans-BoldItalic.woff2 +0 -0
- package/dist/fonts/NotoSans-Italic.woff2 +0 -0
- package/dist/fonts/NotoSans-Medium.woff2 +0 -0
- package/dist/fonts/NotoSans-MediumItalic.woff2 +0 -0
- package/dist/fonts/NotoSans-Regular.woff2 +0 -0
- package/dist/fonts/NotoSans-SemiBold.woff2 +0 -0
- package/dist/fonts/NotoSans-SemiBoldItalic.woff2 +0 -0
- package/dist/hooks/index.d.ts +10 -0
- package/dist/hooks/useAsyncOptions.d.ts +85 -0
- package/dist/hooks/useAsyncOptionsReducer.d.ts +75 -0
- package/dist/hooks/useAvailableProjection.d.ts +20 -0
- package/dist/hooks/useDebouncedCallback.d.ts +10 -0
- package/dist/hooks/useFilterQuery.d.ts +28 -0
- package/dist/hooks/useIgnoredPropWarning.d.ts +5 -0
- package/dist/hooks/useInfiniteScroll.d.ts +33 -0
- package/dist/hooks/useIsTruncated.d.ts +25 -0
- package/dist/hooks/useListboxKeyboardNav.d.ts +47 -0
- package/dist/hooks/useOnValueChange.d.ts +6 -0
- package/dist/hooks/usePrefetchBaseline.d.ts +22 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +5 -5
- package/dist/utils/devWarn.d.ts +5 -0
- package/dist/utils/elementUtils.d.ts +18 -0
- package/dist/utils/index.d.ts +7 -1
- package/dist/utils/matchesQuery.d.ts +13 -0
- package/dist/utils/mergeUnique.d.ts +6 -0
- package/dist/utils/resolveLoadErrors.d.ts +20 -0
- package/dist/utils/resolveReloadControls.d.ts +23 -0
- package/package.json +3 -3
- package/dist/fonts/Inter_18pt-Bold.ttf +0 -0
- package/dist/fonts/Inter_18pt-BoldItalic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Italic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Medium.ttf +0 -0
- package/dist/fonts/Inter_18pt-MediumItalic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Regular.ttf +0 -0
- package/dist/fonts/Inter_18pt-SemiBold.ttf +0 -0
- package/dist/fonts/Inter_18pt-SemiBoldItalic.ttf +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether a trigger node is already a natively-interactive,
|
|
4
|
+
* keyboard-focusable element (e.g. `<button>`, `<a>`, `<input>`).
|
|
5
|
+
*
|
|
6
|
+
* Only intrinsic HTML elements from the {@link semanticInteractiveElements}
|
|
7
|
+
* allowlist are treated as semantic. Custom React components are intentionally
|
|
8
|
+
* excluded: their rendered output cannot be introspected at runtime, so a
|
|
9
|
+
* component that renders a non-interactive element (such as an icon or `<span>`)
|
|
10
|
+
* would otherwise be stripped of its supplied interactivity/focus affordances
|
|
11
|
+
* and become keyboard-inaccessible. Excluded triggers fall back to being wrapped
|
|
12
|
+
* with the appropriate role/tabindex, which keeps them keyboard accessible.
|
|
13
|
+
*
|
|
14
|
+
* If you need a custom component to be treated as the interactive trigger, have
|
|
15
|
+
* it render one of the allowlisted native elements as its root and forward props
|
|
16
|
+
* and ref to it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const isSemanticTrigger: (ctaContent: React.ReactNode) => boolean;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export * from "./numberUtils";
|
|
2
2
|
export * from "./stringUtils";
|
|
3
3
|
export * from "./findParentAttribute";
|
|
4
|
-
export
|
|
4
|
+
export * from "./elementUtils";
|
|
5
|
+
export * from "./debounce";
|
|
6
|
+
export * from "./matchesQuery";
|
|
7
|
+
export * from "./mergeUnique";
|
|
8
|
+
export * from "./devWarn";
|
|
9
|
+
export * from "./resolveLoadErrors";
|
|
10
|
+
export * from "./resolveReloadControls";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Case-insensitive substring match used for the client-side search in TransferList,
|
|
4
|
+
* MultiSelectTransfer and Select. Match precedence: an explicit `searchValue` first (the way to
|
|
5
|
+
* make an item with a ReactNode `label` searchable by its visible text), then a string `label`,
|
|
6
|
+
* then the stringified `value`. An empty query matches everything. Kept internal (not re-exported
|
|
7
|
+
* from the package index).
|
|
8
|
+
*/
|
|
9
|
+
export declare function matchesQuery(item: {
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
value: unknown;
|
|
12
|
+
searchValue?: string;
|
|
13
|
+
}, query: string): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concatenates `sources` in order, keeping the first occurrence of each key and dropping anything in
|
|
3
|
+
* `excluded`. Iterating the sources directly rather than spreading them into one array matters here:
|
|
4
|
+
* the callers re-run this on every landed page, over the whole pool.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeUnique<TItem, TKey>(sources: readonly Iterable<TItem>[], getKey: (item: TItem) => TKey, excluded?: ReadonlySet<TKey>): TItem[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { TAsyncRequest } from "../hooks/useAsyncOptions";
|
|
3
|
+
interface IResolveLoadErrorsArgs {
|
|
4
|
+
/** `null` means no failure — the only thing that decides whether either slot is filled. */
|
|
5
|
+
errorKind: TAsyncRequest | null;
|
|
6
|
+
loadErrorMessage?: ReactNode;
|
|
7
|
+
loadMoreErrorMessage?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface IResolvedLoadErrors {
|
|
10
|
+
/** Set when the whole list failed. Mutually exclusive with `loadMoreError`. */
|
|
11
|
+
loadError?: ReactNode;
|
|
12
|
+
/** Set when a page append failed. The rows the user was reading stay on screen. */
|
|
13
|
+
loadMoreError?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Splits one failure into the two slots a surface renders. The `errorKind === "more"` branch is the
|
|
17
|
+
* line that keeps a failed page append from blanking a list the user was already reading.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveLoadErrors({ errorKind, loadErrorMessage, loadMoreErrorMessage }: IResolveLoadErrorsArgs): IResolvedLoadErrors;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface IResolveReloadControlsArgs {
|
|
2
|
+
isAsync: boolean;
|
|
3
|
+
/** The async source's own reload trio. */
|
|
4
|
+
source: {
|
|
5
|
+
errorKind: string | null;
|
|
6
|
+
isReloading: boolean;
|
|
7
|
+
reload: () => void;
|
|
8
|
+
};
|
|
9
|
+
/** Consumer overrides. Each wins outright — a consumer driving their own refresh keeps it. */
|
|
10
|
+
onReload?: () => void;
|
|
11
|
+
isReloading?: boolean;
|
|
12
|
+
showReloadButton?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface IResolvedReloadControls {
|
|
15
|
+
onReload?: () => void;
|
|
16
|
+
isReloading?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Decides whether the surface gets a reload affordance at all. Off by default so async mode doesn't
|
|
20
|
+
* grow UI nobody asked for, and auto-shown while an error is displayed — where it is the only retry.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveReloadControls({ isAsync, source, onReload, isReloading, showReloadButton }: IResolveReloadControlsArgs): IResolvedReloadControls;
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudwick/astral-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "UI Library for Cloudwick",
|
|
5
5
|
"homepage": "https://www.astral-ui.amorphic.link/",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@testing-library/jest-dom": "^6.4.8",
|
|
59
59
|
"@testing-library/react": "^16.0.1",
|
|
60
60
|
"@testing-library/user-event": "^13.2.1",
|
|
61
|
-
"@types/jest": "^
|
|
61
|
+
"@types/jest": "^29",
|
|
62
62
|
"@types/node": "^22.15.17",
|
|
63
63
|
"@types/postcss-url": "^10",
|
|
64
64
|
"@types/react": "^18.3.5",
|
|
@@ -162,4 +162,4 @@
|
|
|
162
162
|
},
|
|
163
163
|
"packageManager": "yarn@4.4.1",
|
|
164
164
|
"type": "module"
|
|
165
|
-
}
|
|
165
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|