@stamcat/craftsman 0.0.27-alpha.8 → 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.
- package/Components.esm.js +7 -3
- package/package.json +9 -1
- package/src/components/Input/Checkbox.esm.js +1 -1
- package/src/components/Input/DatePicker.d.ts +8 -0
- package/src/components/Input/DatePicker.esm.js +24 -0
- package/src/components/Input/Input.css +1 -0
- package/src/components/Input/{Input.module.scss → Input.scss} +48 -50
- package/src/components/Input/Input2.esm.js +33 -0
- package/src/components/Input/InputPassword.esm.js +17 -18
- package/src/components/Input/InputPhone.d.ts +7 -0
- package/src/components/Input/InputPhone.esm.js +27 -0
- package/src/components/Input/InputWrapper.esm.js +16 -16
- package/src/components/Input/RadioButton.esm.js +1 -1
- package/src/components/Input/Textarea.esm.js +18 -19
- package/src/components/index.d.ts +2 -0
- package/src/styles/global/components/_input.scss +0 -6
- package/src/styles/global/components/_reactCalendar.css +1 -0
- package/src/styles/global/components/_reactCalendar.scss +237 -0
- package/src/styles/global/components/_reactDatePicker.css +1 -0
- package/src/styles/global/components/_reactDatePicker.scss +152 -0
- package/src/styles/global/components/_reactPhone.css +1 -0
- package/src/styles/global/components/_reactPhone.scss +265 -0
- package/src/components/Input/Input.esm.js +0 -34
- package/src/components/Input/Input.module.css +0 -1
- 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
2
|
import { Button as t } from "./src/components/Button/Button.esm.js";
|
|
3
|
-
import { Input as n } from "./src/components/Input/
|
|
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";
|
|
@@ -9,12 +9,16 @@ 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
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";
|
|
12
14
|
//#region src/components/index.ts
|
|
13
|
-
var
|
|
15
|
+
var p = /* @__PURE__ */ e({
|
|
14
16
|
Button: () => t,
|
|
15
17
|
Checkbox: () => o,
|
|
18
|
+
DatePicker: () => d,
|
|
16
19
|
Input: () => n,
|
|
17
20
|
InputPassword: () => r,
|
|
21
|
+
InputPhone: () => f,
|
|
18
22
|
Loader: () => i,
|
|
19
23
|
Modal: () => l,
|
|
20
24
|
RadioButton: () => a,
|
|
@@ -23,4 +27,4 @@ var d = /* @__PURE__ */ e({
|
|
|
23
27
|
Textarea: () => s
|
|
24
28
|
});
|
|
25
29
|
//#endregion
|
|
26
|
-
export { t as Button, o as Checkbox, n as Input, r as InputPassword, i as Loader, l as Modal, a as RadioButton, u as Select, c as Text, s as Textarea,
|
|
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.
|
|
3
|
+
"version": "0.0.27-alpha.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A powerful, lightweight framework for design systems",
|
|
6
6
|
"repository": {
|
|
@@ -99,6 +99,14 @@
|
|
|
99
99
|
"./Select": {
|
|
100
100
|
"types": "./src/components/Select.d.ts",
|
|
101
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"
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
112
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Input as e } from "./
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
|
|
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
|
-
.
|
|
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 > .
|
|
93
|
+
> label > .input-field > .input,
|
|
92
94
|
> .input {
|
|
93
95
|
transition: border-color 200ms ease;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
&:focus-within {
|
|
97
|
-
.
|
|
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
|
-
.
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
2
|
import { Button as e } from "../Button/Button.esm.js";
|
|
3
|
-
import t from "./
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { ImEye as a, ImEyeBlocked as o } from "react-icons/im";
|
|
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
|
|
8
|
+
var o = ({ visible: t, onToggle: r }) => /* @__PURE__ */ n(e, {
|
|
10
9
|
type: "button",
|
|
11
10
|
variant: "text",
|
|
12
|
-
onClick:
|
|
13
|
-
"aria-label":
|
|
14
|
-
"aria-pressed":
|
|
15
|
-
className:
|
|
16
|
-
children:
|
|
17
|
-
}),
|
|
18
|
-
let [a,
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
...
|
|
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__ */
|
|
21
|
+
endAdornment: /* @__PURE__ */ n(o, {
|
|
23
22
|
visible: a,
|
|
24
|
-
onToggle: () =>
|
|
23
|
+
onToggle: () => s((e) => !e)
|
|
25
24
|
})
|
|
26
25
|
});
|
|
27
26
|
};
|
|
28
27
|
//#endregion
|
|
29
|
-
export {
|
|
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 };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { isEmpty as e } from "../../utilities/validations.esm.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
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
|
|
8
|
-
"data-label-position":
|
|
9
|
-
"data-required":
|
|
10
|
-
"data-has-input": !e(
|
|
11
|
-
className:
|
|
12
|
-
style:
|
|
13
|
-
children: [e(
|
|
14
|
-
className:
|
|
15
|
-
children:
|
|
16
|
-
}),
|
|
17
|
-
className:
|
|
18
|
-
children:
|
|
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
19
|
})]
|
|
20
20
|
});
|
|
21
21
|
//#endregion
|
|
22
|
-
export {
|
|
22
|
+
export { i as InputWrapper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Input as e } from "./
|
|
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 "./
|
|
3
|
-
import
|
|
4
|
-
import n from "
|
|
5
|
-
import {
|
|
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
|
|
9
|
-
let
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
label:
|
|
12
|
-
className:
|
|
13
|
-
labelPosition:
|
|
14
|
-
error:
|
|
15
|
-
required:
|
|
16
|
-
style:
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
id:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
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 {
|
|
24
|
+
export { i as Textarea };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
@use "../../utilities/functions" as u;
|
|
2
2
|
|
|
3
3
|
@layer craftsman-base {
|
|
4
|
-
%inside-input-label-base {
|
|
5
|
-
--react-international-phone-height: 50px;
|
|
6
|
-
--react-international-phone-border-radius: 8px;
|
|
7
|
-
--react-international-phone-border-color: #c0c0c0ff;
|
|
8
|
-
position: relative;
|
|
9
|
-
}
|
|
10
4
|
|
|
11
5
|
%interactive-focus-reset {
|
|
12
6
|
&:focus {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.react-calendar{background:#fff;border:1px solid #a0a096;width:350px;max-width:100%;font-family:Arial,Helvetica,sans-serif;line-height:1.125em}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{margin:-.5em;display:flex}.react-calendar--doubleView .react-calendar__viewContainer>*{width:50%;margin:.5em}.react-calendar,.react-calendar *,.react-calendar :before,.react-calendar :after{box-sizing:border-box}.react-calendar button{border:0;outline:none;margin:0}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{height:44px;margin-bottom:1em;display:flex}.react-calendar__navigation button{background:0 0;min-width:44px}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:#e6e6e6}.react-calendar__month-view__weekdays{text-align:center;text-transform:uppercase;font:inherit;font-size:.75em;font-weight:700}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{font:inherit;justify-content:center;align-items:center;font-size:.75em;font-weight:700;display:flex}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth,.react-calendar__decade-view__years__year--neighboringDecade,.react-calendar__century-view__decades__decade--neighboringCentury{color:#757575}.react-calendar__year-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__century-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{text-align:center;max-width:100%;font:inherit;background:0 0;padding:10px 6.6667px;font-size:.833em}.react-calendar__tile:disabled{color:#ababab;background-color:#f0f0f0}.react-calendar__month-view__days__day--neighboringMonth:disabled,.react-calendar__decade-view__years__year--neighboringDecade:disabled,.react-calendar__century-view__decades__decade--neighboringCentury:disabled{color:#cdcdcd}.react-calendar__tile:enabled:hover,.react-calendar__tile:enabled:focus{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:hover,.react-calendar__tile--now:enabled:focus{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:hover,.react-calendar__tile--hasActive:enabled:focus{background:#a9d4ff}.react-calendar__tile--active{color:#fff;background:#006edc}.react-calendar__tile--active:enabled:hover,.react-calendar__tile--active:enabled:focus{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}.react-calendar{border-color:var(--gray400)}.react-calendar button{justify-content:center}.react-calendar__month-view__days button.react-calendar__tile{height:50px}.react-calendar__month-view__days button.react-calendar__tile:hover,.react-calendar__month-view__days button.react-calendar__tile--active,.react-calendar__month-view__days button.react-calendar__tile--now{border-radius:50%}.react-datetime-picker button{color:unset}.react-datetime-picker button.react-calendar__tile--active{background-color:var(--blue500);color:var(--white)}.react-datetime-picker button.react-calendar__tile--active:hover{background-color:var(--blue500)}.react-datetime-picker button.react-calendar__tile--now{border:1px solid var(--text)}.react-datetime-picker button.react-calendar__tile--now:hover{background-color:var(--gray100)}.react-datetime-picker button.react-calendar__tile--hasActive{background:var(--blue500)}.react-datetime-picker button.react-calendar__tile--hasActive:hover{background:var(--blue300)}.react-datetime-picker button:hover{background-color:unset}.react-datetime-picker input[type=number]{appearance:textfield}.react-datetime-picker input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.react-datetime-picker input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.react-datetime-picker input{background-color:unset;border:unset;box-sizing:unset;border-radius:unset}.react-datetime-picker input:focus,.react-datetime-picker input:focus-visible{border:unset;color:unset;background:unset;outline:none}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@use "../../utilities/functions" as u;
|
|
2
|
+
|
|
3
|
+
.react-calendar {
|
|
4
|
+
width: 350px;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
background: white;
|
|
7
|
+
border: 1px solid #a0a096;
|
|
8
|
+
font-family: "Arial", "Helvetica", sans-serif;
|
|
9
|
+
line-height: 1.125em;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.react-calendar--doubleView {
|
|
13
|
+
width: 700px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.react-calendar--doubleView .react-calendar__viewContainer {
|
|
17
|
+
display: flex;
|
|
18
|
+
margin: -0.5em;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.react-calendar--doubleView .react-calendar__viewContainer > * {
|
|
22
|
+
width: 50%;
|
|
23
|
+
margin: 0.5em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.react-calendar,
|
|
27
|
+
.react-calendar *,
|
|
28
|
+
.react-calendar *:before,
|
|
29
|
+
.react-calendar *:after {
|
|
30
|
+
-moz-box-sizing: border-box;
|
|
31
|
+
-webkit-box-sizing: border-box;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.react-calendar button {
|
|
36
|
+
margin: 0;
|
|
37
|
+
border: 0;
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.react-calendar button:enabled:hover {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.react-calendar__navigation {
|
|
46
|
+
display: flex;
|
|
47
|
+
height: 44px;
|
|
48
|
+
margin-bottom: 1em;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.react-calendar__navigation button {
|
|
52
|
+
min-width: 44px;
|
|
53
|
+
background: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.react-calendar__navigation button:disabled {
|
|
57
|
+
background-color: #f0f0f0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.react-calendar__navigation button:enabled:hover,
|
|
61
|
+
.react-calendar__navigation button:enabled:focus {
|
|
62
|
+
background-color: #e6e6e6;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.react-calendar__month-view__weekdays {
|
|
66
|
+
text-align: center;
|
|
67
|
+
text-transform: uppercase;
|
|
68
|
+
font: inherit;
|
|
69
|
+
font-size: 0.75em;
|
|
70
|
+
font-weight: bold;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.react-calendar__month-view__weekdays__weekday {
|
|
74
|
+
padding: 0.5em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.react-calendar__month-view__weekNumbers .react-calendar__tile {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
font: inherit;
|
|
82
|
+
font-size: 0.75em;
|
|
83
|
+
font-weight: bold;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.react-calendar__month-view__days__day--weekend {
|
|
87
|
+
color: #d10000;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.react-calendar__month-view__days__day--neighboringMonth,
|
|
91
|
+
.react-calendar__decade-view__years__year--neighboringDecade,
|
|
92
|
+
.react-calendar__century-view__decades__decade--neighboringCentury {
|
|
93
|
+
color: #757575;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.react-calendar__year-view .react-calendar__tile,
|
|
97
|
+
.react-calendar__decade-view .react-calendar__tile,
|
|
98
|
+
.react-calendar__century-view .react-calendar__tile {
|
|
99
|
+
padding: 2em 0.5em;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.react-calendar__tile {
|
|
103
|
+
max-width: 100%;
|
|
104
|
+
padding: 10px 6.6667px;
|
|
105
|
+
background: none;
|
|
106
|
+
text-align: center;
|
|
107
|
+
font: inherit;
|
|
108
|
+
font-size: 0.833em;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.react-calendar__tile:disabled {
|
|
112
|
+
background-color: #f0f0f0;
|
|
113
|
+
color: #ababab;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.react-calendar__month-view__days__day--neighboringMonth:disabled,
|
|
117
|
+
.react-calendar__decade-view__years__year--neighboringDecade:disabled,
|
|
118
|
+
.react-calendar__century-view__decades__decade--neighboringCentury:disabled {
|
|
119
|
+
color: #cdcdcd;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.react-calendar__tile:enabled:hover,
|
|
123
|
+
.react-calendar__tile:enabled:focus {
|
|
124
|
+
background-color: #e6e6e6;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.react-calendar__tile--now {
|
|
128
|
+
background: #ffff76;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.react-calendar__tile--now:enabled:hover,
|
|
132
|
+
.react-calendar__tile--now:enabled:focus {
|
|
133
|
+
background: #ffffa9;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.react-calendar__tile--hasActive {
|
|
137
|
+
background: #76baff;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.react-calendar__tile--hasActive:enabled:hover,
|
|
141
|
+
.react-calendar__tile--hasActive:enabled:focus {
|
|
142
|
+
background: #a9d4ff;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.react-calendar__tile--active {
|
|
146
|
+
background: #006edc;
|
|
147
|
+
color: white;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.react-calendar__tile--active:enabled:hover,
|
|
151
|
+
.react-calendar__tile--active:enabled:focus {
|
|
152
|
+
background: #1087ff;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.react-calendar--selectRange .react-calendar__tile--hover {
|
|
156
|
+
background-color: #e6e6e6;
|
|
157
|
+
}
|
|
158
|
+
.react-calendar {
|
|
159
|
+
border-color: #{u.color("gray400")};
|
|
160
|
+
}
|
|
161
|
+
.react-calendar button {
|
|
162
|
+
justify-content: center;
|
|
163
|
+
}
|
|
164
|
+
.react-calendar__month-view__days {
|
|
165
|
+
button {
|
|
166
|
+
&.react-calendar__tile {
|
|
167
|
+
height: 50px;
|
|
168
|
+
&:hover {
|
|
169
|
+
border-radius: 50%;
|
|
170
|
+
}
|
|
171
|
+
&--active {
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
}
|
|
174
|
+
&--now {
|
|
175
|
+
border-radius: 50%;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// .react-calendar__month-view__days__day--weekend {
|
|
182
|
+
// color: unset;
|
|
183
|
+
// }
|
|
184
|
+
.react-datetime-picker {
|
|
185
|
+
button {
|
|
186
|
+
color: unset;
|
|
187
|
+
&.react-calendar__tile {
|
|
188
|
+
&--active {
|
|
189
|
+
background-color: #{u.color("blue500")};
|
|
190
|
+
color: #{u.color("white")};
|
|
191
|
+
&:hover {
|
|
192
|
+
background-color: #{u.color("blue500")};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
&--now {
|
|
196
|
+
// background-color: unset;
|
|
197
|
+
border: 1px solid #{u.color("text")};
|
|
198
|
+
&:hover {
|
|
199
|
+
background-color: #{u.color("gray100")};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
&--hasActive {
|
|
203
|
+
background: #{u.color("blue500")};
|
|
204
|
+
&:hover {
|
|
205
|
+
background: #{u.color("blue300")};
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
&:hover {
|
|
210
|
+
background-color: unset;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
input {
|
|
214
|
+
/* Disable spinner/flipper buttons */
|
|
215
|
+
&[type="number"] {
|
|
216
|
+
-webkit-appearance: textfield;
|
|
217
|
+
-moz-appearance: textfield;
|
|
218
|
+
appearance: textfield;
|
|
219
|
+
}
|
|
220
|
+
&::-webkit-inner-spin-button,
|
|
221
|
+
&::-webkit-outer-spin-button {
|
|
222
|
+
-webkit-appearance: none;
|
|
223
|
+
margin: 0;
|
|
224
|
+
}
|
|
225
|
+
background-color: unset;
|
|
226
|
+
border: unset;
|
|
227
|
+
box-sizing: unset;
|
|
228
|
+
border-radius: unset;
|
|
229
|
+
&:focus,
|
|
230
|
+
&:focus-visible {
|
|
231
|
+
border: unset;
|
|
232
|
+
color: unset;
|
|
233
|
+
background: unset;
|
|
234
|
+
outline: none;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-base{.react-date-picker__wrapper:focus,.react-datetime-picker__wrapper:focus{box-shadow:none;outline:0}.react-date-picker__wrapper,.react-datetime-picker__wrapper{color:var(--text);border:1px solid var(--gray400);padding:calc(var(--w-gutter) * .5);background-color:var(--white);border-radius:3px}[type=number].react-date-picker__wrapper::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[type=number].react-datetime-picker__wrapper::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[type=number].react-date-picker__wrapper::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[type=number].react-datetime-picker__wrapper::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[type=number].react-date-picker__wrapper,[type=number].react-datetime-picker__wrapper{appearance:textfield}.react-date-picker__wrapper:disabled,.react-datetime-picker__wrapper:disabled,.disabled.react-date-picker__wrapper,.disabled.react-datetime-picker__wrapper{border-color:var(--gray200);background-color:var(--gray100)}}.react-date-picker,.react-date-picker *,.react-date-picker :before,.react-date-picker :after,.react-datetime-picker,.react-datetime-picker *,.react-datetime-picker :before,.react-datetime-picker :after{box-sizing:border-box}.react-date-picker,.react-datetime-picker{display:inline-flex;position:relative}.react-date-picker--disabled,.react-datetime-picker--disabled{color:#6d6d6d;background-color:#f0f0f0}.react-date-picker__wrapper,.react-datetime-picker__wrapper{border:1px solid var(--gray400);border-radius:3px;flex-grow:1;flex-shrink:0;padding:2px;display:flex}.react-date-picker__inputGroup,.react-datetime-picker__inputGroup{box-sizing:content-box;flex-grow:1;padding:0 2px}.react-date-picker__inputGroup__divider,.react-datetime-picker__inputGroup__divider{white-space:pre;padding:1px 0}.react-date-picker__inputGroup__divider,.react-date-picker__inputGroup__leadingZero,.react-datetime-picker__inputGroup__divider,.react-datetime-picker__inputGroup__leadingZero{font:inherit;display:inline-block}.react-date-picker__inputGroup__input,.react-datetime-picker__inputGroup__input{color:currentColor;min-width:.54em;height:calc(100% - 2px);font:inherit;box-sizing:content-box;appearance:textfield;background:0 0;border:0;padding:1px;position:relative}.react-date-picker__inputGroup__input::-webkit-outer-spin-button{appearance:none;margin:0}.react-date-picker__inputGroup__input::-webkit-inner-spin-button{appearance:none;margin:0}.react-datetime-picker__inputGroup__input::-webkit-outer-spin-button{appearance:none;margin:0}.react-datetime-picker__inputGroup__input::-webkit-inner-spin-button{appearance:none;margin:0}.react-date-picker__inputGroup__input--hasLeadingZero,.react-datetime-picker__inputGroup__input--hasLeadingZero{margin-left:-.54em;padding-left:calc(1px + .54em)}.react-date-picker__button,.react-datetime-picker__button{background:0 0;border:0;padding:4px 6px}.react-date-picker__button :enabled,.react-datetime-picker__button :enabled{cursor:pointer}.react-date-picker__button :enabled:hover .react-date-picker__button__icon,.react-date-picker__button :enabled:hover .react-datetime-picker__button__icon,.react-date-picker__button :enabled:focus .react-date-picker__button__icon,.react-date-picker__button :enabled:focus .react-datetime-picker__button__icon,.react-datetime-picker__button :enabled:hover .react-date-picker__button__icon,.react-datetime-picker__button :enabled:hover .react-datetime-picker__button__icon,.react-datetime-picker__button :enabled:focus .react-date-picker__button__icon,.react-datetime-picker__button :enabled:focus .react-datetime-picker__button__icon{stroke:#0078d7}.react-date-picker__button :disabled .react-date-picker__button__icon,.react-date-picker__button :disabled .react-datetime-picker__button__icon,.react-datetime-picker__button :disabled .react-date-picker__button__icon,.react-datetime-picker__button :disabled .react-datetime-picker__button__icon{stroke:#6d6d6d}.react-date-picker__button svg,.react-datetime-picker__button svg{display:inherit}.react-date-picker__calendar--closed,.react-date-picker__clock--closed,.react-datetime-picker__calendar--closed,.react-datetime-picker__clock--closed{display:none}.react-date-picker__calendar{z-index:1;width:350px;max-width:100vw}.react-datetime-picker__calendar,.react-datetime-picker__clock{z-index:1}.react-datetime-picker__inputGroup__input:invalid{background:#ff00001a}.react-datetime-picker__inputGroup__amPm{font:inherit;appearance:menulist}.react-datetime-picker__calendar{width:350px;max-width:100vw}.react-datetime-picker__calendar .react-calendar{border-width:thin}.react-datetime-picker__clock{background-color:#fff;border:thin solid #a0a096;width:200px;max-width:100vw;height:200px;padding:25px}.react-date-picker__calendar .react-calendar{border-width:thin}.react-date-picker__inputGroup__input:invalid,.react-datetime-picker__inputGroup__input:invalid{background:unset}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
@use "../components/input";
|
|
2
|
+
@use "../../utilities/functions" as u;
|
|
3
|
+
|
|
4
|
+
.react-date-picker,
|
|
5
|
+
.react-date-picker *,
|
|
6
|
+
.react-date-picker *:before,
|
|
7
|
+
.react-date-picker *:after,
|
|
8
|
+
.react-datetime-picker,
|
|
9
|
+
.react-datetime-picker *,
|
|
10
|
+
.react-datetime-picker *:before,
|
|
11
|
+
.react-datetime-picker *:after {
|
|
12
|
+
-moz-box-sizing: border-box;
|
|
13
|
+
-webkit-box-sizing: border-box;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.react-date-picker,
|
|
18
|
+
.react-datetime-picker {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
position: relative;
|
|
21
|
+
|
|
22
|
+
&--disabled {
|
|
23
|
+
background-color: #f0f0f0;
|
|
24
|
+
color: #6d6d6d;
|
|
25
|
+
}
|
|
26
|
+
&__wrapper {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
border-radius: 3px;
|
|
31
|
+
padding: 2px;
|
|
32
|
+
border: 1px solid var(--gray400);
|
|
33
|
+
}
|
|
34
|
+
&__inputGroup {
|
|
35
|
+
// min-width: calc((4px * 3) + 0.54em * 8 + 0.217em * 2);
|
|
36
|
+
flex-grow: 1;
|
|
37
|
+
padding: 0 2px;
|
|
38
|
+
box-sizing: content-box;
|
|
39
|
+
}
|
|
40
|
+
&__inputGroup__divider {
|
|
41
|
+
padding: 1px 0;
|
|
42
|
+
white-space: pre;
|
|
43
|
+
}
|
|
44
|
+
&__inputGroup__divider,
|
|
45
|
+
&__inputGroup__leadingZero {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
font: inherit;
|
|
48
|
+
}
|
|
49
|
+
&__inputGroup__input {
|
|
50
|
+
min-width: 0.54em;
|
|
51
|
+
height: calc(100% - 2px);
|
|
52
|
+
position: relative;
|
|
53
|
+
padding: 1px;
|
|
54
|
+
border: 0;
|
|
55
|
+
background: none;
|
|
56
|
+
color: currentColor;
|
|
57
|
+
font: inherit;
|
|
58
|
+
box-sizing: content-box;
|
|
59
|
+
-webkit-appearance: textfield;
|
|
60
|
+
-moz-appearance: textfield;
|
|
61
|
+
appearance: textfield;
|
|
62
|
+
}
|
|
63
|
+
&__inputGroup__input::-webkit-outer-spin-button,
|
|
64
|
+
&__inputGroup__input::-webkit-inner-spin-button {
|
|
65
|
+
-webkit-appearance: none;
|
|
66
|
+
-moz-appearance: none;
|
|
67
|
+
appearance: none;
|
|
68
|
+
margin: 0;
|
|
69
|
+
}
|
|
70
|
+
&__inputGroup__input--hasLeadingZero {
|
|
71
|
+
margin-left: -0.54em;
|
|
72
|
+
padding-left: calc(1px + 0.54em);
|
|
73
|
+
}
|
|
74
|
+
&__button {
|
|
75
|
+
border: 0;
|
|
76
|
+
background: transparent;
|
|
77
|
+
padding: 4px 6px;
|
|
78
|
+
:enabled {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
&:hover, &:focus {
|
|
81
|
+
.react-date-picker, .react-datetime-picker {
|
|
82
|
+
&__button__icon {
|
|
83
|
+
stroke: #0078d7;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
:disabled {
|
|
89
|
+
.react-date-picker, .react-datetime-picker {
|
|
90
|
+
&__button__icon {
|
|
91
|
+
stroke: #6d6d6d;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
svg {
|
|
96
|
+
display: inherit;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
&__calendar--closed, &__clock--closed {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.react-date-picker__calendar {
|
|
106
|
+
width: 350px;
|
|
107
|
+
max-width: 100vw;
|
|
108
|
+
z-index: 1;
|
|
109
|
+
}
|
|
110
|
+
.react-datetime-picker__calendar,
|
|
111
|
+
.react-datetime-picker__clock {
|
|
112
|
+
z-index: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.react-datetime-picker__inputGroup__input:invalid {
|
|
116
|
+
background: rgba(255, 0, 0, 0.1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.react-datetime-picker__inputGroup__amPm {
|
|
120
|
+
font: inherit;
|
|
121
|
+
-webkit-appearance: menulist;
|
|
122
|
+
-moz-appearance: menulist;
|
|
123
|
+
appearance: menulist;
|
|
124
|
+
}
|
|
125
|
+
.react-datetime-picker__calendar {
|
|
126
|
+
width: 350px;
|
|
127
|
+
max-width: 100vw;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.react-datetime-picker__calendar .react-calendar {
|
|
131
|
+
border-width: thin;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.react-datetime-picker__clock {
|
|
135
|
+
width: 200px;
|
|
136
|
+
height: 200px;
|
|
137
|
+
max-width: 100vw;
|
|
138
|
+
padding: 25px;
|
|
139
|
+
background-color: white;
|
|
140
|
+
border: thin solid #a0a096;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.react-date-picker__calendar .react-calendar {
|
|
144
|
+
border-width: thin;
|
|
145
|
+
}
|
|
146
|
+
.react-date-picker__wrapper, .react-datetime-picker__wrapper {
|
|
147
|
+
// padding: 16px;
|
|
148
|
+
@extend %input-base;
|
|
149
|
+
}
|
|
150
|
+
.react-date-picker__inputGroup__input:invalid, .react-datetime-picker__inputGroup__input:invalid {
|
|
151
|
+
background: unset;
|
|
152
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-base;.input-phone[data-label-position=inside] .input-label{top:15px;left:50px}.input-phone .react-international-phone-country-selector{position:relative}.input-phone .react-international-phone-flag-emoji{width:var(--react-international-phone-flag-width,24px);height:var(--react-international-phone-flag-height,24px);box-sizing:border-box}.input-phone .react-international-phone-country-selector-button{height:var(--react-international-phone-height,36px);box-sizing:border-box;border:1px solid var(--react-international-phone-country-selector-border-color,var(--react-international-phone-border-color,gainsboro));appearance:button;background-color:var(--react-international-phone-country-selector-background-color,var(--react-international-phone-background-color,white));cursor:pointer;text-transform:none;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;margin:0;padding:0;display:flex}.input-phone .react-international-phone-country-selector-button:hover{background-color:var(--react-international-phone-country-selector-background-color-hover,whitesmoke)}.input-phone .react-international-phone-country-selector-button--hide-dropdown{cursor:auto}.input-phone .react-international-phone-country-selector-button--hide-dropdown:hover{background-color:#0000}.input-phone .react-international-phone-country-selector-button--disabled{background-color:var(--react-international-phone-disabled-country-selector-background-color,var(--react-international-phone-disabled-background-color,whitesmoke));cursor:auto}.input-phone .react-international-phone-country-selector-button--disabled:hover{background-color:var(--react-international-phone-disabled-country-selector-background-color,var(--react-international-phone-disabled-background-color,whitesmoke))}.input-phone .react-international-phone-country-selector-button__button-content{justify-content:center;align-items:center;display:flex}.input-phone .react-international-phone-country-selector-button__flag-emoji{margin:0 4px}.input-phone .react-international-phone-country-selector-button__flag-emoji--disabled{opacity:.75}.input-phone .react-international-phone-country-selector-button__dropdown-arrow{border-top:var(--react-international-phone-country-selector-arrow-size,4px) solid var(--react-international-phone-country-selector-arrow-color,#777);border-right:var(--react-international-phone-country-selector-arrow-size,4px) solid transparent;border-left:var(--react-international-phone-country-selector-arrow-size,4px) solid transparent;margin-right:4px;transition:all .1s ease-out}.input-phone .react-international-phone-country-selector-button__dropdown-arrow--active{transform:rotateX(180deg)}.input-phone .react-international-phone-country-selector-button__dropdown-arrow--disabled{border-top-color:var(--react-international-phone-disabled-country-selector-arrow-color,#999)}.input-phone .react-international-phone-country-selector-dropdown{z-index:1000;top:var(--react-international-phone-dropdown-top,44px);left:var(--react-international-phone-dropdown-left,0);background-color:var(--react-international-phone-dropdown-item-background-color,var(--react-international-phone-background-color,white));width:300px;max-height:200px;box-shadow:var(--react-international-phone-dropdown-shadow,2px 2px 16px #00000040);color:var(--react-international-phone-dropdown-item-text-color,var(--react-international-phone-text-color,#222));flex-direction:column;margin:0;padding:4px 0;list-style:none;display:flex;position:absolute;overflow-y:scroll}.input-phone .react-international-phone-country-selector-dropdown__preferred-list-divider{height:1px;margin:var(--react-international-phone-dropdown-preferred-list-divider-margin,0);background:var(--react-international-phone-dropdown-preferred-list-divider-color,var(--react-international-phone-border-color,gainsboro));border:none}.input-phone .react-international-phone-country-selector-dropdown__list-item{min-height:var(--react-international-phone-dropdown-item-height,28px);box-sizing:border-box;align-items:center;padding:2px 8px;display:flex}.input-phone .react-international-phone-country-selector-dropdown__list-item:hover{background-color:var(--react-international-phone-selected-dropdown-item-background-color,var(--react-international-phone-selected-dropdown-item-background-color,whitesmoke));cursor:pointer}.input-phone .react-international-phone-country-selector-dropdown__list-item--selected,.input-phone .react-international-phone-country-selector-dropdown__list-item--focused{background-color:var(--react-international-phone-selected-dropdown-item-background-color,whitesmoke);color:var(--react-international-phone-selected-dropdown-item-text-color,var(--react-international-phone-text-color,#222))}.input-phone .react-international-phone-country-selector-dropdown__list-item--selected .react-international-phone-country-selector-dropdown__list-item-dial-code,.input-phone .react-international-phone-country-selector-dropdown__list-item--focused .react-international-phone-country-selector-dropdown__list-item-dial-code{color:var(--react-international-phone-selected-dropdown-item-dial-code-color,var(--react-international-phone-dropdown-item-dial-code-color,gray))}.input-phone .react-international-phone-country-selector-dropdown__list-item--focused{background-color:var(--react-international-phone-selected-dropdown-item-background-color,var(--react-international-phone-selected-dropdown-item-background-color,whitesmoke))}.input-phone .react-international-phone-country-selector-dropdown__list-item-flag-emoji{margin-right:8px}.input-phone .react-international-phone-country-selector-dropdown__list-item-country-name{font-size:var(--react-international-phone-dropdown-item-font-size,14px);text-overflow:ellipsis;white-space:nowrap;margin-right:8px;overflow:hidden}.input-phone .react-international-phone-country-selector-dropdown__list-item-dial-code{color:var(--react-international-phone-dropdown-item-dial-code-color,gray);font-size:var(--react-international-phone-dropdown-item-font-size,14px)}.input-phone .react-international-phone-dial-code-preview{border:1px solid var(--react-international-phone-dial-code-preview-border-color,var(--react-international-phone-border-color,gainsboro));background-color:var(--react-international-phone-dial-code-preview-background-color,var(--react-international-phone-background-color,white));color:var(--react-international-phone-dial-code-preview-text-color,var(--react-international-phone-text-color,#222));font-size:var(--react-international-phone-dial-code-preview-font-size,var(--react-international-phone-font-size,13px));justify-content:center;align-items:center;margin-right:-1px;padding:0 8px;display:flex}.input-phone .react-international-phone-dial-code-preview--disabled{background-color:var(--react-international-phone-dial-code-preview-disabled-background-color,var(--react-international-phone-disabled-background-color,whitesmoke));color:var(--react-international-phone-dial-code-preview-disabled-text-color,var(--react-international-phone-disabled-text-color,#666))}.input-phone .react-international-phone-input-container{display:flex}.input-phone .react-international-phone-input-container .react-international-phone-country-selector-button{border-radius:var(--react-international-phone-border-radius,4px);border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.input-phone .react-international-phone-input-container .react-international-phone-input{height:var(--react-international-phone-height,36px);box-sizing:border-box;border:1px solid var(--react-international-phone-border-color,gainsboro);border-radius:var(--react-international-phone-border-radius,4px);background-color:var(--react-international-phone-background-color,white);color:var(--react-international-phone-text-color,#222);font-family:inherit;font-size:var(--react-international-phone-font-size,13px);border-top-left-radius:0;border-bottom-left-radius:0;margin:0;padding:0 8px;overflow:visible}.input-phone .react-international-phone-input-container .react-international-phone-input:focus{outline:none}.input-phone .react-international-phone-input-container .react-international-phone-input--disabled{background-color:var(--react-international-phone-disabled-background-color,whitesmoke);color:var(--react-international-phone-disabled-text-color,#666)}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
@use "./input";
|
|
2
|
+
@use "../../utilities/functions" as u;
|
|
3
|
+
|
|
4
|
+
.input-phone {
|
|
5
|
+
&[data-label-position="inside"] {
|
|
6
|
+
.input-label {
|
|
7
|
+
top: 15px;
|
|
8
|
+
left: 50px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.react-international-phone-country-selector {
|
|
13
|
+
position: relative;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.react-international-phone-flag-emoji {
|
|
17
|
+
width: var(--react-international-phone-flag-width, 24px);
|
|
18
|
+
height: var(--react-international-phone-flag-height, 24px);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.react-international-phone-country-selector-button {
|
|
23
|
+
display: flex;
|
|
24
|
+
height: var(--react-international-phone-height, 36px);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
padding: 0;
|
|
29
|
+
border: 1px solid
|
|
30
|
+
var(
|
|
31
|
+
--react-international-phone-country-selector-border-color,
|
|
32
|
+
var(--react-international-phone-border-color, gainsboro)
|
|
33
|
+
);
|
|
34
|
+
margin: 0;
|
|
35
|
+
appearance: button;
|
|
36
|
+
-webkit-appearance: button;
|
|
37
|
+
background-color: var(
|
|
38
|
+
--react-international-phone-country-selector-background-color,
|
|
39
|
+
var(--react-international-phone-background-color, white)
|
|
40
|
+
);
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
text-transform: none;
|
|
43
|
+
user-select: none;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background-color: var(--react-international-phone-country-selector-background-color-hover, whitesmoke);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--hide-dropdown {
|
|
50
|
+
cursor: auto;
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&--disabled {
|
|
58
|
+
background-color: var(
|
|
59
|
+
--react-international-phone-disabled-country-selector-background-color,
|
|
60
|
+
var(--react-international-phone-disabled-background-color, whitesmoke)
|
|
61
|
+
);
|
|
62
|
+
cursor: auto;
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background-color: var(
|
|
66
|
+
--react-international-phone-disabled-country-selector-background-color,
|
|
67
|
+
var(--react-international-phone-disabled-background-color, whitesmoke)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&__button-content {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__flag-emoji {
|
|
79
|
+
margin: 0 4px;
|
|
80
|
+
|
|
81
|
+
&--disabled {
|
|
82
|
+
opacity: 0.75;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__dropdown-arrow {
|
|
87
|
+
border-top: var(--react-international-phone-country-selector-arrow-size, 4px) solid
|
|
88
|
+
var(--react-international-phone-country-selector-arrow-color, #777);
|
|
89
|
+
border-right: var(--react-international-phone-country-selector-arrow-size, 4px) solid transparent;
|
|
90
|
+
border-left: var(--react-international-phone-country-selector-arrow-size, 4px) solid transparent;
|
|
91
|
+
margin-right: 4px;
|
|
92
|
+
transition: all 0.1s ease-out;
|
|
93
|
+
|
|
94
|
+
&--active {
|
|
95
|
+
transform: rotateX(180deg);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--disabled {
|
|
99
|
+
border-top-color: var(--react-international-phone-disabled-country-selector-arrow-color, #999);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.react-international-phone-country-selector-dropdown {
|
|
105
|
+
position: absolute;
|
|
106
|
+
z-index: 1000;
|
|
107
|
+
top: var(--react-international-phone-dropdown-top, 44px);
|
|
108
|
+
left: var(--react-international-phone-dropdown-left, 0);
|
|
109
|
+
display: flex;
|
|
110
|
+
width: 300px;
|
|
111
|
+
max-height: 200px;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
padding: 4px 0;
|
|
114
|
+
margin: 0;
|
|
115
|
+
background-color: var(
|
|
116
|
+
--react-international-phone-dropdown-item-background-color,
|
|
117
|
+
var(--react-international-phone-background-color, white)
|
|
118
|
+
);
|
|
119
|
+
box-shadow: var(--react-international-phone-dropdown-shadow, 2px 2px 16px rgba(0, 0, 0, 0.25));
|
|
120
|
+
color: var(
|
|
121
|
+
--react-international-phone-dropdown-item-text-color,
|
|
122
|
+
var(--react-international-phone-text-color, #222)
|
|
123
|
+
);
|
|
124
|
+
list-style: none;
|
|
125
|
+
overflow-y: scroll;
|
|
126
|
+
|
|
127
|
+
&__preferred-list-divider {
|
|
128
|
+
height: 1px;
|
|
129
|
+
border: none;
|
|
130
|
+
margin: var(--react-international-phone-dropdown-preferred-list-divider-margin, 0);
|
|
131
|
+
background: var(
|
|
132
|
+
--react-international-phone-dropdown-preferred-list-divider-color,
|
|
133
|
+
var(--react-international-phone-border-color, gainsboro)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__list-item {
|
|
138
|
+
display: flex;
|
|
139
|
+
min-height: var(--react-international-phone-dropdown-item-height, 28px);
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
align-items: center;
|
|
142
|
+
padding: 2px 8px;
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
background-color: var(
|
|
146
|
+
--react-international-phone-selected-dropdown-item-background-color,
|
|
147
|
+
var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke)
|
|
148
|
+
);
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&--selected,
|
|
153
|
+
&--focused {
|
|
154
|
+
background-color: var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke);
|
|
155
|
+
color: var(
|
|
156
|
+
--react-international-phone-selected-dropdown-item-text-color,
|
|
157
|
+
var(--react-international-phone-text-color, #222)
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
.react-international-phone-country-selector-dropdown__list-item-dial-code {
|
|
161
|
+
color: var(
|
|
162
|
+
--react-international-phone-selected-dropdown-item-dial-code-color,
|
|
163
|
+
var(--react-international-phone-dropdown-item-dial-code-color, gray)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&--focused {
|
|
169
|
+
background-color: var(
|
|
170
|
+
--react-international-phone-selected-dropdown-item-background-color,
|
|
171
|
+
var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke)
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&-flag-emoji {
|
|
176
|
+
margin-right: 8px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&-country-name {
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
margin-right: 8px;
|
|
182
|
+
font-size: var(--react-international-phone-dropdown-item-font-size, 14px);
|
|
183
|
+
text-overflow: ellipsis;
|
|
184
|
+
white-space: nowrap;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&-dial-code {
|
|
188
|
+
color: var(--react-international-phone-dropdown-item-dial-code-color, gray);
|
|
189
|
+
font-size: var(--react-international-phone-dropdown-item-font-size, 14px);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.react-international-phone-dial-code-preview {
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
padding: 0 8px;
|
|
199
|
+
border: 1px solid
|
|
200
|
+
var(
|
|
201
|
+
--react-international-phone-dial-code-preview-border-color,
|
|
202
|
+
var(--react-international-phone-border-color, gainsboro)
|
|
203
|
+
);
|
|
204
|
+
margin-right: -1px;
|
|
205
|
+
background-color: var(
|
|
206
|
+
--react-international-phone-dial-code-preview-background-color,
|
|
207
|
+
var(--react-international-phone-background-color, white)
|
|
208
|
+
);
|
|
209
|
+
color: var(
|
|
210
|
+
--react-international-phone-dial-code-preview-text-color,
|
|
211
|
+
var(--react-international-phone-text-color, #222)
|
|
212
|
+
);
|
|
213
|
+
font-size: var(
|
|
214
|
+
--react-international-phone-dial-code-preview-font-size,
|
|
215
|
+
var(--react-international-phone-font-size, 13px)
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
&--disabled {
|
|
219
|
+
background-color: var(
|
|
220
|
+
--react-international-phone-dial-code-preview-disabled-background-color,
|
|
221
|
+
var(--react-international-phone-disabled-background-color, whitesmoke)
|
|
222
|
+
);
|
|
223
|
+
color: var(
|
|
224
|
+
--react-international-phone-dial-code-preview-disabled-text-color,
|
|
225
|
+
var(--react-international-phone-disabled-text-color, #666)
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.react-international-phone-input-container {
|
|
231
|
+
display: flex;
|
|
232
|
+
|
|
233
|
+
.react-international-phone-country-selector-button {
|
|
234
|
+
border-radius: var(--react-international-phone-border-radius, 4px);
|
|
235
|
+
margin-right: -1px;
|
|
236
|
+
border-bottom-right-radius: 0;
|
|
237
|
+
border-top-right-radius: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.react-international-phone-input {
|
|
241
|
+
overflow: visible;
|
|
242
|
+
height: var(--react-international-phone-height, 36px);
|
|
243
|
+
box-sizing: border-box;
|
|
244
|
+
padding: 0 8px;
|
|
245
|
+
border: 1px solid var(--react-international-phone-border-color, gainsboro);
|
|
246
|
+
border-radius: var(--react-international-phone-border-radius, 4px);
|
|
247
|
+
margin: 0;
|
|
248
|
+
background-color: var(--react-international-phone-background-color, white);
|
|
249
|
+
border-bottom-left-radius: 0;
|
|
250
|
+
border-top-left-radius: 0;
|
|
251
|
+
color: var(--react-international-phone-text-color, #222);
|
|
252
|
+
font-family: inherit;
|
|
253
|
+
font-size: var(--react-international-phone-font-size, 13px);
|
|
254
|
+
|
|
255
|
+
&:focus {
|
|
256
|
+
outline: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&--disabled {
|
|
260
|
+
background-color: var(--react-international-phone-disabled-background-color, whitesmoke);
|
|
261
|
+
color: var(--react-international-phone-disabled-text-color, #666);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { isEmpty as e } from "../../utilities/validations.esm.js";
|
|
3
|
-
import t from "./Input.module.esm.js";
|
|
4
|
-
import { InputWrapper as n } from "./InputWrapper.esm.js";
|
|
5
|
-
import r from "clsx";
|
|
6
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
-
import { useId as o } from "react";
|
|
8
|
-
//#region src/components/Input/Input.tsx
|
|
9
|
-
var s = ({ label: s, id: c, labelPosition: l = "top", required: u = !1, type: d = "text", error: f, endAdornment: p, style: m, className: h, ...g }) => {
|
|
10
|
-
let _ = o(), v = c || _;
|
|
11
|
-
return /* @__PURE__ */ i(n, {
|
|
12
|
-
className: h,
|
|
13
|
-
label: s,
|
|
14
|
-
labelPosition: l,
|
|
15
|
-
error: f,
|
|
16
|
-
required: u,
|
|
17
|
-
style: m,
|
|
18
|
-
children: /* @__PURE__ */ a("span", {
|
|
19
|
-
className: t.inputField,
|
|
20
|
-
"data-has-end-adornment": !e(p),
|
|
21
|
-
children: [/* @__PURE__ */ i("input", {
|
|
22
|
-
id: v,
|
|
23
|
-
type: d,
|
|
24
|
-
className: r(t.input, d),
|
|
25
|
-
...g
|
|
26
|
-
}), !e(p) && /* @__PURE__ */ i("span", {
|
|
27
|
-
className: t.inputAdornment,
|
|
28
|
-
children: p
|
|
29
|
-
})]
|
|
30
|
-
})
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { s as Input };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@layer craftsman-base{._wrapper_1xyh8_2[data-label-position=inside]{--react-international-phone-height:50px;--react-international-phone-border-radius:8px;--react-international-phone-border-color:silver;position:relative}}._wrapper_1xyh8_2 label ._inputLabel_1xyh8_9{margin-bottom:calc(var(--w-gutter) * .25)}._wrapper_1xyh8_2[data-required=true] label ._inputLabel_1xyh8_9:after{content:"*";color:var(--red700)}._wrapper_1xyh8_2[data-label-position=left] label{align-items:center;display:inline-flex}._wrapper_1xyh8_2[data-label-position=left] label ._inputLabel_1xyh8_9{width:fit-content;margin-right:calc(var(--w-gutter) * .75)}._wrapper_1xyh8_2[data-label-position=left]._textarea_1xyh8_24 label{align-items:flex-start}._wrapper_1xyh8_2[data-label-position=bottom] label{flex-direction:column-reverse;align-items:flex-start;display:inline-flex}._wrapper_1xyh8_2[data-label-position=bottom] label ._inputLabel_1xyh8_9{margin-bottom:0;margin-top:calc(var(--w-gutter) * .25)}._wrapper_1xyh8_2[data-label-position=right] label{flex-direction:row-reverse;align-items:baseline;display:inline-flex}._wrapper_1xyh8_2[data-label-position=right] label ._inputLabel_1xyh8_9{margin-left:calc(var(--w-gutter) * .25);margin-bottom:0}._wrapper_1xyh8_2[data-label-position=inside] ._inputLabel_1xyh8_9{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}._wrapper_1xyh8_2[data-label-position=inside]>label>._inputField_1xyh8_56>._input_1xyh8_9,._wrapper_1xyh8_2[data-label-position=inside]>._input_1xyh8_9{transition:border-color .2s}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75);color:var(--blue500)}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._input_1xyh8_9{border-color:var(--blue500)}._wrapper_1xyh8_2[data-label-position=inside]:focus-within ._input_1xyh8_9::placeholder{opacity:1}._wrapper_1xyh8_2[data-label-position=inside][data-has-input=true] ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside]:has(._input_1xyh8_9:not(:placeholder-shown)) ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside]:has(._input_1xyh8_9:-webkit-autofill) ._inputLabel_1xyh8_9{top:-.5rem;left:calc(var(--w-gutter) * .125);font-size:calc(var(--w-text) * .75)}._wrapper_1xyh8_2[data-label-position=inside] ._input_1xyh8_9[type=tel]{width:100%}._wrapper_1xyh8_2[data-label-position=inside] ._input_1xyh8_9::placeholder{opacity:0;transition:opacity .2s}._inputField_1xyh8_56{align-items:center;display:inline-flex;position:relative}._inputField_1xyh8_56[data-has-end-adornment=true]>._input_1xyh8_9{width:100%;padding-right:calc(var(--w-gutter) * 1.5)}._inputAdornment_1xyh8_95{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%)}._error_1xyh8_106{margin-top:calc(var(--w-gutter) * .25);font-size:calc(var(--w-text) * .75);color:var(--red600)}._inputViewToggle_1xyh8_112{align-items:"center";padding:0;line-height:1;display:inline-flex}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import './Input.module.css';//#region src/components/Input/Input.module.scss
|
|
2
|
-
var e = "_wrapper_1xyh8_2", t = "_inputLabel_1xyh8_9", n = "_textarea_1xyh8_24", r = "_inputField_1xyh8_56", i = "_input_1xyh8_9", a = "_inputAdornment_1xyh8_95", o = "_error_1xyh8_106", s = "_inputViewToggle_1xyh8_112", c = {
|
|
3
|
-
wrapper: e,
|
|
4
|
-
inputLabel: t,
|
|
5
|
-
textarea: n,
|
|
6
|
-
inputField: r,
|
|
7
|
-
input: i,
|
|
8
|
-
inputAdornment: a,
|
|
9
|
-
error: o,
|
|
10
|
-
inputViewToggle: s
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { c as default, o as error, i as input, a as inputAdornment, r as inputField, t as inputLabel, s as inputViewToggle, n as textarea, e as wrapper };
|