kui-basic 0.0.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.
@@ -0,0 +1,660 @@
1
+ import * as React$1 from 'react';
2
+ import { HTMLInputTypeAttribute, SyntheticEvent } from 'react';
3
+
4
+ type PrimaryColorsType = {
5
+ main: string
6
+ pressed: string
7
+ hover: string
8
+ light: string
9
+ light2: string
10
+ }
11
+
12
+ type SecondaryColorsType = {
13
+ main: string
14
+ gray60: string
15
+ gray50: string
16
+ gray40: string
17
+ gray30: string
18
+ gray15: string
19
+ white: string
20
+ light: string
21
+ disabled: string
22
+ }
23
+
24
+ type BackgroundColorsType = {
25
+ main: string
26
+ light2: string
27
+ light3: string
28
+ }
29
+
30
+ type SuccessColorsType = {
31
+ green70: string
32
+ green60: string
33
+ main: string
34
+ green10: string
35
+ green5: string
36
+ }
37
+
38
+ type ErrorColorsType = {
39
+ red70: string
40
+ red60: string
41
+ main: string
42
+ red10: string
43
+ red5: string
44
+ }
45
+
46
+ type InfoColorsType = {
47
+ blue70: string
48
+ blue60: string
49
+ main: string
50
+ blue10: string
51
+ blue5: string
52
+ }
53
+
54
+ type PurpleColorsType = {
55
+ purple70: string
56
+ purple60: string
57
+ main: string
58
+ purple10: string
59
+ purple5: string
60
+ }
61
+
62
+ type ColorsType = {
63
+ primary: PrimaryColorsType
64
+ secondary: SecondaryColorsType
65
+ background: BackgroundColorsType
66
+ success: SuccessColorsType
67
+ error: ErrorColorsType
68
+ info: InfoColorsType
69
+ purple: PurpleColorsType
70
+ }
71
+
72
+ type ShadowsType = {
73
+ shadow1: string
74
+ shadow2: string
75
+ shadow3: string
76
+ shadow4: string
77
+ }
78
+
79
+ type BreakpointsType = {
80
+ xxs: number
81
+ xs: number
82
+ sm: number
83
+ md: number
84
+ lg: number
85
+ xl: number
86
+ }
87
+
88
+ type ThemeType = {
89
+ palette: ColorsType
90
+ shadows: ShadowsType
91
+ breakpoints: BreakpointsType
92
+ }
93
+
94
+ declare const theme: ThemeType
95
+
96
+ type CaptionSizes = "xs" | "sm" | "s" | "m" | "l"
97
+
98
+ type CaptionWeight = 400 | 500 | 600
99
+
100
+ type CaptionColors =
101
+ | "main"
102
+ | "gray60"
103
+ | "gray50"
104
+ | "gray40"
105
+ | "white"
106
+ | "brand"
107
+
108
+ interface CaptionProps
109
+ extends React$1.DetailedHTMLProps<
110
+ React$1.HTMLAttributes<HTMLParagraphElement>,
111
+ HTMLParagraphElement
112
+ >,
113
+ React$1.AriaAttributes {
114
+ size?: CaptionSizes
115
+ weight?: CaptionWeight
116
+ color?: CaptionColors
117
+ uppercase?: boolean
118
+ disableUserSelect?: boolean
119
+ align?: "center" | "right" | "left"
120
+ }
121
+
122
+ type CaptionType = (props: CaptionProps) => React$1.ReactElement
123
+
124
+ declare const Caption: CaptionType
125
+
126
+ type ButtonThemes =
127
+ | "primary"
128
+ | "orange"
129
+ | "white"
130
+ | "whiteWithOrangeHover"
131
+ | "whiteWithBrand"
132
+ | "blur"
133
+ | "whiteWithGray"
134
+ | "grayLightWithBorder"
135
+ | "grayLight"
136
+ | "green"
137
+ | "red"
138
+ | "transparent"
139
+
140
+ type ButtonSizes = "xs" | "s" | "m" | "l"
141
+
142
+ type ButtonTypes = "button" | "submit"
143
+
144
+ type ButtonBorder = "brand" | "lightGray" | "lightOrange"
145
+
146
+ interface ButtonProps
147
+ extends React$1.DetailedHTMLProps<
148
+ React$1.ButtonHTMLAttributes<HTMLButtonElement>,
149
+ HTMLButtonElement
150
+ >,
151
+ React$1.AriaAttributes {
152
+ variant?: ButtonThemes
153
+ size?: ButtonSizes
154
+ type?: ButtonTypes
155
+ fullWidth?: boolean
156
+ endIcon?: React$1.ReactElement
157
+ startIcon?: React$1.ReactElement
158
+ disabled?: boolean
159
+ isCircle?: boolean
160
+ captionSize?: CaptionSizes
161
+ disabledStyle?: string
162
+ border?: ButtonBorder
163
+ }
164
+
165
+ type ButtonType = (props: ButtonProps) => React$1.ReactElement
166
+
167
+ declare const Button: ButtonType
168
+
169
+ interface CheckboxProps
170
+ extends React$1.DetailedHTMLProps<
171
+ React$1.InputHTMLAttributes<HTMLInputElement>,
172
+ HTMLInputElement
173
+ >,
174
+ React$1.AriaAttributes {
175
+ error?: any
176
+ label?: React$1.ReactElement | string
177
+ inputRef?: React$1.RefObject<HTMLInputElement>
178
+ }
179
+
180
+ type CheckboxType = (props: CheckboxProps) => React$1.ReactElement
181
+
182
+ declare const Checkbox: CheckboxType
183
+
184
+ interface DividerProps
185
+ extends React$1.DetailedHTMLProps<
186
+ React$1.HTMLAttributes<HTMLHRElement>,
187
+ HTMLHRElement
188
+ >,
189
+ React$1.AriaAttributes {}
190
+
191
+ type DividerType = (props: DividerProps) => React$1.ReactElement
192
+
193
+ declare const Divider: DividerType
194
+
195
+ type HeadingSizes = "hero" | "h1" | "h2" | "h3" | "h4"
196
+
197
+ type HeadingColors =
198
+ | "main"
199
+ | "gray60"
200
+ | "gray50"
201
+ | "gray40"
202
+ | "white"
203
+ | "brand"
204
+
205
+ interface HeadingProps
206
+ extends React$1.DetailedHTMLProps<
207
+ React$1.HTMLAttributes<HTMLElement>,
208
+ HTMLElement
209
+ >,
210
+ React$1.AriaAttributes {
211
+ size?: HeadingSizes
212
+ uppercase?: boolean
213
+ disableUserSelect?: boolean
214
+ color?: HeadingColors
215
+ align?: "center" | "right" | "left"
216
+ }
217
+
218
+ type HeadingType = (props: HeadingProps) => React$1.ReactElement
219
+
220
+ declare const Heading: HeadingType
221
+
222
+ interface InputProps
223
+ extends React$1.DetailedHTMLProps<
224
+ React$1.InputHTMLAttributes<HTMLInputElement>,
225
+ HTMLInputElement
226
+ >,
227
+ React$1.AriaAttributes {
228
+ isTextArea?: boolean
229
+ inputRef?: React$1.RefObject<HTMLInputElement>
230
+ inputStyles?: string
231
+ labelStyles?: string
232
+ label?: string
233
+ startIcon?: string | React$1.ReactElement
234
+ endIcon?: string | React$1.ReactElement
235
+ messageClassName?: string
236
+ labelInlineStyles?: string
237
+ errorMessage?: string
238
+ inputValue?: string | number | undefined
239
+ type?: HTMLInputTypeAttribute
240
+ }
241
+
242
+ type InputType = (props: InputProps) => React$1.ReactElement
243
+
244
+ declare const Input: InputType
245
+
246
+ interface InputFileProps
247
+ extends React$1.DetailedHTMLProps<
248
+ React$1.InputHTMLAttributes<HTMLInputElement>,
249
+ HTMLInputElement
250
+ >,
251
+ React$1.AriaAttributes {
252
+ label?: string
253
+ name?: string
254
+ }
255
+
256
+ type InputFileType = (props: InputFileProps) => React$1.ReactElement
257
+
258
+ declare const InputFile: InputFileType
259
+
260
+ type InputMessageVariant = "error" | "warning" | "success"
261
+
262
+ interface InputMessageProps
263
+ extends React$1.DetailedHTMLProps<
264
+ React$1.HTMLAttributes<HTMLDivElement>,
265
+ HTMLDivElement
266
+ >,
267
+ React$1.AriaAttributes {
268
+ msg?: string
269
+ variant?: InputMessageVariant
270
+ }
271
+
272
+ type InputMessageType = (props: InputMessageProps) => React$1.ReactElement
273
+
274
+ declare const InputMessage: InputMessageType
275
+
276
+ interface InputWithAdornmentsProps extends InputProps {
277
+ cornerLabel?: string
278
+ }
279
+
280
+ type InputWithAdornmentsType = (
281
+ props: InputWithAdornmentsProps
282
+ ) => React$1.ReactElement
283
+
284
+ declare const InputWithAdornments: InputWithAdornmentsType
285
+
286
+ type CountryItem = {
287
+ name: string
288
+ nameCode: string
289
+ nameRus: string
290
+ phoneCode: string
291
+ mask: string
292
+ }
293
+
294
+ interface InputWithCountryDropdownProps
295
+ extends InputWithAdornmentsProps {
296
+ onSelectCountry?: (country: CountryItem) => void
297
+ hiddenInputProps?: React$1.DetailedHTMLProps<
298
+ React$1.InputHTMLAttributes<HTMLInputElement>,
299
+ HTMLInputElement
300
+ >
301
+ }
302
+
303
+ type InputWithCountryDropdownType = (
304
+ props: InputWithCountryDropdownProps
305
+ ) => React$1.ReactElement
306
+
307
+ declare const InputWithCountryDropdown: InputWithCountryDropdownType
308
+
309
+ interface InputWithMaskProps extends InputWithAdornmentsProps {
310
+ mask?: string
311
+ defaultValue?: string | number | undefined
312
+ }
313
+
314
+ type InputWithMaskType = (
315
+ props: InputWithMaskProps
316
+ ) => React.ReactElement
317
+
318
+ declare const InputWithMask: InputWithMaskType
319
+
320
+ type ModalSizes = "small" | "large"
321
+
322
+ interface ModalProps
323
+ extends React$1.DetailedHTMLProps<
324
+ React$1.HTMLAttributes<HTMLDivElement>,
325
+ HTMLDivElement
326
+ > {
327
+ isOpen?: boolean
328
+ handleClose?: () => void
329
+ title?: string
330
+ isHasHeader?: boolean
331
+ headerStyles?: string
332
+ classNameContent?: string
333
+ classNameClose?: string
334
+ size?: ModalSizes
335
+ }
336
+
337
+ type ModalType = (props: ModalProps) => React$1.ReactElement
338
+
339
+ declare const Modal: ModalType
340
+
341
+ interface RadioProps
342
+ extends React$1.DetailedHTMLProps<
343
+ React$1.InputHTMLAttributes<HTMLInputElement>,
344
+ HTMLInputElement
345
+ >,
346
+ React$1.AriaAttributes {
347
+ label?: React$1.ReactElement | string
348
+ inputRef?: React$1.RefObject<HTMLInputElement>
349
+ }
350
+
351
+ type RadioType = (props: RadioProps) => React$1.ReactElement
352
+
353
+ declare const Radio: RadioType
354
+
355
+ type SwitchSizes = "s" | "m" | "l"
356
+
357
+ // @ts-ignore
358
+ interface SwitchProps
359
+ extends React$1.DetailedHTMLProps<
360
+ React$1.InputHTMLAttributes<HTMLInputElement>,
361
+ HTMLInputElement
362
+ >,
363
+ React$1.AriaAttributes {
364
+ error?: any
365
+ label?: React$1.ReactElement | string
366
+ inputRef?: React$1.RefObject<HTMLInputElement>
367
+ size?: SwitchSizes
368
+ }
369
+
370
+ type SwitchType = (props: SwitchProps) => React$1.ReactElement
371
+
372
+ declare const Switch: SwitchType
373
+
374
+ type TextSizes = "xs" | "s" | "m"
375
+
376
+ type TextWeight = 400 | 500 | 600
377
+
378
+ type TextColors =
379
+ | "main"
380
+ | "gray60"
381
+ | "gray50"
382
+ | "gray40"
383
+ | "white"
384
+ | "brand"
385
+
386
+ interface TextProps
387
+ extends React$1.DetailedHTMLProps<
388
+ React$1.HTMLAttributes<HTMLParagraphElement>,
389
+ HTMLParagraphElement
390
+ >,
391
+ React$1.AriaAttributes {
392
+ size?: TextSizes
393
+ weight?: TextWeight
394
+ color?: TextColors
395
+ uppercase?: boolean
396
+ disableUserSelect?: boolean
397
+ }
398
+
399
+ type TextType = (props: TextProps) => React$1.ReactElement
400
+
401
+ declare const Text: TextType
402
+
403
+ type ContainerType = (
404
+ props: React$1.DetailedHTMLProps<
405
+ React$1.HTMLAttributes<HTMLDivElement>,
406
+ HTMLDivElement
407
+ >
408
+ ) => React$1.ReactElement
409
+
410
+ declare const Container: ContainerType
411
+
412
+ type GridJustify = "center" | "flex-start" | "flex-end" | "space-between"
413
+
414
+ type GridAlignItems = "center" | "flex-start" | "flex-end"
415
+
416
+ type GridDirections = "column" | "row"
417
+
418
+ type GridSizing = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
419
+
420
+ interface GridProps
421
+ extends React$1.DetailedHTMLProps<
422
+ React$1.HTMLAttributes<HTMLDivElement>,
423
+ HTMLDivElement
424
+ >,
425
+ React$1.AriaAttributes {
426
+ spacing?: GridSizing
427
+ item?: boolean
428
+ container?: boolean
429
+ justify?: GridJustify
430
+ alignItems?: GridAlignItems
431
+ alignContent?: GridAlignItems
432
+ direction?: GridDirections
433
+ xs?: GridSizing
434
+ sm?: GridSizing
435
+ md?: GridSizing
436
+ lg?: GridSizing
437
+ xl?: GridSizing
438
+ }
439
+
440
+ type GridType = (props: GridProps) => React$1.ReactElement
441
+
442
+ declare const Grid: GridType
443
+
444
+ type BoxSizing = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
445
+
446
+ interface BoxProps
447
+ extends React$1.DetailedHTMLProps<
448
+ React$1.HTMLAttributes<HTMLDivElement>,
449
+ HTMLDivElement
450
+ >,
451
+ React$1.AriaAttributes {
452
+ mt?: BoxSizing
453
+ mr?: BoxSizing
454
+ ml?: BoxSizing
455
+ mb?: BoxSizing
456
+ pt?: BoxSizing
457
+ pr?: BoxSizing
458
+ pl?: BoxSizing
459
+ pb?: BoxSizing
460
+ }
461
+
462
+ type BoxType = (props: BoxProps) => React$1.ReactElement
463
+
464
+ declare const Box: BoxType
465
+
466
+ type AccordionType = (
467
+ props: React$1.DetailedHTMLProps<
468
+ React$1.HTMLAttributes<HTMLDivElement>,
469
+ HTMLDivElement
470
+ >
471
+ ) => React$1.ReactElement
472
+
473
+ declare const Accordion: AccordionType
474
+
475
+ interface AccordionSummaryProps
476
+ extends React$1.DetailedHTMLProps<
477
+ React$1.HTMLAttributes<HTMLDivElement>,
478
+ HTMLDivElement
479
+ >,
480
+ React$1.AriaAttributes {
481
+ detailsBlock?: React$1.RefObject<HTMLDivElement>
482
+ expandIcon?: React$1.ReactElement | React$1.ReactElement[] | string
483
+ contentStyles?: string
484
+ expandedStyles?: string
485
+ iconStyles?: string
486
+ }
487
+
488
+ type AccordionSummaryType = (
489
+ props: AccordionSummaryProps
490
+ ) => React$1.ReactElement
491
+
492
+ declare const AccordionSummary: AccordionSummaryType
493
+
494
+ type AccordionDetailsType = (
495
+ props: React$1.DetailedHTMLProps<
496
+ React$1.HTMLAttributes<HTMLDivElement>,
497
+ HTMLDivElement
498
+ >
499
+ ) => React$1.ReactElement
500
+
501
+ declare const AccordionDetails: AccordionDetailsType
502
+
503
+ type SkeletonType = (
504
+ props: React$1.DetailedHTMLProps<
505
+ React$1.HTMLAttributes<HTMLSpanElement>,
506
+ HTMLSpanElement
507
+ >
508
+ ) => React$1.ReactElement
509
+
510
+ declare const Skeleton: SkeletonType
511
+
512
+ interface AppBarProps
513
+ extends React$1.DetailedHTMLProps<
514
+ React$1.HTMLAttributes<HTMLElement>,
515
+ HTMLElement
516
+ >,
517
+ React$1.AriaAttributes {
518
+ isFixed?: boolean
519
+ }
520
+
521
+ type AppBarType = (props: AppBarProps) => React$1.ReactElement
522
+
523
+ declare const AppBar: AppBarType
524
+
525
+ type ToolBarType = (
526
+ props: React$1.DetailedHTMLProps<
527
+ React$1.HTMLAttributes<HTMLDivElement>,
528
+ HTMLDivElement
529
+ >
530
+ ) => React$1.ReactElement
531
+
532
+ declare const ToolBar: ToolBarType
533
+
534
+ interface CircularProgressProps
535
+ extends React$1.DetailedHTMLProps<
536
+ React$1.HTMLAttributes<HTMLDivElement>,
537
+ HTMLDivElement
538
+ >,
539
+ React$1.AriaAttributes {
540
+ svgStyles?: string
541
+ circleStyles?: string
542
+ }
543
+
544
+ type CircularProgressType = (
545
+ props: CircularProgressProps
546
+ ) => React$1.ReactElement
547
+
548
+ declare const CircularProgress: CircularProgressType
549
+
550
+ interface LinearProgressProps
551
+ extends React$1.DetailedHTMLProps<
552
+ React$1.HTMLAttributes<HTMLDivElement>,
553
+ HTMLDivElement
554
+ >,
555
+ React$1.AriaAttributes {
556
+ className?: string
557
+ progressBarStyles?: string
558
+ value?: number
559
+ }
560
+
561
+ type LinearProgressType = (
562
+ props: LinearProgressProps
563
+ ) => React$1.ReactElement
564
+
565
+ declare const LinearProgress: LinearProgressType
566
+
567
+ type TabChangeHandlerType = (
568
+ e: SyntheticEvent<HTMLButtonElement>,
569
+ value: number
570
+ ) => void
571
+
572
+ interface TabProps
573
+ extends Omit<
574
+ React$1.DetailedHTMLProps<
575
+ React$1.ButtonHTMLAttributes<HTMLButtonElement>,
576
+ HTMLButtonElement
577
+ >,
578
+ "onChange"
579
+ > {
580
+ selected?: boolean
581
+ value?: number
582
+ label: string
583
+ onChange?: TabChangeHandlerType
584
+ }
585
+
586
+ type TabType = (props: TabProps) => React$1.ReactElement
587
+
588
+ declare const Tab: TabType
589
+
590
+ type TabsIndicatorPositions = "bottom" | "top"
591
+
592
+ interface TabsProps
593
+ extends Omit<
594
+ React$1.DetailedHTMLProps<
595
+ React$1.HTMLAttributes<HTMLDivElement>,
596
+ HTMLDivElement
597
+ >,
598
+ "onChange"
599
+ > {
600
+ value: number
601
+ onChange?: TabChangeHandlerType
602
+ indicatorPos?: TabsIndicatorPositions
603
+ }
604
+
605
+ type TabsType = (props: TabsProps) => React$1.ReactElement
606
+
607
+ declare const Tabs: TabsType
608
+
609
+ interface TabsPanelProps
610
+ extends Omit<
611
+ React$1.DetailedHTMLProps<
612
+ React$1.HTMLAttributes<HTMLDivElement>,
613
+ HTMLDivElement
614
+ >,
615
+ "onChange"
616
+ > {
617
+ tabs: string[]
618
+ tabPanels: React$1.ReactNode[]
619
+ paths?: string[]
620
+ activeTab?: number
621
+ onChange?: TabChangeHandlerType
622
+ indicatorPos?: TabsIndicatorPositions
623
+ }
624
+
625
+ type TabsPanelType = (props: TabsPanelProps) => React$1.ReactElement
626
+
627
+ declare const TabsPanel: TabsPanelType
628
+
629
+ interface MenuPanelProps
630
+ extends Omit<
631
+ React$1.DetailedHTMLProps<
632
+ React$1.HTMLAttributes<HTMLDivElement>,
633
+ HTMLDivElement
634
+ >,
635
+ "onChange"
636
+ > {
637
+ tabs: string[]
638
+ tabsId?: string[]
639
+ activeTab?: number
640
+ offset?: number
641
+ onChange?: TabChangeHandlerType
642
+ indicatorPos?: TabsIndicatorPositions
643
+ }
644
+
645
+ type MenuPanelType = (props: MenuPanelProps) => React$1.ReactElement
646
+
647
+ declare const MenuPanel: MenuPanelType
648
+
649
+ interface IconButtonProps
650
+ extends React$1.DetailedHTMLProps<
651
+ React$1.ButtonHTMLAttributes<HTMLButtonElement>,
652
+ HTMLButtonElement
653
+ >,
654
+ React$1.AriaAttributes {}
655
+
656
+ type IconButtonType = (props: IconButtonProps) => React$1.ReactElement
657
+
658
+ declare const IconButton: IconButtonType
659
+
660
+ export { Accordion, AccordionDetails, AccordionDetailsType, AccordionSummary, AccordionSummaryProps, AccordionSummaryType, AccordionType, AppBar, AppBarProps, AppBarType, BackgroundColorsType, Box, BoxProps, BoxSizing, BoxType, BreakpointsType, Button, ButtonBorder, ButtonProps, ButtonSizes, ButtonThemes, ButtonType, ButtonTypes, Caption, CaptionColors, CaptionProps, CaptionSizes, CaptionType, CaptionWeight, Checkbox, CheckboxProps, CheckboxType, CircularProgress, CircularProgressType, ColorsType, Container, ContainerType, CountryItem, Divider, DividerProps, DividerType, ErrorColorsType, Grid, GridAlignItems, GridDirections, GridJustify, GridProps, GridSizing, GridType, Heading, HeadingColors, HeadingProps, HeadingSizes, HeadingType, IconButton, IconButtonProps, IconButtonType, InfoColorsType, Input, InputFile, InputFileProps, InputFileType, InputMessage, InputMessageProps, InputMessageType, InputMessageVariant, InputProps, InputType, InputWithAdornments, InputWithAdornmentsProps, InputWithAdornmentsType, InputWithCountryDropdown, InputWithCountryDropdownProps, InputWithCountryDropdownType, InputWithMask, InputWithMaskProps, InputWithMaskType, LinearProgress, LinearProgressType, MenuPanel, MenuPanelProps, MenuPanelType, Modal, ModalProps, ModalSizes, ModalType, PrimaryColorsType, PurpleColorsType, Radio, RadioProps, RadioType, SecondaryColorsType, ShadowsType, Skeleton, SkeletonType, SuccessColorsType, Switch, SwitchProps, SwitchSizes, SwitchType, Tab, TabChangeHandlerType, TabProps, TabType, Tabs, TabsIndicatorPositions, TabsPanel, TabsPanelProps, TabsPanelType, TabsProps, TabsType, Text, TextColors, TextProps, TextSizes, TextType, TextWeight, ThemeType, ToolBar, ToolBarType, theme };