@willphan1712000/frontend 1.0.0

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/.babelrc ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "presets": [
3
+ "@babel/preset-env",
4
+ [
5
+ "@babel/preset-react",
6
+ {
7
+ "runtime": "automatic"
8
+ }
9
+ ],
10
+ "@babel/preset-typescript"
11
+ ],
12
+ "plugins": [
13
+ [
14
+ "@babel/plugin-transform-runtime",
15
+ {
16
+ "regenerator": true
17
+ }
18
+ ]
19
+ ]
20
+ }
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ <img style="width: 15%" src="./will.png">
2
+
3
+ ## Will-js is a Web development library made easy for Full-stack Development to develop, build, and push to production created by Will Phan
4
+
5
+ ## It has pre-built classes that can be used for Web Development
6
+
7
+ ## Key Benefits
8
+
9
+ - Simple syntax that includes object-oriented programming techniques
10
+ - Pre-built functionalities that handle difficult tasks in Full-stack Development
11
+ - Provides flexibility, maintainability, and extensibility
12
+
13
+ ## Technology
14
+
15
+ ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
16
+
17
+ ## Installation
18
+
19
+ ### Option 1: Clone this project to your local computer
20
+
21
+ There is a file called W.ts that exports $$ function, this is the root function to use every other functions and classes.
22
+ Simply import $$ to every ts files that you want to use Will-js
23
+
24
+ ```ts
25
+ import { $$ } from "path/of/your/project/Web-Development/W";
26
+ ```
27
+
28
+ ### Options 2: Install from npm
29
+
30
+ Run this command in your terminal (note: this assumes you have installed Nodejs)
31
+
32
+ ```npm
33
+ npm i @willphan1712000/w
34
+ ```
35
+
36
+ Then import $$ function to every ts files that you want to use Will-js as an entry point where you can access every features of the library
37
+
38
+ ```ts
39
+ import { $$ } from "@willphan1712000/w";
40
+ ```
41
+
42
+ ## How to use Will-js
43
+
44
+ [Go to my portfolio](https://will-five.vercel.app/w)
45
+
46
+ ## Find a bug?
47
+
48
+ If you found an issue or would like to submit an improvement to this project, please submit an issue using the issues tab above. If you would like to submit a Pull Request with a fix, reference the issue you created
49
+
50
+ ## Happy with this project
51
+
52
+ You can connect to me at [Facebook](https://www.facebook.com/phanthanhnha123200/) [Instagram](https://www.instagram.com/phanthanhnha_0117/)
package/dist/index.css ADDED
@@ -0,0 +1,233 @@
1
+ /* scss-module:/home/runner/work/project-will-frontend/project-will-frontend/src/components/DropdownSelect/dropdownSelect.module.css/#scss-module-data */
2
+ * {
3
+ margin: 0;
4
+ padding: 0;
5
+ }
6
+ .dropdownSelect-module__select_box___Q8S31 {
7
+ border-radius: 10px;
8
+ border: solid 1px #dadada;
9
+ padding: 5px 10px;
10
+ display: flex;
11
+ justify-content: space-between;
12
+ align-items: center;
13
+ cursor: pointer;
14
+ }
15
+ .dropdownSelect-module__value___izaXQ {
16
+ margin-right: auto;
17
+ }
18
+ .dropdownSelect-module__close___axGDo {
19
+ border-radius: 50%;
20
+ width: 20px;
21
+ height: 20px;
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ }
26
+ .dropdownSelect-module__close___axGDo:hover {
27
+ background-color: #f0f0f0;
28
+ }
29
+ .dropdownSelect-module__element___Q56x3 {
30
+ display: flex;
31
+ padding: 5px;
32
+ border-radius: 10px;
33
+ justify-content: flex-start;
34
+ align-items: center;
35
+ cursor: pointer;
36
+ }
37
+ .dropdownSelect-module__element___Q56x3:hover {
38
+ background-color: #f0f0f0;
39
+ }
40
+ .dropdownSelect-module__dropdown___cjfHn {
41
+ position: absolute;
42
+ box-sizing: border-box;
43
+ width: 100%;
44
+ left: 0;
45
+ display: flex;
46
+ flex-direction: column;
47
+ border: solid 1px #dadada;
48
+ border-radius: 10px;
49
+ padding: 5px;
50
+ max-height: 300px;
51
+ overflow-y: auto;
52
+ background-color: white;
53
+ }
54
+ .dropdownSelect-module__search_border___xQU5q {
55
+ position: sticky;
56
+ top: 0;
57
+ left: 0;
58
+ box-sizing: border-box;
59
+ width: 100%;
60
+ background-color: white;
61
+ }
62
+ .dropdownSelect-module__search___kGmqs {
63
+ width: 100%;
64
+ border-radius: 5px;
65
+ padding: 5px;
66
+ border: solid 1px #dadada;
67
+ display: flex;
68
+ justify-content: flex-start;
69
+ align-items: center;
70
+ box-sizing: border-box;
71
+ }
72
+
73
+ /* scss-module:/home/runner/work/project-will-frontend/project-will-frontend/src/components/RangeSlider/rangeSlider.module.css/#scss-module-data */
74
+ * {
75
+ box-sizing: border-box;
76
+ margin: 0;
77
+ padding: 0;
78
+ }
79
+ .rangeSlider-module__slider_border___CoeFx {
80
+ position: relative;
81
+ display: flex;
82
+ gap: 5px;
83
+ flex-direction: column;
84
+ height: 10px;
85
+ }
86
+ .rangeSlider-module__thumb___OnFSM {
87
+ width: 17px;
88
+ height: 17px;
89
+ cursor: pointer;
90
+ position: absolute;
91
+ border-radius: 50%;
92
+ top: 50%;
93
+ transform: translate(-50%, -50%);
94
+ z-index: 1;
95
+ }
96
+ .rangeSlider-module__thumb_shadow___L16TY {
97
+ content: "";
98
+ position: absolute;
99
+ top: -9px;
100
+ left: -9px;
101
+ width: 35px;
102
+ height: 35px;
103
+ opacity: 0.2;
104
+ z-index: -1;
105
+ border-radius: 50%;
106
+ scale: 0;
107
+ transition: scale 0.1s linear;
108
+ }
109
+ .rangeSlider-module__fill___urGCN {
110
+ position: absolute;
111
+ left: 0;
112
+ top: 0;
113
+ height: 100%;
114
+ border-radius: 5px;
115
+ cursor: pointer;
116
+ }
117
+ .rangeSlider-module__rest___pO2pi {
118
+ position: absolute;
119
+ top: 50%;
120
+ transform: translateY(-50%);
121
+ opacity: 0.3;
122
+ width: 100%;
123
+ height: 70%;
124
+ border-radius: 5px;
125
+ cursor: pointer;
126
+ }
127
+ .rangeSlider-module__value___Evg0D {
128
+ position: absolute;
129
+ bottom: 30px;
130
+ left: 50%;
131
+ transform: translateX(-50%);
132
+ transform-origin: bottom left;
133
+ background-color: #f0f0f7;
134
+ border-radius: 5px;
135
+ padding: 5px;
136
+ scale: 0;
137
+ transition: scale 0.1s linear;
138
+ }
139
+
140
+ /* scss-module:/home/runner/work/project-will-frontend/project-will-frontend/src/components/OptionSlider/optionSlider.module.css/#scss-module-data */
141
+ * {
142
+ box-sizing: border-box;
143
+ margin: 0;
144
+ padding: 0;
145
+ }
146
+ .optionSlider-module__border___DvXkD {
147
+ border-radius: 10px;
148
+ overflow: auto;
149
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
150
+ aspect-ratio: 4;
151
+ display: flex;
152
+ flex-direction: row;
153
+ scrollbar-width: none;
154
+ -ms-overflow-style: none;
155
+ position: relative;
156
+ }
157
+ .optionSlider-module__border___DvXkD::-webkit-scrollbar {
158
+ display: none;
159
+ }
160
+ .optionSlider-module__background___P6MQP {
161
+ position: relative;
162
+ width: 100%;
163
+ height: 100%;
164
+ opacity: 0.3;
165
+ }
166
+ .optionSlider-module__options___OLBcd {
167
+ height: 100%;
168
+ padding: 5px;
169
+ gap: 5px;
170
+ position: absolute;
171
+ top: 50%;
172
+ transform: translateY(-50%);
173
+ left: 0;
174
+ display: flex;
175
+ flex-direction: row;
176
+ justify-content: center;
177
+ align-items: center;
178
+ }
179
+ .optionSlider-module__element___obtjI {
180
+ display: flex;
181
+ justify-content: center;
182
+ align-items: center;
183
+ cursor: pointer;
184
+ width: auto;
185
+ height: 100%;
186
+ aspect-ratio: 1/1;
187
+ border-radius: 50%;
188
+ overflow: hidden;
189
+ border: solid 1px #000;
190
+ }
191
+
192
+ /* scss-module:/home/runner/work/project-will-frontend/project-will-frontend/src/components/ColorPickerSlider/colorPickerSlider.module.css/#scss-module-data */
193
+ .colorPickerSlider-module__border___-6cw8 {
194
+ border-radius: 10px;
195
+ aspect-ratio: 20;
196
+ background:
197
+ linear-gradient(
198
+ to right,
199
+ hsl(0, 100%, 50%),
200
+ hsl(60, 100%, 50%),
201
+ hsl(120, 100%, 50%),
202
+ hsl(180, 100%, 50%),
203
+ hsl(240, 100%, 50%),
204
+ hsl(300, 100%, 50%),
205
+ hsl(0, 100%, 50%));
206
+ cursor: pointer;
207
+ -webkit-appearance: none;
208
+ -moz-appearance: none;
209
+ appearance: none;
210
+ outline: none;
211
+ position: relative;
212
+ }
213
+ .colorPickerSlider-module__thumb___p2fHW {
214
+ border-radius: 50%;
215
+ aspect-ratio: 1;
216
+ position: absolute;
217
+ top: 50%;
218
+ transform: translate(-50%, -50%);
219
+ box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
220
+ border: solid 2px white;
221
+ }
222
+ .colorPickerSlider-module__label___Aa0AV {
223
+ position: absolute;
224
+ bottom: 200%;
225
+ transform: translateX(-50%);
226
+ border-radius: 5px;
227
+ padding: 5px;
228
+ font-size: 15px;
229
+ background: #f0f0f7;
230
+ transition: scale 0.1s linear;
231
+ scale: 0;
232
+ transform-origin: bottom left;
233
+ }
@@ -0,0 +1,78 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Options$1 = {
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ interface Props$3 {
9
+ options: Options$1;
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ width?: string;
13
+ }
14
+ /**
15
+ * Dropdown Select component, allowing users to select options from dropdown menu
16
+ * @param options - list of options, which is an array of object [{ label: string, value: string }]
17
+ * @param value - a chosen value
18
+ * @param onChange - a function to set a value
19
+ * @param width - specify the width of the component
20
+ * @returns
21
+ */
22
+ declare const DropdownSelect: ({ options, value, onChange, width }: Props$3) => react_jsx_runtime.JSX.Element;
23
+
24
+ interface Props$2 {
25
+ value: string;
26
+ onChange: (value: string) => void;
27
+ min?: string;
28
+ max?: string;
29
+ color?: string;
30
+ width?: string;
31
+ }
32
+ /**
33
+ * Range Slider component, allowing users to drag the slider to choose value they want
34
+ * @param min - minimum value
35
+ * @param max - maximum value
36
+ * @param color - color scheme of the range slider
37
+ * @param width - specify the width of the component
38
+ * @param value - a chosen value
39
+ * @param onChange - to set a value
40
+ * @returns
41
+ */
42
+ declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$2) => react_jsx_runtime.JSX.Element;
43
+
44
+ type Options = {
45
+ label: ReactNode;
46
+ value: string;
47
+ }[];
48
+ interface Props$1 {
49
+ value: string;
50
+ onChange: (value: string) => void;
51
+ width?: string;
52
+ options: Options;
53
+ color?: string;
54
+ }
55
+ /**
56
+ * Option Slider component, allowing users to select a value they want with the help of element representaion. Label is a React Node jsx that represents the option. For example, if a value was a font, the label would be a React Node jsx that represents a character using the font
57
+ * @param value - a chosen value
58
+ * @param onChange - to set a value
59
+ * @options - list of options, format [{ label: React Node Syntax, value: string }]
60
+ * @returns
61
+ */
62
+ declare const OptionSlider: ({ value, onChange, width, options, color }: Props$1) => react_jsx_runtime.JSX.Element;
63
+
64
+ interface Props {
65
+ value: string;
66
+ onChange: (value: string) => void;
67
+ width?: string;
68
+ }
69
+ /**
70
+ * ColorPickerSlider component, allowing users to select a color by dragging the slider
71
+ * @param value
72
+ * @param onChange
73
+ * @param width
74
+ * @returns
75
+ */
76
+ declare const ColorPickerSlider: ({ value, onChange, width }: Props) => react_jsx_runtime.JSX.Element;
77
+
78
+ export { ColorPickerSlider, DropdownSelect, OptionSlider, type Options$1 as Options, RangeSlider, type Options as SliderOptions };
@@ -0,0 +1,78 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type Options$1 = {
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ interface Props$3 {
9
+ options: Options$1;
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ width?: string;
13
+ }
14
+ /**
15
+ * Dropdown Select component, allowing users to select options from dropdown menu
16
+ * @param options - list of options, which is an array of object [{ label: string, value: string }]
17
+ * @param value - a chosen value
18
+ * @param onChange - a function to set a value
19
+ * @param width - specify the width of the component
20
+ * @returns
21
+ */
22
+ declare const DropdownSelect: ({ options, value, onChange, width }: Props$3) => react_jsx_runtime.JSX.Element;
23
+
24
+ interface Props$2 {
25
+ value: string;
26
+ onChange: (value: string) => void;
27
+ min?: string;
28
+ max?: string;
29
+ color?: string;
30
+ width?: string;
31
+ }
32
+ /**
33
+ * Range Slider component, allowing users to drag the slider to choose value they want
34
+ * @param min - minimum value
35
+ * @param max - maximum value
36
+ * @param color - color scheme of the range slider
37
+ * @param width - specify the width of the component
38
+ * @param value - a chosen value
39
+ * @param onChange - to set a value
40
+ * @returns
41
+ */
42
+ declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$2) => react_jsx_runtime.JSX.Element;
43
+
44
+ type Options = {
45
+ label: ReactNode;
46
+ value: string;
47
+ }[];
48
+ interface Props$1 {
49
+ value: string;
50
+ onChange: (value: string) => void;
51
+ width?: string;
52
+ options: Options;
53
+ color?: string;
54
+ }
55
+ /**
56
+ * Option Slider component, allowing users to select a value they want with the help of element representaion. Label is a React Node jsx that represents the option. For example, if a value was a font, the label would be a React Node jsx that represents a character using the font
57
+ * @param value - a chosen value
58
+ * @param onChange - to set a value
59
+ * @options - list of options, format [{ label: React Node Syntax, value: string }]
60
+ * @returns
61
+ */
62
+ declare const OptionSlider: ({ value, onChange, width, options, color }: Props$1) => react_jsx_runtime.JSX.Element;
63
+
64
+ interface Props {
65
+ value: string;
66
+ onChange: (value: string) => void;
67
+ width?: string;
68
+ }
69
+ /**
70
+ * ColorPickerSlider component, allowing users to select a color by dragging the slider
71
+ * @param value
72
+ * @param onChange
73
+ * @param width
74
+ * @returns
75
+ */
76
+ declare const ColorPickerSlider: ({ value, onChange, width }: Props) => react_jsx_runtime.JSX.Element;
77
+
78
+ export { ColorPickerSlider, DropdownSelect, OptionSlider, type Options$1 as Options, RangeSlider, type Options as SliderOptions };