ar-design 0.0.6 → 0.0.8

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 (28) hide show
  1. package/dist/components/syntax-highlighter/classes/Compiler.d.ts +7 -0
  2. package/dist/components/syntax-highlighter/classes/Compiler.js +86 -0
  3. package/dist/components/syntax-highlighter/classes/Parser.d.ts +10 -0
  4. package/dist/components/syntax-highlighter/classes/Parser.js +89 -0
  5. package/dist/components/syntax-highlighter/index.d.ts +6 -0
  6. package/dist/components/syntax-highlighter/index.js +37 -0
  7. package/dist/components/typography/Paragraph.d.ts +7 -0
  8. package/dist/components/typography/Paragraph.js +9 -0
  9. package/dist/components/typography/Title.d.ts +4 -0
  10. package/dist/components/typography/Title.js +11 -0
  11. package/dist/components/typography/Types.d.ts +7 -0
  12. package/dist/components/typography/Types.js +1 -0
  13. package/dist/components/typography/index.d.ts +10 -0
  14. package/dist/components/typography/index.js +9 -0
  15. package/dist/index.d.ts +6 -2
  16. package/dist/index.js +6 -2
  17. package/dist/libs/styles/ar-core.css +15 -7
  18. package/dist/libs/styles/button/core/shape.css +2 -10
  19. package/dist/libs/styles/menu/core/core.css +0 -2
  20. package/dist/libs/styles/menu/core/selected.css +7 -2
  21. package/dist/libs/styles/syntax-highlighter/core/core.css +20 -0
  22. package/dist/libs/styles/syntax-highlighter/core/jsx.template.css +65 -0
  23. package/dist/libs/styles/syntax-highlighter/syntax-highlighter.css +2 -0
  24. package/dist/libs/styles/typography/paragraph/align.css +9 -0
  25. package/dist/libs/styles/typography/title/align.css +9 -0
  26. package/dist/libs/styles/typography/title/size.css +31 -0
  27. package/dist/libs/styles/typography/typography.css +3 -0
  28. package/package.json +9 -3
@@ -0,0 +1,7 @@
1
+ declare class Compiler {
2
+ _code: React.RefObject<HTMLElement>;
3
+ private _attributesCount;
4
+ constructor(code: React.RefObject<HTMLElement>);
5
+ Jsx: (elements: string[]) => void;
6
+ }
7
+ export default Compiler;
@@ -0,0 +1,86 @@
1
+ class Compiler {
2
+ _code;
3
+ _attributesCount = 0;
4
+ constructor(code) {
5
+ this._code = code;
6
+ }
7
+ Jsx = (elements) => {
8
+ elements.forEach((element) => {
9
+ // Open Tag
10
+ element = element.replace(/\[open\](.*?)\[\/open\]/g, (_, p1, p2) => {
11
+ return `<span>${p1 ?? p2}</span>`;
12
+ });
13
+ // Close Tag
14
+ const closeRegex = /\[close\](.*?)\[\/close\]|\[close-slash\](.*?)\[\/close-slash\]/g;
15
+ element = element.replace(closeRegex, (_, p1) => {
16
+ return `<span>${p1}</span>`;
17
+ });
18
+ // Tag
19
+ element = element.replace(/\[tag\](.*?)\[\/tag\]/g, (_, p1) => {
20
+ return `<span class="ar-jsx-tag">${p1}</span>`;
21
+ });
22
+ // React Custom Tag
23
+ element = element.replace(/\[react-tag\](.*?)\[\/react-tag\]/g, (_, p1) => {
24
+ return `<span class="ar-jsx-custom-tag">${p1}</span>`;
25
+ });
26
+ // Attributes
27
+ element = element.replace(/\[attributes\](.*?)\[\/attributes\]/g, (_, p1) => {
28
+ let _className = "ar-jsx-attributes";
29
+ this._attributesCount = Number(_.match(/=/g)?.length);
30
+ if (this._attributesCount >= 5)
31
+ _className += " type-column";
32
+ return `<span class="${_className}">${p1}</span>`;
33
+ });
34
+ // Attribute
35
+ element = element.replace(/\[attribute\](.*?)\[\/attribute\]/g, (_, p1) => {
36
+ return `<span class="ar-jsx-attribute">${p1}</span>`;
37
+ });
38
+ // Child Attribute
39
+ element = element.replace(/\[child-attribute\](.*?)\[\/child-attribute\]/g, (_, p1) => {
40
+ return `<span class="ar-jsx-attribute">${p1}</span>`;
41
+ });
42
+ // Attribute Key
43
+ element = element.replace(/\[attribute-key\](.*?)\[\/attribute-key\]/g, (_, p1) => {
44
+ return `<span class="ar-jsx-attribute-key">${p1}</span>`;
45
+ });
46
+ // Equal "="
47
+ element = element.replace(/\[equal\](.*?)\[\/equal\]/g, (_, p1) => {
48
+ return `<span>${p1}</span>`;
49
+ });
50
+ // Colon ":"
51
+ element = element.replace(/\[colon\](.*?)\[\/colon\]/g, (_, p1) => {
52
+ return `<span>${p1}</span>`;
53
+ });
54
+ // Attributes Values
55
+ element = element.replace(/\[string\](.*?)\[\/string\]/g, (_, p1) => {
56
+ return `<span class="ar-jsx-string-value">"${p1}"</span>`;
57
+ });
58
+ // Number
59
+ element = element.replace(/\[number\](.*?)\[\/number\]/g, (_, p1) => {
60
+ return `<span class="ar-jsx-number-value">${p1}</span>`;
61
+ });
62
+ // Boolean
63
+ element = element.replace(/\[boolean\](.*?)\[\/boolean\]/g, (_, p1) => {
64
+ return `<span class="ar-jsx-boolean-value"><span>{</span>${p1}<span>}</span></span>`;
65
+ });
66
+ // Object
67
+ element = element.replace(/\[object\](.*?)\[\/object\]/g, (_, p1) => {
68
+ let _className = "ar-jsx-object-value";
69
+ let _lineBreakSpaces = " ";
70
+ if (this._attributesCount >= 5) {
71
+ _className += " type-column";
72
+ _lineBreakSpaces = "";
73
+ }
74
+ return `<span class='ar-jsx-curly-brackets'>{{${_lineBreakSpaces}</span><span class="${_className}">${p1}</span><span class='ar-jsx-curly-brackets'>${_lineBreakSpaces}}}</span>`;
75
+ });
76
+ // Open Child Curly Bracket "{"
77
+ element = element.replace(/\[curly-bracket<\]/g, "<span class='ar-jsx-child-curly-bracket'>{</span>");
78
+ // Close Child Curly Bracket "}"
79
+ element = element.replace(/\[curly-bracket>\]/g, "<span class='ar-jsx-child-curly-bracket'>}</span>");
80
+ element = element.replace(/\[comma\]/g, "<span class='ar-jsx-comma'>,</span>");
81
+ if (this._code.current)
82
+ this._code.current.innerHTML += `<span class="ar-jsx-language">${element}</span>`;
83
+ });
84
+ };
85
+ }
86
+ export default Compiler;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ declare class Parser {
3
+ _setElements: React.Dispatch<React.SetStateAction<string[]>>;
4
+ private _lineBreakSpaces;
5
+ constructor(setElements: React.Dispatch<React.SetStateAction<string[]>>);
6
+ JsxToString: (child: React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>>, subChilde?: boolean, indentLevel?: number) => string | undefined;
7
+ private HandleEntries;
8
+ private FormatAttributeValue;
9
+ }
10
+ export default Parser;
@@ -0,0 +1,89 @@
1
+ import React from "react";
2
+ class Parser {
3
+ // Public
4
+ _setElements;
5
+ // Private
6
+ _lineBreakSpaces = 4;
7
+ constructor(setElements) {
8
+ this._setElements = setElements;
9
+ }
10
+ JsxToString = (child, subChilde = false, indentLevel = 0) => {
11
+ if (!child)
12
+ return;
13
+ const componentType = typeof child.type === "function" ? child.type.name : child.type;
14
+ let componentContent = child.props.children;
15
+ // İndent seviyesi için boşlukları ekle.
16
+ const indent = " ".repeat(indentLevel);
17
+ // Eğer `br` elementi ise işlemi sonlandır
18
+ if (componentType === "br")
19
+ return;
20
+ const attributes = Object.keys(child.props).filter((key) => key !== "children");
21
+ const attributesLength = attributes.length;
22
+ const attributesList = attributes
23
+ .map((key) => this.FormatAttributeValue(key, child.props[key]))
24
+ .join(" ");
25
+ const formattedTag = componentType[0].toUpperCase() === componentType[0]
26
+ ? `[react-tag]${componentType}[/react-tag]`
27
+ : componentType;
28
+ const formattedAttributes = attributesLength > 0 ? ` [attributes]${attributesList}[/attributes]` : "";
29
+ // Eğer gelen iç eleman bir nesneyse yeniden yapılan.
30
+ if (React.isValidElement(componentContent)) {
31
+ // İç içe tek bir çocuk eleman varsa recursive olarak işlemeye devam et
32
+ componentContent = `\n${this.JsxToString(componentContent, true, indentLevel + 1)}\n`;
33
+ }
34
+ else if (Array.isArray(componentContent)) {
35
+ // Eğer birden fazla çocuk varsa hepsini işle
36
+ componentContent = componentContent
37
+ .map((contentChild) => this.JsxToString(contentChild, true))
38
+ .join(`\n${indent}`);
39
+ }
40
+ else if (typeof componentContent === "string") {
41
+ // Eğer metin içeriği varsa, trimle
42
+ componentContent = componentContent.trim();
43
+ }
44
+ componentContent =
45
+ attributesLength >= this._lineBreakSpaces ? `\n ${componentContent}\n` : componentContent;
46
+ const renderElement = componentContent
47
+ ? `${indent}[open]&lt;[/open][tag]${formattedTag}[/tag]${formattedAttributes}[close]>[/close]${componentContent}${indent}[open]&lt;/[/open][tag]${formattedTag}[/tag][close]>[/close]`
48
+ : `${indent}[open]&lt;[/open][tag]${formattedTag}[/tag]${formattedAttributes} [close]/&gt;[/close]`;
49
+ !subChilde && this._setElements((prevElements) => [...prevElements, renderElement]);
50
+ return renderElement;
51
+ };
52
+ HandleEntries = (propValue) => {
53
+ if (propValue && typeof propValue === "object") {
54
+ return `[curly-bracket<] ${Object.entries(propValue)
55
+ .map(([key, value]) => `[attribute-key]${key}[/attribute-key][colon]:[/colon] ${this.HandleEntries(value)}`)
56
+ .join(", ")} [curly-bracket>]`;
57
+ }
58
+ return typeof propValue === "number"
59
+ ? `[number]${propValue}[/number]`
60
+ : `[string]${propValue}[/string]`;
61
+ };
62
+ FormatAttributeValue = (key, value) => {
63
+ let result = "";
64
+ switch (typeof value) {
65
+ case "number":
66
+ result = `[number]${value}[/number]`;
67
+ break;
68
+ case "string":
69
+ result = `[string]${value}[/string]`;
70
+ break;
71
+ case "boolean":
72
+ result = `[boolean]${value}[/boolean]`;
73
+ break;
74
+ case "object":
75
+ const entries = Object.entries(value)
76
+ .map(([subKey, subValue]) => `[child-attribute][attribute-key]${subKey}[/attribute-key][colon]:[/colon] ${this.HandleEntries(subValue)}, [/child-attribute]`)
77
+ .join("");
78
+ result = `[object]${entries}[/object]`;
79
+ break;
80
+ case "function":
81
+ result = `[function][/function]`;
82
+ break;
83
+ default:
84
+ return "";
85
+ }
86
+ return `[attribute][attribute-key]${key}[/attribute-key][equal]=[/equal]${result}[/attribute]`;
87
+ };
88
+ }
89
+ export default Parser;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import "../../libs/styles/syntax-highlighter/syntax-highlighter.css";
3
+ declare const SyntaxHighlighter: React.FC<{
4
+ children: React.ReactNode;
5
+ }>;
6
+ export default SyntaxHighlighter;
@@ -0,0 +1,37 @@
1
+ import React, { useEffect, useRef, useState } from "react";
2
+ import "../../libs/styles/syntax-highlighter/syntax-highlighter.css";
3
+ import Parser from "./classes/Parser";
4
+ import Compiler from "./classes/Compiler";
5
+ const SyntaxHighlighter = ({ children }) => {
6
+ // refs
7
+ const _div = useRef(null);
8
+ const _code = useRef(null);
9
+ // states
10
+ const [elements, setElements] = useState([]);
11
+ // classes
12
+ const parser = new Parser(setElements);
13
+ const compiler = new Compiler(_code);
14
+ // useEffects
15
+ useEffect(() => {
16
+ // Clear...
17
+ setElements([]);
18
+ if (_code.current)
19
+ _code.current.innerHTML = "";
20
+ // Fill...
21
+ React.Children.forEach(children, (child) => {
22
+ if (React.isValidElement(child))
23
+ parser.JsxToString(child);
24
+ });
25
+ }, [children]);
26
+ useEffect(() => {
27
+ if (elements.length === 0)
28
+ return;
29
+ compiler.Jsx(elements);
30
+ }, [elements]);
31
+ return (React.createElement(React.Fragment, null,
32
+ React.createElement("div", { className: "ar-syntax" },
33
+ React.createElement("div", { ref: _div, className: "preview" }, children),
34
+ React.createElement("pre", { className: "pre" },
35
+ React.createElement("code", { ref: _code })))));
36
+ };
37
+ export default SyntaxHighlighter;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const Paragraph: React.FC<{
3
+ children: string;
4
+ align?: "left" | "center" | "right";
5
+ upperCase?: boolean;
6
+ }>;
7
+ export default Paragraph;
@@ -0,0 +1,9 @@
1
+ import React, { useRef } from "react";
2
+ const Paragraph = ({ children, align = "left", upperCase = false, }) => {
3
+ // refs
4
+ let _className = useRef("ar-typography-paragraph").current;
5
+ if (align)
6
+ _className += ` ${align}`;
7
+ return React.createElement("p", { className: _className }, upperCase ? children.toLocaleUpperCase() : children);
8
+ };
9
+ export default Paragraph;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { TitleProps } from "./Types";
3
+ declare const Title: React.FC<TitleProps>;
4
+ export default Title;
@@ -0,0 +1,11 @@
1
+ import React, { useRef } from "react";
2
+ const Title = ({ children, Level, align = "left", size, upperCase = false }) => {
3
+ // refs
4
+ let _className = useRef("ar-typography-title").current;
5
+ if (align)
6
+ _className += ` ${align}`;
7
+ if (size)
8
+ _className += ` ${size}`;
9
+ return React.createElement(Level, { className: _className }, upperCase ? children.toLocaleUpperCase() : children);
10
+ };
11
+ export default Title;
@@ -0,0 +1,7 @@
1
+ export type TitleProps = {
2
+ children: string;
3
+ Level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
4
+ align?: "left" | "center" | "right";
5
+ size?: "xx-small" | "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large" | "xxx-large" | "smaller" | "larger";
6
+ upperCase?: boolean;
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import "../../libs/styles/typography/typography.css";
2
+ declare const Typography: {
3
+ Title: import("react").FC<import("./Types").TitleProps>;
4
+ Paragraph: import("react").FC<{
5
+ children: string;
6
+ align?: "left" | "center" | "right";
7
+ upperCase?: boolean;
8
+ }>;
9
+ };
10
+ export default Typography;
@@ -0,0 +1,9 @@
1
+ import Paragraph from "./Paragraph";
2
+ import Title from "./Title";
3
+ import "../../libs/styles/typography/typography.css";
4
+ // @@Export
5
+ const Typography = {
6
+ Title,
7
+ Paragraph,
8
+ };
9
+ export default Typography;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import "./libs/styles/ar-core.css";
2
2
  import Button from "./components/button";
3
3
  export { Button };
4
- import Divider from "./components/divider";
5
- export { Divider };
6
4
  import Menu from "./components/menu";
7
5
  export { Menu };
6
+ import Typography from "./components/typography";
7
+ export { Typography };
8
+ import SyntaxHighlighter from "./components/syntax-highlighter";
9
+ export { SyntaxHighlighter };
10
+ import Divider from "./components/divider";
11
+ export { Divider };
8
12
  import type { MenuProps } from "./components/menu/Types";
9
13
  export type { MenuProps };
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  import "./libs/styles/ar-core.css";
2
2
  import Button from "./components/button";
3
3
  export { Button };
4
- import Divider from "./components/divider";
5
- export { Divider };
6
4
  import Menu from "./components/menu";
7
5
  export { Menu };
6
+ import Typography from "./components/typography";
7
+ export { Typography };
8
+ import SyntaxHighlighter from "./components/syntax-highlighter";
9
+ export { SyntaxHighlighter };
10
+ import Divider from "./components/divider";
11
+ export { Divider };
@@ -25,15 +25,12 @@
25
25
  --primary: #007bff;
26
26
  --primary-active: #005abb;
27
27
  --primary-rgb: 0, 123, 255;
28
- /* --primary-font: #004a99; */
29
28
  --secondary: #6c757d;
30
29
  --secondary-active: #495055;
31
30
  --secondary-rgb: 108, 117, 125;
32
- /* --secondary-font: #40454a; */
33
31
  --success: #28a745;
34
32
  --success-active: #1c7a32;
35
33
  --success-rgb: 40, 167, 69;
36
- /* --success-font: #176027; */
37
34
  --warning: #ffc107;
38
35
  --warning-active: #cf9c05;
39
36
  --warning-rgb: 255, 193, 7;
@@ -41,19 +38,30 @@
41
38
  --danger: #dc3545;
42
39
  --danger-active: #af2936;
43
40
  --danger-rgb: 220, 53, 69;
44
- /* --danger-font: #a22531; */
45
41
  --information: #17a2b8;
46
42
  --information-active: #107c8c;
47
43
  --information-rgb: 23, 162, 184;
48
- /* --info-font: #0b5460; */
49
44
  --light: #f8f9fa;
50
45
  --light-active: #a0a1a3;
51
46
  --light-rgb: 248, 249, 250;
52
- /* --light-font: var(--gray-300); */
53
47
  --dark: #343a40;
54
48
  --dark-active: #23272b;
55
49
  --dark-rgb: 52, 58, 64;
56
- /* --dark-font: var(--gray-800); */
50
+ }
51
+
52
+ /* Code Editor */
53
+ :root {
54
+ --bg-color: #282c34;
55
+ --color: #abb2bf;
56
+ --tag-color: #679ad1;
57
+ --custom-tag-color: #6fc2ae;
58
+ --attribute-key-color: #a9d9f9;
59
+ --string-value-color: #c5947c;
60
+ --number-value-color: #bacdab;
61
+ --boolean-value-color: #57b0fe;
62
+ --object-value-color: #57b0fe;
63
+ --curly-bracket-color: #e4e49c;
64
+ --child-curly-bracket-color: #df6ed2;
57
65
  }
58
66
  /* #endregion */
59
67
  /* Color Palette */
@@ -1,15 +1,7 @@
1
1
  .ar-button.ar-button-shape {
2
- display: -webkit-box;
3
- display: -ms-flexbox;
4
- display: flex;
5
- -webkit-box-pack: center;
6
- -ms-flex-pack: center;
7
- justify-content: center;
8
- -webkit-box-align: center;
9
- -ms-flex-align: center;
10
2
  align-items: center;
11
- min-width: 2rem;
12
- min-height: 2rem;
3
+ width: 2rem;
4
+ height: 2rem;
13
5
  padding: 0 !important;
14
6
  }
15
7
  .ar-button.ar-button-shape.circle {
@@ -16,7 +16,6 @@
16
16
  margin-left: 0.5rem;
17
17
  padding-left: 0.5rem;
18
18
  }
19
-
20
19
  .ar-menu > .ar-menu-list {
21
20
  display: flex;
22
21
  }
@@ -24,7 +23,6 @@
24
23
  display: flex;
25
24
  align-items: center;
26
25
  height: 2.5rem;
27
- border-radius: var(--border-radius-lg);
28
26
  padding-left: 1rem;
29
27
  user-select: none;
30
28
  }
@@ -1,13 +1,18 @@
1
1
  .ar-menu .ar-menu-list-item.selected {
2
2
  background-color: rgba(var(--black-rgb), 0.03) !important;
3
+ border-top-left-radius: var(--border-radius-lg);
4
+ border-bottom-left-radius: var(--border-radius-lg);
3
5
  }
6
+
4
7
  /* SubMenu */
5
8
  .ar-menu .ar-menu-list-item-group-item.selected {
6
9
  background-color: rgba(var(--black-rgb), 0.03) !important;
7
- /* margin-top: 1rem; */
8
- border-radius: var(--border-radius-lg);
10
+ border-top-left-radius: var(--border-radius-lg);
11
+ border-bottom-left-radius: var(--border-radius-lg);
9
12
  }
10
13
  .ar-menu .ar-menu-list-item-group-item-title.selected {
11
14
  background-color: rgba(var(--red-rgb), 0.1) !important;
15
+ border-top-left-radius: var(--border-radius-lg);
16
+ border-bottom-left-radius: var(--border-radius-lg);
12
17
  color: var(--red);
13
18
  }
@@ -0,0 +1,20 @@
1
+ .ar-syntax {
2
+ border-radius: var(--border-radius-lg);
3
+ box-shadow: 0 0 15px 5px rgba(var(--black-rgb), 0.25);
4
+ overflow: hidden;
5
+ }
6
+ .ar-syntax > .preview {
7
+ background-color: var(--white);
8
+ padding: 1rem;
9
+ }
10
+ .ar-syntax > .pre {
11
+ background-color: var(--bg-color);
12
+ margin: 0;
13
+ padding: 1rem;
14
+ overflow-x: auto;
15
+ }
16
+ .ar-syntax > .pre > code {
17
+ display: flex;
18
+ flex-direction: column;
19
+ gap: 0.5rem 0;
20
+ }
@@ -0,0 +1,65 @@
1
+ .ar-jsx-language {
2
+ color: var(--color);
3
+ }
4
+ .ar-jsx-language > .ar-jsx-tag {
5
+ color: var(--tag-color);
6
+ }
7
+ .ar-jsx-language > .ar-jsx-tag > .ar-jsx-custom-tag {
8
+ color: var(--custom-tag-color);
9
+ }
10
+
11
+ .ar-jsx-language > .ar-jsx-attributes > .ar-jsx-attribute {
12
+ }
13
+ .ar-jsx-language > .ar-jsx-attributes > .ar-jsx-attribute > .ar-jsx-curly-brackets {
14
+ color: var(--curly-bracket-color);
15
+ }
16
+ .ar-jsx-language > .ar-jsx-attributes > .ar-jsx-attribute > span:not([class]) {
17
+ }
18
+ .ar-jsx-language > .ar-jsx-attributes.type-column,
19
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-object-value.type-column {
20
+ display: flex;
21
+ flex-direction: column;
22
+ margin-left: 1rem;
23
+ }
24
+
25
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-attribute-key {
26
+ color: var(--attribute-key-color);
27
+ }
28
+
29
+ /* String Value */
30
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-string-value {
31
+ color: var(--string-value-color);
32
+ }
33
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-number-value {
34
+ color: var(--number-value-color);
35
+ }
36
+
37
+ /* Boolean Value */
38
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-boolean-value {
39
+ color: var(--boolean-value-color);
40
+ }
41
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-boolean-value > span:not([class]) {
42
+ color: var(--curly-bracket-color);
43
+ }
44
+
45
+ /* Object Value */
46
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-object-value {
47
+ color: var(--object-value-color);
48
+ }
49
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-object-value > .ar-jsx-comma {
50
+ color: var(--object-value-color);
51
+ }
52
+
53
+ .ar-jsx-language
54
+ > .ar-jsx-attributes
55
+ .ar-jsx-object-value
56
+ > .ar-jsx-attribute
57
+ > .ar-jsx-child-curly-bracket {
58
+ color: var(--child-curly-bracket-color);
59
+ }
60
+ .ar-jsx-language > .ar-jsx-attributes .ar-jsx-object-value.type-column {
61
+ /* background-color: black;
62
+ width: fit-content;
63
+ padding: 0.5rem;
64
+ border-radius: var(--border-radius-lg); */
65
+ }
@@ -0,0 +1,2 @@
1
+ @import url("./core/core.css");
2
+ @import url("./core/jsx.template.css");
@@ -0,0 +1,9 @@
1
+ .ar-typography-paragraph.left {
2
+ text-align: left;
3
+ }
4
+ .ar-typography-paragraph.center {
5
+ text-align: center;
6
+ }
7
+ .ar-typography-paragraph.right {
8
+ text-align: right;
9
+ }
@@ -0,0 +1,9 @@
1
+ .ar-typography-title.left {
2
+ text-align: left;
3
+ }
4
+ .ar-typography-title.center {
5
+ text-align: center;
6
+ }
7
+ .ar-typography-title.right {
8
+ text-align: right;
9
+ }
@@ -0,0 +1,31 @@
1
+ .ar-typography-title.xx-small {
2
+ font-size: 0.8rem; /* 12.8px (0.8 * 16) */
3
+ }
4
+ .ar-typography-title.x-small {
5
+ font-size: 1rem; /* 16px */
6
+ }
7
+ .ar-typography-title.small {
8
+ font-size: 1.3rem; /* 20.8px (1.3 * 16) */
9
+ }
10
+ .ar-typography-title.medium {
11
+ font-size: 1.6rem; /* 25.6px (1.6 * 16) */
12
+ }
13
+ .ar-typography-title.large {
14
+ font-size: 2rem; /* 32px (2 * 16) */
15
+ }
16
+ .ar-typography-title.x-large {
17
+ font-size: 2.5rem; /* 40px (2.5 * 16) */
18
+ }
19
+ .ar-typography-title.xx-large {
20
+ font-size: 3rem; /* 48px (3 * 16) */
21
+ }
22
+ .ar-typography-title.xxx-large {
23
+ font-size: 4rem; /* 64px (4 * 16) */
24
+ }
25
+
26
+ .ar-typography-title.smaller {
27
+ font-size: smaller;
28
+ }
29
+ .ar-typography-title.larger {
30
+ font-size: larger;
31
+ }
@@ -0,0 +1,3 @@
1
+ @import url("./title/align.css");
2
+ @import url("./title/size.css");
3
+ @import url("./paragraph/align.css");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,10 +8,16 @@
8
8
  "dist"
9
9
  ],
10
10
  "scripts": {
11
- "build": "rm -rf dist/ && npm run build:esm && npm run build:post-mac",
11
+ "build": "rm -rf dist/ && npm run build:post-mac && npm run build:esm",
12
+ "build:post-mac": "npm run mkdir:esm && npm run copy:esm",
13
+ "mkdir:esm": "mkdir -p dist/libs/styles",
14
+ "copy:esm": "cp -r ./src/libs/styles dist/libs/",
12
15
  "build:esm": "tsc",
16
+ "mv:esm": "for ext in js ts; do mv ./dist/esm/*.$ext ./dist/; done",
17
+ "mkdir:cjs": "mkdir -p dist/cjs/libs/styles",
18
+ "copy:cjs": "cp -r ./src/libs/styles dist/cjs/libs/",
13
19
  "build:cjs": "tsc --module commonjs --outdir dist/cjs",
14
- "build:post-mac": "mkdir -p dist/libs/styles && cp -r ./src/libs/styles dist/libs/"
20
+ "mv:cjs": "for ext in js ts; do mv ./dist/cjs/*.$ext ./dist/; done"
15
21
  },
16
22
  "repository": {
17
23
  "type": "git",