@yakad/ui 1.3.98 → 1.3.100

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/Text/Text.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __rest = (this && this.__rest) || function (s, e) {
3
2
  var t = {};
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -10,66 +9,61 @@ var __rest = (this && this.__rest) || function (s, e) {
10
9
  }
11
10
  return t;
12
11
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Text = exports.Span = exports.P = exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = void 0;
18
- const jsx_runtime_1 = require("react/jsx-runtime");
19
- const react_1 = require("react");
20
- const classnames_1 = __importDefault(require("classnames"));
21
- const Text_module_css_1 = __importDefault(require("./Text.module.css"));
22
- exports.H1 = (0, react_1.forwardRef)((_a, ref) => {
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { forwardRef } from "react";
14
+ import classNames from "classnames";
15
+ import styles from "./Text.module.css";
16
+ export const H1 = forwardRef((_a, ref) => {
23
17
  var { variant = "heading1", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
24
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
25
- return ((0, jsx_runtime_1.jsx)("h1", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
18
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
19
+ return (_jsx("h1", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
26
20
  });
27
- exports.H1.displayName = "H1";
28
- exports.H2 = (0, react_1.forwardRef)((_a, ref) => {
21
+ H1.displayName = "H1";
22
+ export const H2 = forwardRef((_a, ref) => {
29
23
  var { variant = "heading2", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
30
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
31
- return ((0, jsx_runtime_1.jsx)("h2", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
24
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
25
+ return (_jsx("h2", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
32
26
  });
33
- exports.H2.displayName = "H2";
34
- exports.H3 = (0, react_1.forwardRef)((_a, ref) => {
27
+ H2.displayName = "H2";
28
+ export const H3 = forwardRef((_a, ref) => {
35
29
  var { variant = "heading3", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
36
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
37
- return ((0, jsx_runtime_1.jsx)("h3", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
30
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
31
+ return (_jsx("h3", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
38
32
  });
39
- exports.H3.displayName = "H3";
40
- exports.H4 = (0, react_1.forwardRef)((_a, ref) => {
33
+ H3.displayName = "H3";
34
+ export const H4 = forwardRef((_a, ref) => {
41
35
  var { variant = "heading4", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
42
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
43
- return ((0, jsx_runtime_1.jsx)("h4", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
36
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
37
+ return (_jsx("h4", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
44
38
  });
45
- exports.H4.displayName = "H4";
46
- exports.H5 = (0, react_1.forwardRef)((_a, ref) => {
39
+ H4.displayName = "H4";
40
+ export const H5 = forwardRef((_a, ref) => {
47
41
  var { variant = "heading5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
48
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
49
- return ((0, jsx_runtime_1.jsx)("h5", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
42
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
43
+ return (_jsx("h5", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
50
44
  });
51
- exports.H5.displayName = "H5";
52
- exports.H6 = (0, react_1.forwardRef)((_a, ref) => {
45
+ H5.displayName = "H5";
46
+ export const H6 = forwardRef((_a, ref) => {
53
47
  var { variant = "heading6", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
54
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
55
- return ((0, jsx_runtime_1.jsx)("h6", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
48
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
49
+ return (_jsx("h6", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
56
50
  });
57
- exports.H6.displayName = "H6";
58
- exports.P = (0, react_1.forwardRef)((_a, ref) => {
51
+ H6.displayName = "H6";
52
+ export const P = forwardRef((_a, ref) => {
59
53
  var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
60
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
61
- return ((0, jsx_runtime_1.jsx)("p", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
54
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
55
+ return (_jsx("p", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
62
56
  });
63
- exports.P.displayName = "P";
64
- exports.Span = (0, react_1.forwardRef)((_a, ref) => {
57
+ P.displayName = "P";
58
+ export const Span = forwardRef((_a, ref) => {
65
59
  var { variant = "span", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
66
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default.text, Text_module_css_1.default[variant], className);
67
- return ((0, jsx_runtime_1.jsx)("span", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
60
+ const joinedClassNames = classNames(styles.text, styles[variant], className);
61
+ return (_jsx("span", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
68
62
  });
69
- exports.Span.displayName = "Span";
70
- exports.Text = (0, react_1.forwardRef)((_a, ref) => {
63
+ Span.displayName = "Span";
64
+ export const Text = forwardRef((_a, ref) => {
71
65
  var { variant = "body5", className, children } = _a, restProps = __rest(_a, ["variant", "className", "children"]);
72
- const joinedClassNames = (0, classnames_1.default)(Text_module_css_1.default[variant], className);
73
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
66
+ const joinedClassNames = classNames(styles[variant], className);
67
+ return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
74
68
  });
75
- exports.Text.displayName = "Text";
69
+ Text.displayName = "Text";
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import "./globals.css";
2
3
  export type DarkStyle = "light" | "dark" | "system";
3
4
  export type ThemeColor = "green" | "red" | "yellow" | "blue" | "purple";
4
5
  export interface ThemeProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -1,5 +1,3 @@
1
- "use client";
2
- "use strict";
3
1
  var __rest = (this && this.__rest) || function (s, e) {
4
2
  var t = {};
5
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -11,23 +9,19 @@ var __rest = (this && this.__rest) || function (s, e) {
11
9
  }
12
10
  return t;
13
11
  };
14
- var __importDefault = (this && this.__importDefault) || function (mod) {
15
- return (mod && mod.__esModule) ? mod : { "default": mod };
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.Theme = void 0;
19
- const jsx_runtime_1 = require("react/jsx-runtime");
20
- const react_1 = require("react");
21
- const classnames_1 = __importDefault(require("classnames"));
22
- const Theme_module_css_1 = __importDefault(require("./Theme.module.css"));
23
- const boxing_module_css_1 = __importDefault(require("../boxing.module.css"));
24
- exports.Theme = (0, react_1.forwardRef)((_a, ref) => {
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { forwardRef, useEffect } from "react";
14
+ import classNames from "classnames";
15
+ import "./globals.css";
16
+ import styles from "./Theme.module.css";
17
+ import boxingStyles from "../boxing.module.css";
18
+ export const Theme = forwardRef((_a, ref) => {
25
19
  var { align, darkstyle = "system", color = "blue", zoom = 100, className, children } = _a, restProps = __rest(_a, ["align", "darkstyle", "color", "zoom", "className", "children"]);
26
20
  const zoomPercentage = zoom ? (zoom / 100) * 62.5 : 62.5;
27
- (0, react_1.useEffect)(() => {
21
+ useEffect(() => {
28
22
  document.documentElement.style.setProperty("font-size", zoomPercentage + "%");
29
23
  }, [zoomPercentage]);
30
- const joinedClassNames = (0, classnames_1.default)(boxing_module_css_1.default.flexColumnBox, { [boxing_module_css_1.default[align]]: align }, Theme_module_css_1.default.theme, Theme_module_css_1.default[darkstyle], Theme_module_css_1.default[color], className);
31
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
24
+ const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.theme, styles[darkstyle], styles[color], className);
25
+ return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
32
26
  });
33
- exports.Theme.displayName = "Theme";
27
+ Theme.displayName = "Theme";
package/dist/index.js CHANGED
@@ -1,53 +1,37 @@
1
- "use strict";
2
1
  // import "./globals.css";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
- };
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
2
  // Layout & Structure
19
- __exportStar(require("./Screen/Screen"), exports);
20
- __exportStar(require("./AppBar/AppBar"), exports);
21
- __exportStar(require("./Main/Main"), exports);
22
- __exportStar(require("./Footer/Footer"), exports);
23
- __exportStar(require("./Navigation/Navigation"), exports);
24
- __exportStar(require("./Container/Container"), exports);
25
- __exportStar(require("./Stack/Stack"), exports);
26
- __exportStar(require("./Row/Row"), exports);
27
- __exportStar(require("./GridContainer/GridContainer"), exports);
28
- __exportStar(require("./GridItem/GridItem"), exports);
29
- __exportStar(require("./Card/Card"), exports);
3
+ export * from "./Screen/Screen";
4
+ export * from "./AppBar/AppBar";
5
+ export * from "./Main/Main";
6
+ export * from "./Footer/Footer";
7
+ export * from "./Navigation/Navigation";
8
+ export * from "./Container/Container";
9
+ export * from "./Stack/Stack";
10
+ export * from "./Row/Row";
11
+ export * from "./GridContainer/GridContainer";
12
+ export * from "./GridItem/GridItem";
13
+ export * from "./Card/Card";
30
14
  // Theme & Styling
31
- __exportStar(require("./Theme/Theme"), exports);
32
- __exportStar(require("./Spacer/Spacer"), exports);
33
- __exportStar(require("./Hr/Hr"), exports);
15
+ export * from "./Theme/Theme";
16
+ export * from "./Spacer/Spacer";
17
+ export * from "./Hr/Hr";
34
18
  // UI Components
35
- __exportStar(require("./List/List"), exports);
36
- __exportStar(require("./ListItem/ListItem"), exports);
37
- __exportStar(require("./Table/Table"), exports);
38
- __exportStar(require("./Button/Button"), exports);
39
- __exportStar(require("./LoadingIcon/LoadingIcon"), exports);
40
- __exportStar(require("./SvgIcon/SvgIcon"), exports);
41
- __exportStar(require("./Text/Text"), exports);
19
+ export * from "./List/List";
20
+ export * from "./ListItem/ListItem";
21
+ export * from "./Table/Table";
22
+ export * from "./Button/Button";
23
+ export * from "./LoadingIcon/LoadingIcon";
24
+ export * from "./SvgIcon/SvgIcon";
25
+ export * from "./Text/Text";
42
26
  // Form Components
43
- __exportStar(require("./Form/Form"), exports);
44
- __exportStar(require("./InputField/InputField"), exports);
45
- __exportStar(require("./Select/Select"), exports);
46
- __exportStar(require("./CheckBox/CheckBox"), exports);
47
- __exportStar(require("./CodeField/CodeField"), exports);
48
- __exportStar(require("./RadioGroup/RadioGroup"), exports);
49
- __exportStar(require("./RadioButton/RadioButton"), exports);
50
- __exportStar(require("./CodeBox/CodeBox"), exports);
27
+ export * from "./Form/Form";
28
+ export * from "./InputField/InputField";
29
+ export * from "./Select/Select";
30
+ export * from "./CheckBox/CheckBox";
31
+ export * from "./CodeField/CodeField";
32
+ export * from "./RadioGroup/RadioGroup";
33
+ export * from "./RadioButton/RadioButton";
34
+ export * from "./CodeBox/CodeBox";
51
35
  // Utilities
52
- __exportStar(require("./Display/Display"), exports);
53
- __exportStar(require("./ClickOutsideListener/ClickOutsideListener"), exports);
36
+ export * from "./Display/Display";
37
+ export * from "./ClickOutsideListener/ClickOutsideListener";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.3.98",
3
+ "version": "1.3.100",
4
4
  "private": false,
5
5
  "author": "Natiq",
6
6
  "description": "UI components for NextJS/React",
@@ -31,11 +31,10 @@
31
31
  "typecheck": "tsc --noEmit",
32
32
  "lint": "eslint src/**/*.{ts,tsx}",
33
33
  "test": "echo \"No tests specified\" && exit 0",
34
- "i:symbols": "npm install @yakad/symbols",
35
- "prepublishOnly": "npm run i:symbols && npm run build && npm run test && npm run lint && npm run typecheck && npm version patch"
34
+ "prepublishOnly": "npm run build && npm run test && npm run lint && npm run typecheck && npm version patch"
36
35
  },
37
36
  "dependencies": {
38
- "@yakad/symbols": "^1.0.25",
37
+ "@yakad/symbols": "1.0.25",
39
38
  "classnames": "2.5.1"
40
39
  },
41
40
  "peerDependencies": {
File without changes