@modul/mbui 0.0.21 → 0.0.22-beta-pv-53283-6001789d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Checkbox = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = (0, tslib_1.__importStar)(require("react"));
6
+ const CheckboxPrimitive = (0, tslib_1.__importStar)(require("@radix-ui/react-checkbox"));
7
+ const utils_1 = require("../@/lib/utils");
8
+ const Icon_1 = require("../Icon");
9
+ const Checkbox = React.forwardRef(({ className, ...props }, ref) => (React.createElement(CheckboxPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("peer h-[16px] w-[14px] shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className), ...props },
10
+ React.createElement(CheckboxPrimitive.Indicator, { className: (0, utils_1.cn)("flex items-center justify-center text-current") },
11
+ React.createElement(Icon_1.Check, { className: "w-[16px] h-[16px] text-white" })))));
12
+ exports.Checkbox = Checkbox;
13
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
14
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;AACA,0DAA8B;AAC9B,yFAA6D;AAC7D,0CAAmC;AACnC,kCAA+B;AAE/B,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAG/B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,oBAAC,iBAAiB,CAAC,IAAI,IACrB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,UAAE,EACX,0TAA0T,EAC1T,SAAS,CACV,KACG,KAAK;IAET,oBAAC,iBAAiB,CAAC,SAAS,IAC1B,SAAS,EAAE,IAAA,UAAE,EAAC,+CAA+C,CAAC;QAE9D,oBAAC,YAAK,IAAC,SAAS,EAAC,8BAA8B,GAAG,CACtB,CACP,CAC1B,CAAC,CAAA;AAGO,4BAAQ;AAFjB,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ export { Checkbox } from './Checkbox';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Checkbox = void 0;
4
+ var Checkbox_1 = require("./Checkbox");
5
+ Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return Checkbox_1.Checkbox; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Checkbox/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
@@ -1,4 +1,4 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitives from "@radix-ui/react-switch";
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
3
3
  declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
4
  export { Switch };
@@ -7,10 +7,13 @@ const SwitchPrimitives = (0, tslib_1.__importStar)(require("@radix-ui/react-swit
7
7
  const utils_1 = require("../@/lib/utils");
8
8
  const rootClasses = `
9
9
  inline-flex
10
+ shrink-0
10
11
  items-center
11
- w-[32px]
12
- h-[18px]
13
- bg-light
12
+ w-[44px]
13
+ h-[24px]
14
+ bg-light
15
+ border-2
16
+ border-input
14
17
  shadow-sm
15
18
  rounded-full
16
19
  focus-visible:ring-2
@@ -18,27 +21,29 @@ const rootClasses = `
18
21
  focus-visible:ring-offset-2
19
22
  focus-visible:outline-none
20
23
  data-[state=checked]:bg-primary
24
+ data-[state=checked]:border-primary
21
25
  data-[state=unchecked]:bg-input
22
- disabled:cursor-not-allowed peer shrink-0
26
+ disabled:cursor-not-allowed
23
27
  disabled:opacity-50
24
- transition-colors cursor-pointer
28
+ transition-colors
29
+ cursor-pointer
30
+ [&+input]:hidden
25
31
  `;
26
32
  const ThumbClasses = `
27
- size-[18px]
33
+ size-[24px]
28
34
  border-2
29
35
  border-input
30
36
  bg-page
31
37
  shadow-md
32
38
  rounded-full
33
39
  ring-0
34
- data-[state=checked]:border-primary
35
- data-[state=checked]:translate-x-[14px]
36
- data-[state=unchecked]:translate-x-0
40
+ data-[state=checked]:border-white
41
+ data-[state=checked]:translate-x-[18px]
42
+ data-[state=unchecked]:-translate-x-[2px]
37
43
  transition-transform
38
44
  pointer-events-none
39
45
  `;
40
46
  const Switch = React.forwardRef(({ className, ...props }, ref) => (React.createElement(SwitchPrimitives.Root, { className: (0, utils_1.cn)(rootClasses, className), ...props, ref: ref },
41
- React.createElement("span", { className: "" }),
42
47
  React.createElement(SwitchPrimitives.Thumb, { className: ThumbClasses }))));
43
48
  exports.Switch = Switch;
44
49
  Switch.displayName = SwitchPrimitives.Root.displayName;
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":";;;;AACA,0DAA8B;AAC9B,sFAA0D;AAC1D,0CAAmC;AAEnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;CAiBnB,CAAA;AACD,MAAM,YAAY,GAAG;;;;;;;;;;;;;CAapB,CAAA;AAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,oBAAC,gBAAgB,CAAC,IAAI,IACpB,SAAS,EAAE,IAAA,UAAE,EAChB,WAAW,EACN,SAAS,CACV,KACG,KAAK,EACT,GAAG,EAAE,GAAG;IAEX,8BAAM,SAAS,EAAC,EAAE,GAAQ;IACvB,oBAAC,gBAAgB,CAAC,KAAK,IACrB,SAAS,EAAE,YAAY,GACvB,CACoB,CACzB,CAAC,CAAA;AAIO,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAA"}
1
+ {"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,sFAA0D;AAC1D,0CAAmC;AAEnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBnB,CAAA;AACD,MAAM,YAAY,GAAG;;;;;;;;;;;;;CAapB,CAAA;AAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,gBAAgB,CAAC,IAAI,IACrB,SAAS,EAAE,IAAA,UAAE,EAAC,WAAW,EAAE,SAAS,CAAC,KACjC,KAAK,EACT,GAAG,EAAE,GAAG;IAER,oBAAC,gBAAgB,CAAC,KAAK,IAAC,SAAS,EAAE,YAAY,GAAI,CAC5B,CACxB,CAAC,CAAA;AAIO,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAA"}
package/dist/index.d.ts CHANGED
@@ -30,4 +30,5 @@ import { FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription
30
30
  import { DigitKeyPad } from "./DigitKeyPad";
31
31
  import { Badge, badgeVariants } from './Badge';
32
32
  import { Toaster, toast } from './Toaster';
33
- export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, buttonVariants, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Progress, Alert, Switch, Label, Textarea, SelectAccountCard, SelectAccount, SelectAsync, Select, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, DatePicker, InputMask, AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, MessageTyping, FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses, Badge, badgeVariants, DigitKeyPad, ButtonWidget, Toaster, toast, };
33
+ import { Checkbox } from './Checkbox';
34
+ export { Tooltip, Tabs, Slider, Popover, Logo, InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, Collapsible, CollapsibleTrigger, CollapsibleContent, AccountCollapsible, AccountCollapsibleHeader, AccountCollapsibleTrigger, AccountCollapsibleContent, AccountCollapsibleContentItem, Button, buttonVariants, InputField, InputLabel, Audio, cn, Icon, Drawer, DrawerTrigger, DrawerTitle, DrawerClose, DrawerContent, BottomNavigation, BottomNavigationList, BottomNavigationListItem, BottomNavigationLink, Page, Chip, Progress, Alert, Switch, Label, Textarea, SelectAccountCard, SelectAccount, SelectAsync, Select, Form, FormLabel, FormField, FormItem, FormControl, FormDescription, FormMessage, Calendar, DatePicker, InputMask, AlertDialog, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, MessageTyping, FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription, farvoriteLinkClasses, Badge, badgeVariants, DigitKeyPad, ButtonWidget, Toaster, toast, Checkbox, };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FormDescription = exports.FormControl = exports.FormItem = exports.FormField = exports.FormLabel = exports.Form = exports.Select = exports.SelectAsync = exports.SelectAccount = exports.SelectAccountCard = exports.Textarea = exports.Label = exports.Switch = exports.Alert = exports.Progress = exports.Chip = exports.Page = exports.BottomNavigationLink = exports.BottomNavigationListItem = exports.BottomNavigationList = exports.BottomNavigation = exports.DrawerContent = exports.DrawerClose = exports.DrawerTitle = exports.DrawerTrigger = exports.Drawer = exports.Icon = exports.cn = exports.Audio = exports.InputLabel = exports.InputField = exports.buttonVariants = exports.Button = exports.AccountCollapsibleContentItem = exports.AccountCollapsibleContent = exports.AccountCollapsibleTrigger = exports.AccountCollapsibleHeader = exports.AccountCollapsible = exports.CollapsibleContent = exports.CollapsibleTrigger = exports.Collapsible = exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = exports.Logo = exports.Popover = exports.Slider = exports.Tabs = exports.Tooltip = void 0;
4
- exports.toast = exports.Toaster = exports.ButtonWidget = exports.DigitKeyPad = exports.badgeVariants = exports.Badge = exports.farvoriteLinkClasses = exports.FarvoritePaymentDescription = exports.FavoritePaymentsItem = exports.FavoritePaymentsList = exports.MessageTyping = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialog = exports.InputMask = exports.DatePicker = exports.Calendar = exports.FormMessage = void 0;
4
+ exports.Checkbox = exports.toast = exports.Toaster = exports.ButtonWidget = exports.DigitKeyPad = exports.badgeVariants = exports.Badge = exports.farvoriteLinkClasses = exports.FarvoritePaymentDescription = exports.FavoritePaymentsItem = exports.FavoritePaymentsList = exports.MessageTyping = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialog = exports.InputMask = exports.DatePicker = exports.Calendar = exports.FormMessage = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const Tooltip_1 = require("./Tooltip");
7
7
  Object.defineProperty(exports, "Tooltip", { enumerable: true, get: function () { return Tooltip_1.Tooltip; } });
@@ -109,4 +109,6 @@ Object.defineProperty(exports, "badgeVariants", { enumerable: true, get: functio
109
109
  const Toaster_1 = require("./Toaster");
110
110
  Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () { return Toaster_1.Toaster; } });
111
111
  Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return Toaster_1.toast; } });
112
+ const Checkbox_1 = require("./Checkbox");
113
+ Object.defineProperty(exports, "Checkbox", { enumerable: true, get: function () { return Checkbox_1.Checkbox; } });
112
114
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,uCAAmC;AAuDlC,wFAvDQ,iBAAO,OAuDR;AAtDR,iCAA6B;AAuD5B,qFAvDQ,WAAI,OAuDR;AAtDL,qCAAiC;AAuDhC,uFAvDQ,eAAM,OAuDR;AAtDP,uCAAmC;AAuDlC,wFAvDQ,iBAAO,OAuDR;AAtDR,+DAAyB;AAuDxB,eAvDM,cAAI,CAuDN;AAtDL,2CAAsF;AAuDrF,yFAvDQ,oBAAQ,OAuDR;AACR,8FAxDkB,yBAAa,OAwDlB;AACb,6FAzDiC,wBAAY,OAyDjC;AACZ,kGA1D+C,6BAAiB,OA0D/C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ACpB,qGAxE8B,sCAAoB,OAwE9B;AACpB,4GAzEoD,6CAA2B,OAyEpD;AAC3B,qGA1EiF,sCAAoB,OA0EjF;AAzErB,+CAA2C;AA4E1C,4FA5EQ,yBAAW,OA4ER;AA3EZ,mCAA8C;AAyE7C,sFAzEQ,aAAK,OAyER;AACL,8FA1Ee,qBAAa,OA0Ef;AAzEd,uCAA0C;AA4EzC,wFA5EQ,iBAAO,OA4ER;AACP,sFA7EiB,eAAK,OA6EjB;AA5EN,yCAAqC;AA6EpC,yFA7EQ,mBAAQ,OA6ER"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modul/mbui",
3
- "version": "0.0.21",
3
+ "version": "0.0.22-beta-pv-53283-6001789d",
4
4
  "packageManager": "yarn@3.5.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -24,6 +24,7 @@
24
24
  "@hookform/resolvers": "3.9.0",
25
25
  "@radix-ui/react-accordion": "^1.2.0",
26
26
  "@radix-ui/react-alert-dialog": "1.1.1",
27
+ "@radix-ui/react-checkbox": "1.1.2",
27
28
  "@radix-ui/react-collapsible": "1.1.0",
28
29
  "@radix-ui/react-dropdown-menu": "2.1.1",
29
30
  "@radix-ui/react-label": "2.1.0",
@@ -32,7 +33,7 @@
32
33
  "@radix-ui/react-select": "2.1.1",
33
34
  "@radix-ui/react-slider": "^1.2.0",
34
35
  "@radix-ui/react-slot": "1.1.0",
35
- "@radix-ui/react-switch": "1.1.0",
36
+ "@radix-ui/react-switch": "1.1.1",
36
37
  "@radix-ui/react-tabs": "^1.1.0",
37
38
  "@radix-ui/react-tooltip": "^1.1.2",
38
39
  "@types/lodash": "4.17.5",
@@ -0,0 +1,28 @@
1
+
2
+ import * as React from "react"
3
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
4
+ import { cn } from "../@/lib/utils"
5
+ import { Check } from '../Icon'
6
+
7
+ const Checkbox = React.forwardRef<
8
+ React.ElementRef<typeof CheckboxPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
10
+ >(({ className, ...props }, ref) => (
11
+ <CheckboxPrimitive.Root
12
+ ref={ref}
13
+ className={cn(
14
+ "peer h-[16px] w-[14px] shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
15
+ className
16
+ )}
17
+ {...props}
18
+ >
19
+ <CheckboxPrimitive.Indicator
20
+ className={cn("flex items-center justify-center text-current")}
21
+ >
22
+ <Check className="w-[16px] h-[16px] text-white" />
23
+ </CheckboxPrimitive.Indicator>
24
+ </CheckboxPrimitive.Root>
25
+ ))
26
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName
27
+
28
+ export { Checkbox }
@@ -0,0 +1 @@
1
+ export { Checkbox } from './Checkbox'
@@ -1,14 +1,16 @@
1
-
2
- import * as React from "react"
3
- import * as SwitchPrimitives from "@radix-ui/react-switch"
4
- import { cn } from "../@/lib/utils"
1
+ import * as React from 'react'
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch'
3
+ import { cn } from '../@/lib/utils'
5
4
 
6
5
  const rootClasses = `
7
6
  inline-flex
7
+ shrink-0
8
8
  items-center
9
- w-[32px]
10
- h-[18px]
11
- bg-light
9
+ w-[44px]
10
+ h-[24px]
11
+ bg-light
12
+ border-2
13
+ border-input
12
14
  shadow-sm
13
15
  rounded-full
14
16
  focus-visible:ring-2
@@ -16,43 +18,40 @@ const rootClasses = `
16
18
  focus-visible:ring-offset-2
17
19
  focus-visible:outline-none
18
20
  data-[state=checked]:bg-primary
21
+ data-[state=checked]:border-primary
19
22
  data-[state=unchecked]:bg-input
20
- disabled:cursor-not-allowed peer shrink-0
23
+ disabled:cursor-not-allowed
21
24
  disabled:opacity-50
22
- transition-colors cursor-pointer
25
+ transition-colors
26
+ cursor-pointer
27
+ [&+input]:hidden
23
28
  `
24
29
  const ThumbClasses = `
25
- size-[18px]
30
+ size-[24px]
26
31
  border-2
27
32
  border-input
28
33
  bg-page
29
34
  shadow-md
30
35
  rounded-full
31
36
  ring-0
32
- data-[state=checked]:border-primary
33
- data-[state=checked]:translate-x-[14px]
34
- data-[state=unchecked]:translate-x-0
37
+ data-[state=checked]:border-white
38
+ data-[state=checked]:translate-x-[18px]
39
+ data-[state=unchecked]:-translate-x-[2px]
35
40
  transition-transform
36
41
  pointer-events-none
37
42
  `
38
43
 
39
44
  const Switch = React.forwardRef<
40
- React.ElementRef<typeof SwitchPrimitives.Root>,
41
- React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
45
+ React.ElementRef<typeof SwitchPrimitives.Root>,
46
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
42
47
  >(({ className, ...props }, ref) => (
43
- <SwitchPrimitives.Root
44
- className={cn(
45
- rootClasses,
46
- className
47
- )}
48
- {...props}
49
- ref={ref}
50
- >
51
- <span className=""></span>
52
- <SwitchPrimitives.Thumb
53
- className={ThumbClasses}
54
- />
55
- </SwitchPrimitives.Root>
48
+ <SwitchPrimitives.Root
49
+ className={cn(rootClasses, className)}
50
+ {...props}
51
+ ref={ref}
52
+ >
53
+ <SwitchPrimitives.Thumb className={ThumbClasses} />
54
+ </SwitchPrimitives.Root>
56
55
  ))
57
56
 
58
57
  Switch.displayName = SwitchPrimitives.Root.displayName
package/src/index.ts CHANGED
@@ -51,6 +51,7 @@ import { FavoritePaymentsList, FavoritePaymentsItem, FarvoritePaymentDescription
51
51
  import { DigitKeyPad } from "./DigitKeyPad"
52
52
  import { Badge, badgeVariants } from './Badge'
53
53
  import { Toaster, toast } from './Toaster'
54
+ import { Checkbox } from './Checkbox'
54
55
 
55
56
  export {
56
57
  Tooltip,
@@ -127,4 +128,6 @@ export {
127
128
  ButtonWidget,
128
129
  Toaster,
129
130
  toast,
131
+ Checkbox,
132
+
130
133
  }