@kvell-group/ui 1.12.19 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ import './assets/Input.css';const s = "_input_1d20c_1", t = "_section_1d20c_19", c = "_label_1d20c_24", e = "_error_1d20c_28", n = {
2
+ input: s,
3
+ section: t,
4
+ label: c,
5
+ error: e
6
+ };
7
+ export {
8
+ n as b
9
+ };
@@ -0,0 +1 @@
1
+ ._track_h9xnu_1{--switch-height: 1rem;--switch-width: calc(1.75rem * var(--mantine-scale));--switch-color: var(--mantine-color-background-toggle-active-0)}input:not(:checked)+._track_h9xnu_1{background-color:var(--mantine-color-background-toggle-default-0)}._description_h9xnu_11{margin-top:-1px;--label-offset-start: 1rem;color:var(--mantine-color-primary)}._error_h9xnu_17{color:var(--mantine-color-text-status-destructive-0);padding-left:.25rem;margin-top:0}._error_h9xnu_17:before{content:url("data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.50001%2014.6666C4.81801%2014.6666%201.83334%2011.6819%201.83334%207.99992C1.83334%204.31792%204.81801%201.33325%208.50001%201.33325C12.182%201.33325%2015.1667%204.31792%2015.1667%207.99992C15.1667%2011.6819%2012.182%2014.6666%208.50001%2014.6666ZM8.50001%2013.3333C9.9145%2013.3333%2011.2711%2012.7713%2012.2712%2011.7712C13.2714%2010.771%2013.8333%209.41441%2013.8333%207.99992C13.8333%206.58543%2013.2714%205.22888%2012.2712%204.22868C11.2711%203.22849%209.9145%202.66659%208.50001%202.66659C7.08552%202.66659%205.72897%203.22849%204.72877%204.22868C3.72858%205.22888%203.16668%206.58543%203.16668%207.99992C3.16668%209.41441%203.72858%2010.771%204.72877%2011.7712C5.72897%2012.7713%207.08552%2013.3333%208.50001%2013.3333ZM7.83334%204.66659H9.16668V5.99992H7.83334V4.66659ZM7.83334%207.33325H9.16668V11.3333H7.83334V7.33325Z'%20fill='currentColor'%20style='fill:%23E6483D;fill:color(display-p3%200.9020%200.2824%200.2392);fill-opacity:1;'/%3e%3c/svg%3e");position:relative;top:3px;left:-.25rem}
@@ -0,0 +1,16 @@
1
+ function a(r) {
2
+ var f, n, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (f = 0; f < o; f++) r[f] && (n = a(r[f])) && (t && (t += " "), t += n);
7
+ } else for (n in r) r[n] && (t && (t += " "), t += n);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, f, n = 0, t = "", o = arguments.length; n < o; n++) (r = arguments[n]) && (f = a(r)) && (t && (t += " "), t += f);
12
+ return t;
13
+ }
14
+ export {
15
+ i as c
16
+ };
@@ -1,20 +1,21 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { MaskedInput as o } from "../MaskedInput/MaskedInput.js";
3
- import { c as m, b as r } from "../../../clsx-oLHujfaf.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { MaskedInput as a } from "../MaskedInput/MaskedInput.js";
3
+ import { b as m } from "../../../Input.module-CPh0cNNI.js";
4
+ import { c as r } from "../../../clsx-OuTLNxxd.js";
4
5
  import { forwardRef as p } from "react";
5
6
  import { CARD_CVV_MASK as n } from "../../../constants/masks.js";
6
- import { IMask as e } from "react-imask";
7
- import '../../../assets/CvvInput.css';const i = "_input_17dgl_9", c = {
8
- input: i
9
- }, { input: u, ...f } = r, l = m(u, c.input), C = e.createMask({ mask: n }), x = p((s, t) => /* @__PURE__ */ a(
10
- o,
7
+ import { IMask as i } from "react-imask";
8
+ import '../../../assets/CvvInput.css';const e = "_input_17dgl_9", c = {
9
+ input: e
10
+ }, { input: f, ...u } = m, l = r(f, c.input), C = i.createMask({ mask: n }), b = p((s, t) => /* @__PURE__ */ o(
11
+ a,
11
12
  {
12
13
  ref: t,
13
14
  ...s,
14
15
  mask: C,
15
- classNames: { ...f, input: l }
16
+ classNames: { ...u, input: l }
16
17
  }
17
18
  ));
18
19
  export {
19
- x as CvvInput
20
+ b as CvvInput
20
21
  };
@@ -1,8 +1,9 @@
1
- import { TextInput as t } from "@mantine/core";
2
- import { c as s, b as o } from "../../clsx-oLHujfaf.js";
1
+ import { TextInput as o } from "@mantine/core";
2
+ import { b as t } from "../../Input.module-CPh0cNNI.js";
3
3
  import { c as a } from "../../typography.module-krUfTmwf.js";
4
- import { CAPTION_L_REGULAR_FONT_VARIANT as e } from "../../constants/font-variants.js";
5
- const { input: m, error: p, ...n } = o, r = a[e], c = s(m, r), i = s(p, r), I = t.withProps({
4
+ import { c as s } from "../../clsx-OuTLNxxd.js";
5
+ import { CAPTION_L_REGULAR_FONT_VARIANT as m } from "../../constants/font-variants.js";
6
+ const { input: e, error: p, ...n } = t, r = a[m], c = s(e, r), i = s(p, r), I = o.withProps({
6
7
  classNames: { ...n, input: c, error: i }
7
8
  });
8
9
  export {
@@ -1,10 +1,11 @@
1
1
  import { PasswordInput as t } from "@mantine/core";
2
- import { c as s, b as a } from "../../../clsx-oLHujfaf.js";
3
- import { c as r } from "../../../typography.module-krUfTmwf.js";
2
+ import { b as r } from "../../../Input.module-CPh0cNNI.js";
3
+ import { c as a } from "../../../typography.module-krUfTmwf.js";
4
+ import { c as s } from "../../../clsx-OuTLNxxd.js";
4
5
  import { CAPTION_L_REGULAR_FONT_VARIANT as e } from "../../../constants/font-variants.js";
5
6
  import '../../../assets/PasswordInput.css';const n = "_section_1lzoc_1", c = {
6
7
  section: n
7
- }, { input: i, error: m, ...p } = a, o = r[e], l = s(i, o), N = s(m, o), P = t.withProps({
8
+ }, { input: m, error: i, ...p } = r, o = a[e], l = s(m, o), N = s(i, o), P = t.withProps({
8
9
  classNames: {
9
10
  ...p,
10
11
  input: l,
@@ -0,0 +1,4 @@
1
+ export declare const Switch: import('react').ForwardRefExoticComponent<import('@mantine/core').SwitchProps & import('react').RefAttributes<HTMLInputElement> & {
2
+ component?: any;
3
+ renderRoot?: (props: Record<string, any>) => React.ReactNode;
4
+ }>;
@@ -0,0 +1,18 @@
1
+ import { Switch as r } from "@mantine/core";
2
+ import { c as o } from "../../typography.module-krUfTmwf.js";
3
+ import { c } from "../../clsx-OuTLNxxd.js";
4
+ import { CAPTION_L_MEDIUM_FONT_VARIANT as t } from "../../constants/font-variants.js";
5
+ import '../../assets/Switch.css';const i = "_track_h9xnu_1", e = "_description_h9xnu_11", n = "_error_h9xnu_17", s = {
6
+ track: i,
7
+ description: e,
8
+ error: n
9
+ }, a = c(
10
+ s.description,
11
+ o[t]
12
+ ), d = r.withProps({
13
+ classNames: { ...s, description: a },
14
+ size: "xs"
15
+ });
16
+ export {
17
+ d as Switch
18
+ };
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch';
@@ -0,0 +1,4 @@
1
+ import { Switch as t } from "./Switch.js";
2
+ export {
3
+ t as Switch
4
+ };
@@ -27,6 +27,9 @@ const a = {
27
27
  "text-base-tertiary": e("#0d112666"),
28
28
  "text-base-quaternary": e("#0a0f2940"),
29
29
  "text-status-destructive": e("#e6483d"),
30
+ //toggle
31
+ "background-toggle-active": e("#26bd6c"),
32
+ "background-toggle-default": e("#babdc5"),
30
33
  //typography
31
34
  "typography-secondary": e("#91989e")
32
35
  },
package/dist/main.d.ts CHANGED
@@ -9,4 +9,5 @@ export { PasswordInput } from './components/Inputs/PasswordInput';
9
9
  export { CvvInput } from './components/Inputs/CvvInput';
10
10
  export { Loader } from './components/Loader';
11
11
  export { Modal } from './components/Modal';
12
+ export { Switch } from './components/Switch';
12
13
  export { Text } from './components/Text';
package/dist/main.js CHANGED
@@ -3,25 +3,27 @@ import { MantineProvider as m } from "./components/MainProvider/MantineProvider.
3
3
  import { theme as f } from "./components/theme.js";
4
4
  import { Button as a } from "./components/Button/Button.js";
5
5
  import { Input as u } from "./components/Inputs/Input.js";
6
- import { CardInput as i } from "./components/Inputs/CardInput/CardInput.js";
7
- import { MaskedInput as l } from "./components/Inputs/MaskedInput/MaskedInput.js";
8
- import { PasswordInput as C } from "./components/Inputs/PasswordInput/PasswordInput.js";
9
- import { CvvInput as P } from "./components/Inputs/CvvInput/CvvInput.js";
10
- import { Loader as h } from "./components/Loader/Loader.js";
11
- import { Modal as k } from "./components/Modal/Modal.js";
12
- import { Text as B } from "./components/Text/Text.js";
6
+ import { CardInput as I } from "./components/Inputs/CardInput/CardInput.js";
7
+ import { MaskedInput as c } from "./components/Inputs/MaskedInput/MaskedInput.js";
8
+ import { PasswordInput as l } from "./components/Inputs/PasswordInput/PasswordInput.js";
9
+ import { CvvInput as C } from "./components/Inputs/CvvInput/CvvInput.js";
10
+ import { Loader as P } from "./components/Loader/Loader.js";
11
+ import { Modal as w } from "./components/Modal/Modal.js";
12
+ import { Switch as B } from "./components/Switch/Switch.js";
13
+ import { Text as L } from "./components/Text/Text.js";
13
14
  export {
14
15
  a as Button,
15
- i as CardInput,
16
+ I as CardInput,
16
17
  t as ColorSchemeScript,
17
- P as CvvInput,
18
+ C as CvvInput,
18
19
  u as Input,
19
- h as Loader,
20
+ P as Loader,
20
21
  m as MantineProvider,
21
- l as MaskedInput,
22
- k as Modal,
23
- C as PasswordInput,
24
- B as Text,
22
+ c as MaskedInput,
23
+ w as Modal,
24
+ l as PasswordInput,
25
+ B as Switch,
26
+ L as Text,
25
27
  e as mantineHtmlProps,
26
28
  f as theme
27
29
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@kvell-group/ui",
3
3
  "author": "Kvell Group",
4
4
  "private": false,
5
- "version": "1.12.19",
5
+ "version": "1.14.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",
@@ -1,23 +0,0 @@
1
- import './assets/clsx.css';const e = "_input_1d20c_1", a = "_section_1d20c_19", i = "_label_1d20c_24", l = "_error_1d20c_28", _ = {
2
- input: e,
3
- section: a,
4
- label: i,
5
- error: l
6
- };
7
- function c(r) {
8
- var o, n, t = "";
9
- if (typeof r == "string" || typeof r == "number") t += r;
10
- else if (typeof r == "object") if (Array.isArray(r)) {
11
- var s = r.length;
12
- for (o = 0; o < s; o++) r[o] && (n = c(r[o])) && (t && (t += " "), t += n);
13
- } else for (n in r) r[n] && (t && (t += " "), t += n);
14
- return t;
15
- }
16
- function u() {
17
- for (var r, o, n = 0, t = "", s = arguments.length; n < s; n++) (r = arguments[n]) && (o = c(r)) && (t && (t += " "), t += o);
18
- return t;
19
- }
20
- export {
21
- _ as b,
22
- u as c
23
- };
File without changes