@jini-ai/ui-kit 0.7.2 → 0.7.3-next.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/CHANGELOG.md +1 -1
- package/dist/attrs.d.ts +0 -13
- package/dist/attrs.js +1 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/react/Kit.hooks.js +2 -2
- package/dist/react/KitProvider.d.ts +10 -5
- package/dist/react/KitProvider.js +21 -6
- package/dist/react/SecretInput.d.ts +4 -2
- package/dist/react/SecretInput.js +3 -3
- package/dist/react/agent-attrs.hooks.js +1 -1
- package/dist/react/confirm/ConfirmDialog.d.ts +4 -1
- package/dist/react/confirm/ConfirmDialog.hooks.js +3 -1
- package/dist/react/confirm/ConfirmDialog.js +2 -2
- package/dist/react/context.d.ts +8 -0
- package/dist/react/context.js +2 -3
- package/dist/react/native/Controls.d.ts +34 -11
- package/dist/react/native/Controls.hooks.js +1 -1
- package/dist/react/native/Controls.js +22 -22
- package/dist/react/native/Dialog.d.ts +20 -2
- package/dist/react/native/Dialog.hooks.d.ts +3 -1
- package/dist/react/native/Dialog.js +10 -6
- package/dist/react/native/Navigation.d.ts +10 -3
- package/dist/react/native/Navigation.js +6 -6
- package/dist/react/testing/driver.js +4 -1
- package/dist/react/types.d.ts +3 -0
- package/package.json +5 -2
- package/dist/kit.spec.d.ts +0 -491
- package/dist/kit.spec.js +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
### Patch Changes
|
|
54
54
|
|
|
55
|
-
-
|
|
55
|
+
- Host clean-up release (2026-10-08): code the first host moved into Jini, plus the Jini clean-up (see the commit log since 0.1.1).
|
|
56
56
|
|
|
57
57
|
## 0.1.1 — 2026-10-05
|
|
58
58
|
|
package/dist/attrs.d.ts
CHANGED
|
@@ -15,17 +15,4 @@ export type AgentAttrsPort = (required: {
|
|
|
15
15
|
role?: AgentSpec['role'];
|
|
16
16
|
label?: string;
|
|
17
17
|
}) => KitAttrs;
|
|
18
|
-
/**
|
|
19
|
-
* Keeps ordinary control props while excluding agent addressing from a semantic secret, including
|
|
20
|
-
* after reveal changes its native input type. Caller metadata cannot override the private marker.
|
|
21
|
-
* @param required.attrs - Input or reveal-control props; never mutated.
|
|
22
|
-
* @returns A fresh props object with only the enforced agent privacy marker.
|
|
23
|
-
* @complexity O(n) time and space in the number of supplied props; no I/O or effects.
|
|
24
|
-
* @overallScore 100
|
|
25
|
-
*/
|
|
26
|
-
export declare function secretControlAttrs<T extends object>({ attrs }: {
|
|
27
|
-
attrs: T;
|
|
28
|
-
}, _optional?: Record<string, never>): Omit<T, `data-agent-${string}`> & {
|
|
29
|
-
'data-agent-private': '';
|
|
30
|
-
};
|
|
31
18
|
//# sourceMappingURL=attrs.d.ts.map
|
package/dist/attrs.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Keeps ordinary control props while excluding agent addressing from a semantic secret, including
|
|
3
|
-
* after reveal changes its native input type. Caller metadata cannot override the private marker.
|
|
4
|
-
* @param required.attrs - Input or reveal-control props; never mutated.
|
|
5
|
-
* @returns A fresh props object with only the enforced agent privacy marker.
|
|
6
|
-
* @complexity O(n) time and space in the number of supplied props; no I/O or effects.
|
|
7
|
-
* @overallScore 100
|
|
8
|
-
*/
|
|
9
|
-
export function secretControlAttrs({ attrs }, _optional = {}) {
|
|
10
|
-
const ordinary = Object.entries(attrs).filter(([name]) => !name.toLowerCase().startsWith('data-agent-'));
|
|
11
|
-
return { ...Object.fromEntries(ordinary), 'data-agent-private': '' };
|
|
12
|
-
}
|
|
1
|
+
export {};
|
|
13
2
|
//# sourceMappingURL=attrs.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { KIT_CONTRACT, kitSpec, kitParts, implementedComponents } from './kit-contract.js';
|
|
2
2
|
export type { KitComponentName, ImplementedComponentName, KitPart } from './kit-contract.js';
|
|
3
3
|
export type { KitAttrs, AgentSpec, AgentAttrsPort } from './attrs.js';
|
|
4
|
-
export { secretControlAttrs } from './attrs.js';
|
|
5
4
|
export { needs, assertKitContract, KitConfigError } from './needs.js';
|
|
6
5
|
export type { KitNeeds } from './needs.js';
|
|
7
6
|
export { planConfirm, createConfirmController } from './confirm.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { KIT_CONTRACT, kitSpec, kitParts, implementedComponents } from './kit-contract.js';
|
|
2
|
-
export { secretControlAttrs } from './attrs.js';
|
|
3
2
|
export { needs, assertKitContract, KitConfigError } from './needs.js';
|
|
4
3
|
export { planConfirm, createConfirmController } from './confirm.js';
|
|
5
4
|
export { createToastService } from './toast.js';
|
package/dist/react/Kit.hooks.js
CHANGED
|
@@ -37,8 +37,8 @@ export function useKitProvider(required, _optional = {}) {
|
|
|
37
37
|
toast.dispose({}); });
|
|
38
38
|
};
|
|
39
39
|
}, [toast, required.toast]);
|
|
40
|
-
return useMemo(() => ({ kit, overlayContainer, toast, agent: required.agent,
|
|
41
|
-
cancelLabel: required.cancelLabel ?? 'Cancel', guard: required.guard ?? kit.guard }), [kit, overlayContainer, toast, required.agent, required.cancelLabel, required.guard]);
|
|
40
|
+
return useMemo(() => ({ kit, overlayContainer, toast, agent: required.agent, report: required.report,
|
|
41
|
+
cancelLabel: required.cancelLabel ?? 'Cancel', guard: required.guard ?? kit.guard }), [kit, overlayContainer, toast, required.agent, required.cancelLabel, required.guard, required.report]);
|
|
42
42
|
}
|
|
43
43
|
function useOverlayRoot(required) {
|
|
44
44
|
const [root, setRoot] = useState(required.supplied ?? null);
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import type { KitProviderProps, ToastProps } from './types.js';
|
|
3
3
|
import type { ToastService } from '../toast.js';
|
|
4
|
-
|
|
4
|
+
import { useKitProvider, useToastRegion } from './Kit.hooks.js';
|
|
5
|
+
export declare function KitProvider({ useKitProviderHook, ...props }: KitProviderProps & {
|
|
6
|
+
useKitProviderHook?: typeof useKitProvider;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
5
8
|
export declare function Overlay(props: {
|
|
6
9
|
children: ReactNode;
|
|
7
10
|
container: HTMLElement | null;
|
|
8
|
-
}
|
|
9
|
-
export declare function ToastRegion(props: {
|
|
11
|
+
}): ReactNode;
|
|
12
|
+
export declare function ToastRegion({ useToastRegionHook, ...props }: {
|
|
10
13
|
service?: ToastService;
|
|
11
14
|
attrs?: ToastProps['attrs'];
|
|
12
|
-
}
|
|
15
|
+
} & {
|
|
16
|
+
useToastRegionHook?: typeof useToastRegion;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
13
18
|
//# sourceMappingURL=KitProvider.d.ts.map
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { createConsoleLogger } from '@jini-ai/core/primitives';
|
|
2
4
|
import { Toast } from './facade.js';
|
|
3
|
-
import { KitContext } from './context.js';
|
|
5
|
+
import { KitContext, sharedKitContextState, isDevelopment } from './context.js';
|
|
4
6
|
import { useKitProvider, useToastRegion, renderOverlay } from './Kit.hooks.js';
|
|
5
|
-
export function KitProvider(
|
|
6
|
-
const value =
|
|
7
|
+
export function KitProvider({ useKitProviderHook = useKitProvider, ...props }) {
|
|
8
|
+
const value = useKitProviderHook(props);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!isDevelopment({}))
|
|
11
|
+
return;
|
|
12
|
+
const versions = [...sharedKitContextState.versions];
|
|
13
|
+
const reported = sharedKitContextState.reportedVersions ??= new Set();
|
|
14
|
+
for (const version of versions.slice(1)) {
|
|
15
|
+
if (reported.has(version))
|
|
16
|
+
continue;
|
|
17
|
+
reported.add(version);
|
|
18
|
+
const logger = value.report ?? createConsoleLogger({ prefix: '@jini-ai/ui-kit' });
|
|
19
|
+
logger.warn({ message: 'Version skew detected; sharing contract-major 1 context.' }, { meta: { versions } });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
7
22
|
return _jsx(KitContext.Provider, { value: value, children: props.children });
|
|
8
23
|
}
|
|
9
|
-
export function Overlay(props
|
|
24
|
+
export function Overlay(props) {
|
|
10
25
|
return renderOverlay(props);
|
|
11
26
|
}
|
|
12
|
-
export function ToastRegion(
|
|
13
|
-
const vm =
|
|
27
|
+
export function ToastRegion({ useToastRegionHook = useToastRegion, ...props }) {
|
|
28
|
+
const vm = useToastRegionHook(props);
|
|
14
29
|
return _jsx(Overlay, { container: vm.container, children: _jsx("div", { ...vm.attrs, "aria-live": "polite", "aria-relevant": "additions removals", children: vm.messages.map(message => _jsx(Toast, { message: message.message, ...(message.tone ? { tone: message.tone } : {}), onDismiss: () => vm.service.dismiss({ id: message.id }) }, message.id)) }) });
|
|
15
30
|
}
|
|
16
31
|
//# sourceMappingURL=KitProvider.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputHTMLAttributes } from 'react';
|
|
2
|
-
import { type SecretRevealOptional } from './secret-reveal.hooks.js';
|
|
2
|
+
import { useSecretReveal, type SecretRevealOptional } from './secret-reveal.hooks.js';
|
|
3
3
|
export interface SecretInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>, SecretRevealOptional {
|
|
4
4
|
readonly label: string;
|
|
5
5
|
readonly toggleLabels?: {
|
|
@@ -11,5 +11,7 @@ export interface SecretInputProps extends Omit<InputHTMLAttributes<HTMLInputElem
|
|
|
11
11
|
/** Masked native input with controlled or local reveal state. Keep its toggle outside a label:
|
|
12
12
|
* the toggle's name must never join the input's accessible name. Hosts own styling and copy.
|
|
13
13
|
* @complexity O(1). */
|
|
14
|
-
export declare const SecretInput: import("react").ForwardRefExoticComponent<SecretInputProps &
|
|
14
|
+
export declare const SecretInput: import("react").ForwardRefExoticComponent<SecretInputProps & {
|
|
15
|
+
useSecretRevealHook?: typeof useSecretReveal;
|
|
16
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
17
|
//# sourceMappingURL=SecretInput.d.ts.map
|
|
@@ -2,14 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useSecretReveal } from './secret-reveal.hooks.js';
|
|
4
4
|
import { eyeIcon } from './native/Controls.hooks.js';
|
|
5
|
-
import { secretControlAttrs } from '
|
|
5
|
+
import { secretControlAttrs } from '@jini-ai/core/agent-handles';
|
|
6
6
|
/** Masked native input with controlled or local reveal state. Keep its toggle outside a label:
|
|
7
7
|
* the toggle's name must never join the input's accessible name. Hosts own styling and copy.
|
|
8
8
|
* @complexity O(1). */
|
|
9
|
-
export const SecretInput = forwardRef(function SecretInput(props, ref) {
|
|
9
|
+
export const SecretInput = forwardRef(function SecretInput({ useSecretRevealHook = useSecretReveal, ...props }, ref) {
|
|
10
10
|
// The toggle props are pulled off so they never reach the DOM `<input>`.
|
|
11
11
|
const { label, toggleLabels, toggleAttrs, revealed, onRevealedChange, ...inputProps } = props;
|
|
12
|
-
const reveal =
|
|
12
|
+
const reveal = useSecretRevealHook({ value: inputProps.value, labels: toggleLabels ?? { show: `Show ${label}`, hide: `Hide ${label}` } }, { ...(revealed === undefined ? {} : { revealed }), ...(onRevealedChange ? { onRevealedChange } : {}) });
|
|
13
13
|
return _jsxs("span", { className: "jini-secret", children: [_jsx("input", { ...secretControlAttrs({ attrs: inputProps }), spellCheck: false, ref: ref, type: reveal.inputType }), _jsx("button", { ...secretControlAttrs({ attrs: toggleAttrs ?? {} }), type: "button", className: "jini-secret-toggle", "aria-label": reveal.toggleLabel, title: reveal.toggleLabel, disabled: inputProps.disabled, onClick: reveal.toggle, children: eyeIcon({ revealed: reveal.revealed }) })] });
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=SecretInput.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useId } from 'react';
|
|
2
|
-
import { secretControlAttrs } from '
|
|
2
|
+
import { secretControlAttrs } from '@jini-ai/core/agent-handles';
|
|
3
3
|
import { useKitContext } from './context.js';
|
|
4
4
|
/** Local identity encoding keeps the UI contract independent of any agent runtime.
|
|
5
5
|
* Compatible with the agent handle segment grammar; opaque ids use a bounded fingerprint.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { ConfirmDialogProps } from '../types.js';
|
|
2
|
-
|
|
2
|
+
import { useConfirmFacade } from './ConfirmDialog.hooks.js';
|
|
3
|
+
export declare function ConfirmDialog({ useConfirmFacadeHook, ...props }: ConfirmDialogProps & {
|
|
4
|
+
useConfirmFacadeHook?: typeof useConfirmFacade;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
3
6
|
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createConsoleLogger } from '@jini-ai/core/primitives';
|
|
1
2
|
import { createElement, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2
3
|
import { createConfirmController, planConfirm } from '../../confirm.js';
|
|
3
4
|
import { useKit, useOverlayContainer } from '../Kit.hooks.js';
|
|
@@ -117,7 +118,8 @@ export function useConfirmFacade(required, _optional = {}) {
|
|
|
117
118
|
return;
|
|
118
119
|
if (!context.kit.violations.some(v => v.component === 'ConfirmDialog' && v.reasons.join() === reasons.join())) {
|
|
119
120
|
context.kit.violations.push({ component: 'ConfirmDialog', reasons });
|
|
120
|
-
|
|
121
|
+
const logger = context.report ?? createConsoleLogger({ prefix: '@jini-ai/ui-kit' });
|
|
122
|
+
logger.error({ message: 'ConfirmDialog conformance violation.' }, { meta: { reasons } });
|
|
121
123
|
}
|
|
122
124
|
if (context.guard === 'fallback') {
|
|
123
125
|
context.kit.failed.add('ConfirmDialog');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useConfirmFacade } from './ConfirmDialog.hooks.js';
|
|
3
3
|
import { Overlay } from '../KitProvider.js';
|
|
4
|
-
export function ConfirmDialog(
|
|
5
|
-
const vm =
|
|
4
|
+
export function ConfirmDialog({ useConfirmFacadeHook = useConfirmFacade, ...props }) {
|
|
5
|
+
const vm = useConfirmFacadeHook(props);
|
|
6
6
|
return _jsx(Overlay, { container: vm.controller.overlayContainer, children: _jsx("span", { ref: vm.controller.boundaryRef, className: "jini-overlay-boundary", children: _jsx(vm.Component, { controller: vm.controller }) }) });
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=ConfirmDialog.js.map
|
package/dist/react/context.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { type Context } from 'react';
|
|
2
2
|
import type { KitContextValue } from './types.js';
|
|
3
|
+
interface SharedContext {
|
|
4
|
+
context: Context<KitContextValue | null>;
|
|
5
|
+
versions: Set<string>;
|
|
6
|
+
reportedVersions?: Set<string>;
|
|
7
|
+
}
|
|
3
8
|
export declare function isDevelopment(_required: Record<string, never>, _optional?: Record<string, never>): boolean;
|
|
4
9
|
/** Sharing the context object (not just a token) makes independently bundled copies interoperable. */
|
|
5
10
|
export declare function getSharedKitContext(required: {
|
|
6
11
|
version: string;
|
|
7
12
|
}, _optional?: Record<string, never>): Context<KitContextValue | null>;
|
|
8
13
|
export declare const KitContext: Context<KitContextValue | null>;
|
|
14
|
+
/** Shared warning receipts keep separately bundled providers from reporting the same version twice. */
|
|
15
|
+
export declare const sharedKitContextState: SharedContext;
|
|
9
16
|
/** Context-only lookup for native views: no default-kit assembly or facade dependency.
|
|
10
17
|
* @returns The nearest provider binding, or null so a native view can use its own defaults.
|
|
11
18
|
*/
|
|
12
19
|
export declare function useKitContext(_required?: Record<string, never>, _optional?: Record<string, never>): KitContextValue | null;
|
|
20
|
+
export {};
|
|
13
21
|
//# sourceMappingURL=context.d.ts.map
|
package/dist/react/context.js
CHANGED
|
@@ -14,13 +14,12 @@ export function isDevelopment(_required, _optional = {}) {
|
|
|
14
14
|
export function getSharedKitContext(required, _optional = {}) {
|
|
15
15
|
const shared = globalThis;
|
|
16
16
|
const slot = shared[CONTEXT_KEY] ??= { context: createContext(null), versions: new Set() };
|
|
17
|
-
if (isDevelopment({}) && slot.versions.size && !slot.versions.has(required.version)) {
|
|
18
|
-
console.warn(`@jini-ai/ui-kit version skew: ${[...slot.versions, required.version].join(', ')}; shared contract-major 1 context`);
|
|
19
|
-
}
|
|
20
17
|
slot.versions.add(required.version);
|
|
21
18
|
return slot.context;
|
|
22
19
|
}
|
|
23
20
|
export const KitContext = getSharedKitContext({ version: '0.1.0' });
|
|
21
|
+
/** Shared warning receipts keep separately bundled providers from reporting the same version twice. */
|
|
22
|
+
export const sharedKitContextState = globalThis[CONTEXT_KEY];
|
|
24
23
|
/** Context-only lookup for native views: no default-kit assembly or facade dependency.
|
|
25
24
|
* @returns The nearest provider binding, or null so a native view can use its own defaults.
|
|
26
25
|
*/
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import type { ButtonProps, IconButtonProps, TextFieldProps, TextAreaProps, SelectProps, CheckboxProps, SwitchProps, ToastProps, NoticeProps, SpinnerProps, BadgeProps } from '../types.js';
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare
|
|
2
|
+
import { useNativeButton, useNativeIconButton, useNativeTextField, useNativeTextArea, useNativeSelect, useNativeCheckbox, useNativeToast, useNativeNotice, useNativeSpinner, useNativeBadge } from './Controls.hooks.js';
|
|
3
|
+
export declare const NativeButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps & {
|
|
4
|
+
useNativeButtonHook?: typeof useNativeButton;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export declare const NativeIconButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps & {
|
|
7
|
+
useNativeIconButtonHook?: typeof useNativeIconButton;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export declare const NativeTextField: import("react").ForwardRefExoticComponent<Omit<TextFieldProps & {
|
|
10
|
+
useNativeTextFieldHook?: typeof useNativeTextField;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export declare const NativeTextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps & {
|
|
13
|
+
useNativeTextAreaHook?: typeof useNativeTextArea;
|
|
14
|
+
}, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
15
|
+
export declare const NativeSelect: import("react").ForwardRefExoticComponent<Omit<SelectProps & {
|
|
16
|
+
useNativeSelectHook?: typeof useNativeSelect;
|
|
17
|
+
}, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
18
|
+
export declare const NativeCheckbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps & {
|
|
19
|
+
useNativeCheckboxHook?: typeof useNativeCheckbox;
|
|
20
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
21
|
+
export declare const NativeSwitch: import("react").ForwardRefExoticComponent<Omit<SwitchProps & {
|
|
22
|
+
useNativeCheckboxHook?: typeof useNativeCheckbox;
|
|
23
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export declare function NativeToast({ useNativeToastHook, ...props }: ToastProps & {
|
|
25
|
+
useNativeToastHook?: typeof useNativeToast;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function NativeNotice({ useNativeNoticeHook, ...props }: NoticeProps & {
|
|
28
|
+
useNativeNoticeHook?: typeof useNativeNotice;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
export declare function NativeSpinner({ useNativeSpinnerHook, ...props }: SpinnerProps & {
|
|
31
|
+
useNativeSpinnerHook?: typeof useNativeSpinner;
|
|
32
|
+
}): import("react").JSX.Element;
|
|
33
|
+
export declare function NativeBadge({ useNativeBadgeHook, ...props }: BadgeProps & {
|
|
34
|
+
useNativeBadgeHook?: typeof useNativeBadge;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
13
36
|
//# sourceMappingURL=Controls.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, useId, useState } from 'react';
|
|
2
|
-
import { secretControlAttrs } from '
|
|
2
|
+
import { secretControlAttrs } from '@jini-ai/core/agent-handles';
|
|
3
3
|
import { childControlAttrs, useControlAttrs } from '../agent-attrs.hooks.js';
|
|
4
4
|
export function useNativeButton(required, _optional = {}) {
|
|
5
5
|
const readyState = required.disabled ? 'disabled' : 'ready';
|
|
@@ -2,51 +2,51 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useNativeButton, useNativeIconButton, useNativeTextField, useNativeTextArea, useNativeSelect, useNativeCheckbox, useNativeToast, useNativeNotice, useNativeSpinner, useNativeBadge } from './Controls.hooks.js';
|
|
4
4
|
// React's forwardRef callback is the framework-mandated positional exception; exported factories use two objects.
|
|
5
|
-
export const NativeButton = forwardRef(function NativeButton(props, ref) {
|
|
6
|
-
const vm =
|
|
5
|
+
export const NativeButton = forwardRef(function NativeButton({ useNativeButtonHook = useNativeButton, ...props }, ref) {
|
|
6
|
+
const vm = useNativeButtonHook({ ...props, ref });
|
|
7
7
|
return _jsx("button", { ...vm.props, children: vm.children });
|
|
8
8
|
});
|
|
9
|
-
export const NativeIconButton = forwardRef(function NativeIconButton(props, ref) {
|
|
10
|
-
const vm =
|
|
9
|
+
export const NativeIconButton = forwardRef(function NativeIconButton({ useNativeIconButtonHook = useNativeIconButton, ...props }, ref) {
|
|
10
|
+
const vm = useNativeIconButtonHook({ ...props, ref });
|
|
11
11
|
return _jsx("button", { ...vm.props, children: vm.children });
|
|
12
12
|
});
|
|
13
|
-
export const NativeTextField = forwardRef(function NativeTextField(props, ref) {
|
|
14
|
-
const vm =
|
|
13
|
+
export const NativeTextField = forwardRef(function NativeTextField({ useNativeTextFieldHook = useNativeTextField, ...props }, ref) {
|
|
14
|
+
const vm = useNativeTextFieldHook({ ...props, ref });
|
|
15
15
|
const field = _jsxs("label", { htmlFor: vm.id, ...vm.labelAttrs, children: [_jsx("span", { className: "jini-field-label", children: vm.label }), _jsx("input", { ...vm.props })] });
|
|
16
16
|
// The eye toggle sits OUTSIDE the label (its name would otherwise join the input's accessible name),
|
|
17
17
|
// in one wrapper with it so a host can pin it inside the input's right edge.
|
|
18
18
|
return vm.toggle ? _jsxs("span", { className: "jini-secret", children: [field, _jsx("button", { ...vm.toggle })] }) : field;
|
|
19
19
|
});
|
|
20
|
-
export const NativeTextArea = forwardRef(function NativeTextArea(props, ref) {
|
|
21
|
-
const vm =
|
|
20
|
+
export const NativeTextArea = forwardRef(function NativeTextArea({ useNativeTextAreaHook = useNativeTextArea, ...props }, ref) {
|
|
21
|
+
const vm = useNativeTextAreaHook({ ...props, ref });
|
|
22
22
|
return _jsxs("label", { htmlFor: vm.id, ...vm.labelAttrs, children: [_jsx("span", { className: "jini-field-label", children: vm.label }), _jsx("textarea", { ...vm.props })] });
|
|
23
23
|
});
|
|
24
|
-
export const NativeSelect = forwardRef(function NativeSelect(props, ref) {
|
|
25
|
-
const vm =
|
|
24
|
+
export const NativeSelect = forwardRef(function NativeSelect({ useNativeSelectHook = useNativeSelect, ...props }, ref) {
|
|
25
|
+
const vm = useNativeSelectHook({ ...props, ref });
|
|
26
26
|
return _jsxs("label", { htmlFor: vm.id, ...vm.labelAttrs, children: [_jsx("span", { className: "jini-field-label", children: vm.label }), _jsx("select", { ...vm.props, children: vm.options })] });
|
|
27
27
|
});
|
|
28
|
-
export const NativeCheckbox = forwardRef(function NativeCheckbox(props, ref) {
|
|
29
|
-
const vm =
|
|
28
|
+
export const NativeCheckbox = forwardRef(function NativeCheckbox({ useNativeCheckboxHook = useNativeCheckbox, ...props }, ref) {
|
|
29
|
+
const vm = useNativeCheckboxHook({ ...props, ref });
|
|
30
30
|
return _jsxs("label", { className: "jini-checkbox-field", htmlFor: vm.id, children: [_jsx("input", { ...vm.props }), vm.label] });
|
|
31
31
|
});
|
|
32
|
-
export const NativeSwitch = forwardRef(function NativeSwitch(props, ref) {
|
|
33
|
-
const vm =
|
|
32
|
+
export const NativeSwitch = forwardRef(function NativeSwitch({ useNativeCheckboxHook = useNativeCheckbox, ...props }, ref) {
|
|
33
|
+
const vm = useNativeCheckboxHook({ ...props, ref }, { role: 'switch' });
|
|
34
34
|
return _jsxs("label", { className: "jini-checkbox-field", htmlFor: vm.id, children: [_jsx("input", { ...vm.props }), vm.label] });
|
|
35
35
|
});
|
|
36
|
-
export function NativeToast(
|
|
37
|
-
const vm =
|
|
36
|
+
export function NativeToast({ useNativeToastHook = useNativeToast, ...props }) {
|
|
37
|
+
const vm = useNativeToastHook(props);
|
|
38
38
|
return _jsxs("div", { ...vm.props, children: [vm.message, vm.dismiss] });
|
|
39
39
|
}
|
|
40
|
-
export function NativeNotice(
|
|
41
|
-
const vm =
|
|
40
|
+
export function NativeNotice({ useNativeNoticeHook = useNativeNotice, ...props }) {
|
|
41
|
+
const vm = useNativeNoticeHook(props);
|
|
42
42
|
return _jsx("div", { ...vm.props, children: vm.children });
|
|
43
43
|
}
|
|
44
|
-
export function NativeSpinner(
|
|
45
|
-
const vm =
|
|
44
|
+
export function NativeSpinner({ useNativeSpinnerHook = useNativeSpinner, ...props }) {
|
|
45
|
+
const vm = useNativeSpinnerHook(props);
|
|
46
46
|
return _jsx("span", { ...vm.props, children: "\u25CC" });
|
|
47
47
|
}
|
|
48
|
-
export function NativeBadge(
|
|
49
|
-
const vm =
|
|
48
|
+
export function NativeBadge({ useNativeBadgeHook = useNativeBadge, ...props }) {
|
|
49
|
+
const vm = useNativeBadgeHook(props);
|
|
50
50
|
return _jsx("span", { ...vm.props, children: vm.children });
|
|
51
51
|
}
|
|
52
52
|
//# sourceMappingURL=Controls.js.map
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { DialogProps, ConfirmViewProps } from '../types.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { useNativeDialog, useNativeConfirm } from './Dialog.hooks.js';
|
|
3
|
+
import { useKitContext } from '../context.js';
|
|
4
|
+
/** Hooks NativeDialog calls; defaults to the real ones, a test hands in fakes. */
|
|
5
|
+
export declare const defaultNativeDialogHooks: {
|
|
6
|
+
useKitContext: typeof useKitContext;
|
|
7
|
+
useNativeDialog: typeof useNativeDialog;
|
|
8
|
+
};
|
|
9
|
+
export type NativeDialogHooks = typeof defaultNativeDialogHooks;
|
|
10
|
+
export declare const NativeDialog: import("react").ForwardRefExoticComponent<Omit<DialogProps & {
|
|
11
|
+
hooks?: NativeDialogHooks | undefined;
|
|
12
|
+
}, "ref"> & import("react").RefAttributes<HTMLDialogElement>>;
|
|
13
|
+
/** Hooks NativeConfirmDialog calls; defaults to the real ones, a test hands in fakes. */
|
|
14
|
+
export declare const defaultNativeConfirmDialogHooks: {
|
|
15
|
+
useKitContext: typeof useKitContext;
|
|
16
|
+
useNativeConfirm: typeof useNativeConfirm;
|
|
17
|
+
};
|
|
18
|
+
export type NativeConfirmDialogHooks = typeof defaultNativeConfirmDialogHooks;
|
|
19
|
+
export declare function NativeConfirmDialog({ hooks, ...props }: ConfirmViewProps & {
|
|
20
|
+
hooks?: NativeConfirmDialogHooks | undefined;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
4
22
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -45,7 +45,9 @@ export declare function useNativeConfirm(required: ConfirmViewProps, { Button }?
|
|
|
45
45
|
Button?: ReactKit['Button'];
|
|
46
46
|
}): {
|
|
47
47
|
controller: import("../types.js").ConfirmController;
|
|
48
|
-
Button: import("react").ForwardRefExoticComponent<Omit<import("../types.js").ButtonProps
|
|
48
|
+
Button: import("react").ForwardRefExoticComponent<Omit<import("../types.js").ButtonProps & {
|
|
49
|
+
useNativeButtonHook?: typeof import("./Controls.hooks.js").useNativeButton;
|
|
50
|
+
}, "ref"> & import("react").RefAttributes<HTMLButtonElement>> | import("react").ComponentType<import("../types.js").ButtonProps>;
|
|
49
51
|
props: {
|
|
50
52
|
className: string;
|
|
51
53
|
role: string;
|
|
@@ -3,14 +3,18 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { useNativeDialog, useNativeConfirm } from './Dialog.hooks.js';
|
|
4
4
|
import { useKitContext } from '../context.js';
|
|
5
5
|
import { NativeButton } from './Controls.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/** Hooks NativeDialog calls; defaults to the real ones, a test hands in fakes. */
|
|
7
|
+
export const defaultNativeDialogHooks = { useKitContext, useNativeDialog };
|
|
8
|
+
export const NativeDialog = forwardRef(function NativeDialog({ hooks = defaultNativeDialogHooks, ...props }, ref) {
|
|
9
|
+
const Button = hooks.useKitContext({})?.kit.components.Button ?? NativeButton;
|
|
10
|
+
const vm = hooks.useNativeDialog({ ...props, ref });
|
|
9
11
|
return _jsxs("dialog", { ...vm.props, children: [_jsx("h2", { className: "jini-dialog-title", id: vm.titleId, "data-jini-part": "kit.dialog-title", children: vm.title }), vm.children, _jsx(Button, { ...vm.closeProps, children: vm.closeLabel })] });
|
|
10
12
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
/** Hooks NativeConfirmDialog calls; defaults to the real ones, a test hands in fakes. */
|
|
14
|
+
export const defaultNativeConfirmDialogHooks = { useKitContext, useNativeConfirm };
|
|
15
|
+
export function NativeConfirmDialog({ hooks = defaultNativeConfirmDialogHooks, ...props }) {
|
|
16
|
+
const Button = hooks.useKitContext({})?.kit.components.Button ?? NativeButton;
|
|
17
|
+
const vm = hooks.useNativeConfirm(props, { Button });
|
|
14
18
|
return _jsxs("dialog", { ...vm.props, children: [_jsx("h2", { className: "jini-confirm-dialog-title", ...vm.controller.titleAttrs, children: vm.controller.title }), _jsxs("div", { className: "jini-confirm-dialog-body", "data-jini-part": "confirm.body", children: [vm.controller.body, _jsx("p", { className: "jini-confirm-dialog-consequence", ...vm.controller.consequenceAttrs, children: vm.controller.consequence }), vm.controller.error] }), _jsxs("div", { className: "jini-confirm-dialog-actions", "data-jini-part": "confirm.actions", children: [_jsx(vm.Button, { ...vm.controller.cancel }), _jsx(vm.Button, { ...vm.controller.confirm })] })] });
|
|
15
19
|
}
|
|
16
20
|
//# sourceMappingURL=Dialog.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { TabsProps, MenuProps, TooltipProps } from '../types.js';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
2
|
+
import { useNativeTabs, useNativeMenu, useNativeTooltip } from './Navigation.hooks.js';
|
|
3
|
+
export declare function NativeTabs({ useNativeTabsHook, ...props }: TabsProps & {
|
|
4
|
+
useNativeTabsHook?: typeof useNativeTabs;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function NativeMenu({ useNativeMenuHook, ...props }: MenuProps & {
|
|
7
|
+
useNativeMenuHook?: typeof useNativeMenu;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export declare function NativeTooltip({ useNativeTooltipHook, ...props }: TooltipProps & {
|
|
10
|
+
useNativeTooltipHook?: typeof useNativeTooltip;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
5
12
|
//# sourceMappingURL=Navigation.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useNativeTabs, useNativeMenu, useNativeTooltip } from './Navigation.hooks.js';
|
|
3
|
-
export function NativeTabs(
|
|
4
|
-
const vm =
|
|
3
|
+
export function NativeTabs({ useNativeTabsHook = useNativeTabs, ...props }) {
|
|
4
|
+
const vm = useNativeTabsHook(props);
|
|
5
5
|
return _jsxs("div", { ref: vm.root, className: vm.className, children: [_jsx("div", { className: "jini-tab-bar", role: "tablist", "aria-label": vm.label, "data-jini-part": "kit.tabs", children: vm.tabs }), vm.panels] });
|
|
6
6
|
}
|
|
7
|
-
export function NativeMenu(
|
|
8
|
-
const vm =
|
|
7
|
+
export function NativeMenu({ useNativeMenuHook = useNativeMenu, ...props }) {
|
|
8
|
+
const vm = useNativeMenuHook(props);
|
|
9
9
|
return _jsxs("div", { className: "jini-row-menu", children: [_jsx("button", { ...vm.triggerProps, children: _jsxs("svg", { className: "jini-icon", width: "16", height: "16", viewBox: "0 0 18 18", fill: "currentColor", "aria-hidden": "true", children: [_jsx("circle", { className: "jini-icon-circle", cx: "9", cy: "4.5", r: "1.5" }), _jsx("circle", { className: "jini-icon-circle", cx: "9", cy: "9", r: "1.5" }), _jsx("circle", { className: "jini-icon-circle", cx: "9", cy: "13.5", r: "1.5" })] }) }), vm.popup] });
|
|
10
10
|
}
|
|
11
|
-
export function NativeTooltip(
|
|
12
|
-
const vm =
|
|
11
|
+
export function NativeTooltip({ useNativeTooltipHook = useNativeTooltip, ...props }) {
|
|
12
|
+
const vm = useNativeTooltipHook(props);
|
|
13
13
|
return _jsxs("span", { className: "jini-tooltip-container", children: [_jsx("span", { ...vm.triggerProps, children: vm.children }), _jsx("span", { ...vm.tooltipProps, children: vm.content })] });
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=Navigation.js.map
|
|
@@ -95,7 +95,7 @@ export async function runKitConformance(required, optional = {}) {
|
|
|
95
95
|
for (const scenario of optional.scenarios ?? kitConformanceScenarios) {
|
|
96
96
|
if (optional.only && !optional.only.includes(scenario.component))
|
|
97
97
|
continue;
|
|
98
|
-
if (scenario
|
|
98
|
+
if (requiresBrowserDriver(scenario, optional)) {
|
|
99
99
|
results.push({ id: scenario.id, status: 'skipped', errors: ['requires real browser driver'] });
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
@@ -105,4 +105,7 @@ export async function runKitConformance(required, optional = {}) {
|
|
|
105
105
|
}
|
|
106
106
|
return results;
|
|
107
107
|
}
|
|
108
|
+
function requiresBrowserDriver(scenario, optional) {
|
|
109
|
+
return Boolean(scenario.browserOnly && !optional.includeBrowser);
|
|
110
|
+
}
|
|
108
111
|
//# sourceMappingURL=driver.js.map
|
package/dist/react/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Logger } from '@jini-ai/core/primitives';
|
|
1
2
|
import type { ComponentType, ReactNode, Ref, RefObject, HTMLAttributes } from 'react';
|
|
2
3
|
import type { KitAttrs, AgentAttrsPort } from '../attrs.js';
|
|
3
4
|
import type { ConfirmInput, DismissReason } from '../confirm.js';
|
|
@@ -197,6 +198,7 @@ export interface ResolvedKit {
|
|
|
197
198
|
readonly guard: GuardMode;
|
|
198
199
|
}
|
|
199
200
|
export interface KitProviderProps {
|
|
201
|
+
readonly report?: Pick<Logger, 'warn' | 'error'> | undefined;
|
|
200
202
|
readonly kit?: ResolvedKit;
|
|
201
203
|
readonly children: ReactNode;
|
|
202
204
|
readonly agent?: AgentAttrsPort;
|
|
@@ -207,6 +209,7 @@ export interface KitProviderProps {
|
|
|
207
209
|
readonly guard?: GuardMode;
|
|
208
210
|
}
|
|
209
211
|
export interface KitContextValue {
|
|
212
|
+
readonly report?: Pick<Logger, 'warn' | 'error'> | undefined;
|
|
210
213
|
readonly kit: ResolvedKit;
|
|
211
214
|
readonly agent: AgentAttrsPort | undefined;
|
|
212
215
|
readonly overlayContainer: HTMLElement | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/ui-kit",
|
|
3
|
-
"version": "0.7.2",
|
|
3
|
+
"version": "0.7.3-next.2",
|
|
4
4
|
"description": "Framework-free UI contract, injected React facades and native defaults.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
"react": "^18.3.0 || ^19.0.0",
|
|
68
68
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
69
69
|
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@jini-ai/core": "^0.7.3-next.2"
|
|
72
|
+
},
|
|
70
73
|
"devDependencies": {
|
|
71
74
|
"@types/node": "^24.0.0",
|
|
72
75
|
"@types/react": "^19.2.0",
|
|
@@ -76,7 +79,7 @@
|
|
|
76
79
|
"react": "^19.2.0",
|
|
77
80
|
"react-dom": "^19.2.0",
|
|
78
81
|
"vue": "^3.5.0",
|
|
79
|
-
"vitest": "^2.
|
|
82
|
+
"vitest": "^3.2.6",
|
|
80
83
|
"typescript": "^5.6.0"
|
|
81
84
|
},
|
|
82
85
|
"scripts": {
|
package/dist/kit.spec.d.ts
DELETED
|
@@ -1,491 +0,0 @@
|
|
|
1
|
-
/** Contract semver is independent of the npm package version. Only implemented entries may be required. */
|
|
2
|
-
export declare const KIT_CONTRACT: {
|
|
3
|
-
readonly id: "@jini-ai/ui-kit";
|
|
4
|
-
readonly version: "1.0.0";
|
|
5
|
-
};
|
|
6
|
-
export interface KitComponentSpec {
|
|
7
|
-
readonly status: 'implemented' | 'planned';
|
|
8
|
-
readonly tier: 'control' | 'composite' | 'layout';
|
|
9
|
-
readonly since: string | null;
|
|
10
|
-
readonly parts: readonly string[];
|
|
11
|
-
readonly focusTarget: string;
|
|
12
|
-
readonly portal: 'none' | 'overlay';
|
|
13
|
-
readonly safety: boolean;
|
|
14
|
-
readonly behaviors: readonly string[];
|
|
15
|
-
readonly props: readonly string[];
|
|
16
|
-
readonly events: readonly string[];
|
|
17
|
-
readonly variants: readonly string[];
|
|
18
|
-
readonly states: readonly string[];
|
|
19
|
-
}
|
|
20
|
-
export declare const kitSpec: {
|
|
21
|
-
readonly Button: {
|
|
22
|
-
readonly status: "implemented";
|
|
23
|
-
readonly tier: "control";
|
|
24
|
-
readonly since: "1.0.0";
|
|
25
|
-
readonly parts: readonly ["kit.button"];
|
|
26
|
-
readonly focusTarget: "button";
|
|
27
|
-
readonly portal: "none";
|
|
28
|
-
readonly safety: false;
|
|
29
|
-
readonly behaviors: readonly ["press", "disabled-blocks-press", "attrs-on-focus-target"];
|
|
30
|
-
readonly props: readonly ["attrs", "className", "children", "disabled", "pending", "variant", "type", "ref", "onPress"];
|
|
31
|
-
readonly events: readonly ["onPress"];
|
|
32
|
-
readonly variants: readonly ["primary", "secondary", "danger", "warning", "ghost"];
|
|
33
|
-
readonly states: readonly ["disabled", "pending"];
|
|
34
|
-
};
|
|
35
|
-
readonly IconButton: {
|
|
36
|
-
readonly status: "implemented";
|
|
37
|
-
readonly tier: "control";
|
|
38
|
-
readonly since: "1.0.0";
|
|
39
|
-
readonly parts: readonly ["kit.icon-button"];
|
|
40
|
-
readonly focusTarget: "button";
|
|
41
|
-
readonly portal: "none";
|
|
42
|
-
readonly safety: false;
|
|
43
|
-
readonly behaviors: readonly ["accessible-label", "press", "attrs-on-focus-target"];
|
|
44
|
-
readonly props: readonly ["attrs", "className", "children", "disabled", "pending", "variant", "type", "ref", "onPress", "label"];
|
|
45
|
-
readonly events: readonly ["onPress"];
|
|
46
|
-
readonly variants: readonly ["primary", "secondary", "danger", "warning", "ghost"];
|
|
47
|
-
readonly states: readonly ["disabled", "pending"];
|
|
48
|
-
};
|
|
49
|
-
readonly TextField: {
|
|
50
|
-
readonly status: "implemented";
|
|
51
|
-
readonly tier: "control";
|
|
52
|
-
readonly since: "1.0.0";
|
|
53
|
-
readonly parts: readonly ["kit.text-field", "kit.field-label"];
|
|
54
|
-
readonly focusTarget: "input";
|
|
55
|
-
readonly portal: "none";
|
|
56
|
-
readonly safety: false;
|
|
57
|
-
readonly behaviors: readonly ["value-change", "labelled-control", "attrs-on-focus-target"];
|
|
58
|
-
readonly props: readonly ["attrs", "className", "label", "value", "disabled", "required", "placeholder", "type", "ref", "onValueChange"];
|
|
59
|
-
readonly events: readonly ["onValueChange"];
|
|
60
|
-
readonly variants: readonly [];
|
|
61
|
-
readonly states: readonly ["disabled"];
|
|
62
|
-
};
|
|
63
|
-
readonly TextArea: {
|
|
64
|
-
readonly status: "implemented";
|
|
65
|
-
readonly tier: "control";
|
|
66
|
-
readonly since: "1.0.0";
|
|
67
|
-
readonly parts: readonly ["kit.text-area", "kit.field-label"];
|
|
68
|
-
readonly focusTarget: "textarea";
|
|
69
|
-
readonly portal: "none";
|
|
70
|
-
readonly safety: false;
|
|
71
|
-
readonly behaviors: readonly ["value-change", "labelled-control", "attrs-on-focus-target"];
|
|
72
|
-
readonly props: readonly ["attrs", "className", "label", "value", "disabled", "required", "placeholder", "ref", "onValueChange", "rows"];
|
|
73
|
-
readonly events: readonly ["onValueChange"];
|
|
74
|
-
readonly variants: readonly [];
|
|
75
|
-
readonly states: readonly ["disabled"];
|
|
76
|
-
};
|
|
77
|
-
readonly Select: {
|
|
78
|
-
readonly status: "implemented";
|
|
79
|
-
readonly tier: "control";
|
|
80
|
-
readonly since: "1.0.0";
|
|
81
|
-
readonly parts: readonly ["kit.select", "kit.field-label"];
|
|
82
|
-
readonly focusTarget: "select";
|
|
83
|
-
readonly portal: "none";
|
|
84
|
-
readonly safety: false;
|
|
85
|
-
readonly behaviors: readonly ["native-select", "value-change", "attrs-on-focus-target"];
|
|
86
|
-
readonly props: readonly ["attrs", "className", "label", "value", "disabled", "required", "ref", "onValueChange", "options"];
|
|
87
|
-
readonly events: readonly ["onValueChange"];
|
|
88
|
-
readonly variants: readonly [];
|
|
89
|
-
readonly states: readonly ["disabled"];
|
|
90
|
-
};
|
|
91
|
-
readonly Checkbox: {
|
|
92
|
-
readonly status: "implemented";
|
|
93
|
-
readonly tier: "control";
|
|
94
|
-
readonly since: "1.0.0";
|
|
95
|
-
readonly parts: readonly ["kit.checkbox"];
|
|
96
|
-
readonly focusTarget: "input";
|
|
97
|
-
readonly portal: "none";
|
|
98
|
-
readonly safety: false;
|
|
99
|
-
readonly behaviors: readonly ["checked-change", "labelled-control", "attrs-on-focus-target"];
|
|
100
|
-
readonly props: readonly ["attrs", "className", "label", "checked", "disabled", "ref", "onCheckedChange"];
|
|
101
|
-
readonly events: readonly ["onCheckedChange"];
|
|
102
|
-
readonly variants: readonly [];
|
|
103
|
-
readonly states: readonly ["disabled"];
|
|
104
|
-
};
|
|
105
|
-
readonly Switch: {
|
|
106
|
-
readonly status: "implemented";
|
|
107
|
-
readonly tier: "control";
|
|
108
|
-
readonly since: "1.0.0";
|
|
109
|
-
readonly parts: readonly ["kit.switch"];
|
|
110
|
-
readonly focusTarget: "input";
|
|
111
|
-
readonly portal: "none";
|
|
112
|
-
readonly safety: false;
|
|
113
|
-
readonly behaviors: readonly ["checked-change", "switch-role", "attrs-on-focus-target"];
|
|
114
|
-
readonly props: readonly ["attrs", "className", "label", "checked", "disabled", "ref", "onCheckedChange"];
|
|
115
|
-
readonly events: readonly ["onCheckedChange"];
|
|
116
|
-
readonly variants: readonly [];
|
|
117
|
-
readonly states: readonly ["disabled"];
|
|
118
|
-
};
|
|
119
|
-
readonly Dialog: {
|
|
120
|
-
readonly status: "implemented";
|
|
121
|
-
readonly tier: "composite";
|
|
122
|
-
readonly since: "1.0.0";
|
|
123
|
-
readonly parts: readonly ["kit.dialog", "kit.dialog-title", "kit.dialog-close", "kit.overlay"];
|
|
124
|
-
readonly focusTarget: "dialog";
|
|
125
|
-
readonly portal: "overlay";
|
|
126
|
-
readonly safety: false;
|
|
127
|
-
readonly behaviors: readonly ["escape-dismissal", "pending-blocks-dismissal", "focus-restore"];
|
|
128
|
-
readonly props: readonly ["attrs", "className", "open", "title", "children", "pending", "closeLabel", "ref", "onClose"];
|
|
129
|
-
readonly events: readonly ["onClose"];
|
|
130
|
-
readonly variants: readonly [];
|
|
131
|
-
readonly states: readonly ["disabled", "pending"];
|
|
132
|
-
};
|
|
133
|
-
readonly ConfirmDialog: {
|
|
134
|
-
readonly status: "implemented";
|
|
135
|
-
readonly tier: "composite";
|
|
136
|
-
readonly since: "1.0.0";
|
|
137
|
-
readonly parts: readonly ["confirm.dialog", "confirm.title", "confirm.body", "confirm.actions", "confirm.cancel", "confirm.confirm"];
|
|
138
|
-
readonly focusTarget: "cancel";
|
|
139
|
-
readonly portal: "overlay";
|
|
140
|
-
readonly safety: true;
|
|
141
|
-
readonly behaviors: readonly ["pending-blocks-every-dismissal", "cancel-first-focus", "agent-confirm-withheld", "consequence-label"];
|
|
142
|
-
readonly props: readonly ["attrs", "className", "open", "title", "body", "confirmLabel", "cancelLabel", "tone", "pending", "consequence", "agentHandle", "agentMayConfirm", "errorLabel", "actionAccessibleNames", "onConfirm", "onCancel"];
|
|
143
|
-
readonly events: readonly ["onConfirm", "onCancel"];
|
|
144
|
-
readonly variants: readonly ["default", "warning", "danger"];
|
|
145
|
-
readonly states: readonly ["disabled", "pending"];
|
|
146
|
-
};
|
|
147
|
-
readonly Tabs: {
|
|
148
|
-
readonly status: "implemented";
|
|
149
|
-
readonly tier: "composite";
|
|
150
|
-
readonly since: "1.0.0";
|
|
151
|
-
readonly parts: readonly ["kit.tabs", "kit.tab", "kit.tab-panel"];
|
|
152
|
-
readonly focusTarget: "active-tab";
|
|
153
|
-
readonly portal: "none";
|
|
154
|
-
readonly safety: false;
|
|
155
|
-
readonly behaviors: readonly ["roving-tabs", "labelled-panel"];
|
|
156
|
-
readonly props: readonly ["attrs", "className", "label", "value", "items", "onValueChange"];
|
|
157
|
-
readonly events: readonly ["onValueChange"];
|
|
158
|
-
readonly variants: readonly [];
|
|
159
|
-
readonly states: readonly [];
|
|
160
|
-
};
|
|
161
|
-
readonly Menu: {
|
|
162
|
-
readonly status: "implemented";
|
|
163
|
-
readonly tier: "composite";
|
|
164
|
-
readonly since: "1.0.0";
|
|
165
|
-
readonly parts: readonly ["kit.menu-trigger", "kit.menu", "kit.menu-item"];
|
|
166
|
-
readonly focusTarget: "trigger-and-item";
|
|
167
|
-
readonly portal: "none";
|
|
168
|
-
readonly safety: false;
|
|
169
|
-
readonly behaviors: readonly ["roving-menu", "escape-dismissal", "focus-restore"];
|
|
170
|
-
readonly props: readonly ["attrs", "className", "label", "items", "disabled"];
|
|
171
|
-
readonly events: readonly [];
|
|
172
|
-
readonly variants: readonly [];
|
|
173
|
-
readonly states: readonly ["open"];
|
|
174
|
-
};
|
|
175
|
-
readonly Toast: {
|
|
176
|
-
readonly status: "implemented";
|
|
177
|
-
readonly tier: "composite";
|
|
178
|
-
readonly since: "1.0.0";
|
|
179
|
-
readonly parts: readonly ["kit.toast", "kit.toast-dismiss", "kit.toast-region"];
|
|
180
|
-
readonly focusTarget: "dismiss";
|
|
181
|
-
readonly portal: "overlay";
|
|
182
|
-
readonly safety: false;
|
|
183
|
-
readonly behaviors: readonly ["live-region", "dismiss-toast"];
|
|
184
|
-
readonly props: readonly ["attrs", "className", "message", "tone", "dismissLabel", "onDismiss"];
|
|
185
|
-
readonly events: readonly ["onDismiss"];
|
|
186
|
-
readonly variants: readonly ["info", "success", "warning", "danger"];
|
|
187
|
-
readonly states: readonly [];
|
|
188
|
-
};
|
|
189
|
-
readonly Tooltip: {
|
|
190
|
-
readonly status: "implemented";
|
|
191
|
-
readonly tier: "composite";
|
|
192
|
-
readonly since: "1.0.0";
|
|
193
|
-
readonly parts: readonly ["kit.tooltip-trigger", "kit.tooltip"];
|
|
194
|
-
readonly focusTarget: "trigger";
|
|
195
|
-
readonly portal: "none";
|
|
196
|
-
readonly safety: false;
|
|
197
|
-
readonly behaviors: readonly ["focus-tooltip", "hover-tooltip", "escape-dismissal"];
|
|
198
|
-
readonly props: readonly ["attrs", "className", "content", "children", "label"];
|
|
199
|
-
readonly events: readonly [];
|
|
200
|
-
readonly variants: readonly [];
|
|
201
|
-
readonly states: readonly ["open"];
|
|
202
|
-
};
|
|
203
|
-
readonly Notice: {
|
|
204
|
-
readonly status: "implemented";
|
|
205
|
-
readonly tier: "control";
|
|
206
|
-
readonly since: "1.0.0";
|
|
207
|
-
readonly parts: readonly ["kit.notice"];
|
|
208
|
-
readonly focusTarget: "root";
|
|
209
|
-
readonly portal: "none";
|
|
210
|
-
readonly safety: false;
|
|
211
|
-
readonly behaviors: readonly ["status-region"];
|
|
212
|
-
readonly props: readonly ["attrs", "className", "children", "tone"];
|
|
213
|
-
readonly events: readonly [];
|
|
214
|
-
readonly variants: readonly ["info", "success", "warning", "danger"];
|
|
215
|
-
readonly states: readonly [];
|
|
216
|
-
};
|
|
217
|
-
readonly Spinner: {
|
|
218
|
-
readonly status: "implemented";
|
|
219
|
-
readonly tier: "control";
|
|
220
|
-
readonly since: "1.0.0";
|
|
221
|
-
readonly parts: readonly ["kit.spinner"];
|
|
222
|
-
readonly focusTarget: "root";
|
|
223
|
-
readonly portal: "none";
|
|
224
|
-
readonly safety: false;
|
|
225
|
-
readonly behaviors: readonly ["accessible-label"];
|
|
226
|
-
readonly props: readonly ["attrs", "className", "label"];
|
|
227
|
-
readonly events: readonly [];
|
|
228
|
-
readonly variants: readonly [];
|
|
229
|
-
readonly states: readonly [];
|
|
230
|
-
};
|
|
231
|
-
readonly Badge: {
|
|
232
|
-
readonly status: "implemented";
|
|
233
|
-
readonly tier: "control";
|
|
234
|
-
readonly since: "1.0.0";
|
|
235
|
-
readonly parts: readonly ["kit.badge"];
|
|
236
|
-
readonly focusTarget: "root";
|
|
237
|
-
readonly portal: "none";
|
|
238
|
-
readonly safety: false;
|
|
239
|
-
readonly behaviors: readonly ["text-content"];
|
|
240
|
-
readonly props: readonly ["attrs", "className", "children", "tone"];
|
|
241
|
-
readonly events: readonly [];
|
|
242
|
-
readonly variants: readonly ["info", "success", "warning", "danger"];
|
|
243
|
-
readonly states: readonly [];
|
|
244
|
-
};
|
|
245
|
-
readonly Link: {
|
|
246
|
-
readonly status: "planned";
|
|
247
|
-
readonly tier: "composite";
|
|
248
|
-
readonly since: null;
|
|
249
|
-
readonly parts: readonly [];
|
|
250
|
-
readonly focusTarget: "planned";
|
|
251
|
-
readonly portal: "none";
|
|
252
|
-
readonly safety: false;
|
|
253
|
-
readonly behaviors: readonly [];
|
|
254
|
-
readonly props: readonly [];
|
|
255
|
-
readonly events: readonly [];
|
|
256
|
-
readonly variants: readonly [];
|
|
257
|
-
readonly states: readonly [];
|
|
258
|
-
};
|
|
259
|
-
readonly Icon: {
|
|
260
|
-
readonly status: "planned";
|
|
261
|
-
readonly tier: "composite";
|
|
262
|
-
readonly since: null;
|
|
263
|
-
readonly parts: readonly [];
|
|
264
|
-
readonly focusTarget: "planned";
|
|
265
|
-
readonly portal: "none";
|
|
266
|
-
readonly safety: false;
|
|
267
|
-
readonly behaviors: readonly [];
|
|
268
|
-
readonly props: readonly [];
|
|
269
|
-
readonly events: readonly [];
|
|
270
|
-
readonly variants: readonly [];
|
|
271
|
-
readonly states: readonly [];
|
|
272
|
-
};
|
|
273
|
-
readonly RadioGroup: {
|
|
274
|
-
readonly status: "planned";
|
|
275
|
-
readonly tier: "composite";
|
|
276
|
-
readonly since: null;
|
|
277
|
-
readonly parts: readonly [];
|
|
278
|
-
readonly focusTarget: "planned";
|
|
279
|
-
readonly portal: "none";
|
|
280
|
-
readonly safety: false;
|
|
281
|
-
readonly behaviors: readonly [];
|
|
282
|
-
readonly props: readonly [];
|
|
283
|
-
readonly events: readonly [];
|
|
284
|
-
readonly variants: readonly [];
|
|
285
|
-
readonly states: readonly [];
|
|
286
|
-
};
|
|
287
|
-
readonly Field: {
|
|
288
|
-
readonly status: "planned";
|
|
289
|
-
readonly tier: "composite";
|
|
290
|
-
readonly since: null;
|
|
291
|
-
readonly parts: readonly [];
|
|
292
|
-
readonly focusTarget: "planned";
|
|
293
|
-
readonly portal: "none";
|
|
294
|
-
readonly safety: false;
|
|
295
|
-
readonly behaviors: readonly [];
|
|
296
|
-
readonly props: readonly [];
|
|
297
|
-
readonly events: readonly [];
|
|
298
|
-
readonly variants: readonly [];
|
|
299
|
-
readonly states: readonly [];
|
|
300
|
-
};
|
|
301
|
-
readonly Card: {
|
|
302
|
-
readonly status: "planned";
|
|
303
|
-
readonly tier: "composite";
|
|
304
|
-
readonly since: null;
|
|
305
|
-
readonly parts: readonly [];
|
|
306
|
-
readonly focusTarget: "planned";
|
|
307
|
-
readonly portal: "none";
|
|
308
|
-
readonly safety: false;
|
|
309
|
-
readonly behaviors: readonly [];
|
|
310
|
-
readonly props: readonly [];
|
|
311
|
-
readonly events: readonly [];
|
|
312
|
-
readonly variants: readonly [];
|
|
313
|
-
readonly states: readonly [];
|
|
314
|
-
};
|
|
315
|
-
readonly Table: {
|
|
316
|
-
readonly status: "planned";
|
|
317
|
-
readonly tier: "composite";
|
|
318
|
-
readonly since: null;
|
|
319
|
-
readonly parts: readonly [];
|
|
320
|
-
readonly focusTarget: "planned";
|
|
321
|
-
readonly portal: "none";
|
|
322
|
-
readonly safety: false;
|
|
323
|
-
readonly behaviors: readonly [];
|
|
324
|
-
readonly props: readonly [];
|
|
325
|
-
readonly events: readonly [];
|
|
326
|
-
readonly variants: readonly [];
|
|
327
|
-
readonly states: readonly [];
|
|
328
|
-
};
|
|
329
|
-
readonly Popover: {
|
|
330
|
-
readonly status: "planned";
|
|
331
|
-
readonly tier: "composite";
|
|
332
|
-
readonly since: null;
|
|
333
|
-
readonly parts: readonly [];
|
|
334
|
-
readonly focusTarget: "planned";
|
|
335
|
-
readonly portal: "none";
|
|
336
|
-
readonly safety: false;
|
|
337
|
-
readonly behaviors: readonly [];
|
|
338
|
-
readonly props: readonly [];
|
|
339
|
-
readonly events: readonly [];
|
|
340
|
-
readonly variants: readonly [];
|
|
341
|
-
readonly states: readonly [];
|
|
342
|
-
};
|
|
343
|
-
readonly Combobox: {
|
|
344
|
-
readonly status: "planned";
|
|
345
|
-
readonly tier: "composite";
|
|
346
|
-
readonly since: null;
|
|
347
|
-
readonly parts: readonly [];
|
|
348
|
-
readonly focusTarget: "planned";
|
|
349
|
-
readonly portal: "none";
|
|
350
|
-
readonly safety: false;
|
|
351
|
-
readonly behaviors: readonly [];
|
|
352
|
-
readonly props: readonly [];
|
|
353
|
-
readonly events: readonly [];
|
|
354
|
-
readonly variants: readonly [];
|
|
355
|
-
readonly states: readonly [];
|
|
356
|
-
};
|
|
357
|
-
readonly Stack: {
|
|
358
|
-
readonly status: "planned";
|
|
359
|
-
readonly tier: "layout";
|
|
360
|
-
readonly since: null;
|
|
361
|
-
readonly parts: readonly [];
|
|
362
|
-
readonly focusTarget: "planned";
|
|
363
|
-
readonly portal: "none";
|
|
364
|
-
readonly safety: false;
|
|
365
|
-
readonly behaviors: readonly [];
|
|
366
|
-
readonly props: readonly [];
|
|
367
|
-
readonly events: readonly [];
|
|
368
|
-
readonly variants: readonly [];
|
|
369
|
-
readonly states: readonly [];
|
|
370
|
-
};
|
|
371
|
-
readonly Grid: {
|
|
372
|
-
readonly status: "planned";
|
|
373
|
-
readonly tier: "layout";
|
|
374
|
-
readonly since: null;
|
|
375
|
-
readonly parts: readonly [];
|
|
376
|
-
readonly focusTarget: "planned";
|
|
377
|
-
readonly portal: "none";
|
|
378
|
-
readonly safety: false;
|
|
379
|
-
readonly behaviors: readonly [];
|
|
380
|
-
readonly props: readonly [];
|
|
381
|
-
readonly events: readonly [];
|
|
382
|
-
readonly variants: readonly [];
|
|
383
|
-
readonly states: readonly [];
|
|
384
|
-
};
|
|
385
|
-
readonly ShellLayout: {
|
|
386
|
-
readonly status: "planned";
|
|
387
|
-
readonly tier: "layout";
|
|
388
|
-
readonly since: null;
|
|
389
|
-
readonly parts: readonly [];
|
|
390
|
-
readonly focusTarget: "planned";
|
|
391
|
-
readonly portal: "none";
|
|
392
|
-
readonly safety: false;
|
|
393
|
-
readonly behaviors: readonly [];
|
|
394
|
-
readonly props: readonly [];
|
|
395
|
-
readonly events: readonly [];
|
|
396
|
-
readonly variants: readonly [];
|
|
397
|
-
readonly states: readonly [];
|
|
398
|
-
};
|
|
399
|
-
readonly Sidebar: {
|
|
400
|
-
readonly status: "planned";
|
|
401
|
-
readonly tier: "layout";
|
|
402
|
-
readonly since: null;
|
|
403
|
-
readonly parts: readonly [];
|
|
404
|
-
readonly focusTarget: "planned";
|
|
405
|
-
readonly portal: "none";
|
|
406
|
-
readonly safety: false;
|
|
407
|
-
readonly behaviors: readonly [];
|
|
408
|
-
readonly props: readonly [];
|
|
409
|
-
readonly events: readonly [];
|
|
410
|
-
readonly variants: readonly [];
|
|
411
|
-
readonly states: readonly [];
|
|
412
|
-
};
|
|
413
|
-
readonly NavItem: {
|
|
414
|
-
readonly status: "planned";
|
|
415
|
-
readonly tier: "layout";
|
|
416
|
-
readonly since: null;
|
|
417
|
-
readonly parts: readonly [];
|
|
418
|
-
readonly focusTarget: "planned";
|
|
419
|
-
readonly portal: "none";
|
|
420
|
-
readonly safety: false;
|
|
421
|
-
readonly behaviors: readonly [];
|
|
422
|
-
readonly props: readonly [];
|
|
423
|
-
readonly events: readonly [];
|
|
424
|
-
readonly variants: readonly [];
|
|
425
|
-
readonly states: readonly [];
|
|
426
|
-
};
|
|
427
|
-
readonly PageHeader: {
|
|
428
|
-
readonly status: "planned";
|
|
429
|
-
readonly tier: "layout";
|
|
430
|
-
readonly since: null;
|
|
431
|
-
readonly parts: readonly [];
|
|
432
|
-
readonly focusTarget: "planned";
|
|
433
|
-
readonly portal: "none";
|
|
434
|
-
readonly safety: false;
|
|
435
|
-
readonly behaviors: readonly [];
|
|
436
|
-
readonly props: readonly [];
|
|
437
|
-
readonly events: readonly [];
|
|
438
|
-
readonly variants: readonly [];
|
|
439
|
-
readonly states: readonly [];
|
|
440
|
-
};
|
|
441
|
-
readonly Section: {
|
|
442
|
-
readonly status: "planned";
|
|
443
|
-
readonly tier: "layout";
|
|
444
|
-
readonly since: null;
|
|
445
|
-
readonly parts: readonly [];
|
|
446
|
-
readonly focusTarget: "planned";
|
|
447
|
-
readonly portal: "none";
|
|
448
|
-
readonly safety: false;
|
|
449
|
-
readonly behaviors: readonly [];
|
|
450
|
-
readonly props: readonly [];
|
|
451
|
-
readonly events: readonly [];
|
|
452
|
-
readonly variants: readonly [];
|
|
453
|
-
readonly states: readonly [];
|
|
454
|
-
};
|
|
455
|
-
readonly EmptyState: {
|
|
456
|
-
readonly status: "planned";
|
|
457
|
-
readonly tier: "layout";
|
|
458
|
-
readonly since: null;
|
|
459
|
-
readonly parts: readonly [];
|
|
460
|
-
readonly focusTarget: "planned";
|
|
461
|
-
readonly portal: "none";
|
|
462
|
-
readonly safety: false;
|
|
463
|
-
readonly behaviors: readonly [];
|
|
464
|
-
readonly props: readonly [];
|
|
465
|
-
readonly events: readonly [];
|
|
466
|
-
readonly variants: readonly [];
|
|
467
|
-
readonly states: readonly [];
|
|
468
|
-
};
|
|
469
|
-
readonly OverlayHost: {
|
|
470
|
-
readonly status: "planned";
|
|
471
|
-
readonly tier: "layout";
|
|
472
|
-
readonly since: null;
|
|
473
|
-
readonly parts: readonly [];
|
|
474
|
-
readonly focusTarget: "planned";
|
|
475
|
-
readonly portal: "none";
|
|
476
|
-
readonly safety: false;
|
|
477
|
-
readonly behaviors: readonly [];
|
|
478
|
-
readonly props: readonly [];
|
|
479
|
-
readonly events: readonly [];
|
|
480
|
-
readonly variants: readonly [];
|
|
481
|
-
readonly states: readonly [];
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
export type KitComponentName = keyof typeof kitSpec;
|
|
485
|
-
export type ImplementedComponentName = {
|
|
486
|
-
[K in KitComponentName]: typeof kitSpec[K]['status'] extends 'implemented' ? K : never;
|
|
487
|
-
}[KitComponentName];
|
|
488
|
-
export type KitPart = typeof kitSpec[ImplementedComponentName]['parts'][number];
|
|
489
|
-
export declare const implementedComponents: readonly ImplementedComponentName[];
|
|
490
|
-
export declare const kitParts: readonly KitPart[];
|
|
491
|
-
//# sourceMappingURL=kit.spec.d.ts.map
|
package/dist/kit.spec.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/** Contract semver is independent of the npm package version. Only implemented entries may be required. */
|
|
2
|
-
export const KIT_CONTRACT = { id: '@jini-ai/ui-kit', version: '1.0.0' };
|
|
3
|
-
export const kitSpec = {
|
|
4
|
-
Button: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.button"], "focusTarget": "button", "portal": "none", "safety": false, "behaviors": ["press", "disabled-blocks-press", "attrs-on-focus-target"], "props": ["attrs", "className", "children", "disabled", "pending", "variant", "type", "ref", "onPress"], "events": ["onPress"], "variants": ["primary", "secondary", "danger", "warning", "ghost"], "states": ["disabled", "pending"] },
|
|
5
|
-
IconButton: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.icon-button"], "focusTarget": "button", "portal": "none", "safety": false, "behaviors": ["accessible-label", "press", "attrs-on-focus-target"], "props": ["attrs", "className", "children", "disabled", "pending", "variant", "type", "ref", "onPress", "label"], "events": ["onPress"], "variants": ["primary", "secondary", "danger", "warning", "ghost"], "states": ["disabled", "pending"] },
|
|
6
|
-
TextField: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.text-field", "kit.field-label"], "focusTarget": "input", "portal": "none", "safety": false, "behaviors": ["value-change", "labelled-control", "attrs-on-focus-target"], "props": ["attrs", "className", "label", "value", "disabled", "required", "placeholder", "type", "ref", "onValueChange"], "events": ["onValueChange"], "variants": [], "states": ["disabled"] },
|
|
7
|
-
TextArea: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.text-area", "kit.field-label"], "focusTarget": "textarea", "portal": "none", "safety": false, "behaviors": ["value-change", "labelled-control", "attrs-on-focus-target"], "props": ["attrs", "className", "label", "value", "disabled", "required", "placeholder", "ref", "onValueChange", "rows"], "events": ["onValueChange"], "variants": [], "states": ["disabled"] },
|
|
8
|
-
Select: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.select", "kit.field-label"], "focusTarget": "select", "portal": "none", "safety": false, "behaviors": ["native-select", "value-change", "attrs-on-focus-target"], "props": ["attrs", "className", "label", "value", "disabled", "required", "ref", "onValueChange", "options"], "events": ["onValueChange"], "variants": [], "states": ["disabled"] },
|
|
9
|
-
Checkbox: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.checkbox"], "focusTarget": "input", "portal": "none", "safety": false, "behaviors": ["checked-change", "labelled-control", "attrs-on-focus-target"], "props": ["attrs", "className", "label", "checked", "disabled", "ref", "onCheckedChange"], "events": ["onCheckedChange"], "variants": [], "states": ["disabled"] },
|
|
10
|
-
Switch: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.switch"], "focusTarget": "input", "portal": "none", "safety": false, "behaviors": ["checked-change", "switch-role", "attrs-on-focus-target"], "props": ["attrs", "className", "label", "checked", "disabled", "ref", "onCheckedChange"], "events": ["onCheckedChange"], "variants": [], "states": ["disabled"] },
|
|
11
|
-
Dialog: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["kit.dialog", "kit.dialog-title", "kit.dialog-close", "kit.overlay"], "focusTarget": "dialog", "portal": "overlay", "safety": false, "behaviors": ["escape-dismissal", "pending-blocks-dismissal", "focus-restore"], "props": ["attrs", "className", "open", "title", "children", "pending", "closeLabel", "ref", "onClose"], "events": ["onClose"], "variants": [], "states": ["disabled", "pending"] },
|
|
12
|
-
ConfirmDialog: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["confirm.dialog", "confirm.title", "confirm.body", "confirm.actions", "confirm.cancel", "confirm.confirm"], "focusTarget": "cancel", "portal": "overlay", "safety": true, "behaviors": ["pending-blocks-every-dismissal", "cancel-first-focus", "agent-confirm-withheld", "consequence-label"], "props": ["attrs", "className", "open", "title", "body", "confirmLabel", "cancelLabel", "tone", "pending", "consequence", "agentHandle", "agentMayConfirm", "errorLabel", "actionAccessibleNames", "onConfirm", "onCancel"], "events": ["onConfirm", "onCancel"], "variants": ["default", "warning", "danger"], "states": ["disabled", "pending"] },
|
|
13
|
-
Tabs: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["kit.tabs", "kit.tab", "kit.tab-panel"], "focusTarget": "active-tab", "portal": "none", "safety": false, "behaviors": ["roving-tabs", "labelled-panel"], "props": ["attrs", "className", "label", "value", "items", "onValueChange"], "events": ["onValueChange"], "variants": [], "states": [] },
|
|
14
|
-
Menu: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["kit.menu-trigger", "kit.menu", "kit.menu-item"], "focusTarget": "trigger-and-item", "portal": "none", "safety": false, "behaviors": ["roving-menu", "escape-dismissal", "focus-restore"], "props": ["attrs", "className", "label", "items", "disabled"], "events": [], "variants": [], "states": ["open"] },
|
|
15
|
-
Toast: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["kit.toast", "kit.toast-dismiss", "kit.toast-region"], "focusTarget": "dismiss", "portal": "overlay", "safety": false, "behaviors": ["live-region", "dismiss-toast"], "props": ["attrs", "className", "message", "tone", "dismissLabel", "onDismiss"], "events": ["onDismiss"], "variants": ["info", "success", "warning", "danger"], "states": [] },
|
|
16
|
-
Tooltip: { "status": "implemented", "tier": "composite", "since": "1.0.0", "parts": ["kit.tooltip-trigger", "kit.tooltip"], "focusTarget": "trigger", "portal": "none", "safety": false, "behaviors": ["focus-tooltip", "hover-tooltip", "escape-dismissal"], "props": ["attrs", "className", "content", "children", "label"], "events": [], "variants": [], "states": ["open"] },
|
|
17
|
-
Notice: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.notice"], "focusTarget": "root", "portal": "none", "safety": false, "behaviors": ["status-region"], "props": ["attrs", "className", "children", "tone"], "events": [], "variants": ["info", "success", "warning", "danger"], "states": [] },
|
|
18
|
-
Spinner: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.spinner"], "focusTarget": "root", "portal": "none", "safety": false, "behaviors": ["accessible-label"], "props": ["attrs", "className", "label"], "events": [], "variants": [], "states": [] },
|
|
19
|
-
Badge: { "status": "implemented", "tier": "control", "since": "1.0.0", "parts": ["kit.badge"], "focusTarget": "root", "portal": "none", "safety": false, "behaviors": ["text-content"], "props": ["attrs", "className", "children", "tone"], "events": [], "variants": ["info", "success", "warning", "danger"], "states": [] },
|
|
20
|
-
Link: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
21
|
-
Icon: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
22
|
-
RadioGroup: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
23
|
-
Field: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
24
|
-
Card: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
25
|
-
Table: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
26
|
-
Popover: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
27
|
-
Combobox: { "status": "planned", "tier": "composite", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
28
|
-
Stack: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
29
|
-
Grid: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
30
|
-
ShellLayout: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
31
|
-
Sidebar: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
32
|
-
NavItem: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
33
|
-
PageHeader: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
34
|
-
Section: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
35
|
-
EmptyState: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
36
|
-
OverlayHost: { "status": "planned", "tier": "layout", "since": null, "parts": [], "focusTarget": "planned", "portal": "none", "safety": false, "behaviors": [], "props": [], "events": [], "variants": [], "states": [] },
|
|
37
|
-
};
|
|
38
|
-
export const implementedComponents = Object.freeze(Object.keys(kitSpec).filter((name) => kitSpec[name].status === 'implemented'));
|
|
39
|
-
export const kitParts = Object.freeze([...new Set(implementedComponents.flatMap(name => [...kitSpec[name].parts]))]);
|
|
40
|
-
//# sourceMappingURL=kit.spec.js.map
|