@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.
- package/dist/index.css +1 -0
- package/dist/index.es.js +1853 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +8 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/types/App.d.ts +2 -0
- package/dist/types/components/blackdrop/index.d.ts +4 -0
- package/dist/types/components/blackdrop/index.type.d.ts +6 -0
- package/dist/types/components/button/index.d.ts +4 -0
- package/dist/types/components/button/index.type.d.ts +12 -0
- package/dist/types/components/chip/index.d.ts +4 -0
- package/dist/types/components/chip/index.type.d.ts +9 -0
- package/dist/types/components/context.d.ts +8 -0
- package/dist/types/components/divider/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +41 -0
- package/dist/types/components/input/input-auto-complete/index.d.ts +4 -0
- package/dist/types/components/input/input-auto-complete/index.type.d.ts +14 -0
- package/dist/types/components/input/input-base/index.d.ts +4 -0
- package/dist/types/components/input/input-base/index.type.d.ts +11 -0
- package/dist/types/components/input/input-basic/index.d.ts +4 -0
- package/dist/types/components/input/input-basic/index.type.d.ts +10 -0
- package/dist/types/components/input/input-checkbox/index.d.ts +4 -0
- package/dist/types/components/input/input-checkbox/index.type.d.ts +13 -0
- package/dist/types/components/input/input-date/index.d.ts +22 -0
- package/dist/types/components/input/input-date/index.type.d.ts +13 -0
- package/dist/types/components/input/input-date-range/index.d.ts +4 -0
- package/dist/types/components/input/input-date-range/index.type.d.ts +13 -0
- package/dist/types/components/input/input-date-time/index.d.ts +4 -0
- package/dist/types/components/input/input-date-time/index.type.d.ts +13 -0
- package/dist/types/components/input/input-number/index.d.ts +4 -0
- package/dist/types/components/input/input-number/index.type.d.ts +12 -0
- package/dist/types/components/input/input-password/index.d.ts +4 -0
- package/dist/types/components/input/input-password/index.type.d.ts +10 -0
- package/dist/types/components/input/input-radio/index.d.ts +4 -0
- package/dist/types/components/input/input-radio/index.type.d.ts +14 -0
- package/dist/types/components/input/input-select/index.d.ts +4 -0
- package/dist/types/components/input/input-select/index.type.d.ts +16 -0
- package/dist/types/components/input/input-switch/index.d.ts +4 -0
- package/dist/types/components/input/input-switch/index.type.d.ts +6 -0
- package/dist/types/components/input/input-textarea/index.d.ts +4 -0
- package/dist/types/components/input/input-textarea/index.type.d.ts +12 -0
- package/dist/types/components/menu/index.d.ts +4 -0
- package/dist/types/components/menu/index.type.d.ts +11 -0
- package/dist/types/components/modal/index.d.ts +4 -0
- package/dist/types/components/modal/index.type.d.ts +7 -0
- package/dist/types/index.d.ts +41 -0
- package/dist/types/main.d.ts +1 -0
- package/package.json +5 -1
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +0 -6
- package/declaration.d.ts +0 -10
- package/docker-compose.yml +0 -20
- package/eslint.config.js +0 -23
- package/index.html +0 -13
- package/src/App.tsx +0 -370
- package/src/components/blackdrop/index.tsx +0 -18
- package/src/components/blackdrop/index.type.ts +0 -7
- package/src/components/button/index.tsx +0 -44
- package/src/components/button/index.type.ts +0 -13
- package/src/components/chip/index.tsx +0 -39
- package/src/components/chip/index.type.ts +0 -12
- package/src/components/context.tsx +0 -26
- package/src/components/divider/index.tsx +0 -13
- package/src/components/index.ts +0 -62
- package/src/components/input/input-auto-complete/index.tsx +0 -140
- package/src/components/input/input-auto-complete/index.type.tsx +0 -13
- package/src/components/input/input-base/index.tsx +0 -39
- package/src/components/input/input-base/index.type.tsx +0 -13
- package/src/components/input/input-basic/index.tsx +0 -47
- package/src/components/input/input-basic/index.type.tsx +0 -8
- package/src/components/input/input-checkbox/index.tsx +0 -69
- package/src/components/input/input-checkbox/index.type.tsx +0 -11
- package/src/components/input/input-date/index.tsx +0 -354
- package/src/components/input/input-date/index.type.tsx +0 -11
- package/src/components/input/input-date-range/index.tsx +0 -284
- package/src/components/input/input-date-range/index.type.tsx +0 -11
- package/src/components/input/input-date-time/index.tsx +0 -367
- package/src/components/input/input-date-time/index.type.tsx +0 -11
- package/src/components/input/input-number/index.tsx +0 -118
- package/src/components/input/input-number/index.type.tsx +0 -11
- package/src/components/input/input-password/index.tsx +0 -60
- package/src/components/input/input-password/index.type.tsx +0 -8
- package/src/components/input/input-radio/index.tsx +0 -72
- package/src/components/input/input-radio/index.type.tsx +0 -12
- package/src/components/input/input-select/index.tsx +0 -113
- package/src/components/input/input-select/index.type.tsx +0 -15
- package/src/components/input/input-switch/index.tsx +0 -44
- package/src/components/input/input-switch/index.type.tsx +0 -4
- package/src/components/input/input-textarea/index.tsx +0 -48
- package/src/components/input/input-textarea/index.type.tsx +0 -10
- package/src/components/menu/index.tsx +0 -136
- package/src/components/menu/index.type.ts +0 -8
- package/src/components/modal/index.tsx +0 -99
- package/src/components/modal/index.type.tsx +0 -8
- package/src/index.scss +0 -44
- package/src/index.ts +0 -62
- package/src/logoDownload.svg +0 -3
- package/src/main.tsx +0 -9
- package/tsconfig.app.json +0 -28
- package/tsconfig.json +0 -42
- package/tsconfig.node.json +0 -29
- package/vite.config.d.ts +0 -2
- package/vite.config.ts +0 -35
- /package/{src → dist}/components/assets/closed.svg +0 -0
- /package/{src → dist}/components/assets/expand-arrow.svg +0 -0
- /package/{src → dist}/components/assets/visibility-off.svg +0 -0
- /package/{src → dist}/components/assets/visibility.svg +0 -0
- /package/{src → dist}/components/blackdrop/index.scss +0 -0
- /package/{src → dist}/components/button/index.scss +0 -0
- /package/{src → dist}/components/chip/index.scss +0 -0
- /package/{src → dist}/components/divider/index.scss +0 -0
- /package/{src → dist}/components/input/extend.scss +0 -0
- /package/{src → dist}/components/input/input-auto-complete/index.scss +0 -0
- /package/{src → dist}/components/input/input-base/index.scss +0 -0
- /package/{src → dist}/components/input/input-basic/index.scss +0 -0
- /package/{src → dist}/components/input/input-checkbox/index.scss +0 -0
- /package/{src → dist}/components/input/input-date/index.scss +0 -0
- /package/{src → dist}/components/input/input-date-range/index.scss +0 -0
- /package/{src → dist}/components/input/input-date-time/index.scss +0 -0
- /package/{src → dist}/components/input/input-number/index.scss +0 -0
- /package/{src → dist}/components/input/input-password/index.scss +0 -0
- /package/{src → dist}/components/input/input-radio/index.scss +0 -0
- /package/{src → dist}/components/input/input-select/index.scss +0 -0
- /package/{src → dist}/components/input/input-switch/index.scss +0 -0
- /package/{src → dist}/components/input/input-textarea/index.scss +0 -0
- /package/{src → dist}/components/menu/index.scss +0 -0
- /package/{src → dist}/components/modal/index.scss +0 -0
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// Lib
|
|
2
|
-
import React, { useContext, useEffect, useRef, type JSX } from "react"
|
|
3
|
-
|
|
4
|
-
//Images
|
|
5
|
-
import closedSVG from "../assets/closed.svg"
|
|
6
|
-
|
|
7
|
-
// Include in project
|
|
8
|
-
import "./index.scss"
|
|
9
|
-
import Blackdrop from "../blackdrop"
|
|
10
|
-
import { DBuiContext } from "../context"
|
|
11
|
-
import type { PropsModal } from "./index.type"
|
|
12
|
-
|
|
13
|
-
const Modal: React.FC<PropsModal> = ({ children, open, onClose, id }): JSX.Element => {
|
|
14
|
-
const { openModalCount, setOpenModalCount } = useContext(DBuiContext)
|
|
15
|
-
const setModalIncress = () => setOpenModalCount?.((prev) => prev + 1)
|
|
16
|
-
const setModalDecress = () => setOpenModalCount?.((prev) => prev - 1)
|
|
17
|
-
const setModalZero = () => setOpenModalCount?.(0)
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
const modalRef = useRef<any>(null)
|
|
21
|
-
|
|
22
|
-
// whitelist for portal UI
|
|
23
|
-
const WHITELIST_CLASSES = [
|
|
24
|
-
"DBui-wrapperMenuItem",
|
|
25
|
-
"DBui-inputDateWrapperCalendar",
|
|
26
|
-
"DBui-inputDateRangeRowMonthYearSelected",
|
|
27
|
-
"DBui-inputDateTimeWrapperCalendar",
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
// Update the global counter and adjust the overflow style
|
|
32
|
-
if (open) {
|
|
33
|
-
setModalIncress()
|
|
34
|
-
document.body.style.overflow = "hidden"
|
|
35
|
-
} else {
|
|
36
|
-
if (openModalCount <= 0) {
|
|
37
|
-
setModalZero()
|
|
38
|
-
document.body.style.overflow = "visible"
|
|
39
|
-
} else {
|
|
40
|
-
setModalDecress()
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return () => {
|
|
45
|
-
if (openModalCount === 0) {
|
|
46
|
-
document.body.style.overflow = "visible"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, [open])
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
const modalElements = document.querySelectorAll(".DBui-modalBase")
|
|
53
|
-
const modalArray = Array.from(modalElements)
|
|
54
|
-
const showModals = modalArray.filter((modal) => modal.getAttribute("data-hidden") === "false")
|
|
55
|
-
const topModal = showModals[showModals.length - 1]
|
|
56
|
-
|
|
57
|
-
if (topModal?.getAttribute("id") !== id) return
|
|
58
|
-
|
|
59
|
-
// ---------- ESC CLOSE ----------
|
|
60
|
-
function handleKeydown(event: KeyboardEvent) {
|
|
61
|
-
if (event.key === "Escape" || event.keyCode === 27) {
|
|
62
|
-
onClose()
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// ---------- CLICK OUTSIDE CLOSE ----------
|
|
67
|
-
function handleClickOutside(e: MouseEvent) {
|
|
68
|
-
const target = e.target as HTMLElement
|
|
69
|
-
|
|
70
|
-
// ถ้า click ใน modal → ไม่ปิด
|
|
71
|
-
if (modalRef.current?.contains(target)) return
|
|
72
|
-
|
|
73
|
-
// ถ้า click ใน whitelist (menu, dropdown, select panel)
|
|
74
|
-
const isInWhitelist = WHITELIST_CLASSES.some((cls) => target.closest("." + cls))
|
|
75
|
-
if (isInWhitelist) return
|
|
76
|
-
|
|
77
|
-
onClose()
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
document.addEventListener("keydown", handleKeydown)
|
|
81
|
-
document.addEventListener("mousedown", handleClickOutside)
|
|
82
|
-
|
|
83
|
-
return () => {
|
|
84
|
-
document.removeEventListener("keydown", handleKeydown)
|
|
85
|
-
document.removeEventListener("mousedown", handleClickOutside)
|
|
86
|
-
}
|
|
87
|
-
}, [openModalCount])
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<Blackdrop open={open}>
|
|
91
|
-
<div className="DBui-modalBase DBui-modalContent" data-hidden={!open} ref={modalRef} id={id}>
|
|
92
|
-
<img src={closedSVG} alt="" className="DBui-close" onClick={onClose} />
|
|
93
|
-
<div>{children}</div>
|
|
94
|
-
</div>
|
|
95
|
-
</Blackdrop>
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export default Modal
|
package/src/index.scss
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
outline: none !important;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
body {
|
|
7
|
-
margin: 1em 0;
|
|
8
|
-
padding: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.row {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
width: 70%;
|
|
17
|
-
min-height: 100px;
|
|
18
|
-
background-color: #FAFAFA;
|
|
19
|
-
border: 1px solid #E3E3E8;
|
|
20
|
-
margin: 1em 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.column {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.align-center {
|
|
29
|
-
align-items: center;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.gap-sm {
|
|
33
|
-
gap: 1em;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
h1,
|
|
37
|
-
h2,
|
|
38
|
-
h3,
|
|
39
|
-
h4,
|
|
40
|
-
h5,
|
|
41
|
-
h6,
|
|
42
|
-
p {
|
|
43
|
-
margin: 0;
|
|
44
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export { default as Button } from "./components/button"
|
|
2
|
-
export type { PropsButton } from "./components/button/index.type"
|
|
3
|
-
|
|
4
|
-
export { default as Blackdrop } from "./components/blackdrop" // Need variable --z-index-backdrop
|
|
5
|
-
export type { PropsBlackdrop } from "./components/blackdrop/index.type"
|
|
6
|
-
|
|
7
|
-
export { default as Chip } from "./components/chip"
|
|
8
|
-
export type { PropsChip } from "./components/chip/index.type"
|
|
9
|
-
|
|
10
|
-
export { default as Divider } from "./components/divider"
|
|
11
|
-
|
|
12
|
-
export { default as Menu } from "./components/menu" // Need variable --z-index-menu
|
|
13
|
-
export type { PropsMenu } from "./components/menu/index.type"
|
|
14
|
-
|
|
15
|
-
export { default as Modal } from "./components/modal" // Need variable --z-index-normale
|
|
16
|
-
export type { PropsModal } from "./components/modal/index.type"
|
|
17
|
-
|
|
18
|
-
export { default as Input } from "./components/input/input-basic"
|
|
19
|
-
export type { PropsInputBasic as PropsInput } from "./components/input/input-basic/index.type"
|
|
20
|
-
|
|
21
|
-
export { default as InputNumber } from "./components/input/input-number"
|
|
22
|
-
export type { PropsInputNumber } from "./components/input/input-number/index.type"
|
|
23
|
-
|
|
24
|
-
export { default as InputDate } from "./components/input/input-date"
|
|
25
|
-
export type { PropsInputDate } from "./components/input/input-date/index.type"
|
|
26
|
-
|
|
27
|
-
export { default as InputDateRange } from "./components/input/input-date-range"
|
|
28
|
-
export type { PropsInputDateRange } from "./components/input/input-date-range/index.type"
|
|
29
|
-
|
|
30
|
-
export { default as InputDateTime } from "./components/input/input-date-time"
|
|
31
|
-
export type { PropsInputDateTime } from "./components/input/input-date-time/index.type"
|
|
32
|
-
|
|
33
|
-
export { default as InputPassword } from "./components/input/input-password"
|
|
34
|
-
export type { PropsInputPassword } from "./components/input/input-password/index.type"
|
|
35
|
-
|
|
36
|
-
export { default as InputRadio } from "./components/input/input-radio"
|
|
37
|
-
export type { PropsInputRadio } from "./components/input/input-radio/index.type"
|
|
38
|
-
|
|
39
|
-
export { default as InputCheckbox } from "./components/input/input-checkbox"
|
|
40
|
-
export type { PropsInputCheckbox } from "./components/input/input-checkbox/index.type"
|
|
41
|
-
|
|
42
|
-
export { default as InputTextarea } from "./components/input/input-textarea"
|
|
43
|
-
export type { PropsInputTextarea } from "./components/input/input-textarea/index.type"
|
|
44
|
-
|
|
45
|
-
export { default as InputSelect } from "./components/input/input-select"
|
|
46
|
-
export type { PropsInputSelect } from "./components/input/input-select/index.type"
|
|
47
|
-
|
|
48
|
-
export { default as InputAutoComplete } from "./components/input/input-auto-complete"
|
|
49
|
-
export type { PropsInputAutoComplete } from "./components/input/input-auto-complete/index.type"
|
|
50
|
-
|
|
51
|
-
export { default as InputSwitch } from "./components/input/input-switch"
|
|
52
|
-
export type { PropsInputSwitch } from "./components/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 "./components/context"
|
package/src/logoDownload.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="13" height="14" viewBox="0 0 13 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M3.77508 4.84992C3.69885 4.77369 3.65602 4.6703 3.65602 4.5625C3.65602 4.4547 3.69885 4.35131 3.77508 4.27508C3.85131 4.19885 3.9547 4.15602 4.0625 4.15602C4.1703 4.15602 4.27369 4.19885 4.34992 4.27508L6.09375 6.01941V1.71875C6.09375 1.61101 6.13655 1.50767 6.21274 1.43149C6.28892 1.3553 6.39226 1.3125 6.5 1.3125C6.60774 1.3125 6.71108 1.3553 6.78726 1.43149C6.86345 1.50767 6.90625 1.61101 6.90625 1.71875V6.01941L8.65008 4.27508C8.72631 4.19885 8.8297 4.15602 8.9375 4.15602C9.0453 4.15602 9.14869 4.19885 9.22492 4.27508C9.30115 4.35131 9.34398 4.4547 9.34398 4.5625C9.34398 4.6703 9.30115 4.77369 9.22492 4.84992L6.78742 7.28742C6.74969 7.32519 6.70489 7.35516 6.65557 7.3756C6.60625 7.39605 6.55339 7.40657 6.5 7.40657C6.44661 7.40657 6.39375 7.39605 6.34443 7.3756C6.29511 7.35516 6.25031 7.32519 6.21258 7.28742L3.77508 4.84992ZM12.1875 7.40625V10.6562C12.1875 10.8717 12.1019 11.0784 11.9495 11.2308C11.7972 11.3831 11.5905 11.4688 11.375 11.4688H1.625C1.40951 11.4688 1.20285 11.3831 1.05048 11.2308C0.898102 11.0784 0.8125 10.8717 0.8125 10.6562V7.40625C0.8125 7.19076 0.898102 6.9841 1.05048 6.83173C1.20285 6.67935 1.40951 6.59375 1.625 6.59375H4.28594C4.31262 6.59373 4.33905 6.59897 4.3637 6.60916C4.38836 6.61935 4.41077 6.63431 4.42965 6.65316L5.63672 7.86328C5.74994 7.9769 5.88449 8.06705 6.03263 8.12857C6.18077 8.19008 6.3396 8.22174 6.5 8.22174C6.6604 8.22174 6.81923 8.19008 6.96737 8.12857C7.11551 8.06705 7.25006 7.9769 7.36328 7.86328L8.57188 6.65469C8.60938 6.61642 8.66048 6.59451 8.71406 6.59375H11.375C11.5905 6.59375 11.7972 6.67935 11.9495 6.83173C12.1019 6.9841 12.1875 7.19076 12.1875 7.40625ZM10.1562 9.03125C10.1562 8.91073 10.1205 8.79291 10.0536 8.6927C9.98659 8.59249 9.89142 8.51438 9.78007 8.46826C9.66872 8.42214 9.5462 8.41007 9.42799 8.43358C9.30978 8.4571 9.2012 8.51513 9.11598 8.60036C9.03076 8.68558 8.97272 8.79416 8.94921 8.91237C8.9257 9.03057 8.93776 9.1531 8.98389 9.26445C9.03001 9.3758 9.10811 9.47097 9.20832 9.53793C9.30854 9.60489 9.42635 9.64062 9.54688 9.64062C9.70849 9.64062 9.86349 9.57642 9.97777 9.46214C10.092 9.34786 10.1562 9.19287 10.1562 9.03125Z" fill="#C3C3C3"/>
|
|
3
|
-
</svg>
|
package/src/main.tsx
DELETED
package/tsconfig.app.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"types": ["vite/client"],
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
|
|
11
|
-
/* Bundler mode */
|
|
12
|
-
"moduleResolution": "bundler",
|
|
13
|
-
"allowImportingTsExtensions": true,
|
|
14
|
-
"verbatimModuleSyntax": true,
|
|
15
|
-
"moduleDetection": "force",
|
|
16
|
-
"noEmit": true,
|
|
17
|
-
"jsx": "react-jsx",
|
|
18
|
-
|
|
19
|
-
/* Linting */
|
|
20
|
-
"strict": true,
|
|
21
|
-
"noUnusedLocals": true,
|
|
22
|
-
"noUnusedParameters": true,
|
|
23
|
-
"erasableSyntaxOnly": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true,
|
|
25
|
-
"noUncheckedSideEffectImports": true
|
|
26
|
-
},
|
|
27
|
-
"include": ["src"]
|
|
28
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"composite": true,
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": [
|
|
7
|
-
"ES2020",
|
|
8
|
-
"DOM",
|
|
9
|
-
"DOM.Iterable"
|
|
10
|
-
],
|
|
11
|
-
"module": "ESNext",
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"moduleResolution": "bundler",
|
|
14
|
-
"allowImportingTsExtensions": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"declarationDir": "dist/types",
|
|
19
|
-
"emitDeclarationOnly": true,
|
|
20
|
-
"noEmit": false,
|
|
21
|
-
"rootDir": "src",
|
|
22
|
-
"outDir": "dist/types",
|
|
23
|
-
"jsx": "react-jsx",
|
|
24
|
-
"strict": true,
|
|
25
|
-
"noUnusedLocals": true,
|
|
26
|
-
"noUnusedParameters": true,
|
|
27
|
-
"noFallthroughCasesInSwitch": true,
|
|
28
|
-
"typeRoots": [
|
|
29
|
-
"./dist/index.d.ts",
|
|
30
|
-
"node_modules/@types"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"include": [
|
|
34
|
-
"src",
|
|
35
|
-
"./index.ts",
|
|
36
|
-
"declaration.d.ts"
|
|
37
|
-
],
|
|
38
|
-
"files": [],
|
|
39
|
-
"references": [
|
|
40
|
-
{ "path": "./tsconfig.node.json" }
|
|
41
|
-
]
|
|
42
|
-
}
|
package/tsconfig.node.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "ES2023",
|
|
5
|
-
"lib": ["ES2023"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"types": ["node"],
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
/* Bundler mode */
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"allowImportingTsExtensions": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"moduleDetection": "force",
|
|
15
|
-
|
|
16
|
-
"composite": true,
|
|
17
|
-
"declaration": true,
|
|
18
|
-
"emitDeclarationOnly": true,
|
|
19
|
-
|
|
20
|
-
/* Linting */
|
|
21
|
-
"strict": true,
|
|
22
|
-
"noUnusedLocals": true,
|
|
23
|
-
"noUnusedParameters": true,
|
|
24
|
-
"erasableSyntaxOnly": true,
|
|
25
|
-
"noFallthroughCasesInSwitch": true,
|
|
26
|
-
"noUncheckedSideEffectImports": true
|
|
27
|
-
},
|
|
28
|
-
"include": ["vite.config.ts"]
|
|
29
|
-
}
|
package/vite.config.d.ts
DELETED
package/vite.config.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import path from "path"
|
|
2
|
-
import { defineConfig } from "vite"
|
|
3
|
-
import react from "@vitejs/plugin-react"
|
|
4
|
-
import dts from "vite-plugin-dts"
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
build: {
|
|
8
|
-
lib: {
|
|
9
|
-
entry: path.resolve(__dirname, "src/index.ts"),
|
|
10
|
-
name: "iteratex-component-library",
|
|
11
|
-
fileName: (format) => `index.${format}.js`,
|
|
12
|
-
},
|
|
13
|
-
rollupOptions: {
|
|
14
|
-
external: ["react", "react-dom"],
|
|
15
|
-
output: {
|
|
16
|
-
globals: {
|
|
17
|
-
react: "React",
|
|
18
|
-
"react-dom": "ReactDOM",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
cssCodeSplit: true,
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
emptyOutDir: true,
|
|
25
|
-
},
|
|
26
|
-
server: { host: true, port: 3000 },
|
|
27
|
-
plugins: [
|
|
28
|
-
react(),
|
|
29
|
-
dts({
|
|
30
|
-
insertTypesEntry: true,
|
|
31
|
-
rollupTypes: false,
|
|
32
|
-
outDir: "dist/types",
|
|
33
|
-
}),
|
|
34
|
-
],
|
|
35
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|