@nurihaus/web-design-system 0.0.24 → 0.0.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurihaus/web-design-system",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "private": false,
5
5
  "description": "nurilounge-admin-design-system",
6
6
  "main": "dist/index.js",
@@ -1,10 +0,0 @@
1
- import { ReactNode } from "react";
2
- import "./avatar-style.css";
3
- interface AvatarProps {
4
- size: "xl" | "l" | "m" | "s";
5
- src?: string;
6
- alt?: string;
7
- badgeOption?: ReactNode | string;
8
- }
9
- declare const Avatar: (props: AvatarProps) => import("react/jsx-runtime").JSX.Element;
10
- export default Avatar;
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import "./avatar-style.css";
4
- import { BaseBadge } from "../badge/badge";
5
- var Avatar = function (props) {
6
- var size = props.size, src = props.src, alt = props.alt, badgeOption = props.badgeOption;
7
- var _a = useState(false), isImageDownload = _a[0], setIsImageDownload = _a[1];
8
- return (_jsxs("div", { className: "avatar ".concat(size), children: [_jsx("img", { src: src, alt: alt !== null && alt !== void 0 ? alt : "avatar", className: "avatar ".concat(size, " ").concat(!isImageDownload ? "hidden" : ""), onLoad: function () { return setIsImageDownload(true); } }), !isImageDownload && (_jsx("div", { className: "avatar avatar-skeleton ".concat(size), children: _jsx("div", { className: "avatar skeleton-animation" }) })), _jsx(BaseBadge, { asChild: true, style: {
9
- position: "absolute",
10
- right: "0",
11
- bottom: "0",
12
- }, children: badgeOption })] }));
13
- };
14
- export default Avatar;
@@ -1,27 +0,0 @@
1
- import "./badge.css";
2
- import { colors } from "../../styles/token/colors";
3
- import "../../styles/token/color.css";
4
- import "../../styles/token/font.css";
5
- import { ReactNode } from "react";
6
- interface BaseBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
7
- borderColor?: keyof typeof colors;
8
- textColor?: keyof typeof colors;
9
- backgroundColor?: keyof typeof colors;
10
- size?: "l" | "m" | "r" | "s" | "sm";
11
- asChild?: boolean;
12
- children?: ReactNode;
13
- }
14
- export declare const BaseBadge: (props: BaseBadgeProps) => import("react/jsx-runtime").JSX.Element;
15
- export declare const OptionBadge: (props: Omit<BaseBadgeProps, "asChild" | "children"> & {
16
- option: ReactNode;
17
- }) => import("react/jsx-runtime").JSX.Element;
18
- export declare const IconTextBadge: (props: Omit<BaseBadgeProps, "asChild" | "children"> & {
19
- icon: ReactNode;
20
- text: ReactNode;
21
- }) => import("react/jsx-runtime").JSX.Element;
22
- export declare const IconTextOptionBadge: (props: Omit<BaseBadgeProps, "asChild" | "children"> & {
23
- icon: ReactNode;
24
- text: ReactNode;
25
- option: ReactNode;
26
- }) => import("react/jsx-runtime").JSX.Element;
27
- export {};
@@ -1,34 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "./badge.css";
14
- import "../../styles/token/color.css";
15
- import "../../styles/token/font.css";
16
- import Composer from "../core/composer";
17
- export var BaseBadge = function (props) {
18
- var _a = props.asChild, asChild = _a === void 0 ? false : _a, borderColor = props.borderColor, _b = props.textColor, textColor = _b === void 0 ? "black" : _b, backgroundColor = props.backgroundColor, _c = props.size, size = _c === void 0 ? "l" : _c, style = props.style, children = props.children, className = props.className;
19
- var Comp = asChild ? Composer : "div";
20
- var composedClassName = "nuri-theme base-badge ".concat(size, " border-").concat(borderColor, " text-").concat(textColor, " background-").concat(backgroundColor, " ").concat(className);
21
- return (_jsx(Comp, { style: style, className: composedClassName, children: children }));
22
- };
23
- export var OptionBadge = function (props) {
24
- var option = props.option;
25
- return _jsx(BaseBadge, __assign({}, props, { children: option }));
26
- };
27
- export var IconTextBadge = function (props) {
28
- var icon = props.icon, text = props.text;
29
- return (_jsxs(BaseBadge, __assign({}, props, { children: [icon, _jsx("span", { children: text })] })));
30
- };
31
- export var IconTextOptionBadge = function (props) {
32
- var icon = props.icon, text = props.text, option = props.option;
33
- return (_jsxs(BaseBadge, __assign({}, props, { className: "icon-text-option", children: [_jsxs("span", { children: [icon, _jsx("span", { children: text })] }), option] })));
34
- };