funuicss 2.7.16 → 3.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.
Files changed (116) hide show
  1. package/css/fun.css +6663 -6653
  2. package/index.d.ts +2 -0
  3. package/index.js +5 -1
  4. package/js/google/AnalyticsHandler.d.ts +10 -0
  5. package/js/google/AnalyticsHandler.js +20 -0
  6. package/js/google/analytics.d.ts +6 -0
  7. package/js/google/analytics.js +53 -0
  8. package/package.json +1 -1
  9. package/tsconfig.tsbuildinfo +1 -1
  10. package/ui/button/Button.js +1 -1
  11. package/ui/flex/Flex.d.ts +3 -3
  12. package/ui/flex/Flex.js +2 -2
  13. package/ui/notification/Notification.d.ts +7 -3
  14. package/ui/notification/Notification.js +18 -14
  15. package/ui/scrolltotop/ScrollToTop.d.ts +3 -0
  16. package/ui/scrolltotop/ScrollToTop.js +61 -0
  17. package/ui/view/View.d.ts +27 -38
  18. package/ui/view/View.js +10 -38
  19. package/ui/vista/Vista.d.ts +6 -1
  20. package/ui/vista/Vista.js +33 -4
  21. package/assets/colors/colors.d.ts +0 -347
  22. package/assets/colors/colors.js +0 -348
  23. package/assets/colors/colors.tsx +0 -697
  24. package/hooks/useHls.tsx +0 -69
  25. package/index.tsx +0 -58
  26. package/js/Cookie.tsx +0 -91
  27. package/js/Fun.jsx +0 -225
  28. package/js/Fun.tsx +0 -239
  29. package/tsconfig.json +0 -20
  30. package/types/react-easy-export.d.ts +0 -4
  31. package/ui/ScrollInView/ScrollInView.tsx +0 -69
  32. package/ui/accordion/Accordion.tsx +0 -125
  33. package/ui/alert/Alert.tsx +0 -106
  34. package/ui/aos/AOS.tsx +0 -24
  35. package/ui/appbar/AppBar.tsx +0 -115
  36. package/ui/appbar/Hamburger.tsx +0 -30
  37. package/ui/avatar/Avatar.tsx +0 -52
  38. package/ui/blob/Blob.tsx +0 -34
  39. package/ui/breadcrumb/BreadCrumb.tsx +0 -48
  40. package/ui/button/Button.tsx +0 -153
  41. package/ui/calendar/ActivityCard.tsx +0 -27
  42. package/ui/calendar/Calendar.tsx +0 -343
  43. package/ui/card/Card.tsx +0 -117
  44. package/ui/card/CardBody.tsx +0 -14
  45. package/ui/card/CardFab.tsx +0 -16
  46. package/ui/card/CardFooter.tsx +0 -14
  47. package/ui/card/CardHeader.tsx +0 -14
  48. package/ui/carousel/Carousel.tsx +0 -148
  49. package/ui/chart/Bar.tsx +0 -121
  50. package/ui/chart/Line.tsx +0 -186
  51. package/ui/chart/Pie.tsx +0 -127
  52. package/ui/container/Container.tsx +0 -38
  53. package/ui/datepicker/DatePicker.tsx +0 -148
  54. package/ui/div/Div.tsx +0 -61
  55. package/ui/drop/Action.tsx +0 -16
  56. package/ui/drop/Down.tsx +0 -18
  57. package/ui/drop/Dropdown.tsx +0 -117
  58. package/ui/drop/Item.tsx +0 -15
  59. package/ui/drop/Menu.tsx +0 -40
  60. package/ui/drop/Up.tsx +0 -18
  61. package/ui/flex/Flex.tsx +0 -97
  62. package/ui/flex/FlexItem.tsx +0 -64
  63. package/ui/grid/Col.tsx +0 -43
  64. package/ui/grid/Grid.tsx +0 -37
  65. package/ui/input/Iconic.tsx +0 -43
  66. package/ui/input/Input.tsx +0 -409
  67. package/ui/list/Item.tsx +0 -18
  68. package/ui/list/List.tsx +0 -45
  69. package/ui/loader/Loader.tsx +0 -47
  70. package/ui/modal/Action.tsx +0 -14
  71. package/ui/modal/Close.tsx +0 -14
  72. package/ui/modal/Content.tsx +0 -15
  73. package/ui/modal/Header.tsx +0 -19
  74. package/ui/modal/Modal.tsx +0 -140
  75. package/ui/notification/Content.tsx +0 -14
  76. package/ui/notification/Footer.tsx +0 -14
  77. package/ui/notification/Header.tsx +0 -14
  78. package/ui/notification/Notification.tsx +0 -62
  79. package/ui/page/NotFound.tsx +0 -67
  80. package/ui/page/UnAuthorized.tsx +0 -64
  81. package/ui/progress/Bar.tsx +0 -114
  82. package/ui/richtext/RichText.tsx +0 -156
  83. package/ui/sidebar/SideBar.tsx +0 -202
  84. package/ui/sidebar/SideContent.tsx +0 -16
  85. package/ui/slider/Slider.tsx +0 -75
  86. package/ui/snackbar/SnackBar.tsx +0 -56
  87. package/ui/specials/Circle.tsx +0 -49
  88. package/ui/specials/CircleGroup.tsx +0 -49
  89. package/ui/specials/FullCenteredPage.tsx +0 -25
  90. package/ui/specials/Hr.tsx +0 -16
  91. package/ui/specials/RowFlex.tsx +0 -56
  92. package/ui/specials/Section.tsx +0 -18
  93. package/ui/step/Container.tsx +0 -27
  94. package/ui/step/Header.tsx +0 -16
  95. package/ui/step/Line.tsx +0 -17
  96. package/ui/step/Step.tsx +0 -17
  97. package/ui/table/Body.tsx +0 -10
  98. package/ui/table/Data.tsx +0 -15
  99. package/ui/table/Head.tsx +0 -10
  100. package/ui/table/Row.tsx +0 -16
  101. package/ui/table/Table.tsx +0 -372
  102. package/ui/text/Text.tsx +0 -179
  103. package/ui/theme/dark.tsx +0 -45
  104. package/ui/theme/darkenUtils.ts +0 -15
  105. package/ui/theme/theme.tsx +0 -48
  106. package/ui/theme/themes.ts +0 -154
  107. package/ui/tooltip/Tip.tsx +0 -34
  108. package/ui/tooltip/ToolTip.tsx +0 -20
  109. package/ui/video/Video.tsx +0 -348
  110. package/ui/video/videoFunctions.tsx +0 -19
  111. package/ui/video/videoShortcuts.ts +0 -13
  112. package/ui/view/View.tsx +0 -157
  113. package/ui/vista/Vista.tsx +0 -165
  114. package/utils/Emojis.tsx +0 -59
  115. package/utils/Functions.tsx +0 -9
  116. package/utils/getCssVariable.tsx +0 -9
@@ -1,148 +0,0 @@
1
- 'use client';
2
- import React, { useState } from 'react';
3
- import dayjs from 'dayjs';
4
- import Avatar from '../avatar/Avatar';
5
- import { PiCaretLeft, PiCaretRight, PiX, PiXCircle } from 'react-icons/pi';
6
-
7
- interface DatePickerProps {
8
- mode?: 'single' | 'interval';
9
- funcss?: string;
10
- onSelect?: (value: Date | [Date, Date]) => void;
11
- value?: Date | [Date, Date];
12
- className?: string;
13
- }
14
-
15
- type Selection = Date | [Date, Date | null] | null;
16
-
17
- const DatePicker: React.FC<DatePickerProps> = ({
18
- mode = 'single',
19
- onSelect,
20
- value,
21
- funcss,
22
- className = '',
23
- }) => {
24
- const [currentMonth, setCurrentMonth] = useState(dayjs());
25
- const [selected, setSelected] = useState<Selection>(value || null);
26
-
27
- const daysInMonth = currentMonth.daysInMonth();
28
- const firstDay = currentMonth.startOf('month').day(); // 0 = Sunday
29
-
30
- const days: (Date | null)[] = [];
31
- for (let i = 0; i < firstDay; i++) {
32
- days.push(null); // padding
33
- }
34
- for (let i = 1; i <= daysInMonth; i++) {
35
- days.push(currentMonth.date(i).toDate());
36
- }
37
-
38
- const handleSelect = (date: Date) => {
39
- if (mode === 'single') {
40
- setSelected(date);
41
- onSelect?.(date);
42
- } else if (mode === 'interval') {
43
- if (!selected || !Array.isArray(selected)) {
44
- setSelected([date, null]);
45
- } else {
46
- const [start, end] = selected;
47
- if (!end) {
48
- const range: [Date, Date] =
49
- dayjs(date).isBefore(dayjs(start)) ? [date, start] : [start, date];
50
- setSelected(range);
51
- onSelect?.(range);
52
- } else {
53
- setSelected([date, null]); // restart
54
- }
55
- }
56
- }
57
- };
58
-
59
- const isSelected = (date: Date) => {
60
- if (!selected) return false;
61
- if (mode === 'single' && selected instanceof Date) {
62
- return dayjs(selected).isSame(date, 'day');
63
- }
64
- if (Array.isArray(selected)) {
65
- const [start, end] = selected;
66
- if (start && end) {
67
- return (
68
- dayjs(date).isSame(start, 'day') ||
69
- dayjs(date).isSame(end, 'day') ||
70
- (dayjs(date).isAfter(start) && dayjs(date).isBefore(end))
71
- );
72
- }
73
- return dayjs(date).isSame(start, 'day');
74
- }
75
- return false;
76
- };
77
-
78
- const nextMonth = () => setCurrentMonth(currentMonth.add(1, 'month'));
79
- const prevMonth = () => setCurrentMonth(currentMonth.subtract(1, 'month'));
80
-
81
- const handleClear = () => {
82
- setSelected(null);
83
- onSelect?.(mode === 'single' ? null as unknown as Date : null as unknown as [Date, Date]);
84
- };
85
-
86
- const formatDate = (date: Date | null | undefined) =>
87
- date ? dayjs(date).format('MMM D, YYYY') : '...';
88
-
89
- return (
90
- <div className={`datepicker ${funcss} ${className}`}>
91
- <div className="datepicker-header">
92
- <Avatar onClick={prevMonth}><PiCaretLeft /></Avatar>
93
- <span>{currentMonth.format('MMMM YYYY')}</span>
94
- <Avatar onClick={nextMonth}><PiCaretRight /></Avatar>
95
- </div>
96
-
97
- {selected && (
98
- <div className="datepicker-selected">
99
- <span className="interval-display">
100
- {mode === 'single' && selected instanceof Date && (
101
- <>Selected: {formatDate(selected)}</>
102
- )}
103
- {mode === 'interval' && Array.isArray(selected) && (
104
- <div className='text-sm'>
105
- {selected[1]
106
- ? `${formatDate(selected[0])} to ${formatDate(selected[1])}`
107
- : ` ${formatDate(selected[0])} - End date`}
108
- </div>
109
- )}
110
- </span>
111
- <div style={{lineHeight:"0"}}>
112
- <PiX className="clear-icon" onClick={handleClear} style={{ cursor: 'pointer' }} />
113
- </div>
114
- </div>
115
- )}
116
-
117
- <div className="datepicker-weekdays">
118
- {['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'].map((d) => (
119
- <div key={d}>{d}</div>
120
- ))}
121
- </div>
122
-
123
- <div className="datepicker-grid">
124
- {days.map((date, idx) => {
125
- const isSelectedClass = date && isSelected(date) ? 'selected' : '';
126
- const isInRangeClass =
127
- date && isSelected(date) && Array.isArray(selected) ? 'in-range' : '';
128
- return (
129
- <div
130
- key={idx}
131
- onClick={() => date && handleSelect(date)}
132
-
133
- >
134
- {
135
- date &&
136
- <Avatar funcss={`borderless datepicker-day ${!date ? 'empty' : ''} ${isSelectedClass} ${isInRangeClass}`}>
137
- {date ? dayjs(date).date() : ''}
138
- </Avatar>
139
- }
140
- </div>
141
- );
142
- })}
143
- </div>
144
- </div>
145
- );
146
- };
147
-
148
- export default DatePicker;
package/ui/div/Div.tsx DELETED
@@ -1,61 +0,0 @@
1
- 'use client';
2
- import * as React from 'react';
3
-
4
- type DivProps = {
5
- children?: React.ReactNode;
6
- funcss?: string;
7
- content?: React.ReactNode;
8
- minHeight?: string;
9
- maxHeight?: string;
10
- maxWidth?: string;
11
- minWidth?: string;
12
- height?: string;
13
- width?: string;
14
- padding?: string;
15
- margin?: string;
16
- fit?: boolean;
17
- customStyle?: React.CSSProperties;
18
- onClick?: React.MouseEventHandler<HTMLDivElement>;
19
- };
20
-
21
- const Div = ({
22
- children,
23
- funcss,
24
- content,
25
- minHeight,
26
- maxHeight,
27
- maxWidth,
28
- minWidth,
29
- height,
30
- width,
31
- padding,
32
- margin,
33
- fit,
34
- customStyle,
35
- ...rest
36
- }: DivProps) => {
37
- return (
38
- <div>
39
-
40
- <div
41
- className={`${fit ? 'width-100-p height-100-p' : ''} ${funcss}`}
42
- style={{
43
- height: height || '',
44
- maxHeight: maxHeight || '',
45
- minHeight: minHeight || '',
46
- maxWidth: maxWidth || '',
47
- minWidth: minWidth || '',
48
- width: width || '',
49
- padding: padding || '',
50
- margin: margin || '',
51
- ...customStyle
52
- }}
53
- {...rest}
54
- >
55
- {content || children}
56
- </div>
57
- </div>
58
- );
59
- };
60
-
61
- export default Div;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DropActionProps = {
4
- children: React.ReactNode;
5
- funcss?: string;
6
- };
7
-
8
- const DropAction = ({ children, funcss }: DropActionProps) => {
9
- return (
10
- <div className={`drop-button ${funcss}`}>
11
- {children}
12
- </div>
13
- );
14
- };
15
-
16
- export default DropAction;
package/ui/drop/Down.tsx DELETED
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DropDownProps = {
4
- funcss?: string;
5
- children: React.ReactNode;
6
- id?: string;
7
- side?: string;
8
- };
9
-
10
- const DropDown = ({ funcss, children, id, side, }: DropDownProps) => {
11
- return (
12
- <div className={`dropdown ${side ? side : 'left'} ${funcss}`} id={id}>
13
- {children}
14
- </div>
15
- );
16
- };
17
-
18
- export default DropDown;
@@ -1,117 +0,0 @@
1
- 'use client';
2
- import React, { useState, useRef, useEffect } from 'react';
3
-
4
- type Position = 'left' | 'right';
5
- type Direction = 'dropdown' | 'dropup';
6
-
7
- interface DropdownItem {
8
- label: React.ReactNode;
9
- onClick?: () => void;
10
- }
11
-
12
- interface DropdownProps {
13
- direction?: Direction;
14
- position?: Position;
15
- button: React.ReactNode;
16
- items: DropdownItem[];
17
- hoverable?: boolean;
18
- openOnHover?: boolean;
19
- closableOnlyOutside?: boolean;
20
- className?: string;
21
- width?: string;
22
- minWidth?: string;
23
- maxWidth?: string;
24
- height?: string;
25
- minHeight?: string;
26
- maxHeight?: string;
27
-
28
- }
29
-
30
- const Dropdown: React.FC<DropdownProps> = ({
31
- direction = 'dropdown',
32
- position = 'left',
33
- button,
34
- items,
35
- hoverable = true,
36
- openOnHover = true,
37
- closableOnlyOutside = false,
38
- className = '',
39
- width,
40
- minWidth,
41
- maxWidth,
42
- height,
43
- minHeight,
44
- maxHeight,
45
- }) => {
46
- const containerRef = useRef<HTMLDivElement>(null);
47
- const [open, setOpen] = useState(false);
48
-
49
- const containerClass = `${direction} ${position} ${className}`.trim();
50
- const menuClass = `drop-menu ${hoverable ? ' item-hoverable' : ''}`;
51
-
52
- useEffect(() => {
53
- if (openOnHover) return;
54
-
55
- const handleClickOutside = (event: MouseEvent) => {
56
- if (containerRef.current && !containerRef.current.contains(event.target as Node)) {
57
- setOpen(false);
58
- }
59
- };
60
-
61
- document.addEventListener('mousedown', handleClickOutside);
62
- return () => document.removeEventListener('mousedown', handleClickOutside);
63
- }, [openOnHover]);
64
-
65
- const showMenu = openOnHover || open;
66
-
67
- return (
68
- <div
69
- ref={containerRef}
70
- className={containerClass}
71
- onMouseEnter={() => openOnHover && setOpen(true)}
72
- onMouseLeave={() => openOnHover && setOpen(false)}
73
- >
74
- <div
75
- className="drop-button"
76
- onClick={() => !openOnHover && setOpen(!open)}
77
- style={{ cursor: !openOnHover ? 'pointer' : undefined }}
78
- >
79
- {button}
80
- </div>
81
- {
82
- showMenu &&
83
-
84
- <div
85
- className={menuClass}
86
- style={{
87
- width,
88
- minWidth,
89
- maxWidth,
90
- height,
91
- minHeight,
92
- maxHeight,
93
- }}
94
- >
95
- {items.map((item, index) => (
96
- <div
97
- key={index}
98
- className="drop-item hoverable"
99
- onClick={() => {
100
- if(!closableOnlyOutside){
101
- item.onClick?.();
102
- if (!openOnHover) setOpen(false);
103
- }
104
-
105
- }}
106
- >
107
- {item.label}
108
- </div>
109
- ))}
110
- </div>
111
- }
112
- </div>
113
- );
114
- };
115
-
116
- export default Dropdown;
117
-
package/ui/drop/Item.tsx DELETED
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DropItemProps = {
4
- children: React.ReactNode;
5
- funcss?: string;
6
- onClick?: () => void;
7
- };
8
-
9
- export default function DropItem({ children, funcss, onClick }: DropItemProps) {
10
- return (
11
- <div className={`${funcss} drop-item`} onClick={onClick}>
12
- {children}
13
- </div>
14
- );
15
- }
package/ui/drop/Menu.tsx DELETED
@@ -1,40 +0,0 @@
1
- import * as React from 'react';
2
- import { useState, useEffect } from 'react';
3
-
4
- type DropMenuProps = {
5
- children: React.ReactNode;
6
- funcss?: string;
7
- hoverable?: string;
8
- duration?: number;
9
- animation?: string;
10
- id?: string;
11
- width?: string;
12
- };
13
-
14
- export default function DropMenu({
15
- children,
16
- funcss,
17
- hoverable,
18
- duration,
19
- animation,
20
- id,
21
- width,
22
- }: DropMenuProps) {
23
-
24
- return (
25
- <div>
26
-
27
- <div
28
- id={id}
29
- className={`drop-menu ${funcss} item-${hoverable ? hoverable : ''}`}
30
- style={{
31
- animation: ` ${duration ? duration : 0.2}s ${animation ? animation : 'ScaleUp'}`,
32
- width: width ? width : '100%',
33
- }}
34
- >
35
- {children}
36
- </div>
37
-
38
- </div>
39
- );
40
- }
package/ui/drop/Up.tsx DELETED
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
-
3
- type DropUpProps = {
4
- funcss?: string;
5
- children: React.ReactNode;
6
- id?: string;
7
- side?: string;
8
- };
9
-
10
- const DropUp = ({ funcss, children, id, side, }: DropUpProps) => {
11
- return (
12
- <div className={`dropup ${side ? side : 'left'} ${funcss}`} id={id}>
13
- {children}
14
- </div>
15
- );
16
- };
17
-
18
- export default DropUp;
package/ui/flex/Flex.tsx DELETED
@@ -1,97 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
-
4
- interface FlexProps {
5
- className?: string;
6
- funcss?: string;
7
- id?: string;
8
- children?: React.ReactNode;
9
- style?: React.CSSProperties;
10
-
11
- // Flex container properties
12
- direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
13
- wrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
14
- justify?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
15
- alignItems?: 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';
16
- alignContent?: 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around';
17
-
18
- // Gap utilities
19
- gap?: number;
20
- gapX?: number;
21
- gapY?: number;
22
- gapUnit?: 'rem' | 'px' | 'em';
23
-
24
- // Responsive helpers
25
- responsiveSmall?: boolean;
26
- responsiveMedium?: boolean;
27
- responsiveLarge?: boolean;
28
-
29
- // Stretch helpers
30
- fullWidth?: boolean;
31
- fullHeight?: boolean;
32
- }
33
-
34
- export default function Flex({
35
- className,
36
- funcss,
37
- id,
38
- children,
39
- style = {},
40
-
41
- // Flex container
42
- direction = 'row',
43
- wrap = 'wrap',
44
- justify,
45
- alignItems,
46
- alignContent,
47
-
48
- // Gap
49
- gap,
50
- gapX,
51
- gapY,
52
- gapUnit = 'rem',
53
-
54
- // Responsive
55
- responsiveSmall,
56
- responsiveMedium,
57
- responsiveLarge,
58
-
59
- // Size
60
- fullWidth,
61
- fullHeight,
62
- ...rest
63
- }: FlexProps) {
64
- const combinedClassName = [
65
- className,
66
- funcss,
67
- responsiveSmall && 'responsiveSmall',
68
- responsiveMedium && 'responsiveMedium',
69
- responsiveLarge && 'responsiveLarge',
70
- ]
71
- .filter(Boolean)
72
- .join(' ');
73
-
74
- return (
75
- <div
76
- id={id}
77
- className={combinedClassName}
78
- style={{
79
- display: 'flex',
80
- flexDirection: direction,
81
- flexWrap: wrap,
82
- justifyContent: justify,
83
- alignItems: alignItems,
84
- alignContent: alignContent,
85
- gap: gap !== undefined ? `${gap}${gapUnit}` : undefined,
86
- columnGap: gapX !== undefined ? `${gapX}${gapUnit}` : undefined,
87
- rowGap: gapY !== undefined ? `${gapY}${gapUnit}` : undefined,
88
- width: fullWidth ? '100%' : undefined,
89
- height: fullHeight ? '100%' : undefined,
90
- ...style,
91
- }}
92
- {...rest}
93
- >
94
- {children}
95
- </div>
96
- );
97
- }
@@ -1,64 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
-
4
- interface FlexItemProps {
5
- className?: string;
6
- funcss?: string;
7
- id?: string;
8
- children?: React.ReactNode;
9
- style?: React.CSSProperties;
10
-
11
- // Flex item behaviors
12
- flex?: string;
13
- grow?: number;
14
- shrink?: number;
15
- basis?: string;
16
- alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
17
-
18
- // Size helpers
19
- fullWidth?: boolean;
20
- fullHeight?: boolean;
21
- }
22
-
23
- export default function FlexItem({
24
- className,
25
- funcss,
26
- id,
27
- children,
28
- style = {},
29
-
30
- // Flex item
31
- flex,
32
- grow,
33
- shrink,
34
- basis,
35
- alignSelf,
36
-
37
- // Size
38
- fullWidth,
39
- fullHeight,
40
-
41
- ...rest
42
- }: FlexItemProps) {
43
- const combinedClassName = [className, funcss].filter(Boolean).join(' ');
44
-
45
- return (
46
- <div
47
- id={id}
48
- className={combinedClassName}
49
- style={{
50
- flex,
51
- flexGrow: flex ? undefined : grow,
52
- flexShrink: flex ? undefined : shrink,
53
- flexBasis: flex ? undefined : basis,
54
- alignSelf,
55
- width: fullWidth ? '100%' : undefined,
56
- height: fullHeight ? '100%' : undefined,
57
- ...style,
58
- }}
59
- {...rest}
60
- >
61
- {children}
62
- </div>
63
- );
64
- }
package/ui/grid/Col.tsx DELETED
@@ -1,43 +0,0 @@
1
- import { ReactNode, HTMLProps } from 'react';
2
- import * as React from 'react';
3
- interface ColProps extends HTMLProps<HTMLDivElement> {
4
- sm?: number;
5
- md?: number;
6
- lg?: number;
7
- children?: ReactNode;
8
- funcss?: string;
9
- id?: string;
10
- smOrder?:number;
11
- mdOrder?:number;
12
- lgOrder?:number
13
- }
14
-
15
- export default function Col({
16
- sm,
17
- md,
18
- lg,
19
- children,
20
- funcss,
21
- id,
22
- smOrder,
23
- mdOrder,
24
- lgOrder,
25
- ...rest
26
- }: ColProps) {
27
- const classNames = [
28
- 'col',
29
- sm ? `sm-${sm}` : '',
30
- md ? `md-${md}` : '',
31
- lg ? `lg-${lg}` : '',
32
- smOrder ? `sm-order-${smOrder}` : '',
33
- mdOrder ? `md-order-${mdOrder}` : '',
34
- lgOrder ? `lg-order-${lgOrder}` : '',
35
- funcss || '',
36
- ].join(' ');
37
-
38
- return (
39
- <div id={id || ''} className={classNames} {...rest}>
40
- {children}
41
- </div>
42
- );
43
- }
package/ui/grid/Grid.tsx DELETED
@@ -1,37 +0,0 @@
1
- import { ReactNode, CSSProperties, HTMLProps } from 'react';
2
- import * as React from 'react';
3
-
4
- interface GridProps extends HTMLProps<HTMLDivElement> {
5
- children?: ReactNode;
6
- funcss?: string;
7
- gap?: number;
8
- justify?: CSSProperties['justifyContent'];
9
- align?: CSSProperties['alignItems'];
10
- id?: string;
11
- direction?: CSSProperties['flexDirection'];
12
- }
13
-
14
- export default function Grid({
15
- children,
16
- funcss,
17
- justify,
18
- align,
19
- id,
20
- direction,
21
- ...rest
22
- }: GridProps) {
23
- return (
24
- <div
25
- id={id || ''}
26
- className={`row ${funcss || ''}`}
27
- style={{
28
- justifyContent: justify || '',
29
- alignItems: align || '',
30
- flexDirection: direction || 'row'
31
- }}
32
- {...rest}
33
- >
34
- {children}
35
- </div>
36
- );
37
- }