wini-web-components 2.8.2 → 2.8.5
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/dist/index.js.js +10 -10
- package/dist/index.js.mjs +198 -185
- package/package.json +6 -2
- package/src/component/button/button.module.css +210 -0
- package/src/component/button/button.tsx +57 -0
- package/src/component/calendar/calendar.module.css +153 -0
- package/src/component/calendar/calendar.tsx +389 -0
- package/src/component/carousel/carousel.css +622 -0
- package/src/component/carousel/carousel.tsx +91 -0
- package/src/component/checkbox/checkbox.module.css +48 -0
- package/src/component/checkbox/checkbox.tsx +80 -0
- package/src/component/ck-editor/ck-editor.css +206 -0
- package/src/component/ck-editor/ckeditor.tsx +522 -0
- package/src/component/component-status.tsx +53 -0
- package/src/component/date-time-picker/date-time-picker.module.css +94 -0
- package/src/component/date-time-picker/date-time-picker.tsx +663 -0
- package/src/component/dialog/dialog.module.css +111 -0
- package/src/component/dialog/dialog.tsx +109 -0
- package/src/component/import-file/import-file.module.css +83 -0
- package/src/component/import-file/import-file.tsx +174 -0
- package/src/component/infinite-scroll/infinite-scroll.module.css +34 -0
- package/src/component/infinite-scroll/infinite-scroll.tsx +35 -0
- package/src/component/input-multi-select/input-multi-select.module.css +121 -0
- package/src/component/input-multi-select/input-multi-select.tsx +263 -0
- package/src/component/input-otp/input-otp.module.css +41 -0
- package/src/component/input-otp/input-otp.tsx +110 -0
- package/src/component/number-picker/number-picker.module.css +137 -0
- package/src/component/number-picker/number-picker.tsx +107 -0
- package/src/component/pagination/pagination.module.css +48 -0
- package/src/component/pagination/pagination.tsx +88 -0
- package/src/component/popup/popup.css +136 -0
- package/src/component/popup/popup.tsx +125 -0
- package/src/component/progress-bar/progress-bar.module.css +42 -0
- package/src/component/progress-bar/progress-bar.tsx +33 -0
- package/src/component/progress-circle/progress-circle.css +0 -0
- package/src/component/progress-circle/progress-circle.tsx +25 -0
- package/src/component/radio-button/radio-button.module.css +51 -0
- package/src/component/radio-button/radio-button.tsx +60 -0
- package/src/component/rating/rating.module.css +11 -0
- package/src/component/rating/rating.tsx +65 -0
- package/src/component/select1/select1.module.css +108 -0
- package/src/component/select1/select1.tsx +271 -0
- package/src/component/switch/switch.module.css +53 -0
- package/src/component/switch/switch.tsx +68 -0
- package/src/component/table/table.css +74 -0
- package/src/component/table/table.tsx +108 -0
- package/src/component/tag/tag.module.css +108 -0
- package/src/component/tag/tag.tsx +31 -0
- package/src/component/text/text.css +27 -0
- package/src/component/text/text.tsx +24 -0
- package/src/component/text-area/text-area.module.css +57 -0
- package/src/component/text-area/text-area.tsx +65 -0
- package/src/component/text-field/text-field.module.css +71 -0
- package/src/component/text-field/text-field.tsx +102 -0
- package/src/component/toast-noti/toast-noti.css +866 -0
- package/src/component/toast-noti/toast-noti.tsx +22 -0
- package/src/component/wini-icon/winicon.module.css +110 -0
- package/src/component/wini-icon/winicon.tsx +9424 -0
- package/src/form/login/view.module.css +80 -0
- package/src/form/login/view.tsx +138 -0
- package/src/index.tsx +66 -0
- package/src/language/i18n.tsx +143 -0
- package/src/skin/layout.css +649 -0
- package/src/skin/root.css +294 -0
- package/src/skin/typography.css +314 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.checkbox-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
border-radius: 0.4rem;
|
|
4
|
+
border: var(--neutral-bolder-border);
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
transition: border, background-color 0.4s;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.checkbox-container>input {
|
|
11
|
+
position: absolute;
|
|
12
|
+
opacity: 0;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
height: 0;
|
|
15
|
+
width: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.checkbox-container>svg {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
visibility: hidden;
|
|
22
|
+
opacity: 0 !important;
|
|
23
|
+
transition: visibility, opacity 0.4s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.checkbox-container>svg>path {
|
|
27
|
+
fill: var(--check-color, #fff);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.checkbox-container>input:checked~svg,
|
|
31
|
+
.checkbox-container[is-null-value="true"]>svg {
|
|
32
|
+
visibility: visible;
|
|
33
|
+
opacity: 1 !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.checkbox-container:has(> input:checked),
|
|
37
|
+
.checkbox-container[is-null-value="true"] {
|
|
38
|
+
background-color: var(--primary-main-color);
|
|
39
|
+
border: none !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.checkbox-container:has(> input:disabled) {
|
|
43
|
+
background-color: var(--neutral-disable-background-color) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.checkbox-container:has(> input:disabled)>svg>path {
|
|
47
|
+
fill: var(--neutral-text-disabled-color) !important;
|
|
48
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { createRef, CSSProperties } from 'react';
|
|
2
|
+
import styles from './checkbox.module.css';
|
|
3
|
+
|
|
4
|
+
interface CheckboxProps {
|
|
5
|
+
id?: string,
|
|
6
|
+
onChange?: (value: boolean, target: HTMLInputElement) => void,
|
|
7
|
+
value?: boolean,
|
|
8
|
+
checkColor?: string,
|
|
9
|
+
disabled?: boolean,
|
|
10
|
+
className?: string,
|
|
11
|
+
style?: CSSProperties,
|
|
12
|
+
/** default 2.4rem **/
|
|
13
|
+
size?: number | string,
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLLabelElement>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface CheckboxState {
|
|
18
|
+
value?: boolean,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
|
|
22
|
+
private ref = createRef<HTMLLabelElement>()
|
|
23
|
+
constructor(props: CheckboxProps) {
|
|
24
|
+
super(props);
|
|
25
|
+
this.state = {
|
|
26
|
+
value: this.props.value ?? false
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
componentDidUpdate(prevProps: Readonly<CheckboxProps>): void {
|
|
31
|
+
if (prevProps.value !== this.props.value) {
|
|
32
|
+
this.setState({ value: this.props.value })
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
onChange = () => {
|
|
37
|
+
const newValue = !this.state.value
|
|
38
|
+
this.setState({ value: newValue })
|
|
39
|
+
if (this.props.onChange && this.ref.current) this.props.onChange(newValue, this.ref.current.querySelector("input")!)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
render() {
|
|
43
|
+
let convertStyle: CSSProperties = {
|
|
44
|
+
width: this.props.size ?? '2.4rem',
|
|
45
|
+
height: this.props.size ?? '2.4rem',
|
|
46
|
+
}
|
|
47
|
+
if (this.props.style) {
|
|
48
|
+
delete this.props.style.width
|
|
49
|
+
delete this.props.style.minWidth
|
|
50
|
+
delete this.props.style.maxWidth
|
|
51
|
+
delete this.props.style.height
|
|
52
|
+
delete this.props.style.minHeight
|
|
53
|
+
delete this.props.style.maxHeight
|
|
54
|
+
convertStyle = {
|
|
55
|
+
...this.props.style,
|
|
56
|
+
...convertStyle
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return <label ref={this.ref} id={this.props.id} className={`${styles['checkbox-container']} row ${this.props.className ?? ''}`} style={convertStyle} is-null-value={`${this.state.value == undefined}`} onClick={this.props.onClick}>
|
|
60
|
+
<input type="checkbox" checked={this.state.value ? true : false} disabled={this.props.disabled}
|
|
61
|
+
onChange={(ev) => {
|
|
62
|
+
ev.stopPropagation()
|
|
63
|
+
const newValue = !this.state.value
|
|
64
|
+
this.setState({ value: newValue })
|
|
65
|
+
if (this.props.onChange) this.props.onChange(newValue, ev.target)
|
|
66
|
+
}}
|
|
67
|
+
/>
|
|
68
|
+
<svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" style={{ '--check-color': this.props.checkColor } as any}>
|
|
69
|
+
{
|
|
70
|
+
this.state.value === undefined ?
|
|
71
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M4.79199 9.95298C4.79199 9.69148 5.00398 9.47949 5.26548 9.47949H14.7352C14.9967 9.47949 15.2087 9.69148 15.2087 9.95298C15.2087 10.2145 14.9967 10.4265 14.7352 10.4265H5.26548C5.00398 10.4265 4.79199 10.2145 4.79199 9.95298Z" /> :
|
|
72
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M15.07 6.49317C15.2549 6.67808 15.2549 6.97787 15.07 7.16278L8.91467 13.3181C8.72977 13.503 8.42997 13.503 8.24507 13.3181L4.93067 10.0037C4.74577 9.81878 4.74577 9.51899 4.93067 9.33408C5.11558 9.14917 5.41537 9.14917 5.60028 9.33408L8.57987 12.3137L14.4004 6.49317C14.5853 6.30827 14.8851 6.30827 15.07 6.49317Z" />
|
|
73
|
+
}
|
|
74
|
+
</svg>
|
|
75
|
+
</label>
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
.editor-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
--ck-color-text: var(--neutral-text-title-color);
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 400px;
|
|
6
|
+
max-height: 600px;
|
|
7
|
+
border-radius: 0.8rem;
|
|
8
|
+
border: var(--neutral-bolder-border);
|
|
9
|
+
overflow: hidden visible;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.editor-container:has(.ck-read-only) {
|
|
13
|
+
background-color: var(--neutral-disable-background-color) !important;
|
|
14
|
+
pointer-events: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.editor-container:focus-within {
|
|
18
|
+
border-color: var(--primary-main-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.editor-container.helper-text {
|
|
22
|
+
overflow: visible !important;
|
|
23
|
+
border-color: var(--helper-text-color) !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.editor-container.helper-text::after {
|
|
27
|
+
content: attr(helper-text);
|
|
28
|
+
color: var(--helper-text-color);
|
|
29
|
+
position: absolute;
|
|
30
|
+
left: 0;
|
|
31
|
+
bottom: -0.4rem;
|
|
32
|
+
width: max-content;
|
|
33
|
+
font-size: 1.2rem;
|
|
34
|
+
line-height: 1.6rem;
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
transform: translateY(100%);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ck-content {
|
|
40
|
+
font-family: 'Inter';
|
|
41
|
+
line-height: 1.6;
|
|
42
|
+
word-break: break-word;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ck-content h3.category {
|
|
46
|
+
font-family: 'Inter';
|
|
47
|
+
font-size: 20px;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
color: #555;
|
|
50
|
+
letter-spacing: 10px;
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ck-content h2.document-title {
|
|
56
|
+
font-family: 'Inter';
|
|
57
|
+
font-size: 50px;
|
|
58
|
+
font-weight: bold;
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0;
|
|
61
|
+
border: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ck-content h3.document-subtitle {
|
|
65
|
+
font-family: 'Inter';
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
color: #555;
|
|
68
|
+
margin: 0 0 1em;
|
|
69
|
+
font-weight: bold;
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ck-content blockquote.side-quote {
|
|
74
|
+
font-family: 'Inter';
|
|
75
|
+
font-style: normal;
|
|
76
|
+
float: right;
|
|
77
|
+
width: 35%;
|
|
78
|
+
position: relative;
|
|
79
|
+
border: 0;
|
|
80
|
+
overflow: visible;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
margin-left: 1em;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ck-content blockquote.side-quote::before {
|
|
86
|
+
content: '“';
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: -37px;
|
|
89
|
+
left: -10px;
|
|
90
|
+
display: block;
|
|
91
|
+
font-size: 200px;
|
|
92
|
+
color: #e7e7e7;
|
|
93
|
+
z-index: -1;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ck-content blockquote.side-quote p {
|
|
98
|
+
font-size: 2em;
|
|
99
|
+
line-height: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ck-content blockquote.side-quote p:last-child:not(:first-child) {
|
|
103
|
+
font-size: 1.3em;
|
|
104
|
+
text-align: right;
|
|
105
|
+
color: #555;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ck-content span.marker {
|
|
109
|
+
background: yellow;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ck-content span.spoiler {
|
|
113
|
+
background: #000;
|
|
114
|
+
color: #000;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ck-content span.spoiler:hover {
|
|
118
|
+
background: #000;
|
|
119
|
+
color: #fff;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ck-content pre.fancy-code {
|
|
123
|
+
border: 0;
|
|
124
|
+
margin-left: 2em;
|
|
125
|
+
margin-right: 2em;
|
|
126
|
+
border-radius: 10px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.ck-content pre.fancy-code::before {
|
|
130
|
+
content: '';
|
|
131
|
+
display: block;
|
|
132
|
+
height: 13px;
|
|
133
|
+
background: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NCAxMyI+CiAgPGNpcmNsZSBjeD0iNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGMzZCNUMiLz4KICA8Y2lyY2xlIGN4PSIyNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGOUJFNEQiLz4KICA8Y2lyY2xlIGN4PSI0Ny41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiM1NkM0NTMiLz4KPC9zdmc+Cg==);
|
|
134
|
+
margin-bottom: 8px;
|
|
135
|
+
background-repeat: no-repeat;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ck-content pre.fancy-code-dark {
|
|
139
|
+
background: #272822;
|
|
140
|
+
color: #fff;
|
|
141
|
+
box-shadow: 5px 5px 0 #0000001f;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ck-content pre.fancy-code-bright {
|
|
145
|
+
background: #dddfe0;
|
|
146
|
+
color: #000;
|
|
147
|
+
box-shadow: 5px 5px 0 #b3b3b3;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.editor-container_classic-editor .editor-container__editor .ck-editor .ck-editor__editable {
|
|
151
|
+
border-radius: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ck-editor-container {
|
|
155
|
+
--ck-font-size-base: 1.4rem;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.editor-container__editor {
|
|
159
|
+
flex: 1;
|
|
160
|
+
height: 100%;
|
|
161
|
+
overflow: hidden !important;
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.editor-container__editor>div,
|
|
167
|
+
.ck.ck-reset.ck-editor.ck-rounded-corners {
|
|
168
|
+
flex: 1;
|
|
169
|
+
height: 100%;
|
|
170
|
+
overflow: hidden !important;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ck.ck-editor__main>.ck.ck-content.ck-rounded-corners {
|
|
176
|
+
min-height: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ck.ck-toolbar {
|
|
180
|
+
background-color: var(--neutral-absolute-background-color);
|
|
181
|
+
border-radius: 0.8rem 0.8rem 0 0 !important;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content {
|
|
185
|
+
height: 40px;
|
|
186
|
+
border: none !important;
|
|
187
|
+
border-radius: 0.8rem 0.8rem 0 0 !important;
|
|
188
|
+
border-bottom: var(--neutral-bolder-border) !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ck.ck-editor__main {
|
|
192
|
+
flex: 1;
|
|
193
|
+
height: 100% !important;
|
|
194
|
+
overflow: hidden auto !important;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.ck.ck-editor__main>div {
|
|
198
|
+
background-color: transparent !important;
|
|
199
|
+
border: none !important;
|
|
200
|
+
font-size: 16px !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.ck.ck-color-grid>button {
|
|
204
|
+
border: var(--neutral-bolder-border);
|
|
205
|
+
border-radius: 0.4rem !important;
|
|
206
|
+
}
|