@stamcat/craftsman 0.0.27-alpha.7 → 0.0.27-alpha.9

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.
Files changed (37) hide show
  1. package/Components.esm.js +10 -4
  2. package/package.json +13 -1
  3. package/src/components/{Button.d.ts → Button/Button.d.ts} +1 -1
  4. package/src/components/{Button.esm.js → Button/Button.esm.js} +4 -4
  5. package/src/components/Input/Checkbox.esm.js +1 -1
  6. package/src/components/Input/DatePicker.d.ts +8 -0
  7. package/src/components/Input/DatePicker.esm.js +24 -0
  8. package/src/components/Input/Input.css +1 -0
  9. package/src/components/Input/{Input.module.scss → Input.scss} +48 -50
  10. package/src/components/Input/Input2.esm.js +33 -0
  11. package/src/components/Input/InputPassword.esm.js +18 -19
  12. package/src/components/Input/InputPhone.d.ts +7 -0
  13. package/src/components/Input/InputPhone.esm.js +27 -0
  14. package/src/components/Input/InputWrapper.d.ts +1 -2
  15. package/src/components/Input/InputWrapper.esm.js +18 -24
  16. package/src/components/Input/RadioButton.esm.js +1 -1
  17. package/src/components/Input/Textarea.esm.js +18 -19
  18. package/src/components/Loader/Loader.d.ts +0 -1
  19. package/src/components/Loader/Loader.esm.js +12 -14
  20. package/src/components/Modal/Modal.d.ts +0 -1
  21. package/src/components/Modal/Modal.esm.js +25 -26
  22. package/src/components/Select/Select.d.ts +14 -0
  23. package/src/components/Select/Select.esm.js +26 -0
  24. package/src/components/index.d.ts +4 -1
  25. package/src/styles/global/components/_input.scss +0 -6
  26. package/src/styles/global/components/_reactCalendar.css +1 -0
  27. package/src/styles/global/components/_reactCalendar.scss +237 -0
  28. package/src/styles/global/components/_reactDatePicker.css +1 -0
  29. package/src/styles/global/components/_reactDatePicker.scss +152 -0
  30. package/src/styles/global/components/_reactPhone.css +1 -0
  31. package/src/styles/global/components/_reactPhone.scss +265 -0
  32. package/src/styles/global/components/_select.scss +56 -0
  33. package/src/styles/global/globalStyles.scss +2 -1
  34. package/src/styles/theme/components.esm.js +0 -1
  35. package/src/components/Input/Input.esm.js +0 -33
  36. package/src/components/Input/Input.module.css +0 -1
  37. package/src/components/Input/Input.module.esm.js +0 -13
package/Components.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { __exportAll as e } from "./_virtual/_rolldown/runtime.esm.js";
2
- import { Button as t } from "./src/components/Button.esm.js";
3
- import { Input as n } from "./src/components/Input/Input.esm.js";
2
+ import { Button as t } from "./src/components/Button/Button.esm.js";
3
+ import { Input as n } from "./src/components/Input/Input2.esm.js";
4
4
  import { InputPassword as r } from "./src/components/Input/InputPassword.esm.js";
5
5
  import { Loader as i } from "./src/components/Loader/Loader.esm.js";
6
6
  import { RadioButton as a } from "./src/components/Input/RadioButton.esm.js";
@@ -8,17 +8,23 @@ import { Checkbox as o } from "./src/components/Input/Checkbox.esm.js";
8
8
  import { Textarea as s } from "./src/components/Input/Textarea.esm.js";
9
9
  import { Text as c } from "./src/components/Text/Text2.esm.js";
10
10
  import { Modal as l } from "./src/components/Modal/Modal.esm.js";
11
+ import { Select as u } from "./src/components/Select/Select.esm.js";
12
+ import { DatePicker as d } from "./src/components/Input/DatePicker.esm.js";
13
+ import { InputPhone as f } from "./src/components/Input/InputPhone.esm.js";
11
14
  //#region src/components/index.ts
12
- var u = /* @__PURE__ */ e({
15
+ var p = /* @__PURE__ */ e({
13
16
  Button: () => t,
14
17
  Checkbox: () => o,
18
+ DatePicker: () => d,
15
19
  Input: () => n,
16
20
  InputPassword: () => r,
21
+ InputPhone: () => f,
17
22
  Loader: () => i,
18
23
  Modal: () => l,
19
24
  RadioButton: () => a,
25
+ Select: () => u,
20
26
  Text: () => c,
21
27
  Textarea: () => s
22
28
  });
23
29
  //#endregion
24
- export { t as Button, o as Checkbox, n as Input, r as InputPassword, i as Loader, l as Modal, a as RadioButton, c as Text, s as Textarea, u as components_exports };
30
+ export { t as Button, o as Checkbox, d as DatePicker, n as Input, r as InputPassword, f as InputPhone, i as Loader, l as Modal, a as RadioButton, u as Select, c as Text, s as Textarea, p as components_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.27-alpha.7",
3
+ "version": "0.0.27-alpha.9",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -95,6 +95,18 @@
95
95
  "./Modal": {
96
96
  "types": "./src/components/Modal.d.ts",
97
97
  "default": "./src/components/Modal.esm.js"
98
+ },
99
+ "./Select": {
100
+ "types": "./src/components/Select.d.ts",
101
+ "default": "./src/components/Select.esm.js"
102
+ },
103
+ "./DatePicker": {
104
+ "types": "./src/components/DatePicker.d.ts",
105
+ "default": "./src/components/DatePicker.esm.js"
106
+ },
107
+ "./InputPhone": {
108
+ "types": "./src/components/InputPhone.d.ts",
109
+ "default": "./src/components/InputPhone.esm.js"
98
110
  }
99
111
  }
100
112
  }
@@ -1,4 +1,4 @@
1
- import { ButtonType } from '../styles';
1
+ import { ButtonType } from '../../styles';
2
2
  export type ButtonProps = React.ComponentProps<"button"> & {
3
3
  variant?: ButtonType;
4
4
  size?: number;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { isEmpty as e } from "../utilities/validations.esm.js";
3
- import { width as t } from "../styles/utilities/layout.esm.js";
4
- import "../../Styles.esm.js";
2
+ import { isEmpty as e } from "../../utilities/validations.esm.js";
3
+ import { width as t } from "../../styles/utilities/layout.esm.js";
4
+ import "../../../Styles.esm.js";
5
5
  import n from "clsx";
6
6
  import { Fragment as r, jsx as i } from "react/jsx-runtime";
7
- //#region src/components/Button.tsx
7
+ //#region src/components/Button/Button.tsx
8
8
  var a = (a) => {
9
9
  let { type: o = "button", variant: s = "default", size: c, styles: l, className: u, style: d, ...f } = a, p = typeof c == "number" ? Math.min(10, Math.max(.1, c)) : void 0, m = e(l) ? void 0 : l, h = p ? {
10
10
  borderRadius: `calc(var(--btn-border-radius) * ${p})`,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Input as e } from "./Input.esm.js";
2
+ import { Input as e } from "./Input2.esm.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  //#region src/components/Input/Checkbox.tsx
5
5
  var n = ({ type: n = "checkbox", labelPosition: r = "right", ...i }) => /* @__PURE__ */ t(e, {
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { LabeledInput } from './InputWrapper';
3
+ import { DatePickerProps } from 'react-date-picker';
4
+ export type InputProps = DatePickerProps & LabeledInput & {
5
+ id?: string;
6
+ style?: React.CSSProperties;
7
+ };
8
+ export declare const DatePicker: React.FC<InputProps>;
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { InputWrapper as e } from "./InputWrapper.esm.js";
3
+ import '../../styles/global/components/_reactCalendar.css';import '../../styles/global/components/_reactDatePicker.css';/* empty css */
4
+ /* empty css */
5
+ import t from "clsx";
6
+ import { jsx as n } from "react/jsx-runtime";
7
+ import { useId as r } from "react";
8
+ import { DatePicker as i } from "react-date-picker";
9
+ //#region src/components/Input/DatePicker.tsx
10
+ var a = ({ label: a, id: o, labelPosition: s = "top", required: c = !1, error: l, style: u, className: d, ...f }) => {
11
+ let p = r();
12
+ return /* @__PURE__ */ n(e, {
13
+ id: o || p,
14
+ className: t(d),
15
+ label: a,
16
+ labelPosition: s,
17
+ error: l,
18
+ required: c,
19
+ style: u,
20
+ children: /* @__PURE__ */ n(i, { ...f })
21
+ });
22
+ };
23
+ //#endregion
24
+ export { a as DatePicker };
@@ -0,0 +1 @@
1
+ @layer craftsman-base;.input-wrapper label .input-label{margin-bottom:calc(var(--w-gutter) * .25)}.input-wrapper[data-required=true] label .input-label:after{content:"*";color:var(--red700)}.input-wrapper[data-label-position=left] label{align-items:center;display:inline-flex}.input-wrapper[data-label-position=left] label .input-label{width:fit-content;margin-right:calc(var(--w-gutter) * .75)}.input-wrapper[data-label-position=left].textarea label{align-items:flex-start}.input-wrapper[data-label-position=bottom] label{flex-direction:column-reverse;align-items:flex-start;display:inline-flex}.input-wrapper[data-label-position=bottom] label .input-label{margin-bottom:0;margin-top:calc(var(--w-gutter) * .25)}.input-wrapper[data-label-position=right] label{flex-direction:row-reverse;align-items:baseline;display:inline-flex}.input-wrapper[data-label-position=right] label .input-label{margin-left:calc(var(--w-gutter) * .25);margin-bottom:0}.input-wrapper[data-label-position=inside]{--react-international-phone-height:50px;--react-international-phone-border-radius:8px;--react-international-phone-border-color:silver;position:relative}.input-wrapper[data-label-position=inside] .input-label{background-color:var(--white);z-index:1;width:fit-content;top:calc(var(--w-gutter) * .25);left:calc(var(--w-gutter) * .25);pointer-events:none;padding:0 5px;transition:top .15s,left .15s,font-size .15s,color .15s;position:absolute}.input-wrapper[data-label-position=inside]>label>.input-field>.input,.input-wrapper[data-label-position=inside]>.input{transition:border-color .2s}.input-wrapper[data-label-position=inside]:focus-within .input-label{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75);color:var(--blue500)}.input-wrapper[data-label-position=inside]:focus-within .input{border-color:var(--blue500)}.input-wrapper[data-label-position=inside]:focus-within .input::placeholder{opacity:1}.input-wrapper[data-label-position=inside][data-has-input=true] .input-label{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}.input-wrapper[data-label-position=inside] .input[type=tel]{width:100%}.input-wrapper[data-label-position=inside] .input::placeholder{opacity:0;transition:opacity .2s}.input-wrapper .input-field{align-items:center;display:inline-flex;position:relative}.input-wrapper .input-field[data-has-end-adornment=true]>.input{width:100%;padding-right:calc(var(--w-gutter) * 1.5)}.input-wrapper .input-adornment{right:calc(var(--w-gutter) * .5);z-index:1;align-items:center;margin-top:0;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.input-wrapper .input-error{margin-top:calc(var(--w-gutter) * .25);font-size:calc(var(--w-text) * .75);color:var(--red600)}.input-wrapper .input-view-toggle{align-items:"center";padding:0;line-height:1;display:inline-flex}
@@ -1,23 +1,22 @@
1
1
  @use "../../styles/global/components/input";
2
2
  @use "../../styles/utilities/functions" as u;
3
3
 
4
-
5
4
  @mixin inside-input-label-floating {
6
- top: -0.5rem;
7
- left: #{u.width("gutter", 0.125)};
8
- font-size: #{u.width("text", 0.75)};
5
+ top: -0.5rem;
6
+ left: #{u.width("gutter", 0.125)};
7
+ font-size: #{u.width("text", 0.75)};
9
8
  }
10
9
 
11
- .wrapper {
10
+ .input-wrapper {
12
11
  label {
13
- .inputLabel {
12
+ .input-label {
14
13
  margin-bottom: #{u.width("gutter", 0.25)};
15
14
  }
16
15
  }
17
16
 
18
17
  &[data-required="true"] {
19
18
  label {
20
- .inputLabel {
19
+ .input-label {
21
20
  &::after {
22
21
  content: "*";
23
22
  color: var(--red700);
@@ -31,7 +30,7 @@ font-size: #{u.width("text", 0.75)};
31
30
  display: inline-flex;
32
31
  align-items: center;
33
32
 
34
- .inputLabel {
33
+ .input-label {
35
34
  width: fit-content;
36
35
  margin-right: #{u.width("gutter", 0.75)};
37
36
  }
@@ -49,7 +48,7 @@ font-size: #{u.width("text", 0.75)};
49
48
  flex-direction: column-reverse;
50
49
  align-items: flex-start;
51
50
 
52
- .inputLabel {
51
+ .input-label {
53
52
  margin-bottom: 0;
54
53
  margin-top: #{u.width("gutter", 0.25)};
55
54
  }
@@ -62,7 +61,7 @@ font-size: #{u.width("text", 0.75)};
62
61
  flex-direction: row-reverse;
63
62
  align-items: baseline;
64
63
 
65
- .inputLabel {
64
+ .input-label {
66
65
  margin-left: #{u.width("gutter", 0.25)};
67
66
  margin-bottom: 0;
68
67
  }
@@ -70,9 +69,12 @@ font-size: #{u.width("text", 0.75)};
70
69
  }
71
70
 
72
71
  &[data-label-position="inside"] {
73
- @extend %inside-input-label-base;
72
+ --react-international-phone-height: 50px;
73
+ --react-international-phone-border-radius: 8px;
74
+ --react-international-phone-border-color: #c0c0c0ff;
75
+ position: relative;
74
76
 
75
- .inputLabel {
77
+ .input-label {
76
78
  position: absolute;
77
79
  background-color: var(--white);
78
80
  z-index: 1;
@@ -88,13 +90,13 @@ font-size: #{u.width("text", 0.75)};
88
90
  color 150ms ease;
89
91
  }
90
92
 
91
- > label > .inputField > .input,
93
+ > label > .input-field > .input,
92
94
  > .input {
93
95
  transition: border-color 200ms ease;
94
96
  }
95
97
 
96
98
  &:focus-within {
97
- .inputLabel {
99
+ .input-label {
98
100
  @include inside-input-label-floating;
99
101
  color: var(--blue500);
100
102
  }
@@ -108,10 +110,8 @@ font-size: #{u.width("text", 0.75)};
108
110
  }
109
111
  }
110
112
 
111
- &:has(.input:not(:placeholder-shown)),
112
- &:has(.input:-webkit-autofill),
113
113
  &[data-has-input="true"] {
114
- .inputLabel {
114
+ .input-label {
115
115
  @include inside-input-label-floating;
116
116
  }
117
117
  }
@@ -125,41 +125,39 @@ font-size: #{u.width("text", 0.75)};
125
125
  transition: opacity 200ms ease;
126
126
  }
127
127
  }
128
-
129
- }
130
-
131
- .inputField {
132
- position: relative;
133
- display: inline-flex;
134
- align-items: center;
135
-
136
- &[data-has-end-adornment="true"] {
137
- > .input {
138
- width: 100%;
139
- padding-right: #{u.width("gutter", 1.5)};;
128
+ .input-field {
129
+ position: relative;
130
+ display: inline-flex;
131
+ align-items: center;
132
+
133
+ &[data-has-end-adornment="true"] {
134
+ > .input {
135
+ width: 100%;
136
+ padding-right: #{u.width("gutter", 1.5)};
137
+ }
140
138
  }
141
139
  }
142
- }
143
140
 
144
- .inputAdornment {
145
- position: absolute;
146
- right: #{u.width("gutter", 0.5)};;
147
- top: 50%;
148
- transform: translateY(-50%);
149
- margin-top: 0;
150
- z-index: 1;
151
- display: inline-flex;
152
- align-items: center;
153
- }
141
+ .input-adornment {
142
+ position: absolute;
143
+ right: #{u.width("gutter", 0.5)};
144
+ top: 50%;
145
+ transform: translateY(-50%);
146
+ margin-top: 0;
147
+ z-index: 1;
148
+ display: inline-flex;
149
+ align-items: center;
150
+ }
154
151
 
155
- .error {
156
- margin-top: #{u.width("gutter", 0.25)};;
157
- font-size: #{u.width("text", 0.75)};;
158
- color: var(--red600);
152
+ .input-error {
153
+ margin-top: #{u.width("gutter", 0.25)};
154
+ font-size: #{u.width("text", 0.75)};
155
+ color: var(--red600);
156
+ }
157
+ .input-view-toggle {
158
+ padding: 0;
159
+ display: inline-flex;
160
+ align-items: "center";
161
+ line-height: 1;
162
+ }
159
163
  }
160
- .inputViewToggle {
161
- padding: 0;
162
- display: inline-flex;
163
- align-items: "center";
164
- line-height: 1;
165
- };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { isEmpty as e } from "../../utilities/validations.esm.js";
3
+ import { InputWrapper as t } from "./InputWrapper.esm.js";
4
+ import n from "clsx";
5
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
+ import { useId as a } from "react";
7
+ //#region src/components/Input/Input.tsx
8
+ var o = ({ label: o, id: s, labelPosition: c = "top", required: l = !1, type: u = "text", error: d, endAdornment: f, style: p, className: m, ...h }) => {
9
+ let g = a(), _ = s || g;
10
+ return /* @__PURE__ */ r(t, {
11
+ className: m,
12
+ label: o,
13
+ labelPosition: c,
14
+ error: d,
15
+ required: l,
16
+ style: p,
17
+ children: /* @__PURE__ */ i("span", {
18
+ className: "input-field",
19
+ "data-has-end-adornment": !e(f),
20
+ children: [/* @__PURE__ */ r("input", {
21
+ id: _,
22
+ type: u,
23
+ className: n("input", u),
24
+ ...h
25
+ }), !e(f) && /* @__PURE__ */ r("span", {
26
+ className: "input-adornment",
27
+ children: f
28
+ })]
29
+ })
30
+ });
31
+ };
32
+ //#endregion
33
+ export { o as Input };
@@ -1,29 +1,28 @@
1
1
  "use client";
2
- import { Button as e } from "../Button.esm.js";
3
- import t from "./Input.module.esm.js";
4
- import { Input as n } from "./Input.esm.js";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import { useState as i } from "react";
7
- import { ImEye as a, ImEyeBlocked as o } from "react-icons/im";
2
+ import { Button as e } from "../Button/Button.esm.js";
3
+ import { Input as t } from "./Input2.esm.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { useState as r } from "react";
6
+ import { ImEye as i, ImEyeBlocked as a } from "react-icons/im";
8
7
  //#region src/components/Input/InputPassword.tsx
9
- var s = ({ visible: n, onToggle: i }) => /* @__PURE__ */ r(e, {
8
+ var o = ({ visible: t, onToggle: r }) => /* @__PURE__ */ n(e, {
10
9
  type: "button",
11
10
  variant: "text",
12
- onClick: i,
13
- "aria-label": n ? "Hide password" : "Show password",
14
- "aria-pressed": n,
15
- className: t.inputViewToggle,
16
- children: r(n ? a : o, { size: 16 })
17
- }), c = ({ type: e = "password", ...t }) => {
18
- let [a, o] = i(!1), c = a ? "text" : e;
19
- return /* @__PURE__ */ r(n, {
20
- ...t,
11
+ onClick: r,
12
+ "aria-label": t ? "Hide password" : "Show password",
13
+ "aria-pressed": t,
14
+ className: "input-view-toggle",
15
+ children: n(t ? i : a, { size: 16 })
16
+ }), s = ({ type: e = "password", ...i }) => {
17
+ let [a, s] = r(!1), c = a ? "text" : e;
18
+ return /* @__PURE__ */ n(t, {
19
+ ...i,
21
20
  type: c,
22
- endAdornment: /* @__PURE__ */ r(s, {
21
+ endAdornment: /* @__PURE__ */ n(o, {
23
22
  visible: a,
24
- onToggle: () => o((e) => !e)
23
+ onToggle: () => s((e) => !e)
25
24
  })
26
25
  });
27
26
  };
28
27
  //#endregion
29
- export { c as InputPassword };
28
+ export { s as InputPassword };
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { LabeledInput } from './InputWrapper';
3
+ import { PhoneInputProps } from 'react-international-phone';
4
+ export type InputProps = PhoneInputProps & LabeledInput & {
5
+ id?: string;
6
+ };
7
+ export declare const InputPhone: React.FC<InputProps>;
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { InputWrapper as e } from "./InputWrapper.esm.js";
3
+ import '../../styles/global/components/_reactPhone.css';/* empty css */
4
+ import t from "clsx";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ import r, { useId as i } from "react";
7
+ import { PhoneInput as a } from "react-international-phone";
8
+ //#region src/components/Input/InputPhone.tsx
9
+ var o = ({ label: o, id: s, labelPosition: c = "top", required: l = !1, defaultCountry: u = "us", error: d, style: f, className: p, ...m }) => {
10
+ let h = i(), g = s || h, _ = r.useRef(null);
11
+ return /* @__PURE__ */ n(e, {
12
+ id: g,
13
+ className: t("input-phone", p),
14
+ label: o,
15
+ labelPosition: c,
16
+ error: d,
17
+ required: l,
18
+ style: f,
19
+ children: /* @__PURE__ */ n(a, {
20
+ defaultCountry: u,
21
+ ...m,
22
+ ref: _
23
+ })
24
+ });
25
+ };
26
+ //#endregion
27
+ export { o as InputPhone };
@@ -4,8 +4,7 @@ export type LabeledInput = {
4
4
  labelPosition?: LabelPosition;
5
5
  error?: string | boolean | React.ReactNode;
6
6
  required?: boolean;
7
- styles?: React.CSSProperties;
8
7
  endAdornment?: React.ReactNode;
9
8
  };
10
- export type InputWrapperProps = React.ComponentProps<"input" | "textarea"> & LabeledInput;
9
+ export type InputWrapperProps = React.ComponentProps<"input" | "textarea" | "select"> & LabeledInput;
11
10
  export declare const InputWrapper: React.FC<InputWrapperProps>;
@@ -1,28 +1,22 @@
1
1
  "use client";
2
2
  import { isEmpty as e } from "../../utilities/validations.esm.js";
3
- import t from "./Input.module.esm.js";
4
- import n from "clsx";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import './Input.css';/* empty css */
4
+ import t from "clsx";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
6
  //#region src/components/Input/InputWrapper.tsx
7
- var a = ({ label: a, labelPosition: o = "top", required: s = !1, error: c, styles: l, className: u, style: d, children: f, value: p, defaultValue: m }) => {
8
- let h = !e(p) || !e(m), g = e(l) ? void 0 : l;
9
- return /* @__PURE__ */ i("div", {
10
- "data-label-position": o,
11
- "data-required": s,
12
- "data-has-input": h,
13
- className: n(t.wrapper, u),
14
- style: {
15
- ...g,
16
- ...d
17
- },
18
- children: [e(a) ? f : /* @__PURE__ */ i("label", { children: [o !== "hidden" && /* @__PURE__ */ r("div", {
19
- className: t.inputLabel,
20
- children: a
21
- }), f] }), !e(c) && /* @__PURE__ */ r("div", {
22
- className: t.error,
23
- children: c
24
- })]
25
- });
26
- };
7
+ var i = ({ label: i, labelPosition: a = "top", required: o = !1, error: s, className: c, style: l, children: u, value: d, defaultValue: f }) => /* @__PURE__ */ r("div", {
8
+ "data-label-position": a,
9
+ "data-required": o,
10
+ "data-has-input": !e(d) || !e(f),
11
+ className: t("input-wrapper", c),
12
+ style: l,
13
+ children: [e(i) ? u : /* @__PURE__ */ r("label", { children: [a !== "hidden" && /* @__PURE__ */ n("div", {
14
+ className: "input-label",
15
+ children: i
16
+ }), u] }), !e(s) && /* @__PURE__ */ n("div", {
17
+ className: "input-error",
18
+ children: s
19
+ })]
20
+ });
27
21
  //#endregion
28
- export { a as InputWrapper };
22
+ export { i as InputWrapper };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Input as e } from "./Input.esm.js";
2
+ import { Input as e } from "./Input2.esm.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
4
  //#region src/components/Input/RadioButton.tsx
5
5
  var n = ({ type: n = "radio", labelPosition: r = "right", ...i }) => /* @__PURE__ */ t(e, {
@@ -1,25 +1,24 @@
1
1
  "use client";
2
- import e from "./Input.module.esm.js";
3
- import { InputWrapper as t } from "./InputWrapper.esm.js";
4
- import n from "clsx";
5
- import { jsx as r } from "react/jsx-runtime";
6
- import { useId as i } from "react";
2
+ import { InputWrapper as e } from "./InputWrapper.esm.js";
3
+ import t from "clsx";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ import { useId as r } from "react";
7
6
  //#region src/components/Input/Textarea.tsx
8
- var a = ({ labelPosition: a = "top", id: o, label: s, error: c, required: l, className: u, styles: d, ...f }) => {
9
- let p = i(), m = o || p;
10
- return /* @__PURE__ */ r(t, {
11
- label: s,
12
- className: n(e.textarea, u),
13
- labelPosition: a,
14
- error: c,
15
- required: l,
16
- styles: d,
17
- children: /* @__PURE__ */ r("textarea", {
18
- id: m,
19
- className: n(e.input),
20
- ...f
7
+ var i = ({ labelPosition: i = "top", id: a, label: o, error: s, required: c, className: l, style: u, ...d }) => {
8
+ let f = r(), p = a || f;
9
+ return /* @__PURE__ */ n(e, {
10
+ label: o,
11
+ className: t("textarea", l),
12
+ labelPosition: i,
13
+ error: s,
14
+ required: c,
15
+ style: u,
16
+ children: /* @__PURE__ */ n("textarea", {
17
+ id: p,
18
+ className: "input",
19
+ ...d
21
20
  })
22
21
  });
23
22
  };
24
23
  //#endregion
25
- export { a as Textarea };
24
+ export { i as Textarea };
@@ -3,6 +3,5 @@ export type LoaderProps = React.ComponentProps<"div"> & {
3
3
  type: LoaderStyle;
4
4
  color?: string;
5
5
  width?: number;
6
- styles?: React.CSSProperties;
7
6
  };
8
7
  export declare const Loader: React.FC<LoaderProps>;
@@ -1,21 +1,19 @@
1
1
  "use client";
2
- import { isEmpty as e } from "../../utilities/validations.esm.js";
3
- import { loaders as t } from "./types.esm.js";
4
- import n from "./loaders.module.esm.js";
5
- import r from "clsx";
6
- import { jsx as i } from "react/jsx-runtime";
2
+ import { loaders as e } from "./types.esm.js";
3
+ import t from "./loaders.module.esm.js";
4
+ import n from "clsx";
5
+ import { jsx as r } from "react/jsx-runtime";
7
6
  //#region src/components/Loader/Loader.tsx
8
- var a = (a) => {
9
- let { type: o, color: s = "black", width: c, styles: l, className: u, style: d, ...f } = a, p = e(l) ? void 0 : l, m = t[o](s, c);
10
- return /* @__PURE__ */ i("div", {
11
- className: r(n[o], u),
7
+ var i = (i) => {
8
+ let { type: a, color: o = "black", width: s, className: c, style: l, ...u } = i, d = e[a](o, s);
9
+ return /* @__PURE__ */ r("div", {
10
+ className: n(t[a], c),
12
11
  style: {
13
- ...m,
14
- ...p,
15
- ...d
12
+ ...d,
13
+ ...l
16
14
  },
17
- ...f
15
+ ...u
18
16
  });
19
17
  };
20
18
  //#endregion
21
- export { a as Loader };
19
+ export { i as Loader };
@@ -8,7 +8,6 @@ export interface ModalProps extends React.ComponentPropsWithoutRef<"div"> {
8
8
  backgroundDismiss?: boolean;
9
9
  hideDismissIcon?: boolean;
10
10
  footer?: React.ReactNode;
11
- styles?: React.CSSProperties;
12
11
  }
13
12
  type ModalState = {
14
13
  isClosing: boolean;