@tamagui/demos 1.2.17 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/CheckboxDemo.js +45 -0
- package/dist/cjs/CheckboxDemo.js.map +7 -0
- package/dist/cjs/DialogDemo.js +2 -2
- package/dist/cjs/DialogDemo.js.map +2 -2
- 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/DialogDemo.js +4 -2
- package/dist/esm/DialogDemo.js.map +2 -2
- package/dist/esm/DialogDemo.mjs +4 -2
- package/dist/esm/DialogDemo.mjs.map +2 -2
- 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/DialogDemo.js +4 -2
- package/dist/jsx/DialogDemo.js.map +2 -2
- package/dist/jsx/DialogDemo.mjs +4 -2
- package/dist/jsx/DialogDemo.mjs.map +2 -2
- 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/DialogDemo.tsx +6 -2
- 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/DialogDemo.d.ts.map +1 -1
- 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
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/DialogDemo.js
CHANGED
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
Fieldset,
|
|
7
7
|
Input,
|
|
8
8
|
Label,
|
|
9
|
+
Paragraph,
|
|
9
10
|
Sheet,
|
|
11
|
+
TooltipSimple,
|
|
10
12
|
Unspaced,
|
|
11
13
|
YStack
|
|
12
14
|
} from "tamagui";
|
|
@@ -49,11 +51,11 @@ function DialogDemo() {
|
|
|
49
51
|
<Input f={1} id="name" defaultValue="Nate Wienert" />
|
|
50
52
|
</Fieldset>
|
|
51
53
|
<Fieldset space="$4" horizontal>
|
|
52
|
-
<Label w={160} justifyContent="flex-end" htmlFor="username">Food</Label>
|
|
54
|
+
<Label w={160} justifyContent="flex-end" htmlFor="username"><TooltipSimple label="Pick your favorite" placement="bottom-start"><Paragraph>Food</Paragraph></TooltipSimple></Label>
|
|
53
55
|
<SelectDemo />
|
|
54
56
|
</Fieldset>
|
|
55
57
|
<YStack ai="flex-end" mt="$2"><Dialog.Close displayWhenAdapted asChild><Button theme="alt1" aria-label="Close">Save changes</Button></Dialog.Close></YStack>
|
|
56
|
-
<Unspaced><Dialog.Close asChild><Button pos="absolute" t="$
|
|
58
|
+
<Unspaced><Dialog.Close asChild><Button pos="absolute" t="$3" r="$3" size="$2" circular icon={X} /></Dialog.Close></Unspaced>
|
|
57
59
|
</Dialog.Content>
|
|
58
60
|
</Dialog.Portal>
|
|
59
61
|
</Dialog>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DialogDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { X } from '@tamagui/lucide-icons'\nimport {\n Adapt,\n Button,\n Dialog,\n Fieldset,\n H2,\n Input,\n Label,\n Sheet,\n Unspaced,\n YStack,\n} from 'tamagui'\n\nimport { SelectDemo } from './SelectDemo'\n\nexport function DialogDemo() {\n return (\n <Dialog modal>\n <Dialog.Trigger asChild>\n <Button>Edit Profile</Button>\n </Dialog.Trigger>\n\n <Adapt when=\"sm\" platform=\"touch\">\n <Sheet zIndex={200000} modal dismissOnSnapToBottom>\n <Sheet.Frame padding=\"$4\" space>\n <Adapt.Contents />\n </Sheet.Frame>\n <Sheet.Overlay />\n </Sheet>\n </Adapt>\n\n <Dialog.Portal>\n <Dialog.Overlay\n key=\"overlay\"\n animation=\"quick\"\n o={0.5}\n enterStyle={{ o: 0 }}\n exitStyle={{ o: 0 }}\n />\n\n <Dialog.Content\n bordered\n elevate\n key=\"content\"\n animation={[\n 'quick',\n {\n opacity: {\n overshootClamping: true,\n },\n },\n ]}\n enterStyle={{ x: 0, y: -20, opacity: 0, scale: 0.9 }}\n exitStyle={{ x: 0, y: 10, opacity: 0, scale: 0.95 }}\n space\n >\n <Dialog.Title>Edit profile</Dialog.Title>\n <Dialog.Description>\n Make changes to your profile here. Click save when you're done.\n </Dialog.Description>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"name\">\n Name\n </Label>\n <Input f={1} id=\"name\" defaultValue=\"Nate Wienert\" />\n </Fieldset>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"username\">\n
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AAEpB,SAAS,aAAa;AAC3B,SACE,CAAC,OAAO;AAAA,IACN,CAAC,OAAO,QAAQ,QACd,CAAC,OAAO,YAAY,EAAnB,OACH,EAFC,OAAO;AAAA,IAIR,CAAC,MAAM,KAAK,KAAK,SAAS,QACxB,CAAC,MAAM,QAAQ,KAAQ,MAAM;AAAA,MAC3B,CAAC,MAAM,MAAM,QAAQ,KAAK,MACxB,CAAC,MAAM,SAAS,EAClB,EAFC,MAAM;AAAA,MAGP,CAAC,MAAM,QAAQ;AAAA,IACjB,EALC,MAMH,EAPC;AAAA,IASD,CAAC,OAAO;AAAA,MACN,CAAC,OAAO;AAAA,QACN,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,GAAG;AAAA,QACH,YAAY,EAAE,GAAG,EAAE;AAAA,QACnB,WAAW,EAAE,GAAG,EAAE;AAAA,MACpB;AAAA,MAEA,CAAC,OAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,IAAI;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,SAAS;AAAA,cACP,mBAAmB;AAAA,YACrB;AAAA,UACF;AAAA,QACF;AAAA,QACA,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,SAAS,GAAG,OAAO,IAAI;AAAA,QACnD,WAAW,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK;AAAA,QAClD;AAAA;AAAA,QAEA,CAAC,OAAO,MAAM,YAAY,EAAzB,OAAO;AAAA,QACR,CAAC,OAAO,YAAY,+DAEpB,EAFC,OAAO;AAAA,QAGR,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,OAAO,IAExD,EAFC;AAAA,UAGD,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,aAAa,eAAe;AAAA,QACrD,EALC;AAAA,QAMD,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,
|
|
4
|
+
"sourcesContent": ["import { X } from '@tamagui/lucide-icons'\nimport {\n Adapt,\n Button,\n Dialog,\n Fieldset,\n H2,\n Input,\n Label,\n Paragraph,\n Sheet,\n TooltipSimple,\n Unspaced,\n YStack,\n} from 'tamagui'\n\nimport { SelectDemo } from './SelectDemo'\n\nexport function DialogDemo() {\n return (\n <Dialog modal>\n <Dialog.Trigger asChild>\n <Button>Edit Profile</Button>\n </Dialog.Trigger>\n\n <Adapt when=\"sm\" platform=\"touch\">\n <Sheet zIndex={200000} modal dismissOnSnapToBottom>\n <Sheet.Frame padding=\"$4\" space>\n <Adapt.Contents />\n </Sheet.Frame>\n <Sheet.Overlay />\n </Sheet>\n </Adapt>\n\n <Dialog.Portal>\n <Dialog.Overlay\n key=\"overlay\"\n animation=\"quick\"\n o={0.5}\n enterStyle={{ o: 0 }}\n exitStyle={{ o: 0 }}\n />\n\n <Dialog.Content\n bordered\n elevate\n key=\"content\"\n animation={[\n 'quick',\n {\n opacity: {\n overshootClamping: true,\n },\n },\n ]}\n enterStyle={{ x: 0, y: -20, opacity: 0, scale: 0.9 }}\n exitStyle={{ x: 0, y: 10, opacity: 0, scale: 0.95 }}\n space\n >\n <Dialog.Title>Edit profile</Dialog.Title>\n <Dialog.Description>\n Make changes to your profile here. Click save when you're done.\n </Dialog.Description>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"name\">\n Name\n </Label>\n <Input f={1} id=\"name\" defaultValue=\"Nate Wienert\" />\n </Fieldset>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"username\">\n <TooltipSimple label=\"Pick your favorite\" placement=\"bottom-start\">\n <Paragraph>Food</Paragraph>\n </TooltipSimple>\n </Label>\n <SelectDemo />\n </Fieldset>\n\n <YStack ai=\"flex-end\" mt=\"$2\">\n <Dialog.Close displayWhenAdapted asChild>\n <Button theme=\"alt1\" aria-label=\"Close\">\n Save changes\n </Button>\n </Dialog.Close>\n </YStack>\n\n <Unspaced>\n <Dialog.Close asChild>\n <Button pos=\"absolute\" t=\"$3\" r=\"$3\" size=\"$2\" circular icon={X} />\n </Dialog.Close>\n </Unspaced>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AAEpB,SAAS,aAAa;AAC3B,SACE,CAAC,OAAO;AAAA,IACN,CAAC,OAAO,QAAQ,QACd,CAAC,OAAO,YAAY,EAAnB,OACH,EAFC,OAAO;AAAA,IAIR,CAAC,MAAM,KAAK,KAAK,SAAS,QACxB,CAAC,MAAM,QAAQ,KAAQ,MAAM;AAAA,MAC3B,CAAC,MAAM,MAAM,QAAQ,KAAK,MACxB,CAAC,MAAM,SAAS,EAClB,EAFC,MAAM;AAAA,MAGP,CAAC,MAAM,QAAQ;AAAA,IACjB,EALC,MAMH,EAPC;AAAA,IASD,CAAC,OAAO;AAAA,MACN,CAAC,OAAO;AAAA,QACN,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,GAAG;AAAA,QACH,YAAY,EAAE,GAAG,EAAE;AAAA,QACnB,WAAW,EAAE,GAAG,EAAE;AAAA,MACpB;AAAA,MAEA,CAAC,OAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,IAAI;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,SAAS;AAAA,cACP,mBAAmB;AAAA,YACrB;AAAA,UACF;AAAA,QACF;AAAA,QACA,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,SAAS,GAAG,OAAO,IAAI;AAAA,QACnD,WAAW,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK;AAAA,QAClD;AAAA;AAAA,QAEA,CAAC,OAAO,MAAM,YAAY,EAAzB,OAAO;AAAA,QACR,CAAC,OAAO,YAAY,+DAEpB,EAFC,OAAO;AAAA,QAGR,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,OAAO,IAExD,EAFC;AAAA,UAGD,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,aAAa,eAAe;AAAA,QACrD,EALC;AAAA,QAMD,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,WAC/C,CAAC,cAAc,MAAM,qBAAqB,UAAU,eAClD,CAAC,UAAU,IAAI,EAAd,UACH,EAFC,cAGH,EAJC;AAAA,UAKD,CAAC,WAAW;AAAA,QACd,EAPC;AAAA,QASD,CAAC,OAAO,GAAG,WAAW,GAAG,KACvB,CAAC,OAAO,MAAM,mBAAmB,QAC/B,CAAC,OAAO,MAAM,OAAO,WAAW,QAAQ,YAExC,EAFC,OAGH,EAJC,OAAO,MAKV,EANC;AAAA,QAQD,CAAC,SACC,CAAC,OAAO,MAAM,QACZ,CAAC,OAAO,IAAI,WAAW,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,SAAS,MAAM,GAAG,EACnE,EAFC,OAAO,MAGV,EAJC;AAAA,MAKH,EAhDC,OAAO;AAAA,IAiDV,EA1DC,OAAO;AAAA,EA2DV,EAzEC;AA2EL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/DialogDemo.mjs
CHANGED
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
Fieldset,
|
|
7
7
|
Input,
|
|
8
8
|
Label,
|
|
9
|
+
Paragraph,
|
|
9
10
|
Sheet,
|
|
11
|
+
TooltipSimple,
|
|
10
12
|
Unspaced,
|
|
11
13
|
YStack
|
|
12
14
|
} from "tamagui";
|
|
@@ -49,11 +51,11 @@ function DialogDemo() {
|
|
|
49
51
|
<Input f={1} id="name" defaultValue="Nate Wienert" />
|
|
50
52
|
</Fieldset>
|
|
51
53
|
<Fieldset space="$4" horizontal>
|
|
52
|
-
<Label w={160} justifyContent="flex-end" htmlFor="username">Food</Label>
|
|
54
|
+
<Label w={160} justifyContent="flex-end" htmlFor="username"><TooltipSimple label="Pick your favorite" placement="bottom-start"><Paragraph>Food</Paragraph></TooltipSimple></Label>
|
|
53
55
|
<SelectDemo />
|
|
54
56
|
</Fieldset>
|
|
55
57
|
<YStack ai="flex-end" mt="$2"><Dialog.Close displayWhenAdapted asChild><Button theme="alt1" aria-label="Close">Save changes</Button></Dialog.Close></YStack>
|
|
56
|
-
<Unspaced><Dialog.Close asChild><Button pos="absolute" t="$
|
|
58
|
+
<Unspaced><Dialog.Close asChild><Button pos="absolute" t="$3" r="$3" size="$2" circular icon={X} /></Dialog.Close></Unspaced>
|
|
57
59
|
</Dialog.Content>
|
|
58
60
|
</Dialog.Portal>
|
|
59
61
|
</Dialog>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DialogDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { X } from '@tamagui/lucide-icons'\nimport {\n Adapt,\n Button,\n Dialog,\n Fieldset,\n H2,\n Input,\n Label,\n Sheet,\n Unspaced,\n YStack,\n} from 'tamagui'\n\nimport { SelectDemo } from './SelectDemo'\n\nexport function DialogDemo() {\n return (\n <Dialog modal>\n <Dialog.Trigger asChild>\n <Button>Edit Profile</Button>\n </Dialog.Trigger>\n\n <Adapt when=\"sm\" platform=\"touch\">\n <Sheet zIndex={200000} modal dismissOnSnapToBottom>\n <Sheet.Frame padding=\"$4\" space>\n <Adapt.Contents />\n </Sheet.Frame>\n <Sheet.Overlay />\n </Sheet>\n </Adapt>\n\n <Dialog.Portal>\n <Dialog.Overlay\n key=\"overlay\"\n animation=\"quick\"\n o={0.5}\n enterStyle={{ o: 0 }}\n exitStyle={{ o: 0 }}\n />\n\n <Dialog.Content\n bordered\n elevate\n key=\"content\"\n animation={[\n 'quick',\n {\n opacity: {\n overshootClamping: true,\n },\n },\n ]}\n enterStyle={{ x: 0, y: -20, opacity: 0, scale: 0.9 }}\n exitStyle={{ x: 0, y: 10, opacity: 0, scale: 0.95 }}\n space\n >\n <Dialog.Title>Edit profile</Dialog.Title>\n <Dialog.Description>\n Make changes to your profile here. Click save when you're done.\n </Dialog.Description>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"name\">\n Name\n </Label>\n <Input f={1} id=\"name\" defaultValue=\"Nate Wienert\" />\n </Fieldset>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"username\">\n
|
|
5
|
-
"mappings": "AAAA,SAAS,SAAS;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AAEpB,SAAS,aAAa;AAC3B,SACE,CAAC,OAAO;AAAA,IACN,CAAC,OAAO,QAAQ,QACd,CAAC,OAAO,YAAY,EAAnB,OACH,EAFC,OAAO;AAAA,IAIR,CAAC,MAAM,KAAK,KAAK,SAAS,QACxB,CAAC,MAAM,QAAQ,KAAQ,MAAM;AAAA,MAC3B,CAAC,MAAM,MAAM,QAAQ,KAAK,MACxB,CAAC,MAAM,SAAS,EAClB,EAFC,MAAM;AAAA,MAGP,CAAC,MAAM,QAAQ;AAAA,IACjB,EALC,MAMH,EAPC;AAAA,IASD,CAAC,OAAO;AAAA,MACN,CAAC,OAAO;AAAA,QACN,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,GAAG;AAAA,QACH,YAAY,EAAE,GAAG,EAAE;AAAA,QACnB,WAAW,EAAE,GAAG,EAAE;AAAA,MACpB;AAAA,MAEA,CAAC,OAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,IAAI;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,SAAS;AAAA,cACP,mBAAmB;AAAA,YACrB;AAAA,UACF;AAAA,QACF;AAAA,QACA,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,SAAS,GAAG,OAAO,IAAI;AAAA,QACnD,WAAW,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK;AAAA,QAClD;AAAA;AAAA,QAEA,CAAC,OAAO,MAAM,YAAY,EAAzB,OAAO;AAAA,QACR,CAAC,OAAO,YAAY,+DAEpB,EAFC,OAAO;AAAA,QAGR,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,OAAO,IAExD,EAFC;AAAA,UAGD,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,aAAa,eAAe;AAAA,QACrD,EALC;AAAA,QAMD,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,
|
|
4
|
+
"sourcesContent": ["import { X } from '@tamagui/lucide-icons'\nimport {\n Adapt,\n Button,\n Dialog,\n Fieldset,\n H2,\n Input,\n Label,\n Paragraph,\n Sheet,\n TooltipSimple,\n Unspaced,\n YStack,\n} from 'tamagui'\n\nimport { SelectDemo } from './SelectDemo'\n\nexport function DialogDemo() {\n return (\n <Dialog modal>\n <Dialog.Trigger asChild>\n <Button>Edit Profile</Button>\n </Dialog.Trigger>\n\n <Adapt when=\"sm\" platform=\"touch\">\n <Sheet zIndex={200000} modal dismissOnSnapToBottom>\n <Sheet.Frame padding=\"$4\" space>\n <Adapt.Contents />\n </Sheet.Frame>\n <Sheet.Overlay />\n </Sheet>\n </Adapt>\n\n <Dialog.Portal>\n <Dialog.Overlay\n key=\"overlay\"\n animation=\"quick\"\n o={0.5}\n enterStyle={{ o: 0 }}\n exitStyle={{ o: 0 }}\n />\n\n <Dialog.Content\n bordered\n elevate\n key=\"content\"\n animation={[\n 'quick',\n {\n opacity: {\n overshootClamping: true,\n },\n },\n ]}\n enterStyle={{ x: 0, y: -20, opacity: 0, scale: 0.9 }}\n exitStyle={{ x: 0, y: 10, opacity: 0, scale: 0.95 }}\n space\n >\n <Dialog.Title>Edit profile</Dialog.Title>\n <Dialog.Description>\n Make changes to your profile here. Click save when you're done.\n </Dialog.Description>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"name\">\n Name\n </Label>\n <Input f={1} id=\"name\" defaultValue=\"Nate Wienert\" />\n </Fieldset>\n <Fieldset space=\"$4\" horizontal>\n <Label w={160} justifyContent=\"flex-end\" htmlFor=\"username\">\n <TooltipSimple label=\"Pick your favorite\" placement=\"bottom-start\">\n <Paragraph>Food</Paragraph>\n </TooltipSimple>\n </Label>\n <SelectDemo />\n </Fieldset>\n\n <YStack ai=\"flex-end\" mt=\"$2\">\n <Dialog.Close displayWhenAdapted asChild>\n <Button theme=\"alt1\" aria-label=\"Close\">\n Save changes\n </Button>\n </Dialog.Close>\n </YStack>\n\n <Unspaced>\n <Dialog.Close asChild>\n <Button pos=\"absolute\" t=\"$3\" r=\"$3\" size=\"$2\" circular icon={X} />\n </Dialog.Close>\n </Unspaced>\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog>\n )\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAClB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kBAAkB;AAEpB,SAAS,aAAa;AAC3B,SACE,CAAC,OAAO;AAAA,IACN,CAAC,OAAO,QAAQ,QACd,CAAC,OAAO,YAAY,EAAnB,OACH,EAFC,OAAO;AAAA,IAIR,CAAC,MAAM,KAAK,KAAK,SAAS,QACxB,CAAC,MAAM,QAAQ,KAAQ,MAAM;AAAA,MAC3B,CAAC,MAAM,MAAM,QAAQ,KAAK,MACxB,CAAC,MAAM,SAAS,EAClB,EAFC,MAAM;AAAA,MAGP,CAAC,MAAM,QAAQ;AAAA,IACjB,EALC,MAMH,EAPC;AAAA,IASD,CAAC,OAAO;AAAA,MACN,CAAC,OAAO;AAAA,QACN,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,GAAG;AAAA,QACH,YAAY,EAAE,GAAG,EAAE;AAAA,QACnB,WAAW,EAAE,GAAG,EAAE;AAAA,MACpB;AAAA,MAEA,CAAC,OAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,IAAI;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,SAAS;AAAA,cACP,mBAAmB;AAAA,YACrB;AAAA,UACF;AAAA,QACF;AAAA,QACA,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,SAAS,GAAG,OAAO,IAAI;AAAA,QACnD,WAAW,EAAE,GAAG,GAAG,GAAG,IAAI,SAAS,GAAG,OAAO,KAAK;AAAA,QAClD;AAAA;AAAA,QAEA,CAAC,OAAO,MAAM,YAAY,EAAzB,OAAO;AAAA,QACR,CAAC,OAAO,YAAY,+DAEpB,EAFC,OAAO;AAAA,QAGR,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,OAAO,IAExD,EAFC;AAAA,UAGD,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,aAAa,eAAe;AAAA,QACrD,EALC;AAAA,QAMD,CAAC,SAAS,MAAM,KAAK;AAAA,UACnB,CAAC,MAAM,GAAG,KAAK,eAAe,WAAW,QAAQ,WAC/C,CAAC,cAAc,MAAM,qBAAqB,UAAU,eAClD,CAAC,UAAU,IAAI,EAAd,UACH,EAFC,cAGH,EAJC;AAAA,UAKD,CAAC,WAAW;AAAA,QACd,EAPC;AAAA,QASD,CAAC,OAAO,GAAG,WAAW,GAAG,KACvB,CAAC,OAAO,MAAM,mBAAmB,QAC/B,CAAC,OAAO,MAAM,OAAO,WAAW,QAAQ,YAExC,EAFC,OAGH,EAJC,OAAO,MAKV,EANC;AAAA,QAQD,CAAC,SACC,CAAC,OAAO,MAAM,QACZ,CAAC,OAAO,IAAI,WAAW,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,SAAS,MAAM,GAAG,EACnE,EAFC,OAAO,MAGV,EAJC;AAAA,MAKH,EAhDC,OAAO;AAAA,IAiDV,EA1DC,OAAO;AAAA,EA2DV,EAzEC;AA2EL;",
|
|
6
6
|
"names": []
|
|
7
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.0",
|
|
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.0",
|
|
33
|
+
"@tamagui/button": "^1.3.0",
|
|
34
|
+
"@tamagui/config-base": "^1.3.0",
|
|
35
|
+
"@tamagui/core": "^1.3.0",
|
|
36
|
+
"@tamagui/list-item": "^1.3.0",
|
|
37
|
+
"@tamagui/logo": "^1.3.0",
|
|
38
|
+
"@tamagui/menu": "^1.3.0",
|
|
39
|
+
"@tamagui/popover": "^1.3.0",
|
|
40
|
+
"@tamagui/progress": "^1.3.0",
|
|
41
|
+
"@tamagui/select": "^1.3.0",
|
|
42
|
+
"@tamagui/sheet": "^1.3.0",
|
|
43
|
+
"@tamagui/slider": "^1.3.0",
|
|
44
|
+
"@tamagui/stacks": "^1.3.0",
|
|
45
|
+
"tamagui": "^1.3.0"
|
|
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.0",
|
|
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/DialogDemo.tsx
CHANGED
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
H2,
|
|
8
8
|
Input,
|
|
9
9
|
Label,
|
|
10
|
+
Paragraph,
|
|
10
11
|
Sheet,
|
|
12
|
+
TooltipSimple,
|
|
11
13
|
Unspaced,
|
|
12
14
|
YStack,
|
|
13
15
|
} from 'tamagui'
|
|
@@ -67,7 +69,9 @@ export function DialogDemo() {
|
|
|
67
69
|
</Fieldset>
|
|
68
70
|
<Fieldset space="$4" horizontal>
|
|
69
71
|
<Label w={160} justifyContent="flex-end" htmlFor="username">
|
|
70
|
-
|
|
72
|
+
<TooltipSimple label="Pick your favorite" placement="bottom-start">
|
|
73
|
+
<Paragraph>Food</Paragraph>
|
|
74
|
+
</TooltipSimple>
|
|
71
75
|
</Label>
|
|
72
76
|
<SelectDemo />
|
|
73
77
|
</Fieldset>
|
|
@@ -82,7 +86,7 @@ export function DialogDemo() {
|
|
|
82
86
|
|
|
83
87
|
<Unspaced>
|
|
84
88
|
<Dialog.Close asChild>
|
|
85
|
-
<Button pos="absolute" t="$
|
|
89
|
+
<Button pos="absolute" t="$3" r="$3" size="$2" circular icon={X} />
|
|
86
90
|
</Dialog.Close>
|
|
87
91
|
</Unspaced>
|
|
88
92
|
</Dialog.Content>
|
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'
|