mimir-ui-kit 1.9.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/README.md +62 -54
  2. package/dist/{NavigationButtons-cTsXB7GS.js → NavigationButtons-B8tMfqrg.js} +18 -18
  3. package/dist/assets/Button.css +1 -1
  4. package/dist/assets/Input.css +1 -1
  5. package/dist/assets/OtpInput.css +1 -1
  6. package/dist/assets/RadioGroup.css +1 -1
  7. package/dist/assets/Slider.css +1 -1
  8. package/dist/assets/index.css +1 -1
  9. package/dist/components/Button/Button.d.ts +1 -0
  10. package/dist/components/Button/Button.js +25 -25
  11. package/dist/components/Input/Input.d.ts +2 -2
  12. package/dist/components/Input/Input.js +15 -15
  13. package/dist/components/InputPassword/InputPassword.js +2 -2
  14. package/dist/components/InputPhoneNumber/InputPhoneNumber.js +1 -1
  15. package/dist/components/MergedButton/MergedButton.d.ts +1 -1
  16. package/dist/components/MergedButton/MergedButton.js +2 -2
  17. package/dist/components/OtpInput/OtpInput.js +6 -6
  18. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -18
  19. package/dist/components/RadioGroup/RadioGroup.js +1061 -127
  20. package/dist/components/RadioGroup/index.d.ts +1 -1
  21. package/dist/components/Slider/NavigationButtons/NavigationButtons.js +1 -1
  22. package/dist/components/Slider/NavigationButtons/index.js +1 -1
  23. package/dist/components/Slider/Slider.js +10 -10
  24. package/dist/components/Tag/Tag.d.ts +79 -0
  25. package/dist/components/Tag/Tag.js +99 -0
  26. package/dist/components/Tag/constants.d.ts +41 -0
  27. package/dist/components/Tag/constants.js +55 -0
  28. package/dist/components/Tag/index.d.ts +3 -0
  29. package/dist/components/Tag/index.js +8 -0
  30. package/dist/components/Tag/types.d.ts +6 -0
  31. package/dist/components/Tag/types.js +1 -0
  32. package/dist/components/index.d.ts +1 -10
  33. package/dist/components/index.js +0 -14
  34. package/dist/hooks/index.d.ts +0 -3
  35. package/dist/hooks/index.js +1 -7
  36. package/dist/index.d.ts +0 -1
  37. package/dist/index.js +1 -23
  38. package/package.json +128 -127
  39. package/dist/DatePickerModal-DUUCHAWF.js +0 -204
  40. package/dist/assets/DatePickerModal.css +0 -1
  41. package/dist/assets/Drawer.css +0 -1
  42. package/dist/assets/SelectSearch.css +0 -1
  43. package/dist/assets/Switch.css +0 -1
  44. package/dist/assets/Timer.css +0 -1
  45. package/dist/components/DatePicker/DatePicker.d.ts +0 -44
  46. package/dist/components/DatePicker/DatePicker.js +0 -69
  47. package/dist/components/DatePicker/DatePickerModal.d.ts +0 -8
  48. package/dist/components/DatePicker/DatePickerModal.js +0 -9
  49. package/dist/components/DatePicker/constants.d.ts +0 -6
  50. package/dist/components/DatePicker/constants.js +0 -11
  51. package/dist/components/DatePicker/index.d.ts +0 -2
  52. package/dist/components/DatePicker/index.js +0 -4
  53. package/dist/components/Drawer/Drawer.d.ts +0 -38
  54. package/dist/components/Drawer/Drawer.js +0 -144
  55. package/dist/components/Drawer/constants.d.ts +0 -5
  56. package/dist/components/Drawer/constants.js +0 -9
  57. package/dist/components/Drawer/index.d.ts +0 -2
  58. package/dist/components/Drawer/index.js +0 -6
  59. package/dist/components/Portal/Portal.d.ts +0 -7
  60. package/dist/components/Portal/Portal.js +0 -10
  61. package/dist/components/Portal/index.d.ts +0 -1
  62. package/dist/components/Portal/index.js +0 -4
  63. package/dist/components/SelectSearch/SelectSearch.d.ts +0 -15
  64. package/dist/components/SelectSearch/SelectSearch.js +0 -3961
  65. package/dist/components/SelectSearch/constants.d.ts +0 -4
  66. package/dist/components/SelectSearch/constants.js +0 -8
  67. package/dist/components/SelectSearch/index.d.ts +0 -2
  68. package/dist/components/SelectSearch/index.js +0 -6
  69. package/dist/components/Switch/Switch.d.ts +0 -294
  70. package/dist/components/Switch/Switch.js +0 -57
  71. package/dist/components/Switch/index.d.ts +0 -2
  72. package/dist/components/Switch/index.js +0 -4
  73. package/dist/components/Timer/Timer.d.ts +0 -24
  74. package/dist/components/Timer/Timer.js +0 -29
  75. package/dist/components/Timer/index.d.ts +0 -1
  76. package/dist/components/Timer/index.js +0 -4
  77. package/dist/focus-management-CFDo6ZSc.js +0 -91
  78. package/dist/hooks/useClickOutside/index.d.ts +0 -1
  79. package/dist/hooks/useClickOutside/index.js +0 -4
  80. package/dist/hooks/useClickOutside/useClickOutside.d.ts +0 -7
  81. package/dist/hooks/useClickOutside/useClickOutside.js +0 -25
  82. package/dist/hooks/useInterval/index.d.ts +0 -1
  83. package/dist/hooks/useInterval/index.js +0 -4
  84. package/dist/hooks/useInterval/useInterval.d.ts +0 -1
  85. package/dist/hooks/useInterval/useInterval.js +0 -17
  86. package/dist/hooks/useLockBodyScroll/index.d.ts +0 -1
  87. package/dist/hooks/useLockBodyScroll/index.js +0 -4
  88. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.d.ts +0 -6
  89. package/dist/hooks/useLockBodyScroll/useLockBodyScroll.js +0 -20
  90. package/dist/hooks/useTimer/index.d.ts +0 -18
  91. package/dist/hooks/useTimer/index.js +0 -83
  92. package/dist/hooks/useTimer/useTimer.d.ts +0 -18
  93. package/dist/hooks/useTimer/useTimer.js +0 -87
  94. package/dist/hooks/useTimer/utils.d.ts +0 -24
  95. package/dist/hooks/useTimer/utils.js +0 -88
  96. package/dist/label-BXAcSLy0.js +0 -913
  97. package/dist/use-active-press-9MCrfRZk.js +0 -31
  98. package/dist/utils/formating/Date.d.ts +0 -1
  99. package/dist/utils/formating/Date.js +0 -26
  100. package/dist/utils/formating/Month.d.ts +0 -8
  101. package/dist/utils/formating/Month.js +0 -80
  102. package/dist/utils/formating/Numbers.d.ts +0 -6
  103. package/dist/utils/formating/Numbers.js +0 -8
  104. package/dist/utils/index.d.ts +0 -9
  105. package/dist/utils/index.js +0 -11
package/package.json CHANGED
@@ -1,127 +1,128 @@
1
- {
2
- "name": "mimir-ui-kit",
3
- "private": false,
4
- "version": "1.9.1",
5
- "type": "module",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.ts",
9
- "default": "./dist/index.js"
10
- },
11
- "./components": {
12
- "types": "./dist/components/index.d.ts",
13
- "default": "./dist/components/index.js"
14
- },
15
- "./hooks": {
16
- "types": "./dist/hooks/index.d.ts",
17
- "default": "./dist/hooks/index.js"
18
- },
19
- "./icons": {
20
- "types": "./dist/icons/index.d.ts",
21
- "default": "./dist/icons/index.js"
22
- },
23
- "./styles": {
24
- "default": "./dist/assets/index.css"
25
- }
26
- },
27
- "module": "./dist/index.js",
28
- "types": "./dist/index.d.ts",
29
- "files": [
30
- "dist"
31
- ],
32
- "sideEffects": [
33
- "**/*.{css,scss}"
34
- ],
35
- "scripts": {
36
- "build": "tsc --p ./tsconfig-build.json && vite build",
37
- "storybook": "storybook dev -p 6006",
38
- "build-storybook": "storybook build",
39
- "ts:check": "tsc -b",
40
- "lint:fix": "eslint . --ext ts,tsx --fix",
41
- "lint:prettier": "npx prettier . --write",
42
- "lint:stylelint": "stylelint '**/*.module{.css,.scss}'",
43
- "lint:stylelint:fix": "stylelint '**/*.module{.css,.scss}' --fix",
44
- "icons": "svgr --expand-props start ./src/icons/svgs",
45
- "prepare": "husky"
46
- },
47
- "devDependencies": {
48
- "@chromatic-com/storybook": "^1.6.1",
49
- "@headlessui/react": "^2.1.2",
50
- "@laynezh/vite-plugin-lib-assets": "^0.5.23",
51
- "@loadable/component": "^5.15.2",
52
- "@storybook/addon-essentials": "^8.2.2",
53
- "@storybook/addon-interactions": "^8.2.2",
54
- "@storybook/addon-links": "^8.2.2",
55
- "@storybook/addon-onboarding": "^8.2.2",
56
- "@storybook/blocks": "^8.2.2",
57
- "@storybook/builder-vite": "^8.2.2",
58
- "@storybook/react": "^8.2.2",
59
- "@storybook/react-vite": "^8.2.2",
60
- "@storybook/test": "^8.2.2",
61
- "@svgr/cli": "^8.1.0",
62
- "@svgr/core": "^8.1.0",
63
- "@svgr/plugin-svgo": "^8.1.0",
64
- "@types/node": "^20.14.10",
65
- "@types/react": "^18.3.3",
66
- "@types/react-dom": "^18.3.0",
67
- "@typescript-eslint/eslint-plugin": "^7.13.1",
68
- "@typescript-eslint/parser": "^7.13.1",
69
- "@vitejs/plugin-react": "^4.3.1",
70
- "autoprefixer": "^10.4.19",
71
- "chalk": "4.1.2",
72
- "classnames": "^2.5.1",
73
- "dotenv": "^16.4.5",
74
- "eslint": "^8.57.0",
75
- "eslint-config-prettier": "^9.1.0",
76
- "eslint-plugin-import": "^2.29.1",
77
- "eslint-plugin-react-hooks": "^4.6.2",
78
- "eslint-plugin-react-refresh": "^0.4.7",
79
- "eslint-plugin-storybook": "^0.8.0",
80
- "glob": "10.3.10",
81
- "husky": "^9.0.11",
82
- "lint-staged": "^15.2.7",
83
- "p-limit": "^6.1.0",
84
- "postcss-preset-env": "^9.6.0",
85
- "prettier": "^3.3.3",
86
- "react": "^18.3.1",
87
- "react-dom": "^18.3.1",
88
- "sass": "^1.77.7",
89
- "storybook": "^8.2.2",
90
- "stylelint": "^16.7.0",
91
- "stylelint-config-idiomatic-order": "^10.0.0",
92
- "stylelint-config-rational-order": "^0.1.2",
93
- "stylelint-config-standard": "^36.0.1",
94
- "stylelint-order": "^6.0.4",
95
- "stylelint-prettier": "^5.0.0",
96
- "stylelint-scss": "^6.4.0",
97
- "superagent": "^9.0.2",
98
- "typescript": "^5.2.2",
99
- "vite": "^5.3.1",
100
- "vite-plugin-dts": "^3.9.1",
101
- "vite-plugin-lib-inject-css": "^2.1.1",
102
- "vite-plugin-svgr": "^4.2.0"
103
- },
104
- "peerDependencies": {
105
- "@headlessui/react": "^2.1.2",
106
- "react": "^18.3.1",
107
- "react-dom": "^18.3.1"
108
- },
109
- "husky": {
110
- "hooks": {
111
- "pre-commit": "lint-staged"
112
- }
113
- },
114
- "lint-staged": {
115
- "**/*.{ts,tsx}": [
116
- "eslint",
117
- "prettier --write"
118
- ],
119
- "**/*.{css,scss}": [
120
- "stylelint --fix"
121
- ]
122
- },
123
- "dependencies": {
124
- "swiper": "^11.1.5",
125
- "use-clipboard-copy": "^0.2.0"
126
- }
127
- }
1
+ {
2
+ "name": "mimir-ui-kit",
3
+ "private": false,
4
+ "version": "1.10.0",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ },
11
+ "./components": {
12
+ "types": "./dist/components/index.d.ts",
13
+ "default": "./dist/components/index.js"
14
+ },
15
+ "./hooks": {
16
+ "types": "./dist/hooks/index.d.ts",
17
+ "default": "./dist/hooks/index.js"
18
+ },
19
+ "./icons": {
20
+ "types": "./dist/icons/index.d.ts",
21
+ "default": "./dist/icons/index.js"
22
+ },
23
+ "./styles": {
24
+ "default": "./dist/assets/index.css"
25
+ }
26
+ },
27
+ "module": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "sideEffects": [
33
+ "**/*.{css,scss}"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsc --p ./tsconfig-build.json && vite build",
37
+ "storybook": "storybook dev -p 6006",
38
+ "build-storybook": "storybook build",
39
+ "ts:check": "tsc -b",
40
+ "lint:fix": "eslint . --ext ts,tsx --fix",
41
+ "lint:prettier": "npx prettier . --write",
42
+ "lint:stylelint": "stylelint '**/*.module{.css,.scss}'",
43
+ "lint:stylelint:fix": "stylelint '**/*.module{.css,.scss}' --fix",
44
+ "icons": "svgr --expand-props start ./src/icons/svgs",
45
+ "prepare": "husky",
46
+ "create-component": "node createComponent.js"
47
+ },
48
+ "devDependencies": {
49
+ "@chromatic-com/storybook": "^1.6.1",
50
+ "@headlessui/react": "^2.1.2",
51
+ "@laynezh/vite-plugin-lib-assets": "^0.5.23",
52
+ "@loadable/component": "^5.15.2",
53
+ "@storybook/addon-essentials": "^8.2.2",
54
+ "@storybook/addon-interactions": "^8.2.2",
55
+ "@storybook/addon-links": "^8.2.2",
56
+ "@storybook/addon-onboarding": "^8.2.2",
57
+ "@storybook/blocks": "^8.2.2",
58
+ "@storybook/builder-vite": "^8.2.2",
59
+ "@storybook/react": "^8.2.2",
60
+ "@storybook/react-vite": "^8.2.2",
61
+ "@storybook/test": "^8.2.2",
62
+ "@svgr/cli": "^8.1.0",
63
+ "@svgr/core": "^8.1.0",
64
+ "@svgr/plugin-svgo": "^8.1.0",
65
+ "@types/node": "^20.14.10",
66
+ "@types/react": "^18.3.3",
67
+ "@types/react-dom": "^18.3.0",
68
+ "@typescript-eslint/eslint-plugin": "^7.13.1",
69
+ "@typescript-eslint/parser": "^7.13.1",
70
+ "@vitejs/plugin-react": "^4.3.1",
71
+ "autoprefixer": "^10.4.19",
72
+ "chalk": "4.1.2",
73
+ "classnames": "^2.5.1",
74
+ "dotenv": "^16.4.5",
75
+ "eslint": "^8.57.0",
76
+ "eslint-config-prettier": "^9.1.0",
77
+ "eslint-plugin-import": "^2.29.1",
78
+ "eslint-plugin-react-hooks": "^4.6.2",
79
+ "eslint-plugin-react-refresh": "^0.4.7",
80
+ "eslint-plugin-storybook": "^0.8.0",
81
+ "glob": "10.3.10",
82
+ "husky": "^9.0.11",
83
+ "lint-staged": "^15.2.7",
84
+ "p-limit": "^6.1.0",
85
+ "postcss-preset-env": "^9.6.0",
86
+ "prettier": "^3.3.3",
87
+ "react": "^18.3.1",
88
+ "react-dom": "^18.3.1",
89
+ "sass": "^1.77.7",
90
+ "storybook": "^8.2.2",
91
+ "stylelint": "^16.7.0",
92
+ "stylelint-config-idiomatic-order": "^10.0.0",
93
+ "stylelint-config-rational-order": "^0.1.2",
94
+ "stylelint-config-standard": "^36.0.1",
95
+ "stylelint-order": "^6.0.4",
96
+ "stylelint-prettier": "^5.0.0",
97
+ "stylelint-scss": "^6.4.0",
98
+ "superagent": "^9.0.2",
99
+ "typescript": "^5.2.2",
100
+ "vite": "^5.3.1",
101
+ "vite-plugin-dts": "^3.9.1",
102
+ "vite-plugin-lib-inject-css": "^2.1.1",
103
+ "vite-plugin-svgr": "^4.2.0"
104
+ },
105
+ "peerDependencies": {
106
+ "@headlessui/react": "^2.1.2",
107
+ "react": "^18.3.1",
108
+ "react-dom": "^18.3.1"
109
+ },
110
+ "husky": {
111
+ "hooks": {
112
+ "pre-commit": "lint-staged"
113
+ }
114
+ },
115
+ "lint-staged": {
116
+ "**/*.{ts,tsx}": [
117
+ "eslint --ignore-path .eslintignore",
118
+ "prettier --write"
119
+ ],
120
+ "**/*.{css,scss}": [
121
+ "stylelint --fix"
122
+ ]
123
+ },
124
+ "dependencies": {
125
+ "swiper": "^11.1.5",
126
+ "use-clipboard-copy": "^0.2.0"
127
+ }
128
+ }
@@ -1,204 +0,0 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { useRef, useState, useEffect } from "react";
3
- import { week } from "./components/DatePicker/constants.js";
4
- import { formating } from "./utils/index.js";
5
- import { Button } from "./components/Button/Button.js";
6
- import './assets/DatePickerModal.css';const input = "_input_187xq_2";
7
- const wrapper = "_wrapper_187xq_20";
8
- const active = "_active_187xq_26";
9
- const button = "_button_187xq_34";
10
- const h = "_h_187xq_80";
11
- const b = "_b_187xq_34";
12
- const d = "_d_187xq_6";
13
- const m = "_m_187xq_99";
14
- const a = "_a_187xq_26";
15
- const prev = "_prev_187xq_101";
16
- const orange = "_orange_187xq_117";
17
- const current = "_current_187xq_142";
18
- const cls = {
19
- input,
20
- "date-wrapper": "_date-wrapper_187xq_6",
21
- wrapper,
22
- active,
23
- "input-wrapper": "_input-wrapper_187xq_30",
24
- "button-wrapper": "_button-wrapper_187xq_34",
25
- button,
26
- "field-overlow": "_field-overlow_187xq_51",
27
- "calendar-block": "_calendar-block_187xq_57",
28
- h,
29
- b,
30
- d,
31
- m,
32
- a,
33
- prev,
34
- orange,
35
- current
36
- };
37
- function DatePickerModal({
38
- date,
39
- onChangeValue,
40
- setActive,
41
- before
42
- }) {
43
- const field = useRef(null);
44
- const _current = new Date(date);
45
- const _selecte = new Date(date);
46
- const current2 = {
47
- y: _current.getFullYear(),
48
- d: _current.getDate(),
49
- m: _current.getMonth() + 1
50
- };
51
- const selecte = {
52
- y: _selecte.getFullYear(),
53
- d: _selecte.getDate(),
54
- m: _selecte.getMonth() + 1
55
- };
56
- const countWorkDays = 4;
57
- const [month, setMonth] = useState({ y: selecte.y, m: selecte.m });
58
- useEffect(() => {
59
- const windowHeight = window.innerHeight;
60
- if (field.current !== null) {
61
- const inputPosition = field.current.getBoundingClientRect();
62
- const calendarSize = field.current.offsetHeight;
63
- if (windowHeight < inputPosition.y + calendarSize) {
64
- field.current.style.top = -calendarSize + "px";
65
- } else {
66
- field.current.style.top = "65px";
67
- }
68
- field.current.style.opacity = "1";
69
- }
70
- }, [month]);
71
- const countPrevDays = (e) => {
72
- let dayOfWeek = e.getDay();
73
- if (dayOfWeek === 0) dayOfWeek = 7;
74
- return dayOfWeek - 1;
75
- };
76
- const currentMonthIndex = month.m - 1;
77
- const currentMonthFull = new Date(month.y, currentMonthIndex);
78
- const days = [];
79
- const prevDays = () => {
80
- const prevMonth = new Date(currentMonthFull);
81
- prevMonth.setDate(prevMonth.getDate() - 1);
82
- const lastDayPrevMohth = prevMonth.getDate();
83
- const prevList = [];
84
- for (let i = 0; i < countPrevDays(currentMonthFull); i++) {
85
- prevList.push(lastDayPrevMohth - i);
86
- }
87
- prevList.reverse();
88
- return prevList;
89
- };
90
- const prevDaysArray = prevDays();
91
- while (currentMonthFull.getMonth() === currentMonthIndex) {
92
- days.push(currentMonthFull.getDate());
93
- currentMonthFull.setDate(currentMonthFull.getDate() + 1);
94
- }
95
- const nextDays = () => {
96
- const totalViewDays = 42;
97
- const daysCount = totalViewDays - (prevDaysArray.length + days.length);
98
- const nextList = [];
99
- for (let i = 1; i <= daysCount; i++) {
100
- nextList.push(i);
101
- }
102
- return nextList;
103
- };
104
- const nextDaysArray = nextDays();
105
- const update = (m2, y) => {
106
- y = m2 > 12 ? y + 1 : m2 < 1 ? y - 1 : y;
107
- m2 = m2 > 12 ? 1 : m2 < 1 ? 12 : m2;
108
- return { y, m: m2 };
109
- };
110
- const onExit = () => {
111
- setActive(false);
112
- };
113
- const next = () => {
114
- setMonth(update(month.m + 1, month.y));
115
- };
116
- const prev2 = () => {
117
- setMonth(update(month.m - 1, month.y));
118
- };
119
- const isBefore = (activeDate) => {
120
- if (before) {
121
- const beforeDate = before.getTime();
122
- if (beforeDate > activeDate) return true;
123
- }
124
- return false;
125
- };
126
- const send = (searchDate) => {
127
- if (isBefore(
128
- (/* @__PURE__ */ new Date(
129
- `${month.y}-${formating.Number(2, month.m)}-${formating.Number(2, searchDate)}`
130
- )).getTime()
131
- ))
132
- return;
133
- onChangeValue(
134
- /* @__PURE__ */ new Date(
135
- `${month.y}-${formating.Number(2, month.m)}-${formating.Number(2, searchDate)}`
136
- )
137
- );
138
- onExit();
139
- };
140
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: [cls["calendar-block"]].join(" "), ref: field, children: [
141
- /* @__PURE__ */ jsxs("div", { className: cls["h"], children: [
142
- /* @__PURE__ */ jsx(
143
- Button,
144
- {
145
- isIconButton: true,
146
- iconName: "DropdownArrowLeft16px",
147
- onClick: prev2,
148
- variant: "secondary-gray",
149
- size: "l"
150
- }
151
- ),
152
- /* @__PURE__ */ jsxs("div", { className: cls["d"], children: [
153
- formating.Month(month.m).name,
154
- "’",
155
- month.y.toString().slice(-2)
156
- ] }),
157
- /* @__PURE__ */ jsx(
158
- Button,
159
- {
160
- isIconButton: true,
161
- iconName: "DropdownArrowRight16px",
162
- onClick: next,
163
- variant: "secondary-gray",
164
- size: "l"
165
- }
166
- )
167
- ] }),
168
- /* @__PURE__ */ jsxs("div", { className: cls["b"], children: [
169
- week.map((i, s) => /* @__PURE__ */ jsx(
170
- "div",
171
- {
172
- className: `${s > countWorkDays ? [cls["m"], cls["orange"]].join(" ") : cls["m"]}`,
173
- children: i
174
- },
175
- `v${s}`
176
- )),
177
- prevDaysArray.map((el, key) => /* @__PURE__ */ jsx("div", { className: cls["m"], children: el }, key)),
178
- days.map((i, s) => /* @__PURE__ */ jsx(
179
- "div",
180
- {
181
- className: isBefore(
182
- (/* @__PURE__ */ new Date(
183
- `${month.y}-${formating.Number(2, month.m)}-${formating.Number(2, i)}`
184
- )).getTime()
185
- ) ? cls["m"] : cls["a"],
186
- children: i !== 0 ? /* @__PURE__ */ jsx(
187
- "b",
188
- {
189
- className: current2.y === month.y && current2.m === month.m && current2.d === i ? cls["current"] : "",
190
- onClick: () => send(i),
191
- children: i
192
- }
193
- ) : /* @__PURE__ */ jsx("p", {})
194
- },
195
- s
196
- )),
197
- nextDaysArray.map((el, key) => /* @__PURE__ */ jsx("div", { className: cls["m"], children: el }, key))
198
- ] })
199
- ] }) });
200
- }
201
- export {
202
- DatePickerModal as D,
203
- cls as c
204
- };
@@ -1 +0,0 @@
1
- ._input_187xq_2{padding-right:var(--space-3xl)}._date-wrapper_187xq_6{position:relative}._date-wrapper_187xq_6:hover input{background:var(--input-bg-color-hover)}._date-wrapper_187xq_6:before{position:absolute;top:0;right:60px;bottom:0;left:0;z-index:3;cursor:pointer;content:""}._wrapper_187xq_20{position:relative;display:flex;align-items:center;border-radius:var(--control-radius-s)}._wrapper_187xq_20._active_187xq_26{border-bottom:1px solid var(--citrine-100)}._input-wrapper_187xq_30{flex:1}._button-wrapper_187xq_34{position:absolute;top:0;right:0;z-index:2;display:flex;width:44px;height:100%;max-height:var(--button-height-xxl)}._button_187xq_34{align-self:center;background-color:transparent;border-radius:var(--control-radius-s)}._field-overlow_187xq_51{position:fixed;top:0;right:0;bottom:0;left:0;z-index:3}._calendar-block_187xq_57{position:absolute;z-index:3;display:flex;flex-direction:column;width:368px;max-height:none;padding:16px;font-weight:var(--font-weight-text-regular);font-size:var(--size-text-l);font-family:var(--font-inter);font-style:normal;line-height:var(--line-height-text-2xs);text-align:center;text-overflow:ellipsis;background:#fff;border-radius:var(--control-radius-s);box-shadow:0 0 #16172705,0 2px 4px #16172705,0 6px 6px #16172705,0 15px 9px #16172703;opacity:0;transition:height .5s ease-in;font-feature-settings:"zero";font-variant-numeric:slashed-zero}._calendar-block_187xq_57 ._h_187xq_80{display:flex;width:100%;color:var(--black-100)}._calendar-block_187xq_57 ._b_187xq_34{display:grid;grid-template-columns:repeat(7,1fr)}._calendar-block_187xq_57 ._d_187xq_6{display:flex;flex:1;align-items:center;justify-content:center;color:var(--black-100)}._calendar-block_187xq_57 ._m_187xq_99,._calendar-block_187xq_57 ._a_187xq_26,._calendar-block_187xq_57 ._prev_187xq_101{width:48px;height:48px;overflow:hidden}._calendar-block_187xq_57 ._m_187xq_99{display:flex;align-items:center;justify-content:center;color:var(--disabled)}._calendar-block_187xq_57 ._m_187xq_99 b{font-weight:var(--font-weight-text-regular)}._calendar-block_187xq_57 ._orange_187xq_117{color:var(--citrine-100)}._calendar-block_187xq_57 ._a_187xq_26{color:var(--black-100);border-radius:var(--control-radius-s)}._calendar-block_187xq_57 ._a_187xq_26 b{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-weight:var(--font-weight-text-regular);cursor:pointer}._calendar-block_187xq_57 ._a_187xq_26 b:hover{background:var(--black-10)}._calendar-block_187xq_57 ._a_187xq_26 b:active{color:var(--white);background:var(--sapphire-100)}._calendar-block_187xq_57 ._current_187xq_142{background:var(--sapphire-10);border-radius:var(--control-radius-s)}
@@ -1 +0,0 @@
1
- ._drawer_vy4rv_3{--drawer-width: 808px;--drawer-z-index: 1000;position:fixed;z-index:1000;z-index:var(--drawer-z-index);display:flex;flex-direction:column;width:808px;width:var(--drawer-width);height:100%;overflow:auto;background-color:var(--black-5);transition:all .3s ease;pointer-events:none}._drawer_vy4rv_3 ._content_vy4rv_17{position:relative;z-index:var(--modal-z-index);display:flex;flex:1;flex-direction:column;padding:var(--space-m) var(--space-4xl) var(--space-4xl);transition:all .3s ease}@media (max-width: 600px){._drawer_vy4rv_3 ._content_vy4rv_17{--drawer-width: 100%;padding:var(--space-m)}}._drawer_vy4rv_3 ._header_vy4rv_32{display:flex;gap:var(--space-xs);height:68px}._drawer_vy4rv_3 ._header_vy4rv_32:not(:last-child){margin-bottom:var(--space-2xl)}._drawer_vy4rv_3 ._header_vy4rv_32 ._title_vy4rv_40{flex:1;align-self:flex-end;font-weight:var(--font-weight-text-medium);font-size:var(--size-text-xl3);line-height:var(--line-height-text-s1);letter-spacing:.7px}@media (max-width: 600px){._drawer_vy4rv_3 ._header_vy4rv_32 ._title_vy4rv_40{font-size:var(--size-text-xl2);line-height:var(--line-height-text-xs)}}._drawer_vy4rv_3 ._header_vy4rv_32 ._space_vy4rv_54{flex:0 0 var(--button-height-m)}@media (max-width: 600px){._drawer_vy4rv_3 ._header_vy4rv_32{height:55px}._drawer_vy4rv_3 ._header_vy4rv_32:not(:last-child){margin-bottom:var(--space-m)}}._drawer_vy4rv_3 ._inner_vy4rv_65{flex:1}._drawer_vy4rv_3 ._button_vy4rv_68{position:absolute;top:var(--space-m);right:var(--space-m)}._drawer_vy4rv_3 ._footer_vy4rv_73{display:block;padding-top:var(--space-4xl)}@media (max-width: 600px){._drawer_vy4rv_3 ._footer_vy4rv_73{padding-top:var(--space-m)}}._drawer_vy4rv_3 ._footer-button_vy4rv_82{display:block;margin-left:auto}._drawer_vy4rv_3._left_vy4rv_86{top:0;left:-100%}._drawer_vy4rv_3._right_vy4rv_90{top:0;right:-100%}._drawer_vy4rv_3._bottom_vy4rv_94{right:50%;bottom:-100%;left:50%;max-height:80vh;border-top-left-radius:var(--control-radius);border-top-right-radius:var(--control-radius);transform:translate(-50%)}._drawer_vy4rv_3._opened_vy4rv_103{transition:all .3s ease;pointer-events:auto}._drawer_vy4rv_3._opened_vy4rv_103._left_vy4rv_86{left:0%;transition:left .3s ease}._drawer_vy4rv_3._opened_vy4rv_103._right_vy4rv_90{right:0%;transition:right .3s ease}._drawer_vy4rv_3._opened_vy4rv_103._bottom_vy4rv_94{bottom:0%}._drawer_vy4rv_3._is-closing_vy4rv_118._left_vy4rv_86{left:-100%}._drawer_vy4rv_3._is-closing_vy4rv_118._right_vy4rv_90{right:-100%}._drawer_vy4rv_3._is-closing_vy4rv_118._bottom_vy4rv_94{bottom:-100%}@media (max-width: 1440px){._drawer_vy4rv_3{--drawer-width: 608px}}@media (max-width: 1280px){._drawer_vy4rv_3{--drawer-width: 648px}}@media (max-width: 768px){._drawer_vy4rv_3{--drawer-width: 584px}}@media (max-width: 600px){._drawer_vy4rv_3{--drawer-width: 100%}._drawer_vy4rv_3._bottom_vy4rv_94{max-width:359px}}._overlay_vy4rv_151{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;opacity:0;transition:all .3s ease}._overlay_vy4rv_151._opened_vy4rv_103{opacity:1;transition:all .3s ease}._overlay_vy4rv_151._is-closing_vy4rv_118{opacity:0;transition:all .3s ease}
@@ -1 +0,0 @@
1
- ._select-search_xswn2_2{position:relative}._container_xswn2_6{display:flex;gap:var(--select-search-gap);align-items:center;justify-content:space-between;height:var(--select-search-height);padding:var(--select-search-space);background-color:var(--black-5);border-radius:var(--select-search-radius)}._container-open_xswn2_16{border-bottom:1px solid var(--citrine-100)}._full_xswn2_20{width:100%}._selectorIcon-open_xswn2_24{transform:rotate(180deg)}._placeholder_xswn2_28{position:absolute;top:var(--select-search-input-top);left:0;color:var(--black-60);font-size:var(--select-search-input-font-size);transition:all .3s ease;pointer-events:none}._placeholder-top_xswn2_37{font-size:var(--size-text-s);transform:translateY(-10px);transition-duration:.2s,.1s}._input_xswn2_43{width:100%;height:100%;color:var(--black-100);font-size:var(--select-search-input-font-size);background-color:var(--black-5)}._input_xswn2_43:focus~._placeholder_xswn2_28{font-size:var(--size-text-s);transform:translateY(-10px);transition-duration:.2s,.1s}._input-container_xswn2_55{position:relative;align-self:flex-end;width:100%}._button_xswn2_61{display:flex;align-items:center;background:none;border:none;cursor:pointer}._options_xswn2_69{position:absolute;top:100%;z-index:10;width:100%;height:-webkit-max-content;height:-moz-max-content;height:max-content;max-height:var(--select-search-options-height-desktop);overflow-y:auto;font-size:var(--size-text-l);background:var(--white);border-radius:0 0 var(--select-search-radius) var(--select-search-radius);box-shadow:var(--box-shadow-select-search)}._options_xswn2_69::-webkit-scrollbar{width:2px}._options_xswn2_69::-webkit-scrollbar-thumb{background-color:var(--black-80);border-radius:2px}._options_xswn2_69::-webkit-scrollbar-track{background-color:var(--white)}@media (max-width: 600px){._options_xswn2_69{max-height:var(--select-search-options-height-mobile)}}._option_xswn2_69{padding:var(--select-search-option-space);cursor:pointer;transition:background-color .2s ease-in-out}._option-active_xswn2_103{background-color:var(--black-5)}._option-inner_xswn2_106{display:flex;gap:var(--space-m);align-items:center;justify-content:space-between}._no-options_xswn2_113{padding:var(--select-search-option-space);color:var(--black-80)}._l_xswn2_118{--select-search-height: var(--select-search-height-l);--select-search-space: var(--space-xss) var(--space-m);--select-search-radius: var(--control-radius);--select-search-input-font-size: var(--size-text-l);--select-search-gap: var(--space-2xs);--select-search-option-space: var(--space-2s) var(--space-m);--select-search-input-top: var(--select-search-input-top-l)}._xxl_xswn2_128{--select-search-height: var(--select-search-height-xxl);--select-search-space: var(--space-xss) var(--space-m);--select-search-radius: var(--control-radius-s);--select-search-input-font-size: var(--size-text-xl);--select-search-gap: var(--space-xs);--select-search-option-space: var(--space-2l) var(--space-m);--select-search-input-top: var(--select-search-input-top-xxl)}._selected-icon_xswn2_138 path{fill:var(--sapphire-100)}
@@ -1 +0,0 @@
1
- ._switch_1g34c_2{position:relative;display:inline-block;width:24px;height:24px;padding:var(--space-2xs);vertical-align:middle;background-color:var(--sapphire-20);border-radius:var(--control-radius-s);cursor:pointer}._switch_1g34c_2 svg{display:none}._switch_1g34c_2 svg path{fill:var(--white)}._enabled_1g34c_20{background-color:var(--sapphire-100)}._enabled_1g34c_20 svg{display:block}
@@ -1 +0,0 @@
1
- ._timer_llwad_3{color:var(--black-60);font-size:var(--size-text-l)}@media (max-width: 600px){._timer_llwad_3{font-size:var(--size-text-m)}}
@@ -1,44 +0,0 @@
1
- import { TInputProps } from '../Input';
2
-
3
- export type DatePicker = {
4
- /**
5
- * функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
6
- */
7
- onChangeValue?: (e: TDatePickerValue) => void;
8
- /**
9
- * функция ограничения выбора даты
10
- (до какой даты выбор не доступен)
11
- */
12
- before?: Date | string;
13
- /**
14
- * значение из стейта (data)
15
- */
16
- value?: string;
17
- } & TInputProps;
18
- export type TDatePickerValue = {
19
- value?: Date;
20
- name?: string;
21
- };
22
- export declare const DatePicker: import('react').MemoExoticComponent<import('react').ForwardRefExoticComponent<{
23
- /**
24
- * функция=callback, которая вызывается при изменении значения и передает имя и новое значение для обновления стейта (data),
25
- */
26
- onChangeValue?: (e: TDatePickerValue) => void;
27
- /**
28
- * функция ограничения выбора даты
29
- (до какой даты выбор не доступен)
30
- */
31
- before?: Date | string;
32
- /**
33
- * значение из стейта (data)
34
- */
35
- value?: string;
36
- } & import('../Input/types').TInputProps & {
37
- size?: import('../Input').TSize;
38
- variant?: import('../Input').TVariant;
39
- className?: string;
40
- wrapperClassName?: string;
41
- label?: import('react').ReactNode;
42
- autofocus?: boolean;
43
- readonly?: boolean;
44
- } & import('react').RefAttributes<HTMLInputElement>>>;
@@ -1,69 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { c as classNames } from "../../index-CweZ_OcN.js";
3
- import { memo, forwardRef, useState } from "react";
4
- import { c as cls, D as DatePickerModal } from "../../DatePickerModal-DUUCHAWF.js";
5
- import { useClickOutside } from "../../hooks/useClickOutside/useClickOutside.js";
6
- import { formating } from "../../utils/index.js";
7
- import { Button } from "../Button/Button.js";
8
- import { Input } from "../Input/Input.js";
9
- const DatePicker = memo(
10
- forwardRef(
11
- ({ size, value, onChangeValue, name, before, ...props }, ref) => {
12
- const [isActive, setActive] = useState(false);
13
- const [date, setDate] = useState(
14
- value ? new Date(value) : /* @__PURE__ */ new Date()
15
- );
16
- useClickOutside({
17
- isActive,
18
- setActive,
19
- className: cls["calendar-block"]
20
- });
21
- const onOpen = () => {
22
- setActive(true);
23
- };
24
- const onDate = (d) => {
25
- setDate(d);
26
- onChangeValue == null ? void 0 : onChangeValue({ value: d, name });
27
- };
28
- const wrapperClassNames = classNames(cls.wrapper, isActive && cls.active);
29
- return /* @__PURE__ */ jsxs("div", { className: wrapperClassNames, children: [
30
- /* @__PURE__ */ jsx("div", { className: cls["date-wrapper"], onClick: onOpen, children: /* @__PURE__ */ jsx(
31
- Input,
32
- {
33
- ref,
34
- className: cls.input,
35
- wrapperClassName: cls["input-wrapper"],
36
- size,
37
- type: "text",
38
- value: formating.Date(date, "dd.mm.yy"),
39
- ...props
40
- }
41
- ) }),
42
- /* @__PURE__ */ jsx("div", { className: cls["button-wrapper"], children: /* @__PURE__ */ jsx(
43
- Button,
44
- {
45
- isIconButton: true,
46
- clear: true,
47
- type: "button",
48
- className: cls.button,
49
- onClick: onOpen,
50
- iconName: isActive ? "DropdownArrowUp16px" : "DropdownArrowBottom16px"
51
- }
52
- ) }),
53
- isActive && /* @__PURE__ */ jsx(
54
- DatePickerModal,
55
- {
56
- onChangeValue: onDate,
57
- date,
58
- setActive,
59
- before: typeof before === "string" ? new Date(before) : before
60
- }
61
- )
62
- ] });
63
- }
64
- )
65
- );
66
- DatePicker.displayName = "DatePicker";
67
- export {
68
- DatePicker
69
- };
@@ -1,8 +0,0 @@
1
- type DatePickerModal = {
2
- date: Date;
3
- onChangeValue: (d: Date) => void;
4
- setActive: (s: boolean) => void;
5
- before?: Date;
6
- };
7
- export declare function DatePickerModal({ date, onChangeValue, setActive, before }: DatePickerModal): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,9 +0,0 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "./constants.js";
4
- import { D } from "../../DatePickerModal-DUUCHAWF.js";
5
- import "../../utils/index.js";
6
- import "../Button/Button.js";
7
- export {
8
- D as DatePickerModal
9
- };
@@ -1,6 +0,0 @@
1
- export declare enum EDatePickerBeforeDate {
2
- CurrentDate1 = "2024-08-01",
3
- CurrentDate2 = "2024-07-01",
4
- CurrentDate3 = "2024-07-11"
5
- }
6
- export declare const week: string[];
@@ -1,11 +0,0 @@
1
- var EDatePickerBeforeDate = /* @__PURE__ */ ((EDatePickerBeforeDate2) => {
2
- EDatePickerBeforeDate2["CurrentDate1"] = "2024-08-01";
3
- EDatePickerBeforeDate2["CurrentDate2"] = "2024-07-01";
4
- EDatePickerBeforeDate2["CurrentDate3"] = "2024-07-11";
5
- return EDatePickerBeforeDate2;
6
- })(EDatePickerBeforeDate || {});
7
- const week = ["пн", "вт", "ср", "чт", "пт", "сб", "вс"];
8
- export {
9
- EDatePickerBeforeDate,
10
- week
11
- };
@@ -1,2 +0,0 @@
1
- export { DatePicker } from './DatePicker';
2
- export type { DatePicker as TDatePickerProps, TDatePickerValue } from './DatePicker';