@yakad/ui 1.3.166 → 1.3.168

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,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
3
3
  variant?: "outlined" | "filled";
4
4
  boxsize?: "small" | "normal";
@@ -6,4 +6,7 @@ export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElemen
6
6
  children?: React.ReactNode;
7
7
  ref?: React.Ref<HTMLSelectElement>;
8
8
  }
9
- export declare function Select({ variant, boxsize, placeholder, className, children, ...restProps }: SelectProps): import("react").JSX.Element;
9
+ export declare function Select({ variant, boxsize, placeholder, className, children, ...restProps }: SelectProps): React.JSX.Element;
10
+ export declare namespace Select {
11
+ var displayName: string;
12
+ }
@@ -10,12 +10,14 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import classNames from "classnames";
14
- import boxingStyles from "../boxing.module.css";
15
- import styles from "./Select.module.css";
16
- import inputStyles from "../InputField/InputField.module.css";
13
+ import { cn } from "../InputField/cn";
17
14
  export function Select(_a) {
18
15
  var { variant = "outlined", boxsize = "normal", placeholder, className, children } = _a, restProps = __rest(_a, ["variant", "boxsize", "placeholder", "className", "children"]);
19
- const joinedClassNames = classNames(styles.select, inputStyles.input, inputStyles[variant], inputStyles[boxsize], { [inputStyles.havePlaceHolder]: placeholder }, className);
20
- return (_jsxs("div", { className: classNames({ [boxingStyles.fullWidthOnParentDemand]: true }, inputStyles.div), children: [_jsx("select", Object.assign({}, restProps, { className: joinedClassNames, children: children })), placeholder ? (_jsx("label", { className: inputStyles.label, children: placeholder })) : null] }));
16
+ return (_jsxs("div", { className: "relative w-full", children: [_jsx("select", Object.assign({}, restProps, { className: cn("peer w-full transition-colors", "border-input bg-background", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", {
17
+ "h-8 px-2 text-sm": boxsize === "small",
18
+ "h-10 px-3 text-base": boxsize === "normal",
19
+ "rounded-md border bg-transparent": variant === "outlined",
20
+ "rounded-b-none border-0 border-b-2 bg-muted": variant === "filled",
21
+ }, className), children: children })), placeholder && (_jsx("label", { className: cn("pointer-events-none absolute left-3 top-1/2", "-translate-y-1/2 text-muted-foreground", "transition-all", "peer-focus:top-0 peer-focus:-translate-y-1/2", "peer-focus:bg-background peer-focus:px-1", "peer-focus:text-xs peer-focus:text-primary"), children: placeholder }))] }));
21
22
  }
23
+ Select.displayName = "Select";
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import "./globals.css";
3
2
  export type DarkStyle = "light" | "dark" | "system";
4
3
  export type ThemeColor = "green" | "red" | "yellow" | "blue" | "purple";
5
4
  export interface ThemeProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -13,7 +13,6 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useEffect } from "react";
15
15
  import classNames from "classnames";
16
- import "./globals.css";
17
16
  import styles from "./Theme.module.css";
18
17
  import boxingStyles from "../boxing.module.css";
19
18
  export function Theme(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yakad/ui",
3
- "version": "1.3.166",
3
+ "version": "1.3.168",
4
4
  "private": false,
5
5
  "author": "Natiq",
6
6
  "description": "UI components for NextJS/React",