@quen-ui/components 0.0.14
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/README.md +43 -0
- package/dist/Alert/Alert.cjs.js +54 -0
- package/dist/Alert/Alert.d.ts +4 -0
- package/dist/Alert/Alert.es.js +55 -0
- package/dist/Alert/index.d.ts +2 -0
- package/dist/Alert/styles.cjs.js +90 -0
- package/dist/Alert/styles.d.ts +10 -0
- package/dist/Alert/styles.es.js +90 -0
- package/dist/Alert/types.d.ts +25 -0
- package/dist/Avatar/Avatar.cjs.js +65 -0
- package/dist/Avatar/Avatar.d.ts +4 -0
- package/dist/Avatar/Avatar.es.js +66 -0
- package/dist/Avatar/AvatarIcon.svg.cjs.js +21 -0
- package/dist/Avatar/AvatarIcon.svg.es.js +5 -0
- package/dist/Avatar/helpers.cjs.js +18 -0
- package/dist/Avatar/helpers.d.ts +1 -0
- package/dist/Avatar/helpers.es.js +18 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/styles.cjs.js +31 -0
- package/dist/Avatar/styles.d.ts +9 -0
- package/dist/Avatar/styles.es.js +31 -0
- package/dist/Avatar/types.d.ts +31 -0
- package/dist/Badge/Badge.cjs.js +53 -0
- package/dist/Badge/Badge.d.ts +4 -0
- package/dist/Badge/Badge.es.js +54 -0
- package/dist/Badge/index.d.ts +3 -0
- package/dist/Badge/styles.cjs.js +70 -0
- package/dist/Badge/styles.d.ts +7 -0
- package/dist/Badge/styles.es.js +70 -0
- package/dist/Badge/types.cjs.js +10 -0
- package/dist/Badge/types.d.ts +22 -0
- package/dist/Badge/types.es.js +10 -0
- package/dist/Breadcrumbs/BreadcrumbItem.cjs.js +42 -0
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumbs/BreadcrumbItem.es.js +43 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +48 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/Breadcrumbs/Breadcrumbs.es.js +49 -0
- package/dist/Breadcrumbs/helpers.cjs.js +18 -0
- package/dist/Breadcrumbs/helpers.d.ts +16 -0
- package/dist/Breadcrumbs/helpers.es.js +18 -0
- package/dist/Breadcrumbs/index.d.ts +2 -0
- package/dist/Breadcrumbs/styles.cjs.js +50 -0
- package/dist/Breadcrumbs/styles.d.ts +4 -0
- package/dist/Breadcrumbs/styles.es.js +50 -0
- package/dist/Breadcrumbs/types.d.ts +56 -0
- package/dist/Button/Button.cjs.js +66 -0
- package/dist/Button/Button.d.ts +4 -0
- package/dist/Button/Button.es.js +67 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Button/styles.cjs.js +177 -0
- package/dist/Button/styles.d.ts +7 -0
- package/dist/Button/styles.es.js +177 -0
- package/dist/Button/types.d.ts +38 -0
- package/dist/Card/Card.cjs.js +38 -0
- package/dist/Card/Card.d.ts +3 -0
- package/dist/Card/Card.es.js +39 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/styles.cjs.js +55 -0
- package/dist/Card/styles.d.ts +11 -0
- package/dist/Card/styles.es.js +55 -0
- package/dist/Card/types.d.ts +26 -0
- package/dist/Checkbox/Checkbox.cjs.js +39 -0
- package/dist/Checkbox/Checkbox.d.ts +4 -0
- package/dist/Checkbox/Checkbox.es.js +40 -0
- package/dist/Checkbox/CheckboxGroup.cjs.js +82 -0
- package/dist/Checkbox/CheckboxGroup.d.ts +4 -0
- package/dist/Checkbox/CheckboxGroup.es.js +83 -0
- package/dist/Checkbox/helpers.cjs.js +14 -0
- package/dist/Checkbox/helpers.d.ts +18 -0
- package/dist/Checkbox/helpers.es.js +14 -0
- package/dist/Checkbox/index.cjs.js +7 -0
- package/dist/Checkbox/index.d.ts +8 -0
- package/dist/Checkbox/index.es.js +7 -0
- package/dist/Checkbox/styles.cjs.js +147 -0
- package/dist/Checkbox/styles.d.ts +13 -0
- package/dist/Checkbox/styles.es.js +147 -0
- package/dist/Checkbox/types.d.ts +67 -0
- package/dist/Divider/Divider.cjs.js +27 -0
- package/dist/Divider/Divider.d.ts +4 -0
- package/dist/Divider/Divider.es.js +28 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/styles.cjs.js +121 -0
- package/dist/Divider/styles.d.ts +3 -0
- package/dist/Divider/styles.es.js +121 -0
- package/dist/Divider/types.d.ts +17 -0
- package/dist/Drawer/Drawer.cjs.js +67 -0
- package/dist/Drawer/Drawer.d.ts +4 -0
- package/dist/Drawer/Drawer.es.js +68 -0
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/styles.cjs.js +85 -0
- package/dist/Drawer/styles.d.ts +18 -0
- package/dist/Drawer/styles.es.js +85 -0
- package/dist/Drawer/types.d.ts +24 -0
- package/dist/Dropdown/Dropdown.cjs.js +65 -0
- package/dist/Dropdown/Dropdown.d.ts +4 -0
- package/dist/Dropdown/Dropdown.es.js +66 -0
- package/dist/Dropdown/DropdownItem.cjs.js +32 -0
- package/dist/Dropdown/DropdownItem.d.ts +4 -0
- package/dist/Dropdown/DropdownItem.es.js +33 -0
- package/dist/Dropdown/DropdownList.cjs.js +85 -0
- package/dist/Dropdown/DropdownList.d.ts +6 -0
- package/dist/Dropdown/DropdownList.es.js +86 -0
- package/dist/Dropdown/DropdownPortal.cjs.js +41 -0
- package/dist/Dropdown/DropdownPortal.d.ts +4 -0
- package/dist/Dropdown/DropdownPortal.es.js +42 -0
- package/dist/Dropdown/helpers.cjs.js +112 -0
- package/dist/Dropdown/helpers.d.ts +35 -0
- package/dist/Dropdown/helpers.es.js +112 -0
- package/dist/Dropdown/index.d.ts +2 -0
- package/dist/Dropdown/styles.cjs.js +150 -0
- package/dist/Dropdown/styles.d.ts +33 -0
- package/dist/Dropdown/styles.es.js +150 -0
- package/dist/Dropdown/types.d.ts +81 -0
- package/dist/Flex/Flex.cjs.js +10 -0
- package/dist/Flex/Flex.d.ts +4 -0
- package/dist/Flex/Flex.es.js +11 -0
- package/dist/Flex/index.d.ts +2 -0
- package/dist/Flex/styles.cjs.js +32 -0
- package/dist/Flex/styles.d.ts +2 -0
- package/dist/Flex/styles.es.js +32 -0
- package/dist/Flex/types.d.ts +23 -0
- package/dist/Image/Image.cjs.js +79 -0
- package/dist/Image/Image.d.ts +4 -0
- package/dist/Image/Image.es.js +80 -0
- package/dist/Image/index.d.ts +2 -0
- package/dist/Image/styles.cjs.js +87 -0
- package/dist/Image/styles.d.ts +13 -0
- package/dist/Image/styles.es.js +87 -0
- package/dist/Image/types.d.ts +20 -0
- package/dist/InputNumber/InputNumber.cjs.js +145 -0
- package/dist/InputNumber/InputNumber.d.ts +4 -0
- package/dist/InputNumber/InputNumber.es.js +146 -0
- package/dist/InputNumber/index.d.ts +2 -0
- package/dist/InputNumber/styles.cjs.js +136 -0
- package/dist/InputNumber/styles.d.ts +21 -0
- package/dist/InputNumber/styles.es.js +136 -0
- package/dist/InputNumber/types.d.ts +61 -0
- package/dist/Layout/Content.cjs.js +7 -0
- package/dist/Layout/Content.d.ts +4 -0
- package/dist/Layout/Content.es.js +8 -0
- package/dist/Layout/Footer.cjs.js +7 -0
- package/dist/Layout/Footer.d.ts +4 -0
- package/dist/Layout/Footer.es.js +8 -0
- package/dist/Layout/Header.cjs.js +47 -0
- package/dist/Layout/Header.d.ts +4 -0
- package/dist/Layout/Header.es.js +48 -0
- package/dist/Layout/Layout.cjs.js +49 -0
- package/dist/Layout/Layout.d.ts +5 -0
- package/dist/Layout/Layout.es.js +49 -0
- package/dist/Layout/Sidebar.cjs.js +57 -0
- package/dist/Layout/Sidebar.d.ts +4 -0
- package/dist/Layout/Sidebar.es.js +58 -0
- package/dist/Layout/index.cjs.js +13 -0
- package/dist/Layout/index.d.ts +14 -0
- package/dist/Layout/index.es.js +13 -0
- package/dist/Layout/styles.cjs.js +150 -0
- package/dist/Layout/styles.d.ts +32 -0
- package/dist/Layout/styles.es.js +150 -0
- package/dist/Layout/types.d.ts +75 -0
- package/dist/Loader/Loader.cjs.js +34 -0
- package/dist/Loader/Loader.d.ts +4 -0
- package/dist/Loader/Loader.es.js +35 -0
- package/dist/Loader/index.d.ts +2 -0
- package/dist/Loader/loaders/Bars.cjs.js +12 -0
- package/dist/Loader/loaders/Bars.d.ts +6 -0
- package/dist/Loader/loaders/Bars.es.js +13 -0
- package/dist/Loader/loaders/Dots.cjs.js +12 -0
- package/dist/Loader/loaders/Dots.d.ts +6 -0
- package/dist/Loader/loaders/Dots.es.js +13 -0
- package/dist/Loader/loaders/Oval.cjs.js +8 -0
- package/dist/Loader/loaders/Oval.d.ts +6 -0
- package/dist/Loader/loaders/Oval.es.js +9 -0
- package/dist/Loader/styles.cjs.js +95 -0
- package/dist/Loader/styles.d.ts +9 -0
- package/dist/Loader/styles.es.js +95 -0
- package/dist/Loader/types.d.ts +11 -0
- package/dist/Modal/Modal.cjs.js +67 -0
- package/dist/Modal/Modal.d.ts +4 -0
- package/dist/Modal/Modal.es.js +68 -0
- package/dist/Modal/index.d.ts +2 -0
- package/dist/Modal/styles.cjs.js +52 -0
- package/dist/Modal/styles.d.ts +14 -0
- package/dist/Modal/styles.es.js +52 -0
- package/dist/Modal/types.d.ts +31 -0
- package/dist/Notification/Notification.cjs.js +73 -0
- package/dist/Notification/Notification.d.ts +4 -0
- package/dist/Notification/Notification.es.js +74 -0
- package/dist/Notification/NotificationInstance.cjs.js +244 -0
- package/dist/Notification/NotificationInstance.d.ts +8 -0
- package/dist/Notification/NotificationInstance.es.js +244 -0
- package/dist/Notification/NotificationsStore.cjs.js +30 -0
- package/dist/Notification/NotificationsStore.d.ts +13 -0
- package/dist/Notification/NotificationsStore.es.js +31 -0
- package/dist/Notification/index.d.ts +3 -0
- package/dist/Notification/styles.cjs.js +90 -0
- package/dist/Notification/styles.d.ts +8 -0
- package/dist/Notification/styles.es.js +90 -0
- package/dist/Notification/types.cjs.js +9 -0
- package/dist/Notification/types.d.ts +41 -0
- package/dist/Notification/types.es.js +9 -0
- package/dist/Progress/Progress.cjs.js +43 -0
- package/dist/Progress/Progress.d.ts +4 -0
- package/dist/Progress/Progress.es.js +44 -0
- package/dist/Progress/index.d.ts +2 -0
- package/dist/Progress/styles.cjs.js +82 -0
- package/dist/Progress/styles.d.ts +13 -0
- package/dist/Progress/styles.es.js +82 -0
- package/dist/Progress/types.d.ts +20 -0
- package/dist/RadioButton/RadioButton.cjs.js +45 -0
- package/dist/RadioButton/RadioButton.d.ts +4 -0
- package/dist/RadioButton/RadioButton.es.js +46 -0
- package/dist/RadioButton/RadioButtonGroup.cjs.js +68 -0
- package/dist/RadioButton/RadioButtonGroup.d.ts +4 -0
- package/dist/RadioButton/RadioButtonGroup.es.js +69 -0
- package/dist/RadioButton/helpers.cjs.js +14 -0
- package/dist/RadioButton/helpers.d.ts +18 -0
- package/dist/RadioButton/helpers.es.js +14 -0
- package/dist/RadioButton/index.cjs.js +7 -0
- package/dist/RadioButton/index.d.ts +8 -0
- package/dist/RadioButton/index.es.js +7 -0
- package/dist/RadioButton/styles.cjs.js +84 -0
- package/dist/RadioButton/styles.d.ts +12 -0
- package/dist/RadioButton/styles.es.js +84 -0
- package/dist/RadioButton/types.d.ts +65 -0
- package/dist/Select/Select.cjs.js +114 -0
- package/dist/Select/Select.d.ts +4 -0
- package/dist/Select/Select.es.js +115 -0
- package/dist/Select/helpers.cjs.js +16 -0
- package/dist/Select/helpers.d.ts +138 -0
- package/dist/Select/helpers.es.js +16 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/Select/styles.cjs.js +415 -0
- package/dist/Select/styles.d.ts +9 -0
- package/dist/Select/styles.es.js +415 -0
- package/dist/Select/types.d.ts +116 -0
- package/dist/Select/useSelect.cjs.js +72 -0
- package/dist/Select/useSelect.d.ts +150 -0
- package/dist/Select/useSelect.es.js +72 -0
- package/dist/Switch/Switch.cjs.js +53 -0
- package/dist/Switch/Switch.d.ts +4 -0
- package/dist/Switch/Switch.es.js +54 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/styles.cjs.js +78 -0
- package/dist/Switch/styles.d.ts +7 -0
- package/dist/Switch/styles.es.js +78 -0
- package/dist/Switch/types.d.ts +25 -0
- package/dist/Tabs/Tab.cjs.js +42 -0
- package/dist/Tabs/Tab.d.ts +4 -0
- package/dist/Tabs/Tab.es.js +43 -0
- package/dist/Tabs/TabPanel.cjs.js +14 -0
- package/dist/Tabs/TabPanel.d.ts +4 -0
- package/dist/Tabs/TabPanel.es.js +15 -0
- package/dist/Tabs/Tabs.cjs.js +21 -0
- package/dist/Tabs/Tabs.d.ts +5 -0
- package/dist/Tabs/Tabs.es.js +21 -0
- package/dist/Tabs/TabsList.cjs.js +12 -0
- package/dist/Tabs/TabsList.d.ts +4 -0
- package/dist/Tabs/TabsList.es.js +13 -0
- package/dist/Tabs/index.cjs.js +10 -0
- package/dist/Tabs/index.d.ts +12 -0
- package/dist/Tabs/index.es.js +11 -0
- package/dist/Tabs/styles.cjs.js +74 -0
- package/dist/Tabs/styles.d.ts +9 -0
- package/dist/Tabs/styles.es.js +74 -0
- package/dist/Tabs/types.d.ts +51 -0
- package/dist/Tag/Tag.cjs.js +39 -0
- package/dist/Tag/Tag.d.ts +4 -0
- package/dist/Tag/Tag.es.js +40 -0
- package/dist/Tag/index.d.ts +2 -0
- package/dist/Tag/styles.cjs.js +51 -0
- package/dist/Tag/styles.d.ts +6 -0
- package/dist/Tag/styles.es.js +51 -0
- package/dist/Tag/types.d.ts +18 -0
- package/dist/TextField/TextField.cjs.js +100 -0
- package/dist/TextField/TextField.d.ts +4 -0
- package/dist/TextField/TextField.es.js +101 -0
- package/dist/TextField/index.d.ts +2 -0
- package/dist/TextField/styles.cjs.js +65 -0
- package/dist/TextField/styles.d.ts +9 -0
- package/dist/TextField/styles.es.js +65 -0
- package/dist/TextField/types.d.ts +41 -0
- package/dist/Textarea/Textarea.cjs.js +103 -0
- package/dist/Textarea/Textarea.d.ts +4 -0
- package/dist/Textarea/Textarea.es.js +104 -0
- package/dist/Textarea/index.d.ts +2 -0
- package/dist/Textarea/styles.cjs.js +80 -0
- package/dist/Textarea/styles.d.ts +9 -0
- package/dist/Textarea/styles.es.js +80 -0
- package/dist/Textarea/types.d.ts +47 -0
- package/dist/Tooltip/Tooltip.cjs.js +69 -0
- package/dist/Tooltip/Tooltip.d.ts +4 -0
- package/dist/Tooltip/Tooltip.es.js +70 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/styles.cjs.js +232 -0
- package/dist/Tooltip/styles.d.ts +13 -0
- package/dist/Tooltip/styles.es.js +232 -0
- package/dist/Tooltip/types.d.ts +22 -0
- package/dist/assets/icon-arrow-bottom.svg.cjs.js +21 -0
- package/dist/assets/icon-arrow-bottom.svg.es.js +5 -0
- package/dist/assets/icon-close.svg.cjs.js +21 -0
- package/dist/assets/icon-close.svg.es.js +5 -0
- package/dist/assets/icon-error.svg.cjs.js +21 -0
- package/dist/assets/icon-error.svg.es.js +5 -0
- package/dist/assets/icon-info.svg.cjs.js +21 -0
- package/dist/assets/icon-info.svg.es.js +5 -0
- package/dist/assets/icon-lines.svg.cjs.js +21 -0
- package/dist/assets/icon-lines.svg.es.js +5 -0
- package/dist/assets/icon-success.svg.cjs.js +21 -0
- package/dist/assets/icon-success.svg.es.js +5 -0
- package/dist/assets/icon-warning.svg.cjs.js +21 -0
- package/dist/assets/icon-warning.svg.es.js +5 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/index.cjs.js +63 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.es.js +63 -0
- package/dist/types/propsWithAttributes.d.ts +2 -0
- package/dist/types/size.d.ts +2 -0
- package/dist/typography/Text/Text.cjs.js +31 -0
- package/dist/typography/Text/Text.d.ts +4 -0
- package/dist/typography/Text/Text.es.js +32 -0
- package/dist/typography/Text/__stories__/Text.stories.d.ts +9 -0
- package/dist/typography/Text/index.d.ts +2 -0
- package/dist/typography/Text/styles.cjs.js +69 -0
- package/dist/typography/Text/styles.d.ts +2 -0
- package/dist/typography/Text/styles.es.js +69 -0
- package/dist/typography/Text/types.d.ts +22 -0
- package/dist/typography/Title/Title.cjs.js +26 -0
- package/dist/typography/Title/Title.d.ts +4 -0
- package/dist/typography/Title/Title.es.js +27 -0
- package/dist/typography/Title/__stories__/Title.stories.d.ts +9 -0
- package/dist/typography/Title/index.d.ts +2 -0
- package/dist/typography/Title/styles.cjs.js +75 -0
- package/dist/typography/Title/styles.d.ts +2 -0
- package/dist/typography/Title/styles.es.js +75 -0
- package/dist/typography/Title/types.d.ts +22 -0
- package/package.json +71 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MouseEventHandler, JSX, CSSProperties } from 'react';
|
|
2
|
+
export declare const TEXT_SIZE: readonly ["xl", "l", "m", "s", "xs"];
|
|
3
|
+
export declare const TEXT_TYPE: readonly ["secondary", "success", "warning", "danger", "disabled"];
|
|
4
|
+
export type TTextSize = (typeof TEXT_SIZE)[number];
|
|
5
|
+
export type TTextType = (typeof TEXT_TYPE)[number];
|
|
6
|
+
export interface ITextProps {
|
|
7
|
+
/** Controls text size */
|
|
8
|
+
size?: TTextSize;
|
|
9
|
+
/** Custom CSS color value (overrides type) */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Click event handler */
|
|
12
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
13
|
+
/** Semantic state style */
|
|
14
|
+
type?: TTextType;
|
|
15
|
+
/** HTML tag to render */
|
|
16
|
+
as?: keyof JSX.IntrinsicElements;
|
|
17
|
+
/** Custom CSS class */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Inline styles */
|
|
20
|
+
styles?: CSSProperties;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const styles = require("./styles.cjs.js");
|
|
4
|
+
const Title = ({
|
|
5
|
+
children,
|
|
6
|
+
size,
|
|
7
|
+
color,
|
|
8
|
+
onClick,
|
|
9
|
+
type,
|
|
10
|
+
className,
|
|
11
|
+
id,
|
|
12
|
+
...props
|
|
13
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
+
styles.TitleStyled,
|
|
15
|
+
{
|
|
16
|
+
id,
|
|
17
|
+
size,
|
|
18
|
+
color,
|
|
19
|
+
onClick,
|
|
20
|
+
type,
|
|
21
|
+
className,
|
|
22
|
+
...props,
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
module.exports = Title;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ITitleProps } from './types';
|
|
3
|
+
declare const Title: ({ children, size, color, onClick, type, className, id, ...props }: PropsWithChildren<ITitleProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default Title;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TitleStyled } from "./styles.es.js";
|
|
3
|
+
const Title = ({
|
|
4
|
+
children,
|
|
5
|
+
size,
|
|
6
|
+
color,
|
|
7
|
+
onClick,
|
|
8
|
+
type,
|
|
9
|
+
className,
|
|
10
|
+
id,
|
|
11
|
+
...props
|
|
12
|
+
}) => /* @__PURE__ */ jsx(
|
|
13
|
+
TitleStyled,
|
|
14
|
+
{
|
|
15
|
+
id,
|
|
16
|
+
size,
|
|
17
|
+
color,
|
|
18
|
+
onClick,
|
|
19
|
+
type,
|
|
20
|
+
className,
|
|
21
|
+
...props,
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
export {
|
|
26
|
+
Title as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const styled = require("styled-components");
|
|
4
|
+
const getFonts = (size, theme) => {
|
|
5
|
+
switch (size) {
|
|
6
|
+
case "2xl":
|
|
7
|
+
return styled.css`
|
|
8
|
+
font-size: ${theme.fonts.header.size["2xl"]};
|
|
9
|
+
line-height: ${theme.fonts.header.lineHeight["2xl"]};
|
|
10
|
+
font-weight: ${theme.fonts.header.weight};
|
|
11
|
+
`;
|
|
12
|
+
case "xl":
|
|
13
|
+
return styled.css`
|
|
14
|
+
font-size: ${theme.fonts.header.size["xl"]};
|
|
15
|
+
line-height: ${theme.fonts.header.lineHeight["xl"]};
|
|
16
|
+
font-weight: ${theme.fonts.header.weight};
|
|
17
|
+
`;
|
|
18
|
+
case "l":
|
|
19
|
+
return styled.css`
|
|
20
|
+
font-size: ${theme.fonts.header.size["l"]};
|
|
21
|
+
line-height: ${theme.fonts.header.lineHeight["l"]};
|
|
22
|
+
font-weight: ${theme.fonts.header.weight};
|
|
23
|
+
`;
|
|
24
|
+
case "m":
|
|
25
|
+
return styled.css`
|
|
26
|
+
font-size: ${theme.fonts.header.size["m"]};
|
|
27
|
+
line-height: ${theme.fonts.header.lineHeight["m"]};
|
|
28
|
+
font-weight: ${theme.fonts.header.weight};
|
|
29
|
+
`;
|
|
30
|
+
case "s":
|
|
31
|
+
return styled.css`
|
|
32
|
+
font-size: ${theme.fonts.header.size["s"]};
|
|
33
|
+
line-height: ${theme.fonts.header.lineHeight["s"]};
|
|
34
|
+
font-weight: ${theme.fonts.header.weight};
|
|
35
|
+
`;
|
|
36
|
+
case "xs":
|
|
37
|
+
return styled.css`
|
|
38
|
+
font-size: ${theme.fonts.header.size["xs"]};
|
|
39
|
+
line-height: ${theme.fonts.header.lineHeight["xs"]};
|
|
40
|
+
font-weight: ${theme.fonts.header.weight};
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getColor = ({
|
|
45
|
+
type,
|
|
46
|
+
color,
|
|
47
|
+
theme
|
|
48
|
+
}) => {
|
|
49
|
+
if (color) {
|
|
50
|
+
return color;
|
|
51
|
+
} else {
|
|
52
|
+
switch (type) {
|
|
53
|
+
case "secondary":
|
|
54
|
+
return theme.colors.grayViolet["6"];
|
|
55
|
+
case "success":
|
|
56
|
+
return theme.colors.green["6"];
|
|
57
|
+
case "warning":
|
|
58
|
+
return theme.colors.orange["6"];
|
|
59
|
+
case "danger":
|
|
60
|
+
return theme.colors.red["6"];
|
|
61
|
+
case "disabled":
|
|
62
|
+
return theme.colors.gray["4"];
|
|
63
|
+
default:
|
|
64
|
+
return theme.textColor;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const TitleStyled = styled.span.attrs({
|
|
69
|
+
className: "quen-ui__title"
|
|
70
|
+
})`
|
|
71
|
+
margin: 0;
|
|
72
|
+
${({ theme, size }) => getFonts(size, theme)};
|
|
73
|
+
color: ${({ color, type, theme }) => getColor({ color, theme, type })};
|
|
74
|
+
`;
|
|
75
|
+
exports.TitleStyled = TitleStyled;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ITitleProps } from './types';
|
|
2
|
+
export declare const TitleStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, never>, ITitleProps>> & string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
const getFonts = (size, theme) => {
|
|
3
|
+
switch (size) {
|
|
4
|
+
case "2xl":
|
|
5
|
+
return css`
|
|
6
|
+
font-size: ${theme.fonts.header.size["2xl"]};
|
|
7
|
+
line-height: ${theme.fonts.header.lineHeight["2xl"]};
|
|
8
|
+
font-weight: ${theme.fonts.header.weight};
|
|
9
|
+
`;
|
|
10
|
+
case "xl":
|
|
11
|
+
return css`
|
|
12
|
+
font-size: ${theme.fonts.header.size["xl"]};
|
|
13
|
+
line-height: ${theme.fonts.header.lineHeight["xl"]};
|
|
14
|
+
font-weight: ${theme.fonts.header.weight};
|
|
15
|
+
`;
|
|
16
|
+
case "l":
|
|
17
|
+
return css`
|
|
18
|
+
font-size: ${theme.fonts.header.size["l"]};
|
|
19
|
+
line-height: ${theme.fonts.header.lineHeight["l"]};
|
|
20
|
+
font-weight: ${theme.fonts.header.weight};
|
|
21
|
+
`;
|
|
22
|
+
case "m":
|
|
23
|
+
return css`
|
|
24
|
+
font-size: ${theme.fonts.header.size["m"]};
|
|
25
|
+
line-height: ${theme.fonts.header.lineHeight["m"]};
|
|
26
|
+
font-weight: ${theme.fonts.header.weight};
|
|
27
|
+
`;
|
|
28
|
+
case "s":
|
|
29
|
+
return css`
|
|
30
|
+
font-size: ${theme.fonts.header.size["s"]};
|
|
31
|
+
line-height: ${theme.fonts.header.lineHeight["s"]};
|
|
32
|
+
font-weight: ${theme.fonts.header.weight};
|
|
33
|
+
`;
|
|
34
|
+
case "xs":
|
|
35
|
+
return css`
|
|
36
|
+
font-size: ${theme.fonts.header.size["xs"]};
|
|
37
|
+
line-height: ${theme.fonts.header.lineHeight["xs"]};
|
|
38
|
+
font-weight: ${theme.fonts.header.weight};
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const getColor = ({
|
|
43
|
+
type,
|
|
44
|
+
color,
|
|
45
|
+
theme
|
|
46
|
+
}) => {
|
|
47
|
+
if (color) {
|
|
48
|
+
return color;
|
|
49
|
+
} else {
|
|
50
|
+
switch (type) {
|
|
51
|
+
case "secondary":
|
|
52
|
+
return theme.colors.grayViolet["6"];
|
|
53
|
+
case "success":
|
|
54
|
+
return theme.colors.green["6"];
|
|
55
|
+
case "warning":
|
|
56
|
+
return theme.colors.orange["6"];
|
|
57
|
+
case "danger":
|
|
58
|
+
return theme.colors.red["6"];
|
|
59
|
+
case "disabled":
|
|
60
|
+
return theme.colors.gray["4"];
|
|
61
|
+
default:
|
|
62
|
+
return theme.textColor;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const TitleStyled = styled.span.attrs({
|
|
67
|
+
className: "quen-ui__title"
|
|
68
|
+
})`
|
|
69
|
+
margin: 0;
|
|
70
|
+
${({ theme, size }) => getFonts(size, theme)};
|
|
71
|
+
color: ${({ color, type, theme }) => getColor({ color, theme, type })};
|
|
72
|
+
`;
|
|
73
|
+
export {
|
|
74
|
+
TitleStyled
|
|
75
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React, JSX } from 'react';
|
|
2
|
+
export declare const TITLE_SIZE: readonly ["2xl", "xl", "l", "m", "s", "xs"];
|
|
3
|
+
export declare const TITLE_TYPE: readonly ["secondary", "success", "warning", "danger", "disabled"];
|
|
4
|
+
export type TTitleSize = (typeof TITLE_SIZE)[number];
|
|
5
|
+
export type TTitleType = (typeof TITLE_TYPE)[number];
|
|
6
|
+
export interface ITitleProps {
|
|
7
|
+
/** Visual size */
|
|
8
|
+
size: TTitleSize;
|
|
9
|
+
/** Custom CSS color value (overrides type) */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Click event handler */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
/** Applies semantic state styling */
|
|
14
|
+
type?: TTitleType;
|
|
15
|
+
/** Custom CSS class */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** DOM element id */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** Defines rendered HTML tag */
|
|
20
|
+
as?: keyof JSX.IntrinsicElements | React.ElementType;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quen-ui/components",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.14",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"homepage": "https://quen-ui.github.io/quen-ui/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/quen-ui/quen-ui"
|
|
10
|
+
},
|
|
11
|
+
"description": "A set of UI components for React applications.",
|
|
12
|
+
"author": "QuenUI",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.cjs.js",
|
|
17
|
+
"module": "./dist/index.es.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.es.js",
|
|
23
|
+
"require": "./dist/index.cjs.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
28
|
+
"build": "tsc -b && vite build",
|
|
29
|
+
"lint": "eslint .",
|
|
30
|
+
"preview": "vite preview"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@quen-ui/helpers": "*",
|
|
34
|
+
"@quen-ui/hooks": "*",
|
|
35
|
+
"polished": "^4.3.1",
|
|
36
|
+
"rc-input-number": "^9.5.0",
|
|
37
|
+
"rc-select": "^14.16.6",
|
|
38
|
+
"react-textarea-autosize": "^8.5.9",
|
|
39
|
+
"react-transition-group": "^4.4.5",
|
|
40
|
+
"react-transition-state": "^2.3.1",
|
|
41
|
+
"styled-components": "^6.1.15"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/react": "^19.1.12",
|
|
45
|
+
"@types/react-dom": "^19.1.9",
|
|
46
|
+
"@types/react-transition-group": "^4.4.12",
|
|
47
|
+
"@vitejs/plugin-react-swc": "^3.8.0",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
50
|
+
"globals": "^15.15.0",
|
|
51
|
+
"typescript": "~5.7.2",
|
|
52
|
+
"typescript-eslint": "^8.24.1",
|
|
53
|
+
"vite": "^6.2.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"react": ">=18.0.0",
|
|
57
|
+
"react-dom": ">=18.0.0",
|
|
58
|
+
"@quen-ui/theme": "*"
|
|
59
|
+
},
|
|
60
|
+
"keywords": [
|
|
61
|
+
"components",
|
|
62
|
+
"react",
|
|
63
|
+
"react-components",
|
|
64
|
+
"design",
|
|
65
|
+
"frontend",
|
|
66
|
+
"library",
|
|
67
|
+
"ui",
|
|
68
|
+
"ui-kit"
|
|
69
|
+
],
|
|
70
|
+
"license": "MIT"
|
|
71
|
+
}
|