@impulse-ui-native/theme 2.5.0 → 2.7.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 (63) hide show
  1. package/README.md +23 -0
  2. package/dist/hooks/index.d.mts +5 -1
  3. package/dist/hooks/use-colors.hook.d.mts +5 -1
  4. package/dist/hooks/use-components-tokens.hook.d.mts +5 -1
  5. package/dist/hooks/use-theme.hook.d.mts +5 -1
  6. package/dist/hooks/use-themed-styles.d.mts +5 -1
  7. package/dist/index.d.mts +5 -1
  8. package/dist/providers/index.d.mts +5 -1
  9. package/dist/providers/theme.provider.d.mts +5 -1
  10. package/dist/providers/theme.provider.js +12 -11
  11. package/dist/providers/theme.provider.js.map +1 -1
  12. package/dist/theme/create-button-tokens.d.mts +5 -1
  13. package/dist/theme/create-checkbox-tokens.d.mts +23 -0
  14. package/dist/theme/create-checkbox-tokens.js +63 -0
  15. package/dist/theme/create-checkbox-tokens.js.map +1 -0
  16. package/dist/theme/create-control-tokens.d.mts +5 -1
  17. package/dist/theme/create-control-tokens.js +30 -3
  18. package/dist/theme/create-control-tokens.js.map +1 -1
  19. package/dist/theme/create-data-state-tokens.d.mts +5 -1
  20. package/dist/theme/create-datetime-picker.d.mts +5 -1
  21. package/dist/theme/create-flyout-tokens.d.mts +5 -1
  22. package/dist/theme/create-icon-button-tokens.d.mts +5 -1
  23. package/dist/theme/create-radio-tokens.d.mts +23 -0
  24. package/dist/theme/create-radio-tokens.js +63 -0
  25. package/dist/theme/create-radio-tokens.js.map +1 -0
  26. package/dist/theme/create-select-tokens.d.mts +5 -1
  27. package/dist/theme/create-skeleton-tokens.d.mts +5 -1
  28. package/dist/theme/create-stepper-tokens.d.mts +5 -1
  29. package/dist/theme/create-switch-tokens.d.mts +23 -0
  30. package/dist/theme/create-switch-tokens.js +76 -0
  31. package/dist/theme/create-switch-tokens.js.map +1 -0
  32. package/dist/theme/create-tag-tokens.d.mts +5 -1
  33. package/dist/theme/create-textarea-tokens.d.mts +23 -0
  34. package/dist/theme/create-textarea-tokens.js +28 -0
  35. package/dist/theme/create-textarea-tokens.js.map +1 -0
  36. package/dist/theme/create-time-picker-tokens.d.mts +5 -1
  37. package/dist/theme/dark.theme.d.mts +5 -1
  38. package/dist/theme/index.d.mts +5 -1
  39. package/dist/theme/index.js.map +1 -1
  40. package/dist/theme/light.theme.d.mts +5 -1
  41. package/dist/theme/tokens.theme.d.mts +5 -1
  42. package/dist/theme/tokens.theme.js +8 -0
  43. package/dist/theme/tokens.theme.js.map +1 -1
  44. package/dist/types/checkbox-tokens.types.d.mts +25 -0
  45. package/dist/types/checkbox-tokens.types.js +1 -0
  46. package/dist/types/checkbox-tokens.types.js.map +1 -0
  47. package/dist/types/control-tokes.types.d.mts +8 -5
  48. package/dist/types/index.d.mts +5 -1
  49. package/dist/types/index.js +4 -0
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/types/radio-tokens.types.d.mts +25 -0
  52. package/dist/types/radio-tokens.types.js +1 -0
  53. package/dist/types/radio-tokens.types.js.map +1 -0
  54. package/dist/types/switch-tokens.types.d.mts +32 -0
  55. package/dist/types/switch-tokens.types.js +1 -0
  56. package/dist/types/switch-tokens.types.js.map +1 -0
  57. package/dist/types/textarea-tokens.types.d.mts +17 -0
  58. package/dist/types/textarea-tokens.types.js +1 -0
  59. package/dist/types/textarea-tokens.types.js.map +1 -0
  60. package/dist/types/theme-provider.types.d.mts +8 -0
  61. package/dist/utils/index.d.mts +5 -1
  62. package/dist/utils/style.utils.d.mts +5 -1
  63. package/package.json +4 -4
@@ -11,6 +11,7 @@ export * from "./theme-provider.types";
11
11
  export * from "./tokens.types";
12
12
  export * from "./typography.types";
13
13
  export * from "./buttons-tokens.types";
14
+ export * from "./checkbox-tokens.types";
14
15
  export * from "./tag-tokens.types";
15
16
  export * from "./control-tokes.types";
16
17
  export * from "./select-tokens.types";
@@ -19,7 +20,10 @@ export * from "./time-picker-token.types";
19
20
  export * from "./flyout-tokens.types";
20
21
  export * from "./icon-tokens.types";
21
22
  export * from "./pressable-tokens.types";
23
+ export * from "./radio-tokens.types";
22
24
  export * from "./skeleton-tokens.types";
23
25
  export * from "./stepper-tokens.types";
26
+ export * from "./switch-tokens.types";
27
+ export * from "./textarea-tokens.types";
24
28
  export * from "./data-state-tokens.types";
25
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./border.types\";\nexport * from \"./color.types\";\nexport * from \"./chart.types\";\nexport * from \"./components.types\";\nexport * from \"./dimension.types\";\nexport * from \"./flex.types\";\nexport * from \"./shadow.types\";\nexport * from \"./spacing.types\";\nexport * from \"./style.types\";\nexport * from \"./theme-provider.types\";\nexport * from \"./tokens.types\";\nexport * from \"./typography.types\";\nexport * from \"./buttons-tokens.types\";\nexport * from \"./tag-tokens.types\";\nexport * from \"./control-tokes.types\";\nexport * from \"./select-tokens.types\";\nexport * from \"./datetime-picker-tokens.types\";\nexport * from \"./time-picker-token.types\";\nexport * from \"./flyout-tokens.types\";\nexport * from \"./icon-tokens.types\";\nexport * from \"./pressable-tokens.types\";\nexport * from \"./skeleton-tokens.types\";\nexport * from \"./stepper-tokens.types\";\nexport * from \"./data-state-tokens.types\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./border.types\";\nexport * from \"./color.types\";\nexport * from \"./chart.types\";\nexport * from \"./components.types\";\nexport * from \"./dimension.types\";\nexport * from \"./flex.types\";\nexport * from \"./shadow.types\";\nexport * from \"./spacing.types\";\nexport * from \"./style.types\";\nexport * from \"./theme-provider.types\";\nexport * from \"./tokens.types\";\nexport * from \"./typography.types\";\nexport * from \"./buttons-tokens.types\";\nexport * from \"./checkbox-tokens.types\";\nexport * from \"./tag-tokens.types\";\nexport * from \"./control-tokes.types\";\nexport * from \"./select-tokens.types\";\nexport * from \"./datetime-picker-tokens.types\";\nexport * from \"./time-picker-token.types\";\nexport * from \"./flyout-tokens.types\";\nexport * from \"./icon-tokens.types\";\nexport * from \"./pressable-tokens.types\";\nexport * from \"./radio-tokens.types\";\nexport * from \"./skeleton-tokens.types\";\nexport * from \"./stepper-tokens.types\";\nexport * from \"./switch-tokens.types\";\nexport * from \"./textarea-tokens.types\";\nexport * from \"./data-state-tokens.types\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,25 @@
1
+ import { ComponentSize, ComponentVariant } from './components.types.mjs';
2
+
3
+ type RadioSizeTokens = Record<ComponentSize, {
4
+ size: number;
5
+ indicatorSize: number;
6
+ hitSlop: number;
7
+ }>;
8
+ type RadioVariantTokens = Record<ComponentVariant, {
9
+ backgroundColor: string;
10
+ borderColor: string;
11
+ color: string;
12
+ }>;
13
+ interface RadioTokens {
14
+ borderWidth: number;
15
+ borderRadius: number;
16
+ uncheckedBackgroundColor: string;
17
+ uncheckedBorderColor: string;
18
+ disabledBackgroundColor: string;
19
+ disabledBorderColor: string;
20
+ disabledColor: string;
21
+ sizes: RadioSizeTokens;
22
+ variants: RadioVariantTokens;
23
+ }
24
+
25
+ export type { RadioSizeTokens, RadioTokens, RadioVariantTokens };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=radio-tokens.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,32 @@
1
+ import { ComponentSize, ComponentVariant } from './components.types.mjs';
2
+
3
+ type SwitchSizeTokens = Record<ComponentSize, {
4
+ width: number;
5
+ height: number;
6
+ thumbSize: number;
7
+ trackPadding: number;
8
+ loadingIndicatorScale: number;
9
+ hitSlop: number;
10
+ }>;
11
+ type SwitchVariantTokens = Record<ComponentVariant, {
12
+ backgroundColor: string;
13
+ borderColor: string;
14
+ color: string;
15
+ }>;
16
+ interface SwitchTokens {
17
+ animationDuration: number;
18
+ borderWidth: number;
19
+ borderRadius: number;
20
+ thumbBorderRadius: number;
21
+ uncheckedBackgroundColor: string;
22
+ uncheckedBorderColor: string;
23
+ uncheckedThumbColor: string;
24
+ disabledBackgroundColor: string;
25
+ disabledBorderColor: string;
26
+ disabledThumbColor: string;
27
+ loadingIndicatorColor: string;
28
+ sizes: SwitchSizeTokens;
29
+ variants: SwitchVariantTokens;
30
+ }
31
+
32
+ export type { SwitchSizeTokens, SwitchTokens, SwitchVariantTokens };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=switch-tokens.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,17 @@
1
+ import { ComponentSize } from './components.types.mjs';
2
+
3
+ type TextareaSizeTokens = Record<ComponentSize, {
4
+ lineHeight: number;
5
+ paddingVertical: number;
6
+ }>;
7
+ interface TextareaTokens {
8
+ counterColor: string;
9
+ counterFontSize: number;
10
+ disabledCounterColor: string;
11
+ errorCounterColor: string;
12
+ footerGap: number;
13
+ footerMarginTop: number;
14
+ sizes: TextareaSizeTokens;
15
+ }
16
+
17
+ export type { TextareaSizeTokens, TextareaTokens };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=textarea-tokens.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,3 +1,5 @@
1
+ import { CheckboxTokens } from './checkbox-tokens.types.mjs';
2
+ import { RadioTokens } from './radio-tokens.types.mjs';
1
3
  import { ButtonTokens, IconButtonTokens } from './buttons-tokens.types.mjs';
2
4
  import { ControlAddonTokens, ControlContainerTokens, ControlErrorTokens, ControlInputTokens, ControlLabelTokens } from './control-tokes.types.mjs';
3
5
  import { DataStateTokens } from './data-state-tokens.types.mjs';
@@ -8,7 +10,9 @@ import { PressableTokens } from './pressable-tokens.types.mjs';
8
10
  import { SelectTokens } from './select-tokens.types.mjs';
9
11
  import { SkeletonTokens } from './skeleton-tokens.types.mjs';
10
12
  import { StepperTokens } from './stepper-tokens.types.mjs';
13
+ import { SwitchTokens } from './switch-tokens.types.mjs';
11
14
  import { TagTokens } from './tag-tokens.types.mjs';
15
+ import { TextareaTokens } from './textarea-tokens.types.mjs';
12
16
  import { TimePickerTokens } from './time-picker-token.types.mjs';
13
17
  import { NeutralColor, Space, Radii, BorderSize, FontFamily, FontWeight, FontSize, LineHeight, LetterSpacings } from './tokens.types.mjs';
14
18
  import './components.types.mjs';
@@ -62,9 +66,11 @@ interface ComponentsThemes {
62
66
  }
63
67
  interface ComponentsTokens {
64
68
  button: ButtonTokens;
69
+ checkbox: CheckboxTokens;
65
70
  iconButton: IconButtonTokens;
66
71
  icon: IconTokens;
67
72
  pressable: PressableTokens;
73
+ radio: RadioTokens;
68
74
  tag: TagTokens;
69
75
  controlAddon: ControlAddonTokens;
70
76
  controlContainer: ControlContainerTokens;
@@ -77,6 +83,8 @@ interface ComponentsTokens {
77
83
  flyout: FlyoutTokens;
78
84
  skeleton: SkeletonTokens;
79
85
  stepper: StepperTokens;
86
+ switch: SwitchTokens;
87
+ textarea: TextareaTokens;
80
88
  dataState: DataStateTokens;
81
89
  }
82
90
  interface PrimitiveThemeTokens {
@@ -10,8 +10,10 @@ import '../types/spacing.types.mjs';
10
10
  import '../types/typography.types.mjs';
11
11
  import '../types/tokens.types.mjs';
12
12
  import '../types/theme-provider.types.mjs';
13
- import '../types/buttons-tokens.types.mjs';
13
+ import '../types/checkbox-tokens.types.mjs';
14
14
  import '../types/components.types.mjs';
15
+ import '../types/radio-tokens.types.mjs';
16
+ import '../types/buttons-tokens.types.mjs';
15
17
  import '../types/control-tokes.types.mjs';
16
18
  import '../types/data-state-tokens.types.mjs';
17
19
  import '../types/datetime-picker-tokens.types.mjs';
@@ -21,5 +23,7 @@ import '../types/pressable-tokens.types.mjs';
21
23
  import '../types/select-tokens.types.mjs';
22
24
  import '../types/skeleton-tokens.types.mjs';
23
25
  import '../types/stepper-tokens.types.mjs';
26
+ import '../types/switch-tokens.types.mjs';
24
27
  import '../types/tag-tokens.types.mjs';
28
+ import '../types/textarea-tokens.types.mjs';
25
29
  import '../types/time-picker-token.types.mjs';
@@ -9,8 +9,10 @@ import '../types/flex.types.mjs';
9
9
  import '../types/spacing.types.mjs';
10
10
  import '../types/typography.types.mjs';
11
11
  import '../types/tokens.types.mjs';
12
- import '../types/buttons-tokens.types.mjs';
12
+ import '../types/checkbox-tokens.types.mjs';
13
13
  import '../types/components.types.mjs';
14
+ import '../types/radio-tokens.types.mjs';
15
+ import '../types/buttons-tokens.types.mjs';
14
16
  import '../types/control-tokes.types.mjs';
15
17
  import '../types/data-state-tokens.types.mjs';
16
18
  import '../types/datetime-picker-tokens.types.mjs';
@@ -20,7 +22,9 @@ import '../types/pressable-tokens.types.mjs';
20
22
  import '../types/select-tokens.types.mjs';
21
23
  import '../types/skeleton-tokens.types.mjs';
22
24
  import '../types/stepper-tokens.types.mjs';
25
+ import '../types/switch-tokens.types.mjs';
23
26
  import '../types/tag-tokens.types.mjs';
27
+ import '../types/textarea-tokens.types.mjs';
24
28
  import '../types/time-picker-token.types.mjs';
25
29
 
26
30
  declare const extractStyleProps: <Props extends object>(props: Props) => StyleProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@impulse-ui-native/theme",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Theme tokens, providers, and styling utilities for ImpulseUI Native.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
- "@impulse-ui-native/core": "2.5.0"
31
+ "@impulse-ui-native/core": "2.7.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "~19.2.14",
@@ -37,9 +37,9 @@
37
37
  "react": "19.2.3",
38
38
  "react-native": "0.86.2",
39
39
  "typescript": "~6.0.3",
40
+ "@impulse-ui-native/eslint-config": "1.0.0",
40
41
  "@impulse-ui-native/prettier-config": "1.0.0",
41
- "@impulse-ui-native/tsconfig": "1.0.0",
42
- "@impulse-ui-native/eslint-config": "1.0.0"
42
+ "@impulse-ui-native/tsconfig": "1.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=18",