@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.
Files changed (45) hide show
  1. package/lib/commonjs/ActionIcon/ActionIcon.js.map +1 -1
  2. package/lib/commonjs/Alert/Alert.js.map +1 -1
  3. package/lib/commonjs/Avatar/Avatar.js.map +1 -1
  4. package/lib/commonjs/Badge/Badge.js.map +1 -1
  5. package/lib/commonjs/Button/Button.js.map +1 -1
  6. package/lib/commonjs/ColorPicker/ColorPicker.js.map +1 -1
  7. package/lib/commonjs/PinInput/PinInput.js.map +1 -1
  8. package/lib/commonjs/ThemeIcon/ThemeIcon.js.map +1 -1
  9. package/lib/commonjs/Title/Title.js.map +1 -1
  10. package/lib/commonjs/Transition/use-transition.js.map +1 -1
  11. package/lib/module/ActionIcon/ActionIcon.js.map +1 -1
  12. package/lib/module/Alert/Alert.js.map +1 -1
  13. package/lib/module/Avatar/Avatar.js.map +1 -1
  14. package/lib/module/Badge/Badge.js.map +1 -1
  15. package/lib/module/Button/Button.js.map +1 -1
  16. package/lib/module/ColorPicker/ColorPicker.js.map +1 -1
  17. package/lib/module/PinInput/PinInput.js.map +1 -1
  18. package/lib/module/ThemeIcon/ThemeIcon.js.map +1 -1
  19. package/lib/module/Title/Title.js.map +1 -1
  20. package/lib/module/Transition/use-transition.js.map +1 -1
  21. package/lib/typescript/ActionIcon/ActionIcon.d.ts.map +1 -1
  22. package/lib/typescript/Alert/Alert.d.ts.map +1 -1
  23. package/lib/typescript/Avatar/Avatar.d.ts.map +1 -1
  24. package/lib/typescript/Badge/Badge.d.ts.map +1 -1
  25. package/lib/typescript/Button/Button.d.ts.map +1 -1
  26. package/lib/typescript/ColorPicker/ColorPicker.d.ts.map +1 -1
  27. package/lib/typescript/FileButton/FileButton.types.d.ts.map +1 -1
  28. package/lib/typescript/PinInput/PinInput.d.ts.map +1 -1
  29. package/lib/typescript/ThemeIcon/ThemeIcon.d.ts.map +1 -1
  30. package/lib/typescript/Title/Title.d.ts.map +1 -1
  31. package/lib/typescript/Transition/use-transition.d.ts.map +1 -1
  32. package/lib/typescript/Tree/Tree.d.ts +1 -1
  33. package/lib/typescript/Tree/Tree.d.ts.map +1 -1
  34. package/package.json +13 -13
  35. package/src/ActionIcon/ActionIcon.tsx +1 -8
  36. package/src/Alert/Alert.tsx +1 -7
  37. package/src/Avatar/Avatar.tsx +1 -7
  38. package/src/Badge/Badge.tsx +1 -8
  39. package/src/Button/Button.tsx +1 -8
  40. package/src/ColorPicker/ColorPicker.tsx +1 -2
  41. package/src/FileButton/FileButton.types.ts +2 -11
  42. package/src/PinInput/PinInput.tsx +1 -8
  43. package/src/ThemeIcon/ThemeIcon.tsx +1 -8
  44. package/src/Title/Title.tsx +1 -13
  45. 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.4.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.0",
64
- "@knitui/core": "0.4.0",
65
- "@knitui/hooks": "0.4.0",
66
- "@knitui/icons": "0.4.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.4.1",
95
- "@storybook/react-vite": "^10.4.1",
96
- "@tamagui/build": "^2.3.0",
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.2",
102
+ "@vitejs/plugin-react": "^6.0.3",
103
103
  "babel-jest": "^29.7.0",
104
- "babel-preset-expo": "^57.0.2",
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.40.5",
110
+ "react-native-builder-bob": "^0.43.0",
111
111
  "react-native-web": "~0.21.0",
112
- "storybook": "^10.4.1",
113
- "vite": "^8.0.14"
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
- | "filled"
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;
@@ -23,13 +23,7 @@ import { Text } from "../Text";
23
23
 
24
24
  type AlertSize = SizeKey;
25
25
  type AlertVariant =
26
- | "filled"
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",
@@ -25,13 +25,7 @@ import { Text } from "../Text";
25
25
 
26
26
  export type AvatarSize = SizeKey;
27
27
  export type AvatarVariant =
28
- | "filled"
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 = [
@@ -20,14 +20,7 @@ import { Text } from "../Text";
20
20
 
21
21
  type BadgeSize = SizeKey;
22
22
  type BadgeVariant =
23
- | "filled"
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",
@@ -38,14 +38,7 @@ import { Text } from "../Text";
38
38
  type ButtonSize = SizeKey;
39
39
 
40
40
  type ButtonVariant =
41
- | "filled"
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
- | { name: string; readOnly: true; type: "hidden"; value: string }
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
- | "accept"
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
- | "none"
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
- | "filled"
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;
@@ -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
- | "h1"
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;