@datability/8ui 1.1.0 → 1.1.2

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.
Files changed (128) hide show
  1. package/dist/index.css +1 -0
  2. package/dist/index.es.js +1853 -0
  3. package/dist/index.es.js.map +1 -0
  4. package/dist/index.umd.js +8 -0
  5. package/dist/index.umd.js.map +1 -0
  6. package/dist/types/App.d.ts +2 -0
  7. package/dist/types/components/blackdrop/index.d.ts +4 -0
  8. package/dist/types/components/blackdrop/index.type.d.ts +6 -0
  9. package/dist/types/components/button/index.d.ts +4 -0
  10. package/dist/types/components/button/index.type.d.ts +12 -0
  11. package/dist/types/components/chip/index.d.ts +4 -0
  12. package/dist/types/components/chip/index.type.d.ts +9 -0
  13. package/dist/types/components/context.d.ts +8 -0
  14. package/dist/types/components/divider/index.d.ts +3 -0
  15. package/dist/types/components/index.d.ts +41 -0
  16. package/dist/types/components/input/input-auto-complete/index.d.ts +4 -0
  17. package/dist/types/components/input/input-auto-complete/index.type.d.ts +14 -0
  18. package/dist/types/components/input/input-base/index.d.ts +4 -0
  19. package/dist/types/components/input/input-base/index.type.d.ts +11 -0
  20. package/dist/types/components/input/input-basic/index.d.ts +4 -0
  21. package/dist/types/components/input/input-basic/index.type.d.ts +10 -0
  22. package/dist/types/components/input/input-checkbox/index.d.ts +4 -0
  23. package/dist/types/components/input/input-checkbox/index.type.d.ts +13 -0
  24. package/dist/types/components/input/input-date/index.d.ts +22 -0
  25. package/dist/types/components/input/input-date/index.type.d.ts +13 -0
  26. package/dist/types/components/input/input-date-range/index.d.ts +4 -0
  27. package/dist/types/components/input/input-date-range/index.type.d.ts +13 -0
  28. package/dist/types/components/input/input-date-time/index.d.ts +4 -0
  29. package/dist/types/components/input/input-date-time/index.type.d.ts +13 -0
  30. package/dist/types/components/input/input-number/index.d.ts +4 -0
  31. package/dist/types/components/input/input-number/index.type.d.ts +12 -0
  32. package/dist/types/components/input/input-password/index.d.ts +4 -0
  33. package/dist/types/components/input/input-password/index.type.d.ts +10 -0
  34. package/dist/types/components/input/input-radio/index.d.ts +4 -0
  35. package/dist/types/components/input/input-radio/index.type.d.ts +14 -0
  36. package/dist/types/components/input/input-select/index.d.ts +4 -0
  37. package/dist/types/components/input/input-select/index.type.d.ts +16 -0
  38. package/dist/types/components/input/input-switch/index.d.ts +4 -0
  39. package/dist/types/components/input/input-switch/index.type.d.ts +6 -0
  40. package/dist/types/components/input/input-textarea/index.d.ts +4 -0
  41. package/dist/types/components/input/input-textarea/index.type.d.ts +12 -0
  42. package/dist/types/components/menu/index.d.ts +4 -0
  43. package/dist/types/components/menu/index.type.d.ts +11 -0
  44. package/dist/types/components/modal/index.d.ts +4 -0
  45. package/dist/types/components/modal/index.type.d.ts +7 -0
  46. package/dist/types/index.d.ts +41 -0
  47. package/dist/types/main.d.ts +1 -0
  48. package/package.json +5 -1
  49. package/.prettierrc +0 -8
  50. package/.vscode/extensions.json +0 -6
  51. package/declaration.d.ts +0 -10
  52. package/docker-compose.yml +0 -20
  53. package/eslint.config.js +0 -23
  54. package/index.html +0 -13
  55. package/src/App.tsx +0 -370
  56. package/src/components/blackdrop/index.tsx +0 -18
  57. package/src/components/blackdrop/index.type.ts +0 -7
  58. package/src/components/button/index.tsx +0 -44
  59. package/src/components/button/index.type.ts +0 -13
  60. package/src/components/chip/index.tsx +0 -39
  61. package/src/components/chip/index.type.ts +0 -12
  62. package/src/components/context.tsx +0 -26
  63. package/src/components/divider/index.tsx +0 -13
  64. package/src/components/index.ts +0 -62
  65. package/src/components/input/input-auto-complete/index.tsx +0 -140
  66. package/src/components/input/input-auto-complete/index.type.tsx +0 -13
  67. package/src/components/input/input-base/index.tsx +0 -39
  68. package/src/components/input/input-base/index.type.tsx +0 -13
  69. package/src/components/input/input-basic/index.tsx +0 -47
  70. package/src/components/input/input-basic/index.type.tsx +0 -8
  71. package/src/components/input/input-checkbox/index.tsx +0 -69
  72. package/src/components/input/input-checkbox/index.type.tsx +0 -11
  73. package/src/components/input/input-date/index.tsx +0 -354
  74. package/src/components/input/input-date/index.type.tsx +0 -11
  75. package/src/components/input/input-date-range/index.tsx +0 -284
  76. package/src/components/input/input-date-range/index.type.tsx +0 -11
  77. package/src/components/input/input-date-time/index.tsx +0 -367
  78. package/src/components/input/input-date-time/index.type.tsx +0 -11
  79. package/src/components/input/input-number/index.tsx +0 -118
  80. package/src/components/input/input-number/index.type.tsx +0 -11
  81. package/src/components/input/input-password/index.tsx +0 -60
  82. package/src/components/input/input-password/index.type.tsx +0 -8
  83. package/src/components/input/input-radio/index.tsx +0 -72
  84. package/src/components/input/input-radio/index.type.tsx +0 -12
  85. package/src/components/input/input-select/index.tsx +0 -113
  86. package/src/components/input/input-select/index.type.tsx +0 -15
  87. package/src/components/input/input-switch/index.tsx +0 -44
  88. package/src/components/input/input-switch/index.type.tsx +0 -4
  89. package/src/components/input/input-textarea/index.tsx +0 -48
  90. package/src/components/input/input-textarea/index.type.tsx +0 -10
  91. package/src/components/menu/index.tsx +0 -136
  92. package/src/components/menu/index.type.ts +0 -8
  93. package/src/components/modal/index.tsx +0 -99
  94. package/src/components/modal/index.type.tsx +0 -8
  95. package/src/index.scss +0 -44
  96. package/src/index.ts +0 -62
  97. package/src/logoDownload.svg +0 -3
  98. package/src/main.tsx +0 -9
  99. package/tsconfig.app.json +0 -28
  100. package/tsconfig.json +0 -42
  101. package/tsconfig.node.json +0 -29
  102. package/vite.config.d.ts +0 -2
  103. package/vite.config.ts +0 -35
  104. /package/{src → dist}/components/assets/closed.svg +0 -0
  105. /package/{src → dist}/components/assets/expand-arrow.svg +0 -0
  106. /package/{src → dist}/components/assets/visibility-off.svg +0 -0
  107. /package/{src → dist}/components/assets/visibility.svg +0 -0
  108. /package/{src → dist}/components/blackdrop/index.scss +0 -0
  109. /package/{src → dist}/components/button/index.scss +0 -0
  110. /package/{src → dist}/components/chip/index.scss +0 -0
  111. /package/{src → dist}/components/divider/index.scss +0 -0
  112. /package/{src → dist}/components/input/extend.scss +0 -0
  113. /package/{src → dist}/components/input/input-auto-complete/index.scss +0 -0
  114. /package/{src → dist}/components/input/input-base/index.scss +0 -0
  115. /package/{src → dist}/components/input/input-basic/index.scss +0 -0
  116. /package/{src → dist}/components/input/input-checkbox/index.scss +0 -0
  117. /package/{src → dist}/components/input/input-date/index.scss +0 -0
  118. /package/{src → dist}/components/input/input-date-range/index.scss +0 -0
  119. /package/{src → dist}/components/input/input-date-time/index.scss +0 -0
  120. /package/{src → dist}/components/input/input-number/index.scss +0 -0
  121. /package/{src → dist}/components/input/input-password/index.scss +0 -0
  122. /package/{src → dist}/components/input/input-radio/index.scss +0 -0
  123. /package/{src → dist}/components/input/input-select/index.scss +0 -0
  124. /package/{src → dist}/components/input/input-switch/index.scss +0 -0
  125. /package/{src → dist}/components/input/input-textarea/index.scss +0 -0
  126. /package/{src → dist}/components/menu/index.scss +0 -0
  127. /package/{src → dist}/components/modal/index.scss +0 -0
  128. /package/{public → dist}/vite.svg +0 -0
package/src/App.tsx DELETED
@@ -1,370 +0,0 @@
1
- import { useState } from "react"
2
- import {
3
- Blackdrop,
4
- Button,
5
- Chip,
6
- Divider,
7
- Input,
8
- InputNumber,
9
- InputAutoComplete,
10
- InputCheckbox,
11
- InputPassword,
12
- InputRadio,
13
- InputSelect,
14
- InputTextarea,
15
- InputSwitch,
16
- Menu,
17
- Modal,
18
- InputDate,
19
- InputDateTime,
20
- InputDateRange,
21
- } from "./index"
22
- import { DBuiProvider } from "./components/context"
23
- import "./index.scss"
24
- import LogoSVG from "./logoDownload.svg"
25
- import { FormProvider, useForm } from "react-hook-form"
26
- import z from "zod"
27
- import { zodResolver } from "@hookform/resolvers/zod"
28
-
29
- function App() {
30
- const [isOpenBlackDrop, setIsOpenBackDrop] = useState(false)
31
- const [isOpenModal, setIsOpenModal] = useState(false)
32
- const [isLoading, setIsLoading] = useState(false)
33
-
34
- const schema = z.object({
35
- input: z.string().min(1, "too short"),
36
- inputNumber: z.number().min(0, "not enough").max(2000, "too much"),
37
- inputPhoneNumber: z.string().min(10, "too short").max(10, "too long"),
38
- inputNumberMinus: z.number().min(-2000, "not enough").max(0, "too much"),
39
- inputCheckbox: z.array(z.string()).min(1, "Please select at least one option"),
40
- inputPassword: z.string().min(1, "Please enter"),
41
- inputRadio: z.string().min(1, "Please enter"),
42
- inputTextarea: z.string().min(1, "Please enter"),
43
- inputSwitch: z.string(),
44
- inputSelect: z.string().min(1, "Please select"),
45
- inputAutoComplete: z.array(z.string()).min(1, "Please select").max(1),
46
- inputAutoCompleteMultiple: z.array(z.string()).min(1, "Please select"),
47
- inputDate: z.string().min(1, "Please enter"),
48
- inputDateRange: z.array(z.string()).min(2, "Please select"),
49
- inputDateTime: z.string().min(1, "Please enter"),
50
- })
51
-
52
- type FormValues = z.infer<typeof schema>
53
- const methods = useForm<FormValues>({
54
- defaultValues: {
55
- input: "",
56
- inputNumber: 0,
57
- inputPhoneNumber: "",
58
- inputNumberMinus: -0,
59
- inputCheckbox: [],
60
- inputPassword: "",
61
- inputRadio: "",
62
- inputTextarea: "",
63
- inputSwitch: "",
64
- inputSelect: "",
65
- inputAutoComplete: [],
66
- inputAutoCompleteMultiple: [],
67
- inputDate: "",
68
- inputDateRange: ["", ""], // ['2025-01-01', "2025-01-02"]
69
- inputDateTime: "", // '2025-01-01T00:00',
70
- },
71
- mode: "onSubmit",
72
- resolver: zodResolver(schema),
73
- })
74
-
75
- const onSubmit = (data: FormValues) => {
76
- console.log("Submit", data)
77
- }
78
-
79
- return (
80
- <DBuiProvider>
81
- <FormProvider {...methods}>
82
- <form onSubmit={methods.handleSubmit(onSubmit)}>
83
- <div className="column">
84
- <div className="column align-center">
85
- <h1>Button</h1>
86
- <div className="row gap-sm">
87
- <Button name="Button" type="submit" />
88
- <Button name="Button" disabled />
89
- <Button name="Button" endIcon={LogoSVG} />
90
- <Button
91
- name="Asyc Action"
92
- isLoading={isLoading}
93
- onClick={() => {
94
- console.log("!Click")
95
- setIsLoading(true)
96
- setTimeout(() => {
97
- setIsLoading(false)
98
- }, 2000)
99
- }}
100
- />
101
- </div>
102
- </div>
103
-
104
- <br />
105
- <Divider />
106
-
107
- <div className="column align-center">
108
- <h1>Divider</h1>
109
- <div className="row gap-sm">
110
- <Divider />
111
- </div>
112
- </div>
113
-
114
- <br />
115
- <Divider />
116
-
117
- <div className="column align-center">
118
- <h1>Blackdrop</h1>
119
- <div className="row gap-sm">
120
- <Button name="Open" onClick={() => setIsOpenBackDrop(true)} />
121
- <Blackdrop open={isOpenBlackDrop} onClose={() => setIsOpenBackDrop(false)}>
122
- <Button name="Close" onClick={() => setIsOpenBackDrop(false)} />
123
- <Button
124
- name="TEST print console"
125
- onClick={(e) => {
126
- e.stopPropagation()
127
- console.log("TEST")
128
- }}
129
- />
130
- </Blackdrop>
131
- </div>
132
- </div>
133
-
134
- <br />
135
- <Divider />
136
-
137
- <div className="column align-center">
138
- <h1>Chip</h1>
139
- <div className="row gap-sm">
140
- <Chip label="Chip" />
141
- <Chip label="Chip" icon={LogoSVG} />
142
- <Chip label="Chip" onDelete={() => console.log("delete")} />
143
- </div>
144
- </div>
145
-
146
- <br />
147
- <Divider />
148
-
149
- <div className="column align-center">
150
- <h1>Input</h1>
151
- <div className="row gap-sm">
152
- <Input name="input" label="Input" placeholder="placeholder" require />
153
- </div>
154
- </div>
155
-
156
- <div className="column align-center">
157
- <h1>Input Number</h1>
158
- <div className="row gap-sm">
159
- <InputNumber require name="inputNumber" label="Input Number" placeholder="placeholder" />
160
- <InputNumber
161
- require
162
- name="inputPhoneNumber"
163
- label="Input Phone Number"
164
- placeholder="placeholder"
165
- isPhoneNumber
166
- />
167
- <InputNumber
168
- require
169
- name="inputNumberMinus"
170
- label="Input Phone Number"
171
- placeholder="placeholder"
172
- isAvailableMinus
173
- />
174
- </div>
175
- </div>
176
-
177
- <div className="column align-center">
178
- <h1>Input Checkbox</h1>
179
- <div className="row gap-sm">
180
- <InputCheckbox
181
- require
182
- name="inputCheckbox"
183
- label="Input Checkbox"
184
- options={[
185
- { label: "Mac", value: "mac" },
186
- { label: "Win", value: "win" },
187
- ]}
188
- />
189
- </div>
190
- </div>
191
-
192
- <div className="column align-center">
193
- <h1>Input Password</h1>
194
- <div className="row gap-sm">
195
- <InputPassword name="inputPassword" label="Input Password" require />
196
- </div>
197
- </div>
198
-
199
- <div className="column align-center">
200
- <h1>Input Radio</h1>
201
- <div className="row gap-sm">
202
- <InputRadio
203
- name="inputRadio"
204
- label="Input Password"
205
- options={[
206
- {
207
- label: "Mac",
208
- value: "mac",
209
- },
210
- {
211
- label: "Win",
212
- value: "win",
213
- },
214
- ]}
215
- require
216
- />
217
- </div>
218
- </div>
219
-
220
- <div className="column align-center">
221
- <h1>Input Textarea</h1>
222
- <div className="row gap-sm">
223
- <InputTextarea name="inputTextarea" label="Input Textarea" require />
224
- </div>
225
- </div>
226
-
227
- <div className="column align-center">
228
- <h1>Input Switch</h1>
229
- <div className="row gap-sm">
230
- <InputSwitch name="inputSwitch" />
231
- </div>
232
- </div>
233
-
234
- <div className="column align-center">
235
- <h1>Input Select</h1>
236
- <div className="row gap-sm">
237
- <InputSelect
238
- placeholder="placeholder"
239
- name="inputSelect"
240
- label="Input Select"
241
- require
242
- options={[
243
- {
244
- label: "Mac",
245
- value: "MAC",
246
- },
247
- { label: "Win", value: "WIN" },
248
- ]}
249
- />
250
- </div>
251
- </div>
252
-
253
- <div className="column align-center">
254
- <h1>Input AutoComplete</h1>
255
- <div className="row gap-sm">
256
- <InputAutoComplete
257
- name="inputAutoComplete"
258
- label="Input AutoComplete"
259
- require
260
- options={[
261
- { label: "Mac", value: "MAC" },
262
- { label: "Win", value: "WIN" },
263
- ]}
264
- />
265
- <InputAutoComplete
266
- name="inputAutoCompleteMultiple"
267
- label="Input AutoComplete Multiple"
268
- require
269
- options={[
270
- { label: "Mac", value: "MAC" },
271
- { label: "Win", value: "WIN" },
272
- ]}
273
- isMultiple
274
- />
275
- </div>
276
- </div>
277
-
278
- <div className="column align-center">
279
- <h1>Input Date</h1>
280
- <div className="row gap-sm">
281
- <InputDate name="inputDate" label="Input Date" disabled isHideClearIcon={false} />
282
- <InputDate name="inputDate" label="Input Date" require isHideClearIcon={false} />
283
- <InputDate name="inputDate" label="Input Date" placeholder="placeholder" isHideClearIcon={false} />
284
- <InputDate
285
- name="inputDate"
286
- label="Input Date"
287
- fullWidth
288
- isHideClearIcon={false}
289
- minYear={2560}
290
- maxYear={2570}
291
- />
292
- </div>
293
- </div>
294
-
295
- <div className="column align-center">
296
- <h1>Input Date Range</h1>
297
- <div className="row gap-sm">
298
- <InputDateRange name="inputDateRange" label="Input Date Range" fullWidth isHideClearIcon={false} />
299
- </div>
300
- </div>
301
-
302
- <div className="column align-center">
303
- <h1>Input Date Time</h1>
304
- <div className="row gap-sm">
305
- <InputDateTime name="inputDateTime" label="Input Date Time" disabled />
306
- <InputDateTime name="inputDateTime" label="Input Date Time" require />
307
- <InputDateTime name="inputDateTime" label="Input Date Time" placeholder="placeholder" />
308
- <InputDateTime name="inputDateTime" label="Input Date Time" fullWidth isHideClearIcon={false} />
309
- </div>
310
- </div>
311
-
312
- <br />
313
- <Divider />
314
-
315
- <div className="column align-center">
316
- <h1>Menu</h1>
317
- <div className="row gap-sm">
318
- <Menu trigger={() => <Button name="Click" />}>
319
- {({ close }) =>
320
- [
321
- {
322
- label:
323
- "ExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExportExport",
324
- onClick: () => {
325
- console.log("Click Export!")
326
- close()
327
- },
328
- },
329
- {
330
- label: "Export",
331
- onClick: () => {
332
- console.log("Click Export!")
333
- close()
334
- },
335
- },
336
- ].map((data, index) => {
337
- return (
338
- <p key={index} onClick={() => data.onClick()}>
339
- {data.label}
340
- </p>
341
- )
342
- })
343
- }
344
- </Menu>
345
- </div>
346
- </div>
347
-
348
- <br />
349
- <Divider />
350
-
351
- <div className="column align-center">
352
- <h1>Modal</h1>
353
- <div className="row gap-sm">
354
- <Button name="Open" onClick={() => setIsOpenModal(true)} />
355
- <Modal id="modalTest" open={isOpenModal} onClose={() => setIsOpenModal(false)}>
356
- <div>
357
- <h4>Modal Parent</h4>
358
- <p>Description</p>
359
- </div>
360
- </Modal>
361
- </div>
362
- </div>
363
- </div>
364
- </form>
365
- </FormProvider>
366
- </DBuiProvider>
367
- )
368
- }
369
-
370
- export default App
@@ -1,18 +0,0 @@
1
- // Lib
2
- import React, { type JSX } from "react"
3
-
4
- // Images
5
-
6
- // Include in project
7
- import "./index.scss"
8
- import type { PropsBlackdrop } from "./index.type"
9
-
10
- const Blackdrop: React.FC<PropsBlackdrop> = ({ children, open, onClose }): JSX.Element => {
11
- return (
12
- <div className="DBui-blackdrop" data-hidden={!open} onClick={onClose}>
13
- {children}
14
- </div>
15
- )
16
- }
17
-
18
- export default Blackdrop
@@ -1,7 +0,0 @@
1
- import type { JSX } from "react"
2
-
3
- export type PropsBlackdrop = {
4
- children: JSX.Element | JSX.Element[]
5
- open: boolean
6
- onClose?: () => void
7
- }
@@ -1,44 +0,0 @@
1
- // Lib
2
- import React from "react"
3
-
4
- // Images
5
-
6
- // Include in project
7
- import "./index.scss"
8
- import type { PropsButton } from "./index.type"
9
-
10
- const Button: React.FC<PropsButton> = ({
11
- name,
12
- type = "button",
13
- disabled = false,
14
- onClick,
15
- startIcon: StartIcon,
16
- endIcon: EndIcon,
17
- className,
18
- style,
19
- isLoading = false,
20
- }) => {
21
- return (
22
- <button
23
- type={type}
24
- className={`DBui-button ${className ? className : ""}`}
25
- onClick={onClick && onClick}
26
- disabled={isLoading || disabled}
27
- style={style ? style : {}}
28
- >
29
- {isLoading ? (
30
- <div className="DBui-loaderSpinButton" />
31
- ) : (
32
- <>
33
- {StartIcon && typeof StartIcon === "string" && <img src={StartIcon} alt="startIcon" />}
34
- {StartIcon && typeof StartIcon !== "string" && <StartIcon alt="startIcon" />}
35
- {name}
36
- {EndIcon && typeof EndIcon === "string" && <img src={EndIcon} alt="endIcon" />}
37
- {EndIcon && typeof EndIcon !== "string" && <EndIcon alt="endIcon" />}
38
- </>
39
- )}
40
- </button>
41
- )
42
- }
43
-
44
- export default Button
@@ -1,13 +0,0 @@
1
- import type { CSSProperties, ElementType } from "react"
2
-
3
- export type PropsButton = {
4
- name?: string
5
- type?: "button" | "submit"
6
- disabled?: boolean
7
- onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void
8
- startIcon?: string | ElementType
9
- endIcon?: string | ElementType
10
- className?: string
11
- style?: CSSProperties
12
- isLoading?: boolean
13
- }
@@ -1,39 +0,0 @@
1
- // Lib
2
- import React from "react"
3
-
4
- //Images
5
- import closedSVG from "../assets/closed.svg"
6
-
7
- // Include in project
8
- import type { PropsChip } from "./index.type"
9
- import "./index.scss"
10
-
11
- const Chip: React.FC<PropsChip> = ({ label, onDelete, onClick, icon: Icon, className, style }) => {
12
- return (
13
- <div
14
- className={`DBui-chip ${className ? className : ""}`}
15
- style={style ? style : {}}
16
- data-checked={Boolean(onClick)}
17
- onClick={onClick && onClick}
18
- >
19
- {label}
20
- {onDelete && !Icon && (
21
- <img src={closedSVG} alt="icon" className="DBui-chipIcon" data-checked={Boolean(onDelete)} onClick={onDelete} />
22
- )}
23
- {onDelete && Icon && typeof Icon === "string" && (
24
- <img src={Icon} alt="icon" className="DBui-chipIcon" data-checked={Boolean(onDelete)} onClick={onDelete} />
25
- )}
26
- {onDelete && Icon && typeof Icon !== "string" && (
27
- <Icon alt="icon" className="DBui-chipIcon" data-checked={Boolean(onDelete)} onClick={onDelete} />
28
- )}
29
- {!onDelete && Icon && typeof Icon === "string" && (
30
- <img src={Icon} alt="icon" className="DBui-chipIcon" data-checked={Boolean(onDelete)} onClick={onDelete} />
31
- )}
32
- {!onDelete && Icon && typeof Icon !== "string" && (
33
- <Icon alt="icon" className="DBui-chipIcon" data-checked={Boolean(onDelete)} onClick={onDelete} />
34
- )}
35
- </div>
36
- )
37
- }
38
-
39
- export default Chip
@@ -1,12 +0,0 @@
1
- // Lib
2
-
3
- import type { CSSProperties, ElementType } from "react"
4
-
5
- export type PropsChip = {
6
- label: string
7
- onDelete?: () => void
8
- onClick?: () => void
9
- icon?: string | ElementType
10
- className?: string
11
- style?: CSSProperties
12
- }
@@ -1,26 +0,0 @@
1
- import React, { createContext, useState } from "react"
2
-
3
- type TContext = {
4
- openModalCount: number
5
- setOpenModalCount?: React.Dispatch<React.SetStateAction<number>>
6
- }
7
-
8
- // eslint-disable-next-line react-refresh/only-export-components
9
- export const DBuiContext = createContext<TContext>({
10
- openModalCount: 0,
11
- })
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- export const DBuiProvider = (props: any) => {
14
- const [openModalCount, setOpenModalCount] = useState(0)
15
-
16
- return (
17
- <DBuiContext.Provider
18
- value={{
19
- openModalCount,
20
- setOpenModalCount,
21
- }}
22
- >
23
- {props.children}
24
- </DBuiContext.Provider>
25
- )
26
- }
@@ -1,13 +0,0 @@
1
- // Lib
2
- import React from 'react'
3
-
4
- // Images
5
-
6
- // Include in project
7
- import './index.scss'
8
-
9
- const Divider: React.FC = () => {
10
- return <hr className="DBui-divider" />
11
- }
12
-
13
- export default Divider
@@ -1,62 +0,0 @@
1
- export { default as Button } from "./button"
2
- export type { PropsButton } from "./button/index.type"
3
-
4
- export { default as Blackdrop } from "./blackdrop" // Need variable --z-index-backdrop
5
- export type { PropsBlackdrop } from "./blackdrop/index.type"
6
-
7
- export { default as Chip } from "./chip"
8
- export type { PropsChip } from "./chip/index.type"
9
-
10
- export { default as Divider } from "./divider"
11
-
12
- export { default as Menu } from "./menu" // Need variable --z-index-menu
13
- export type { PropsMenu } from "./menu/index.type"
14
-
15
- export { default as Modal } from "./modal" // Need variable --z-index-normale
16
- export type { PropsModal } from "./modal/index.type"
17
-
18
- export { default as Input } from "./input/input-basic"
19
- export type { PropsInputBasic as PropsInput } from "./input/input-basic/index.type"
20
-
21
- export { default as InputNumber } from "./input/input-number"
22
- export type { PropsInputNumber } from "./input/input-number/index.type"
23
-
24
- export { default as InputDate } from "./input/input-date"
25
- export type { PropsInputDate } from "./input/input-date/index.type"
26
-
27
- export { default as InputDateRange } from "./input/input-date-range"
28
- export type { PropsInputDateRange } from "./input/input-date-range/index.type"
29
-
30
- export { default as InputDateTime } from "./input/input-date-time"
31
- export type { PropsInputDateTime } from "./input/input-date-time/index.type"
32
-
33
- export { default as InputPassword } from "./input/input-password"
34
- export type { PropsInputPassword } from "./input/input-password/index.type"
35
-
36
- export { default as InputRadio } from "./input/input-radio"
37
- export type { PropsInputRadio } from "./input/input-radio/index.type"
38
-
39
- export { default as InputCheckbox } from "./input/input-checkbox"
40
- export type { PropsInputCheckbox } from "./input/input-checkbox/index.type"
41
-
42
- export { default as InputTextarea } from "./input/input-textarea"
43
- export type { PropsInputTextarea } from "./input/input-textarea/index.type"
44
-
45
- export { default as InputSelect } from "./input/input-select"
46
- export type { PropsInputSelect } from "./input/input-select/index.type"
47
-
48
- export { default as InputAutoComplete } from "./input/input-auto-complete"
49
- export type { PropsInputAutoComplete } from "./input/input-auto-complete/index.type"
50
-
51
- export { default as InputSwitch } from "./input/input-switch"
52
- export type { PropsInputSwitch } from "./input/input-switch/index.type"
53
-
54
- // Type
55
- export type TValueOption = string | number
56
- export type TOption = {
57
- label: string
58
- value: TValueOption
59
- }
60
-
61
- // Context
62
- export { DBuiContext, DBuiProvider } from "./context"