@yakad/ui 1.3.110 → 1.3.112

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface AppBarProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  overflow?: "shrink" | "wrap" | "scroll";
5
5
  position?: "initial" | "sticky" | "scroll";
6
6
  size?: "xs" | "sm" | "md" | "lg" | "xl";
@@ -2,11 +2,11 @@
2
2
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
3
  size?: "small" | "medium" | "large";
4
4
  variant?: "text" | "outlined" | "filled" | "filledtonal" | "tonal" | "elevated" | "link" | "fab";
5
- borderstyle?: "none" | "semi" | "squircle" | "rounded";
5
+ borderStyle?: "none" | "semi" | "squircle" | "rounded";
6
6
  icon?: React.ReactNode;
7
- iconposition?: "start" | "end";
8
- loadingposition?: "auto" | "center";
9
- loadingvariant?: "scaleOut" | "dots" | "spinner";
7
+ iconPosition?: "start" | "end";
8
+ loadingPosition?: "auto" | "center";
9
+ loadingVariant?: "scaleOut" | "dots" | "spinner";
10
10
  children?: React.ReactNode;
11
11
  }
12
12
  export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -15,12 +15,12 @@ import classNames from "classnames";
15
15
  import { LoadingIcon } from "..";
16
16
  import styles from "./Button.module.css";
17
17
  export const Button = forwardRef((_a, ref) => {
18
- var { size = "medium", variant = "text", borderstyle = "rounded", icon, iconposition = "start", loadingposition = "auto", loadingvariant, className, children } = _a, restProps = __rest(_a, ["size", "variant", "borderstyle", "icon", "iconposition", "loadingposition", "loadingvariant", "className", "children"]);
19
- const childrenFirst = Boolean(iconposition === "end");
20
- const isLoadingPositionCenter = Boolean(!icon || loadingposition === "center");
21
- const joinedClassNames = classNames(styles.button, styles[variant], { [styles.loading]: loadingvariant }, { [styles.loadingPositionCenter]: isLoadingPositionCenter }, styles[size], styles[borderstyle], { [styles.iconButton]: !children && icon }, className);
22
- return (_jsxs("button", Object.assign({ ref: ref, className: joinedClassNames }, restProps, { children: [childrenFirst && children, loadingvariant && (_jsx("div", { className: classNames(styles.displayOnDisabled, {
18
+ var { size = "medium", variant = "text", borderStyle = "rounded", icon, iconPosition = "start", loadingPosition = "auto", loadingVariant, className, children } = _a, restProps = __rest(_a, ["size", "variant", "borderStyle", "icon", "iconPosition", "loadingPosition", "loadingVariant", "className", "children"]);
19
+ const childrenFirst = Boolean(iconPosition === "end");
20
+ const isLoadingPositionCenter = Boolean(!icon || loadingPosition === "center");
21
+ const joinedClassNames = classNames(styles.button, styles[variant], { [styles.loading]: loadingVariant }, { [styles.loadingPositionCenter]: isLoadingPositionCenter }, styles[size], styles[borderStyle], { [styles.iconButton]: !children && icon }, className);
22
+ return (_jsxs("button", Object.assign({ ref: ref, className: joinedClassNames }, restProps, { children: [childrenFirst && children, loadingVariant && (_jsx("div", { className: classNames(styles.displayOnDisabled, {
23
23
  [styles.positionCenter]: isLoadingPositionCenter,
24
- }), children: _jsx(LoadingIcon, { size: size, variant: loadingvariant }) })), icon, !childrenFirst && children] })));
24
+ }), children: _jsx(LoadingIcon, { size: size, variant: loadingVariant }) })), icon, !childrenFirst && children] })));
25
25
  });
26
26
  Button.displayName = "Button";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  blur?: boolean;
5
5
  children?: React.ReactNode;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface CodeBoxProps extends React.HTMLAttributes<HTMLDivElement> {
3
- copybutton?: boolean;
3
+ copyButton?: boolean;
4
4
  children?: React.ReactNode;
5
5
  }
6
6
  export declare const CodeBox: import("react").ForwardRefExoticComponent<CodeBoxProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -16,8 +16,8 @@ import { Symbol } from "@yakad/symbols";
16
16
  import { Button, Card } from "..";
17
17
  import styles from "./CodeBox.module.css";
18
18
  export const CodeBox = forwardRef((_a, ref) => {
19
- var { copybutton, className, children } = _a, restProps = __rest(_a, ["copybutton", "className", "children"]);
19
+ var { copyButton, className, children } = _a, restProps = __rest(_a, ["copyButton", "className", "children"]);
20
20
  const joinedClassNames = classNames("fullWidthLover", styles.ZZZZZZZZZZ, className);
21
- return (_jsxs(Card, Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: [_jsx("pre", { children: children }), copybutton && _jsx(Button, { icon: _jsx(Symbol, { icon: "copy_all" }) })] })));
21
+ return (_jsxs(Card, Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: [_jsx("pre", { children: children }), copyButton && _jsx(Button, { icon: _jsx(Symbol, { icon: "copy_all" }) })] })));
22
22
  });
23
23
  CodeBox.displayName = "CodeBox";
@@ -2,7 +2,7 @@
2
2
  type ExcludedTypes = "minLength" | "maxLength" | "type";
3
3
  export interface CodeFieldsProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedTypes> {
4
4
  length?: number;
5
- onfilled?: () => void;
5
+ onFilled?: () => void;
6
6
  children?: React.ReactNode;
7
7
  }
8
8
  export declare const CodeField: import("react").ForwardRefExoticComponent<CodeFieldsProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -31,11 +31,11 @@ function removeUnNumberChars(inputElement) {
31
31
  inputElement.value = inputElement.value.replace(/[^0-9]+/, "");
32
32
  }
33
33
  export const CodeField = forwardRef((_a, ref) => {
34
- var { length = 6, onfilled, autoComplete, pattern, onInput, className, style } = _a, restProps = __rest(_a, ["length", "onfilled", "autoComplete", "pattern", "onInput", "className", "style"]);
34
+ var { length = 6, onFilled, autoComplete, pattern, onInput, className, style } = _a, restProps = __rest(_a, ["length", "onFilled", "autoComplete", "pattern", "onInput", "className", "style"]);
35
35
  const joinedClassNames = classNames("fullWidthLover", styles.input, className);
36
36
  const joinedStyles = Object.assign(Object.assign({}, style), { width: `calc(1.5ch * ${length})` });
37
37
  return (_jsx("input", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, style: joinedStyles, type: "number", minLength: length, maxLength: length, autoComplete: autoComplete || "off", pattern: pattern || "[0-9]", onInput: (event) => {
38
- isInputFilled(event, length) && onfilled;
38
+ isInputFilled(event, length) && onFilled;
39
39
  onInput;
40
40
  } })));
41
41
  });
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  size?: "xs" | "sm" | "md" | "lg" | "xl";
5
5
  children?: React.ReactNode;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  overflow?: "shrink" | "wrap" | "scroll";
5
5
  position?: "initial" | "sticky" | "scroll";
6
6
  size?: "xs" | "sm" | "md" | "lg" | "xl";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface FormProps extends React.HTMLAttributes<HTMLFormElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  children?: React.ReactNode;
5
5
  }
6
6
  export declare const Form: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<HTMLFormElement>>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  type GridColumn = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3
3
  export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
4
- align?: "start" | "center" | "end";
4
+ align?: "start" | "space" | "center" | "end";
5
5
  xs?: GridColumn;
6
6
  sm?: GridColumn;
7
7
  md?: GridColumn;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
3
  variant?: "outlined" | "filled";
4
- boxsize?: "small" | "normal";
4
+ boxSize?: "small" | "normal";
5
5
  }
6
6
  export declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -14,8 +14,8 @@ import { forwardRef } from "react";
14
14
  import classNames from "classnames";
15
15
  import styles from "./InputField.module.css";
16
16
  export const InputField = forwardRef((_a, ref) => {
17
- var { variant = "outlined", boxsize = "normal", placeholder, className } = _a, restProps = __rest(_a, ["variant", "boxsize", "placeholder", "className"]);
18
- const joinedClassNames = classNames(styles.input, styles[variant], styles[boxsize], placeholder && styles.havePlaceHolder, className);
17
+ var { variant = "outlined", boxSize = "normal", placeholder, className } = _a, restProps = __rest(_a, ["variant", "boxSize", "placeholder", "className"]);
18
+ const joinedClassNames = classNames(styles.input, styles[variant], styles[boxSize], placeholder && styles.havePlaceHolder, className);
19
19
  return (_jsxs("div", { className: classNames("fullWidthLover", styles.div), children: [_jsx("input", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, placeholder: " " })), placeholder && (_jsx("label", { className: styles.label, children: placeholder }))] }));
20
20
  });
21
21
  InputField.displayName = "InputField";
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  export interface ListItemProps extends React.HTMLAttributes<HTMLLIElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  }
5
5
  export declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<HTMLLIElement>>;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export interface MainProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
4
- navopen?: boolean;
3
+ align?: "start" | "space" | "center" | "end";
4
+ navOpen?: boolean;
5
5
  children?: React.ReactNode;
6
6
  }
7
7
  export declare const Main: import("react").ForwardRefExoticComponent<MainProps & import("react").RefAttributes<HTMLDivElement>>;
package/dist/Main/Main.js CHANGED
@@ -15,8 +15,8 @@ import classNames from "classnames";
15
15
  import boxingStyles from "../boxing.module.css";
16
16
  import styles from "./Main.module.css";
17
17
  export const Main = forwardRef((_a, ref) => {
18
- var { align, navopen = false, className, children } = _a, restProps = __rest(_a, ["align", "navopen", "className", "children"]);
19
- const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.main, { [styles.navOpen]: navopen }, className);
18
+ var { align, navOpen = false, className, children } = _a, restProps = __rest(_a, ["align", "navOpen", "className", "children"]);
19
+ const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.main, { [styles.navOpen]: navOpen }, className);
20
20
  return (_jsx("main", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
21
21
  });
22
22
  Main.displayName = "Main";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface NavigationProps extends React.HTMLAttributes<HTMLElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  anchor?: "left" | "right" | "top" | "bottom" | "auto";
5
5
  open: boolean;
6
6
  children?: React.ReactNode;
@@ -3,7 +3,7 @@ type ExcludedTypes = "type" | "name" | "defaultValue" | "defaultChecked" | "chec
3
3
  export interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedTypes> {
4
4
  value: string | number;
5
5
  label?: string;
6
- datafromradiogroup?: {
6
+ dataFromRadioGroup?: {
7
7
  name: string;
8
8
  onSelect: () => void;
9
9
  checked: boolean;
@@ -17,17 +17,17 @@ import { Symbol } from "@yakad/symbols";
17
17
  import { Button } from "..";
18
18
  import styles from "./RadioButton.module.css";
19
19
  export const RadioButton = forwardRef((_a, ref) => {
20
- var { datafromradiogroup, label, onClick, className } = _a, restProps = __rest(_a, ["datafromradiogroup", "label", "onClick", "className"]);
20
+ var { dataFromRadioGroup, label, onClick, className } = _a, restProps = __rest(_a, ["dataFromRadioGroup", "label", "onClick", "className"]);
21
21
  const joinedClassNames = classNames(styles.radiobutton, {
22
22
  [styles.labeled]: label,
23
23
  className,
24
24
  });
25
25
  const onClickRadioButtonHandler = () => {
26
- datafromradiogroup === null || datafromradiogroup === void 0 ? void 0 : datafromradiogroup.onSelect();
26
+ dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.onSelect();
27
27
  onClick;
28
28
  };
29
- return (_jsxs("div", { className: joinedClassNames, children: [label && (_jsx("label", { className: styles.label, htmlFor: datafromradiogroup === null || datafromradiogroup === void 0 ? void 0 : datafromradiogroup.name, children: label })), _jsx(Button, { icon: _jsx(Symbol, { icon: (datafromradiogroup === null || datafromradiogroup === void 0 ? void 0 : datafromradiogroup.checked)
29
+ return (_jsxs("div", { className: joinedClassNames, children: [label && (_jsx("label", { className: styles.label, htmlFor: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.name, children: label })), _jsx(Button, { icon: _jsx(Symbol, { icon: (dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.checked)
30
30
  ? "radio_button_checked"
31
- : "radio_button_unchecked" }), onClick: onClickRadioButtonHandler, disabled: restProps.disabled }), _jsx("input", Object.assign({ ref: ref }, restProps, { className: styles.input, type: "radio", name: datafromradiogroup === null || datafromradiogroup === void 0 ? void 0 : datafromradiogroup.name, checked: datafromradiogroup === null || datafromradiogroup === void 0 ? void 0 : datafromradiogroup.checked }))] }));
31
+ : "radio_button_unchecked" }), onClick: onClickRadioButtonHandler, disabled: restProps.disabled }), _jsx("input", Object.assign({ ref: ref }, restProps, { className: styles.input, type: "radio", name: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.name, checked: dataFromRadioGroup === null || dataFromRadioGroup === void 0 ? void 0 : dataFromRadioGroup.checked }))] }));
32
32
  });
33
33
  RadioButton.displayName = "RadioButton";
@@ -4,7 +4,7 @@ type RadioButtonElement = React.ReactElement<RadioButtonProps>;
4
4
  type ExcludedTypes = "defaultValue" | "children";
5
5
  export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, ExcludedTypes> {
6
6
  name: string;
7
- defaultvalue?: string;
7
+ defaultValue?: string;
8
8
  children?: RadioButtonElement | RadioButtonElement[];
9
9
  }
10
10
  export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -14,10 +14,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useState, forwardRef, Children } from "react";
15
15
  import { RadioButton } from "..";
16
16
  export const RadioGroup = forwardRef((_a, ref) => {
17
- var { name, defaultvalue, className, children } = _a, restProps = __rest(_a, ["name", "defaultvalue", "className", "children"]);
18
- const [selectedValue, setSelectedValue] = useState(defaultvalue || null);
17
+ var { name, defaultValue, className, children } = _a, restProps = __rest(_a, ["name", "defaultValue", "className", "children"]);
18
+ const [selectedValue, setSelectedValue] = useState(defaultValue || null);
19
19
  const arrayChildren = Children.toArray(children);
20
- const renderChildrens = () => arrayChildren.map((child, index) => (_jsx(RadioButton, Object.assign({}, child.props, { datafromradiogroup: {
20
+ const renderChildrens = () => arrayChildren.map((child, index) => (_jsx(RadioButton, Object.assign({}, child.props, { dataFromRadioGroup: {
21
21
  name: name,
22
22
  onSelect: () => setSelectedValue(child.props.value),
23
23
  checked: selectedValue === child.props.value,
package/dist/Row/Row.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  overflow?: "shrink" | "wrap" | "scroll";
5
5
  size?: "xs" | "sm" | "md" | "lg" | "xl";
6
6
  children?: React.ReactNode;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface ScreenProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  children?: React.ReactNode;
5
5
  }
6
6
  export declare const Screen: import("react").ForwardRefExoticComponent<ScreenProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  children?: React.ReactNode;
5
5
  }
6
6
  export declare const Stack: import("react").ForwardRefExoticComponent<StackProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -3,8 +3,8 @@ import "./globals.css";
3
3
  export type DarkStyle = "light" | "dark" | "system";
4
4
  export type ThemeColor = "green" | "red" | "yellow" | "blue" | "purple";
5
5
  export interface ThemeProps extends React.HTMLAttributes<HTMLDivElement> {
6
- align?: "start" | "center" | "end";
7
- darkstyle?: DarkStyle;
6
+ align?: "start" | "space" | "center" | "end";
7
+ darkStyle?: DarkStyle;
8
8
  color?: ThemeColor;
9
9
  zoom?: number;
10
10
  children?: React.ReactNode;
@@ -17,12 +17,12 @@ import "./globals.css";
17
17
  import styles from "./Theme.module.css";
18
18
  import boxingStyles from "../boxing.module.css";
19
19
  export const Theme = forwardRef((_a, ref) => {
20
- var { align, darkstyle = "system", color = "blue", zoom = 100, className, children } = _a, restProps = __rest(_a, ["align", "darkstyle", "color", "zoom", "className", "children"]);
20
+ var { align, darkStyle = "system", color = "blue", zoom = 100, className, children } = _a, restProps = __rest(_a, ["align", "darkStyle", "color", "zoom", "className", "children"]);
21
21
  const zoomPercentage = zoom ? (zoom / 100) * 62.5 : 62.5;
22
22
  useEffect(() => {
23
23
  document.documentElement.style.setProperty("font-size", zoomPercentage + "%");
24
24
  }, [zoomPercentage]);
25
- const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.theme, styles[darkstyle], styles[color], className);
25
+ const joinedClassNames = classNames(boxingStyles.flexColumnBox, { [boxingStyles[align]]: align }, styles.theme, styles[darkStyle], styles[color], className);
26
26
  return (_jsx("div", Object.assign({ ref: ref }, restProps, { className: joinedClassNames, children: children })));
27
27
  });
28
28
  Theme.displayName = "Theme";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface WithDropdawnProps extends React.HTMLAttributes<HTMLDivElement> {
3
- align?: "start" | "center" | "end";
3
+ align?: "start" | "space" | "center" | "end";
4
4
  blur?: boolean;
5
5
  trigger?: "onClick" | "onRightClick";
6
6
  dropdawnChildren?: React.ReactElement;
@@ -28,12 +28,12 @@
28
28
  height: 0;
29
29
  border-left: 0.6rem solid transparent;
30
30
  border-right: 0.6rem solid transparent;
31
- border-bottom: 0.6rem solid
31
+ border-bottom: 0.8rem solid
32
32
  rgb(var(--surfaceContainerHighestColor, 230 224 233));
33
33
  transform: translate(-50%, -100%);
34
34
  }
35
35
  .arrow.blur {
36
- border-bottom: 0.6rem solid
36
+ border-bottom: 0.8rem solid
37
37
  color-mix(
38
38
  in srgb,
39
39
  rgb(var(--surfaceContainerHighestColor, 230 224 233)) 85%,
@@ -10,6 +10,10 @@
10
10
  align-items: flex-start;
11
11
  }
12
12
  .flexColumnBox.center {
13
+ justify-content: center;
14
+ align-items: center;
15
+ }
16
+ .flexColumnBox.space {
13
17
  justify-content: space-evenly;
14
18
  align-items: center;
15
19
  }
@@ -37,6 +41,9 @@
37
41
  .flexRowBox.center {
38
42
  justify-content: center;
39
43
  }
44
+ .flexRowBox.space {
45
+ justify-content: space-evenly;
46
+ }
40
47
  .flexRowBox.end {
41
48
  justify-content: flex-end;
42
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.3.110",
3
+ "version": "1.3.112",
4
4
  "private": false,
5
5
  "author": "Natiq",
6
6
  "description": "UI components for NextJS/React",