@stamcat/craftsman 0.0.27-alpha.2 → 0.0.27-alpha.4
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/AGENTS.md +54 -2
- package/Components.esm.js +11 -9
- package/README.md +5 -0
- package/Styles.esm.js +5 -5
- package/package.json +5 -4
- package/src/components/Button.d.ts +1 -1
- package/src/components/Button.esm.js +14 -16
- package/src/components/{Checkbox.esm.js → Input/Checkbox.esm.js} +1 -1
- package/src/components/Input/Input.d.ts +6 -0
- package/src/components/Input/Input.esm.js +33 -0
- package/src/components/Input/Input.module.css +1 -0
- package/src/components/Input/Input.module.esm.js +13 -0
- package/src/components/Input/Input.module.scss +165 -0
- package/src/components/{InputPassword.d.ts → Input/InputPassword.d.ts} +1 -1
- package/src/components/Input/InputPassword.esm.js +29 -0
- package/src/components/Input/InputWrapper.d.ts +11 -0
- package/src/components/Input/InputWrapper.esm.js +28 -0
- package/src/components/{RadioButton.esm.js → Input/RadioButton.esm.js} +1 -1
- package/src/components/Input/Textarea.d.ts +3 -0
- package/src/components/Input/Textarea.esm.js +25 -0
- package/src/components/Modal.esm.js +18 -26
- package/src/components/Modal.module.css +1 -1
- package/src/components/Modal.module.esm.js +6 -3
- package/src/components/Modal.module.scss +28 -14
- package/src/components/index.d.ts +5 -4
- package/src/styles/components/ThemeProvider.esm.js +1 -1
- package/src/styles/global/components/_button.scss +52 -51
- package/src/styles/global/components/_checkbox.scss +63 -59
- package/src/styles/global/components/_code.scss +19 -15
- package/src/styles/global/components/_input.scss +35 -37
- package/src/styles/global/components/_radioButton.scss +29 -26
- package/src/styles/global/components/_typography.scss +61 -6
- package/src/styles/global/components/loaders.module.css +1 -1
- package/src/styles/global/components/loaders.module.esm.js +1 -1
- package/src/styles/global/components/loaders.module.scss +2 -1
- package/src/styles/global/globalStyles.module.scss +1 -129
- package/src/styles/global/globalStyles.scss +83 -1
- package/src/styles/index.d.ts +1 -1
- package/src/styles/theme/components.esm.js +11 -5
- package/src/styles/theme/theme.esm.js +29 -43
- package/src/styles/theme/types.d.ts +1 -1
- package/src/styles/utilities/_functions.scss +116 -0
- package/src/styles/utilities/_mixins.scss +0 -0
- package/src/styles/utilities/color.d.ts +1 -1
- package/src/styles/utilities/constants.d.ts +1 -1
- package/src/styles/utilities/layout.d.ts +1 -1
- package/src/styles/utilities/layout.esm.js +1 -1
- package/src/{styles/utilities → utilities}/types.d.ts +7 -1
- package/src/{styles/utilities → utilities}/types.esm.js +6 -2
- package/src/components/Button.module.css +0 -1
- package/src/components/Button.module.esm.js +0 -9
- package/src/components/Button.module.scss +0 -5
- package/src/components/Input.d.ts +0 -11
- package/src/components/Input.esm.js +0 -41
- package/src/components/Input.module.css +0 -1
- package/src/components/Input.module.esm.js +0 -11
- package/src/components/Input.module.scss +0 -141
- package/src/components/InputPassword.esm.js +0 -33
- package/src/styles/global/components/_mixins.scss +0 -2
- package/src/styles/global/components/button.d.ts +0 -7
- /package/src/components/{Checkbox.d.ts → Input/Checkbox.d.ts} +0 -0
- /package/src/components/{RadioButton.d.ts → Input/RadioButton.d.ts} +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import './Input.module.css';//#region src/components/Input.module.scss
|
|
2
|
-
var e = "_wrapper_h3ihm_1", t = "_inputLabel_h3ihm_8", n = "_input_h3ihm_8", r = "_inputField_h3ihm_58", i = "_inputAdornment_h3ihm_89", a = "_error_h3ihm_100", o = {
|
|
3
|
-
wrapper: e,
|
|
4
|
-
inputLabel: t,
|
|
5
|
-
input: n,
|
|
6
|
-
inputField: r,
|
|
7
|
-
inputAdornment: i,
|
|
8
|
-
error: a
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { o as default, a as error, n as input, i as inputAdornment, r as inputField, t as inputLabel, e as wrapper };
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
@use "../styles/global/components/input";
|
|
2
|
-
|
|
3
|
-
.wrapper {
|
|
4
|
-
label {
|
|
5
|
-
.inputLabel {
|
|
6
|
-
margin-bottom: calc(var(--w-gutter, 16px) * 0.25);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&[data-required="true"] {
|
|
11
|
-
label {
|
|
12
|
-
.inputLabel {
|
|
13
|
-
&::after {
|
|
14
|
-
content: "*";
|
|
15
|
-
color: var(--red700);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&[data-label-position="left"] {
|
|
22
|
-
label {
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
|
|
26
|
-
.inputLabel {
|
|
27
|
-
width: fit-content;
|
|
28
|
-
margin-right: calc(var(--w-gutter, 16px) * 0.75);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&[data-label-position="bottom"] {
|
|
34
|
-
label {
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
flex-direction: column-reverse;
|
|
37
|
-
align-items: flex-start;
|
|
38
|
-
|
|
39
|
-
.inputLabel {
|
|
40
|
-
margin-bottom: 0;
|
|
41
|
-
margin-top: calc(var(--w-gutter, 16px) * 0.25);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&[data-label-position="right"] {
|
|
47
|
-
label {
|
|
48
|
-
display: inline-flex;
|
|
49
|
-
flex-direction: row-reverse;
|
|
50
|
-
align-items: baseline;
|
|
51
|
-
|
|
52
|
-
.inputLabel {
|
|
53
|
-
margin-left: calc(var(--w-gutter, 16px) * 0.25);
|
|
54
|
-
margin-bottom: 0;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&[data-label-position="inside"] {
|
|
60
|
-
@extend %inside-input-label-base;
|
|
61
|
-
|
|
62
|
-
.inputLabel {
|
|
63
|
-
position: absolute;
|
|
64
|
-
background-color: var(--white);
|
|
65
|
-
z-index: 1;
|
|
66
|
-
width: fit-content;
|
|
67
|
-
padding: 0 5px;
|
|
68
|
-
top: calc(var(--w-gutter, 16px) * 0.25);
|
|
69
|
-
left: calc(var(--w-gutter, 16px) * 0.25);
|
|
70
|
-
pointer-events: none;
|
|
71
|
-
transition: top 150ms ease, left 150ms ease, font-size 150ms ease, color 150ms ease;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
> label > .inputField > .input,
|
|
75
|
-
> .input {
|
|
76
|
-
transition: border-color 200ms ease;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&:focus-within {
|
|
80
|
-
.inputLabel {
|
|
81
|
-
@extend %inside-input-label-floating;
|
|
82
|
-
color: var(--blue500);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.input {
|
|
86
|
-
border-color: var(--blue500);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.input::placeholder {
|
|
90
|
-
opacity: 1;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&:has(.input:not(:placeholder-shown)),
|
|
95
|
-
&:has(.input:-webkit-autofill),
|
|
96
|
-
&[data-has-input="true"] {
|
|
97
|
-
.inputLabel {
|
|
98
|
-
@extend %inside-input-label-floating;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.input[type="tel"] {
|
|
103
|
-
width: 100%;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.input::placeholder {
|
|
107
|
-
opacity: 0;
|
|
108
|
-
transition: opacity 200ms ease;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.inputField {
|
|
114
|
-
position: relative;
|
|
115
|
-
display: inline-flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
|
|
118
|
-
&[data-has-end-adornment="true"] {
|
|
119
|
-
> .input {
|
|
120
|
-
width: 100%;
|
|
121
|
-
padding-right: calc(calc(var(--w-gutter, 16px) * 0.5) + 24px + calc(var(--w-gutter, 16px) * 0.5));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.inputAdornment {
|
|
127
|
-
position: absolute;
|
|
128
|
-
right: calc(var(--w-gutter, 16px) * 0.5);
|
|
129
|
-
top: 50%;
|
|
130
|
-
transform: translateY(-50%);
|
|
131
|
-
margin-top: 0;
|
|
132
|
-
z-index: 1;
|
|
133
|
-
display: inline-flex;
|
|
134
|
-
align-items: center;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.error {
|
|
138
|
-
margin-top: calc(var(--w-gutter, 16px) * 0.25);
|
|
139
|
-
font-size: calc(var(--w-text, 14px) * 0.75);
|
|
140
|
-
color: var(--red600);
|
|
141
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Button as e } from "./Button.esm.js";
|
|
3
|
-
import { Input as t } from "./Input.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";
|
|
7
|
-
//#region src/components/InputPassword.tsx
|
|
8
|
-
var o = {
|
|
9
|
-
padding: 0,
|
|
10
|
-
display: "inline-flex",
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
lineHeight: 1
|
|
13
|
-
}, s = ({ visible: t, onToggle: r }) => /* @__PURE__ */ n(e, {
|
|
14
|
-
type: "button",
|
|
15
|
-
variant: "text",
|
|
16
|
-
onClick: r,
|
|
17
|
-
"aria-label": t ? "Hide password" : "Show password",
|
|
18
|
-
"aria-pressed": t,
|
|
19
|
-
styles: o,
|
|
20
|
-
children: n(t ? i : a, { size: 16 })
|
|
21
|
-
}), c = ({ type: e = "password", ...i }) => {
|
|
22
|
-
let [a, o] = r(!1), c = a ? "text" : e;
|
|
23
|
-
return /* @__PURE__ */ n(t, {
|
|
24
|
-
...i,
|
|
25
|
-
type: c,
|
|
26
|
-
endAdornment: /* @__PURE__ */ n(s, {
|
|
27
|
-
visible: a,
|
|
28
|
-
onToggle: () => o((e) => !e)
|
|
29
|
-
})
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { c as InputPassword };
|
|
File without changes
|
|
File without changes
|