commit bfa312651ddc04ea9754ebcdfcc1e66fc3f92dab Author: zakhy Date: Tue Sep 24 08:13:46 2024 +0700 setup diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..53c41ed --- /dev/null +++ b/css/style.css @@ -0,0 +1,112 @@ +@import "../fonts/Manrope/font.css"; + +.inputs { + width: 500px; + display: flex; + flex-direction: column; + gap: 40px; +} + +/*colors.css*/ +:root { + --border-gray: #C9C8D3; + --c-primary: #0A5BFF; + --text-gray: #8A8894; + --text-dark: #00133B; + --input-bg: #fff +} + +/*inputs.css*/ + +/* Основные стили для полей ввода */ +.c-input { + background-color: var(--input-bg); + border: 2px solid var(--border-gray); + width: 100%; + height: 57px; + border-radius: 8px; + + font-family: Manrope, sans-serif; + font-size: 18px; + color: var(--text-gray); + padding-left: 16px; + transition: border 0.3s ease, color 0.3s ease +} + +.c-input:focus { + color: var(--text-dark); + border: 2px solid var(--c-primary); + outline: none; +} + +.c-label { + color: var(--text-gray); + font-size: 14px; + font-family: Manrope, sans-serif; + padding: 0 16px 4px 16px; + transition: color 0.3s ease; + cursor: pointer; +} + +.c-labeled-input { + user-select: none; /* Для современных браузеров */ + -moz-user-select: none; /* Для Firefox */ + -webkit-user-select: none; /* Для Safari */ + -ms-user-select: none; /* Для Internet Explorer/Edge */ +} + +.c-labeled-input:focus-within .c-label { + color: var(--c-primary); +} + +@keyframes focus-border-animation { + from { + border-color: var(--border-gray); + } + to { + border-color: var(--c-primary); + } +} + +.c-input:focus { + animation: focus-border-animation 0.3s forwards; +} + +/*password*/ + + +/*num*/ +input[type="number"] { + -webkit-appearance: textfield; + -moz-appearance: textfield; + appearance: textfield; +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; +} + +/*date*/ +.calendar-icon { + position: absolute; + right: 10px; + top: 50%; + pointer-events: none; /* Иконка не будет мешать кликам по input */ + font-size: 18px; /* Размер иконки */ + color: #555; /* Цвет иконки */ +} + +.calendar-icon { + color: #8A8894; /* Цвет иконки - красный */ +} + +.input-with-icon:focus-within .calendar-icon { + color: var(--c-primary); +} + +.input-with-icon { + position: relative; + display: inline-block; +} + diff --git a/fonts/Manrope/Manrope-Bold.eot b/fonts/Manrope/Manrope-Bold.eot new file mode 100644 index 0000000..df4bb88 Binary files /dev/null and b/fonts/Manrope/Manrope-Bold.eot differ diff --git a/fonts/Manrope/Manrope-Bold.ttf b/fonts/Manrope/Manrope-Bold.ttf new file mode 100644 index 0000000..4b166d5 Binary files /dev/null and b/fonts/Manrope/Manrope-Bold.ttf differ diff --git a/fonts/Manrope/Manrope-Bold.woff b/fonts/Manrope/Manrope-Bold.woff new file mode 100644 index 0000000..5207c76 Binary files /dev/null and b/fonts/Manrope/Manrope-Bold.woff differ diff --git a/fonts/Manrope/Manrope-Bold.woff2 b/fonts/Manrope/Manrope-Bold.woff2 new file mode 100644 index 0000000..3ed719c Binary files /dev/null and b/fonts/Manrope/Manrope-Bold.woff2 differ diff --git a/fonts/Manrope/Manrope-ExtraBold.eot b/fonts/Manrope/Manrope-ExtraBold.eot new file mode 100644 index 0000000..1d260a6 Binary files /dev/null and b/fonts/Manrope/Manrope-ExtraBold.eot differ diff --git a/fonts/Manrope/Manrope-ExtraBold.ttf b/fonts/Manrope/Manrope-ExtraBold.ttf new file mode 100644 index 0000000..36a63ac Binary files /dev/null and b/fonts/Manrope/Manrope-ExtraBold.ttf differ diff --git a/fonts/Manrope/Manrope-ExtraBold.woff b/fonts/Manrope/Manrope-ExtraBold.woff new file mode 100644 index 0000000..2a47406 Binary files /dev/null and b/fonts/Manrope/Manrope-ExtraBold.woff differ diff --git a/fonts/Manrope/Manrope-ExtraBold.woff2 b/fonts/Manrope/Manrope-ExtraBold.woff2 new file mode 100644 index 0000000..e9dd2a4 Binary files /dev/null and b/fonts/Manrope/Manrope-ExtraBold.woff2 differ diff --git a/fonts/Manrope/Manrope-Light.eot b/fonts/Manrope/Manrope-Light.eot new file mode 100644 index 0000000..0b1443c Binary files /dev/null and b/fonts/Manrope/Manrope-Light.eot differ diff --git a/fonts/Manrope/Manrope-Light.ttf b/fonts/Manrope/Manrope-Light.ttf new file mode 100644 index 0000000..fa1aac6 Binary files /dev/null and b/fonts/Manrope/Manrope-Light.ttf differ diff --git a/fonts/Manrope/Manrope-Light.woff b/fonts/Manrope/Manrope-Light.woff new file mode 100644 index 0000000..8821981 Binary files /dev/null and b/fonts/Manrope/Manrope-Light.woff differ diff --git a/fonts/Manrope/Manrope-Light.woff2 b/fonts/Manrope/Manrope-Light.woff2 new file mode 100644 index 0000000..9c48431 Binary files /dev/null and b/fonts/Manrope/Manrope-Light.woff2 differ diff --git a/fonts/Manrope/Manrope-Medium.eot b/fonts/Manrope/Manrope-Medium.eot new file mode 100644 index 0000000..82e9dc5 Binary files /dev/null and b/fonts/Manrope/Manrope-Medium.eot differ diff --git a/fonts/Manrope/Manrope-Medium.ttf b/fonts/Manrope/Manrope-Medium.ttf new file mode 100644 index 0000000..2be1a95 Binary files /dev/null and b/fonts/Manrope/Manrope-Medium.ttf differ diff --git a/fonts/Manrope/Manrope-Medium.woff b/fonts/Manrope/Manrope-Medium.woff new file mode 100644 index 0000000..d8f92be Binary files /dev/null and b/fonts/Manrope/Manrope-Medium.woff differ diff --git a/fonts/Manrope/Manrope-Medium.woff2 b/fonts/Manrope/Manrope-Medium.woff2 new file mode 100644 index 0000000..4d3a8d7 Binary files /dev/null and b/fonts/Manrope/Manrope-Medium.woff2 differ diff --git a/fonts/Manrope/Manrope-Regular.eot b/fonts/Manrope/Manrope-Regular.eot new file mode 100644 index 0000000..f217d1b Binary files /dev/null and b/fonts/Manrope/Manrope-Regular.eot differ diff --git a/fonts/Manrope/Manrope-Regular.ttf b/fonts/Manrope/Manrope-Regular.ttf new file mode 100644 index 0000000..4c0d426 Binary files /dev/null and b/fonts/Manrope/Manrope-Regular.ttf differ diff --git a/fonts/Manrope/Manrope-Regular.woff b/fonts/Manrope/Manrope-Regular.woff new file mode 100644 index 0000000..d5ae798 Binary files /dev/null and b/fonts/Manrope/Manrope-Regular.woff differ diff --git a/fonts/Manrope/Manrope-Regular.woff2 b/fonts/Manrope/Manrope-Regular.woff2 new file mode 100644 index 0000000..31bf12c Binary files /dev/null and b/fonts/Manrope/Manrope-Regular.woff2 differ diff --git a/fonts/Manrope/Manrope-Semibold.eot b/fonts/Manrope/Manrope-Semibold.eot new file mode 100644 index 0000000..6635127 Binary files /dev/null and b/fonts/Manrope/Manrope-Semibold.eot differ diff --git a/fonts/Manrope/Manrope-Semibold.ttf b/fonts/Manrope/Manrope-Semibold.ttf new file mode 100644 index 0000000..e14fd52 Binary files /dev/null and b/fonts/Manrope/Manrope-Semibold.ttf differ diff --git a/fonts/Manrope/Manrope-Semibold.woff b/fonts/Manrope/Manrope-Semibold.woff new file mode 100644 index 0000000..9f401e6 Binary files /dev/null and b/fonts/Manrope/Manrope-Semibold.woff differ diff --git a/fonts/Manrope/Manrope-Semibold.woff2 b/fonts/Manrope/Manrope-Semibold.woff2 new file mode 100644 index 0000000..734bea6 Binary files /dev/null and b/fonts/Manrope/Manrope-Semibold.woff2 differ diff --git a/fonts/Manrope/Manrope-Thin.eot b/fonts/Manrope/Manrope-Thin.eot new file mode 100644 index 0000000..b9718b4 Binary files /dev/null and b/fonts/Manrope/Manrope-Thin.eot differ diff --git a/fonts/Manrope/Manrope-Thin.ttf b/fonts/Manrope/Manrope-Thin.ttf new file mode 100644 index 0000000..a30f760 Binary files /dev/null and b/fonts/Manrope/Manrope-Thin.ttf differ diff --git a/fonts/Manrope/Manrope-Thin.woff b/fonts/Manrope/Manrope-Thin.woff new file mode 100644 index 0000000..3888303 Binary files /dev/null and b/fonts/Manrope/Manrope-Thin.woff differ diff --git a/fonts/Manrope/Manrope-Thin.woff2 b/fonts/Manrope/Manrope-Thin.woff2 new file mode 100644 index 0000000..52b0254 Binary files /dev/null and b/fonts/Manrope/Manrope-Thin.woff2 differ diff --git a/fonts/Manrope/font.css b/fonts/Manrope/font.css new file mode 100644 index 0000000..948fb3e --- /dev/null +++ b/fonts/Manrope/font.css @@ -0,0 +1,84 @@ +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Bold.eot'); + src: local('Manrope Bold'), local('Manrope-Bold'), + url('Manrope-Bold.eot?#iefix') format('embedded-opentype'), + url('Manrope-Bold.woff2') format('woff2'), + url('Manrope-Bold.woff') format('woff'), + url('Manrope-Bold.ttf') format('truetype'); + font-weight: bold; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Semibold.eot'); + src: local('Manrope Semibold'), local('Manrope-Semibold'), + url('Manrope-Semibold.eot?#iefix') format('embedded-opentype'), + url('Manrope-Semibold.woff2') format('woff2'), + url('Manrope-Semibold.woff') format('woff'), + url('Manrope-Semibold.ttf') format('truetype'); + font-weight: 600; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Regular.eot'); + src: local('Manrope Regular'), local('Manrope-Regular'), + url('Manrope-Regular.eot?#iefix') format('embedded-opentype'), + url('Manrope-Regular.woff2') format('woff2'), + url('Manrope-Regular.woff') format('woff'), + url('Manrope-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Light.eot'); + src: local('Manrope Light'), local('Manrope-Light'), + url('Manrope-Light.eot?#iefix') format('embedded-opentype'), + url('Manrope-Light.woff2') format('woff2'), + url('Manrope-Light.woff') format('woff'), + url('Manrope-Light.ttf') format('truetype'); + font-weight: 300; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Thin.eot'); + src: local('Manrope Thin'), local('Manrope-Thin'), + url('Manrope-Thin.eot?#iefix') format('embedded-opentype'), + url('Manrope-Thin.woff2') format('woff2'), + url('Manrope-Thin.woff') format('woff'), + url('Manrope-Thin.ttf') format('truetype'); + font-weight: 100; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-Medium.eot'); + src: local('Manrope Medium'), local('Manrope-Medium'), + url('Manrope-Medium.eot?#iefix') format('embedded-opentype'), + url('Manrope-Medium.woff2') format('woff2'), + url('Manrope-Medium.woff') format('woff'), + url('Manrope-Medium.ttf') format('truetype'); + font-weight: 500; + font-style: normal; +} + +@font-face { + font-family: 'Manrope'; + src: url('Manrope-ExtraBold.eot'); + src: local('Manrope ExtraBold'), local('Manrope-ExtraBold'), + url('Manrope-ExtraBold.eot?#iefix') format('embedded-opentype'), + url('Manrope-ExtraBold.woff2') format('woff2'), + url('Manrope-ExtraBold.woff') format('woff'), + url('Manrope-ExtraBold.ttf') format('truetype'); + font-weight: 800; + font-style: normal; +} + diff --git a/icons/calendar.svg b/icons/calendar.svg new file mode 100644 index 0000000..dd41558 --- /dev/null +++ b/icons/calendar.svg @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..9ada912 --- /dev/null +++ b/index.html @@ -0,0 +1,93 @@ + + + + + + + + + + Библиотека UI компонентов + + +
+ +
+

Поля ввода

+

Строка

+
+
+ + +
+
+ + + +
+
+

Число

+
+
+ + +
+
+

Дата

+
+
+ + + + + + + + + + +
+
+
+ + +
+

Кнопки & ссылки

+
+ +
+
+
+ + + + + + + diff --git a/inputWithCalculator.html b/inputWithCalculator.html new file mode 100644 index 0000000..580a50a --- /dev/null +++ b/inputWithCalculator.html @@ -0,0 +1,253 @@ + + + + + + + + Input с калькулятором + + + + +

Поле ввода с калькулятором

+
+ + + +
+ + + + + + + diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..e69de29 diff --git a/js/showPassword.js b/js/showPassword.js new file mode 100644 index 0000000..7fc47ee --- /dev/null +++ b/js/showPassword.js @@ -0,0 +1,20 @@ +document.addEventListener('DOMContentLoaded', () => { + const targetEl = document.querySelector('.passwordVisibilityToggle') + targetEl.addEventListener('click', () => { + const parent = targetEl.parentNode + const childrenArr = Array.from(parent.children); + for (let item of childrenArr) { + if (item.localName === 'input') { + if (item.getAttribute('type') === 'password') { + targetEl.textContent = 'Скрыть пароль' + item.setAttribute('type', 'text'); + } else { + item.setAttribute('type', 'password'); + targetEl.textContent = 'Показать пароль' + } + return false; + } + } + + }) +}) \ No newline at end of file