--------------------------------------------------------------------------------
/docs/webpack-runtime-28c7d89f58570c4f17a7.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(t){for(var n,a,u=t[0],i=t[1],f=t[2],s=0,l=[];s function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n\n
\n \n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/webpack.stats.json:
--------------------------------------------------------------------------------
1 | {"errors":[],"warnings":[],"namedChunkGroups":{"app":{"chunks":[9,8,0,1],"assets":["webpack-runtime-950e38aff32dfc4babdc.js","webpack-runtime-950e38aff32dfc4babdc.js.map","styles.2543ff947a193d7f33b1.css","styles-41a9f6aa338c835e034b.js","styles-41a9f6aa338c835e034b.js.map","commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","app-d0a47dca2b5d1b408c83.js","app-d0a47dca2b5d1b408c83.js.map"],"children":{},"childAssets":{}},"component---code-of-conduct-md":{"chunks":[0,2],"assets":["commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","component---code-of-conduct-md-d54928cb0bd0d43e52f3.js","component---code-of-conduct-md-d54928cb0bd0d43e52f3.js.map"],"children":{},"childAssets":{}},"component---srcdocs-theming-mdx":{"chunks":[0,6],"assets":["commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","component---srcdocs-theming-mdx-c292665b7998848ec7ec.js","component---srcdocs-theming-mdx-c292665b7998848ec7ec.js.map"],"children":{},"childAssets":{}},"component---srcdocs-upgrade-mdx":{"chunks":[0,7],"assets":["commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js","component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js.map"],"children":{},"childAssets":{}},"component---srcdocs-getstarted-mdx":{"chunks":[0,5],"assets":["commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","component---srcdocs-getstarted-mdx-9a40a16773f9a637c369.js","component---srcdocs-getstarted-mdx-9a40a16773f9a637c369.js.map"],"children":{},"childAssets":{}},"component---srcdocs-components-toggle-toggle-mdx":{"chunks":[0,4],"assets":["commons-f5facf3ce4d6402c14af.js","commons-f5facf3ce4d6402c14af.js.map","component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js","component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js.map"],"children":{},"childAssets":{}},"component---src-pages-404-js":{"chunks":[3],"assets":["component---src-pages-404-js-b251b15ff0df26ecccce.js","component---src-pages-404-js-b251b15ff0df26ecccce.js.map"],"children":{},"childAssets":{}}},"assetsByChunkName":{"app":["webpack-runtime-950e38aff32dfc4babdc.js","styles.2543ff947a193d7f33b1.css","styles-41a9f6aa338c835e034b.js","commons-f5facf3ce4d6402c14af.js","app-d0a47dca2b5d1b408c83.js"],"component---code-of-conduct-md":["commons-f5facf3ce4d6402c14af.js","component---code-of-conduct-md-d54928cb0bd0d43e52f3.js"],"component---srcdocs-theming-mdx":["commons-f5facf3ce4d6402c14af.js","component---srcdocs-theming-mdx-c292665b7998848ec7ec.js"],"component---srcdocs-upgrade-mdx":["commons-f5facf3ce4d6402c14af.js","component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js"],"component---srcdocs-getstarted-mdx":["commons-f5facf3ce4d6402c14af.js","component---srcdocs-getstarted-mdx-9a40a16773f9a637c369.js"],"component---srcdocs-components-toggle-toggle-mdx":["commons-f5facf3ce4d6402c14af.js","component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js"],"component---src-pages-404-js":["component---src-pages-404-js-b251b15ff0df26ecccce.js"]}}
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at giovambattista.fazioli@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/dist/components/Toggle/index.d.ts:
--------------------------------------------------------------------------------
1 | import React, { FunctionComponent } from "react";
2 | interface Props {
3 | /**
4 | * Addition CSS classes
5 | */
6 | className?: string;
7 | /**
8 | * Name of checkbox. You should alway assign a name
9 | *
10 | * @requires true
11 | */
12 | name?: string;
13 | /**
14 | * Value used when you'll post data
15 | *
16 | * @default
17 | */
18 | value?: string;
19 | /**
20 | * State of checked
21 | *
22 | * @default false
23 | */
24 | checked?: boolean;
25 | /**
26 | * Controls whether the checked prop is controlled (passed to the `checked` prop on input) or not (passed to the `defautlChecked` prop on input)
27 | *
28 | * @default false
29 | */
30 | controlled?: boolean;
31 | /**
32 | * Disable the toogle
33 | *
34 | * @default false
35 | */
36 | disabled?: boolean;
37 | /**
38 | * Trigged when the toggle change
39 | *
40 | * @param {React.ChangeEvent} e
41 | */
42 | onToggle?: (e: React.ChangeEvent) => void;
43 | /**
44 | * Trigged when the toggle is on the left.
45 | */
46 | onRight?: (e: React.ChangeEvent) => void;
47 | /**
48 | * Trigged when the toggle is on the right.
49 | */
50 | onLeft?: (e: React.ChangeEvent) => void;
51 | /**
52 | * Width of component
53 | */
54 | width?: string;
55 | /**
56 | * Height of component
57 | */
58 | height?: string;
59 | /**
60 | * Border width
61 | */
62 | borderWidth?: string;
63 | /**
64 | * Border color for both knob position. This props will override leftBorderColor and rightBorderColor props
65 | */
66 | borderColor?: string;
67 | /**
68 | * Border color when the knob is on the left (usually off)
69 | */
70 | leftBorderColor?: string;
71 | /**
72 | * Border color when the knob is on the right (usually on)
73 | */
74 | rightBorderColor?: string;
75 | /**
76 | * Background color for both knob position. This props will override leftBackgroundColor and rightBackgroundColor props
77 | */
78 | backgroundColor?: string;
79 | /**
80 | * Background color when the knob is on the left (usually off)
81 | */
82 | leftBackgroundColor?: string;
83 | /**
84 | * Background color when the knob is on the right (usually on)
85 | */
86 | rightBackgroundColor?: string;
87 | /**
88 | * Background color when the toggle is disabled
89 | */
90 | backgroundColorDisabled?: string;
91 | /**
92 | * Radius of container
93 | *
94 | */
95 | radius?: string;
96 | /**
97 | * Radius of gap
98 | */
99 | radiusBackground?: string;
100 | /**
101 | * Border radius of knob
102 | */
103 | knobRadius?: string;
104 | /**
105 | * Knob width
106 | */
107 | knobWidth?: string;
108 | /**
109 | * Knob height
110 | */
111 | knobHeight?: string;
112 | /**
113 | * Knob gap. It's the distance from the border/background
114 | */
115 | knobGap?: string;
116 | /**
117 | * Knob color for both knob position. This props will override the leftKnobColor and rightKnobColor
118 | */
119 | knobColor?: string;
120 | /**
121 | * Knob color when it's on the left (usually off)
122 | */
123 | leftKnobColor?: string;
124 | /**
125 | * Knob color when it's on the right (usually on)
126 | */
127 | rightKnobColor?: string;
128 | }
129 | declare const Toggle: FunctionComponent;
130 | export { Toggle as ToggleProps };
131 | declare const _default: React.ForwardRefExoticComponent>;
132 | export default _default;
133 |
--------------------------------------------------------------------------------
/srcdocs/theming.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | name: Theming
3 | route: /theming
4 | ---
5 | import { Playground, Props } from 'docz'
6 | import Toggle from '../src/components/Toggle'
7 | import ReactToggleThemeProvider from '../src/theme/'
8 |
9 | # Theming
10 |
11 | This new version allow to change the whole toggle appearance. Now you'll be able to change every single color and size, for each single toggle component of for the whole user interface.
12 |
13 | ## How change the toggle appearance
14 |
15 | You may change the toggle appearance in two way: by using the new props for each single instance of your toggle component, or by using a theme provider.
16 |
17 | ## New appearance props
18 |
19 | You may use the new props to change the appearance for a single instance of component
20 |
21 |
22 |
Change the background
23 |
24 |
25 |
26 |
27 |
Change the background when on
28 |
29 |
30 |
31 | Now you can also change others appearance properties
32 |
33 |
34 |
Change the shape
35 |
36 |
37 |
38 |
39 |
Change the width size
40 |
41 |
42 |
43 |
44 |
Change the height size
45 |
46 |
47 |
48 |
49 |
Change the knob size
50 |
51 |
52 |
53 |
54 | You can also change the size and the border
55 |
56 |
57 |
Change the border size
58 |
59 |
60 |
61 |
62 |
63 |
64 | Of course, you can set the knob gap
65 |
66 |
67 |
122 |
123 |
124 |
125 | As you can see from the above example, you don't need to write your own custome theme with all properties, you may override one or more properties.
--------------------------------------------------------------------------------
/docs/component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[7],{Fzxv:function(e,t,n){"use strict";n.r(t),n.d(t,"_frontmatter",(function(){return r})),n.d(t,"default",(function(){return c}));n("5hJT"),n("W1QL"),n("K/PF"),n("t91x"),n("75LO"),n("PJhk");var o=n("SAVP"),a=n("TjRS");n("aD51");function l(){return(l=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,["components"]);return Object(o.b)(i,l({},b,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h1",{id:"upgrade-guide"},"Upgrade Guide"),Object(o.b)("h2",{id:"upgrade-to-20-from-1x"},"Upgrade to 2.0 from 1.x"),Object(o.b)("p",null,"This version is not fully compatible with the previous 1.x versions. Anyway, you may update your code easly"),Object(o.b)("h2",{id:"labels"},"Labels"),Object(o.b)("p",null,"First of all, we've removed the props for the labels. You can upgrade your code by following"),Object(o.b)("pre",null,Object(o.b)("code",l({parentName:"pre"},{className:"language-jsx"}),'// previous v1.x\n\n\n// Left label from v2.x\n\n\n// Right label from v2.x\n\n')),Object(o.b)("h2",{id:"events"},"Events"),Object(o.b)("p",null,"The previous ",Object(o.b)("inlineCode",{parentName:"p"},"onChange")," event become ",Object(o.b)("inlineCode",{parentName:"p"},"onToggle")),Object(o.b)("pre",null,Object(o.b)("code",l({parentName:"pre"},{className:"language-jsx"}),'// previous v1.x\n console.log(e.target.checked)} />\n\n// from v2.x\n console.log(e.target.checked)} />\n')),Object(o.b)("p",null,"The new ",Object(o.b)("inlineCode",{parentName:"p"},"onToggle")," event, has got only one param, I mean, the standard ",Object(o.b)("inlineCode",{parentName:"p"},"event")," object.\nIn fact, you will be able to get all information about the toggle by using ",Object(o.b)("inlineCode",{parentName:"p"},"e.target")," as shown above."),Object(o.b)("p",null,"In addition, you may use the new ",Object(o.b)("inlineCode",{parentName:"p"},"onRight")," and ",Object(o.b)("inlineCode",{parentName:"p"},"onLeft")," events. They are trigged when the toggle is switched from the left to the right and vice versa. In short, when it's ",Object(o.b)("strong",{parentName:"p"},"on")," (usually) and ",Object(o.b)("strong",{parentName:"p"},"off")," (usually)."),Object(o.b)("pre",null,Object(o.b)("code",l({parentName:"pre"},{className:"language-jsx"}),'// from left to the right "on"\n console.log(e.target.name)} />\n\n// from right to the left "off"\n console.log(e.target.name)} />\n')),Object(o.b)("h2",{id:"mode-prop"},"Mode prop"),Object(o.b)("p",null,"Also the prop ",Object(o.b)("inlineCode",{parentName:"p"},"mode")," is no longer available. This because in the previous version the ",Object(o.b)("inlineCode",{parentName:"p"},'mode="switch"'),' was keeping the "on" and "off" appearance colours the same. Now, you can do the same by using the new props. See the ',Object(o.b)("a",l({parentName:"p"},{href:"/react-toggle/theming"}),"Theming")," section for more details."),Object(o.b)("h2",{id:"theme-prop"},"Theme prop"),Object(o.b)("p",null,"We have also removed the ",Object(o.b)("inlineCode",{parentName:"p"},"theme")," prop. Now, you'll be able to create any toggle theme by using the new props for the appearance and the theme provider. See the ",Object(o.b)("a",l({parentName:"p"},{href:"/react-toggle/theming"}),"Theming")," section for more details."))}c&&c===Object(c)&&Object.isExtensible(c)&&!c.hasOwnProperty("__filemeta")&&Object.defineProperty(c,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"srcdocs/upgrade.mdx"}}),c.isMDXComponent=!0}}]);
2 | //# sourceMappingURL=component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js.map
--------------------------------------------------------------------------------
/docs/component---srcdocs-components-toggle-toggle-mdx-bd8df1307efa34d15e59.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{OCol:function(e,o,t){"use strict";t.r(o),t.d(o,"_frontmatter",(function(){return b})),t.d(o,"default",(function(){return i}));t("5hJT"),t("W1QL"),t("K/PF"),t("t91x"),t("75LO"),t("PJhk");var l=t("SAVP"),a=t("TjRS"),n=t("ZFoC"),g=t("HUpa");t("aD51");function r(){return(r=Object.assign||function(e){for(var o=1;o=0||(a[t]=e[t]);return a}(e,["components"]);return Object(l.b)(p,r({},c,t,{components:o,mdxType:"MDXLayout"}),Object(l.b)("h1",{id:"toggle"},"Toggle"),Object(l.b)("p",null,"The Toggle component is an useful replacement to the standar input checkbox component.\nAnyway, remember that the toggle component is an extension of the input checkbox. So, you can use it inside a form as well.\nIn fact, remember to use the props ",Object(l.b)("inlineCode",{parentName:"p"},"name")," when you're using multiple toggle component in your view."),Object(l.b)("h2",{id:"basic-usage"},"Basic usage"),Object(l.b)("p",null,"You can wrap the Toggle component with ",Object(l.b)("inlineCode",{parentName:"p"},"label")),Object(l.b)(n.c,{__position:0,__code:'',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-1"},"Left label",Object(l.b)(g.a,{name:"toggle-1",mdxType:"Toggle"}))),Object(l.b)(n.c,{__position:1,__code:'',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-2"},Object(l.b)(g.a,{name:"toggle-2",mdxType:"Toggle"}),"Right label")),Object(l.b)("p",null,"Or set any ",Object(l.b)("inlineCode",{parentName:"p"},"label")," outside"),Object(l.b)(n.c,{__position:2,__code:'\n',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-1a"},"Left label outside"),Object(l.b)(g.a,{name:"toggle-1a",mdxType:"Toggle"})),Object(l.b)(n.c,{__position:3,__code:'\n',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)(g.a,{name:"toggle-2a",mdxType:"Toggle"}),Object(l.b)("label",{htmlFor:"toggle-2a"},"Right label outside")),Object(l.b)("h3",{id:"disable"},"Disable"),Object(l.b)(n.c,{__position:4,__code:'',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-3"},"Disabled",Object(l.b)(g.a,{name:"toggle-3",disabled:!0,mdxType:"Toggle"}))),Object(l.b)("h3",{id:"appearance"},"Appearance"),Object(l.b)(n.c,{__position:5,__code:'',__scope:{props:t,DefaultLayout:a.a,Playground:n.c,Props:n.d,Toggle:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-4"},Object(l.b)(g.a,{leftBackgroundColor:"tomato",rightBackgroundColor:"green",borderColor:"tomato",knobColor:"white",name:"toggle-4",onToggle:function(e){return console.log("onToggle",e.target.checked)},mdxType:"Toggle"}),"Appearance")),Object(l.b)("h2",{id:"props"},"Props"),Object(l.b)(n.d,{of:g.a,mdxType:"Props"}))}i&&i===Object(i)&&Object.isExtensible(i)&&!i.hasOwnProperty("__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"srcdocs/components/Toggle/toggle.mdx"}}),i.isMDXComponent=!0}}]);
2 | //# sourceMappingURL=component---srcdocs-components-toggle-toggle-mdx-bd8df1307efa34d15e59.js.map
--------------------------------------------------------------------------------
/docs/component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{OCol:function(e,o,t){"use strict";t.r(o),t.d(o,"_frontmatter",(function(){return b})),t.d(o,"default",(function(){return i}));t("5hJT"),t("W1QL"),t("K/PF"),t("t91x"),t("75LO"),t("PJhk");var l=t("SAVP"),n=t("TjRS"),a=t("ZFoC"),g=t("HUpa");t("aD51");function r(){return(r=Object.assign||function(e){for(var o=1;o=0||(n[t]=e[t]);return n}(e,["components"]);return Object(l.b)(p,r({},c,t,{components:o,mdxType:"MDXLayout"}),Object(l.b)("h1",{id:"toggle"},"Toggle"),Object(l.b)("p",null,"The Toggle component is an useful replacement to the standar input checkbox component.\nAnyway, remember that the toggle component is an extension of the input checkbox. So, you can use it inside a form as well.\nIn fact, remember to use the props ",Object(l.b)("inlineCode",{parentName:"p"},"name")," when you're using multiple toggle component in your view."),Object(l.b)("h2",{id:"basic-usage"},"Basic usage"),Object(l.b)("p",null,"You can wrap the Toggle component with ",Object(l.b)("inlineCode",{parentName:"p"},"label")),Object(l.b)(a.c,{__position:0,__code:'',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-1"},"Left label",Object(l.b)(g.b,{name:"toggle-1",mdxType:"Toggle"}))),Object(l.b)(a.c,{__position:1,__code:'',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-2"},Object(l.b)(g.b,{name:"toggle-2",mdxType:"Toggle"}),"Right label")),Object(l.b)("p",null,"Or set any ",Object(l.b)("inlineCode",{parentName:"p"},"label")," outside"),Object(l.b)(a.c,{__position:2,__code:'\n',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-1a"},"Left label outside"),Object(l.b)(g.b,{name:"toggle-1a",mdxType:"Toggle"})),Object(l.b)(a.c,{__position:3,__code:'\n',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)(g.b,{name:"toggle-2a",mdxType:"Toggle"}),Object(l.b)("label",{htmlFor:"toggle-2a"},"Right label outside")),Object(l.b)("h3",{id:"disable"},"Disable"),Object(l.b)(a.c,{__position:4,__code:'',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-3"},"Disabled",Object(l.b)(g.b,{name:"toggle-3",disabled:!0,mdxType:"Toggle"}))),Object(l.b)("h3",{id:"appearance"},"Appearance"),Object(l.b)(a.c,{__position:5,__code:'',__scope:{props:t,DefaultLayout:n.a,Playground:a.c,Props:a.d,Toggle:g.b,ToggleProps:g.a},mdxType:"Playground"},Object(l.b)("label",{htmlFor:"toggle-4"},Object(l.b)(g.b,{leftBackgroundColor:"tomato",rightBackgroundColor:"green",borderColor:"tomato",knobColor:"white",name:"toggle-4",onToggle:function(e){return console.log("onToggle",e.target.checked)},mdxType:"Toggle"}),"Appearance")),Object(l.b)("h2",{id:"properties"},"Properties"),Object(l.b)(a.d,{of:g.a,mdxType:"Props"}))}i&&i===Object(i)&&Object.isExtensible(i)&&!i.hasOwnProperty("__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"srcdocs/components/Toggle/toggle.mdx"}}),i.isMDXComponent=!0}}]);
2 | //# sourceMappingURL=component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js.map
--------------------------------------------------------------------------------
/dist/components/Toggle/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Toggle/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;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OAAO,EAAE,IAAI,GAAI,CACvB,CACd,CAAC;AACJ,CAAC,CAAC;AAEiB,6BAAW;AAC9B,kBAAe,kBAAU,CAAC,MAAM,CAAC,CAAC"}
--------------------------------------------------------------------------------
/docs/component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///../srcdocs/upgrade.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","isMDXComponent"],"mappings":"weAMO,IAAMA,EAAe,Q,qMAE5B,IAKMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,E,oIACF,mBACD,OAAO,YAACJ,EAAD,KAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAG5E,iBAAQ,CACN,GAAM,iBADR,iBAGA,iBAAQ,CACN,GAAM,yBADR,2BAGA,oIACA,iBAAQ,CACN,GAAM,UADR,UAGA,qHACA,uBAAK,sBAAMC,WAAW,OAAU,CAC5B,UAAa,iBADZ,6QAiBL,iBAAQ,CACN,GAAM,UADR,UAGA,qCAAoB,0BAAYA,WAAW,KAAvB,YAApB,iBAA0F,0BAAYA,WAAW,KAAvB,aAC1F,uBAAK,sBAAMA,WAAW,OAAU,CAC5B,UAAa,iBADZ,wMAQL,gCAAe,0BAAYA,WAAW,KAAvB,YAAf,wDAA4H,0BAAYA,WAAW,KAAvB,SAA5H,wFACyE,0BAAYA,WAAW,KAAvB,YADzE,oBAEA,yDAAwC,0BAAYA,WAAW,KAAvB,WAAxC,QAAoG,0BAAYA,WAAW,KAAvB,UAApG,wHAA+Q,sBAAQA,WAAW,KAAnB,MAA/Q,kBAAwU,sBAAQA,WAAW,KAAnB,OAAxU,eACA,uBAAK,sBAAMA,WAAW,OAAU,CAC5B,UAAa,iBADZ,mNAQL,iBAAQ,CACN,GAAM,aADR,aAGA,sCAAqB,0BAAYA,WAAW,KAAvB,QAArB,qEAA2I,0BAAYA,WAAW,KAAvB,iBAA3I,0HAA+T,mBAAGA,WAAW,KAAQ,CACjV,KAAQ,0BADmT,WAA/T,8BAGA,iBAAQ,CACN,GAAM,cADR,cAGA,iDAAgC,0BAAYA,WAAW,KAAvB,SAAhC,mIAAqN,mBAAGA,WAAW,KAAQ,CACvO,KAAQ,0BADyM,WAArN,+B,4LAOJJ,EAAWK,gBAAiB","file":"component---srcdocs-upgrade-mdx-c6eadf8f582d6cf92114.js","sourcesContent":["import React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/giovambattistafazioli/Lavori/Github/react-toggle/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n
{`Upgrade Guide`}
\n
{`Upgrade to 2.0 from 1.x`}
\n
{`This version is not fully compatible with the previous 1.x versions. Anyway, you may update your code easly`}
\n
{`Labels`}
\n
{`First of all, we've removed the props for the labels. You can upgrade your code by following`}
\n
{`// previous v1.x\n\n\n// Left label from v2.x\n\n\n// Right label from v2.x\n\n`}
\n
{`Events`}
\n
{`The previous `}{`onChange`}{` event become `}{`onToggle`}
\n
{`// previous v1.x\n console.log(e.target.checked)} />\n\n// from v2.x\n console.log(e.target.checked)} />\n`}
\n
{`The new `}{`onToggle`}{` event, has got only one param, I mean, the standard `}{`event`}{` object.\nIn fact, you will be able to get all information about the toggle by using `}{`e.target`}{` as shown above.`}
\n
{`In addition, you may use the new `}{`onRight`}{` and `}{`onLeft`}{` events. They are trigged when the toggle is switched from the left to the right and vice versa. In short, when it's `}{`on`}{` (usually) and `}{`off`}{` (usually).`}
\n
{`// from left to the right \"on\"\n console.log(e.target.name)} />\n\n// from right to the left \"off\"\n console.log(e.target.name)} />\n`}
\n
{`Mode prop`}
\n
{`Also the prop `}{`mode`}{` is no longer available. This because in the previous version the `}{`mode=\"switch\"`}{` was keeping the \"on\" and \"off\" appearance colours the same. Now, you can do the same by using the new props. See the `}{`Theming`}{` section for more details.`}
\n
{`Theme prop`}
\n
{`We have also removed the `}{`theme`}{` prop. Now, you'll be able to create any toggle theme by using the new props for the appearance and the theme provider. See the `}{`Theming`}{` section for more details.`}
\n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/component---code-of-conduct-md-d54928cb0bd0d43e52f3.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{qlK9:function(e,t,n){"use strict";n.r(t),n.d(t,"_frontmatter",(function(){return r})),n.d(t,"default",(function(){return l}));n("5hJT"),n("W1QL"),n("K/PF"),n("t91x"),n("75LO"),n("PJhk");var o=n("SAVP"),i=n("TjRS");n("aD51");function a(){return(a=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["components"]);return Object(o.b)(s,a({},c,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("h1",{id:"contributor-covenant-code-of-conduct"},"Contributor Covenant Code of Conduct"),Object(o.b)("h2",{id:"our-pledge"},"Our Pledge"),Object(o.b)("p",null,"In the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation."),Object(o.b)("h2",{id:"our-standards"},"Our Standards"),Object(o.b)("p",null,"Examples of behavior that contributes to creating a positive environment\ninclude:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Using welcoming and inclusive language"),Object(o.b)("li",{parentName:"ul"},"Being respectful of differing viewpoints and experiences"),Object(o.b)("li",{parentName:"ul"},"Gracefully accepting constructive criticism"),Object(o.b)("li",{parentName:"ul"},"Focusing on what is best for the community"),Object(o.b)("li",{parentName:"ul"},"Showing empathy towards other community members")),Object(o.b)("p",null,"Examples of unacceptable behavior by participants include:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"The use of sexualized language or imagery and unwelcome sexual attention or\nadvances"),Object(o.b)("li",{parentName:"ul"},"Trolling, insulting/derogatory comments, and personal or political attacks"),Object(o.b)("li",{parentName:"ul"},"Public or private harassment"),Object(o.b)("li",{parentName:"ul"},"Publishing others' private information, such as a physical or electronic\naddress, without explicit permission"),Object(o.b)("li",{parentName:"ul"},"Other conduct which could reasonably be considered inappropriate in a\nprofessional setting")),Object(o.b)("h2",{id:"our-responsibilities"},"Our Responsibilities"),Object(o.b)("p",null,"Project maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior."),Object(o.b)("p",null,"Project maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful."),Object(o.b)("h2",{id:"scope"},"Scope"),Object(o.b)("p",null,"This Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers."),Object(o.b)("h2",{id:"enforcement"},"Enforcement"),Object(o.b)("p",null,"Instances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at giovambattista.fazioli@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately."),Object(o.b)("p",null,"Project maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership."),Object(o.b)("h2",{id:"attribution"},"Attribution"),Object(o.b)("p",null,"This Code of Conduct is adapted from the ",Object(o.b)("a",a({parentName:"p"},{href:"https://www.contributor-covenant.org"}),"Contributor Covenant"),", version 1.4,\navailable at ",Object(o.b)("a",a({parentName:"p"},{href:"https://www.contributor-covenant.org/version/1/4/code-of-conduct.html"}),"https://www.contributor-covenant.org/version/1/4/code-of-conduct.html")),Object(o.b)("p",null,"For answers to common questions about this code of conduct, see\n",Object(o.b)("a",a({parentName:"p"},{href:"https://www.contributor-covenant.org/faq"}),"https://www.contributor-covenant.org/faq")))}l&&l===Object(l)&&Object.isExtensible(l)&&!l.hasOwnProperty("__filemeta")&&Object.defineProperty(l,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"CODE_OF_CONDUCT.md"}}),l.isMDXComponent=!0}}]);
2 | //# sourceMappingURL=component---code-of-conduct-md-d54928cb0bd0d43e52f3.js.map
--------------------------------------------------------------------------------
/docs/component---code-of-conduct-md-d54928cb0bd0d43e52f3.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///../CODE_OF_CONDUCT.md"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","isMDXComponent"],"mappings":"weAMO,IAAMA,EAAe,Q,oMAE5B,IAKMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,E,oIACF,mBACD,OAAO,YAACJ,EAAD,KAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAG5E,iBAAQ,CACN,GAAM,wCADR,wCAGA,iBAAQ,CACN,GAAM,cADR,cAGA,keAMA,iBAAQ,CACN,GAAM,iBADR,iBAGA,2GAEA,sBACE,kBAAIC,WAAW,MAAf,0CACA,kBAAIA,WAAW,MAAf,4DACA,kBAAIA,WAAW,MAAf,+CACA,kBAAIA,WAAW,MAAf,8CACA,kBAAIA,WAAW,MAAf,oDAEF,mFACA,sBACE,kBAAIA,WAAW,MAAf,yFAEA,kBAAIA,WAAW,MAAf,8EACA,kBAAIA,WAAW,MAAf,gCACA,kBAAIA,WAAW,MAAf,kHAEA,kBAAIA,WAAW,MAAf,gGAGF,iBAAQ,CACN,GAAM,wBADR,wBAGA,yOAGA,2WAKA,iBAAQ,CACN,GAAM,SADR,SAGA,4dAMA,iBAAQ,CACN,GAAM,eADR,eAGA,ofAMA,uNAGA,iBAAQ,CACN,GAAM,eADR,eAGA,iEAAgD,mBAAGA,WAAW,KAAQ,CAClE,KAAQ,yCADoC,wBAAhD,gCAGW,mBAAGA,WAAW,KAAQ,CAC7B,KAAQ,0EADD,0EAGX,yFACF,mBAAGA,WAAW,KAAQ,CAChB,KAAQ,6CADd,8C,2LAOFJ,EAAWK,gBAAiB","file":"component---code-of-conduct-md-d54928cb0bd0d43e52f3.js","sourcesContent":["import React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/giovambattistafazioli/Lavori/Github/react-toggle/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n
{`Contributor Covenant Code of Conduct`}
\n
{`Our Pledge`}
\n
{`In the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.`}
\n
{`Our Standards`}
\n
{`Examples of behavior that contributes to creating a positive environment\ninclude:`}
\n
\n
{`Using welcoming and inclusive language`}
\n
{`Being respectful of differing viewpoints and experiences`}
\n
{`Gracefully accepting constructive criticism`}
\n
{`Focusing on what is best for the community`}
\n
{`Showing empathy towards other community members`}
\n
\n
{`Examples of unacceptable behavior by participants include:`}
\n
\n
{`The use of sexualized language or imagery and unwelcome sexual attention or\nadvances`}
\n
{`Trolling, insulting/derogatory comments, and personal or political attacks`}
\n
{`Public or private harassment`}
\n
{`Publishing others' private information, such as a physical or electronic\naddress, without explicit permission`}
\n
{`Other conduct which could reasonably be considered inappropriate in a\nprofessional setting`}
\n
\n
{`Our Responsibilities`}
\n
{`Project maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.`}
\n
{`Project maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.`}
\n
{`Scope`}
\n
{`This Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.`}
\n
{`Enforcement`}
\n
{`Instances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at giovambattista.fazioli@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.`}
\n
{`Project maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.`}
\n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/component---srcdocs-components-toggle-toggle-mdx-bd8df1307efa34d15e59.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///../srcdocs/components/Toggle/toggle.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","__position","__code","__scope","Playground","Props","Toggle","htmlFor","name","disabled","leftBackgroundColor","rightBackgroundColor","borderColor","knobColor","onToggle","e","console","log","target","checked","of","isMDXComponent"],"mappings":"ggBAQO,IAAMA,EAAe,Q,sNAE5B,IAKMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,E,oIACF,mBACD,OAAO,YAACJ,EAAD,KAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAI5E,iBAAQ,CACN,GAAM,UADR,UAGA,gRAEiC,0BAAYC,WAAW,KAAvB,QAFjC,8DAGA,iBAAQ,CACN,GAAM,eADR,eAGA,+DAA8C,0BAAYA,WAAW,KAAvB,UAC9C,YAAC,IAAD,CAAYC,WAAY,EAAGC,OAAQ,mFAAwFC,QAAS,CAClIL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,qBAAOQ,QAAQ,YAAf,aAEE,YAAC,IAAD,CAAQC,KAAK,WAAWT,QAAQ,aAGhC,YAAC,IAAD,CAAYE,WAAY,EAAGC,OAAQ,oFAAyFC,QAAS,CACnIL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,qBAAOQ,QAAQ,YACb,YAAC,IAAD,CAAQC,KAAK,WAAWT,QAAQ,WADlC,gBAKE,mCAAkB,0BAAYC,WAAW,KAAvB,SAAlB,YACA,YAAC,IAAD,CAAYC,WAAY,EAAGC,OAAQ,qFAA0FC,QAAS,CACpIL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,qBAAOQ,QAAQ,aAAf,sBACA,YAAC,IAAD,CAAQC,KAAK,YAAYT,QAAQ,YAE/B,YAAC,IAAD,CAAYE,WAAY,EAAGC,OAAQ,sFAA2FC,QAAS,CACrIL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,YAAC,IAAD,CAAQS,KAAK,YAAYT,QAAQ,WACjC,qBAAOQ,QAAQ,aAAf,wBAEE,iBAAQ,CACN,GAAM,WADR,WAGA,YAAC,IAAD,CAAYN,WAAY,EAAGC,OAAQ,0FAA+FC,QAAS,CACzIL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,qBAAOQ,QAAQ,YAAf,WAEE,YAAC,IAAD,CAAQC,KAAK,WAAWC,UAAQ,EAACV,QAAQ,aAGzC,iBAAQ,CACN,GAAM,cADR,cAGA,YAAC,IAAD,CAAYE,WAAY,EAAGC,OAAQ,iRAA8RC,QAAS,CACxUL,QACAH,kBACAS,eACAC,UACAC,YACCP,QAAQ,cACb,qBAAOQ,QAAQ,YACb,YAAC,IAAD,CAAQG,oBAAoB,SAASC,qBAAqB,QAAQC,YAAY,SAASC,UAAU,QAAQL,KAAK,WAAWM,SAAU,SAAAC,GAAC,OAAIC,QAAQC,IAAI,WAAYF,EAAEG,OAAOC,UAAUpB,QAAQ,WAD7L,eAKE,iBAAQ,CACN,GAAM,SADR,SAGA,YAAC,IAAD,CAAOqB,GAAId,IAAQP,QAAQ,W,6MAK/BH,EAAWyB,gBAAiB","file":"component---srcdocs-components-toggle-toggle-mdx-bd8df1307efa34d15e59.js","sourcesContent":["import React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/giovambattistafazioli/Lavori/Github/react-toggle/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nimport { Playground, Props } from 'docz';\nimport Toggle from '../../../src/components/Toggle';\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n\n
{`Toggle`}
\n
{`The Toggle component is an useful replacement to the standar input checkbox component.\nAnyway, remember that the toggle component is an extension of the input checkbox. So, you can use it inside a form as well.\nIn fact, remember to use the props `}{`name`}{` when you're using multiple toggle component in your view.`}
\n
{`Basic usage`}
\n
{`You can wrap the Toggle component with `}{`label`}
\n \n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/component---srcdocs-components-toggle-toggle-mdx-9299f5eef9c8f4577218.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///../srcdocs/components/Toggle/toggle.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","parentName","__position","__code","__scope","Playground","Props","Toggle","ToggleProps","htmlFor","name","disabled","leftBackgroundColor","rightBackgroundColor","borderColor","knobColor","onToggle","e","console","log","target","checked","of","isMDXComponent"],"mappings":"ggBAQO,IAAMA,EAAe,Q,sNAE5B,IAKMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,E,oIACF,mBACD,OAAO,YAACJ,EAAD,KAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAI5E,iBAAQ,CACN,GAAM,UADR,UAGA,gRAEiC,0BAAYC,WAAW,KAAvB,QAFjC,8DAGA,iBAAQ,CACN,GAAM,eADR,eAGA,+DAA8C,0BAAYA,WAAW,KAAvB,UAC9C,YAAC,IAAD,CAAYC,WAAY,EAAGC,OAAQ,mFAAwFC,QAAS,CAClIL,QACAH,kBACAS,eACAC,UACAC,WACAC,iBACCR,QAAQ,cACb,qBAAOS,QAAQ,YAAf,aAEE,YAAC,IAAD,CAAQC,KAAK,WAAWV,QAAQ,aAGhC,YAAC,IAAD,CAAYE,WAAY,EAAGC,OAAQ,oFAAyFC,QAAS,CACnIL,QACAH,kBACAS,eACAC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ef9c8f4577218.js","sourcesContent":["import React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/giovambattistafazioli/Lavori/Github/react-toggle/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nimport { Playground, Props } from 'docz';\nimport Toggle, { ToggleProps } from '../../../src/components/Toggle';\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n\n
{`Toggle`}
\n
{`The Toggle component is an useful replacement to the standar input checkbox component.\nAnyway, remember that the toggle component is an extension of the input checkbox. So, you can use it inside a form as well.\nIn fact, remember to use the props `}{`name`}{` when you're using multiple toggle component in your view.`}
\n
{`Basic usage`}
\n
{`You can wrap the Toggle component with `}{`label`}
\n \n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/component---srcdocs-theming-mdx-60f180b0733ac7a3bc63.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"+jwX":function(e,o,n){"use strict";n.r(o),n.d(o,"_frontmatter",(function(){return d})),n.d(o,"default",(function(){return i}));n("5hJT"),n("W1QL"),n("K/PF"),n("t91x"),n("75LO"),n("PJhk");var t=n("SAVP"),a=n("TjRS"),r=n("ZFoC"),p=n("HUpa"),g=n("sr9g");n("aD51");function l(){return(l=Object.assign||function(e){for(var o=1;o=0||(a[n]=e[n]);return a}(e,["components"]);return Object(t.b)(c,l({},b,n,{components:o,mdxType:"MDXLayout"}),Object(t.b)("h1",{id:"theming"},"Theming"),Object(t.b)("p",null,"This new version allow to change the whole toggle appearance. Now you'll be able to change every single color and size, for each single toggle component of for the whole user interface."),Object(t.b)("h2",{id:"how-change-the-toggle-appearance"},"How change the toggle appearance"),Object(t.b)("p",null,"You may change the toggle appearance in two way: by using the new props for each single instance of your toggle component, or by using a theme provider."),Object(t.b)("h2",{id:"new-appearance-props"},"New appearance props"),Object(t.b)("p",null,"You may use the new props to change the appearance for a single instance of component"),Object(t.b)(r.c,{__position:0,__code:'
Change the background
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the background"),Object(t.b)(p.a,{name:"t-1",backgroundColor:"rgba(0,0,0,1)",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:1,__code:'
Change the background when on
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the background when on"),Object(t.b)(p.a,{name:"t-2",rightBackgroundColor:"tomato",mdxType:"Toggle"})),Object(t.b)("p",null,"Now you can also change others appearance properties"),Object(t.b)(r.c,{__position:2,__code:'
Change the shape
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the shape"),Object(t.b)(p.a,{name:"t-3",radius:"3px",radiusBackground:"2px",knobRadius:"2px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:3,__code:'
Change the width size
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the width size"),Object(t.b)(p.a,{name:"t-4",width:"128px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:4,__code:'
Change the height size
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the height size"),Object(t.b)(p.a,{name:"t-4h",height:"48px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:5,__code:'
Change the knob size
\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the knob size"),Object(t.b)(p.a,{name:"t-5",knobWidth:"8px",knobHeight:"8px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-6",radius:"3px",radiusBackground:"2px",knobRadius:"2px",width:"128px",knobWidth:"50px",mdxType:"Toggle"})),Object(t.b)("p",null,"You can also change the size and the border"),Object(t.b)(r.c,{__position:6,__code:'
Change the border size
\n\n\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the border size"),Object(t.b)(p.a,{name:"t-7",borderWidth:"1px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-8",borderWidth:"3px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-9",borderWidth:"5px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-10",borderWidth:"5px",knobWidth:"8px",knobHeight:"8px",mdxType:"Toggle"})),Object(t.b)("p",null,"Of course, you can set the knob gap"),Object(t.b)(r.c,{__position:7,__code:'
Change the border size
\n\n\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the border size"),Object(t.b)(p.a,{name:"t-11",borderWidth:"1px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-12",borderWidth:"3px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-13",borderWidth:"5px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-14",borderWidth:"5px",knobWidth:"8px",knobHeight:"8px",knobGap:"8px",mdxType:"Toggle"})),Object(t.b)("h2",{id:"theme-provider"},"Theme Provider"),Object(t.b)("p",null,"Instead of change every single props, you might use the ",Object(t.b)("inlineCode",{parentName:"p"},"ReactToggleThemeProvider")),Object(t.b)("pre",null,Object(t.b)("code",l({parentName:"pre"},{className:"language-jsx"}),'import {ReactToggleThemeProvider} from "react-toggle-component";\n')),Object(t.b)("p",null,"The current default theme is the following"),Object(t.b)("pre",null,Object(t.b)("code",l({parentName:"pre"},{className:"language-jsx"}),'export default {\n version: "1.0.0",\n width: "48px",\n height: "24px",\n\n borderWidth: "2px",\n borderColor: "#aaa",\n leftBorderColor: "#aaa",\n rightBorderColor: "#3887b7",\n\n leftBackgroundColor : "#fff",\n rightBackgroundColor : "#fff",\n backgroundColorDisabled : "#eee",\n\n radius : "256px",\n radiusBackground : "256px",\n knobRadius : "100%",\n\n knobWidth : "16px",\n knobHeight : "16px",\n knobGap: "4px",\n\n knobColor: "#aaa",\n leftKnobColor: "#aaa",\n rightKnobColor: "#3887b7",\n};\n')),Object(t.b)(r.c,{__position:8,__code:'\n
\n
All toggle children will use the same theme
\n \n \n \n \n
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.a,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)(g.a,{theme:{leftBackgroundColor:"tomato"},mdxType:"ReactToggleThemeProvider"},Object(t.b)("div",null,Object(t.b)("p",null,"All toggle children will use the same theme"),Object(t.b)(p.a,{name:"t-p1",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-p2",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-p3",mdxType:"Toggle"}),Object(t.b)(p.a,{name:"t-p4",mdxType:"Toggle"})))),Object(t.b)("p",null,"As you can see from the above example, you don't need to write your own custome theme with all properties, you may override one or more properties."))}i&&i===Object(i)&&Object.isExtensible(i)&&!i.hasOwnProperty("__filemeta")&&Object.defineProperty(i,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"srcdocs/theming.mdx"}}),i.isMDXComponent=!0}}]);
2 | //# sourceMappingURL=component---srcdocs-theming-mdx-60f180b0733ac7a3bc63.js.map
--------------------------------------------------------------------------------
/docs/component---srcdocs-theming-mdx-c292665b7998848ec7ec.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[6],{"+jwX":function(e,o,n){"use strict";n.r(o),n.d(o,"_frontmatter",(function(){return l})),n.d(o,"default",(function(){return i}));n("5hJT"),n("W1QL"),n("K/PF"),n("t91x"),n("75LO"),n("PJhk");var t=n("SAVP"),a=n("TjRS"),r=n("ZFoC"),p=n("HUpa"),g=n("sr9g");n("aD51");function b(){return(b=Object.assign||function(e){for(var o=1;o=0||(a[n]=e[n]);return a}(e,["components"]);return Object(t.b)(c,b({},d,n,{components:o,mdxType:"MDXLayout"}),Object(t.b)("h1",{id:"theming"},"Theming"),Object(t.b)("p",null,"This new version allow to change the whole toggle appearance. Now you'll be able to change every single color and size, for each single toggle component of for the whole user interface."),Object(t.b)("h2",{id:"how-change-the-toggle-appearance"},"How change the toggle appearance"),Object(t.b)("p",null,"You may change the toggle appearance in two way: by using the new props for each single instance of your toggle component, or by using a theme provider."),Object(t.b)("h2",{id:"new-appearance-props"},"New appearance props"),Object(t.b)("p",null,"You may use the new props to change the appearance for a single instance of component"),Object(t.b)(r.c,{__position:0,__code:'
Change the background
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the background"),Object(t.b)(p.b,{name:"t-1",backgroundColor:"rgba(0,0,0,1)",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:1,__code:'
Change the background when on
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the background when on"),Object(t.b)(p.b,{name:"t-2",rightBackgroundColor:"tomato",mdxType:"Toggle"})),Object(t.b)("p",null,"Now you can also change others appearance properties"),Object(t.b)(r.c,{__position:2,__code:'
Change the shape
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the shape"),Object(t.b)(p.b,{name:"t-3",radius:"3px",radiusBackground:"2px",knobRadius:"2px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:3,__code:'
Change the width size
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the width size"),Object(t.b)(p.b,{name:"t-4",width:"128px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:4,__code:'
Change the height size
\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the height size"),Object(t.b)(p.b,{name:"t-4h",height:"48px",mdxType:"Toggle"})),Object(t.b)(r.c,{__position:5,__code:'
Change the knob size
\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the knob size"),Object(t.b)(p.b,{name:"t-5",knobWidth:"8px",knobHeight:"8px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-6",radius:"3px",radiusBackground:"2px",knobRadius:"2px",width:"128px",knobWidth:"50px",mdxType:"Toggle"})),Object(t.b)("p",null,"You can also change the size and the border"),Object(t.b)(r.c,{__position:6,__code:'
Change the border size
\n\n\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the border size"),Object(t.b)(p.b,{name:"t-7",borderWidth:"1px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-8",borderWidth:"3px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-9",borderWidth:"5px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-10",borderWidth:"5px",knobWidth:"8px",knobHeight:"8px",mdxType:"Toggle"})),Object(t.b)("p",null,"Of course, you can set the knob gap"),Object(t.b)(r.c,{__position:7,__code:'
Change the border size
\n\n\n\n',__scope:{props:n,DefaultLayout:a.a,Playground:r.c,Props:r.d,Toggle:p.b,ReactToggleThemeProvider:g.a},mdxType:"Playground"},Object(t.b)("p",null,"Change the border size"),Object(t.b)(p.b,{name:"t-11",borderWidth:"1px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-12",borderWidth:"3px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-13",borderWidth:"5px",knobGap:"8px",mdxType:"Toggle"}),Object(t.b)(p.b,{name:"t-14",borderWidth:"5px",knobWidth:"8px",knobHeight:"8px",knobGap:"8px",mdxType:"Toggle"})),Object(t.b)("h2",{id:"theme-provider"},"Theme Provider"),Object(t.b)("p",null,"Instead of change every single props, you might use the ",Object(t.b)("inlineCode",{parentName:"p"},"ReactToggleThemeProvider")),Object(t.b)("pre",null,Object(t.b)("code",b({parentName:"pre"},{className:"language-jsx"}),'import {ReactToggleThemeProvider} from "react-toggle-component";\n')),Object(t.b)("p",null,"The current default theme is the following"),Object(t.b)("pre",null,Object(t.b)("code",b({parentName:"pre"},{className:"language-jsx"}),'export default {\n version: "1.0.0",\n width: "48px",\n height: "24px",\n\n borderWidth: "2px",\n borderColor: "#aaa",\n leftBorderColor: "#aaa",\n rightBorderColor: "#3887b7",\n\n leftBackgroundColor : "#fff",\n rightBackgroundColor : "#fff",\n backgroundColorDisabled : "#eee",\n\n radius : "256px",\n radiusBackground : "256px",\n knobRadius : "100%",\n\n knobWidth : "16px",\n knobHeight : "16px",\n knobGap: "4px",\n\n knobColor: "#aaa",\n leftKnobColor: "#aaa",\n rightKnobColor: "#3887b7",\n};\n')),Object(t.b)(r.c,{__position:8,__code:'\n
{`This new version allow to change the whole toggle appearance. Now you'll be able to change every single color and size, for each single toggle component of for the whole user interface.`}
\n
{`How change the toggle appearance`}
\n
{`You may change the toggle appearance in two way: by using the new props for each single instance of your toggle component, or by using a theme provider.`}
\n
{`New appearance props`}
\n
{`You may use the new props to change the appearance for a single instance of component`}
{`As you can see from the above example, you don't need to write your own custome theme with all properties, you may override one or more properties.`}
\n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/component---srcdocs-theming-mdx-c292665b7998848ec7ec.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///../srcdocs/theming.mdx"],"names":["_frontmatter","layoutProps","MDXLayout","DefaultLayout","MDXContent","components","props","mdxType","__position","__code","__scope","Playground","Props","Toggle","ReactToggleThemeProvider","name","backgroundColor","rightBackgroundColor","radius","radiusBackground","knobRadius","width","height","knobWidth","knobHeight","borderWidth","knobGap","parentName","theme","leftBackgroundColor","isMDXComponent"],"mappings":"8gBASO,IAAMA,EAAe,Q,qMAE5B,IAKMC,EAAc,CAClBD,gBAEIE,EAAYC,IACH,SAASC,EAAT,GAGZ,IAFDC,EAEC,EAFDA,WACGC,E,oIACF,mBACD,OAAO,YAACJ,EAAD,KAAeD,EAAiBK,EAAhC,CAAuCD,WAAYA,EAAYE,QAAQ,cAI5E,iBAAQ,CACN,GAAM,WADR,WAGA,kNACA,iBAAQ,CACN,GAAM,oCADR,oCAGA,iLACA,iBAAQ,CACN,GAAM,wBADR,wBAGA,8GACA,YAAC,IAAD,CAAYC,WAAY,EAAGC,OAAQ,sFAA2FC,QAAS,CACrIJ,QACAH,kBACAQ,eACAC,UACAC,WACAC,8BACCP,QAAQ,cACb,8CACA,YAAC,IAAD,CAAQQ,KAAK,MAAMC,gBAAgB,gBAAgBT,QAAQ,YAEzD,YAAC,IAAD,CAAYC,WAAY,EAAGC,OAAQ,4FAAiGC,QAAS,CAC3IJ,QACAH,kBACAQ,eACAC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BAAiB","file":"component---srcdocs-theming-mdx-c292665b7998848ec7ec.js","sourcesContent":["import React from 'react'\n /* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nimport DefaultLayout from \"/Users/giovambattistafazioli/Lavori/Github/react-toggle/node_modules/gatsby-theme-docz/src/base/Layout.js\";\nimport { Playground, Props } from 'docz';\nimport Toggle from '../src/components/Toggle';\nimport ReactToggleThemeProvider from '../src/theme/';\nexport const _frontmatter = {};\n\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n return ;\n};\n\nconst layoutProps = {\n _frontmatter\n};\nconst MDXLayout = DefaultLayout;\nexport default function MDXContent({\n components,\n ...props\n}) {\n return \n\n\n\n
{`Theming`}
\n
{`This new version allow to change the whole toggle appearance. Now you'll be able to change every single color and size, for each single toggle component of for the whole user interface.`}
\n
{`How change the toggle appearance`}
\n
{`You may change the toggle appearance in two way: by using the new props for each single instance of your toggle component, or by using a theme provider.`}
\n
{`New appearance props`}
\n
{`You may use the new props to change the appearance for a single instance of component`}
{`As you can see from the above example, you don't need to write your own custome theme with all properties, you may override one or more properties.`}
\n\n ;\n}\n;\nMDXContent.isMDXComponent = true;\n "],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/webpack-runtime-28c7d89f58570c4f17a7.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","9","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAQtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS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C,EAAQ,IAAKA,GAC5BA,GAIR/C,EAAoBgD,EAAI,SAASgB,EAAQC,GAAY,OAAOnF,OAAOC,UAAUC,eAAeC,KAAK+E,EAAQC,IAGzGjE,EAAoBuB,EAAI,iBAGxBvB,EAAoBkE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,OAAqB,aAAIA,OAAqB,cAAK,GAChEC,EAAmBF,EAAWlF,KAAK2E,KAAKO,GAC5CA,EAAWlF,KAAOf,EAClBiG,EAAaA,EAAWG,QACxB,IAAI,IAAI7F,EAAI,EAAGA,EAAI0F,EAAWxF,OAAQF,IAAKP,EAAqBiG,EAAW1F,IAC3E,IAAIU,EAAsBkF,EAI1B9E,I","file":"webpack-runtime-28c7d89f58570c4f17a7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t9: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"2\":\"component---code-of-conduct-md\",\"3\":\"component---src-pages-404-js\",\"4\":\"component---srcdocs-components-toggle-toggle-mdx\",\"5\":\"component---srcdocs-getstarted-mdx\",\"6\":\"component---srcdocs-theming-mdx\",\"7\":\"component---srcdocs-upgrade-mdx\"}[chunkId]||chunkId) + \"-\" + {\"2\":\"d54928cb0bd0d43e52f3\",\"3\":\"b251b15ff0df26ecccce\",\"4\":\"bd8df1307efa34d15e59\",\"5\":\"9a40a16773f9a637c369\",\"6\":\"60f180b0733ac7a3bc63\",\"7\":\"c6eadf8f582d6cf92114\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/react-toggle/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/webpack-runtime-950e38aff32dfc4babdc.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","9","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrBiB,EAAG,GAGAZ,EAAkB,GAQtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU8B,QAGnC,IAAIC,EAASH,EAAiB5B,GAAY,CACzCK,EAAGL,EACHgC,GAAG,EACHF,QAAS,IAUV,OANAhB,EAAQd,GAAUW,KAAKoB,EAAOD,QAASC,E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ASgB,EAAQC,GAAY,OAAOnF,OAAOC,UAAUC,eAAeC,KAAK+E,EAAQC,IAGzGjE,EAAoBuB,EAAI,iBAGxBvB,EAAoBkE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,OAAqB,aAAIA,OAAqB,cAAK,GAChEC,EAAmBF,EAAWlF,KAAK2E,KAAKO,GAC5CA,EAAWlF,KAAOf,EAClBiG,EAAaA,EAAWG,QACxB,IAAI,IAAI7F,EAAI,EAAGA,EAAI0F,EAAWxF,OAAQF,IAAKP,EAAqBiG,EAAW1F,IAC3E,IAAIU,EAAsBkF,EAI1B9E,I","file":"webpack-runtime-950e38aff32dfc4babdc.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t9: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"2\":\"component---code-of-conduct-md\",\"3\":\"component---src-pages-404-js\",\"4\":\"component---srcdocs-components-toggle-toggle-mdx\",\"5\":\"component---srcdocs-getstarted-mdx\",\"6\":\"component---srcdocs-theming-mdx\",\"7\":\"component---srcdocs-upgrade-mdx\"}[chunkId]||chunkId) + \"-\" + {\"2\":\"d54928cb0bd0d43e52f3\",\"3\":\"b251b15ff0df26ecccce\",\"4\":\"9299f5eef9c8f4577218\",\"5\":\"9a40a16773f9a637c369\",\"6\":\"c292665b7998848ec7ec\",\"7\":\"c6eadf8f582d6cf92114\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/react-toggle/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | Get Started | React Toggle