@hjmds/react-native 1.1.1 → 1.3.4
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 +12 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +4 -2
- package/dist/actions.js.map +1 -1
- package/dist/agreement.d.ts +18 -0
- package/dist/agreement.d.ts.map +1 -0
- package/dist/agreement.js +51 -0
- package/dist/agreement.js.map +1 -0
- package/dist/asset.d.ts +27 -0
- package/dist/asset.d.ts.map +1 -0
- package/dist/asset.js +40 -0
- package/dist/asset.js.map +1 -0
- package/dist/auth-screen.d.ts +21 -0
- package/dist/auth-screen.d.ts.map +1 -0
- package/dist/auth-screen.js +37 -0
- package/dist/auth-screen.js.map +1 -0
- package/dist/bottom-info.d.ts +9 -0
- package/dist/bottom-info.d.ts.map +1 -0
- package/dist/bottom-info.js +16 -0
- package/dist/bottom-info.js.map +1 -0
- package/dist/calendar.d.ts +21 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +63 -0
- package/dist/calendar.js.map +1 -0
- package/dist/carousel.d.ts +21 -0
- package/dist/carousel.d.ts.map +1 -0
- package/dist/carousel.js +67 -0
- package/dist/carousel.js.map +1 -0
- package/dist/collapsible.d.ts +12 -0
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +18 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +12 -5
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range.d.ts +23 -0
- package/dist/date-range.d.ts.map +1 -0
- package/dist/date-range.js +45 -0
- package/dist/date-range.js.map +1 -0
- package/dist/evidence.d.ts +241 -1
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +17 -1
- package/dist/evidence.js.map +1 -1
- package/dist/feedback.d.ts +10 -2
- package/dist/feedback.d.ts.map +1 -1
- package/dist/feedback.js +26 -3
- package/dist/feedback.js.map +1 -1
- package/dist/floating-action-button.d.ts +33 -0
- package/dist/floating-action-button.d.ts.map +1 -0
- package/dist/floating-action-button.js +53 -0
- package/dist/floating-action-button.js.map +1 -0
- package/dist/heading.d.ts +9 -0
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +24 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +3 -1
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +3 -3
- package/dist/inputs.js.map +1 -1
- package/dist/keyboard.d.ts +17 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +42 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/mentions.d.ts +28 -0
- package/dist/mentions.d.ts.map +1 -0
- package/dist/mentions.js +41 -0
- package/dist/mentions.js.map +1 -0
- package/dist/provider-button.d.ts +12 -0
- package/dist/provider-button.d.ts.map +1 -0
- package/dist/provider-button.js +35 -0
- package/dist/provider-button.js.map +1 -0
- package/dist/provider.d.ts.map +1 -1
- package/dist/provider.js +13 -4
- package/dist/provider.js.map +1 -1
- package/dist/tags-input.d.ts +23 -0
- package/dist/tags-input.d.ts.map +1 -0
- package/dist/tags-input.js +58 -0
- package/dist/tags-input.js.map +1 -0
- package/dist/toggle-group.d.ts +12 -0
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +39 -0
- package/dist/toggle-group.js.map +1 -0
- package/dist/top.d.ts +11 -0
- package/dist/top.d.ts.map +1 -0
- package/dist/top.js +30 -0
- package/dist/top.js.map +1 -0
- package/dist/transfer-list.d.ts +23 -0
- package/dist/transfer-list.d.ts.map +1 -0
- package/dist/transfer-list.js +46 -0
- package/dist/transfer-list.js.map +1 -0
- package/package.json +117 -3
package/dist/carousel.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { AccessibilityInfo, AppState, PanResponder, View } from "react-native";
|
|
4
|
+
import { carouselRecipe, resolveCarouselDescriptor, getCarouselNavigationTarget, isCarouselAutoplayActive, } from "@hjmds/design-contracts/components/carousel";
|
|
5
|
+
import { Button } from "./actions.js";
|
|
6
|
+
import { Text } from "./primitives.js";
|
|
7
|
+
import { useHjmNativeTheme } from "./provider.js";
|
|
8
|
+
import { useControllableState } from "./internal/state.js";
|
|
9
|
+
export function Carousel({ label, slides, renderSlide, composeAccessibleName, labels, autoplay, currentKey, defaultCurrentKey, onCurrentKeyChange, style }) {
|
|
10
|
+
const { environment, tokens } = useHjmNativeTheme();
|
|
11
|
+
const [current, setCurrent] = useControllableState({
|
|
12
|
+
...(currentKey === undefined ? {} : { value: currentKey }),
|
|
13
|
+
defaultValue: defaultCurrentKey ?? slides[0]?.id ?? "",
|
|
14
|
+
...(onCurrentKeyChange === undefined ? {} : { onChange: onCurrentKeyChange }),
|
|
15
|
+
});
|
|
16
|
+
const descriptor = { slides, currentKey: current, ...(autoplay ? { autoplay } : {}) };
|
|
17
|
+
const resolved = resolveCarouselDescriptor(descriptor, { composeAccessibleName });
|
|
18
|
+
if (!label.trim() || Object.values(labels).some((value) => !value.trim()))
|
|
19
|
+
throw new TypeError("Carousel labels must not be empty");
|
|
20
|
+
const [rotating, setRotating] = useState(autoplay !== undefined);
|
|
21
|
+
const [foreground, setForeground] = useState(AppState.currentState === "active");
|
|
22
|
+
// Wait for the platform's answer before rotating: a screen reader can explore
|
|
23
|
+
// content without moving keyboard focus, so focus handlers alone are insufficient.
|
|
24
|
+
const [screenReader, setScreenReader] = useState(true);
|
|
25
|
+
const alive = useRef(true);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
alive.current = true;
|
|
28
|
+
void AccessibilityInfo.isScreenReaderEnabled().then((enabled) => { if (alive.current)
|
|
29
|
+
setScreenReader(enabled); }, () => { });
|
|
30
|
+
const reader = AccessibilityInfo.addEventListener("screenReaderChanged", setScreenReader);
|
|
31
|
+
const app = AppState.addEventListener("change", (state) => setForeground(state === "active"));
|
|
32
|
+
return () => { alive.current = false; reader.remove(); app.remove(); };
|
|
33
|
+
}, []);
|
|
34
|
+
const last = current === slides.at(-1).id;
|
|
35
|
+
const playing = isCarouselAutoplayActive(autoplay, { reducedMotion: environment.reducedMotion, paused: !rotating || !foreground || screenReader || last });
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!playing || !autoplay)
|
|
38
|
+
return;
|
|
39
|
+
const timer = setTimeout(() => setCurrent(getCarouselNavigationTarget(descriptor, "next")), autoplay.intervalMs);
|
|
40
|
+
return () => clearTimeout(timer);
|
|
41
|
+
}, [playing, autoplay?.intervalMs, current, slides, setCurrent]);
|
|
42
|
+
function select(key) {
|
|
43
|
+
setRotating(false);
|
|
44
|
+
if (key === current)
|
|
45
|
+
return;
|
|
46
|
+
setCurrent(key);
|
|
47
|
+
if (screenReader)
|
|
48
|
+
AccessibilityInfo.announceForAccessibility(resolved.find((slide) => slide.id === key).accessibleName);
|
|
49
|
+
}
|
|
50
|
+
function move(intent) { select(getCarouselNavigationTarget(descriptor, intent)); }
|
|
51
|
+
const swipe = PanResponder.create({
|
|
52
|
+
// A horizontal, deliberate gesture yields vertical scrolling and simple taps
|
|
53
|
+
// to card content. The control target token supplies the one-slide threshold.
|
|
54
|
+
onMoveShouldSetPanResponder: (_, { dx, dy }) => Math.abs(dx) > carouselRecipe.dot.hitTarget / 2 && Math.abs(dx) > Math.abs(dy),
|
|
55
|
+
onPanResponderGrant: () => setRotating(false),
|
|
56
|
+
onPanResponderRelease: (_, { dx }) => {
|
|
57
|
+
if (Math.abs(dx) >= carouselRecipe.dot.hitTarget)
|
|
58
|
+
move((dx < 0) !== (environment.direction === "rtl") ? "next" : "previous");
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
const selected = resolved.find((slide) => slide.current);
|
|
62
|
+
return _jsxs(View, { style: [{ gap: carouselRecipe.sizes.medium.gap, direction: environment.direction }, style], children: [autoplay ? _jsx(Button, { tone: "ghost", disabled: environment.reducedMotion || screenReader, onPress: () => { if (last)
|
|
63
|
+
setCurrent(slides[0].id); setRotating(!rotating || last); }, children: rotating && !last && !environment.reducedMotion && !screenReader ? labels.pause : labels.resume }) : null, _jsx(View, { ...swipe.panHandlers, onTouchStart: () => setRotating(false), onFocus: () => setRotating(false), children: resolved.map((slide) => _jsx(View, { style: slide.inert ? { display: "none" } : undefined, accessibilityElementsHidden: slide.inert, importantForAccessibility: slide.inert ? "no-hide-descendants" : "auto", pointerEvents: slide.inert ? "none" : "auto", children: renderSlide(slide) }, slide.id)) }), _jsx(View, { accessible: true, accessibilityRole: "adjustable", accessibilityLabel: `${label}: ${selected.accessibleName}`, accessibilityValue: { min: 1, max: slides.length, now: selected.position, text: selected.accessibleName }, accessibilityActions: [{ name: "increment", label: labels.next }, { name: "decrement", label: labels.previous }], onAccessibilityAction: ({ nativeEvent }) => { if (nativeEvent.actionName === "increment")
|
|
64
|
+
move("next"); if (nativeEvent.actionName === "decrement")
|
|
65
|
+
move("previous"); }, children: _jsx(Text, { align: "center", variant: "caption", children: selected.accessibleName }) }), _jsxs(View, { accessibilityLabel: labels.navigation, onFocus: () => setRotating(false), style: { flexDirection: "row", flexWrap: "wrap", gap: tokens.spacing.xs, justifyContent: "center" }, children: [_jsx(Button, { tone: "ghost", disabled: current === slides[0].id, onPress: () => move("previous"), children: labels.previous }), resolved.map((slide) => _jsx(Button, { tone: slide.current ? "secondary" : "ghost", accessibilityLabel: slide.accessibleName, accessibilityState: { selected: slide.current }, onPress: () => select(slide.id), children: String(slide.position) }, slide.id)), _jsx(Button, { tone: "ghost", disabled: last, onPress: () => move("next"), children: labels.next })] })] });
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../src/carousel.tsx"],"names":[],"mappings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AAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,YAAG,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAD/G,KAAK,CAAC,EAAE,CACiH,CAAC,EAChK,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,YAAG,MAAM,CAAC,IAAI,GAAU,IACnF,IACF,CAAC;AACV,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CollapsibleOpenState } from "@hjmds/design-contracts/components/collapsible";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export type CollapsibleProps = CollapsibleOpenState & Readonly<{
|
|
5
|
+
/** The control's label; it also tells the user what will appear. */
|
|
6
|
+
trigger: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function Collapsible({ trigger, children, disabled, style, ...openState }: CollapsibleProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../src/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG/E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GACjD,QAAQ,CAAC;IACP,oEAAoE;IACpE,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEL,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAgB,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,EAAE,gBAAgB,+BA8BzG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { collapsibleRecipe, validateCollapsibleOpenState, } from "@hjmds/design-contracts/components/collapsible";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Pressable, View } from "react-native";
|
|
5
|
+
import { Text } from "./primitives.js";
|
|
6
|
+
export function Collapsible({ trigger, children, disabled = false, style, ...openState }) {
|
|
7
|
+
validateCollapsibleOpenState(openState);
|
|
8
|
+
const controlled = openState.open !== undefined;
|
|
9
|
+
const [internalOpen, setInternalOpen] = useState(openState.defaultOpen ?? false);
|
|
10
|
+
const open = openState.open ?? internalOpen;
|
|
11
|
+
return (_jsxs(View, { style: [{ gap: collapsibleRecipe.gap }, style], children: [_jsxs(Pressable, { accessibilityRole: "button", accessibilityState: { expanded: open, disabled }, disabled: disabled, onPress: () => {
|
|
12
|
+
const next = !open;
|
|
13
|
+
if (!controlled)
|
|
14
|
+
setInternalOpen(next);
|
|
15
|
+
openState.onOpenChange?.(next);
|
|
16
|
+
}, style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: collapsibleRecipe.gap }, children: [typeof trigger === "string" ? _jsx(Text, { children: trigger }) : trigger, _jsx(Text, { accessibilityElementsHidden: true, importantForAccessibility: "no", children: open ? "▾" : "▸" })] }), open ? _jsx(View, { children: children }) : null] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.js","sourceRoot":"","sources":["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AE,aAEjH,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAC,IAAI,cAAE,OAAO,GAAQ,CAAC,CAAC,CAAC,OAAO,EAE/D,KAAC,IAAI,IAAC,2BAA2B,QAAC,yBAAyB,EAAC,IAAI,YAAE,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAQ,IAChF,EAMX,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,cAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,IACjC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC9B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EACpB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQ/E,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE/E,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;IACxD,UAAU,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC9D,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,OAAO,EAAE,EAClC,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAe,EACf,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,KAAK,GACN,EAAE,eAAe,CAAC,OAAO,CAAC,+BAkE1B"}
|
package/dist/date-picker.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import {} from "@hjmds/design-contracts/components/calendar";
|
|
3
|
+
import { resolveDatePickerTriggerText, validateDatePickerDescriptor, } from "@hjmds/design-contracts/components/date-picker";
|
|
4
4
|
import { useRef, useState } from "react";
|
|
5
5
|
import { Pressable, View } from "react-native";
|
|
6
|
+
import { Calendar } from "./calendar.js";
|
|
6
7
|
import { minimumTargetStyle } from "./internal/styles.js";
|
|
7
8
|
import { Sheet } from "./overlays.js";
|
|
8
9
|
import { Text } from "./primitives.js";
|
|
@@ -17,7 +18,6 @@ export function DatePicker({ descriptor, monthLabel, composeAccessibleName, prev
|
|
|
17
18
|
const controlledSelection = descriptor.selectedDate !== undefined;
|
|
18
19
|
const [internalSelection, setInternalSelection] = useState(descriptor.defaultSelectedDate ?? null);
|
|
19
20
|
const selectedDate = controlledSelection ? descriptor.selectedDate ?? null : internalSelection;
|
|
20
|
-
const cells = resolveDatePickerGrid({ ...descriptor, selectedDate }, { composeAccessibleName });
|
|
21
21
|
const returnFocusRef = useRef(null);
|
|
22
22
|
const requestOpen = (next, reason) => {
|
|
23
23
|
if (!controlledOpen)
|
|
@@ -25,15 +25,22 @@ export function DatePicker({ descriptor, monthLabel, composeAccessibleName, prev
|
|
|
25
25
|
descriptor.onOpenChange?.(next, reason);
|
|
26
26
|
};
|
|
27
27
|
const commit = (date, reason) => {
|
|
28
|
+
// A controlled open field can become read-only while its grid remains mounted.
|
|
29
|
+
if (descriptor.disabled || descriptor.readOnly)
|
|
30
|
+
return;
|
|
28
31
|
if (!controlledSelection)
|
|
29
32
|
setInternalSelection(date);
|
|
30
33
|
descriptor.onSelectionChange?.(date, reason);
|
|
31
34
|
requestOpen(false, reason === "activate" ? "selection" : "clear");
|
|
32
35
|
};
|
|
36
|
+
// The outer field owns selection; the shared grid receives only its resolved controlled value.
|
|
37
|
+
const { defaultSelectedDate: _defaultSelectedDate, ...calendarDescriptor } = descriptor;
|
|
38
|
+
const calendarGrid = descriptor.disabled || descriptor.readOnly
|
|
39
|
+
? { ...descriptor.grid, cells: descriptor.grid.cells.map((cell) => cell.date ? { ...cell, disabled: true } : cell) }
|
|
40
|
+
: descriptor.grid;
|
|
33
41
|
const label = descriptor.label ?? descriptor.accessibilityLabel;
|
|
34
42
|
const triggerText = resolveDatePickerTriggerText(descriptor);
|
|
35
|
-
const sizeMetrics = calendarRecipe.sizes[size];
|
|
36
43
|
return (_jsxs(View, { style: [{ gap: 6 }, style], children: [descriptor.label === undefined ? null : _jsx(Text, { emphasis: "strong", variant: "label", children: descriptor.label }), _jsxs(View, { style: { alignItems: "center", direction: environment.direction, flexDirection: "row" }, children: [_jsxs(Pressable, { accessibilityLabel: descriptor.accessibilityLabel ?? `${label}, ${triggerText}`, accessibilityRole: "button", accessibilityState: { disabled: descriptor.disabled, expanded: open }, disabled: descriptor.disabled, onPress: () => !descriptor.readOnly && requestOpen(!open, "trigger"), ref: returnFocusRef, style: ({ pressed }) => ({ alignItems: "center", backgroundColor: colors.surface, borderColor: descriptor.invalid || error ? colors.danger : colors.border, borderRadius: 12, borderWidth: 1, flex: 1, flexDirection: "row", gap: 8, minHeight: size === "large" ? 56 : 48, opacity: pressed ? 0.72 : 1, paddingHorizontal: size === "large" ? 20 : 16 }), children: [_jsx(Text, { accessible: false, children: "\u25A3" }), _jsx(Text, { style: { color: descriptor.displayValue === null ? colors.textMuted : colors.textBody }, children: triggerText })] }), selectedDate === null ? null : (_jsx(Pressable, { accessibilityLabel: clearLabel, accessibilityRole: "button", disabled: descriptor.disabled || descriptor.readOnly, onPress: () => commit(null, "clear"), style: ({ pressed }) => [minimumTargetStyle, { alignItems: "center", justifyContent: "center", opacity: pressed ? 0.72 : 1 }], children: _jsx(Text, { tone: "muted", children: "\u00D7" }) }))] }), description === undefined ? null : _jsx(Text, { tone: "muted", variant: "label", children: description }), error === undefined ? null : _jsx(Text, { accessibilityLiveRegion: "assertive", style: { color: colors.danger }, variant: "label", children: error }), _jsx(Sheet, { closeLabel: closeLabel, onOpenChange: (next) => { if (!next)
|
|
37
|
-
requestOpen(false, "outside"); }, open: open, returnFocusRef: returnFocusRef, title:
|
|
44
|
+
requestOpen(false, "outside"); }, open: open, returnFocusRef: returnFocusRef, title: label, children: _jsx(Calendar, { descriptor: { ...calendarDescriptor, grid: calendarGrid, monthLabel, selectedDate, onSelectionChange: (date) => commit(date, "activate") }, composeAccessibleName: composeAccessibleName, size: size, ...(previousMonth ? { previousMonth } : {}), ...(nextMonth ? { nextMonth } : {}), ...(renderCellContent ? { renderCellContent } : {}) }) })] }));
|
|
38
45
|
}
|
|
39
46
|
//# sourceMappingURL=date-picker.js.map
|
package/dist/date-picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../src/date-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
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{ CalendarDescriptor, ComposeCalendarAccessibleName } from "@hjmds/design-contracts/components/calendar";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { type CalendarMonthAction } from "./calendar.js";
|
|
5
|
+
export type DateRangePickerProps<Content = unknown> = Readonly<{
|
|
6
|
+
/** The same grid Calendar renders; the product still owns month data. */
|
|
7
|
+
descriptor: Omit<CalendarDescriptor<Content>, "selectedDate" | "defaultSelectedDate" | "onSelectionChange">;
|
|
8
|
+
composeAccessibleName: ComposeCalendarAccessibleName<Content>;
|
|
9
|
+
value?: DateRangeValue;
|
|
10
|
+
defaultValue?: DateRangeValue;
|
|
11
|
+
onValueChange?: (value: DateRangeValue) => void;
|
|
12
|
+
previousMonth?: CalendarMonthAction;
|
|
13
|
+
nextMonth?: CalendarMonthAction;
|
|
14
|
+
/** Localized suffixes appended to a day's name when it is a range edge. */
|
|
15
|
+
rangeLabels: Readonly<{
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
between: string;
|
|
19
|
+
}>;
|
|
20
|
+
renderCellContent?: (date: string) => ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function DateRangePicker<Content = unknown>({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, renderCellContent, }: DateRangePickerProps<Content>): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=date-range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAInE,MAAM,MAAM,oBAAoB,CAAC,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC;IAC7D,yEAAyE;IACzE,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,CAAC;IAC5G,qBAAqB,EAAE,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAC9D,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAChD,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,2EAA2E;IAC3E,WAAW,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvE,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC;CACjD,CAAC,CAAC;AAEH,wBAAgB,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,GAClB,EAAE,oBAAoB,CAAC,OAAO,CAAC,+BAiD/B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { emptyDateRange, isCompleteDateRange, resolveDateRangeCellState, resolveDateRangeSelection, validateDateRange, } from "@hjmds/design-contracts/components/date-range";
|
|
3
|
+
import { spacing } from "@hjmds/design-contracts/foundations";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
import { Calendar } from "./calendar.js";
|
|
6
|
+
import { useControllableState } from "./internal/state.js";
|
|
7
|
+
import { useHjmNativeTheme } from "./provider.js";
|
|
8
|
+
export function DateRangePicker({ descriptor, composeAccessibleName, value: controlledValue, defaultValue, onValueChange, previousMonth, nextMonth, rangeLabels, renderCellContent, }) {
|
|
9
|
+
const [value, setValue] = useControllableState({
|
|
10
|
+
...(controlledValue === undefined ? {} : { value: controlledValue }),
|
|
11
|
+
defaultValue: defaultValue ?? emptyDateRange,
|
|
12
|
+
...(onValueChange === undefined ? {} : { onChange: onValueChange }),
|
|
13
|
+
});
|
|
14
|
+
validateDateRange(value);
|
|
15
|
+
const { colors } = useHjmNativeTheme();
|
|
16
|
+
const edge = colors.contentBrand;
|
|
17
|
+
return (_jsx(Calendar, { descriptor: {
|
|
18
|
+
...descriptor,
|
|
19
|
+
// Calendar keeps single selection. There is no hover on a phone, so the
|
|
20
|
+
// range's edges live only in each day's name — the one channel a screen
|
|
21
|
+
// reader and a sighted user both get here.
|
|
22
|
+
selectedDate: value.end ?? value.start,
|
|
23
|
+
onSelectionChange: (date) => { if (date !== null)
|
|
24
|
+
setValue(resolveDateRangeSelection(value, date)); },
|
|
25
|
+
}, composeAccessibleName: (info) => {
|
|
26
|
+
const state = resolveDateRangeCellState(value, info.date, null);
|
|
27
|
+
const base = composeAccessibleName(info);
|
|
28
|
+
return state === "none" ? base : `${base}, ${rangeLabels[state]}`;
|
|
29
|
+
}, ...(previousMonth === undefined ? {} : { previousMonth }), ...(nextMonth === undefined ? {} : { nextMonth }), renderCellContent: (cell) => {
|
|
30
|
+
const state = resolveDateRangeCellState(value, cell.date, null);
|
|
31
|
+
if (state === "none")
|
|
32
|
+
return renderCellContent?.(cell.date) ?? null;
|
|
33
|
+
// No CSS band on native, and no hover to preview one. A dot under the
|
|
34
|
+
// day is the visual channel that survives; the name carries the rest.
|
|
35
|
+
return (_jsxs(View, { style: { alignItems: "center", gap: spacing.xxs }, children: [renderCellContent?.(cell.date) ?? null, _jsx(View, { style: {
|
|
36
|
+
width: state === "between" ? 4 : 6,
|
|
37
|
+
height: state === "between" ? 4 : 6,
|
|
38
|
+
borderRadius: 999,
|
|
39
|
+
backgroundColor: edge,
|
|
40
|
+
// A half-built range is not the same as a chosen one.
|
|
41
|
+
opacity: isCompleteDateRange(value) ? 1 : 0.5,
|
|
42
|
+
} })] }));
|
|
43
|
+
} }));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=date-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range.js","sourceRoot":"","sources":["../src/date-range.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,GAElB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAA4B,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAgBlD,MAAM,UAAU,eAAe,CAAoB,EACjD,UAAU,EACV,qBAAqB,EACrB,KAAK,EAAE,eAAe,EACtB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,GACa;IAC9B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,oBAAoB,CAAiB;QAC7D,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC;QACpE,YAAY,EAAE,YAAY,IAAI,cAAc;QAC5C,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;KACpE,CAAC,CAAC;IACH,iBAAiB,CAAC,K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sE;YACtE,sEAAsE;YACtE,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,aACpD,iBAAiB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,EACvC,KAAC,IAAI,IACH,KAAK,EAAE;4BACL,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAClC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BACnC,YAAY,EAAE,GAAG;4BACjB,eAAe,EAAE,IAAI;4BACrB,sDAAsD;4BACtD,OAAO,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;yBAC9C,GACD,IACG,CACR,CAAC;QACJ,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
|
package/dist/evidence.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type ReactNativeRendererEvidenceManifest = Readonly<{
|
|
|
32
32
|
export declare const reactNativeRendererEvidence: {
|
|
33
33
|
readonly schemaVersion: 2;
|
|
34
34
|
readonly packageName: "@hjmds/react-native";
|
|
35
|
-
readonly packageVersion: "1.
|
|
35
|
+
readonly packageVersion: "1.3.4";
|
|
36
36
|
readonly surface: "native";
|
|
37
37
|
readonly components: readonly [Readonly<{
|
|
38
38
|
/** Canonical component id from the design-contracts catalog. */
|
|
@@ -979,6 +979,246 @@ export declare const reactNativeRendererEvidence: {
|
|
|
979
979
|
file: `test/${string}.test.tsx`;
|
|
980
980
|
caseId: string;
|
|
981
981
|
}>[];
|
|
982
|
+
}>, Readonly<{
|
|
983
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
984
|
+
componentId: string;
|
|
985
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
986
|
+
exportNames: readonly string[];
|
|
987
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
988
|
+
subpath: `./${string}`;
|
|
989
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
990
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
991
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
992
|
+
proofs: readonly Readonly<{
|
|
993
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
994
|
+
file: `test/${string}.test.tsx`;
|
|
995
|
+
caseId: string;
|
|
996
|
+
}>[];
|
|
997
|
+
}>, Readonly<{
|
|
998
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
999
|
+
componentId: string;
|
|
1000
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1001
|
+
exportNames: readonly string[];
|
|
1002
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1003
|
+
subpath: `./${string}`;
|
|
1004
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1005
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1006
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1007
|
+
proofs: readonly Readonly<{
|
|
1008
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1009
|
+
file: `test/${string}.test.tsx`;
|
|
1010
|
+
caseId: string;
|
|
1011
|
+
}>[];
|
|
1012
|
+
}>, Readonly<{
|
|
1013
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1014
|
+
componentId: string;
|
|
1015
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1016
|
+
exportNames: readonly string[];
|
|
1017
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1018
|
+
subpath: `./${string}`;
|
|
1019
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1020
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1021
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1022
|
+
proofs: readonly Readonly<{
|
|
1023
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1024
|
+
file: `test/${string}.test.tsx`;
|
|
1025
|
+
caseId: string;
|
|
1026
|
+
}>[];
|
|
1027
|
+
}>, Readonly<{
|
|
1028
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1029
|
+
componentId: string;
|
|
1030
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1031
|
+
exportNames: readonly string[];
|
|
1032
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1033
|
+
subpath: `./${string}`;
|
|
1034
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1035
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1036
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1037
|
+
proofs: readonly Readonly<{
|
|
1038
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1039
|
+
file: `test/${string}.test.tsx`;
|
|
1040
|
+
caseId: string;
|
|
1041
|
+
}>[];
|
|
1042
|
+
}>, Readonly<{
|
|
1043
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1044
|
+
componentId: string;
|
|
1045
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1046
|
+
exportNames: readonly string[];
|
|
1047
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1048
|
+
subpath: `./${string}`;
|
|
1049
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1050
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1051
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1052
|
+
proofs: readonly Readonly<{
|
|
1053
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1054
|
+
file: `test/${string}.test.tsx`;
|
|
1055
|
+
caseId: string;
|
|
1056
|
+
}>[];
|
|
1057
|
+
}>, Readonly<{
|
|
1058
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1059
|
+
componentId: string;
|
|
1060
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1061
|
+
exportNames: readonly string[];
|
|
1062
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1063
|
+
subpath: `./${string}`;
|
|
1064
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1065
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1066
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1067
|
+
proofs: readonly Readonly<{
|
|
1068
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1069
|
+
file: `test/${string}.test.tsx`;
|
|
1070
|
+
caseId: string;
|
|
1071
|
+
}>[];
|
|
1072
|
+
}>, Readonly<{
|
|
1073
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1074
|
+
componentId: string;
|
|
1075
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1076
|
+
exportNames: readonly string[];
|
|
1077
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1078
|
+
subpath: `./${string}`;
|
|
1079
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1080
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1081
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1082
|
+
proofs: readonly Readonly<{
|
|
1083
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1084
|
+
file: `test/${string}.test.tsx`;
|
|
1085
|
+
caseId: string;
|
|
1086
|
+
}>[];
|
|
1087
|
+
}>, Readonly<{
|
|
1088
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1089
|
+
componentId: string;
|
|
1090
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1091
|
+
exportNames: readonly string[];
|
|
1092
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1093
|
+
subpath: `./${string}`;
|
|
1094
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1095
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1096
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1097
|
+
proofs: readonly Readonly<{
|
|
1098
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1099
|
+
file: `test/${string}.test.tsx`;
|
|
1100
|
+
caseId: string;
|
|
1101
|
+
}>[];
|
|
1102
|
+
}>, Readonly<{
|
|
1103
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1104
|
+
componentId: string;
|
|
1105
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1106
|
+
exportNames: readonly string[];
|
|
1107
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1108
|
+
subpath: `./${string}`;
|
|
1109
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1110
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1111
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1112
|
+
proofs: readonly Readonly<{
|
|
1113
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1114
|
+
file: `test/${string}.test.tsx`;
|
|
1115
|
+
caseId: string;
|
|
1116
|
+
}>[];
|
|
1117
|
+
}>, Readonly<{
|
|
1118
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1119
|
+
componentId: string;
|
|
1120
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1121
|
+
exportNames: readonly string[];
|
|
1122
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1123
|
+
subpath: `./${string}`;
|
|
1124
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1125
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1126
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1127
|
+
proofs: readonly Readonly<{
|
|
1128
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1129
|
+
file: `test/${string}.test.tsx`;
|
|
1130
|
+
caseId: string;
|
|
1131
|
+
}>[];
|
|
1132
|
+
}>, Readonly<{
|
|
1133
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1134
|
+
componentId: string;
|
|
1135
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1136
|
+
exportNames: readonly string[];
|
|
1137
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1138
|
+
subpath: `./${string}`;
|
|
1139
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1140
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1141
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1142
|
+
proofs: readonly Readonly<{
|
|
1143
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1144
|
+
file: `test/${string}.test.tsx`;
|
|
1145
|
+
caseId: string;
|
|
1146
|
+
}>[];
|
|
1147
|
+
}>, Readonly<{
|
|
1148
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1149
|
+
componentId: string;
|
|
1150
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1151
|
+
exportNames: readonly string[];
|
|
1152
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1153
|
+
subpath: `./${string}`;
|
|
1154
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1155
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1156
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1157
|
+
proofs: readonly Readonly<{
|
|
1158
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1159
|
+
file: `test/${string}.test.tsx`;
|
|
1160
|
+
caseId: string;
|
|
1161
|
+
}>[];
|
|
1162
|
+
}>, Readonly<{
|
|
1163
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1164
|
+
componentId: string;
|
|
1165
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1166
|
+
exportNames: readonly string[];
|
|
1167
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1168
|
+
subpath: `./${string}`;
|
|
1169
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1170
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1171
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1172
|
+
proofs: readonly Readonly<{
|
|
1173
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1174
|
+
file: `test/${string}.test.tsx`;
|
|
1175
|
+
caseId: string;
|
|
1176
|
+
}>[];
|
|
1177
|
+
}>, Readonly<{
|
|
1178
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1179
|
+
componentId: string;
|
|
1180
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1181
|
+
exportNames: readonly string[];
|
|
1182
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1183
|
+
subpath: `./${string}`;
|
|
1184
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1185
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1186
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1187
|
+
proofs: readonly Readonly<{
|
|
1188
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1189
|
+
file: `test/${string}.test.tsx`;
|
|
1190
|
+
caseId: string;
|
|
1191
|
+
}>[];
|
|
1192
|
+
}>, Readonly<{
|
|
1193
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1194
|
+
componentId: string;
|
|
1195
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1196
|
+
exportNames: readonly string[];
|
|
1197
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1198
|
+
subpath: `./${string}`;
|
|
1199
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1200
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1201
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1202
|
+
proofs: readonly Readonly<{
|
|
1203
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1204
|
+
file: `test/${string}.test.tsx`;
|
|
1205
|
+
caseId: string;
|
|
1206
|
+
}>[];
|
|
1207
|
+
}>, Readonly<{
|
|
1208
|
+
/** Canonical component id from the design-contracts catalog. */
|
|
1209
|
+
componentId: string;
|
|
1210
|
+
/** Public symbols that implement this contract on the declared subpath. */
|
|
1211
|
+
exportNames: readonly string[];
|
|
1212
|
+
/** Granular @hjmds/react-native export used by consumers. */
|
|
1213
|
+
subpath: `./${string}`;
|
|
1214
|
+
/** Scenarios supported by automated first-party renderer evidence. */
|
|
1215
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1216
|
+
/** Repository-local executable proof for every claimed scenario. */
|
|
1217
|
+
proofs: readonly Readonly<{
|
|
1218
|
+
scenarios: readonly ReactNativeRendererEvidenceScenario[];
|
|
1219
|
+
file: `test/${string}.test.tsx`;
|
|
1220
|
+
caseId: string;
|
|
1221
|
+
}>[];
|
|
982
1222
|
}>];
|
|
983
1223
|
};
|
|
984
1224
|
//# sourceMappingURL=evidence.d.ts.map
|