@knitui/components 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/Alert/Alert.js.map +1 -1
- package/lib/commonjs/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/Badge/Badge.js.map +1 -1
- package/lib/commonjs/Button/Button.js.map +1 -1
- package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/commonjs/PinInput/PinInput.js.map +1 -1
- package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/commonjs/Title/Title.js.map +1 -1
- package/lib/commonjs/Transition/use-transition.js.map +1 -1
- package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/Alert/Alert.js.map +1 -1
- package/lib/module/Avatar/Avatar.js.map +1 -1
- package/lib/module/Badge/Badge.js.map +1 -1
- package/lib/module/Button/Button.js.map +1 -1
- package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
- package/lib/module/PinInput/PinInput.js.map +1 -1
- package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
- package/lib/module/Title/Title.js.map +1 -1
- package/lib/module/Transition/use-transition.js.map +1 -1
- package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/Alert/Alert.d.ts.map +1 -1
- package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/Badge/Badge.d.ts.map +1 -1
- package/lib/typescript/Button/Button.d.ts.map +1 -1
- package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/lib/typescript/FileButton/FileButton.types.d.ts.map +1 -1
- package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
- package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
- package/lib/typescript/Title/Title.d.ts.map +1 -1
- package/lib/typescript/Transition/use-transition.d.ts.map +1 -1
- package/lib/typescript/Tree/Tree.d.ts +1 -1
- package/lib/typescript/Tree/Tree.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/ActionIcon/ActionIcon.tsx +1 -8
- package/src/Alert/Alert.tsx +1 -7
- package/src/Avatar/Avatar.tsx +1 -7
- package/src/Badge/Badge.tsx +1 -8
- package/src/Button/Button.tsx +1 -8
- package/src/ColorPicker/ColorPicker.tsx +1 -2
- package/src/FileButton/FileButton.types.ts +2 -11
- package/src/PinInput/PinInput.tsx +1 -8
- package/src/ThemeIcon/ThemeIcon.tsx +1 -8
- package/src/Title/Title.tsx +1 -13
- package/src/Transition/use-transition.ts +1 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knitui/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Cross-platform (React Native + Web) component kit for Knit UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Haus <joost@the.haus>",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
],
|
|
61
61
|
"sideEffects": false,
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"expo-image": "~57.0.
|
|
64
|
-
"@knitui/core": "0.
|
|
65
|
-
"@knitui/hooks": "0.
|
|
66
|
-
"@knitui/icons": "0.
|
|
63
|
+
"expo-image": "~57.0.1",
|
|
64
|
+
"@knitui/core": "0.5.0",
|
|
65
|
+
"@knitui/hooks": "0.5.0",
|
|
66
|
+
"@knitui/icons": "0.5.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "*",
|
|
@@ -91,26 +91,26 @@
|
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@babel/core": "^7.25.0",
|
|
93
93
|
"@playwright/test": "^1.50.0",
|
|
94
|
-
"@storybook/addon-docs": "^10.
|
|
95
|
-
"@storybook/react-vite": "^10.
|
|
96
|
-
"@tamagui/build": "^2.
|
|
94
|
+
"@storybook/addon-docs": "^10.5.3",
|
|
95
|
+
"@storybook/react-vite": "^10.5.3",
|
|
96
|
+
"@tamagui/build": "^2.4.6",
|
|
97
97
|
"@testing-library/jest-dom": "^6.6.3",
|
|
98
98
|
"@testing-library/react": "^16.1.0",
|
|
99
99
|
"@testing-library/user-event": "^14.5.2",
|
|
100
100
|
"@types/jest": "^29.5.12",
|
|
101
101
|
"@types/react": "~19.2.0",
|
|
102
|
-
"@vitejs/plugin-react": "^6.0.
|
|
102
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
103
103
|
"babel-jest": "^29.7.0",
|
|
104
|
-
"babel-preset-expo": "^57.0.
|
|
104
|
+
"babel-preset-expo": "^57.0.3",
|
|
105
105
|
"jest": "^29.7.0",
|
|
106
106
|
"jest-environment-jsdom": "^29.7.0",
|
|
107
107
|
"react": "19.2.3",
|
|
108
108
|
"react-dom": "19.2.3",
|
|
109
109
|
"react-native": "0.86.0",
|
|
110
|
-
"react-native-builder-bob": "^0.
|
|
110
|
+
"react-native-builder-bob": "^0.43.0",
|
|
111
111
|
"react-native-web": "~0.21.0",
|
|
112
|
-
"storybook": "^10.
|
|
113
|
-
"vite": "^8.
|
|
112
|
+
"storybook": "^10.5.3",
|
|
113
|
+
"vite": "^8.1.5"
|
|
114
114
|
},
|
|
115
115
|
"react-native-builder-bob": {
|
|
116
116
|
"source": "src",
|
|
@@ -26,14 +26,7 @@ import { Text } from "../Text";
|
|
|
26
26
|
|
|
27
27
|
type ActionIconSize = SizeKey;
|
|
28
28
|
type ActionIconVariant =
|
|
29
|
-
| "
|
|
30
|
-
| "light"
|
|
31
|
-
| "outline"
|
|
32
|
-
| "subtle"
|
|
33
|
-
| "transparent"
|
|
34
|
-
| "white"
|
|
35
|
-
| "default"
|
|
36
|
-
| "gradient";
|
|
29
|
+
"filled" | "light" | "outline" | "subtle" | "transparent" | "white" | "default" | "gradient";
|
|
37
30
|
|
|
38
31
|
const ActionIconContext = createStyledContext<{
|
|
39
32
|
size: ActionIconSize;
|
package/src/Alert/Alert.tsx
CHANGED
|
@@ -23,13 +23,7 @@ import { Text } from "../Text";
|
|
|
23
23
|
|
|
24
24
|
type AlertSize = SizeKey;
|
|
25
25
|
type AlertVariant =
|
|
26
|
-
| "
|
|
27
|
-
| "light"
|
|
28
|
-
| "outline"
|
|
29
|
-
| "default"
|
|
30
|
-
| "transparent"
|
|
31
|
-
| "white"
|
|
32
|
-
| "gradient";
|
|
26
|
+
"filled" | "light" | "outline" | "default" | "transparent" | "white" | "gradient";
|
|
33
27
|
|
|
34
28
|
const AlertContext = createStyledContext<{ size: AlertSize; variant: AlertVariant }>({
|
|
35
29
|
size: "md",
|
package/src/Avatar/Avatar.tsx
CHANGED
|
@@ -25,13 +25,7 @@ import { Text } from "../Text";
|
|
|
25
25
|
|
|
26
26
|
export type AvatarSize = SizeKey;
|
|
27
27
|
export type AvatarVariant =
|
|
28
|
-
| "
|
|
29
|
-
| "light"
|
|
30
|
-
| "outline"
|
|
31
|
-
| "transparent"
|
|
32
|
-
| "default"
|
|
33
|
-
| "white"
|
|
34
|
-
| "gradient";
|
|
28
|
+
"filled" | "light" | "outline" | "transparent" | "default" | "white" | "gradient";
|
|
35
29
|
|
|
36
30
|
/** Accent color theme names available for auto-color assignment. */
|
|
37
31
|
const ACCENT_COLORS = [
|
package/src/Badge/Badge.tsx
CHANGED
|
@@ -20,14 +20,7 @@ import { Text } from "../Text";
|
|
|
20
20
|
|
|
21
21
|
type BadgeSize = SizeKey;
|
|
22
22
|
type BadgeVariant =
|
|
23
|
-
| "
|
|
24
|
-
| "light"
|
|
25
|
-
| "outline"
|
|
26
|
-
| "dot"
|
|
27
|
-
| "transparent"
|
|
28
|
-
| "white"
|
|
29
|
-
| "default"
|
|
30
|
-
| "gradient";
|
|
23
|
+
"filled" | "light" | "outline" | "dot" | "transparent" | "white" | "default" | "gradient";
|
|
31
24
|
|
|
32
25
|
const BadgeContext = createStyledContext<{ size: BadgeSize | number; variant: BadgeVariant }>({
|
|
33
26
|
size: "md",
|
package/src/Button/Button.tsx
CHANGED
|
@@ -38,14 +38,7 @@ import { Text } from "../Text";
|
|
|
38
38
|
type ButtonSize = SizeKey;
|
|
39
39
|
|
|
40
40
|
type ButtonVariant =
|
|
41
|
-
| "
|
|
42
|
-
| "light"
|
|
43
|
-
| "outline"
|
|
44
|
-
| "subtle"
|
|
45
|
-
| "default"
|
|
46
|
-
| "white"
|
|
47
|
-
| "transparent"
|
|
48
|
-
| "gradient";
|
|
41
|
+
"filled" | "light" | "outline" | "subtle" | "default" | "white" | "transparent" | "gradient";
|
|
49
42
|
|
|
50
43
|
const ButtonContext = createStyledContext<{ size: ButtonSize; variant: ButtonVariant }>({
|
|
51
44
|
size: "md",
|
|
@@ -772,8 +772,7 @@ const ColorPickerRoot = React.forwardRef<
|
|
|
772
772
|
const geometry = React.useMemo(() => getPickerGeometry(size), [size]);
|
|
773
773
|
|
|
774
774
|
const hiddenInputProps:
|
|
775
|
-
|
|
776
|
-
| undefined =
|
|
775
|
+
{ name: string; readOnly: true; type: "hidden"; value: string } | undefined =
|
|
777
776
|
isWeb && name ? { type: "hidden", name, value: _value, readOnly: true } : undefined;
|
|
778
777
|
|
|
779
778
|
const onSaturationChangeEnd = React.useCallback(
|
|
@@ -7,15 +7,7 @@ import type { ButtonProps } from "../Button";
|
|
|
7
7
|
/* -------------------------------------------------------------------------- */
|
|
8
8
|
|
|
9
9
|
type FileButtonOwnedInputProps =
|
|
10
|
-
| "
|
|
11
|
-
| "capture"
|
|
12
|
-
| "disabled"
|
|
13
|
-
| "form"
|
|
14
|
-
| "multiple"
|
|
15
|
-
| "name"
|
|
16
|
-
| "onChange"
|
|
17
|
-
| "style"
|
|
18
|
-
| "type";
|
|
10
|
+
"accept" | "capture" | "disabled" | "form" | "multiple" | "name" | "onChange" | "style" | "type";
|
|
19
11
|
|
|
20
12
|
/** Props spread onto the hidden web `<input>`, excluding props owned by FileButton. */
|
|
21
13
|
export type FileButtonInputProps = Omit<
|
|
@@ -66,8 +58,7 @@ export type FileButtonTriggerProps = Omit<ButtonProps, "onPress" | "onChange" |
|
|
|
66
58
|
* wire onto your own element (used internally by `FileInput`).
|
|
67
59
|
*/
|
|
68
60
|
export type FileButtonChildren =
|
|
69
|
-
| React.ReactNode
|
|
70
|
-
| ((props: { onClick: () => void }) => React.ReactNode);
|
|
61
|
+
React.ReactNode | ((props: { onClick: () => void }) => React.ReactNode);
|
|
71
62
|
|
|
72
63
|
export interface FileButtonProps<
|
|
73
64
|
Multiple extends boolean = false,
|
|
@@ -21,14 +21,7 @@ export type PinInputHostType = React.HTMLInputTypeAttribute;
|
|
|
21
21
|
|
|
22
22
|
/** Host `inputmode` override (inferred from `type` when unset). */
|
|
23
23
|
export type PinInputMode =
|
|
24
|
-
| "
|
|
25
|
-
| "text"
|
|
26
|
-
| "tel"
|
|
27
|
-
| "url"
|
|
28
|
-
| "email"
|
|
29
|
-
| "numeric"
|
|
30
|
-
| "decimal"
|
|
31
|
-
| "search";
|
|
24
|
+
"none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
|
|
32
25
|
|
|
33
26
|
const REGEX = {
|
|
34
27
|
number: /^[0-9]+$/,
|
|
@@ -16,14 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
type ThemeIconSize = SizeKey;
|
|
18
18
|
type ThemeIconVariant =
|
|
19
|
-
| "
|
|
20
|
-
| "light"
|
|
21
|
-
| "outline"
|
|
22
|
-
| "subtle"
|
|
23
|
-
| "transparent"
|
|
24
|
-
| "white"
|
|
25
|
-
| "default"
|
|
26
|
-
| "gradient";
|
|
19
|
+
"filled" | "light" | "outline" | "subtle" | "transparent" | "white" | "default" | "gradient";
|
|
27
20
|
|
|
28
21
|
const ThemeIconContext = createStyledContext<{
|
|
29
22
|
size: ThemeIconSize;
|
package/src/Title/Title.tsx
CHANGED
|
@@ -5,19 +5,7 @@ import { Text } from "../Text";
|
|
|
5
5
|
|
|
6
6
|
export type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
7
|
export type TitleSize =
|
|
8
|
-
| "
|
|
9
|
-
| "h2"
|
|
10
|
-
| "h3"
|
|
11
|
-
| "h4"
|
|
12
|
-
| "h5"
|
|
13
|
-
| "h6"
|
|
14
|
-
| "xxs"
|
|
15
|
-
| "xs"
|
|
16
|
-
| "sm"
|
|
17
|
-
| "md"
|
|
18
|
-
| "lg"
|
|
19
|
-
| "xl"
|
|
20
|
-
| "xxl";
|
|
8
|
+
"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
21
9
|
|
|
22
10
|
/**
|
|
23
11
|
* Heading — mirrors Mantine's `Title`. `order` (1–6) drives the semantic heading
|
|
@@ -12,12 +12,7 @@ import { useDidUpdate, useReducedMotion } from "@knitui/hooks";
|
|
|
12
12
|
* union), so the hook stays free of any platform-specific style imports.
|
|
13
13
|
*/
|
|
14
14
|
export type TransitionStatus =
|
|
15
|
-
| "entering"
|
|
16
|
-
| "entered"
|
|
17
|
-
| "exiting"
|
|
18
|
-
| "exited"
|
|
19
|
-
| "pre-exiting"
|
|
20
|
-
| "pre-entering";
|
|
15
|
+
"entering" | "entered" | "exiting" | "exited" | "pre-exiting" | "pre-entering";
|
|
21
16
|
|
|
22
17
|
export interface UseTransitionOptions {
|
|
23
18
|
duration: number;
|