@hanzogui/tabs 3.0.2 → 7.3.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 (43) hide show
  1. package/LICENSE +42 -21
  2. package/dist/cjs/StyledContext.cjs +14 -12
  3. package/dist/cjs/StyledContext.native.js +17 -15
  4. package/dist/cjs/StyledContext.native.js.map +1 -1
  5. package/dist/cjs/Tabs.cjs +63 -61
  6. package/dist/cjs/Tabs.native.js +63 -61
  7. package/dist/cjs/Tabs.native.js.map +1 -1
  8. package/dist/cjs/createTabs.cjs +248 -217
  9. package/dist/cjs/createTabs.native.js +260 -232
  10. package/dist/cjs/createTabs.native.js.map +1 -1
  11. package/dist/cjs/index.cjs +15 -13
  12. package/dist/cjs/index.native.js +15 -13
  13. package/dist/cjs/index.native.js.map +1 -1
  14. package/dist/esm/Tabs.mjs +48 -48
  15. package/dist/esm/Tabs.mjs.map +1 -1
  16. package/dist/esm/Tabs.native.js +48 -48
  17. package/dist/esm/Tabs.native.js.map +1 -1
  18. package/dist/esm/createTabs.mjs +210 -181
  19. package/dist/esm/createTabs.mjs.map +1 -1
  20. package/dist/esm/createTabs.native.js +222 -196
  21. package/dist/esm/createTabs.native.js.map +1 -1
  22. package/dist/jsx/StyledContext.native.js +17 -15
  23. package/dist/jsx/Tabs.mjs +48 -48
  24. package/dist/jsx/Tabs.mjs.map +1 -1
  25. package/dist/jsx/Tabs.native.js +63 -61
  26. package/dist/jsx/Tabs.native.js.map +1 -1
  27. package/dist/jsx/createTabs.mjs +210 -181
  28. package/dist/jsx/createTabs.mjs.map +1 -1
  29. package/dist/jsx/createTabs.native.js +260 -232
  30. package/dist/jsx/createTabs.native.js.map +1 -1
  31. package/dist/jsx/index.native.js +15 -13
  32. package/dist/jsx/index.native.js.map +1 -1
  33. package/package.json +23 -21
  34. package/src/Tabs.tsx +1 -1
  35. package/src/createTabs.tsx +6 -1
  36. package/types/StyledContext.d.ts +1 -1
  37. package/types/StyledContext.d.ts.map +1 -0
  38. package/types/Tabs.d.ts +11 -11
  39. package/types/Tabs.d.ts.map +1 -0
  40. package/types/createTabs.d.ts +134 -134
  41. package/types/createTabs.d.ts.map +1 -0
  42. package/types/index.d.ts +167 -167
  43. package/types/index.d.ts.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzogui/tabs",
3
- "version": "3.0.2",
3
+ "version": "7.3.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -31,29 +31,29 @@
31
31
  "access": "public"
32
32
  },
33
33
  "scripts": {
34
- "build": "hanzo-gui-build",
35
- "watch": "hanzo-gui-build --watch",
36
- "clean": "hanzo-gui-build clean",
37
- "clean:build": "hanzo-gui-build clean:build"
34
+ "build": "gui-build",
35
+ "watch": "gui-build --watch",
36
+ "clean": "gui-build clean",
37
+ "clean:build": "gui-build clean:build"
38
38
  },
39
39
  "dependencies": {
40
- "@hanzogui/compose-refs": "3.0.1",
41
- "@hanzogui/constants": "3.0.1",
42
- "@hanzogui/core": "3.0.1",
43
- "@hanzogui/create-context": "3.0.1",
44
- "@hanzogui/element": "3.0.1",
45
- "@hanzogui/get-button-sized": "3.0.1",
46
- "@hanzogui/group": "3.0.1",
47
- "@hanzogui/helpers": "3.0.1",
48
- "@hanzogui/roving-focus": "3.0.1",
49
- "@hanzogui/sizable-context": "3.0.1",
50
- "@hanzogui/stacks": "3.0.1",
51
- "@hanzogui/use-controllable-state": "3.0.1",
52
- "@hanzogui/use-direction": "3.0.1",
53
- "@hanzogui/web": "3.0.1"
40
+ "@hanzogui/compose-refs": "7.3.0",
41
+ "@hanzogui/constants": "7.3.0",
42
+ "@hanzogui/core": "7.3.0",
43
+ "@hanzogui/create-context": "7.3.0",
44
+ "@hanzogui/element": "7.3.0",
45
+ "@hanzogui/get-button-sized": "7.3.0",
46
+ "@hanzogui/group": "7.3.0",
47
+ "@hanzogui/helpers": "7.3.0",
48
+ "@hanzogui/roving-focus": "7.3.0",
49
+ "@hanzogui/sizable-context": "7.3.0",
50
+ "@hanzogui/stacks": "7.3.0",
51
+ "@hanzogui/use-controllable-state": "7.3.0",
52
+ "@hanzogui/use-direction": "7.3.0",
53
+ "@hanzogui/web": "7.3.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@hanzogui/build": "3.0.1",
56
+ "@hanzogui/build": "7.3.0",
57
57
  "react": ">=19",
58
58
  "react-native": "0.83.2"
59
59
  },
@@ -61,5 +61,7 @@
61
61
  "react": ">=19",
62
62
  "react-native": "*"
63
63
  },
64
- "module:jsx": "dist/jsx"
64
+ "module:jsx": "dist/jsx",
65
+ "license": "BSD-3-Clause",
66
+ "author": "Hanzo AI <dev@hanzo.ai>"
65
67
  }
package/src/Tabs.tsx CHANGED
@@ -52,7 +52,7 @@ export const DefaultTabsTabFrame = styled(
52
52
  } as const,
53
53
 
54
54
  defaultVariants: {
55
- unstyled: process.env.HANZO_GUI_HEADLESS === '1',
55
+ unstyled: process.env.GUI_HEADLESS === '1',
56
56
  },
57
57
  },
58
58
  {
@@ -122,7 +122,7 @@ export function createTabs<
122
122
  observer.observe(el)
123
123
 
124
124
  return () => {
125
- observer.unobserve(el)
125
+ observer.disconnect()
126
126
  }
127
127
  }, [context.triggersCount])
128
128
 
@@ -140,6 +140,11 @@ export function createTabs<
140
140
  active={isSelected}
141
141
  >
142
142
  <TabFrame
143
+ {...(!isWeb && {
144
+ onLayout: (event) => {
145
+ setLayout(event.nativeEvent.layout)
146
+ },
147
+ })}
143
148
  onMouseEnter={composeEventHandlers(props.onMouseEnter, () => {
144
149
  if (layout) {
145
150
  onInteraction?.('hover', layout)
@@ -1,4 +1,4 @@
1
- import type { SizeTokens } from '@gui/core';
1
+ import type { SizeTokens } from '@hanzogui/core';
2
2
  import type { TabsProps } from './createTabs';
3
3
  export type TabsContextValue = {
4
4
  baseId: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StyledContext.d.ts","sourceRoot":"","sources":["../src/StyledContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAA;IACtC,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAA;IACtB,cAAc,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAA;IAC5C,IAAI,EAAE,UAAU,CAAA;IAChB,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,eAAO,MAAkB,YAAY;;;IAAoB,cAAc,sCAC9B,CAAA"}
package/types/Tabs.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- export declare const DefaultTabsFrame: import("@gui/core").GuiComponent<import("@gui/core").TamaDefer, import("@gui/core").GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
2
- size?: import("@gui/core").SizeTokens | undefined;
1
+ export declare const DefaultTabsFrame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
2
+ size?: import("@hanzogui/core").SizeTokens | undefined;
3
3
  unstyled?: boolean | undefined;
4
- elevation?: number | import("@gui/core").SizeTokens | undefined;
4
+ elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
5
5
  transparent?: boolean | undefined;
6
6
  fullscreen?: boolean | undefined;
7
7
  circular?: boolean | undefined;
8
8
  elevate?: boolean | undefined;
9
9
  bordered?: boolean | undefined;
10
10
  chromeless?: boolean | "all" | undefined;
11
- }, import("@gui/core").StaticConfigPublic>;
12
- export declare const DefaultTabsTabFrame: import("@gui/core").GuiComponent<import("@gui/core").TamaDefer, import("@gui/core").GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase & {
13
- readonly activeStyle?: Partial<import("@gui/core").InferStyleProps<import("react").ForwardRefExoticComponent<Omit<import("@gui/core").RNGuiViewNonStyleProps, keyof import("@gui/core").StackStyleBase> & import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase> & import("@gui/core").WithShorthands<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase>> & import("@gui/core").WithPseudoProps<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase> & import("@gui/core").WithShorthands<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase>>> & import("@gui/core").WithMediaProps<import("@gui/core").WithThemeShorthandsAndPseudos<import("@gui/core").StackStyleBase, {}>> & import("react").RefAttributes<import("@gui/core").GuiElement>> & import("@gui/core").StaticComponentObject<import("@gui/core").TamaDefer, import("@gui/core").GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {}, {}> & Omit<{}, "staticConfig" | "styleable"> & {
14
- __tama: [import("@gui/core").TamaDefer, import("@gui/core").GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {}, {}];
11
+ }, import("@hanzogui/core").StaticConfigPublic>;
12
+ export declare const DefaultTabsTabFrame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase & {
13
+ readonly activeStyle?: Partial<import("@hanzogui/core").InferStyleProps<import("react").ForwardRefExoticComponent<Omit<import("@hanzogui/core").RNViewNonStyleProps, keyof import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>> & import("@hanzogui/core").WithPseudoProps<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase> & import("@hanzogui/core").WithShorthands<import("@hanzogui/core").WithThemeValues<import("@hanzogui/core").StackStyleBase>>> & import("@hanzogui/core").WithMediaProps<import("@hanzogui/core").WithThemeShorthandsAndPseudos<import("@hanzogui/core").StackStyleBase, {}>> & import("react").RefAttributes<import("@hanzogui/core").GuiElement>> & import("@hanzogui/core").StaticComponentObject<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {}, {}> & Omit<{}, "staticConfig" | "styleable"> & {
14
+ __tama: [import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {}, {}];
15
15
  }, {
16
16
  accept: {
17
17
  readonly activeStyle: "style";
@@ -20,19 +20,19 @@ export declare const DefaultTabsTabFrame: import("@gui/core").GuiComponent<impor
20
20
  }, {
21
21
  disabled?: boolean | undefined;
22
22
  unstyled?: boolean | undefined;
23
- size?: import("@gui/core").SizeTokens | undefined;
23
+ size?: import("@hanzogui/core").SizeTokens | undefined;
24
24
  }, {
25
25
  accept: {
26
26
  readonly activeStyle: "style";
27
27
  };
28
28
  }>;
29
- export declare const DefaultTabsContentFrame: import("@gui/core").GuiComponent<import("@gui/core").TamaDefer, import("@gui/core").GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
30
- elevation?: number | import("@gui/core").SizeTokens | undefined;
29
+ export declare const DefaultTabsContentFrame: import("@hanzogui/core").GuiComponent<import("@hanzogui/core").TamaDefer, import("@hanzogui/core").GuiElement, import("@hanzogui/core").RNViewNonStyleProps, import("@hanzogui/core").StackStyleBase, {
30
+ elevation?: number | import("@hanzogui/core").SizeTokens | undefined;
31
31
  transparent?: boolean | undefined;
32
32
  fullscreen?: boolean | undefined;
33
33
  circular?: boolean | undefined;
34
34
  elevate?: boolean | undefined;
35
35
  bordered?: boolean | undefined;
36
36
  chromeless?: boolean | "all" | undefined;
37
- }, import("@gui/core").StaticConfigPublic>;
37
+ }, import("@hanzogui/core").StaticConfigPublic>;
38
38
  //# sourceMappingURL=Tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;;;;;+CAE3B,CAAA;AAIF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;EAmD/B,CAAA;AAID,eAAO,MAAM,uBAAuB;;;;;;;;+CAElC,CAAA"}