@julseb-lib/react 0.1.10 → 0.1.12
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 +61 -117
- package/dist/julseb-lib-react.cjs.js +12 -12
- package/dist/julseb-lib-react.es.js +1868 -1794
- package/dist/julseb-lib-react.umd.js +12 -12
- package/dist/lib/Variables.ts +20 -19
- package/dist/lib/components/Accordion/Accordion.tsx +1 -1
- package/dist/lib/components/Accordion/AccordionContent.tsx +2 -2
- package/dist/lib/components/Accordion/AccordionTitle.tsx +4 -3
- package/dist/lib/components/Alert/Alert.tsx +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.tsx +1 -1
- package/dist/lib/components/Avatar/Avatar.tsx +3 -7
- package/dist/lib/components/BackToTop/BackToTop.tsx +4 -3
- package/dist/lib/components/Badge/Badge.tsx +1 -1
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/dist/lib/components/Burger/Burger.tsx +11 -4
- package/dist/lib/components/Button/Button.tsx +5 -4
- package/dist/lib/components/ButtonGroup/ButtonGroup.tsx +4 -2
- package/dist/lib/components/ButtonIcon/ButtonFn.tsx +3 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.tsx +9 -2
- package/dist/lib/components/CodeContainer/CodeContainer.tsx +5 -5
- package/dist/lib/components/Cover/Cover.tsx +1 -1
- package/dist/lib/components/DragList/DragList.tsx +1 -1
- package/dist/lib/components/DragList/DragListItem.tsx +4 -3
- package/dist/lib/components/Drawer/Drawer.tsx +1 -1
- package/dist/lib/components/Dropdown/Dropdown.tsx +1 -1
- package/dist/lib/components/Fade/Fade.tsx +4 -4
- package/dist/lib/components/Fieldset/Fieldset.tsx +2 -2
- package/dist/lib/components/Footer/Footer.tsx +103 -0
- package/dist/lib/components/Footer/index.ts +1 -0
- package/dist/lib/components/Footer/types.ts +54 -0
- package/dist/lib/components/Form/Form.tsx +1 -1
- package/dist/lib/components/Header/Header.tsx +15 -6
- package/dist/lib/components/Header/types.ts +1 -1
- package/dist/lib/components/Image/Image.tsx +1 -1
- package/dist/lib/components/Input/Input.tsx +2 -2
- package/dist/lib/components/Input/templates/ColorInput.tsx +4 -0
- package/dist/lib/components/InputCheck/InputCheck.tsx +2 -2
- package/dist/lib/components/InputComponents/InputButton.tsx +7 -2
- package/dist/lib/components/InputComponents/classes.ts +1 -1
- package/dist/lib/components/InputContainer/InputContainer.tsx +1 -1
- package/dist/lib/components/InputCounter/InputCounter.tsx +2 -2
- package/dist/lib/components/InputImage/InputImage.tsx +1 -1
- package/dist/lib/components/InputPhone/InputPhone.tsx +1 -1
- package/dist/lib/components/InputPin/InputPin.tsx +3 -1
- package/dist/lib/components/InputSlider/InputSlider.tsx +1 -1
- package/dist/lib/components/Key/Key.tsx +2 -2
- package/dist/lib/components/ListGroup/ListGroup.tsx +1 -1
- package/dist/lib/components/ListGroup/ListGroupItem.tsx +1 -1
- package/dist/lib/components/ListGroup/ListGroupTitle.tsx +1 -1
- package/dist/lib/components/Loader/Loader.tsx +1 -1
- package/dist/lib/components/Loader/templates/LoaderOne.tsx +1 -1
- package/dist/lib/components/Loader/templates/LoaderThree.tsx +3 -3
- package/dist/lib/components/Loader/templates/LoaderTwo.tsx +2 -2
- package/dist/lib/components/MarkdownContainer/MarkdownContainer.tsx +2 -2
- package/dist/lib/components/Meta/Meta.tsx +125 -0
- package/dist/lib/components/Meta/index.ts +1 -0
- package/dist/lib/components/Meta/types.ts +35 -0
- package/dist/lib/components/Modal/Modal.tsx +1 -1
- package/dist/lib/components/PageLayout/PageLayout.tsx +64 -0
- package/dist/lib/components/PageLayout/index.ts +1 -0
- package/dist/lib/components/PageLayout/types.ts +29 -0
- package/dist/lib/components/PageLoading/PageLoading.tsx +1 -1
- package/dist/lib/components/Pagination/Pagination.tsx +1 -1
- package/dist/lib/components/Pagination/PaginationButton.tsx +1 -1
- package/dist/lib/components/Paginator/Paginator.tsx +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.tsx +4 -7
- package/dist/lib/components/ProgressBar/types.ts +1 -1
- package/dist/lib/components/ProgressCircle/ProgressCircle.tsx +7 -3
- package/dist/lib/components/ProgressCircle/types.ts +1 -2
- package/dist/lib/components/Rating/Rating.tsx +1 -1
- package/dist/lib/components/Select/Select.tsx +1 -1
- package/dist/lib/components/Skeleton/Skeleton.tsx +5 -2
- package/dist/lib/components/Skeleton/SkeletonCard.tsx +4 -1
- package/dist/lib/components/Slideshow/Slideshow.tsx +1 -1
- package/dist/lib/components/Slideshow/SlideshowPagination.tsx +1 -1
- package/dist/lib/components/SrOnly/SrOnly.tsx +33 -0
- package/dist/lib/components/SrOnly/index.ts +1 -0
- package/dist/lib/components/SrOnly/types.ts +7 -0
- package/dist/lib/components/Sticky/Sticky.tsx +8 -8
- package/dist/lib/components/Table/Table.tsx +8 -5
- package/dist/lib/components/Tabs/Tabs.tsx +1 -1
- package/dist/lib/components/Tabs/TabsButton.tsx +4 -2
- package/dist/lib/components/Tabs/TabsButtonsContainer.tsx +1 -1
- package/dist/lib/components/Tabs/TabsContainer.tsx +1 -1
- package/dist/lib/components/Tabs/TabsContent.tsx +1 -1
- package/dist/lib/components/Tag/Tag.tsx +1 -1
- package/dist/lib/components/Text/templates/Blockquote.tsx +1 -1
- package/dist/lib/components/Text/templates/Dl.tsx +1 -1
- package/dist/lib/components/Text/templates/H1.tsx +2 -2
- package/dist/lib/components/Text/templates/H2.tsx +2 -2
- package/dist/lib/components/Text/templates/H3.tsx +2 -2
- package/dist/lib/components/Text/templates/H4.tsx +2 -2
- package/dist/lib/components/Text/templates/H5.tsx +2 -2
- package/dist/lib/components/Text/templates/H6.tsx +1 -1
- package/dist/lib/components/Text/templates/Ol.tsx +1 -1
- package/dist/lib/components/Text/templates/P.tsx +1 -1
- package/dist/lib/components/Text/templates/Small.tsx +1 -1
- package/dist/lib/components/Text/templates/Ul.tsx +1 -1
- package/dist/lib/components/Toast/Toast.tsx +5 -4
- package/dist/lib/components/Tooltip/Tooltip.tsx +29 -22
- package/dist/lib/components/Wrapper/Wrapper.tsx +1 -1
- package/dist/lib/index.css +61 -117
- package/dist/lib/index.ts +4 -1
- package/dist/lib/types/components-items-props.ts +1 -24
- package/dist/lib/types/components-props.ts +4 -1
- package/dist/lib/types/global.ts +11 -13
- package/dist/lib/utils/design-tokens.ts +2 -7
- package/dist/lib/utils/gen-gap.ts +21 -21
- package/dist/lib/utils/gen-ring-color.ts +21 -0
- package/dist/lib/utils/index.ts +1 -0
- package/package.json +3 -3
- package/dist/lib/components/IconMenu/IconMenu.module.css +0 -239
- package/dist/lib/components/IconMenu/IconMenu.tsx +0 -101
- package/dist/lib/components/IconMenu/IconMenuItem.tsx +0 -53
- package/dist/lib/components/IconMenu/index.ts +0 -1
- package/dist/lib/components/IconMenu/types.ts +0 -48
- package/dist/react.css +0 -1
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--open-position: calc(
|
|
3
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
4
|
-
var(--button-position)
|
|
5
|
-
);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
@keyframes anim-left-close {
|
|
9
|
-
0% {
|
|
10
|
-
right: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
100% {
|
|
14
|
-
right: var(--open-position);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@keyframes anim-left {
|
|
19
|
-
0% {
|
|
20
|
-
right: var(--open-position);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
100% {
|
|
24
|
-
right: 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@keyframes anim-right-close {
|
|
29
|
-
0% {
|
|
30
|
-
left: 0;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
100% {
|
|
34
|
-
left: var(--open-position);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes anim-right {
|
|
39
|
-
0% {
|
|
40
|
-
left: var(--open-position);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
100% {
|
|
44
|
-
left: 0;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.icon-menu-item {
|
|
49
|
-
position: absolute;
|
|
50
|
-
--open-position: calc(
|
|
51
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
52
|
-
var(--button-position)
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.right {
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 0;
|
|
59
|
-
|
|
60
|
-
&.open {
|
|
61
|
-
left: var(--open-position);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.left {
|
|
66
|
-
top: 0;
|
|
67
|
-
right: 0;
|
|
68
|
-
|
|
69
|
-
animation: anim-left 200ms ease forwards;
|
|
70
|
-
|
|
71
|
-
&.open {
|
|
72
|
-
animation: anim-left-close 200ms ease forwards;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.icon-menu {
|
|
77
|
-
.icon-menu-item {
|
|
78
|
-
position: absolute;
|
|
79
|
-
left: 0;
|
|
80
|
-
--open-position: calc(
|
|
81
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
82
|
-
var(--button-position)
|
|
83
|
-
);
|
|
84
|
-
|
|
85
|
-
/* &.open {
|
|
86
|
-
position: relative;
|
|
87
|
-
left: unset;
|
|
88
|
-
} */
|
|
89
|
-
/* position: absolute;
|
|
90
|
-
|
|
91
|
-
z-index: var(--button-position);
|
|
92
|
-
|
|
93
|
-
&.dir-right {
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 0;
|
|
96
|
-
transform: translateX(0);
|
|
97
|
-
transition: transform 300ms ease !important;
|
|
98
|
-
|
|
99
|
-
&.open {
|
|
100
|
-
transform: translateX(var(--open-position)) !important;
|
|
101
|
-
left: unset;
|
|
102
|
-
}
|
|
103
|
-
} */
|
|
104
|
-
|
|
105
|
-
&.dir-right {
|
|
106
|
-
animation: anim-right 200ms ease forwards;
|
|
107
|
-
|
|
108
|
-
&.open {
|
|
109
|
-
animation: anim-right-close 200ms ease forwards;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.dir-left {
|
|
114
|
-
animation: anim-left 200ms ease forwards;
|
|
115
|
-
|
|
116
|
-
&.open {
|
|
117
|
-
animation: anim-left-close 200ms ease forwards;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&.dir-up {
|
|
122
|
-
/* left: 0;
|
|
123
|
-
bottom: 0; */
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.dir-down {
|
|
127
|
-
/* left: 0;
|
|
128
|
-
top: 0; */
|
|
129
|
-
}
|
|
130
|
-
/* position: absolute;
|
|
131
|
-
transition: left 200ms ease, top 200ms ease, right 200ms ease,
|
|
132
|
-
bottom 200ms ease;
|
|
133
|
-
display: block;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
width: ${DEFAULT_BUTTON_SIZE}px;
|
|
136
|
-
height: ${DEFAULT_BUTTON_SIZE}px;
|
|
137
|
-
z-index: 0;
|
|
138
|
-
|
|
139
|
-
&.Open {
|
|
140
|
-
z-index: calc(var(--button-position) + 1);
|
|
141
|
-
overflow: visible;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
${({ $direction }) => {
|
|
145
|
-
const POSITION = `calc(var(--button-position) * ${DEFAULT_BUTTON_SIZE}px + ${SPACERS.XS} * var(--button-position))`
|
|
146
|
-
|
|
147
|
-
switch ($direction) {
|
|
148
|
-
case "left":
|
|
149
|
-
return css`
|
|
150
|
-
top: 0;
|
|
151
|
-
right: 0;
|
|
152
|
-
|
|
153
|
-
&.Open {
|
|
154
|
-
right: ${POSITION};
|
|
155
|
-
}
|
|
156
|
-
`
|
|
157
|
-
case "up":
|
|
158
|
-
return css`
|
|
159
|
-
left: 0;
|
|
160
|
-
bottom: 0;
|
|
161
|
-
|
|
162
|
-
&.Open {
|
|
163
|
-
bottom: ${POSITION};
|
|
164
|
-
}
|
|
165
|
-
`
|
|
166
|
-
case "right":
|
|
167
|
-
return css`
|
|
168
|
-
top: 0;
|
|
169
|
-
left: 0;
|
|
170
|
-
|
|
171
|
-
&.Open {
|
|
172
|
-
left: ${POSITION};
|
|
173
|
-
}
|
|
174
|
-
`
|
|
175
|
-
case "down":
|
|
176
|
-
return css`
|
|
177
|
-
left: 0;
|
|
178
|
-
top: 0;
|
|
179
|
-
|
|
180
|
-
&.Open {
|
|
181
|
-
top: ${POSITION};
|
|
182
|
-
}
|
|
183
|
-
`
|
|
184
|
-
}
|
|
185
|
-
}} */
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* .icon-menu-item {
|
|
189
|
-
position: absolute;
|
|
190
|
-
z-index: calc(var(--button-position));
|
|
191
|
-
top: 0;
|
|
192
|
-
left: 0;
|
|
193
|
-
transition:
|
|
194
|
-
left 200ms ease,
|
|
195
|
-
top 200ms ease,
|
|
196
|
-
right 200ms ease,
|
|
197
|
-
bottom 200ms ease;
|
|
198
|
-
} */
|
|
199
|
-
|
|
200
|
-
/* &.dir-left .icon-menu-item {
|
|
201
|
-
top: 0;
|
|
202
|
-
left: 0;
|
|
203
|
-
transition: left 200ms ease;
|
|
204
|
-
|
|
205
|
-
&.open {
|
|
206
|
-
left: calc(
|
|
207
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
208
|
-
var(--button-position)
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
&.dir-right .icon-menu-item {
|
|
214
|
-
top: 0;
|
|
215
|
-
left: 0;
|
|
216
|
-
|
|
217
|
-
&.open {
|
|
218
|
-
right: calc(
|
|
219
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
220
|
-
var(--button-position)
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
} */
|
|
224
|
-
|
|
225
|
-
/* &.open {
|
|
226
|
-
overflow: visible;
|
|
227
|
-
--open-position: calc(
|
|
228
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
229
|
-
var(--button-position)
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
&.dir-rigt .icon-menu-item {
|
|
233
|
-
right: calc(
|
|
234
|
-
var(--button-position) * 48px + var(--spacer-xs) *
|
|
235
|
-
var(--button-position)
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
} */
|
|
239
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { useState, type FC } from "react"
|
|
2
|
-
import { uuid } from "@julseb-lib/utils"
|
|
3
|
-
import { IconMenuItem } from "./IconMenuItem"
|
|
4
|
-
import { ButtonIcon } from "../ButtonIcon"
|
|
5
|
-
import { Burger } from "../Burger"
|
|
6
|
-
import { clsx } from "../../utils"
|
|
7
|
-
import styles from "./IconMenu.module.css"
|
|
8
|
-
import type { ILibIconMenu } from "./types"
|
|
9
|
-
import { BiPlus } from "react-icons/bi"
|
|
10
|
-
|
|
11
|
-
/*
|
|
12
|
-
Generate JSDoc with:
|
|
13
|
-
* <short description of the component>
|
|
14
|
-
*
|
|
15
|
-
* @component
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* <an example of the component>
|
|
19
|
-
*
|
|
20
|
-
* @extends <type the component is extending (check in ./types.ts)>
|
|
21
|
-
*
|
|
22
|
-
for each prop, generate:
|
|
23
|
-
* @prop {type} [props.<prop name>] <prop with the possible values, and default values> - <short description of the prop>
|
|
24
|
-
*
|
|
25
|
-
* @returns <what the component returns>
|
|
26
|
-
*
|
|
27
|
-
* @see https://doc-julseb-lib-react.vercel.app/components/<name of the component>
|
|
28
|
-
*/
|
|
29
|
-
export const IconMenu: FC<ILibIconMenu> = ({
|
|
30
|
-
className,
|
|
31
|
-
element = "nav",
|
|
32
|
-
ref,
|
|
33
|
-
children,
|
|
34
|
-
direction = "right",
|
|
35
|
-
color,
|
|
36
|
-
buttonsVariant,
|
|
37
|
-
openButtonVariant = "plain",
|
|
38
|
-
iconOpen = "plus",
|
|
39
|
-
items,
|
|
40
|
-
// ...rest
|
|
41
|
-
}) => {
|
|
42
|
-
const Element = element
|
|
43
|
-
|
|
44
|
-
const [isOpen, setIsOpen] = useState(false)
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<Element
|
|
48
|
-
ref={ref}
|
|
49
|
-
className={clsx(
|
|
50
|
-
"relative w-12 h-12",
|
|
51
|
-
"icon-menu",
|
|
52
|
-
isOpen && "open",
|
|
53
|
-
`dir-${direction}`,
|
|
54
|
-
className,
|
|
55
|
-
)}
|
|
56
|
-
// {...rest}
|
|
57
|
-
>
|
|
58
|
-
<ButtonIcon
|
|
59
|
-
icon={
|
|
60
|
-
iconOpen === "burger" ? (
|
|
61
|
-
<Burger
|
|
62
|
-
isOpen={isOpen}
|
|
63
|
-
color="white"
|
|
64
|
-
className="w-6 h-4"
|
|
65
|
-
noHover
|
|
66
|
-
element="span"
|
|
67
|
-
/>
|
|
68
|
-
) : iconOpen === "plus" ? (
|
|
69
|
-
<BiPlus
|
|
70
|
-
size={24}
|
|
71
|
-
className={clsx(
|
|
72
|
-
"transition-all duration-200 ease-in-out",
|
|
73
|
-
isOpen && "rotate-45",
|
|
74
|
-
)}
|
|
75
|
-
/>
|
|
76
|
-
) : isOpen ? (
|
|
77
|
-
iconOpen?.open
|
|
78
|
-
) : (
|
|
79
|
-
iconOpen?.close
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
onClick={() => setIsOpen(!isOpen)}
|
|
83
|
-
color={color}
|
|
84
|
-
variant={openButtonVariant}
|
|
85
|
-
className={clsx("z-10 relative", "open-button")}
|
|
86
|
-
/>
|
|
87
|
-
|
|
88
|
-
{items?.map((item, i) => (
|
|
89
|
-
<IconMenuItem
|
|
90
|
-
key={uuid()}
|
|
91
|
-
indexPosition={i + 1}
|
|
92
|
-
isOpen={isOpen}
|
|
93
|
-
direction={direction}
|
|
94
|
-
variant={buttonsVariant}
|
|
95
|
-
color={color}
|
|
96
|
-
{...(item as any)}
|
|
97
|
-
/>
|
|
98
|
-
)) ?? children}
|
|
99
|
-
</Element>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useState, type FC } from "react"
|
|
2
|
-
import { ButtonIcon } from "../ButtonIcon"
|
|
3
|
-
import { clsx } from "../../utils"
|
|
4
|
-
import styles from "./IconMenu.module.css"
|
|
5
|
-
import type { ILibIconMenuItem } from "./types"
|
|
6
|
-
|
|
7
|
-
export const IconMenuItem: FC<ILibIconMenuItem> = ({
|
|
8
|
-
ref,
|
|
9
|
-
label,
|
|
10
|
-
icon,
|
|
11
|
-
indexPosition,
|
|
12
|
-
isOpen,
|
|
13
|
-
direction,
|
|
14
|
-
variant = "ghost",
|
|
15
|
-
role = "button",
|
|
16
|
-
// ...rest
|
|
17
|
-
}) => {
|
|
18
|
-
const menuDirection = () => {
|
|
19
|
-
switch (direction) {
|
|
20
|
-
case "left":
|
|
21
|
-
return styles.left
|
|
22
|
-
case "right":
|
|
23
|
-
return styles.right
|
|
24
|
-
case "up":
|
|
25
|
-
return styles.up
|
|
26
|
-
case "down":
|
|
27
|
-
return styles.down
|
|
28
|
-
default:
|
|
29
|
-
return null
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<ButtonIcon
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={clsx(
|
|
37
|
-
menuDirection(),
|
|
38
|
-
"absolute",
|
|
39
|
-
isOpen && styles.open,
|
|
40
|
-
styles["icon-menu-item"],
|
|
41
|
-
)}
|
|
42
|
-
icon={icon}
|
|
43
|
-
aria-label={label}
|
|
44
|
-
role={role}
|
|
45
|
-
variant={variant}
|
|
46
|
-
style={{
|
|
47
|
-
["--button-position" as any]: indexPosition,
|
|
48
|
-
}}
|
|
49
|
-
|
|
50
|
-
// {...rest}
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./IconMenu"
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
LibButtonVariant,
|
|
3
|
-
LibColorsHover,
|
|
4
|
-
LibComponentBase,
|
|
5
|
-
LibIconMenuDirection,
|
|
6
|
-
LibIconMenuIcon,
|
|
7
|
-
ReactElement,
|
|
8
|
-
LibIconMenuItem,
|
|
9
|
-
ReactChildren,
|
|
10
|
-
} from "../../types"
|
|
11
|
-
import type { ILibButtonIcon } from "../ButtonIcon/types"
|
|
12
|
-
|
|
13
|
-
/*====================== IconMenu ======================*/
|
|
14
|
-
|
|
15
|
-
interface ILibIconMenuBase extends LibComponentBase<HTMLDivElement> {
|
|
16
|
-
direction?: LibIconMenuDirection
|
|
17
|
-
color?: LibColorsHover
|
|
18
|
-
openButtonVariant?: LibButtonVariant
|
|
19
|
-
buttonsVariant?: LibButtonVariant
|
|
20
|
-
iconOpen?:
|
|
21
|
-
| LibIconMenuIcon
|
|
22
|
-
| {
|
|
23
|
-
open: ReactElement
|
|
24
|
-
close: ReactElement
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface IconMenuWithItems extends ILibIconMenuBase {
|
|
29
|
-
items: Array<LibIconMenuItem>
|
|
30
|
-
children?: never
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface IconMenuWithChildren extends ILibIconMenuBase {
|
|
34
|
-
items?: never
|
|
35
|
-
children: ReactChildren
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type ILibIconMenu = IconMenuWithItems | IconMenuWithChildren
|
|
39
|
-
|
|
40
|
-
/*====================== IconMenuItem ======================*/
|
|
41
|
-
|
|
42
|
-
export type ILibIconMenuItem = Pick<ILibButtonIcon, "color" | "variant"> &
|
|
43
|
-
LibIconMenuItem & {
|
|
44
|
-
indexPosition: number
|
|
45
|
-
isOpen: boolean
|
|
46
|
-
direction?: LibIconMenuDirection
|
|
47
|
-
variant?: LibButtonVariant
|
|
48
|
-
}
|
package/dist/react.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{--open-position: calc( var(--button-position) * 48px + var(--spacer-xs) * var(--button-position) )}@keyframes _anim-left-close_12v5r_1{0%{right:0}to{right:var(--open-position)}}@keyframes _anim-left_12v5r_1{0%{right:var(--open-position)}to{right:0}}@keyframes _anim-right-close_12v5r_1{0%{left:0}to{left:var(--open-position)}}@keyframes _anim-right_12v5r_1{0%{left:var(--open-position)}to{left:0}}._icon-menu-item_12v5r_48{position:absolute;--open-position: calc( var(--button-position) * 48px + var(--spacer-xs) * var(--button-position) )}._right_12v5r_56{top:0;left:0}._right_12v5r_56._open_12v5r_60{left:var(--open-position)}._left_12v5r_65{top:0;right:0;animation:_anim-left_12v5r_1 .2s ease forwards}._left_12v5r_65._open_12v5r_60{animation:_anim-left-close_12v5r_1 .2s ease forwards}._icon-menu_12v5r_48 ._icon-menu-item_12v5r_48{position:absolute;left:0;--open-position: calc( var(--button-position) * 48px + var(--spacer-xs) * var(--button-position) )}._icon-menu_12v5r_48 ._icon-menu-item_12v5r_48._dir-right_12v5r_93{animation:_anim-right_12v5r_1 .2s ease forwards}._icon-menu_12v5r_48 ._icon-menu-item_12v5r_48._dir-right_12v5r_93._open_12v5r_60{animation:_anim-right-close_12v5r_1 .2s ease forwards}._icon-menu_12v5r_48 ._icon-menu-item_12v5r_48._dir-left_12v5r_113{animation:_anim-left_12v5r_1 .2s ease forwards}._icon-menu_12v5r_48 ._icon-menu-item_12v5r_48._dir-left_12v5r_113._open_12v5r_60{animation:_anim-left-close_12v5r_1 .2s ease forwards}
|