@tamagui/elements 1.89.0-1706308641099

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.
@@ -0,0 +1,280 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: !0 });
10
+ }, __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from == "object" || typeof from == "function")
12
+ for (let key of __getOwnPropNames(from))
13
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
+ mod
23
+ )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
+ var Tabs_exports = {};
25
+ __export(Tabs_exports, {
26
+ Tabs: () => Tabs
27
+ });
28
+ module.exports = __toCommonJS(Tabs_exports);
29
+ var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_get_button_sized = require("@tamagui/get-button-sized"), import_group = require("@tamagui/group"), import_helpers = require("@tamagui/helpers"), import_roving_focus = require("@tamagui/roving-focus"), import_stacks = require("@tamagui/stacks"), import_use_controllable_state = require("@tamagui/use-controllable-state"), import_use_direction = require("@tamagui/use-direction"), import_web = require("@tamagui/web"), React = __toESM(require("react")), import_jsx_runtime = require("react/jsx-runtime");
30
+ const TABS_CONTEXT = "TabsContext", TAB_LIST_NAME = "TabsList", TabsListFrame = (0, import_web.styled)(import_group.Group, {
31
+ name: TAB_LIST_NAME
32
+ }), TabsList = TabsListFrame.extractable(
33
+ React.forwardRef(
34
+ (props, forwardedRef) => {
35
+ const { __scopeTabs, loop = !0, children, ...listProps } = props, context = useTabsContext(__scopeTabs);
36
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
+ import_roving_focus.RovingFocusGroup,
38
+ {
39
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
40
+ orientation: context.orientation,
41
+ dir: context.dir,
42
+ loop,
43
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ TabsListFrame,
45
+ {
46
+ role: "tablist",
47
+ "aria-orientation": context.orientation,
48
+ ref: forwardedRef,
49
+ orientation: context.orientation,
50
+ ...listProps,
51
+ children
52
+ }
53
+ )
54
+ }
55
+ );
56
+ }
57
+ )
58
+ );
59
+ TabsList.displayName = TAB_LIST_NAME;
60
+ const TRIGGER_NAME = "TabsTrigger", TabsTriggerFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
61
+ name: TRIGGER_NAME,
62
+ tag: "button",
63
+ justifyContent: "center",
64
+ alignItems: "center",
65
+ flexWrap: "nowrap",
66
+ flexDirection: "row",
67
+ cursor: "pointer",
68
+ userSelect: "none",
69
+ variants: {
70
+ size: {
71
+ "...size": import_get_button_sized.getButtonSized
72
+ },
73
+ disabled: {
74
+ true: {
75
+ pointerEvents: "none"
76
+ }
77
+ },
78
+ active: {
79
+ true: {
80
+ hoverStyle: {
81
+ backgroundColor: "$background"
82
+ },
83
+ focusStyle: {
84
+ backgroundColor: "$background"
85
+ }
86
+ }
87
+ },
88
+ unstyled: {
89
+ false: {
90
+ backgroundColor: "$background",
91
+ pressStyle: {
92
+ backgroundColor: "$backgroundPress"
93
+ },
94
+ hoverStyle: {
95
+ backgroundColor: "$backgroundHover"
96
+ },
97
+ focusStyle: {
98
+ backgroundColor: "$backgroundFocus"
99
+ }
100
+ }
101
+ }
102
+ },
103
+ defaultVariants: {
104
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
105
+ }
106
+ }), TabsTrigger = TabsTriggerFrame.extractable(
107
+ React.forwardRef(
108
+ (props, forwardedRef) => {
109
+ const {
110
+ __scopeTabs,
111
+ value,
112
+ disabled = !1,
113
+ onInteraction,
114
+ ...triggerProps
115
+ } = props, context = useTabsContext(__scopeTabs), triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value), isSelected = value === context.value, [layout, setLayout] = React.useState(null), triggerRef = React.useRef(null), groupItemProps = (0, import_group.useGroupItem)({ disabled: !!disabled });
116
+ return React.useEffect(() => (context.registerTrigger(), () => context.unregisterTrigger()), []), React.useEffect(() => {
117
+ if (!triggerRef.current || !import_constants.isWeb)
118
+ return;
119
+ function getTriggerSize() {
120
+ triggerRef.current && setLayout({
121
+ width: triggerRef.current.offsetWidth,
122
+ height: triggerRef.current.offsetHeight,
123
+ x: triggerRef.current.offsetLeft,
124
+ y: triggerRef.current.offsetTop
125
+ });
126
+ }
127
+ getTriggerSize();
128
+ const observer = new ResizeObserver(getTriggerSize);
129
+ return observer.observe(triggerRef.current), () => {
130
+ triggerRef.current && observer.unobserve(triggerRef.current);
131
+ };
132
+ }, [context.triggersCount]), React.useEffect(() => {
133
+ isSelected && layout && (onInteraction == null || onInteraction("select", layout));
134
+ }, [isSelected, value, layout]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Theme, { name: isSelected ? "active" : null, forceClassName: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
+ import_roving_focus.RovingFocusGroup.Item,
136
+ {
137
+ __scopeRovingFocusGroup: __scopeTabs || TABS_CONTEXT,
138
+ asChild: !0,
139
+ focusable: !disabled,
140
+ active: isSelected,
141
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
142
+ TabsTriggerFrame,
143
+ {
144
+ onLayout: (event) => {
145
+ import_constants.isWeb || setLayout(event.nativeEvent.layout);
146
+ },
147
+ onHoverIn: (0, import_helpers.composeEventHandlers)(props.onHoverIn, () => {
148
+ layout && (onInteraction == null || onInteraction("hover", layout));
149
+ }),
150
+ onHoverOut: (0, import_helpers.composeEventHandlers)(props.onHoverOut, () => {
151
+ onInteraction == null || onInteraction("hover", null);
152
+ }),
153
+ role: "tab",
154
+ "aria-selected": isSelected,
155
+ "aria-controls": contentId,
156
+ "data-state": isSelected ? "active" : "inactive",
157
+ "data-disabled": disabled ? "" : void 0,
158
+ disabled,
159
+ id: triggerId,
160
+ size: context.size,
161
+ ...groupItemProps,
162
+ ...triggerProps,
163
+ ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
164
+ onPress: (0, import_helpers.composeEventHandlers)(props.onPress ?? void 0, (event) => {
165
+ const webChecks = !import_constants.isWeb || event.button === 0 && event.ctrlKey === !1;
166
+ !disabled && !isSelected && webChecks ? context.onChange(value) : event.preventDefault();
167
+ }),
168
+ ...import_constants.isWeb && {
169
+ type: "button",
170
+ onKeyDown: (0, import_helpers.composeEventHandlers)(
171
+ props.onKeyDown,
172
+ (event) => {
173
+ [" ", "Enter"].includes(event.key) && (context.onChange(value), event.preventDefault());
174
+ }
175
+ ),
176
+ onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, (event) => {
177
+ layout && (onInteraction == null || onInteraction("focus", layout));
178
+ const isAutomaticActivation = context.activationMode !== "manual";
179
+ !isSelected && !disabled && isAutomaticActivation && context.onChange(value);
180
+ }),
181
+ onBlur: (0, import_helpers.composeEventHandlers)(props.onFocus, () => {
182
+ onInteraction == null || onInteraction("focus", null);
183
+ })
184
+ }
185
+ }
186
+ )
187
+ }
188
+ ) });
189
+ }
190
+ )
191
+ );
192
+ TabsTrigger.displayName = TRIGGER_NAME;
193
+ const CONTENT_NAME = "TabsContent", TabsContentFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
194
+ name: CONTENT_NAME
195
+ }), TabsContent = TabsContentFrame.styleable(
196
+ function(props, forwardedRef) {
197
+ const { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = useTabsContext(__scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
198
+ return show ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
+ TabsContentFrame,
200
+ {
201
+ "data-state": isSelected ? "active" : "inactive",
202
+ "data-orientation": context.orientation,
203
+ role: "tabpanel",
204
+ "aria-labelledby": triggerId,
205
+ hidden: !show,
206
+ id: contentId,
207
+ tabIndex: 0,
208
+ ...contentProps,
209
+ ref: forwardedRef,
210
+ children
211
+ },
212
+ value
213
+ ) : null;
214
+ }
215
+ ), TABS_NAME = "Tabs", { Provider: TabsProvider, useStyledContext: useTabsContext } = (0, import_web.createStyledContext)(), TabsFrame = (0, import_web.styled)(import_stacks.SizableStack, {
216
+ name: TABS_NAME
217
+ }), TabsComponent = TabsFrame.styleable(
218
+ (props, forwardedRef) => {
219
+ const {
220
+ __scopeTabs,
221
+ value: valueProp,
222
+ onValueChange,
223
+ defaultValue,
224
+ orientation = "horizontal",
225
+ dir,
226
+ activationMode = "automatic",
227
+ size = "$true",
228
+ ...tabsProps
229
+ } = props, direction = (0, import_use_direction.useDirection)(dir), [value, setValue] = (0, import_use_controllable_state.useControllableState)({
230
+ prop: valueProp,
231
+ onChange: onValueChange,
232
+ defaultProp: defaultValue ?? ""
233
+ }), [triggersCount, setTriggersCount] = React.useState(0), registerTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v + 1)), unregisterTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v - 1));
234
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
235
+ TabsProvider,
236
+ {
237
+ scope: __scopeTabs,
238
+ baseId: React.useId(),
239
+ value,
240
+ onChange: setValue,
241
+ orientation,
242
+ dir: direction,
243
+ activationMode,
244
+ size,
245
+ registerTrigger,
246
+ triggersCount,
247
+ unregisterTrigger,
248
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
249
+ TabsFrame,
250
+ {
251
+ direction,
252
+ "data-orientation": orientation,
253
+ ...tabsProps,
254
+ ref: forwardedRef
255
+ }
256
+ )
257
+ }
258
+ );
259
+ }
260
+ ), Tabs = (0, import_helpers.withStaticProperties)(TabsComponent, {
261
+ List: TabsList,
262
+ /**
263
+ * @deprecated Use Tabs.Tab instead
264
+ */
265
+ Trigger: TabsTrigger,
266
+ Tab: TabsTrigger,
267
+ Content: TabsContent
268
+ });
269
+ Tabs.displayName = TABS_NAME;
270
+ function makeTriggerId(baseId, value) {
271
+ return `${baseId}-trigger-${value}`;
272
+ }
273
+ function makeContentId(baseId, value) {
274
+ return `${baseId}-content-${value}`;
275
+ }
276
+ // Annotate the CommonJS export names for ESM import in node:
277
+ 0 && (module.exports = {
278
+ Tabs
279
+ });
280
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Tabs.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4B,kCAC5B,mBAAsB,+BACtB,0BAA+B,sCAC/B,eAAgD,2BAChD,iBAA2D,6BAC3D,sBAAiC,kCACjC,gBAA6C,4BAC7C,gCAAqC,4CACrC,uBAA6B,mCAC7B,aAQO,yBACP,QAAuB,2BAsCb;AAnCV,MAAM,eAAe,eAMf,gBAAgB,YAEhB,oBAAgB,mBAAO,oBAAO;AAAA,EAClC,MAAM;AACR,CAAC,GAYK,WAAW,cAAc;AAAA,EAC7B,MAAM;AAAA,IACJ,CAAC,OAAmC,iBAAiB;AACnD,YAAM,EAAE,aAAa,OAAO,IAAM,UAAU,GAAG,UAAU,IAAI,OACvD,UAAU,eAAe,WAA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gB;AAAA,IAC/B,CAAC,GACK,CAAC,eAAe,gBAAgB,IAAI,MAAM,SAAS,CAAC,GACpD,sBAAkB,qBAAS,MAAM,iBAAiB,CAAC,MAAM,IAAI,CAAC,CAAC,GAC/D,wBAAoB,qBAAS,MAAM,iBAAiB,CAAC,MAAM,IAAI,CAAC,CAAC;AAEvE,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,QAAQ,MAAM,MAAM;AAAA,QACpB;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YAEA,oBAAkB;AAAA,YACjB,GAAG;AAAA,YACJ,KAAK;AAAA;AAAA,QACP;AAAA;AAAA,IACF;AAAA,EAEJ;AACF,GAEa,WAAO,qCAAqB,eAAe;AAAA,EACtD,MAAM;AAAA;AAAA;AAAA;AAAA,EAIN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,SAAS;AACX,CAAC;AACD,KAAK,cAAc;AAInB,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;AAEA,SAAS,cAAc,QAAgB,OAAe;AACpD,SAAO,GAAG,MAAM,YAAY,KAAK;AACnC;",
5
+ "names": []
6
+ }
@@ -0,0 +1,45 @@
1
+ import { View, styled } from "@tamagui/web";
2
+ const Section = styled(View, {
3
+ name: "Section",
4
+ tag: "section",
5
+ flexDirection: "column",
6
+ accessibilityRole: "summary"
7
+ }), Article = styled(View, {
8
+ name: "Article",
9
+ tag: "article",
10
+ flexDirection: "column"
11
+ }), Main = styled(View, {
12
+ name: "Main",
13
+ tag: "main",
14
+ flexDirection: "column"
15
+ }), Header = styled(View, {
16
+ name: "Header",
17
+ tag: "header",
18
+ accessibilityRole: "header",
19
+ flexDirection: "column"
20
+ }), Aside = styled(View, {
21
+ name: "Aside",
22
+ tag: "aside",
23
+ flexDirection: "column"
24
+ // accessibilityRole: 'complementary',
25
+ }), Footer = styled(View, {
26
+ name: "Footer",
27
+ tag: "footer",
28
+ flexDirection: "column"
29
+ // accessibilityRole: 'contentinfo',
30
+ }), Nav = styled(View, {
31
+ name: "Nav",
32
+ tag: "nav",
33
+ flexDirection: "column"
34
+ // accessibilityRole: 'navigation',
35
+ });
36
+ export {
37
+ Article,
38
+ Aside,
39
+ Footer,
40
+ Header,
41
+ Main,
42
+ Nav,
43
+ Section
44
+ };
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": "AAAA,SAAS,MAAM,cAAc;AAEtB,MAAM,UAAU,OAAO,MAAM;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA,EACf,mBAAmB;AACrB,CAAC,GAEY,UAAU,OAAO,MAAM;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AACjB,CAAC,GAEY,OAAO,OAAO,MAAM;AAAA,EAC/B,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AACjB,CAAC,GAEY,SAAS,OAAO,MAAM;AAAA,EACjC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,mBAAmB;AAAA,EACnB,eAAe;AACjB,CAAC,GAEY,QAAQ,OAAO,MAAM;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC,GAEY,SAAS,OAAO,MAAM;AAAA,EACjC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC,GAEY,MAAM,OAAO,MAAM;AAAA,EAC9B,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC;",
5
+ "names": []
6
+ }
@@ -0,0 +1,43 @@
1
+ import { View, styled } from "@tamagui/web";
2
+ const Section = styled(View, {
3
+ name: "Section",
4
+ tag: "section",
5
+ flexDirection: "column",
6
+ accessibilityRole: "summary"
7
+ }),
8
+ Article = styled(View, {
9
+ name: "Article",
10
+ tag: "article",
11
+ flexDirection: "column"
12
+ }),
13
+ Main = styled(View, {
14
+ name: "Main",
15
+ tag: "main",
16
+ flexDirection: "column"
17
+ }),
18
+ Header = styled(View, {
19
+ name: "Header",
20
+ tag: "header",
21
+ accessibilityRole: "header",
22
+ flexDirection: "column"
23
+ }),
24
+ Aside = styled(View, {
25
+ name: "Aside",
26
+ tag: "aside",
27
+ flexDirection: "column"
28
+ // accessibilityRole: 'complementary',
29
+ }),
30
+ Footer = styled(View, {
31
+ name: "Footer",
32
+ tag: "footer",
33
+ flexDirection: "column"
34
+ // accessibilityRole: 'contentinfo',
35
+ }),
36
+ Nav = styled(View, {
37
+ name: "Nav",
38
+ tag: "nav",
39
+ flexDirection: "column"
40
+ // accessibilityRole: 'navigation',
41
+ });
42
+
43
+ export { Article, Aside, Footer, Header, Main, Nav, Section };
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var src_exports = {};
17
+ __export(src_exports, {
18
+ Article: () => Article,
19
+ Aside: () => Aside,
20
+ Footer: () => Footer,
21
+ Header: () => Header,
22
+ Main: () => Main,
23
+ Nav: () => Nav,
24
+ Section: () => Section
25
+ });
26
+ module.exports = __toCommonJS(src_exports);
27
+ var import_web = require("@tamagui/web");
28
+ const Section = (0, import_web.styled)(import_web.View, {
29
+ name: "Section",
30
+ tag: "section",
31
+ flexDirection: "column",
32
+ accessibilityRole: "summary"
33
+ }), Article = (0, import_web.styled)(import_web.View, {
34
+ name: "Article",
35
+ tag: "article",
36
+ flexDirection: "column"
37
+ }), Main = (0, import_web.styled)(import_web.View, {
38
+ name: "Main",
39
+ tag: "main",
40
+ flexDirection: "column"
41
+ }), Header = (0, import_web.styled)(import_web.View, {
42
+ name: "Header",
43
+ tag: "header",
44
+ accessibilityRole: "header",
45
+ flexDirection: "column"
46
+ }), Aside = (0, import_web.styled)(import_web.View, {
47
+ name: "Aside",
48
+ tag: "aside",
49
+ flexDirection: "column"
50
+ // accessibilityRole: 'complementary',
51
+ }), Footer = (0, import_web.styled)(import_web.View, {
52
+ name: "Footer",
53
+ tag: "footer",
54
+ flexDirection: "column"
55
+ // accessibilityRole: 'contentinfo',
56
+ }), Nav = (0, import_web.styled)(import_web.View, {
57
+ name: "Nav",
58
+ tag: "nav",
59
+ flexDirection: "column"
60
+ // accessibilityRole: 'navigation',
61
+ });
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ Article,
65
+ Aside,
66
+ Footer,
67
+ Header,
68
+ Main,
69
+ Nav,
70
+ Section
71
+ });
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA6B;AAEtB,MAAM,cAAU,mBAAO,iBAAM;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA,EACf,mBAAmB;AACrB,CAAC,GAEY,cAAU,mBAAO,iBAAM;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AACjB,CAAC,GAEY,WAAO,mBAAO,iBAAM;AAAA,EAC/B,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AACjB,CAAC,GAEY,aAAS,mBAAO,iBAAM;AAAA,EACjC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,mBAAmB;AAAA,EACnB,eAAe;AACjB,CAAC,GAEY,YAAQ,mBAAO,iBAAM;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC,GAEY,aAAS,mBAAO,iBAAM;AAAA,EACjC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC,GAEY,UAAM,mBAAO,iBAAM;AAAA,EAC9B,MAAM;AAAA,EACN,KAAK;AAAA,EACL,eAAe;AAAA;AAEjB,CAAC;",
5
+ "names": []
6
+ }
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@tamagui/elements",
3
+ "version": "1.89.0-1706308641099",
4
+ "sideEffects": false,
5
+ "source": "src/index.ts",
6
+ "types": "./types/index.d.ts",
7
+ "main": "dist/cjs",
8
+ "module": "dist/esm",
9
+ "module:jsx": "dist/jsx",
10
+ "files": [
11
+ "src",
12
+ "types",
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "build": "tamagui-build",
17
+ "watch": "tamagui-build --watch",
18
+ "lint": "../../node_modules/.bin/biome check src",
19
+ "lint:fix": "../../node_modules/.bin/biome check --apply-unsafe src",
20
+ "clean": "tamagui-build clean",
21
+ "clean:build": "tamagui-build clean:build"
22
+ },
23
+ "exports": {
24
+ "./package.json": "./package.json",
25
+ ".": {
26
+ "types": "./types/index.d.ts",
27
+ "import": "./dist/esm/index.js",
28
+ "require": "./dist/cjs/index.js",
29
+ "react-native": "./dist/cjs/index.native.js"
30
+ }
31
+ },
32
+ "dependencies": {
33
+ "@tamagui/web": "1.89.0-1706308641099"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "*",
37
+ "react-dom": "*"
38
+ },
39
+ "devDependencies": {
40
+ "@tamagui/build": "1.89.0-1706308641099",
41
+ "react": "^18.2.0",
42
+ "react-dom": "^18.2.0"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ }
47
+ }
package/src/index.ts ADDED
@@ -0,0 +1,48 @@
1
+ import { View, styled } from '@tamagui/web'
2
+
3
+ export const Section = styled(View, {
4
+ name: 'Section',
5
+ tag: 'section',
6
+ flexDirection: 'column',
7
+ accessibilityRole: 'summary',
8
+ })
9
+
10
+ export const Article = styled(View, {
11
+ name: 'Article',
12
+ tag: 'article',
13
+ flexDirection: 'column',
14
+ })
15
+
16
+ export const Main = styled(View, {
17
+ name: 'Main',
18
+ tag: 'main',
19
+ flexDirection: 'column',
20
+ })
21
+
22
+ export const Header = styled(View, {
23
+ name: 'Header',
24
+ tag: 'header',
25
+ accessibilityRole: 'header',
26
+ flexDirection: 'column',
27
+ })
28
+
29
+ export const Aside = styled(View, {
30
+ name: 'Aside',
31
+ tag: 'aside',
32
+ flexDirection: 'column',
33
+ // accessibilityRole: 'complementary',
34
+ })
35
+
36
+ export const Footer = styled(View, {
37
+ name: 'Footer',
38
+ tag: 'footer',
39
+ flexDirection: 'column',
40
+ // accessibilityRole: 'contentinfo',
41
+ })
42
+
43
+ export const Nav = styled(View, {
44
+ name: 'Nav',
45
+ tag: 'nav',
46
+ flexDirection: 'column',
47
+ // accessibilityRole: 'navigation',
48
+ })
@@ -0,0 +1,8 @@
1
+ export declare const Section: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
2
+ export declare const Article: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
3
+ export declare const Main: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
4
+ export declare const Header: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
5
+ export declare const Aside: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
6
+ export declare const Footer: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
7
+ export declare const Nav: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {}, import("@tamagui/web").StaticConfigPublic>;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,mPAKlB,CAAA;AAEF,eAAO,MAAM,OAAO,mPAIlB,CAAA;AAEF,eAAO,MAAM,IAAI,mPAIf,CAAA;AAEF,eAAO,MAAM,MAAM,mPAKjB,CAAA;AAEF,eAAO,MAAM,KAAK,mPAKhB,CAAA;AAEF,eAAO,MAAM,MAAM,mPAKjB,CAAA;AAEF,eAAO,MAAM,GAAG,mPAKd,CAAA"}