kahuna-base-react-components 1.0.7 → 1.1.1
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/.prettierrc +8 -0
- package/README.md +23 -0
- package/dist/components/KButton/KButton.d.ts +17 -3
- package/dist/components/KCodeInput/KCodeInput.d.ts +36 -0
- package/dist/components/KCodeInput/index.d.ts +1 -0
- package/dist/components/KDropdown/KDropdown.d.ts +38 -0
- package/dist/components/KDropdown/index.d.ts +1 -0
- package/dist/components/KDropdownToggle/KDropdownToggle.d.ts +35 -0
- package/dist/components/KDropdownToggle/index.d.ts +1 -0
- package/dist/components/KInput/KInput.d.ts +32 -0
- package/dist/components/KInput/index.d.ts +1 -0
- package/dist/components/KLogo/KLogo.d.ts +18 -0
- package/dist/components/KLogo/index.d.ts +1 -0
- package/dist/components/KSelectDate/KSelectDate.d.ts +9 -0
- package/dist/components/KSelectDate/index.d.ts +1 -0
- package/dist/components/KSlider/KSlider.d.ts +15 -0
- package/dist/components/KSlider/index.d.ts +1 -0
- package/dist/components/KSliderLabel/KSliderLabel.d.ts +19 -0
- package/dist/components/KSliderLabel/index.d.ts +1 -0
- package/dist/components/KSpan/KSpan.d.ts +14 -4
- package/dist/components/KTextArea/KTextArea.d.ts +33 -0
- package/dist/components/KTextArea/index.d.ts +1 -0
- package/dist/components/KTitleSpan/KTitleSpan.d.ts +14 -0
- package/dist/components/KTitleSpan/index.d.ts +1 -0
- package/dist/components/KTooltip/KTooltip.d.ts +19 -0
- package/dist/components/KTooltip/index.d.ts +1 -0
- package/dist/fonts/AeonikPro-Bold/AeonikPro-Bold.otf +0 -0
- package/dist/fonts/AeonikPro-Bold/CoType EULA Desktop.pdf +1388 -3
- package/dist/fonts/Inter/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/dist/fonts/Inter/OFL.txt +93 -0
- package/dist/fonts/Inter/README.txt +72 -0
- package/dist/fonts/Inter/static/Inter-Black.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-Bold.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-ExtraBold.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-ExtraLight.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-Light.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-Medium.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-Regular.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-SemiBold.ttf +0 -0
- package/dist/fonts/Inter/static/Inter-Thin.ttf +0 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.esm.js +9 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +242 -8
- package/package.json +14 -3
- package/postcss.config.js +6 -0
- package/removeUseClient.js +22 -0
- package/rollup.config.js +9 -3
- package/src/assets/calendar-hovered.svg +3 -0
- package/src/assets/calendar.svg +3 -0
- package/src/assets/check.svg +3 -0
- package/src/assets/chevron-left.svg +7 -0
- package/src/assets/chevron-right.svg +7 -0
- package/src/assets/fonts/AeonikPro/AeonikPro-Bold.otf +0 -0
- package/src/assets/fonts/AeonikPro/AeonikPro-Medium.otf +0 -0
- package/src/assets/fonts/AeonikPro/CoType EULA Desktop.pdf +1388 -3
- package/src/assets/fonts/Inter/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/src/assets/fonts/Inter/OFL.txt +93 -0
- package/src/assets/fonts/Inter/README.txt +72 -0
- package/src/assets/fonts/Inter/static/Inter-Black.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-Bold.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-Light.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-Medium.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-Regular.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-SemiBold.ttf +0 -0
- package/src/assets/fonts/Inter/static/Inter-Thin.ttf +0 -0
- package/src/assets/kahuna-text.svg +3 -0
- package/src/assets/logo-gray.svg +10 -0
- package/src/assets/logo-small-hovered.svg +4 -0
- package/src/assets/logo-small.svg +11 -0
- package/src/assets/logo.svg +11 -0
- package/src/assets/progress.svg +37 -0
- package/src/assets/separator.svg +3 -0
- package/src/assets/slider-dots.svg +7 -0
- package/src/assets/slider-step.svg +3 -0
- package/src/assets/slider-thumb.svg +3 -0
- package/src/assets/tracks.svg +5 -0
- package/src/assets/union.svg +3 -0
- package/src/assets/vector.svg +3 -0
- package/src/components/KButton/KButton.stories.tsx +69 -12
- package/src/components/KButton/KButton.tsx +51 -14
- package/src/components/KCodeInput/KCodeInput.stories.tsx +84 -0
- package/src/components/KCodeInput/KCodeInput.tsx +260 -0
- package/src/components/KCodeInput/index.ts +1 -0
- package/src/components/KDropdown/KDropdown.stories.tsx +90 -0
- package/src/components/KDropdown/KDropdown.tsx +201 -0
- package/src/components/KDropdown/index.ts +1 -0
- package/src/components/KInput/KInput.stories.tsx +84 -0
- package/src/components/KInput/KInput.tsx +128 -0
- package/src/components/KInput/index.ts +1 -0
- package/src/components/KLogo/KLogo.stories.tsx +24 -0
- package/src/components/KLogo/KLogo.tsx +79 -0
- package/src/components/KLogo/index.ts +1 -0
- package/src/components/KSelectDate/CalendarCustom.css +235 -0
- package/src/components/KSelectDate/KSelectDate.stories.tsx +54 -0
- package/src/components/KSelectDate/KSelectDate.tsx +314 -0
- package/src/components/KSelectDate/index.ts +1 -0
- package/src/components/KSlider/KSlider.stories.tsx +19 -0
- package/src/components/KSlider/KSlider.tsx +67 -0
- package/src/components/KSlider/index.ts +1 -0
- package/src/components/KSliderLabel/KSliderLabel.stories.tsx +61 -0
- package/src/components/KSliderLabel/KSliderLabel.tsx +137 -0
- package/src/components/KSliderLabel/index.ts +1 -0
- package/src/components/KSpan/KSpan.stories.tsx +31 -11
- package/src/components/KSpan/KSpan.tsx +65 -9
- package/src/components/KTextArea/KTextArea.stories.tsx +69 -0
- package/src/components/KTextArea/KTextArea.tsx +145 -0
- package/src/components/KTextArea/index.ts +1 -0
- package/src/components/KTitleSpan/KTitleSpan.stories.tsx +23 -0
- package/src/components/KTitleSpan/KTitleSpan.tsx +33 -0
- package/src/components/KTitleSpan/index.ts +1 -0
- package/src/components/KTooltip/KTooltip.stories.tsx +94 -0
- package/src/components/KTooltip/KTooltip.tsx +67 -0
- package/src/components/KTooltip/index.ts +1 -0
- package/src/index.ts +12 -1
- package/src/main.css +251 -0
- package/tailwind.config.js +9 -0
- package/dist/components/KButton/KButton.stories.d.ts +0 -4
- package/dist/components/KSpan/KSpan.stories.d.ts +0 -3
- package/src/stories/Button.stories.ts +0 -50
- package/src/stories/Button.tsx +0 -48
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Header.stories.ts +0 -27
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -32
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -69
package/dist/types.d.ts
CHANGED
|
@@ -1,18 +1,252 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties, KeyboardEvent } from 'react';
|
|
2
|
+
import { MultiValue } from 'react-select';
|
|
2
3
|
|
|
3
4
|
interface KButtonProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
text?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
rightIcon?: string;
|
|
9
|
+
leftIcon?: string;
|
|
10
|
+
background?: string;
|
|
11
|
+
borderRadius?: number;
|
|
12
|
+
width?: string;
|
|
13
|
+
height?: string;
|
|
7
14
|
disabled?: boolean;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
padding?: string;
|
|
17
|
+
shadowDisabled?: boolean;
|
|
18
|
+
hoverBackground?: string;
|
|
19
|
+
fontWeight?: number;
|
|
20
|
+
textDecoration?: string;
|
|
21
|
+
gap?: string;
|
|
8
22
|
}
|
|
9
23
|
declare const KButton: React.FC<KButtonProps>;
|
|
10
24
|
|
|
11
25
|
interface KSpanProps {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
26
|
+
text: string;
|
|
27
|
+
fontSize?: number;
|
|
28
|
+
color?: string;
|
|
29
|
+
fontWeight?: number;
|
|
30
|
+
lineHeight?: string;
|
|
31
|
+
fontStyle?: string;
|
|
32
|
+
letterSpacing?: string;
|
|
33
|
+
hoverText?: string;
|
|
34
|
+
hoverTextColor?: string;
|
|
35
|
+
hoverStyle?: CSSProperties;
|
|
36
|
+
textDecoration?: string;
|
|
37
|
+
ellipsis?: boolean;
|
|
15
38
|
}
|
|
16
39
|
declare const KSpan: React.FC<KSpanProps>;
|
|
17
40
|
|
|
18
|
-
|
|
41
|
+
interface KTitleSpanProps {
|
|
42
|
+
text: string;
|
|
43
|
+
fontSize?: number;
|
|
44
|
+
color?: string;
|
|
45
|
+
fontWeight?: number;
|
|
46
|
+
lineHeight?: string;
|
|
47
|
+
fontStyle?: string;
|
|
48
|
+
letterSpacing?: string;
|
|
49
|
+
bold?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare const KTitleSpan: React.FC<KTitleSpanProps>;
|
|
52
|
+
|
|
53
|
+
interface KLogoProps {
|
|
54
|
+
width?: number;
|
|
55
|
+
height?: number;
|
|
56
|
+
borderRadius?: number;
|
|
57
|
+
primaryTextVisible?: boolean;
|
|
58
|
+
secondaryText?: string;
|
|
59
|
+
logoColor?: string;
|
|
60
|
+
hoverEnabled?: boolean;
|
|
61
|
+
secondaryTextColor?: string;
|
|
62
|
+
secondaryTextFontSize?: number;
|
|
63
|
+
hideIcon?: boolean;
|
|
64
|
+
primaryTextWidth?: number;
|
|
65
|
+
primaryTextHeight?: number;
|
|
66
|
+
}
|
|
67
|
+
declare const KLogo: React.FC<KLogoProps>;
|
|
68
|
+
|
|
69
|
+
interface KInputProps {
|
|
70
|
+
value: string;
|
|
71
|
+
onChange: (value: string) => void;
|
|
72
|
+
onBlur?: (value: string) => void;
|
|
73
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
74
|
+
width?: number;
|
|
75
|
+
height?: number;
|
|
76
|
+
leftIcon?: string;
|
|
77
|
+
rightIcon?: string;
|
|
78
|
+
background?: string;
|
|
79
|
+
activeBackground?: string;
|
|
80
|
+
borderRadius?: number;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
placeholder?: string;
|
|
83
|
+
shadowDisabled?: boolean;
|
|
84
|
+
type?: string;
|
|
85
|
+
leftIconClick?: () => void;
|
|
86
|
+
rightIconClick?: () => void;
|
|
87
|
+
accentColor?: string;
|
|
88
|
+
hoverBackground?: string;
|
|
89
|
+
padding?: string;
|
|
90
|
+
gap?: string;
|
|
91
|
+
border?: string;
|
|
92
|
+
boxShadow?: string;
|
|
93
|
+
fontSize?: string;
|
|
94
|
+
iconSize?: string;
|
|
95
|
+
checked?: boolean;
|
|
96
|
+
}
|
|
97
|
+
declare const KInput$1: React.FC<KInputProps>;
|
|
98
|
+
|
|
99
|
+
interface KTextAreaProps {
|
|
100
|
+
value: string;
|
|
101
|
+
onChange: (value: string) => void;
|
|
102
|
+
rows?: number;
|
|
103
|
+
onBlur?: (value: string) => void;
|
|
104
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
105
|
+
width?: number;
|
|
106
|
+
height?: number;
|
|
107
|
+
leftIcon?: string;
|
|
108
|
+
rightIcon?: string;
|
|
109
|
+
background?: string;
|
|
110
|
+
activeBackground?: string;
|
|
111
|
+
borderRadius?: number;
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
placeholder?: string;
|
|
114
|
+
shadowDisabled?: boolean;
|
|
115
|
+
leftIconClick?: () => void;
|
|
116
|
+
rightIconClick?: () => void;
|
|
117
|
+
accentColor?: string;
|
|
118
|
+
hoverBackground?: string;
|
|
119
|
+
padding?: string;
|
|
120
|
+
gap?: string;
|
|
121
|
+
border?: string;
|
|
122
|
+
boxShadow?: string;
|
|
123
|
+
fontSize?: string;
|
|
124
|
+
iconSize?: string;
|
|
125
|
+
checked?: boolean;
|
|
126
|
+
maxHeight?: number;
|
|
127
|
+
}
|
|
128
|
+
declare const KTextArea: React.FC<KTextAreaProps>;
|
|
129
|
+
|
|
130
|
+
interface KSelectOption {
|
|
131
|
+
label: string;
|
|
132
|
+
value: number;
|
|
133
|
+
type?: string;
|
|
134
|
+
label2?: string;
|
|
135
|
+
value2?: string;
|
|
136
|
+
icon?: string;
|
|
137
|
+
}
|
|
138
|
+
interface KDropdownProps {
|
|
139
|
+
defaultValue?: KSelectOption | MultiValue<KSelectOption>;
|
|
140
|
+
defaultValuePrimitive?: string | number;
|
|
141
|
+
selected?: KSelectOption | MultiValue<KSelectOption>;
|
|
142
|
+
onSelect: (selected: KSelectOption | MultiValue<KSelectOption> | undefined) => void;
|
|
143
|
+
options: KSelectOption[];
|
|
144
|
+
width?: number;
|
|
145
|
+
height?: number;
|
|
146
|
+
leftIcon?: string;
|
|
147
|
+
rightIcon?: string;
|
|
148
|
+
background?: string;
|
|
149
|
+
activeBackground?: string;
|
|
150
|
+
borderRadius?: number;
|
|
151
|
+
placeholder?: string;
|
|
152
|
+
isMulti?: boolean;
|
|
153
|
+
label?: string;
|
|
154
|
+
textColor?: string;
|
|
155
|
+
shadowDisabled?: boolean;
|
|
156
|
+
menuBackground?: string;
|
|
157
|
+
padding?: string;
|
|
158
|
+
gap?: string;
|
|
159
|
+
hideChosenOptionIcon?: boolean;
|
|
160
|
+
isClearable?: boolean;
|
|
161
|
+
isEllipsis?: boolean;
|
|
162
|
+
}
|
|
163
|
+
declare const KDropdown: React.FC<KDropdownProps>;
|
|
164
|
+
|
|
165
|
+
interface SliderOption {
|
|
166
|
+
label: string;
|
|
167
|
+
value: number;
|
|
168
|
+
}
|
|
169
|
+
interface KSliderProps {
|
|
170
|
+
options: SliderOption[];
|
|
171
|
+
onChange: (option: SliderOption) => void;
|
|
172
|
+
value?: number;
|
|
173
|
+
disabled?: boolean;
|
|
174
|
+
width?: string;
|
|
175
|
+
}
|
|
176
|
+
declare const KSlider: React.FC<KSliderProps>;
|
|
177
|
+
|
|
178
|
+
interface KSelectDateProps {
|
|
179
|
+
value: Date | undefined;
|
|
180
|
+
onChange: (date: Date | undefined) => void;
|
|
181
|
+
}
|
|
182
|
+
declare const KSelectDate: React.FC<KSelectDateProps>;
|
|
183
|
+
|
|
184
|
+
interface KTooltipProps {
|
|
185
|
+
children: React.ReactNode;
|
|
186
|
+
content: React.ReactNode;
|
|
187
|
+
position?: string;
|
|
188
|
+
backgroundColor?: string;
|
|
189
|
+
width?: string;
|
|
190
|
+
height?: string;
|
|
191
|
+
zIndex?: number;
|
|
192
|
+
border?: string;
|
|
193
|
+
borderRadius?: string;
|
|
194
|
+
boxShadow?: string;
|
|
195
|
+
showArrow?: boolean;
|
|
196
|
+
arrowColor?: string;
|
|
197
|
+
padding?: string;
|
|
198
|
+
}
|
|
199
|
+
declare const KTooltip: React.FC<KTooltipProps>;
|
|
200
|
+
|
|
201
|
+
interface SliderLabelOption {
|
|
202
|
+
label: string;
|
|
203
|
+
value: number;
|
|
204
|
+
}
|
|
205
|
+
interface SliderLabelProps {
|
|
206
|
+
options: SliderLabelOption[];
|
|
207
|
+
onChange: (option: SliderLabelOption) => void;
|
|
208
|
+
value?: number;
|
|
209
|
+
disabled?: boolean;
|
|
210
|
+
width?: string;
|
|
211
|
+
titleText?: string;
|
|
212
|
+
valueText?: string;
|
|
213
|
+
fontSize?: number;
|
|
214
|
+
color?: string;
|
|
215
|
+
}
|
|
216
|
+
declare const KSliderLabel: React.FC<SliderLabelProps>;
|
|
217
|
+
|
|
218
|
+
interface KCodeInputProps {
|
|
219
|
+
onChange: (value: string) => void;
|
|
220
|
+
length?: number;
|
|
221
|
+
borderRadius?: number;
|
|
222
|
+
disabled?: boolean;
|
|
223
|
+
padding?: string;
|
|
224
|
+
gap?: number;
|
|
225
|
+
fontSize?: string;
|
|
226
|
+
fontWeight?: string;
|
|
227
|
+
color?: string;
|
|
228
|
+
lineHeight?: string;
|
|
229
|
+
allowedCharacters?: "numeric" | "alphaNumeric" | "alpha";
|
|
230
|
+
width?: number;
|
|
231
|
+
height?: number;
|
|
232
|
+
autoFocus?: boolean;
|
|
233
|
+
isPassword?: boolean;
|
|
234
|
+
background?: string;
|
|
235
|
+
hoverBackground?: string;
|
|
236
|
+
focusedBackground?: string;
|
|
237
|
+
filledBackground?: string;
|
|
238
|
+
border?: string;
|
|
239
|
+
hoverBorder?: string;
|
|
240
|
+
focusedBorder?: string;
|
|
241
|
+
filledBorder?: string;
|
|
242
|
+
boxShadow?: string;
|
|
243
|
+
hoverBoxShadow?: string;
|
|
244
|
+
focusedBoxShadow?: string;
|
|
245
|
+
filledBoxShadow?: string;
|
|
246
|
+
fitInContainer?: boolean;
|
|
247
|
+
isCodeCorrect?: boolean;
|
|
248
|
+
autoBlur?: boolean;
|
|
249
|
+
}
|
|
250
|
+
declare const KInput: React.FC<KCodeInputProps>;
|
|
251
|
+
|
|
252
|
+
export { KButton, KInput as KCodeInput, KDropdown, KInput$1 as KInput, KLogo, KSelectDate, KSlider, KSliderLabel, KSpan, KTextArea, KTitleSpan, KTooltip };
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kahuna-base-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Kahuna Base React Components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
-
"
|
|
10
|
+
"prebuild": "node removeUseClient.js",
|
|
11
|
+
"build": "rollup -c --bundleConfigAsCjs && npm run remove-stories",
|
|
12
|
+
"remove-stories": "find dist/ -name '*.stories.*' -type f -delete",
|
|
11
13
|
"storybook": "storybook dev -p 6006",
|
|
12
14
|
"build-storybook": "storybook build"
|
|
13
15
|
},
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"@babel/preset-react": "^7.23.3",
|
|
32
34
|
"@babel/preset-typescript": "^7.23.3",
|
|
33
35
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
36
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
34
37
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
35
38
|
"@rollup/plugin-terser": "^0.4.4",
|
|
36
39
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
@@ -45,16 +48,24 @@
|
|
|
45
48
|
"@testing-library/react": "^14.2.1",
|
|
46
49
|
"@types/jest": "^29.5.12",
|
|
47
50
|
"@types/react": "^18.2.64",
|
|
51
|
+
"autoprefixer": "^10.4.18",
|
|
48
52
|
"babel-jest": "^29.7.0",
|
|
49
53
|
"identity-obj-proxy": "^3.0.0",
|
|
50
54
|
"jest": "^29.7.0",
|
|
51
55
|
"jest-environment-jsdom": "^29.7.0",
|
|
56
|
+
"postcss": "^8.4.35",
|
|
52
57
|
"rollup": "^4.12.1",
|
|
58
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
53
59
|
"rollup-plugin-dts": "^6.1.0",
|
|
54
60
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
55
61
|
"rollup-plugin-postcss": "^4.0.2",
|
|
56
62
|
"storybook": "^7.6.17",
|
|
63
|
+
"tailwindcss": "^3.4.1",
|
|
57
64
|
"tslib": "^2.6.2",
|
|
58
65
|
"typescript": "^5.4.2"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"react-date-picker": "^11.0.0",
|
|
69
|
+
"react-select": "^5.8.0"
|
|
59
70
|
}
|
|
60
|
-
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
// Function to remove "use client" directive from a file
|
|
5
|
+
const removeUseClientDirective = (filePath) => {
|
|
6
|
+
const content = fs.readFileSync(filePath, 'utf8')
|
|
7
|
+
const updatedContent = content.replace(/^['"]use client['"];/, '')
|
|
8
|
+
fs.writeFileSync(filePath, updatedContent, 'utf8')
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Specify the paths to the files that contain "use client"
|
|
12
|
+
const reactCalendarPath = path.resolve(__dirname, 'node_modules', 'react-calendar', 'dist', 'esm')
|
|
13
|
+
const filesToUpdate = [
|
|
14
|
+
path.join(reactCalendarPath, 'Calendar.js'),
|
|
15
|
+
path.join(reactCalendarPath, 'Calendar', 'Navigation.js'),
|
|
16
|
+
// Add any other necessary files
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
// Remove the directive from each file
|
|
20
|
+
filesToUpdate.forEach(removeUseClientDirective)
|
|
21
|
+
|
|
22
|
+
console.log('Removed "use client" directives from react-calendar.')
|
package/rollup.config.js
CHANGED
|
@@ -6,6 +6,7 @@ import dts from "rollup-plugin-dts";
|
|
|
6
6
|
import terser from "@rollup/plugin-terser";
|
|
7
7
|
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
8
8
|
import postcss from "rollup-plugin-postcss";
|
|
9
|
+
import image from '@rollup/plugin-image';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
const packageJson = require("./package.json");
|
|
@@ -29,15 +30,20 @@ export default [
|
|
|
29
30
|
peerDepsExternal(),
|
|
30
31
|
resolve(),
|
|
31
32
|
commonjs(),
|
|
32
|
-
|
|
33
|
+
image(),
|
|
34
|
+
typescript({tsconfig: "./tsconfig.json"}),
|
|
33
35
|
terser(),
|
|
34
|
-
postcss(
|
|
36
|
+
postcss({
|
|
37
|
+
extensions: [".css"]
|
|
38
|
+
})
|
|
35
39
|
],
|
|
40
|
+
context: 'window',
|
|
41
|
+
moduleContext: id => 'window',
|
|
36
42
|
external: ["react", "react-dom"],
|
|
37
43
|
},
|
|
38
44
|
{
|
|
39
45
|
input: "src/index.ts",
|
|
40
|
-
output: [{
|
|
46
|
+
output: [{file: "dist/types.d.ts", format: "es"}],
|
|
41
47
|
plugins: [dts.default()],
|
|
42
48
|
external: [/\.css$/],
|
|
43
49
|
},
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
2
|
+
<path d="M13.75 3.25H16.75C16.9489 3.25 17.1397 3.32902 17.2803 3.46967C17.421 3.61032 17.5 3.80109 17.5 4V16C17.5 16.1989 17.421 16.3897 17.2803 16.5303C17.1397 16.671 16.9489 16.75 16.75 16.75H3.25C3.05109 16.75 2.86032 16.671 2.71967 16.5303C2.57902 16.3897 2.5 16.1989 2.5 16V4C2.5 3.80109 2.57902 3.61032 2.71967 3.46967C2.86032 3.32902 3.05109 3.25 3.25 3.25H6.25V1.75H7.75V3.25H12.25V1.75H13.75V3.25ZM12.25 4.75H7.75V6.25H6.25V4.75H4V7.75H16V4.75H13.75V6.25H12.25V4.75ZM16 9.25H4V15.25H16V9.25Z" fill="#434345"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
2
|
+
<path d="M13.75 3.25H16.75C16.9489 3.25 17.1397 3.32902 17.2803 3.46967C17.421 3.61032 17.5 3.80109 17.5 4V16C17.5 16.1989 17.421 16.3897 17.2803 16.5303C17.1397 16.671 16.9489 16.75 16.75 16.75H3.25C3.05109 16.75 2.86032 16.671 2.71967 16.5303C2.57902 16.3897 2.5 16.1989 2.5 16V4C2.5 3.80109 2.57902 3.61032 2.71967 3.46967C2.86032 3.32902 3.05109 3.25 3.25 3.25H6.25V1.75H7.75V3.25H12.25V1.75H13.75V3.25ZM12.25 4.75H7.75V6.25H6.25V4.75H4V7.75H16V4.75H13.75V6.25H12.25V4.75ZM16 9.25H4V15.25H16V9.25Z" fill="#111111"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0199 6.01961L6.66638 11.3732L3.97949 8.68627L4.6866 7.97917L6.66638 9.95895L11.3128 5.3125L12.0199 6.01961Z" fill="#111111"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="chevron-left">
|
|
3
|
+
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd"
|
|
4
|
+
d="M10.8072 5.80811L11.6911 6.69199L8.383 10L11.6911 13.3081L10.8072 14.192L6.61523 10L10.8072 5.80811Z"
|
|
5
|
+
fill="#111111"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="chevron-right">
|
|
3
|
+
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd"
|
|
4
|
+
d="M9.19282 5.80762L8.30894 6.6915L11.617 9.99956L8.30894 13.3076L9.19282 14.1915L13.3848 9.99956L9.19282 5.80762Z"
|
|
5
|
+
fill="#111111"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
Binary file
|
|
Binary file
|