@kanso-labs/react-native-kanso-ui 0.11.5 → 0.11.7
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 +15 -1
- package/dist/autocomplete/index.js +1 -2
- package/dist/badge/index.js +1 -2
- package/dist/button/group.js +1 -2
- package/dist/button/index.d.ts +0 -2
- package/dist/button/index.js +1 -2
- package/dist/button/palettes.js +1 -2
- package/dist/button/pending.js +1 -2
- package/dist/button/slots.js +1 -2
- package/dist/calendar/index.js +1 -2
- package/dist/calendar/styles.js +1 -2
- package/dist/carousel/arrangement.d.ts +0 -2
- package/dist/carousel/arrangement.js +0 -1
- package/dist/chequer/index.js +1 -2
- package/dist/chip/index.js +1 -2
- package/dist/chip/styles.js +0 -1
- package/dist/clipboard/index.js +1 -2
- package/dist/collection/index.d.ts +0 -2
- package/dist/collection/index.js +1 -2
- package/dist/color-thumb/index.js +1 -2
- package/dist/components/app-bar/index.d.ts +0 -2
- package/dist/components/app-bar/index.js +1 -2
- package/dist/components/autocomplete/index.d.ts +0 -2
- package/dist/components/autocomplete/index.js +1 -2
- package/dist/components/avatar/index.d.ts +0 -2
- package/dist/components/avatar/index.js +1 -2
- package/dist/components/badge/index.d.ts +0 -2
- package/dist/components/badge/index.js +1 -2
- package/dist/components/badge/styles.js +1 -2
- package/dist/components/breadcrumbs/index.d.ts +0 -2
- package/dist/components/breadcrumbs/index.js +1 -2
- package/dist/components/button/index.d.ts +0 -2
- package/dist/components/button/index.js +1 -2
- package/dist/components/button-group/index.d.ts +0 -2
- package/dist/components/button-group/index.js +1 -2
- package/dist/components/calendar/index.d.ts +0 -2
- package/dist/components/calendar/index.js +1 -2
- package/dist/components/card/index.d.ts +0 -2
- package/dist/components/card/index.js +1 -2
- package/dist/components/carousel/index.d.ts +0 -2
- package/dist/components/carousel/index.js +1 -2
- package/dist/components/checkbox/index.d.ts +0 -2
- package/dist/components/checkbox/index.js +1 -2
- package/dist/components/checkbox-group/index.d.ts +0 -2
- package/dist/components/checkbox-group/index.js +1 -2
- package/dist/components/chip/index.d.ts +0 -2
- package/dist/components/chip/index.js +1 -2
- package/dist/components/chip-group/index.d.ts +0 -2
- package/dist/components/chip-group/index.js +1 -2
- package/dist/components/code/index.d.ts +0 -2
- package/dist/components/code/index.js +1 -2
- package/dist/components/color-area/index.d.ts +0 -2
- package/dist/components/color-area/index.js +1 -2
- package/dist/components/color-field/index.d.ts +0 -2
- package/dist/components/color-field/index.js +1 -2
- package/dist/components/color-picker/index.d.ts +0 -2
- package/dist/components/color-picker/index.js +1 -2
- package/dist/components/color-slider/index.d.ts +0 -2
- package/dist/components/color-slider/index.js +1 -2
- package/dist/components/color-swatch/index.d.ts +0 -2
- package/dist/components/color-swatch/index.js +1 -2
- package/dist/components/color-swatch-picker/index.d.ts +0 -2
- package/dist/components/color-swatch-picker/index.js +1 -2
- package/dist/components/color-wheel/index.d.ts +0 -2
- package/dist/components/color-wheel/index.js +1 -2
- package/dist/components/combo-box/index.d.ts +0 -2
- package/dist/components/combo-box/index.js +1 -2
- package/dist/components/container/index.d.ts +0 -2
- package/dist/components/container/index.js +1 -2
- package/dist/components/copy-field/index.d.ts +0 -2
- package/dist/components/copy-field/index.js +1 -2
- package/dist/components/currency/index.d.ts +0 -2
- package/dist/components/currency/index.js +1 -2
- package/dist/components/date-field/index.d.ts +0 -2
- package/dist/components/date-field/index.js +1 -2
- package/dist/components/date-picker/index.d.ts +0 -2
- package/dist/components/date-picker/index.js +1 -2
- package/dist/components/date-range-picker/index.d.ts +0 -2
- package/dist/components/date-range-picker/index.js +1 -2
- package/dist/components/dialog/index.d.ts +0 -2
- package/dist/components/dialog/index.js +1 -2
- package/dist/components/disclosure/index.d.ts +0 -2
- package/dist/components/disclosure/index.js +1 -2
- package/dist/components/disclosure-group/index.d.ts +0 -2
- package/dist/components/disclosure-group/index.js +1 -2
- package/dist/components/drop-zone/index.d.ts +0 -2
- package/dist/components/drop-zone/index.js +1 -2
- package/dist/components/fab/index.d.ts +0 -2
- package/dist/components/fab/index.js +1 -2
- package/dist/components/fab-menu/index.d.ts +0 -2
- package/dist/components/fab-menu/index.js +1 -2
- package/dist/components/feed/index.d.ts +0 -2
- package/dist/components/feed/index.js +1 -2
- package/dist/components/form/index.d.ts +0 -2
- package/dist/components/form/index.js +1 -2
- package/dist/components/icon-button/index.d.ts +0 -2
- package/dist/components/icon-button/index.js +1 -2
- package/dist/components/keycap/index.d.ts +0 -2
- package/dist/components/keycap/index.js +1 -2
- package/dist/components/link/index.d.ts +0 -2
- package/dist/components/link/index.js +1 -2
- package/dist/components/list/index.d.ts +0 -2
- package/dist/components/list/index.js +1 -2
- package/dist/components/list-box/index.d.ts +0 -2
- package/dist/components/list-box/index.js +1 -2
- package/dist/components/list-detail/index.d.ts +0 -2
- package/dist/components/list-detail/index.js +1 -2
- package/dist/components/list-item/index.d.ts +0 -2
- package/dist/components/list-item/index.js +1 -2
- package/dist/components/loading-indicator/index.d.ts +0 -2
- package/dist/components/loading-indicator/index.js +1 -2
- package/dist/components/menu/index.d.ts +0 -2
- package/dist/components/menu/index.js +1 -2
- package/dist/components/meter/index.d.ts +0 -2
- package/dist/components/meter/index.js +1 -2
- package/dist/components/navigation-bar/index.d.ts +0 -2
- package/dist/components/navigation-bar/index.js +1 -2
- package/dist/components/navigation-rail/index.d.ts +0 -2
- package/dist/components/navigation-rail/index.js +1 -2
- package/dist/components/navigation-tree/index.d.ts +0 -2
- package/dist/components/navigation-tree/index.js +1 -2
- package/dist/components/number-field/index.d.ts +0 -2
- package/dist/components/number-field/index.js +1 -2
- package/dist/components/popover/index.d.ts +0 -2
- package/dist/components/popover/index.js +1 -2
- package/dist/components/product-icon/index.d.ts +0 -2
- package/dist/components/product-icon/index.js +1 -2
- package/dist/components/progress-indicator/index.d.ts +0 -2
- package/dist/components/progress-indicator/index.js +1 -2
- package/dist/components/radio-group/index.d.ts +0 -2
- package/dist/components/radio-group/index.js +1 -2
- package/dist/components/range-calendar/index.d.ts +0 -2
- package/dist/components/range-calendar/index.js +1 -2
- package/dist/components/search-field/index.d.ts +0 -2
- package/dist/components/search-field/index.js +1 -2
- package/dist/components/search-view/index.d.ts +0 -2
- package/dist/components/search-view/index.js +1 -2
- package/dist/components/segmented-button/index.d.ts +0 -2
- package/dist/components/segmented-button/index.js +1 -2
- package/dist/components/select/index.d.ts +0 -2
- package/dist/components/select/index.js +1 -2
- package/dist/components/separator/index.d.ts +0 -2
- package/dist/components/separator/index.js +1 -2
- package/dist/components/sheet/index.d.ts +0 -2
- package/dist/components/sheet/index.js +1 -2
- package/dist/components/slider/index.d.ts +0 -2
- package/dist/components/slider/index.js +1 -2
- package/dist/components/snackbar/index.d.ts +0 -2
- package/dist/components/snackbar/index.js +1 -2
- package/dist/components/split-button/index.d.ts +0 -2
- package/dist/components/split-button/index.js +1 -2
- package/dist/components/stack/index.d.ts +0 -2
- package/dist/components/stack/index.js +1 -2
- package/dist/components/supporting-pane/index.d.ts +0 -2
- package/dist/components/supporting-pane/index.js +1 -2
- package/dist/components/switch/index.d.ts +0 -2
- package/dist/components/switch/index.js +1 -2
- package/dist/components/table/index.d.ts +0 -2
- package/dist/components/table/index.js +1 -2
- package/dist/components/tabs/index.d.ts +0 -2
- package/dist/components/tabs/index.js +1 -2
- package/dist/components/tag/index.d.ts +0 -2
- package/dist/components/tag/index.js +1 -2
- package/dist/components/text/index.d.ts +0 -2
- package/dist/components/text/index.js +1 -2
- package/dist/components/text-area/index.d.ts +0 -2
- package/dist/components/text-area/index.js +1 -2
- package/dist/components/text-field/index.d.ts +0 -2
- package/dist/components/text-field/index.js +1 -2
- package/dist/components/time-field/index.d.ts +0 -2
- package/dist/components/time-field/index.js +1 -2
- package/dist/components/time-picker/index.d.ts +0 -2
- package/dist/components/time-picker/index.js +1 -2
- package/dist/components/token-field/index.d.ts +0 -2
- package/dist/components/token-field/index.js +1 -2
- package/dist/components/toolbar/index.d.ts +0 -2
- package/dist/components/toolbar/index.js +1 -2
- package/dist/components/tooltip/index.d.ts +0 -2
- package/dist/components/tooltip/index.js +1 -2
- package/dist/components/tree/index.d.ts +0 -2
- package/dist/components/tree/index.js +1 -2
- package/dist/control/checkbox-box.js +1 -2
- package/dist/control/group.js +1 -2
- package/dist/control/index.js +1 -2
- package/dist/control/styles.js +0 -1
- package/dist/disclosure/chevron.js +1 -2
- package/dist/disclosure/index.js +1 -2
- package/dist/drop/index.d.ts +0 -2
- package/dist/drop/index.js +1 -2
- package/dist/fab/index.d.ts +0 -2
- package/dist/fab/index.js +1 -2
- package/dist/field/chevron.js +1 -2
- package/dist/field/index.d.ts +0 -2
- package/dist/field/index.js +1 -2
- package/dist/field/styles.js +1 -2
- package/dist/files/index.d.ts +0 -2
- package/dist/files/index.js +1 -2
- package/dist/form/index.d.ts +0 -2
- package/dist/form/index.js +1 -2
- package/dist/glyphs/hidden.js +1 -2
- package/dist/glyphs/icon-style.d.ts +0 -2
- package/dist/glyphs/icon-style.js +1 -2
- package/dist/glyphs/index.js +1 -2
- package/dist/glyphs/styles.js +1 -2
- package/dist/hooks/useAppBarScroll.d.ts +0 -2
- package/dist/hooks/useAppBarScroll.js +0 -1
- package/dist/hooks/useWindowSizeClass.d.ts +0 -2
- package/dist/hooks/useWindowSizeClass.js +1 -2
- package/dist/i18n/index.js +1 -2
- package/dist/i18n/messages.js +1 -2
- package/dist/i18n/provider.d.ts +0 -2
- package/dist/i18n/provider.js +1 -2
- package/dist/indicator/index.d.ts +0 -2
- package/dist/indicator/index.js +1 -2
- package/dist/indicator/motion.js +1 -2
- package/dist/indicator/paths.js +1 -2
- package/dist/indicator/styles.js +0 -1
- package/dist/kanso-ui-core/defaults-DMH0HWCw.d.ts +0 -2
- package/dist/kanso-ui-core/glyphs.js +1 -2
- package/dist/kanso-ui-core/index.js +1 -2
- package/dist/mark/image.js +1 -2
- package/dist/mark/index.d.ts +0 -2
- package/dist/mark/index.js +1 -2
- package/dist/mark/initials.js +1 -2
- package/dist/mark/styles.js +1 -2
- package/dist/modal/index.d.ts +0 -2
- package/dist/modal/index.js +1 -2
- package/dist/navigation/index.d.ts +0 -2
- package/dist/navigation/index.js +1 -2
- package/dist/navigation/styles.js +1 -2
- package/dist/number/count.js +1 -2
- package/dist/number/keyboard.js +1 -2
- package/dist/number/locale.js +1 -2
- package/dist/number/parser.js +1 -2
- package/dist/number/state.js +1 -2
- package/dist/overlay/anchored.js +1 -2
- package/dist/overlay/host.js +1 -2
- package/dist/overlay/keyboard.js +1 -2
- package/dist/overlay/panel.js +1 -2
- package/dist/overlay/placement.d.ts +0 -2
- package/dist/overlay/placement.js +1 -2
- package/dist/picker/index.js +1 -2
- package/dist/press/index.js +0 -1
- package/dist/press/styles.js +1 -2
- package/dist/ref/index.js +1 -2
- package/dist/router/index.d.ts +0 -2
- package/dist/router/index.js +1 -2
- package/dist/row/index.js +1 -2
- package/dist/row/styles.js +1 -2
- package/dist/segments/field.js +1 -2
- package/dist/segments/index.js +1 -2
- package/dist/segments/styles.js +1 -2
- package/dist/separator/index.js +1 -2
- package/dist/slider/index.js +1 -2
- package/dist/swatch/index.js +1 -2
- package/dist/theme/color.js +1 -2
- package/dist/theme/resolve.d.ts +0 -2
- package/dist/theme/resolve.js +1 -2
- package/dist/theme/scope.d.ts +0 -2
- package/dist/theme/scope.js +1 -2
- package/dist/theme/styles.js +1 -2
- package/dist/theme-scope.d.ts +0 -2
- package/dist/theme-scope.js +1 -2
- package/dist/typography/fonts.js +1 -2
- package/dist/typography/roles.d.ts +0 -2
- package/dist/typography/roles.js +1 -2
- package/dist/typography/size.js +1 -2
- package/package.json +4 -4
package/dist/number/state.js
CHANGED
|
@@ -2,7 +2,7 @@ import { NumberParser } from "./parser.js";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { NumberFormatter } from "@internationalized/number";
|
|
5
|
-
|
|
5
|
+
// src/number/state.ts
|
|
6
6
|
function clamp(value, min = -Infinity, max = Infinity) {
|
|
7
7
|
return Math.min(Math.max(value, min), max);
|
|
8
8
|
}
|
|
@@ -229,7 +229,6 @@ function useNumberFieldState(t0) {
|
|
|
229
229
|
} else t15 = $[44];
|
|
230
230
|
return t15;
|
|
231
231
|
}
|
|
232
|
-
//#endregion
|
|
233
232
|
export { useNumberFieldState };
|
|
234
233
|
|
|
235
234
|
//# sourceMappingURL=state.js.map
|
package/dist/overlay/anchored.js
CHANGED
|
@@ -6,7 +6,7 @@ import { c } from "react/compiler-runtime";
|
|
|
6
6
|
import { Dimensions, I18nManager, useWindowDimensions } from "react-native";
|
|
7
7
|
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
8
8
|
import { use, useEffect, useState } from "react";
|
|
9
|
-
|
|
9
|
+
// src/overlay/anchored.ts
|
|
10
10
|
const HIDDEN = {
|
|
11
11
|
left: 0,
|
|
12
12
|
opacity: 0,
|
|
@@ -206,7 +206,6 @@ function useAnchoredPlacement(t0) {
|
|
|
206
206
|
} else t14 = $[38];
|
|
207
207
|
return t14;
|
|
208
208
|
}
|
|
209
|
-
//#endregion
|
|
210
209
|
export { useAnchoredPlacement };
|
|
211
210
|
|
|
212
211
|
//# sourceMappingURL=anchored.js.map
|
package/dist/overlay/host.js
CHANGED
|
@@ -4,7 +4,7 @@ import { c } from "react/compiler-runtime";
|
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import { createContext, use, useId, useLayoutEffect, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/overlay/host.tsx
|
|
8
8
|
const OverlayHostContext = createContext(null);
|
|
9
9
|
const styles = StyleSheet.create({ fill: {
|
|
10
10
|
bottom: 0,
|
|
@@ -177,7 +177,6 @@ function storeFor() {
|
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
//#endregion
|
|
181
180
|
export { Overlay, OverlayHost, OverlayHostContext };
|
|
182
181
|
|
|
183
182
|
//# sourceMappingURL=host.js.map
|
package/dist/overlay/keyboard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { Keyboard, Platform } from "react-native";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
|
|
4
|
+
// src/overlay/keyboard.ts
|
|
5
5
|
function topOf(metrics) {
|
|
6
6
|
return metrics === void 0 || metrics === null || metrics.height === 0 ? null : metrics.screenY;
|
|
7
7
|
}
|
|
@@ -51,7 +51,6 @@ function watchKeyboard(listener) {
|
|
|
51
51
|
for (const subscription of subscriptions) subscription.remove();
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
//#endregion
|
|
55
54
|
export { useKeyboardTop, watchKeyboard };
|
|
56
55
|
|
|
57
56
|
//# sourceMappingURL=keyboard.js.map
|
package/dist/overlay/panel.js
CHANGED
|
@@ -4,7 +4,7 @@ import { AccessibilityInfo, BackHandler, I18nManager, Platform, Pressable, Style
|
|
|
4
4
|
import { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from "react-native-reanimated";
|
|
5
5
|
import { useEffect, useRef } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/overlay/panel.tsx
|
|
8
8
|
const SCALE_FROM = .95;
|
|
9
9
|
/** The edge a panel grows from, the one facing its anchor. */
|
|
10
10
|
const PANEL_ORIGINS = {
|
|
@@ -363,7 +363,6 @@ function useReturnFocus(present, quiet, trigger) {
|
|
|
363
363
|
} else t1 = $[7];
|
|
364
364
|
useEffect(t0, t1);
|
|
365
365
|
}
|
|
366
|
-
//#endregion
|
|
367
366
|
export { DismissLayer, PANEL_ORIGINS, useBackToClose, useFocusOnPlaced, usePanelMotion, usePanelShown, usePanelStyle, useReturnFocus };
|
|
368
367
|
|
|
369
368
|
//# sourceMappingURL=panel.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
//#region src/overlay/placement.d.ts
|
|
2
1
|
/** Where along that side it lines up with the anchor. */
|
|
3
2
|
type OverlayAlign = 'center' | 'end' | 'start';
|
|
4
3
|
/** Which side of the anchor a surface opens on. */
|
|
5
4
|
type OverlaySide = 'bottom' | 'left' | 'right' | 'top';
|
|
6
|
-
//#endregion
|
|
7
5
|
export type { OverlayAlign, OverlaySide };
|
|
8
6
|
//# sourceMappingURL=placement.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/overlay/placement.ts
|
|
2
2
|
const OPPOSITE = {
|
|
3
3
|
bottom: "top",
|
|
4
4
|
left: "right",
|
|
@@ -95,7 +95,6 @@ function within(position, start, length, size) {
|
|
|
95
95
|
if (position + size > start + length) return Math.max(start + length - size, start);
|
|
96
96
|
return position;
|
|
97
97
|
}
|
|
98
|
-
//#endregion
|
|
99
98
|
export { aboveKeyboard, boundsOf, place };
|
|
100
99
|
|
|
101
100
|
//# sourceMappingURL=placement.js.map
|
package/dist/picker/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
|
14
14
|
import { SafeAreaInsetsContext } from "react-native-safe-area-context";
|
|
15
15
|
import { use, useEffect, useEffectEvent, useState } from "react";
|
|
16
16
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
|
|
17
|
+
// src/picker/index.tsx
|
|
18
18
|
const stylesOf = themedStyles(({ colors, radii, shadows }) => StyleSheet.create({
|
|
19
19
|
layout: {
|
|
20
20
|
alignItems: "center",
|
|
@@ -316,7 +316,6 @@ function useFocusOnceReady(ready, target) {
|
|
|
316
316
|
} else t2 = $[6];
|
|
317
317
|
useEffect(t1, t2);
|
|
318
318
|
}
|
|
319
|
-
//#endregion
|
|
320
319
|
export { PickerPopup, PickerTrigger, roomOf };
|
|
321
320
|
|
|
322
321
|
//# sourceMappingURL=index.js.map
|
package/dist/press/index.js
CHANGED
package/dist/press/styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { themedStyles } from "../theme/styles.js";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
|
-
|
|
3
|
+
// src/press/styles.ts
|
|
4
4
|
const stylesOf = themedStyles(({ colors }) => StyleSheet.create({ ring: {
|
|
5
5
|
outlineColor: colors.primary,
|
|
6
6
|
outlineOffset: 2,
|
|
@@ -25,7 +25,6 @@ const styles = StyleSheet.create({
|
|
|
25
25
|
top: 0
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
//#endregion
|
|
29
28
|
export { styles, stylesOf };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=styles.js.map
|
package/dist/ref/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/ref/index.ts
|
|
2
2
|
/**
|
|
3
3
|
* A ref callback that hands its node to every ref given, a callback or an
|
|
4
4
|
* object alike, in the order given.
|
|
@@ -9,7 +9,6 @@ function refsOf(...refs) {
|
|
|
9
9
|
else if (ref !== null && ref !== void 0) ref.current = node;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
//#endregion
|
|
13
12
|
export { refsOf };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=index.js.map
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/router/index.d.ts
|
|
3
2
|
type Navigate = (href: string) => void;
|
|
4
3
|
type RouterProviderProps = {
|
|
5
4
|
readonly children?: ReactNode;
|
|
@@ -23,6 +22,5 @@ type RouterProviderProps = {
|
|
|
23
22
|
* ```
|
|
24
23
|
*/
|
|
25
24
|
declare function RouterProvider({ children, navigate }: RouterProviderProps): import("react").JSX.Element;
|
|
26
|
-
//#endregion
|
|
27
25
|
export { RouterProvider, type RouterProviderProps };
|
|
28
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/router/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c } from "react/compiler-runtime";
|
|
|
2
2
|
import { Linking } from "react-native";
|
|
3
3
|
import { createContext, use } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/router/index.tsx
|
|
6
6
|
const SCHEME = /^[a-z][\d+.a-z-]*:/iu;
|
|
7
7
|
const RouterContext = createContext(null);
|
|
8
8
|
async function openExternally(href) {
|
|
@@ -76,7 +76,6 @@ function useOpenLink() {
|
|
|
76
76
|
else navigate(href);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
//#endregion
|
|
80
79
|
export { RouterProvider, useLinkPress, useOpenLink };
|
|
81
80
|
|
|
82
81
|
//# sourceMappingURL=index.js.map
|
package/dist/row/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { c } from "react/compiler-runtime";
|
|
|
7
7
|
import { Text, View } from "react-native";
|
|
8
8
|
import "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/row/index.tsx
|
|
11
11
|
const ICON_SIZE = 24;
|
|
12
12
|
const SELECTED_CONTAINER = {
|
|
13
13
|
drawer: "selectedDrawer",
|
|
@@ -160,7 +160,6 @@ function rowStyleOf(theme, { isSelected = false, overline, supporting, variant =
|
|
|
160
160
|
const lines = (hasContent(overline) ? 1 : 0) + (hasContent(supporting) ? 1 : 0);
|
|
161
161
|
return composeStyles(own.base, own[variant], lines === 1 ? own.twoLine : void 0, lines === 2 ? own.threeLine : void 0, isSelected ? own[SELECTED_CONTAINER[variant]] : void 0);
|
|
162
162
|
}
|
|
163
|
-
//#endregion
|
|
164
163
|
export { RowContent, hasContent, rowContentColor, rowStyleOf, rowStyles };
|
|
165
164
|
|
|
166
165
|
//# sourceMappingURL=index.js.map
|
package/dist/row/styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { themedStyles } from "../theme/styles.js";
|
|
2
2
|
import { withOpacity } from "../theme/color.js";
|
|
3
3
|
import { StyleSheet } from "react-native";
|
|
4
|
-
|
|
4
|
+
// src/row/styles.ts
|
|
5
5
|
const SELECTED_CONTENT = {
|
|
6
6
|
drawer: "onSecondaryContainer",
|
|
7
7
|
list: "onPrimaryContainer",
|
|
@@ -56,7 +56,6 @@ function rowContentColor({ colors, stateLayerOpacity }, { isDisabled = false, is
|
|
|
56
56
|
if (isSelected) return colors[SELECTED_CONTENT[variant]];
|
|
57
57
|
return colors.onSurface;
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { rowContentColor, rowStyles, rowStylesOf };
|
|
61
60
|
|
|
62
61
|
//# sourceMappingURL=styles.js.map
|
package/dist/segments/field.js
CHANGED
|
@@ -10,7 +10,7 @@ import { c } from "react/compiler-runtime";
|
|
|
10
10
|
import { Text, View } from "react-native";
|
|
11
11
|
import { useId, useRef, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
|
|
13
|
+
// src/segments/field.tsx
|
|
14
14
|
function arrivedOf({ leaving, onFocus, setFocused }) {
|
|
15
15
|
return () => {
|
|
16
16
|
if (leaving.current === void 0) {
|
|
@@ -271,7 +271,6 @@ function SegmentedField(props) {
|
|
|
271
271
|
} else t0 = $[2];
|
|
272
272
|
return t0;
|
|
273
273
|
}
|
|
274
|
-
//#endregion
|
|
275
274
|
export { SegmentedField };
|
|
276
275
|
|
|
277
276
|
//# sourceMappingURL=field.js.map
|
package/dist/segments/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { I18nManager, Platform, Pressable, StyleSheet, Text, TextInput } from "r
|
|
|
11
11
|
import { createElement, useEffect, useEffectEvent, useId, useImperativeHandle, useRef, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { CalendarDate, DateFormatter, toCalendar } from "@internationalized/date";
|
|
14
|
-
|
|
14
|
+
// src/segments/index.tsx
|
|
15
15
|
const ADJUSTABLE = [{ name: "increment" }, { name: "decrement" }];
|
|
16
16
|
const INVISIBLE = /[\s\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/gu;
|
|
17
17
|
const SENTINEL = " ";
|
|
@@ -568,7 +568,6 @@ function webStateOf(isInvalid, state) {
|
|
|
568
568
|
...state.isRequired ? { "aria-required": true } : void 0
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
|
-
//#endregion
|
|
572
571
|
export { DateSegments };
|
|
573
572
|
|
|
574
573
|
//# sourceMappingURL=index.js.map
|
package/dist/segments/styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { themedStyles } from "../theme/styles.js";
|
|
2
2
|
import { withOpacity } from "../theme/color.js";
|
|
3
3
|
import { Platform, StyleSheet } from "react-native";
|
|
4
|
-
|
|
4
|
+
// src/segments/styles.ts
|
|
5
5
|
const segmentStylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacity }) => StyleSheet.create({
|
|
6
6
|
segment: {
|
|
7
7
|
borderRadius: radii.xs,
|
|
@@ -18,7 +18,6 @@ const segmentStylesOf = themedStyles(({ colors, radii, spacing, stateLayerOpacit
|
|
|
18
18
|
textFocused: { color: colors.onPrimary },
|
|
19
19
|
textMuted: { color: colors.onSurfaceVariant }
|
|
20
20
|
}));
|
|
21
|
-
//#endregion
|
|
22
21
|
export { segmentStylesOf };
|
|
23
22
|
|
|
24
23
|
//# sourceMappingURL=styles.js.map
|
package/dist/separator/index.js
CHANGED
package/dist/slider/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c } from "react/compiler-runtime";
|
|
|
2
2
|
import { I18nManager, StyleSheet } from "react-native";
|
|
3
3
|
import { useSharedValue } from "react-native-reanimated";
|
|
4
4
|
import { Gesture } from "react-native-gesture-handler";
|
|
5
|
-
|
|
5
|
+
// src/slider/index.ts
|
|
6
6
|
const SLOP = 10;
|
|
7
7
|
const SLOP_RANGE = [-10, SLOP];
|
|
8
8
|
const TARGET = 48;
|
|
@@ -139,7 +139,6 @@ function useTrackGesture(t0) {
|
|
|
139
139
|
const tap = Gesture.Tap().maxDistance(SLOP).enabled(!isDisabled).runOnJS(true).onEnd(t5);
|
|
140
140
|
return Gesture.Race(testID === void 0 ? pan : pan.withTestId(`${testID}-pan`), testID === void 0 ? tap : tap.withTestId(`${testID}-tap`));
|
|
141
141
|
}
|
|
142
|
-
//#endregion
|
|
143
142
|
export { ADJUSTABLE, SLOP_RANGE, adjustOf, closestThumb, lengthTo, percentOf, seatPlaceOf, seats, useTrackGesture };
|
|
144
143
|
|
|
145
144
|
//# sourceMappingURL=index.js.map
|
package/dist/swatch/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, use } from "react";
|
|
2
2
|
import { parseColor } from "react-stately";
|
|
3
|
-
|
|
3
|
+
// src/swatch/index.ts
|
|
4
4
|
/**
|
|
5
5
|
* The colour of the ColorPicker around a control, which ColorArea,
|
|
6
6
|
* ColorField, ColorSlider, ColorSwatch, ColorSwatchPicker and ColorWheel take
|
|
@@ -50,7 +50,6 @@ function usePickedColor(value, onChange) {
|
|
|
50
50
|
value: picker.value
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
//#endregion
|
|
54
53
|
export { PickedColorContext, SwatchColorContext, colorNameOf, colorOf, usePickedColor };
|
|
55
54
|
|
|
56
55
|
//# sourceMappingURL=index.js.map
|
package/dist/theme/color.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { processColor } from "react-native";
|
|
2
|
-
|
|
2
|
+
// src/theme/color.ts
|
|
3
3
|
/**
|
|
4
4
|
* A colour at a fraction of its own opacity, for the roles Material Design
|
|
5
5
|
* gives as a colour at an opacity: a disabled container is on-surface at the
|
|
@@ -19,7 +19,6 @@ function withOpacity(color, opacity) {
|
|
|
19
19
|
const alpha = (argb >>> 24) / 255 * opacity;
|
|
20
20
|
return `rgba(${String(argb >>> 16 & 255)}, ${String(argb >>> 8 & 255)}, ${String(argb & 255)}, ${String(Math.round(alpha * 1e3) / 1e3)})`;
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
export { withOpacity };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=color.js.map
|
package/dist/theme/resolve.d.ts
CHANGED
package/dist/theme/resolve.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/theme/resolve.ts
|
|
2
2
|
const CATEGORIES = [
|
|
3
3
|
["color", "colors"],
|
|
4
4
|
["motion", "motion"],
|
|
@@ -304,7 +304,6 @@ function resolveTheme(defaults, overrides = {}) {
|
|
|
304
304
|
theme
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
//#endregion
|
|
308
307
|
export { parseLength, resolveTheme };
|
|
309
308
|
|
|
310
309
|
//# sourceMappingURL=resolve.js.map
|
package/dist/theme/scope.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { t as KuiTheme } from "../kanso-ui-core/defaults-DMH0HWCw.js";
|
|
2
2
|
import { Easing } from "./resolve.js";
|
|
3
|
-
//#region src/theme/scope.d.ts
|
|
4
3
|
type CamelCase<Name extends string> = Name extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : Name;
|
|
5
4
|
type KeysOf<Segment extends string, Property extends string = keyof KuiTheme> = Property extends `--kui-${Segment}-${infer Rest}` ? CamelCase<Rest> : never;
|
|
6
5
|
/**
|
|
@@ -37,6 +36,5 @@ type ResolvedTheme = {
|
|
|
37
36
|
* kept for as long as the theme is.
|
|
38
37
|
*/
|
|
39
38
|
declare function useTheme(): ResolvedTheme;
|
|
40
|
-
//#endregion
|
|
41
39
|
export { type ResolvedTheme, useTheme };
|
|
42
40
|
//# sourceMappingURL=scope.d.ts.map
|
package/dist/theme/scope.js
CHANGED
|
@@ -3,7 +3,7 @@ import { resolveTheme } from "./resolve.js";
|
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useColorScheme } from "react-native";
|
|
5
5
|
import { createContext, use } from "react";
|
|
6
|
-
|
|
6
|
+
// src/theme/scope.ts
|
|
7
7
|
const DEFAULTS = {
|
|
8
8
|
dark,
|
|
9
9
|
light
|
|
@@ -74,7 +74,6 @@ function useScope() {
|
|
|
74
74
|
function useTheme() {
|
|
75
75
|
return useScope().theme;
|
|
76
76
|
}
|
|
77
|
-
//#endregion
|
|
78
77
|
export { ScopeContext, merged, scopeFor, useScope, useTheme };
|
|
79
78
|
|
|
80
79
|
//# sourceMappingURL=scope.js.map
|
package/dist/theme/styles.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/theme/styles.ts
|
|
2
2
|
/**
|
|
3
3
|
* Styles in the order they apply, each over the ones before it, as React
|
|
4
4
|
* Native's array form takes them. A call site's own `style` goes last.
|
|
@@ -33,7 +33,6 @@ function themedStyles(create) {
|
|
|
33
33
|
return sheet;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
//#endregion
|
|
37
36
|
export { composeStyles, themedStyles };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=styles.js.map
|
package/dist/theme-scope.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as KuiTheme } from "./kanso-ui-core/defaults-DMH0HWCw.js";
|
|
2
2
|
import { View, ViewProps } from "react-native";
|
|
3
3
|
import { ComponentRef, Ref } from "react";
|
|
4
|
-
//#region src/theme-scope.d.ts
|
|
5
4
|
type ThemeScopeProps = ViewProps & {
|
|
6
5
|
readonly ref?: Ref<ComponentRef<typeof View>>;
|
|
7
6
|
/**
|
|
@@ -51,6 +50,5 @@ type ThemeScopeProps = ViewProps & {
|
|
|
51
50
|
* it. What draws there follows the scope it was opened in, not the root's.
|
|
52
51
|
*/
|
|
53
52
|
declare function ThemeScope({ children, scheme, style, theme, ...props }: ThemeScopeProps): import("react").JSX.Element;
|
|
54
|
-
//#endregion
|
|
55
53
|
export { type KuiTheme, ThemeScope, type ThemeScopeProps };
|
|
56
54
|
//# sourceMappingURL=theme-scope.d.ts.map
|
package/dist/theme-scope.js
CHANGED
|
@@ -5,7 +5,7 @@ import { c } from "react/compiler-runtime";
|
|
|
5
5
|
import { StyleSheet, View } from "react-native";
|
|
6
6
|
import { use } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/theme-scope.tsx
|
|
9
9
|
const stylesOf = themedStyles(({ colors }) => StyleSheet.create({ pinned: { backgroundColor: colors.surface } }));
|
|
10
10
|
/**
|
|
11
11
|
* Themes what is inside it.
|
|
@@ -121,7 +121,6 @@ function ThemeScope(t0) {
|
|
|
121
121
|
} else t6 = $[28];
|
|
122
122
|
return t6;
|
|
123
123
|
}
|
|
124
|
-
//#endregion
|
|
125
124
|
export { ThemeScope };
|
|
126
125
|
|
|
127
126
|
//# sourceMappingURL=theme-scope.js.map
|
package/dist/typography/fonts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import { Platform } from "react-native";
|
|
3
3
|
import { useSyncExternalStore } from "react";
|
|
4
|
-
|
|
4
|
+
// src/typography/fonts.ts
|
|
5
5
|
let registry;
|
|
6
6
|
let loading;
|
|
7
7
|
const listeners = /* @__PURE__ */ new Set();
|
|
@@ -78,7 +78,6 @@ function useFontFamily(families) {
|
|
|
78
78
|
} else t0 = $[4];
|
|
79
79
|
return t0;
|
|
80
80
|
}
|
|
81
|
-
//#endregion
|
|
82
81
|
export { useFontFamily };
|
|
83
82
|
|
|
84
83
|
//# sourceMappingURL=fonts.js.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { StyleProp } from "react-native";
|
|
2
|
-
//#region src/typography/roles.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The type scale on Material Design's typography pages: the display, headline,
|
|
5
4
|
* title, body and label roles at large, medium and small.
|
|
6
5
|
*/
|
|
7
6
|
type TypeRole = 'bodyLarge' | 'bodyMedium' | 'bodySmall' | 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall';
|
|
8
|
-
//#endregion
|
|
9
7
|
export type { TypeRole };
|
|
10
8
|
//# sourceMappingURL=roles.d.ts.map
|
package/dist/typography/roles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { composeStyles, themedStyles } from "../theme/styles.js";
|
|
|
3
3
|
import { useFontFamily } from "./fonts.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { StyleSheet } from "react-native";
|
|
6
|
-
|
|
6
|
+
// src/typography/roles.ts
|
|
7
7
|
const WEIGHTS = [
|
|
8
8
|
100,
|
|
9
9
|
200,
|
|
@@ -76,7 +76,6 @@ function useTypeRole(role) {
|
|
|
76
76
|
} else t0 = $[3];
|
|
77
77
|
return t0;
|
|
78
78
|
}
|
|
79
|
-
//#endregion
|
|
80
79
|
export { familyStyle, nativeWeight, useTypeRole };
|
|
81
80
|
|
|
82
81
|
//# sourceMappingURL=roles.js.map
|
package/dist/typography/size.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
|
|
2
|
+
// src/typography/size.ts
|
|
3
3
|
const TextSizeContext = createContext(void 0);
|
|
4
4
|
/**
|
|
5
5
|
* The font size of the library's Text around the caller, or `undefined` when
|
|
@@ -8,7 +8,6 @@ const TextSizeContext = createContext(void 0);
|
|
|
8
8
|
function useTextSize() {
|
|
9
9
|
return useContext(TextSizeContext);
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { TextSizeContext, useTextSize };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=size.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanso-labs/react-native-kanso-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"description": "Kanso UI's Material Design components for React Native, themed through the same --kui-* design tokens as the web library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@commitlint/config-conventional": "21.2.4",
|
|
62
62
|
"@eslint/js": "10.0.1",
|
|
63
63
|
"@jest/globals": "29.7.0",
|
|
64
|
-
"@kanso-labs/kanso-ui-core": "0.1.
|
|
64
|
+
"@kanso-labs/kanso-ui-core": "0.1.2",
|
|
65
65
|
"@react-native/babel-preset": "0.88.0",
|
|
66
66
|
"@react-native/jest-preset": "0.88.0",
|
|
67
67
|
"@rolldown/plugin-babel": "0.2.4",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"lint-staged": "17.6.0",
|
|
87
87
|
"oxfmt": "0.74.0",
|
|
88
88
|
"oxlint": "1.89.0",
|
|
89
|
-
"oxlint-tsgolint": "7.0.
|
|
89
|
+
"oxlint-tsgolint": "7.0.2005",
|
|
90
90
|
"playwright": "1.64.1",
|
|
91
91
|
"publint": "0.3.25",
|
|
92
92
|
"react": "19.3.1",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"react-native-worklets": "0.13.0",
|
|
101
101
|
"storybook": "10.6.3",
|
|
102
102
|
"test-renderer": "1.3.1",
|
|
103
|
-
"tsdown": "0.23.
|
|
103
|
+
"tsdown": "0.23.2",
|
|
104
104
|
"typescript": "6.0.3",
|
|
105
105
|
"typescript-eslint": "8.72.0",
|
|
106
106
|
"vite": "8.3.5",
|