@tamagui/demos 1.6.3 → 1.7.1

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 (87) hide show
  1. package/dist/cjs/AnimationsPresenceDemo.js +3 -3
  2. package/dist/cjs/LucideIconsDemo.js +1 -1
  3. package/dist/cjs/ProgressDemo.js +2 -2
  4. package/dist/cjs/ProgressDemo.js.map +2 -2
  5. package/dist/cjs/SliderDemo.js +1 -1
  6. package/dist/cjs/SliderDemo.js.map +2 -2
  7. package/dist/cjs/TabsAdvancedDemo.js +138 -0
  8. package/dist/cjs/TabsAdvancedDemo.js.map +7 -0
  9. package/dist/cjs/TabsDemo.js +85 -0
  10. package/dist/cjs/TabsDemo.js.map +7 -0
  11. package/dist/cjs/TabsHighlightedDemo.js +188 -0
  12. package/dist/cjs/TabsHighlightedDemo.js.map +7 -0
  13. package/dist/cjs/TabsUnderlinedDemo.js +176 -0
  14. package/dist/cjs/TabsUnderlinedDemo.js.map +7 -0
  15. package/dist/cjs/UpdateThemeDemo.js +1 -1
  16. package/dist/cjs/index.js +6 -0
  17. package/dist/cjs/index.js.map +2 -2
  18. package/dist/esm/ProgressDemo.js +2 -2
  19. package/dist/esm/ProgressDemo.js.map +2 -2
  20. package/dist/esm/ProgressDemo.mjs +2 -2
  21. package/dist/esm/ProgressDemo.mjs.map +2 -2
  22. package/dist/esm/SliderDemo.js +1 -1
  23. package/dist/esm/SliderDemo.js.map +2 -2
  24. package/dist/esm/SliderDemo.mjs +1 -1
  25. package/dist/esm/SliderDemo.mjs.map +2 -2
  26. package/dist/esm/TabsAdvancedDemo.js +122 -0
  27. package/dist/esm/TabsAdvancedDemo.js.map +7 -0
  28. package/dist/esm/TabsAdvancedDemo.mjs +122 -0
  29. package/dist/esm/TabsAdvancedDemo.mjs.map +7 -0
  30. package/dist/esm/TabsDemo.js +61 -0
  31. package/dist/esm/TabsDemo.js.map +7 -0
  32. package/dist/esm/TabsDemo.mjs +61 -0
  33. package/dist/esm/TabsDemo.mjs.map +7 -0
  34. package/dist/esm/TabsHighlightedDemo.js +172 -0
  35. package/dist/esm/TabsHighlightedDemo.js.map +7 -0
  36. package/dist/esm/TabsHighlightedDemo.mjs +172 -0
  37. package/dist/esm/TabsHighlightedDemo.mjs.map +7 -0
  38. package/dist/esm/TabsUnderlinedDemo.js +160 -0
  39. package/dist/esm/TabsUnderlinedDemo.js.map +7 -0
  40. package/dist/esm/TabsUnderlinedDemo.mjs +160 -0
  41. package/dist/esm/TabsUnderlinedDemo.mjs.map +7 -0
  42. package/dist/esm/index.js +4 -0
  43. package/dist/esm/index.js.map +2 -2
  44. package/dist/esm/index.mjs +4 -0
  45. package/dist/esm/index.mjs.map +2 -2
  46. package/dist/jsx/ProgressDemo.js +2 -2
  47. package/dist/jsx/ProgressDemo.js.map +2 -2
  48. package/dist/jsx/ProgressDemo.mjs +2 -2
  49. package/dist/jsx/ProgressDemo.mjs.map +2 -2
  50. package/dist/jsx/SliderDemo.js +1 -1
  51. package/dist/jsx/SliderDemo.js.map +2 -2
  52. package/dist/jsx/SliderDemo.mjs +1 -1
  53. package/dist/jsx/SliderDemo.mjs.map +2 -2
  54. package/dist/jsx/TabsAdvancedDemo.js +103 -0
  55. package/dist/jsx/TabsAdvancedDemo.js.map +7 -0
  56. package/dist/jsx/TabsAdvancedDemo.mjs +103 -0
  57. package/dist/jsx/TabsAdvancedDemo.mjs.map +7 -0
  58. package/dist/jsx/TabsDemo.js +52 -0
  59. package/dist/jsx/TabsDemo.js.map +7 -0
  60. package/dist/jsx/TabsDemo.mjs +52 -0
  61. package/dist/jsx/TabsDemo.mjs.map +7 -0
  62. package/dist/jsx/TabsHighlightedDemo.js +141 -0
  63. package/dist/jsx/TabsHighlightedDemo.js.map +7 -0
  64. package/dist/jsx/TabsHighlightedDemo.mjs +141 -0
  65. package/dist/jsx/TabsHighlightedDemo.mjs.map +7 -0
  66. package/dist/jsx/TabsUnderlinedDemo.js +133 -0
  67. package/dist/jsx/TabsUnderlinedDemo.js.map +7 -0
  68. package/dist/jsx/TabsUnderlinedDemo.mjs +133 -0
  69. package/dist/jsx/TabsUnderlinedDemo.mjs.map +7 -0
  70. package/dist/jsx/index.js +4 -0
  71. package/dist/jsx/index.js.map +2 -2
  72. package/dist/jsx/index.mjs +4 -0
  73. package/dist/jsx/index.mjs.map +2 -2
  74. package/package.json +17 -18
  75. package/src/ProgressDemo.tsx +2 -2
  76. package/src/SliderDemo.tsx +1 -1
  77. package/src/TabsAdvancedDemo.tsx +148 -0
  78. package/src/TabsDemo.tsx +91 -0
  79. package/src/index.tsx +2 -0
  80. package/types/TabsAdvancedDemo.d.ts +3 -0
  81. package/types/TabsAdvancedDemo.d.ts.map +1 -0
  82. package/types/TabsDemo.d.ts +3 -0
  83. package/types/TabsDemo.d.ts.map +1 -0
  84. package/types/TabsHighlightedDemo.d.ts.map +1 -0
  85. package/types/TabsUnderlinedDemo.d.ts.map +1 -0
  86. package/types/index.d.ts +2 -0
  87. package/types/index.d.ts.map +1 -1
@@ -0,0 +1,172 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef, useState } from "react";
3
+ import {
4
+ AnimatePresence,
5
+ H5,
6
+ Stack,
7
+ Tabs,
8
+ XStack,
9
+ YStack,
10
+ styled
11
+ } from "tamagui";
12
+ function TabsHighlightedDemo() {
13
+ return /* @__PURE__ */ jsx(XStack, { maxHeight: "100%", maxWidth: "100%", justifyContent: "flex-start", px: "$4", children: /* @__PURE__ */ jsx(HighlightTabs, {}) });
14
+ }
15
+ const TabsRovingIndicator = styled(Stack, {
16
+ name: "TabsRovingIndicator",
17
+ variants: {
18
+ active: {
19
+ true: {
20
+ backgroundColor: "$color8"
21
+ }
22
+ },
23
+ variants: {
24
+ active: {
25
+ true: {
26
+ backgroundColor: "$color8"
27
+ }
28
+ },
29
+ enter: {
30
+ true: {
31
+ opacity: 0
32
+ }
33
+ },
34
+ exit: {
35
+ true: {
36
+ opacity: 0
37
+ }
38
+ }
39
+ }
40
+ },
41
+ defaultVariants: {
42
+ position: "absolute",
43
+ backgroundColor: "$color5",
44
+ opacity: 1,
45
+ animation: "100ms",
46
+ borderRadius: "$4"
47
+ }
48
+ });
49
+ const AnimatedYStack = styled(YStack, {
50
+ variants: {
51
+ isLeft: { true: { x: -25, opacity: 0 } },
52
+ isRight: { true: { x: 25, opacity: 0 } }
53
+ }
54
+ });
55
+ const HighlightTabs = () => {
56
+ const [currentTab, setCurrentTab] = useState("tab1");
57
+ const [focusIndicatorLayout, setFocusIndicatorLayout] = useState(null);
58
+ const [hoverIndicatorLayout, setHoverIndicatorLayout] = useState(null);
59
+ const [selectionIndicatorLayout, setSelectionIndicatorLayout] = useState(null);
60
+ const prevSelectionIndicatorLayout = useRef(null);
61
+ const handleUpdateSelectionIndicator = (newSize) => {
62
+ prevSelectionIndicatorLayout.current = selectionIndicatorLayout;
63
+ setSelectionIndicatorLayout(newSize);
64
+ };
65
+ const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout;
66
+ const direction = useMemo(() => {
67
+ if (!selectionIndicatorLayout || !prevSelectionIndicatorLayout.current || selectionIndicatorLayout.x === prevSelectionIndicatorLayout.current.x) {
68
+ return 0;
69
+ }
70
+ return selectionIndicatorLayout.x > prevSelectionIndicatorLayout.current.x ? 1 : -1;
71
+ }, [selectionIndicatorLayout]);
72
+ const enterVariant = direction === 1 ? "isLeft" : direction === -1 ? "isRight" : void 0;
73
+ const exitVariant = direction === 1 ? "isRight" : direction === -1 ? "isLeft" : void 0;
74
+ return /* @__PURE__ */ jsxs(
75
+ Tabs,
76
+ {
77
+ value: currentTab,
78
+ onValueChange: setCurrentTab,
79
+ orientation: "horizontal",
80
+ br: "$4",
81
+ p: "$2",
82
+ height: 150,
83
+ flexDirection: "column",
84
+ activationMode: "manual",
85
+ children: [
86
+ /* @__PURE__ */ jsxs(
87
+ Tabs.List,
88
+ {
89
+ loop: false,
90
+ "aria-label": "Manage your account",
91
+ disablePassBorderRadius: true,
92
+ overflow: "visible",
93
+ children: [
94
+ intentIndicatorLayout && /* @__PURE__ */ jsx(
95
+ TabsRovingIndicator,
96
+ {
97
+ width: intentIndicatorLayout.width,
98
+ height: intentIndicatorLayout.height,
99
+ x: intentIndicatorLayout.x,
100
+ y: intentIndicatorLayout.y
101
+ }
102
+ ),
103
+ selectionIndicatorLayout && /* @__PURE__ */ jsx(
104
+ TabsRovingIndicator,
105
+ {
106
+ theme: "active",
107
+ active: true,
108
+ width: selectionIndicatorLayout.width,
109
+ height: 2,
110
+ x: selectionIndicatorLayout.x,
111
+ y: 40
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx(
115
+ Tabs.Trigger,
116
+ {
117
+ unstyled: true,
118
+ color: "$color12",
119
+ value: "tab1",
120
+ size: "$3",
121
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
122
+ onHoveredLayoutChange: setHoverIndicatorLayout,
123
+ onFocusedLayoutChange: setFocusIndicatorLayout,
124
+ children: "Profile"
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx(
128
+ Tabs.Trigger,
129
+ {
130
+ unstyled: true,
131
+ color: "$color12",
132
+ size: "$3",
133
+ value: "tab2",
134
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
135
+ onHoveredLayoutChange: setHoverIndicatorLayout,
136
+ onFocusedLayoutChange: setFocusIndicatorLayout,
137
+ children: "Connections"
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsx(
141
+ Tabs.Trigger,
142
+ {
143
+ unstyled: true,
144
+ color: "$color12",
145
+ size: "$3",
146
+ value: "tab3",
147
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
148
+ onHoveredLayoutChange: setHoverIndicatorLayout,
149
+ onFocusedLayoutChange: setFocusIndicatorLayout,
150
+ children: "Notifications"
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ ),
156
+ /* @__PURE__ */ jsx(YStack, { f: 1, children: /* @__PURE__ */ jsx(
157
+ AnimatePresence,
158
+ {
159
+ exitBeforeEnter: true,
160
+ enterVariant,
161
+ exitVariant,
162
+ children: /* @__PURE__ */ jsx(AnimatedYStack, { animation: "100ms", x: 0, o: 1, f: 1, children: /* @__PURE__ */ jsx(Tabs.Content, { value: currentTab, forceMount: true, p: "$2", f: 1, jc: "center", children: /* @__PURE__ */ jsx(H5, { ta: "center", children: currentTab }) }) }, currentTab)
163
+ }
164
+ ) })
165
+ ]
166
+ }
167
+ );
168
+ };
169
+ export {
170
+ TabsHighlightedDemo
171
+ };
172
+ //# sourceMappingURL=TabsHighlightedDemo.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TabsHighlightedDemo.tsx"],
4
+ "sourcesContent": ["import { useMemo, useRef, useState } from 'react'\nimport {\n AnimatePresence,\n H5,\n Stack,\n TabTriggerLayout,\n Tabs,\n XStack,\n YStack,\n styled,\n} from 'tamagui'\n\nexport function TabsHighlightedDemo() {\n return (\n <XStack maxHeight=\"100%\" maxWidth=\"100%\" justifyContent=\"flex-start\" px=\"$4\">\n <HighlightTabs />\n </XStack>\n )\n}\n\nconst TabsRovingIndicator = styled(Stack, {\n name: 'TabsRovingIndicator',\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n enter: {\n true: {\n opacity: 0,\n },\n },\n exit: {\n true: {\n opacity: 0,\n },\n },\n },\n },\n defaultVariants: {\n position: 'absolute',\n backgroundColor: '$color5',\n opacity: 1,\n animation: '100ms',\n borderRadius: '$4',\n },\n})\n\nconst AnimatedYStack = styled(YStack, {\n variants: {\n isLeft: { true: { x: -25, opacity: 0 } },\n isRight: { true: { x: 25, opacity: 0 } },\n } as const,\n})\n\nconst HighlightTabs = () => {\n const [currentTab, setCurrentTab] = useState('tab1')\n const [focusIndicatorLayout, setFocusIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [hoverIndicatorLayout, setHoverIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [selectionIndicatorLayout, setSelectionIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const prevSelectionIndicatorLayout = useRef<TabTriggerLayout | null>(null)\n const handleUpdateSelectionIndicator = (newSize: TabTriggerLayout | null) => {\n prevSelectionIndicatorLayout.current = selectionIndicatorLayout\n setSelectionIndicatorLayout(newSize)\n }\n\n const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout\n\n /**\n * -1: from left\n * 0: n/a\n * 1: from right\n */\n const direction = useMemo(() => {\n if (\n !selectionIndicatorLayout ||\n !prevSelectionIndicatorLayout.current ||\n selectionIndicatorLayout.x === prevSelectionIndicatorLayout.current.x\n ) {\n return 0\n }\n return selectionIndicatorLayout.x > prevSelectionIndicatorLayout.current.x ? 1 : -1\n }, [selectionIndicatorLayout])\n\n const enterVariant =\n direction === 1 ? 'isLeft' : direction === -1 ? 'isRight' : undefined\n const exitVariant =\n direction === 1 ? 'isRight' : direction === -1 ? 'isLeft' : undefined\n\n return (\n <Tabs\n value={currentTab}\n onValueChange={setCurrentTab}\n orientation=\"horizontal\"\n br=\"$4\"\n p=\"$2\"\n height={150}\n flexDirection=\"column\"\n activationMode=\"manual\"\n >\n <Tabs.List\n loop={false}\n aria-label=\"Manage your account\"\n disablePassBorderRadius\n overflow=\"visible\"\n >\n {intentIndicatorLayout && (\n <TabsRovingIndicator\n width={intentIndicatorLayout.width}\n height={intentIndicatorLayout.height}\n x={intentIndicatorLayout.x}\n y={intentIndicatorLayout.y}\n />\n )}\n\n {selectionIndicatorLayout && (\n <TabsRovingIndicator\n theme=\"active\"\n active\n width={selectionIndicatorLayout.width}\n height={2}\n x={selectionIndicatorLayout.x}\n y={40}\n />\n )}\n\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab1\"\n size=\"$3\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Profile\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n size=\"$3\"\n value=\"tab2\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Connections\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n size=\"$3\"\n value=\"tab3\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Notifications\n </Tabs.Trigger>\n </Tabs.List>\n\n <YStack f={1}>\n <AnimatePresence\n exitBeforeEnter\n enterVariant={enterVariant}\n exitVariant={exitVariant}\n >\n <AnimatedYStack key={currentTab} animation=\"100ms\" x={0} o={1} f={1}>\n <Tabs.Content value={currentTab} forceMount p=\"$2\" f={1} jc=\"center\">\n <H5 ta=\"center\">{currentTab}</H5>\n </Tabs.Content>\n </AnimatedYStack>\n </AnimatePresence>\n </YStack>\n </Tabs>\n )\n}\n"],
5
+ "mappings": "AAeM,cA+FA,YA/FA;AAfN,SAAS,SAAS,QAAQ,gBAAgB;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,sBAAsB;AACpC,SACE,oBAAC,UAAO,WAAU,QAAO,UAAS,QAAO,gBAAe,cAAa,IAAG,MACtE,8BAAC,iBAAc,GACjB;AAEJ;AAEA,MAAM,sBAAsB,OAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ,iBAAiB;AAAA,QACnB;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,MAAM;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A;AAAA,cAED;AAAA;AAAA;AAAA,QACF;AAAA,QAEA,oBAAC,UAAO,GAAG,GACT;AAAA,UAAC;AAAA;AAAA,YACC,iBAAe;AAAA,YACf;AAAA,YACA;AAAA,YAEA,8BAAC,kBAAgC,WAAU,SAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAChE,8BAAC,KAAK,SAAL,EAAa,OAAO,YAAY,YAAU,MAAC,GAAE,MAAK,GAAG,GAAG,IAAG,UAC1D,8BAAC,MAAG,IAAG,UAAU,sBAAW,GAC9B,KAHmB,UAIrB;AAAA;AAAA,QACF,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,160 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef, useState } from "react";
3
+ import {
4
+ AnimatePresence,
5
+ H5,
6
+ Stack,
7
+ Tabs,
8
+ XStack,
9
+ YStack,
10
+ styled
11
+ } from "tamagui";
12
+ function TabsUnderlinedDemo() {
13
+ return /* @__PURE__ */ jsx(XStack, { maxHeight: "100%", maxWidth: "100%", justifyContent: "flex-start", px: "$4", children: /* @__PURE__ */ jsx(UnderlineTabs, {}) });
14
+ }
15
+ const TabsRovingIndicator = styled(Stack, {
16
+ name: "TabsRovingIndicator",
17
+ variants: {
18
+ active: {
19
+ true: {
20
+ backgroundColor: "$color8"
21
+ }
22
+ },
23
+ variants: {
24
+ active: {
25
+ true: {
26
+ backgroundColor: "$color8"
27
+ }
28
+ },
29
+ enter: {
30
+ true: {
31
+ opacity: 0
32
+ }
33
+ },
34
+ exit: {
35
+ true: {
36
+ opacity: 0
37
+ }
38
+ }
39
+ }
40
+ },
41
+ defaultVariants: {
42
+ position: "absolute",
43
+ backgroundColor: "$color5",
44
+ opacity: 1,
45
+ animation: "100ms"
46
+ }
47
+ });
48
+ const AnimatedYStack = styled(YStack, {
49
+ variants: {
50
+ isTop: { true: { y: -25, opacity: 0 } },
51
+ isBottom: { true: { y: 25, opacity: 0 } }
52
+ }
53
+ });
54
+ const UnderlineTabs = () => {
55
+ const [currentTab, setCurrentTab] = useState("tab1");
56
+ const [focusIndicatorLayout, setFocusIndicatorLayout] = useState(null);
57
+ const [hoverIndicatorLayout, setHoverIndicatorLayout] = useState(null);
58
+ const [selectionIndicatorLayout, setSelectionIndicatorLayout] = useState(null);
59
+ const prevSelectionIndicatorLayout = useRef(null);
60
+ const handleUpdateSelectionIndicator = (newSize) => {
61
+ prevSelectionIndicatorLayout.current = selectionIndicatorLayout;
62
+ setSelectionIndicatorLayout(newSize);
63
+ };
64
+ const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout;
65
+ const direction = useMemo(() => {
66
+ if (!selectionIndicatorLayout || !prevSelectionIndicatorLayout.current || selectionIndicatorLayout.y === prevSelectionIndicatorLayout.current.y) {
67
+ return 0;
68
+ }
69
+ return selectionIndicatorLayout.y > prevSelectionIndicatorLayout.current.y ? 1 : -1;
70
+ }, [selectionIndicatorLayout]);
71
+ const enterVariant = direction === 1 ? "isTop" : direction === -1 ? "isBottom" : void 0;
72
+ const exitVariant = direction === 1 ? "isBottom" : direction === -1 ? "isTop" : void 0;
73
+ return /* @__PURE__ */ jsxs(
74
+ Tabs,
75
+ {
76
+ value: currentTab,
77
+ onValueChange: setCurrentTab,
78
+ orientation: "vertical",
79
+ width: 300,
80
+ br: "$4",
81
+ ai: "center",
82
+ activationMode: "manual",
83
+ children: [
84
+ /* @__PURE__ */ jsx(YStack, { borderColor: "$color3", borderRightWidth: "$0.5", mr: "$2", children: /* @__PURE__ */ jsxs(Tabs.List, { loop: false, "aria-label": "Manage your account", disablePassBorderRadius: true, children: [
85
+ intentIndicatorLayout && /* @__PURE__ */ jsx(
86
+ TabsRovingIndicator,
87
+ {
88
+ width: "$0.5",
89
+ height: intentIndicatorLayout.height,
90
+ x: intentIndicatorLayout.x,
91
+ y: intentIndicatorLayout.y,
92
+ right: 0
93
+ }
94
+ ),
95
+ selectionIndicatorLayout && /* @__PURE__ */ jsx(
96
+ TabsRovingIndicator,
97
+ {
98
+ theme: "active",
99
+ active: true,
100
+ width: "$0.5",
101
+ height: selectionIndicatorLayout.height,
102
+ x: selectionIndicatorLayout.x,
103
+ y: selectionIndicatorLayout.y,
104
+ right: 0
105
+ }
106
+ ),
107
+ /* @__PURE__ */ jsx(
108
+ Tabs.Trigger,
109
+ {
110
+ unstyled: true,
111
+ color: "$color12",
112
+ value: "tab1",
113
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
114
+ onHoveredLayoutChange: setHoverIndicatorLayout,
115
+ onFocusedLayoutChange: setFocusIndicatorLayout,
116
+ children: "Profile"
117
+ }
118
+ ),
119
+ /* @__PURE__ */ jsx(
120
+ Tabs.Trigger,
121
+ {
122
+ unstyled: true,
123
+ color: "$color12",
124
+ value: "tab2",
125
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
126
+ onHoveredLayoutChange: setHoverIndicatorLayout,
127
+ onFocusedLayoutChange: setFocusIndicatorLayout,
128
+ children: "Connections"
129
+ }
130
+ ),
131
+ /* @__PURE__ */ jsx(
132
+ Tabs.Trigger,
133
+ {
134
+ unstyled: true,
135
+ color: "$color12",
136
+ value: "tab3",
137
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
138
+ onHoveredLayoutChange: setHoverIndicatorLayout,
139
+ onFocusedLayoutChange: setFocusIndicatorLayout,
140
+ children: "Notifications"
141
+ }
142
+ )
143
+ ] }) }),
144
+ /* @__PURE__ */ jsx(
145
+ AnimatePresence,
146
+ {
147
+ exitBeforeEnter: true,
148
+ enterVariant,
149
+ exitVariant,
150
+ children: /* @__PURE__ */ jsx(AnimatedYStack, { animation: "100ms", y: 0, o: 1, children: /* @__PURE__ */ jsx(Tabs.Content, { value: currentTab, forceMount: true, p: "$2", children: /* @__PURE__ */ jsx(H5, { ta: "center", children: currentTab }) }) }, currentTab)
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ );
156
+ };
157
+ export {
158
+ TabsUnderlinedDemo
159
+ };
160
+ //# sourceMappingURL=TabsUnderlinedDemo.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TabsUnderlinedDemo.tsx"],
4
+ "sourcesContent": ["import { useMemo, useRef, useState } from 'react'\nimport {\n AnimatePresence,\n H5,\n Stack,\n TabTriggerLayout,\n Tabs,\n XStack,\n YStack,\n styled,\n} from 'tamagui'\n\nexport function TabsUnderlinedDemo() {\n return (\n <XStack maxHeight=\"100%\" maxWidth=\"100%\" justifyContent=\"flex-start\" px=\"$4\">\n <UnderlineTabs />\n </XStack>\n )\n}\n\nconst TabsRovingIndicator = styled(Stack, {\n name: 'TabsRovingIndicator',\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n enter: {\n true: {\n opacity: 0,\n },\n },\n exit: {\n true: {\n opacity: 0,\n },\n },\n },\n },\n defaultVariants: {\n position: 'absolute',\n backgroundColor: '$color5',\n opacity: 1,\n animation: '100ms',\n },\n})\n\nconst AnimatedYStack = styled(YStack, {\n variants: {\n isTop: { true: { y: -25, opacity: 0 } },\n isBottom: { true: { y: 25, opacity: 0 } },\n } as const,\n})\n\nconst UnderlineTabs = () => {\n const [currentTab, setCurrentTab] = useState('tab1')\n const [focusIndicatorLayout, setFocusIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [hoverIndicatorLayout, setHoverIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [selectionIndicatorLayout, setSelectionIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const prevSelectionIndicatorLayout = useRef<TabTriggerLayout | null>(null)\n const handleUpdateSelectionIndicator = (newSize: TabTriggerLayout | null) => {\n prevSelectionIndicatorLayout.current = selectionIndicatorLayout\n setSelectionIndicatorLayout(newSize)\n }\n\n const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout\n\n /**\n * -1: from top\n * 0: n/a\n * 1: from bottom\n */\n const direction = useMemo(() => {\n if (\n !selectionIndicatorLayout ||\n !prevSelectionIndicatorLayout.current ||\n selectionIndicatorLayout.y === prevSelectionIndicatorLayout.current.y\n ) {\n return 0\n }\n return selectionIndicatorLayout.y > prevSelectionIndicatorLayout.current.y ? 1 : -1\n }, [selectionIndicatorLayout])\n\n const enterVariant =\n direction === 1 ? 'isTop' : direction === -1 ? 'isBottom' : undefined\n const exitVariant =\n direction === 1 ? 'isBottom' : direction === -1 ? 'isTop' : undefined\n\n return (\n <Tabs\n value={currentTab}\n onValueChange={setCurrentTab}\n orientation=\"vertical\"\n width={300}\n br=\"$4\"\n ai=\"center\"\n activationMode=\"manual\"\n >\n <YStack borderColor=\"$color3\" borderRightWidth=\"$0.5\" mr=\"$2\">\n <Tabs.List loop={false} aria-label=\"Manage your account\" disablePassBorderRadius>\n {intentIndicatorLayout && (\n <TabsRovingIndicator\n width=\"$0.5\"\n height={intentIndicatorLayout.height}\n x={intentIndicatorLayout.x}\n y={intentIndicatorLayout.y}\n right={0}\n />\n )}\n {selectionIndicatorLayout && (\n <TabsRovingIndicator\n theme=\"active\"\n active\n width=\"$0.5\"\n height={selectionIndicatorLayout.height}\n x={selectionIndicatorLayout.x}\n y={selectionIndicatorLayout.y}\n right={0}\n />\n )}\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab1\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Profile\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab2\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Connections\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab3\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Notifications\n </Tabs.Trigger>\n </Tabs.List>\n </YStack>\n <AnimatePresence\n exitBeforeEnter\n enterVariant={enterVariant}\n exitVariant={exitVariant}\n >\n <AnimatedYStack key={currentTab} animation=\"100ms\" y={0} o={1}>\n <Tabs.Content value={currentTab} forceMount p=\"$2\">\n <H5 ta=\"center\">{currentTab}</H5>\n </Tabs.Content>\n </AnimatedYStack>\n </AnimatePresence>\n </Tabs>\n )\n}\n"],
5
+ "mappings": "AAeM,cA8FE,YA9FF;AAfN,SAAS,SAAS,QAAQ,gBAAgB;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,qBAAqB;AACnC,SACE,oBAAC,UAAO,WAAU,QAAO,UAAS,QAAO,gBAAe,cAAa,IAAG,MACtE,8BAAC,iBAAc,GACjB;AAEJ;AAEA,MAAM,sBAAsB,OAAO,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ,iBAAiB;AAAA,QACnB;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,MAAM;AAAA,UACJ,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,UACJ,SAAS;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AACF,CAAC;AAED,MAAM,iBAAiB,OAAO,QAAQ;AAAA,EACpC,UAAU;AAAA,IACR,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,SAA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GAAG,sBAAsB;AAAA,cACzB,OAAO;AAAA;AAAA,UACT;AAAA,UAED,4BACC;AAAA,YAAC;AAAA;AAAA,cACC,OAAM;AAAA,cACN,QAAM;AAAA,cACN,OAAM;AAAA,cACN,QAAQ,yBAAyB;AAAA,cACjC,GAAG,yBAAyB;AAAA,cAC5B,GAAG,yBAAyB;AAAA,cAC5B,OAAO;AAAA;AAAA,UACT;AAAA,UAEF;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,OAAM;AAAA,cACN,wBAAwB;AAAA,cACxB,uBAAuB;AAAA,cACvB,uBAAuB;AAAA,cACxB;AAAA;AAAA,UAED;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,OAAM;AAAA,cACN,wBAAwB;AAAA,cACxB,uBAAuB;AAAA,cACvB,uBAAuB;AAAA,cACxB;AAAA;AAAA,UAED;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,OAAM;AAAA,cACN,wBAAwB;AAAA,cACxB,uBAAuB;AAAA,cACvB,uBAAuB;AAAA,cACxB;AAAA;AAAA,UAED;AAAA,WACF,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAe;AAAA,YACf;AAAA,YACA;AAAA,YAEA,8BAAC,kBAAgC,WAAU,SAAQ,GAAG,GAAG,GAAG,GAC1D,8BAAC,KAAK,SAAL,EAAa,OAAO,YAAY,YAAU,MAAC,GAAE,MAC5C,8BAAC,MAAG,IAAG,UAAU,sBAAW,GAC9B,KAHmB,UAIrB;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,160 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo, useRef, useState } from "react";
3
+ import {
4
+ AnimatePresence,
5
+ H5,
6
+ Stack,
7
+ Tabs,
8
+ XStack,
9
+ YStack,
10
+ styled
11
+ } from "tamagui";
12
+ function TabsUnderlinedDemo() {
13
+ return /* @__PURE__ */ jsx(XStack, { maxHeight: "100%", maxWidth: "100%", justifyContent: "flex-start", px: "$4", children: /* @__PURE__ */ jsx(UnderlineTabs, {}) });
14
+ }
15
+ const TabsRovingIndicator = styled(Stack, {
16
+ name: "TabsRovingIndicator",
17
+ variants: {
18
+ active: {
19
+ true: {
20
+ backgroundColor: "$color8"
21
+ }
22
+ },
23
+ variants: {
24
+ active: {
25
+ true: {
26
+ backgroundColor: "$color8"
27
+ }
28
+ },
29
+ enter: {
30
+ true: {
31
+ opacity: 0
32
+ }
33
+ },
34
+ exit: {
35
+ true: {
36
+ opacity: 0
37
+ }
38
+ }
39
+ }
40
+ },
41
+ defaultVariants: {
42
+ position: "absolute",
43
+ backgroundColor: "$color5",
44
+ opacity: 1,
45
+ animation: "100ms"
46
+ }
47
+ });
48
+ const AnimatedYStack = styled(YStack, {
49
+ variants: {
50
+ isTop: { true: { y: -25, opacity: 0 } },
51
+ isBottom: { true: { y: 25, opacity: 0 } }
52
+ }
53
+ });
54
+ const UnderlineTabs = () => {
55
+ const [currentTab, setCurrentTab] = useState("tab1");
56
+ const [focusIndicatorLayout, setFocusIndicatorLayout] = useState(null);
57
+ const [hoverIndicatorLayout, setHoverIndicatorLayout] = useState(null);
58
+ const [selectionIndicatorLayout, setSelectionIndicatorLayout] = useState(null);
59
+ const prevSelectionIndicatorLayout = useRef(null);
60
+ const handleUpdateSelectionIndicator = (newSize) => {
61
+ prevSelectionIndicatorLayout.current = selectionIndicatorLayout;
62
+ setSelectionIndicatorLayout(newSize);
63
+ };
64
+ const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout;
65
+ const direction = useMemo(() => {
66
+ if (!selectionIndicatorLayout || !prevSelectionIndicatorLayout.current || selectionIndicatorLayout.y === prevSelectionIndicatorLayout.current.y) {
67
+ return 0;
68
+ }
69
+ return selectionIndicatorLayout.y > prevSelectionIndicatorLayout.current.y ? 1 : -1;
70
+ }, [selectionIndicatorLayout]);
71
+ const enterVariant = direction === 1 ? "isTop" : direction === -1 ? "isBottom" : void 0;
72
+ const exitVariant = direction === 1 ? "isBottom" : direction === -1 ? "isTop" : void 0;
73
+ return /* @__PURE__ */ jsxs(
74
+ Tabs,
75
+ {
76
+ value: currentTab,
77
+ onValueChange: setCurrentTab,
78
+ orientation: "vertical",
79
+ width: 300,
80
+ br: "$4",
81
+ ai: "center",
82
+ activationMode: "manual",
83
+ children: [
84
+ /* @__PURE__ */ jsx(YStack, { borderColor: "$color3", borderRightWidth: "$0.5", mr: "$2", children: /* @__PURE__ */ jsxs(Tabs.List, { loop: false, "aria-label": "Manage your account", disablePassBorderRadius: true, children: [
85
+ intentIndicatorLayout && /* @__PURE__ */ jsx(
86
+ TabsRovingIndicator,
87
+ {
88
+ width: "$0.5",
89
+ height: intentIndicatorLayout.height,
90
+ x: intentIndicatorLayout.x,
91
+ y: intentIndicatorLayout.y,
92
+ right: 0
93
+ }
94
+ ),
95
+ selectionIndicatorLayout && /* @__PURE__ */ jsx(
96
+ TabsRovingIndicator,
97
+ {
98
+ theme: "active",
99
+ active: true,
100
+ width: "$0.5",
101
+ height: selectionIndicatorLayout.height,
102
+ x: selectionIndicatorLayout.x,
103
+ y: selectionIndicatorLayout.y,
104
+ right: 0
105
+ }
106
+ ),
107
+ /* @__PURE__ */ jsx(
108
+ Tabs.Trigger,
109
+ {
110
+ unstyled: true,
111
+ color: "$color12",
112
+ value: "tab1",
113
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
114
+ onHoveredLayoutChange: setHoverIndicatorLayout,
115
+ onFocusedLayoutChange: setFocusIndicatorLayout,
116
+ children: "Profile"
117
+ }
118
+ ),
119
+ /* @__PURE__ */ jsx(
120
+ Tabs.Trigger,
121
+ {
122
+ unstyled: true,
123
+ color: "$color12",
124
+ value: "tab2",
125
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
126
+ onHoveredLayoutChange: setHoverIndicatorLayout,
127
+ onFocusedLayoutChange: setFocusIndicatorLayout,
128
+ children: "Connections"
129
+ }
130
+ ),
131
+ /* @__PURE__ */ jsx(
132
+ Tabs.Trigger,
133
+ {
134
+ unstyled: true,
135
+ color: "$color12",
136
+ value: "tab3",
137
+ onSelectedLayoutChange: handleUpdateSelectionIndicator,
138
+ onHoveredLayoutChange: setHoverIndicatorLayout,
139
+ onFocusedLayoutChange: setFocusIndicatorLayout,
140
+ children: "Notifications"
141
+ }
142
+ )
143
+ ] }) }),
144
+ /* @__PURE__ */ jsx(
145
+ AnimatePresence,
146
+ {
147
+ exitBeforeEnter: true,
148
+ enterVariant,
149
+ exitVariant,
150
+ children: /* @__PURE__ */ jsx(AnimatedYStack, { animation: "100ms", y: 0, o: 1, children: /* @__PURE__ */ jsx(Tabs.Content, { value: currentTab, forceMount: true, p: "$2", children: /* @__PURE__ */ jsx(H5, { ta: "center", children: currentTab }) }) }, currentTab)
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ );
156
+ };
157
+ export {
158
+ TabsUnderlinedDemo
159
+ };
160
+ //# sourceMappingURL=TabsUnderlinedDemo.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/TabsUnderlinedDemo.tsx"],
4
+ "sourcesContent": ["import { useMemo, useRef, useState } from 'react'\nimport {\n AnimatePresence,\n H5,\n Stack,\n TabTriggerLayout,\n Tabs,\n XStack,\n YStack,\n styled,\n} from 'tamagui'\n\nexport function TabsUnderlinedDemo() {\n return (\n <XStack maxHeight=\"100%\" maxWidth=\"100%\" justifyContent=\"flex-start\" px=\"$4\">\n <UnderlineTabs />\n </XStack>\n )\n}\n\nconst TabsRovingIndicator = styled(Stack, {\n name: 'TabsRovingIndicator',\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n variants: {\n active: {\n true: {\n backgroundColor: '$color8',\n },\n },\n enter: {\n true: {\n opacity: 0,\n },\n },\n exit: {\n true: {\n opacity: 0,\n },\n },\n },\n },\n defaultVariants: {\n position: 'absolute',\n backgroundColor: '$color5',\n opacity: 1,\n animation: '100ms',\n },\n})\n\nconst AnimatedYStack = styled(YStack, {\n variants: {\n isTop: { true: { y: -25, opacity: 0 } },\n isBottom: { true: { y: 25, opacity: 0 } },\n } as const,\n})\n\nconst UnderlineTabs = () => {\n const [currentTab, setCurrentTab] = useState('tab1')\n const [focusIndicatorLayout, setFocusIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [hoverIndicatorLayout, setHoverIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const [selectionIndicatorLayout, setSelectionIndicatorLayout] =\n useState<TabTriggerLayout | null>(null)\n const prevSelectionIndicatorLayout = useRef<TabTriggerLayout | null>(null)\n const handleUpdateSelectionIndicator = (newSize: TabTriggerLayout | null) => {\n prevSelectionIndicatorLayout.current = selectionIndicatorLayout\n setSelectionIndicatorLayout(newSize)\n }\n\n const intentIndicatorLayout = hoverIndicatorLayout || focusIndicatorLayout\n\n /**\n * -1: from top\n * 0: n/a\n * 1: from bottom\n */\n const direction = useMemo(() => {\n if (\n !selectionIndicatorLayout ||\n !prevSelectionIndicatorLayout.current ||\n selectionIndicatorLayout.y === prevSelectionIndicatorLayout.current.y\n ) {\n return 0\n }\n return selectionIndicatorLayout.y > prevSelectionIndicatorLayout.current.y ? 1 : -1\n }, [selectionIndicatorLayout])\n\n const enterVariant =\n direction === 1 ? 'isTop' : direction === -1 ? 'isBottom' : undefined\n const exitVariant =\n direction === 1 ? 'isBottom' : direction === -1 ? 'isTop' : undefined\n\n return (\n <Tabs\n value={currentTab}\n onValueChange={setCurrentTab}\n orientation=\"vertical\"\n width={300}\n br=\"$4\"\n ai=\"center\"\n activationMode=\"manual\"\n >\n <YStack borderColor=\"$color3\" borderRightWidth=\"$0.5\" mr=\"$2\">\n <Tabs.List loop={false} aria-label=\"Manage your account\" disablePassBorderRadius>\n {intentIndicatorLayout && (\n <TabsRovingIndicator\n width=\"$0.5\"\n height={intentIndicatorLayout.height}\n x={intentIndicatorLayout.x}\n y={intentIndicatorLayout.y}\n right={0}\n />\n )}\n {selectionIndicatorLayout && (\n <TabsRovingIndicator\n theme=\"active\"\n active\n width=\"$0.5\"\n height={selectionIndicatorLayout.height}\n x={selectionIndicatorLayout.x}\n y={selectionIndicatorLayout.y}\n right={0}\n />\n )}\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab1\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Profile\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab2\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Connections\n </Tabs.Trigger>\n <Tabs.Trigger\n unstyled\n color=\"$color12\"\n value=\"tab3\"\n onSelectedLayoutChange={handleUpdateSelectionIndicator}\n onHoveredLayoutChange={setHoverIndicatorLayout}\n onFocusedLayoutChange={setFocusIndicatorLayout}\n >\n Notifications\n </Tabs.Trigger>\n </Tabs.List>\n </YStack>\n <AnimatePresence\n exitBeforeEnter\n enterVariant={enterVariant}\n exitVariant={exitVariant}\n >\n <AnimatedYStack key={currentTab} animation=\"100ms\" y={0} o={1}>\n <Tabs.Content value={currentTab} forceMount p=\"$2\">\n <H5 ta=\"center\">{currentTab}</H5>\n </Tabs.Content>\n </AnimatedYStack>\n </AnimatePresence>\n </Tabs>\n )\n}\n"],
5
+ "mappings": "AAeM,cA8FE,YA9FF;AAfN,SAAS,SAAS,QAAQ,gBAAgB;AAC1C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,qBAAqB;AACnC,SACE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ACN,OAAM;AAAA,cACN,wBAAwB;AAAA,cACxB,uBAAuB;AAAA,cACvB,uBAAuB;AAAA,cACxB;AAAA;AAAA,UAED;AAAA,UACA;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,OAAM;AAAA,cACN,wBAAwB;AAAA,cACxB,uBAAuB;AAAA,cACvB,uBAAuB;AAAA,cACxB;AAAA;AAAA,UAED;AAAA,WACF,GACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,iBAAe;AAAA,YACf;AAAA,YACA;AAAA,YAEA,8BAAC,kBAAgC,WAAU,SAAQ,GAAG,GAAG,GAAG,GAC1D,8BAAC,KAAK,SAAL,EAAa,OAAO,YAAY,YAAU,MAAC,GAAE,MAC5C,8BAAC,MAAG,IAAG,UAAU,sBAAW,GAC9B,KAHmB,UAIrB;AAAA;AAAA,QACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
package/dist/esm/index.js CHANGED
@@ -37,6 +37,8 @@ import { ThemeInverseDemo } from "./ThemeInverseDemo";
37
37
  import { TooltipDemo } from "./TooltipDemo";
38
38
  import { ColorsDemo } from "./ColorsDemo";
39
39
  import { TokensDemo } from "./TokensDemo";
40
+ import { TabsDemo } from "./TabsDemo";
41
+ import { TabsAdvancedDemo } from "./TabsAdvancedDemo";
40
42
  export * from "./useOnIntersecting";
41
43
  export {
42
44
  AddThemeDemo,
@@ -73,6 +75,8 @@ export {
73
75
  SpinnerDemo,
74
76
  StacksDemo,
75
77
  SwitchDemo,
78
+ TabsAdvancedDemo,
79
+ TabsDemo,
76
80
  TextDemo,
77
81
  ThemeInverseDemo,
78
82
  TokensDemo,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "sourcesContent": ["export { AlertDialogDemo } from './AlertDialogDemo'\nexport { AnimationsDemo } from './AnimationsDemo'\nexport { AnimationsEnterDemo } from './AnimationsEnterDemo'\nexport { AnimationsHoverDemo } from './AnimationsHoverDemo'\nexport { AnimationsTimingDemo } from './AnimationsTimingDemo'\nexport { AnimationsPresenceDemo } from './AnimationsPresenceDemo'\nexport { AvatarDemo } from './AvatarDemo'\nexport { ButtonDemo } from './ButtonDemo'\nexport { CardDemo } from './CardDemo'\nexport { DialogDemo } from './DialogDemo'\nexport { AddThemeDemo } from './AddThemeDemo'\nexport { UpdateThemeDemo } from './UpdateThemeDemo'\nexport { FormsDemo } from './FormsDemo'\nexport { InputsDemo } from './InputsDemo'\nexport { GroupDemo } from './GroupDemo'\nexport { HeadingsDemo } from './HeadingsDemo'\nexport { ImageDemo } from './ImageDemo'\nexport { LabelDemo } from './LabelDemo'\nexport { LinearGradientDemo } from './LinearGradientDemo'\nexport { ListItemDemo } from './ListItemDemo'\nexport { LucideIconsDemo } from './LucideIconsDemo'\nexport { PopoverDemo } from './PopoverDemo'\nexport { ProgressDemo } from './ProgressDemo'\nexport { RadioGroupDemo } from './RadioGroupDemo'\nexport { SelectDemo } from './SelectDemo'\nexport { SeparatorDemo } from './SeparatorDemo'\nexport { ShapesDemo } from './ShapesDemo'\nexport { ScrollViewDemo } from './ScrollViewDemo'\nexport { SheetDemo } from './SheetDemo'\nexport { SliderDemo } from './SliderDemo'\nexport { SpinnerDemo } from './SpinnerDemo'\nexport { StacksDemo } from './StacksDemo'\nexport { SwitchDemo } from './SwitchDemo'\nexport { CheckboxDemo } from './CheckboxDemo'\nexport { TextDemo } from './TextDemo'\nexport { ThemeInverseDemo } from './ThemeInverseDemo'\nexport { TooltipDemo } from './TooltipDemo'\nexport { ColorsDemo } from './ColorsDemo'\nexport { TokensDemo } from './TokensDemo'\nexport * from './useOnIntersecting'\n"],
5
- "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,cAAc;",
4
+ "sourcesContent": ["export { AlertDialogDemo } from './AlertDialogDemo'\nexport { AnimationsDemo } from './AnimationsDemo'\nexport { AnimationsEnterDemo } from './AnimationsEnterDemo'\nexport { AnimationsHoverDemo } from './AnimationsHoverDemo'\nexport { AnimationsTimingDemo } from './AnimationsTimingDemo'\nexport { AnimationsPresenceDemo } from './AnimationsPresenceDemo'\nexport { AvatarDemo } from './AvatarDemo'\nexport { ButtonDemo } from './ButtonDemo'\nexport { CardDemo } from './CardDemo'\nexport { DialogDemo } from './DialogDemo'\nexport { AddThemeDemo } from './AddThemeDemo'\nexport { UpdateThemeDemo } from './UpdateThemeDemo'\nexport { FormsDemo } from './FormsDemo'\nexport { InputsDemo } from './InputsDemo'\nexport { GroupDemo } from './GroupDemo'\nexport { HeadingsDemo } from './HeadingsDemo'\nexport { ImageDemo } from './ImageDemo'\nexport { LabelDemo } from './LabelDemo'\nexport { LinearGradientDemo } from './LinearGradientDemo'\nexport { ListItemDemo } from './ListItemDemo'\nexport { LucideIconsDemo } from './LucideIconsDemo'\nexport { PopoverDemo } from './PopoverDemo'\nexport { ProgressDemo } from './ProgressDemo'\nexport { RadioGroupDemo } from './RadioGroupDemo'\nexport { SelectDemo } from './SelectDemo'\nexport { SeparatorDemo } from './SeparatorDemo'\nexport { ShapesDemo } from './ShapesDemo'\nexport { ScrollViewDemo } from './ScrollViewDemo'\nexport { SheetDemo } from './SheetDemo'\nexport { SliderDemo } from './SliderDemo'\nexport { SpinnerDemo } from './SpinnerDemo'\nexport { StacksDemo } from './StacksDemo'\nexport { SwitchDemo } from './SwitchDemo'\nexport { CheckboxDemo } from './CheckboxDemo'\nexport { TextDemo } from './TextDemo'\nexport { ThemeInverseDemo } from './ThemeInverseDemo'\nexport { TooltipDemo } from './TooltipDemo'\nexport { ColorsDemo } from './ColorsDemo'\nexport { TokensDemo } from './TokensDemo'\nexport { TabsDemo } from './TabsDemo'\nexport { TabsAdvancedDemo } from './TabsAdvancedDemo'\nexport * from './useOnIntersecting'\n"],
5
+ "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,cAAc;",
6
6
  "names": []
7
7
  }
@@ -37,6 +37,8 @@ import { ThemeInverseDemo } from "./ThemeInverseDemo";
37
37
  import { TooltipDemo } from "./TooltipDemo";
38
38
  import { ColorsDemo } from "./ColorsDemo";
39
39
  import { TokensDemo } from "./TokensDemo";
40
+ import { TabsDemo } from "./TabsDemo";
41
+ import { TabsAdvancedDemo } from "./TabsAdvancedDemo";
40
42
  export * from "./useOnIntersecting";
41
43
  export {
42
44
  AddThemeDemo,
@@ -73,6 +75,8 @@ export {
73
75
  SpinnerDemo,
74
76
  StacksDemo,
75
77
  SwitchDemo,
78
+ TabsAdvancedDemo,
79
+ TabsDemo,
76
80
  TextDemo,
77
81
  ThemeInverseDemo,
78
82
  TokensDemo,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx"],
4
- "sourcesContent": ["export { AlertDialogDemo } from './AlertDialogDemo'\nexport { AnimationsDemo } from './AnimationsDemo'\nexport { AnimationsEnterDemo } from './AnimationsEnterDemo'\nexport { AnimationsHoverDemo } from './AnimationsHoverDemo'\nexport { AnimationsTimingDemo } from './AnimationsTimingDemo'\nexport { AnimationsPresenceDemo } from './AnimationsPresenceDemo'\nexport { AvatarDemo } from './AvatarDemo'\nexport { ButtonDemo } from './ButtonDemo'\nexport { CardDemo } from './CardDemo'\nexport { DialogDemo } from './DialogDemo'\nexport { AddThemeDemo } from './AddThemeDemo'\nexport { UpdateThemeDemo } from './UpdateThemeDemo'\nexport { FormsDemo } from './FormsDemo'\nexport { InputsDemo } from './InputsDemo'\nexport { GroupDemo } from './GroupDemo'\nexport { HeadingsDemo } from './HeadingsDemo'\nexport { ImageDemo } from './ImageDemo'\nexport { LabelDemo } from './LabelDemo'\nexport { LinearGradientDemo } from './LinearGradientDemo'\nexport { ListItemDemo } from './ListItemDemo'\nexport { LucideIconsDemo } from './LucideIconsDemo'\nexport { PopoverDemo } from './PopoverDemo'\nexport { ProgressDemo } from './ProgressDemo'\nexport { RadioGroupDemo } from './RadioGroupDemo'\nexport { SelectDemo } from './SelectDemo'\nexport { SeparatorDemo } from './SeparatorDemo'\nexport { ShapesDemo } from './ShapesDemo'\nexport { ScrollViewDemo } from './ScrollViewDemo'\nexport { SheetDemo } from './SheetDemo'\nexport { SliderDemo } from './SliderDemo'\nexport { SpinnerDemo } from './SpinnerDemo'\nexport { StacksDemo } from './StacksDemo'\nexport { SwitchDemo } from './SwitchDemo'\nexport { CheckboxDemo } from './CheckboxDemo'\nexport { TextDemo } from './TextDemo'\nexport { ThemeInverseDemo } from './ThemeInverseDemo'\nexport { TooltipDemo } from './TooltipDemo'\nexport { ColorsDemo } from './ColorsDemo'\nexport { TokensDemo } from './TokensDemo'\nexport * from './useOnIntersecting'\n"],
5
- "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,cAAc;",
4
+ "sourcesContent": ["export { AlertDialogDemo } from './AlertDialogDemo'\nexport { AnimationsDemo } from './AnimationsDemo'\nexport { AnimationsEnterDemo } from './AnimationsEnterDemo'\nexport { AnimationsHoverDemo } from './AnimationsHoverDemo'\nexport { AnimationsTimingDemo } from './AnimationsTimingDemo'\nexport { AnimationsPresenceDemo } from './AnimationsPresenceDemo'\nexport { AvatarDemo } from './AvatarDemo'\nexport { ButtonDemo } from './ButtonDemo'\nexport { CardDemo } from './CardDemo'\nexport { DialogDemo } from './DialogDemo'\nexport { AddThemeDemo } from './AddThemeDemo'\nexport { UpdateThemeDemo } from './UpdateThemeDemo'\nexport { FormsDemo } from './FormsDemo'\nexport { InputsDemo } from './InputsDemo'\nexport { GroupDemo } from './GroupDemo'\nexport { HeadingsDemo } from './HeadingsDemo'\nexport { ImageDemo } from './ImageDemo'\nexport { LabelDemo } from './LabelDemo'\nexport { LinearGradientDemo } from './LinearGradientDemo'\nexport { ListItemDemo } from './ListItemDemo'\nexport { LucideIconsDemo } from './LucideIconsDemo'\nexport { PopoverDemo } from './PopoverDemo'\nexport { ProgressDemo } from './ProgressDemo'\nexport { RadioGroupDemo } from './RadioGroupDemo'\nexport { SelectDemo } from './SelectDemo'\nexport { SeparatorDemo } from './SeparatorDemo'\nexport { ShapesDemo } from './ShapesDemo'\nexport { ScrollViewDemo } from './ScrollViewDemo'\nexport { SheetDemo } from './SheetDemo'\nexport { SliderDemo } from './SliderDemo'\nexport { SpinnerDemo } from './SpinnerDemo'\nexport { StacksDemo } from './StacksDemo'\nexport { SwitchDemo } from './SwitchDemo'\nexport { CheckboxDemo } from './CheckboxDemo'\nexport { TextDemo } from './TextDemo'\nexport { ThemeInverseDemo } from './ThemeInverseDemo'\nexport { TooltipDemo } from './TooltipDemo'\nexport { ColorsDemo } from './ColorsDemo'\nexport { TokensDemo } from './TokensDemo'\nexport { TabsDemo } from './TabsDemo'\nexport { TabsAdvancedDemo } from './TabsAdvancedDemo'\nexport * from './useOnIntersecting'\n"],
5
+ "mappings": "AAAA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,cAAc;",
6
6
  "names": []
7
7
  }