athameui 0.0.8 → 0.0.9-c
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/components/Avatar/Avatar.tsx +0 -1
- package/components/Block/Block.tsx +22 -0
- package/components/Block/index.ts +1 -0
- package/components/DropDown/Dropdown.tsx +61 -0
- package/components/DropDown/index.ts +1 -0
- package/components/Layout/Main.tsx +21 -14
- package/components/Modal/Modal.tsx +1 -1
- package/components/SlideOut/SlideOut.tsx +71 -0
- package/components/SlideOut/index.ts +1 -0
- package/components/index.ts +3 -0
- package/dist/athameui.cjs +123 -37
- package/dist/athameui.cjs.map +1 -1
- package/dist/athameui.mjs +121 -38
- package/dist/athameui.mjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Block/Block.d.ts +13 -0
- package/dist/components/Block/Block.d.ts.map +1 -0
- package/dist/components/Block/index.d.ts +2 -0
- package/dist/components/Block/index.d.ts.map +1 -0
- package/dist/components/DropDown/Dropdown.d.ts +14 -0
- package/dist/components/DropDown/Dropdown.d.ts.map +1 -0
- package/dist/components/DropDown/index.d.ts +2 -0
- package/dist/components/DropDown/index.d.ts.map +1 -0
- package/dist/components/Layout/Main.d.ts +7 -3
- package/dist/components/Layout/Main.d.ts.map +1 -1
- package/dist/components/SlideOut/SlideOut.d.ts +21 -0
- package/dist/components/SlideOut/SlideOut.d.ts.map +1 -0
- package/dist/components/SlideOut/index.d.ts +2 -0
- package/dist/components/SlideOut/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/styles/breakpoints.d.ts +13 -0
- package/dist/styles/breakpoints.d.ts.map +1 -0
- package/dist/styles/breakpoints.ts +13 -0
- package/dist/styles/components/accordion.css +8 -5
- package/dist/styles/components/block.css +8 -0
- package/dist/styles/components/button.css +1 -1
- package/dist/styles/components/dropdown.css +18 -0
- package/dist/styles/components/main.css +11 -2
- package/dist/styles/components/slide-out.css +69 -0
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.ts +1 -1
- package/dist/styles/theme.css +3 -0
- package/dist/styles/tokens.css +45 -25
- package/dist/styles/tokens.d.ts +0 -10
- package/dist/styles/tokens.d.ts.map +1 -1
- package/dist/styles/tokens.ts +16 -26
- package/package.json +1 -1
- package/styles/breakpoints.ts +13 -0
- package/styles/components/accordion.css +8 -5
- package/styles/components/block.css +8 -0
- package/styles/components/button.css +1 -1
- package/styles/components/dropdown.css +18 -0
- package/styles/components/main.css +11 -2
- package/styles/components/slide-out.css +69 -0
- package/styles/index.ts +1 -1
- package/styles/theme.css +3 -0
- package/styles/tokens.css +45 -25
- package/styles/tokens.ts +16 -26
- package/dist/styles/mediaQueries.d.ts +0 -11
- package/dist/styles/mediaQueries.d.ts.map +0 -1
- package/dist/styles/mediaQueries.ts +0 -10
- package/styles/mediaQueries.ts +0 -10
package/dist/athameui.mjs
CHANGED
|
@@ -2362,6 +2362,20 @@ const Avatar = ({
|
|
|
2362
2362
|
});
|
|
2363
2363
|
};
|
|
2364
2364
|
|
|
2365
|
+
const Block = ({
|
|
2366
|
+
children,
|
|
2367
|
+
className,
|
|
2368
|
+
sx
|
|
2369
|
+
}) => {
|
|
2370
|
+
const blockClasses = cx("ath-block", className?.block);
|
|
2371
|
+
return jsx("div", {
|
|
2372
|
+
className: blockClasses,
|
|
2373
|
+
"data-testid": "block",
|
|
2374
|
+
css: sx?.block,
|
|
2375
|
+
children: children
|
|
2376
|
+
});
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2365
2379
|
const defaultAttributes = {
|
|
2366
2380
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
2367
2381
|
width: 24,
|
|
@@ -2536,6 +2550,35 @@ const ButtonGroup = ({
|
|
|
2536
2550
|
});
|
|
2537
2551
|
};
|
|
2538
2552
|
|
|
2553
|
+
const Dropdown = ({
|
|
2554
|
+
children,
|
|
2555
|
+
className,
|
|
2556
|
+
isOpen,
|
|
2557
|
+
sx,
|
|
2558
|
+
onClose
|
|
2559
|
+
}) => {
|
|
2560
|
+
const dropdownRef = useRef(null);
|
|
2561
|
+
const dropdownClasses = cx("ath-dropdown", isOpen && "ath-dropdown-open", className?.dropdown);
|
|
2562
|
+
useEffect(() => {
|
|
2563
|
+
const handleOutsideClick = event => {
|
|
2564
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2565
|
+
onClose();
|
|
2566
|
+
}
|
|
2567
|
+
};
|
|
2568
|
+
document.addEventListener("mousedown", handleOutsideClick);
|
|
2569
|
+
return () => {
|
|
2570
|
+
document.removeEventListener("mousedown", handleOutsideClick);
|
|
2571
|
+
};
|
|
2572
|
+
}, [onClose]);
|
|
2573
|
+
return jsxs("div", {
|
|
2574
|
+
ref: dropdownRef,
|
|
2575
|
+
className: dropdownClasses,
|
|
2576
|
+
css: sx?.dropdown,
|
|
2577
|
+
"data-testid": "dropdown",
|
|
2578
|
+
children: ["fdpdsugfpoidsuy", children]
|
|
2579
|
+
});
|
|
2580
|
+
};
|
|
2581
|
+
|
|
2539
2582
|
const FormLabel = ({
|
|
2540
2583
|
label,
|
|
2541
2584
|
required,
|
|
@@ -2747,11 +2790,16 @@ const Main = ({
|
|
|
2747
2790
|
className,
|
|
2748
2791
|
sx
|
|
2749
2792
|
}) => {
|
|
2750
|
-
const
|
|
2793
|
+
const mainClasses = cx("ath-main", typeof className === "object" && className !== null ? className.main : "");
|
|
2794
|
+
const mainContentClasses = cx("ath-main-content", typeof className === "object" && className !== null ? className.mainContent : "");
|
|
2751
2795
|
return jsx("main", {
|
|
2752
|
-
css: sx,
|
|
2753
|
-
className:
|
|
2754
|
-
children:
|
|
2796
|
+
css: sx?.main,
|
|
2797
|
+
className: mainClasses,
|
|
2798
|
+
children: jsx("div", {
|
|
2799
|
+
css: sx?.mainContent,
|
|
2800
|
+
className: mainContentClasses,
|
|
2801
|
+
children: children
|
|
2802
|
+
})
|
|
2755
2803
|
});
|
|
2756
2804
|
};
|
|
2757
2805
|
|
|
@@ -3023,15 +3071,59 @@ const Search = ({
|
|
|
3023
3071
|
});
|
|
3024
3072
|
};
|
|
3025
3073
|
|
|
3074
|
+
const SlideOut = ({
|
|
3075
|
+
children,
|
|
3076
|
+
className,
|
|
3077
|
+
from = "right",
|
|
3078
|
+
isOpen = false,
|
|
3079
|
+
sx,
|
|
3080
|
+
onClose
|
|
3081
|
+
}) => {
|
|
3082
|
+
const slideOutClasses = cx("ath-slide-out", className?.slideOut);
|
|
3083
|
+
const overlayClasses = cx("ath-slide-out-overlay", isOpen && "ath-slide-out-overlay-open", className?.overlay);
|
|
3084
|
+
const panelClasses = cx("ath-slide-out-panel", from === "left" ? "ath-slide-out-from-left" : "ath-slide-out-from-right", isOpen && "ath-slide-out-panel-open", className?.panel);
|
|
3085
|
+
const closeButtonClasses = cx("ath-slide-out-close-button", className?.closeButton);
|
|
3086
|
+
return jsxs("div", {
|
|
3087
|
+
className: slideOutClasses,
|
|
3088
|
+
css: sx?.slideOut,
|
|
3089
|
+
"data-testid": "slide-out",
|
|
3090
|
+
children: [jsx("div", {
|
|
3091
|
+
className: overlayClasses,
|
|
3092
|
+
css: sx?.overlay,
|
|
3093
|
+
onClick: onClose
|
|
3094
|
+
}), jsxs("div", {
|
|
3095
|
+
className: panelClasses,
|
|
3096
|
+
css: sx?.panel,
|
|
3097
|
+
children: [jsx(Button, {
|
|
3098
|
+
className: {
|
|
3099
|
+
button: closeButtonClasses
|
|
3100
|
+
},
|
|
3101
|
+
sx: {
|
|
3102
|
+
button: sx?.closeButton
|
|
3103
|
+
},
|
|
3104
|
+
onClick: onClose,
|
|
3105
|
+
"aria-label": "Close menu",
|
|
3106
|
+
variant: "ghost",
|
|
3107
|
+
dark: true,
|
|
3108
|
+
size: "medium",
|
|
3109
|
+
icon: jsx(HugeiconsIcon, {
|
|
3110
|
+
icon: uL,
|
|
3111
|
+
size: 24
|
|
3112
|
+
})
|
|
3113
|
+
}), children]
|
|
3114
|
+
})]
|
|
3115
|
+
});
|
|
3116
|
+
};
|
|
3117
|
+
|
|
3026
3118
|
const breakpoints = {
|
|
3027
|
-
xs:
|
|
3028
|
-
sm:
|
|
3029
|
-
md:
|
|
3030
|
-
lg:
|
|
3031
|
-
xl:
|
|
3032
|
-
"2xl":
|
|
3033
|
-
"3xl":
|
|
3034
|
-
"4xl":
|
|
3119
|
+
xs: 320,
|
|
3120
|
+
sm: 480,
|
|
3121
|
+
md: 620,
|
|
3122
|
+
lg: 768,
|
|
3123
|
+
xl: 896,
|
|
3124
|
+
"2xl": 1024,
|
|
3125
|
+
"3xl": 1280,
|
|
3126
|
+
"4xl": 1536
|
|
3035
3127
|
};
|
|
3036
3128
|
|
|
3037
3129
|
const tokens = {
|
|
@@ -3041,15 +3133,15 @@ const tokens = {
|
|
|
3041
3133
|
serif: "Libre Baskerville, serif"
|
|
3042
3134
|
},
|
|
3043
3135
|
size: {
|
|
3044
|
-
xs: "0.
|
|
3045
|
-
sm: "0.
|
|
3046
|
-
md: "
|
|
3047
|
-
lg: "
|
|
3048
|
-
xl: "1.
|
|
3049
|
-
"2xl": "
|
|
3050
|
-
"3xl": "
|
|
3051
|
-
"4xl": "
|
|
3052
|
-
"5xl": "
|
|
3136
|
+
xs: "0.75rem",
|
|
3137
|
+
sm: "0.875rem",
|
|
3138
|
+
md: "1rem",
|
|
3139
|
+
lg: "1.25rem",
|
|
3140
|
+
xl: "1.5rem",
|
|
3141
|
+
"2xl": "2rem",
|
|
3142
|
+
"3xl": "2.5rem",
|
|
3143
|
+
"4xl": "3rem",
|
|
3144
|
+
"5xl": "3.5rem"
|
|
3053
3145
|
}
|
|
3054
3146
|
},
|
|
3055
3147
|
color: {
|
|
@@ -3182,27 +3274,18 @@ const tokens = {
|
|
|
3182
3274
|
md: "5px",
|
|
3183
3275
|
lg: "8px"
|
|
3184
3276
|
},
|
|
3185
|
-
screen: {
|
|
3186
|
-
xs: "360px",
|
|
3187
|
-
sm: "480px",
|
|
3188
|
-
md: "768px",
|
|
3189
|
-
lg: "896px",
|
|
3190
|
-
xl: "1024px",
|
|
3191
|
-
"2xl": "1280px",
|
|
3192
|
-
"3xl": "1536px"
|
|
3193
|
-
},
|
|
3194
3277
|
media: {
|
|
3195
3278
|
min: {
|
|
3196
|
-
xs: "@media (min-width:
|
|
3279
|
+
xs: "@media (min-width: 320px)",
|
|
3197
3280
|
sm: "@media (min-width: 480px)",
|
|
3198
|
-
md: "@media (min-width:
|
|
3199
|
-
lg: "@media (min-width:
|
|
3200
|
-
xl: "@media (min-width:
|
|
3201
|
-
"2xl": "@media (min-width:
|
|
3202
|
-
"3xl": "@media (min-width:
|
|
3281
|
+
md: "@media (min-width: 620px)",
|
|
3282
|
+
lg: "@media (min-width: 768px)",
|
|
3283
|
+
xl: "@media (min-width: 896px)",
|
|
3284
|
+
"2xl": "@media (min-width: 1024px)",
|
|
3285
|
+
"3xl": "@media (min-width: 1280px)"
|
|
3203
3286
|
},
|
|
3204
3287
|
max: {
|
|
3205
|
-
xs: "@media (max-width:
|
|
3288
|
+
xs: "@media (max-width: 319px)",
|
|
3206
3289
|
sm: "@media (max-width: 479px)",
|
|
3207
3290
|
md: "@media (max-width: 767px)",
|
|
3208
3291
|
lg: "@media (max-width: 895px)",
|
|
@@ -3213,5 +3296,5 @@ const tokens = {
|
|
|
3213
3296
|
}
|
|
3214
3297
|
};
|
|
3215
3298
|
|
|
3216
|
-
export { Accordion, AccordionItem, Avatar, Button, ButtonGroup, ContainerScalingText, Footer, FormField, FormLabel, FormTextInput, Header, List, ListItem, Main, Modal, ScrollToTopButton, Search, breakpoints, cx, tokens };
|
|
3299
|
+
export { Accordion, AccordionItem, Avatar, Block, Button, ButtonGroup, ContainerScalingText, Dropdown, Footer, FormField, FormLabel, FormTextInput, Header, List, ListItem, Main, Modal, ScrollToTopButton, Search, SlideOut, breakpoints, cx, tokens };
|
|
3217
3300
|
//# sourceMappingURL=athameui.mjs.map
|