@tamagui/demos 1.2.18 → 1.3.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.
- package/dist/cjs/CheckboxDemo.js +45 -0
- package/dist/cjs/CheckboxDemo.js.map +7 -0
- package/dist/cjs/FormsDemo.js +29 -13
- package/dist/cjs/FormsDemo.js.map +2 -2
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/CheckboxDemo.js +21 -0
- package/dist/esm/CheckboxDemo.js.map +7 -0
- package/dist/esm/CheckboxDemo.mjs +21 -0
- package/dist/esm/CheckboxDemo.mjs.map +7 -0
- package/dist/esm/FormsDemo.js +30 -14
- package/dist/esm/FormsDemo.js.map +2 -2
- package/dist/esm/FormsDemo.mjs +30 -14
- package/dist/esm/FormsDemo.mjs.map +2 -2
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +2 -2
- package/dist/jsx/CheckboxDemo.js +20 -0
- package/dist/jsx/CheckboxDemo.js.map +7 -0
- package/dist/jsx/CheckboxDemo.mjs +20 -0
- package/dist/jsx/CheckboxDemo.mjs.map +7 -0
- package/dist/jsx/FormsDemo.js +26 -14
- package/dist/jsx/FormsDemo.js.map +2 -2
- package/dist/jsx/FormsDemo.mjs +26 -14
- package/dist/jsx/FormsDemo.mjs.map +2 -2
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +2 -2
- package/dist/jsx/index.mjs +2 -0
- package/dist/jsx/index.mjs.map +2 -2
- package/package.json +16 -16
- package/src/CheckboxDemo.tsx +29 -0
- package/src/FormsDemo.tsx +34 -16
- package/src/index.tsx +1 -0
- package/types/CheckboxDemo.d.ts +3 -0
- package/types/CheckboxDemo.d.ts.map +1 -0
- package/types/FormDemo.d.ts +3 -0
- package/types/FormsDemo.d.ts +4 -1
- package/types/FormsDemo.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
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: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var CheckboxDemo_exports = {};
|
|
20
|
+
__export(CheckboxDemo_exports, {
|
|
21
|
+
CheckboxDemo: () => CheckboxDemo
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(CheckboxDemo_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_lucide_icons = require("@tamagui/lucide-icons");
|
|
26
|
+
var import_tamagui = require("tamagui");
|
|
27
|
+
function CheckboxDemo() {
|
|
28
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { w: 300, ai: "center", space: "$2", children: [
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, { size: "$3" }),
|
|
30
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, { size: "$4", defaultChecked: true }),
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxWithLabel, { size: "$5" })
|
|
32
|
+
] });
|
|
33
|
+
}
|
|
34
|
+
function CheckboxWithLabel(props) {
|
|
35
|
+
const id = `checkbox-${props.size.toString().slice(1)}`;
|
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { w: 300, ai: "center", space: "$4", children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox, { id, size: props.size, defaultChecked: props.defaultChecked, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons.Check, {}) }) }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { size: props.size, htmlFor: id, children: "Accept terms and conditions" })
|
|
39
|
+
] });
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
CheckboxDemo
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=CheckboxDemo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxDemo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Check as CheckIcon } from '@tamagui/lucide-icons'\nimport { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'\n\nexport function CheckboxDemo() {\n return (\n <YStack w={300} ai=\"center\" space=\"$2\">\n <CheckboxWithLabel size=\"$3\" />\n <CheckboxWithLabel size=\"$4\" defaultChecked />\n <CheckboxWithLabel size=\"$5\" />\n </YStack>\n )\n}\n\nfunction CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {\n const id = `checkbox-${props.size.toString().slice(1)}`\n return (\n <XStack w={300} ai=\"center\" space=\"$4\">\n <Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>\n <Checkbox.Indicator>\n <CheckIcon />\n </Checkbox.Indicator>\n </Checkbox>\n\n <Label size={props.size} htmlFor={id}>\n Accept terms and conditions\n </Label>\n </XStack>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKI;AALJ,0BAAmC;AACnC,qBAA4D;AAErD,SAAS,eAAe;AAC7B,SACE,6CAAC,yBAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,gDAAC,qBAAkB,MAAK,MAAK;AAAA,IAC7B,4CAAC,qBAAkB,MAAK,MAAK,gBAAc,MAAC;AAAA,IAC5C,4CAAC,qBAAkB,MAAK,MAAK;AAAA,KAC/B;AAEJ;AAEA,SAAS,kBAAkB,OAAuD;AAChF,QAAM,KAAK,YAAY,MAAM,KAAK,SAAS,EAAE,MAAM,CAAC;AACpD,SACE,6CAAC,yBAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,gDAAC,2BAAS,IAAQ,MAAM,MAAM,MAAM,gBAAgB,MAAM,gBACxD,sDAAC,wBAAS,WAAT,EACC,sDAAC,oBAAAA,OAAA,EAAU,GACb,GACF;AAAA,IAEA,4CAAC,wBAAM,MAAM,MAAM,MAAM,SAAS,IAAI,yCAEtC;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": ["CheckIcon"]
|
|
7
|
+
}
|
package/dist/cjs/FormsDemo.js
CHANGED
|
@@ -22,20 +22,36 @@ __export(FormsDemo_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(FormsDemo_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_react = require("react");
|
|
25
26
|
var import_tamagui = require("tamagui");
|
|
26
|
-
function FormsDemo() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
function FormsDemo(props) {
|
|
28
|
+
const [status, setStatus] = (0, import_react.useState)("off");
|
|
29
|
+
(0, import_react.useEffect)(() => {
|
|
30
|
+
if (status === "submitting") {
|
|
31
|
+
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
32
|
+
return () => {
|
|
33
|
+
clearTimeout(timer);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}, [status]);
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
38
|
+
import_tamagui.Form,
|
|
39
|
+
{
|
|
40
|
+
ai: "center",
|
|
41
|
+
miw: 300,
|
|
42
|
+
space: true,
|
|
43
|
+
onSubmit: () => setStatus("submitting"),
|
|
44
|
+
bw: 1,
|
|
45
|
+
br: "$4",
|
|
46
|
+
bc: "$background",
|
|
47
|
+
boc: "$borderColor",
|
|
48
|
+
p: "$8",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H4, { children: status[0].toUpperCase() + status.slice(1) }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Form.Trigger, { asChild: true, disabled: status !== "off", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { icon: status === "submitting" ? () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Spinner, {}) : void 0, children: "Submit" }) })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
39
55
|
}
|
|
40
56
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
57
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FormsDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Button,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import { stat } from 'fs'\n\nimport { useEffect, useState } from 'react'\nimport { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'\n\nexport function FormsDemo(props: { size: SizeTokens }) {\n const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')\n\n useEffect(() => {\n if (status === 'submitting') {\n const timer = setTimeout(() => setStatus('off'), 2000)\n return () => {\n clearTimeout(timer)\n }\n }\n }, [status])\n\n return (\n <Form\n ai=\"center\"\n miw={300}\n space\n onSubmit={() => setStatus('submitting')}\n bw={1}\n br=\"$4\"\n bc=\"$background\"\n boc=\"$borderColor\"\n p=\"$8\"\n >\n <H4>{status[0].toUpperCase() + status.slice(1)}</H4>\n\n <Form.Trigger asChild disabled={status !== 'off'}>\n <Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>\n Submit\n </Button>\n </Form.Trigger>\n </Form>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBI;AAhBJ,mBAAoC;AACpC,qBAAsE;AAE/D,SAAS,UAAU,OAA6B;AACrD,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA6C,KAAK;AAE9E,8BAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B,YAAM,QAAQ,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACrD,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,KAAK;AAAA,MACL,OAAK;AAAA,MACL,UAAU,MAAM,UAAU,YAAY;AAAA,MACtC,IAAI;AAAA,MACJ,IAAG;AAAA,MACH,IAAG;AAAA,MACH,KAAI;AAAA,MACJ,GAAE;AAAA,MAEF;AAAA,oDAAC,qBAAI,iBAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC,GAAE;AAAA,QAE/C,4CAAC,oBAAK,SAAL,EAAa,SAAO,MAAC,UAAU,WAAW,OACzC,sDAAC,yBAAO,MAAM,WAAW,eAAe,MAAM,4CAAC,0BAAQ,IAAK,QAAW,oBAEvE,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __export(src_exports, {
|
|
|
29
29
|
AvatarDemo: () => import_AvatarDemo.AvatarDemo,
|
|
30
30
|
ButtonDemo: () => import_ButtonDemo.ButtonDemo,
|
|
31
31
|
CardDemo: () => import_CardDemo.CardDemo,
|
|
32
|
+
CheckboxDemo: () => import_CheckboxDemo.CheckboxDemo,
|
|
32
33
|
ColorsDemo: () => import_ColorsDemo.ColorsDemo,
|
|
33
34
|
DialogDemo: () => import_DialogDemo.DialogDemo,
|
|
34
35
|
FeatherIconsDemo: () => import_FeatherIconsDemo.FeatherIconsDemo,
|
|
@@ -90,6 +91,7 @@ var import_SliderDemo = require("./SliderDemo");
|
|
|
90
91
|
var import_SpinnerDemo = require("./SpinnerDemo");
|
|
91
92
|
var import_StacksDemo = require("./StacksDemo");
|
|
92
93
|
var import_SwitchDemo = require("./SwitchDemo");
|
|
94
|
+
var import_CheckboxDemo = require("./CheckboxDemo");
|
|
93
95
|
var import_TextDemo = require("./TextDemo");
|
|
94
96
|
var import_ThemeInverseDemo = require("./ThemeInverseDemo");
|
|
95
97
|
var import_TooltipDemo = require("./TooltipDemo");
|
|
@@ -108,6 +110,7 @@ __reExport(src_exports, require("./useOnIntersecting"), module.exports);
|
|
|
108
110
|
AvatarDemo,
|
|
109
111
|
ButtonDemo,
|
|
110
112
|
CardDemo,
|
|
113
|
+
CheckboxDemo,
|
|
111
114
|
ColorsDemo,
|
|
112
115
|
DialogDemo,
|
|
113
116
|
FeatherIconsDemo,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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 { 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAgC;AAChC,4BAA+B;AAC/B,iCAAoC;AACpC,iCAAoC;AACpC,kCAAqC;AACrC,oCAAuC;AACvC,wBAA2B;AAC3B,wBAA2B;AAC3B,sBAAyB;AACzB,wBAA2B;AAC3B,0BAA6B;AAC7B,6BAAgC;AAChC,8BAAiC;AACjC,uBAA0B;AAC1B,uBAA0B;AAC1B,0BAA6B;AAC7B,uBAA0B;AAC1B,uBAA0B;AAC1B,gCAAmC;AACnC,0BAA6B;AAC7B,6BAAgC;AAChC,yBAA4B;AAC5B,0BAA6B;AAC7B,wBAA2B;AAC3B,2BAA8B;AAC9B,wBAA2B;AAC3B,4BAA+B;AAC/B,uBAA0B;AAC1B,wBAA2B;AAC3B,yBAA4B;AAC5B,wBAA2B;AAC3B,wBAA2B;AAC3B,sBAAyB;AACzB,8BAAiC;AACjC,yBAA4B;AAC5B,wBAA2B;AAC3B,wBAA2B;AAC3B,wBAAc,
|
|
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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAgC;AAChC,4BAA+B;AAC/B,iCAAoC;AACpC,iCAAoC;AACpC,kCAAqC;AACrC,oCAAuC;AACvC,wBAA2B;AAC3B,wBAA2B;AAC3B,sBAAyB;AACzB,wBAA2B;AAC3B,0BAA6B;AAC7B,6BAAgC;AAChC,8BAAiC;AACjC,uBAA0B;AAC1B,uBAA0B;AAC1B,0BAA6B;AAC7B,uBAA0B;AAC1B,uBAA0B;AAC1B,gCAAmC;AACnC,0BAA6B;AAC7B,6BAAgC;AAChC,yBAA4B;AAC5B,0BAA6B;AAC7B,wBAA2B;AAC3B,2BAA8B;AAC9B,wBAA2B;AAC3B,4BAA+B;AAC/B,uBAA0B;AAC1B,wBAA2B;AAC3B,yBAA4B;AAC5B,wBAA2B;AAC3B,wBAA2B;AAC3B,0BAA6B;AAC7B,sBAAyB;AACzB,8BAAiC;AACjC,yBAA4B;AAC5B,wBAA2B;AAC3B,wBAA2B;AAC3B,wBAAc,gCAtCd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check as CheckIcon } from "@tamagui/lucide-icons";
|
|
3
|
+
import { Checkbox, Label, XStack, YStack } from "tamagui";
|
|
4
|
+
function CheckboxDemo() {
|
|
5
|
+
return /* @__PURE__ */ jsxs(YStack, { w: 300, ai: "center", space: "$2", children: [
|
|
6
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$3" }),
|
|
7
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$4", defaultChecked: true }),
|
|
8
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$5" })
|
|
9
|
+
] });
|
|
10
|
+
}
|
|
11
|
+
function CheckboxWithLabel(props) {
|
|
12
|
+
const id = `checkbox-${props.size.toString().slice(1)}`;
|
|
13
|
+
return /* @__PURE__ */ jsxs(XStack, { w: 300, ai: "center", space: "$4", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Checkbox, { id, size: props.size, defaultChecked: props.defaultChecked, children: /* @__PURE__ */ jsx(Checkbox.Indicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
|
|
15
|
+
/* @__PURE__ */ jsx(Label, { size: props.size, htmlFor: id, children: "Accept terms and conditions" })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
CheckboxDemo
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=CheckboxDemo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxDemo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Check as CheckIcon } from '@tamagui/lucide-icons'\nimport { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'\n\nexport function CheckboxDemo() {\n return (\n <YStack w={300} ai=\"center\" space=\"$2\">\n <CheckboxWithLabel size=\"$3\" />\n <CheckboxWithLabel size=\"$4\" defaultChecked />\n <CheckboxWithLabel size=\"$5\" />\n </YStack>\n )\n}\n\nfunction CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {\n const id = `checkbox-${props.size.toString().slice(1)}`\n return (\n <XStack w={300} ai=\"center\" space=\"$4\">\n <Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>\n <Checkbox.Indicator>\n <CheckIcon />\n </Checkbox.Indicator>\n </Checkbox>\n\n <Label size={props.size} htmlFor={id}>\n Accept terms and conditions\n </Label>\n </XStack>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAKI,SACE,KADF;AALJ,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU,OAAmB,QAAQ,cAAc;AAErD,SAAS,eAAe;AAC7B,SACE,qBAAC,UAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,wBAAC,qBAAkB,MAAK,MAAK;AAAA,IAC7B,oBAAC,qBAAkB,MAAK,MAAK,gBAAc,MAAC;AAAA,IAC5C,oBAAC,qBAAkB,MAAK,MAAK;AAAA,KAC/B;AAEJ;AAEA,SAAS,kBAAkB,OAAuD;AAChF,QAAM,KAAK,YAAY,MAAM,KAAK,SAAS,EAAE,MAAM,CAAC;AACpD,SACE,qBAAC,UAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,wBAAC,YAAS,IAAQ,MAAM,MAAM,MAAM,gBAAgB,MAAM,gBACxD,8BAAC,SAAS,WAAT,EACC,8BAAC,aAAU,GACb,GACF;AAAA,IAEA,oBAAC,SAAM,MAAM,MAAM,MAAM,SAAS,IAAI,yCAEtC;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Check as CheckIcon } from "@tamagui/lucide-icons";
|
|
3
|
+
import { Checkbox, Label, XStack, YStack } from "tamagui";
|
|
4
|
+
function CheckboxDemo() {
|
|
5
|
+
return /* @__PURE__ */ jsxs(YStack, { w: 300, ai: "center", space: "$2", children: [
|
|
6
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$3" }),
|
|
7
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$4", defaultChecked: true }),
|
|
8
|
+
/* @__PURE__ */ jsx(CheckboxWithLabel, { size: "$5" })
|
|
9
|
+
] });
|
|
10
|
+
}
|
|
11
|
+
function CheckboxWithLabel(props) {
|
|
12
|
+
const id = `checkbox-${props.size.toString().slice(1)}`;
|
|
13
|
+
return /* @__PURE__ */ jsxs(XStack, { w: 300, ai: "center", space: "$4", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Checkbox, { id, size: props.size, defaultChecked: props.defaultChecked, children: /* @__PURE__ */ jsx(Checkbox.Indicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) }) }),
|
|
15
|
+
/* @__PURE__ */ jsx(Label, { size: props.size, htmlFor: id, children: "Accept terms and conditions" })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
CheckboxDemo
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=CheckboxDemo.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxDemo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Check as CheckIcon } from '@tamagui/lucide-icons'\nimport { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'\n\nexport function CheckboxDemo() {\n return (\n <YStack w={300} ai=\"center\" space=\"$2\">\n <CheckboxWithLabel size=\"$3\" />\n <CheckboxWithLabel size=\"$4\" defaultChecked />\n <CheckboxWithLabel size=\"$5\" />\n </YStack>\n )\n}\n\nfunction CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {\n const id = `checkbox-${props.size.toString().slice(1)}`\n return (\n <XStack w={300} ai=\"center\" space=\"$4\">\n <Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>\n <Checkbox.Indicator>\n <CheckIcon />\n </Checkbox.Indicator>\n </Checkbox>\n\n <Label size={props.size} htmlFor={id}>\n Accept terms and conditions\n </Label>\n </XStack>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAKI,SACE,KADF;AALJ,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU,OAAmB,QAAQ,cAAc;AAErD,SAAS,eAAe;AAC7B,SACE,qBAAC,UAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,wBAAC,qBAAkB,MAAK,MAAK;AAAA,IAC7B,oBAAC,qBAAkB,MAAK,MAAK,gBAAc,MAAC;AAAA,IAC5C,oBAAC,qBAAkB,MAAK,MAAK;AAAA,KAC/B;AAEJ;AAEA,SAAS,kBAAkB,OAAuD;AAChF,QAAM,KAAK,YAAY,MAAM,KAAK,SAAS,EAAE,MAAM,CAAC;AACpD,SACE,qBAAC,UAAO,GAAG,KAAK,IAAG,UAAS,OAAM,MAChC;AAAA,wBAAC,YAAS,IAAQ,MAAM,MAAM,MAAM,gBAAgB,MAAM,gBACxD,8BAAC,SAAS,WAAT,EACC,8BAAC,aAAU,GACb,GACF;AAAA,IAEA,oBAAC,SAAM,MAAM,MAAM,MAAM,SAAS,IAAI,yCAEtC;AAAA,KACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/esm/FormsDemo.js
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Button, Form, H4, Spinner } from "tamagui";
|
|
4
|
+
function FormsDemo(props) {
|
|
5
|
+
const [status, setStatus] = useState("off");
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (status === "submitting") {
|
|
8
|
+
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
9
|
+
return () => {
|
|
10
|
+
clearTimeout(timer);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}, [status]);
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
Form,
|
|
16
|
+
{
|
|
17
|
+
ai: "center",
|
|
18
|
+
miw: 300,
|
|
19
|
+
space: true,
|
|
20
|
+
onSubmit: () => setStatus("submitting"),
|
|
21
|
+
bw: 1,
|
|
22
|
+
br: "$4",
|
|
23
|
+
bc: "$background",
|
|
24
|
+
boc: "$borderColor",
|
|
25
|
+
p: "$8",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(H4, { children: status[0].toUpperCase() + status.slice(1) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Form.Trigger, { asChild: true, disabled: status !== "off", children: /* @__PURE__ */ jsx(Button, { icon: status === "submitting" ? () => /* @__PURE__ */ jsx(Spinner, {}) : void 0, children: "Submit" }) })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
16
32
|
}
|
|
17
33
|
export {
|
|
18
34
|
FormsDemo
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FormsDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Button,
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { stat } from 'fs'\n\nimport { useEffect, useState } from 'react'\nimport { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'\n\nexport function FormsDemo(props: { size: SizeTokens }) {\n const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')\n\n useEffect(() => {\n if (status === 'submitting') {\n const timer = setTimeout(() => setStatus('off'), 2000)\n return () => {\n clearTimeout(timer)\n }\n }\n }, [status])\n\n return (\n <Form\n ai=\"center\"\n miw={300}\n space\n onSubmit={() => setStatus('submitting')}\n bw={1}\n br=\"$4\"\n bc=\"$background\"\n boc=\"$borderColor\"\n p=\"$8\"\n >\n <H4>{status[0].toUpperCase() + status.slice(1)}</H4>\n\n <Form.Trigger asChild disabled={status !== 'off'}>\n <Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>\n Submit\n </Button>\n </Form.Trigger>\n </Form>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAkBI,SAWE,KAXF;AAhBJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,MAAM,IAAgB,eAA+B;AAE/D,SAAS,UAAU,OAA6B;AACrD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6C,KAAK;AAE9E,YAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B,YAAM,QAAQ,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACrD,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,KAAK;AAAA,MACL,OAAK;AAAA,MACL,UAAU,MAAM,UAAU,YAAY;AAAA,MACtC,IAAI;AAAA,MACJ,IAAG;AAAA,MACH,IAAG;AAAA,MACH,KAAI;AAAA,MACJ,GAAE;AAAA,MAEF;AAAA,4BAAC,MAAI,iBAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC,GAAE;AAAA,QAE/C,oBAAC,KAAK,SAAL,EAAa,SAAO,MAAC,UAAU,WAAW,OACzC,8BAAC,UAAO,MAAM,WAAW,eAAe,MAAM,oBAAC,WAAQ,IAAK,QAAW,oBAEvE,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/FormsDemo.mjs
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Button, Form, H4, Spinner } from "tamagui";
|
|
4
|
+
function FormsDemo(props) {
|
|
5
|
+
const [status, setStatus] = useState("off");
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (status === "submitting") {
|
|
8
|
+
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
9
|
+
return () => {
|
|
10
|
+
clearTimeout(timer);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}, [status]);
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
Form,
|
|
16
|
+
{
|
|
17
|
+
ai: "center",
|
|
18
|
+
miw: 300,
|
|
19
|
+
space: true,
|
|
20
|
+
onSubmit: () => setStatus("submitting"),
|
|
21
|
+
bw: 1,
|
|
22
|
+
br: "$4",
|
|
23
|
+
bc: "$background",
|
|
24
|
+
boc: "$borderColor",
|
|
25
|
+
p: "$8",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(H4, { children: status[0].toUpperCase() + status.slice(1) }),
|
|
28
|
+
/* @__PURE__ */ jsx(Form.Trigger, { asChild: true, disabled: status !== "off", children: /* @__PURE__ */ jsx(Button, { icon: status === "submitting" ? () => /* @__PURE__ */ jsx(Spinner, {}) : void 0, children: "Submit" }) })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
16
32
|
}
|
|
17
33
|
export {
|
|
18
34
|
FormsDemo
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FormsDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Button,
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { stat } from 'fs'\n\nimport { useEffect, useState } from 'react'\nimport { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'\n\nexport function FormsDemo(props: { size: SizeTokens }) {\n const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')\n\n useEffect(() => {\n if (status === 'submitting') {\n const timer = setTimeout(() => setStatus('off'), 2000)\n return () => {\n clearTimeout(timer)\n }\n }\n }, [status])\n\n return (\n <Form\n ai=\"center\"\n miw={300}\n space\n onSubmit={() => setStatus('submitting')}\n bw={1}\n br=\"$4\"\n bc=\"$background\"\n boc=\"$borderColor\"\n p=\"$8\"\n >\n <H4>{status[0].toUpperCase() + status.slice(1)}</H4>\n\n <Form.Trigger asChild disabled={status !== 'off'}>\n <Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>\n Submit\n </Button>\n </Form.Trigger>\n </Form>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAkBI,SAWE,KAXF;AAhBJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,MAAM,IAAgB,eAA+B;AAE/D,SAAS,UAAU,OAA6B;AACrD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6C,KAAK;AAE9E,YAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B,YAAM,QAAQ,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACrD,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,KAAK;AAAA,MACL,OAAK;AAAA,MACL,UAAU,MAAM,UAAU,YAAY;AAAA,MACtC,IAAI;AAAA,MACJ,IAAG;AAAA,MACH,IAAG;AAAA,MACH,KAAI;AAAA,MACJ,GAAE;AAAA,MAEF;AAAA,4BAAC,MAAI,iBAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC,GAAE;AAAA,QAE/C,oBAAC,KAAK,SAAL,EAAa,SAAO,MAAC,UAAU,WAAW,OACzC,8BAAC,UAAO,MAAM,WAAW,eAAe,MAAM,oBAAC,WAAQ,IAAK,QAAW,oBAEvE,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { SliderDemo } from "./SliderDemo";
|
|
|
30
30
|
import { SpinnerDemo } from "./SpinnerDemo";
|
|
31
31
|
import { StacksDemo } from "./StacksDemo";
|
|
32
32
|
import { SwitchDemo } from "./SwitchDemo";
|
|
33
|
+
import { CheckboxDemo } from "./CheckboxDemo";
|
|
33
34
|
import { TextDemo } from "./TextDemo";
|
|
34
35
|
import { ThemeInverseDemo } from "./ThemeInverseDemo";
|
|
35
36
|
import { TooltipDemo } from "./TooltipDemo";
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
AvatarDemo,
|
|
48
49
|
ButtonDemo,
|
|
49
50
|
CardDemo,
|
|
51
|
+
CheckboxDemo,
|
|
50
52
|
ColorsDemo,
|
|
51
53
|
DialogDemo,
|
|
52
54
|
FeatherIconsDemo,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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,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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -30,6 +30,7 @@ import { SliderDemo } from "./SliderDemo";
|
|
|
30
30
|
import { SpinnerDemo } from "./SpinnerDemo";
|
|
31
31
|
import { StacksDemo } from "./StacksDemo";
|
|
32
32
|
import { SwitchDemo } from "./SwitchDemo";
|
|
33
|
+
import { CheckboxDemo } from "./CheckboxDemo";
|
|
33
34
|
import { TextDemo } from "./TextDemo";
|
|
34
35
|
import { ThemeInverseDemo } from "./ThemeInverseDemo";
|
|
35
36
|
import { TooltipDemo } from "./TooltipDemo";
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
AvatarDemo,
|
|
48
49
|
ButtonDemo,
|
|
49
50
|
CardDemo,
|
|
51
|
+
CheckboxDemo,
|
|
50
52
|
ColorsDemo,
|
|
51
53
|
DialogDemo,
|
|
52
54
|
FeatherIconsDemo,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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,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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Check as CheckIcon } from "@tamagui/lucide-icons";
|
|
2
|
+
import { Checkbox, Label, XStack, YStack } from "tamagui";
|
|
3
|
+
function CheckboxDemo() {
|
|
4
|
+
return <YStack w={300} ai="center" space="$2">
|
|
5
|
+
<CheckboxWithLabel size="$3" />
|
|
6
|
+
<CheckboxWithLabel size="$4" defaultChecked />
|
|
7
|
+
<CheckboxWithLabel size="$5" />
|
|
8
|
+
</YStack>;
|
|
9
|
+
}
|
|
10
|
+
function CheckboxWithLabel(props) {
|
|
11
|
+
const id = `checkbox-${props.size.toString().slice(1)}`;
|
|
12
|
+
return <XStack w={300} ai="center" space="$4">
|
|
13
|
+
<Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}><Checkbox.Indicator><CheckIcon /></Checkbox.Indicator></Checkbox>
|
|
14
|
+
<Label size={props.size} htmlFor={id}>Accept terms and conditions</Label>
|
|
15
|
+
</XStack>;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
CheckboxDemo
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=CheckboxDemo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxDemo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Check as CheckIcon } from '@tamagui/lucide-icons'\nimport { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'\n\nexport function CheckboxDemo() {\n return (\n <YStack w={300} ai=\"center\" space=\"$2\">\n <CheckboxWithLabel size=\"$3\" />\n <CheckboxWithLabel size=\"$4\" defaultChecked />\n <CheckboxWithLabel size=\"$5\" />\n </YStack>\n )\n}\n\nfunction CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {\n const id = `checkbox-${props.size.toString().slice(1)}`\n return (\n <XStack w={300} ai=\"center\" space=\"$4\">\n <Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>\n <Checkbox.Indicator>\n <CheckIcon />\n </Checkbox.Indicator>\n </Checkbox>\n\n <Label size={props.size} htmlFor={id}>\n Accept terms and conditions\n </Label>\n </XStack>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU,OAAmB,QAAQ,cAAc;AAErD,SAAS,eAAe;AAC7B,SACE,CAAC,OAAO,GAAG,KAAK,GAAG,SAAS,MAAM;AAAA,IAChC,CAAC,kBAAkB,KAAK,KAAK;AAAA,IAC7B,CAAC,kBAAkB,KAAK,KAAK,eAAe;AAAA,IAC5C,CAAC,kBAAkB,KAAK,KAAK;AAAA,EAC/B,EAJC;AAML;AAEA,SAAS,kBAAkB,OAAuD;AAChF,QAAM,KAAK,YAAY,MAAM,KAAK,SAAS,EAAE,MAAM,CAAC;AACpD,SACE,CAAC,OAAO,GAAG,KAAK,GAAG,SAAS,MAAM;AAAA,IAChC,CAAC,SAAS,IAAI,IAAI,MAAM,MAAM,MAAM,gBAAgB,MAAM,gBACxD,CAAC,SAAS,UACR,CAAC,UAAU,EACb,EAFC,SAAS,UAGZ,EAJC;AAAA,IAMD,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,IAAI,2BAEtC,EAFC;AAAA,EAGH,EAVC;AAYL;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Check as CheckIcon } from "@tamagui/lucide-icons";
|
|
2
|
+
import { Checkbox, Label, XStack, YStack } from "tamagui";
|
|
3
|
+
function CheckboxDemo() {
|
|
4
|
+
return <YStack w={300} ai="center" space="$2">
|
|
5
|
+
<CheckboxWithLabel size="$3" />
|
|
6
|
+
<CheckboxWithLabel size="$4" defaultChecked />
|
|
7
|
+
<CheckboxWithLabel size="$5" />
|
|
8
|
+
</YStack>;
|
|
9
|
+
}
|
|
10
|
+
function CheckboxWithLabel(props) {
|
|
11
|
+
const id = `checkbox-${props.size.toString().slice(1)}`;
|
|
12
|
+
return <XStack w={300} ai="center" space="$4">
|
|
13
|
+
<Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}><Checkbox.Indicator><CheckIcon /></Checkbox.Indicator></Checkbox>
|
|
14
|
+
<Label size={props.size} htmlFor={id}>Accept terms and conditions</Label>
|
|
15
|
+
</XStack>;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
CheckboxDemo
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=CheckboxDemo.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/CheckboxDemo.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Check as CheckIcon } from '@tamagui/lucide-icons'\nimport { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'\n\nexport function CheckboxDemo() {\n return (\n <YStack w={300} ai=\"center\" space=\"$2\">\n <CheckboxWithLabel size=\"$3\" />\n <CheckboxWithLabel size=\"$4\" defaultChecked />\n <CheckboxWithLabel size=\"$5\" />\n </YStack>\n )\n}\n\nfunction CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {\n const id = `checkbox-${props.size.toString().slice(1)}`\n return (\n <XStack w={300} ai=\"center\" space=\"$4\">\n <Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>\n <Checkbox.Indicator>\n <CheckIcon />\n </Checkbox.Indicator>\n </Checkbox>\n\n <Label size={props.size} htmlFor={id}>\n Accept terms and conditions\n </Label>\n </XStack>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU,OAAmB,QAAQ,cAAc;AAErD,SAAS,eAAe;AAC7B,SACE,CAAC,OAAO,GAAG,KAAK,GAAG,SAAS,MAAM;AAAA,IAChC,CAAC,kBAAkB,KAAK,KAAK;AAAA,IAC7B,CAAC,kBAAkB,KAAK,KAAK,eAAe;AAAA,IAC5C,CAAC,kBAAkB,KAAK,KAAK;AAAA,EAC/B,EAJC;AAML;AAEA,SAAS,kBAAkB,OAAuD;AAChF,QAAM,KAAK,YAAY,MAAM,KAAK,SAAS,EAAE,MAAM,CAAC;AACpD,SACE,CAAC,OAAO,GAAG,KAAK,GAAG,SAAS,MAAM;AAAA,IAChC,CAAC,SAAS,IAAI,IAAI,MAAM,MAAM,MAAM,gBAAgB,MAAM,gBACxD,CAAC,SAAS,UACR,CAAC,UAAU,EACb,EAFC,SAAS,UAGZ,EAJC;AAAA,IAMD,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,IAAI,2BAEtC,EAFC;AAAA,EAGH,EAVC;AAYL;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/jsx/FormsDemo.js
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Button, Form, H4, Spinner } from "tamagui";
|
|
3
|
+
function FormsDemo(props) {
|
|
4
|
+
const [status, setStatus] = useState("off");
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
if (status === "submitting") {
|
|
7
|
+
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
8
|
+
return () => {
|
|
9
|
+
clearTimeout(timer);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}, [status]);
|
|
13
|
+
return <Form
|
|
14
|
+
ai="center"
|
|
15
|
+
miw={300}
|
|
16
|
+
space
|
|
17
|
+
onSubmit={() => setStatus("submitting")}
|
|
18
|
+
bw={1}
|
|
19
|
+
br="$4"
|
|
20
|
+
bc="$background"
|
|
21
|
+
boc="$borderColor"
|
|
22
|
+
p="$8"
|
|
23
|
+
>
|
|
24
|
+
<H4>{status[0].toUpperCase() + status.slice(1)}</H4>
|
|
25
|
+
<Form.Trigger asChild disabled={status !== "off"}><Button icon={status === "submitting" ? () => <Spinner /> : void 0}>Submit</Button></Form.Trigger>
|
|
26
|
+
</Form>;
|
|
15
27
|
}
|
|
16
28
|
export {
|
|
17
29
|
FormsDemo
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FormsDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Button,
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { stat } from 'fs'\n\nimport { useEffect, useState } from 'react'\nimport { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'\n\nexport function FormsDemo(props: { size: SizeTokens }) {\n const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')\n\n useEffect(() => {\n if (status === 'submitting') {\n const timer = setTimeout(() => setStatus('off'), 2000)\n return () => {\n clearTimeout(timer)\n }\n }\n }, [status])\n\n return (\n <Form\n ai=\"center\"\n miw={300}\n space\n onSubmit={() => setStatus('submitting')}\n bw={1}\n br=\"$4\"\n bc=\"$background\"\n boc=\"$borderColor\"\n p=\"$8\"\n >\n <H4>{status[0].toUpperCase() + status.slice(1)}</H4>\n\n <Form.Trigger asChild disabled={status !== 'off'}>\n <Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>\n Submit\n </Button>\n </Form.Trigger>\n </Form>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,MAAM,IAAgB,eAA+B;AAE/D,SAAS,UAAU,OAA6B;AACrD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6C,KAAK;AAE9E,YAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B,YAAM,QAAQ,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACrD,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,CAAC;AAAA,IACC,GAAG;AAAA,IACH,KAAK;AAAA,IACL;AAAA,IACA,UAAU,MAAM,UAAU,YAAY;AAAA,IACtC,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,EAAE;AAAA;AAAA,IAEF,CAAC,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC,EAAE,EAA9C;AAAA,IAED,CAAC,KAAK,QAAQ,QAAQ,UAAU,WAAW,OACzC,CAAC,OAAO,MAAM,WAAW,eAAe,MAAM,CAAC,QAAQ,KAAK,QAAW,MAEvE,EAFC,OAGH,EAJC,KAAK;AAAA,EAKR,EAlBC;AAoBL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/FormsDemo.mjs
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Button, Form, H4, Spinner } from "tamagui";
|
|
3
|
+
function FormsDemo(props) {
|
|
4
|
+
const [status, setStatus] = useState("off");
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
if (status === "submitting") {
|
|
7
|
+
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
8
|
+
return () => {
|
|
9
|
+
clearTimeout(timer);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}, [status]);
|
|
13
|
+
return <Form
|
|
14
|
+
ai="center"
|
|
15
|
+
miw={300}
|
|
16
|
+
space
|
|
17
|
+
onSubmit={() => setStatus("submitting")}
|
|
18
|
+
bw={1}
|
|
19
|
+
br="$4"
|
|
20
|
+
bc="$background"
|
|
21
|
+
boc="$borderColor"
|
|
22
|
+
p="$8"
|
|
23
|
+
>
|
|
24
|
+
<H4>{status[0].toUpperCase() + status.slice(1)}</H4>
|
|
25
|
+
<Form.Trigger asChild disabled={status !== "off"}><Button icon={status === "submitting" ? () => <Spinner /> : void 0}>Submit</Button></Form.Trigger>
|
|
26
|
+
</Form>;
|
|
15
27
|
}
|
|
16
28
|
export {
|
|
17
29
|
FormsDemo
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/FormsDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Button,
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { stat } from 'fs'\n\nimport { useEffect, useState } from 'react'\nimport { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'\n\nexport function FormsDemo(props: { size: SizeTokens }) {\n const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')\n\n useEffect(() => {\n if (status === 'submitting') {\n const timer = setTimeout(() => setStatus('off'), 2000)\n return () => {\n clearTimeout(timer)\n }\n }\n }, [status])\n\n return (\n <Form\n ai=\"center\"\n miw={300}\n space\n onSubmit={() => setStatus('submitting')}\n bw={1}\n br=\"$4\"\n bc=\"$background\"\n boc=\"$borderColor\"\n p=\"$8\"\n >\n <H4>{status[0].toUpperCase() + status.slice(1)}</H4>\n\n <Form.Trigger asChild disabled={status !== 'off'}>\n <Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>\n Submit\n </Button>\n </Form.Trigger>\n </Form>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,WAAW,gBAAgB;AACpC,SAAS,QAAQ,MAAM,IAAgB,eAA+B;AAE/D,SAAS,UAAU,OAA6B;AACrD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6C,KAAK;AAE9E,YAAU,MAAM;AACd,QAAI,WAAW,cAAc;AAC3B,YAAM,QAAQ,WAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AACrD,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,MAAM,CAAC;AAEX,SACE,CAAC;AAAA,IACC,GAAG;AAAA,IACH,KAAK;AAAA,IACL;AAAA,IACA,UAAU,MAAM,UAAU,YAAY;AAAA,IACtC,IAAI;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,IAAI;AAAA,IACJ,EAAE;AAAA;AAAA,IAEF,CAAC,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,OAAO,MAAM,CAAC,EAAE,EAA9C;AAAA,IAED,CAAC,KAAK,QAAQ,QAAQ,UAAU,WAAW,OACzC,CAAC,OAAO,MAAM,WAAW,eAAe,MAAM,CAAC,QAAQ,KAAK,QAAW,MAEvE,EAFC,OAGH,EAJC,KAAK;AAAA,EAKR,EAlBC;AAoBL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { SliderDemo } from "./SliderDemo";
|
|
|
30
30
|
import { SpinnerDemo } from "./SpinnerDemo";
|
|
31
31
|
import { StacksDemo } from "./StacksDemo";
|
|
32
32
|
import { SwitchDemo } from "./SwitchDemo";
|
|
33
|
+
import { CheckboxDemo } from "./CheckboxDemo";
|
|
33
34
|
import { TextDemo } from "./TextDemo";
|
|
34
35
|
import { ThemeInverseDemo } from "./ThemeInverseDemo";
|
|
35
36
|
import { TooltipDemo } from "./TooltipDemo";
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
AvatarDemo,
|
|
48
49
|
ButtonDemo,
|
|
49
50
|
CardDemo,
|
|
51
|
+
CheckboxDemo,
|
|
50
52
|
ColorsDemo,
|
|
51
53
|
DialogDemo,
|
|
52
54
|
FeatherIconsDemo,
|
package/dist/jsx/index.js.map
CHANGED
|
@@ -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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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,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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -30,6 +30,7 @@ import { SliderDemo } from "./SliderDemo";
|
|
|
30
30
|
import { SpinnerDemo } from "./SpinnerDemo";
|
|
31
31
|
import { StacksDemo } from "./StacksDemo";
|
|
32
32
|
import { SwitchDemo } from "./SwitchDemo";
|
|
33
|
+
import { CheckboxDemo } from "./CheckboxDemo";
|
|
33
34
|
import { TextDemo } from "./TextDemo";
|
|
34
35
|
import { ThemeInverseDemo } from "./ThemeInverseDemo";
|
|
35
36
|
import { TooltipDemo } from "./TooltipDemo";
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
AvatarDemo,
|
|
48
49
|
ButtonDemo,
|
|
49
50
|
CardDemo,
|
|
51
|
+
CheckboxDemo,
|
|
50
52
|
ColorsDemo,
|
|
51
53
|
DialogDemo,
|
|
52
54
|
FeatherIconsDemo,
|
package/dist/jsx/index.mjs.map
CHANGED
|
@@ -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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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,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 { FeatherIconsDemo } from './FeatherIconsDemo'\nexport { FormsDemo } from './FormsDemo'\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 { 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,wBAAwB;AACjC,SAAS,iBAAiB;AAC1B,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,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/demos",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -29,27 +29,27 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tamagui/avatar": "^1.
|
|
33
|
-
"@tamagui/button": "^1.
|
|
34
|
-
"@tamagui/config-base": "^1.
|
|
35
|
-
"@tamagui/core": "^1.
|
|
36
|
-
"@tamagui/list-item": "^1.
|
|
37
|
-
"@tamagui/logo": "^1.
|
|
38
|
-
"@tamagui/menu": "^1.
|
|
39
|
-
"@tamagui/popover": "^1.
|
|
40
|
-
"@tamagui/progress": "^1.
|
|
41
|
-
"@tamagui/select": "^1.
|
|
42
|
-
"@tamagui/sheet": "^1.
|
|
43
|
-
"@tamagui/slider": "^1.
|
|
44
|
-
"@tamagui/stacks": "^1.
|
|
45
|
-
"tamagui": "^1.
|
|
32
|
+
"@tamagui/avatar": "^1.3.1",
|
|
33
|
+
"@tamagui/button": "^1.3.1",
|
|
34
|
+
"@tamagui/config-base": "^1.3.1",
|
|
35
|
+
"@tamagui/core": "^1.3.1",
|
|
36
|
+
"@tamagui/list-item": "^1.3.1",
|
|
37
|
+
"@tamagui/logo": "^1.3.1",
|
|
38
|
+
"@tamagui/menu": "^1.3.1",
|
|
39
|
+
"@tamagui/popover": "^1.3.1",
|
|
40
|
+
"@tamagui/progress": "^1.3.1",
|
|
41
|
+
"@tamagui/select": "^1.3.1",
|
|
42
|
+
"@tamagui/sheet": "^1.3.1",
|
|
43
|
+
"@tamagui/slider": "^1.3.1",
|
|
44
|
+
"@tamagui/stacks": "^1.3.1",
|
|
45
|
+
"tamagui": "^1.3.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "*",
|
|
49
49
|
"react-dom": "*"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@tamagui/build": "^1.
|
|
52
|
+
"@tamagui/build": "^1.3.1",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-dom": "^18.2.0"
|
|
55
55
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Check as CheckIcon } from '@tamagui/lucide-icons'
|
|
2
|
+
import { Checkbox, Label, SizeTokens, XStack, YStack } from 'tamagui'
|
|
3
|
+
|
|
4
|
+
export function CheckboxDemo() {
|
|
5
|
+
return (
|
|
6
|
+
<YStack w={300} ai="center" space="$2">
|
|
7
|
+
<CheckboxWithLabel size="$3" />
|
|
8
|
+
<CheckboxWithLabel size="$4" defaultChecked />
|
|
9
|
+
<CheckboxWithLabel size="$5" />
|
|
10
|
+
</YStack>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function CheckboxWithLabel(props: { size: SizeTokens; defaultChecked?: boolean }) {
|
|
15
|
+
const id = `checkbox-${props.size.toString().slice(1)}`
|
|
16
|
+
return (
|
|
17
|
+
<XStack w={300} ai="center" space="$4">
|
|
18
|
+
<Checkbox id={id} size={props.size} defaultChecked={props.defaultChecked}>
|
|
19
|
+
<Checkbox.Indicator>
|
|
20
|
+
<CheckIcon />
|
|
21
|
+
</Checkbox.Indicator>
|
|
22
|
+
</Checkbox>
|
|
23
|
+
|
|
24
|
+
<Label size={props.size} htmlFor={id}>
|
|
25
|
+
Accept terms and conditions
|
|
26
|
+
</Label>
|
|
27
|
+
</XStack>
|
|
28
|
+
)
|
|
29
|
+
}
|
package/src/FormsDemo.tsx
CHANGED
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { stat } from 'fs'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { useEffect, useState } from 'react'
|
|
4
|
+
import { Button, Form, H4, SizeTokens, Spinner, XStack, YStack } from 'tamagui'
|
|
5
|
+
|
|
6
|
+
export function FormsDemo(props: { size: SizeTokens }) {
|
|
7
|
+
const [status, setStatus] = useState<'off' | 'submitting' | 'submitted'>('off')
|
|
8
|
+
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (status === 'submitting') {
|
|
11
|
+
const timer = setTimeout(() => setStatus('off'), 2000)
|
|
12
|
+
return () => {
|
|
13
|
+
clearTimeout(timer)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, [status])
|
|
13
17
|
|
|
14
|
-
function FormDemo(props: { size: SizeTokens }) {
|
|
15
18
|
return (
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
<Form
|
|
20
|
+
ai="center"
|
|
21
|
+
miw={300}
|
|
22
|
+
space
|
|
23
|
+
onSubmit={() => setStatus('submitting')}
|
|
24
|
+
bw={1}
|
|
25
|
+
br="$4"
|
|
26
|
+
bc="$background"
|
|
27
|
+
boc="$borderColor"
|
|
28
|
+
p="$8"
|
|
29
|
+
>
|
|
30
|
+
<H4>{status[0].toUpperCase() + status.slice(1)}</H4>
|
|
31
|
+
|
|
32
|
+
<Form.Trigger asChild disabled={status !== 'off'}>
|
|
33
|
+
<Button icon={status === 'submitting' ? () => <Spinner /> : undefined}>
|
|
34
|
+
Submit
|
|
35
|
+
</Button>
|
|
36
|
+
</Form.Trigger>
|
|
37
|
+
</Form>
|
|
20
38
|
)
|
|
21
39
|
}
|
package/src/index.tsx
CHANGED
|
@@ -30,6 +30,7 @@ export { SliderDemo } from './SliderDemo'
|
|
|
30
30
|
export { SpinnerDemo } from './SpinnerDemo'
|
|
31
31
|
export { StacksDemo } from './StacksDemo'
|
|
32
32
|
export { SwitchDemo } from './SwitchDemo'
|
|
33
|
+
export { CheckboxDemo } from './CheckboxDemo'
|
|
33
34
|
export { TextDemo } from './TextDemo'
|
|
34
35
|
export { ThemeInverseDemo } from './ThemeInverseDemo'
|
|
35
36
|
export { TooltipDemo } from './TooltipDemo'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxDemo.d.ts","sourceRoot":"","sources":["../src/CheckboxDemo.tsx"],"names":[],"mappings":";AAGA,wBAAgB,YAAY,gBAQ3B"}
|
package/types/FormsDemo.d.ts
CHANGED
package/types/FormsDemo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormsDemo.d.ts","sourceRoot":"","sources":["../src/FormsDemo.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FormsDemo.d.ts","sourceRoot":"","sources":["../src/FormsDemo.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAoB,UAAU,EAA2B,MAAM,SAAS,CAAA;AAE/E,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,eAiCpD"}
|
package/types/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { SliderDemo } from './SliderDemo';
|
|
|
30
30
|
export { SpinnerDemo } from './SpinnerDemo';
|
|
31
31
|
export { StacksDemo } from './StacksDemo';
|
|
32
32
|
export { SwitchDemo } from './SwitchDemo';
|
|
33
|
+
export { CheckboxDemo } from './CheckboxDemo';
|
|
33
34
|
export { TextDemo } from './TextDemo';
|
|
34
35
|
export { ThemeInverseDemo } from './ThemeInverseDemo';
|
|
35
36
|
export { TooltipDemo } from './TooltipDemo';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,cAAc,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,cAAc,qBAAqB,CAAA"}
|