@cronocode/react-box 0.3.1 → 0.3.4

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.
File without changes
File without changes
@@ -0,0 +1,13 @@
1
+ import Box from '../box';
2
+ declare type BoxProps = React.ComponentProps<typeof Box>;
3
+ declare type UncontrolledTextboxCoreTypeAttribute = 'date' | 'datetime-local' | 'email' | 'hidden' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
4
+ interface Props extends BoxProps {
5
+ onInput?: (e: React.FormEvent<HTMLInputElement>) => void;
6
+ onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
7
+ type?: UncontrolledTextboxCoreTypeAttribute;
8
+ placeholder?: string;
9
+ disabled?: boolean;
10
+ defaultValue?: string | number;
11
+ }
12
+ export default function UncontrolledTextboxCore(props: Props): JSX.Element;
13
+ export {};
@@ -0,0 +1,34 @@
1
+ import u from "../box.js";
2
+ import { jsx as c } from "react/jsx-runtime";
3
+ import "react";
4
+ import "../utils/utils.js";
5
+ function g(o) {
6
+ const {
7
+ props: t,
8
+ type: e,
9
+ disabled: n,
10
+ placeholder: r,
11
+ defaultValue: p,
12
+ onInput: a,
13
+ onChange: s
14
+ } = o, i = {
15
+ type: e || "text",
16
+ disabled: n,
17
+ placeholder: r,
18
+ onInput: a,
19
+ onChange: s,
20
+ defaultValue: p,
21
+ ...t
22
+ }, l = {
23
+ ...o,
24
+ props: i
25
+ };
26
+ return /* @__PURE__ */ c(u, {
27
+ tag: "input",
28
+ inline: !0,
29
+ ...l
30
+ });
31
+ }
32
+ export {
33
+ g as default
34
+ };
@@ -3,7 +3,7 @@ declare const variables: {
3
3
  sizeMultiplier: number;
4
4
  colors: readonly ["primary", "primaryLight", "primaryDark", "secondary", "secondaryLight", "secondaryDark", "tertiary", "tertiaryLight", "tertiaryDark", "blue", "blueLight", "blueDark", "red", "redLight", "redDark", "purple", "purpleLight", "purpleDark", "yellow", "yellowLight", "yellowDark", "pink", "pinkLight", "pinkDark", "green", "greenLight", "greenDark", "orange", "orangeLight", "orangeDark", "navy", "navyLight", "navyDark", "teal", "tealLight", "tealDark", "violet", "violetLight", "violetDark", "black", "white", "gray", "grayLight", "grayDark", "brown", "brownLight", "brownDark", "orange", "orangeLight", "orangeDark"];
5
5
  cursors: readonly ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "e-resize", "n-resize", "ne-resize", "nw-resize", "s-resize", "se-resize", "sw-resize", "w-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "col-resize", "row-resize", "all-scroll", "zoom-in", "zoom-out", "grab", "grabbing"];
6
- fontSizes: readonly [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50];
6
+ fontSizes: readonly [6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 54, 58, 64, 70, 78, 86, 96];
7
7
  };
8
8
  export declare type SizeType = typeof variables.sizes[number];
9
9
  export declare type ColorType = typeof variables.colors[number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "0.3.1",
3
+ "version": "0.3.4",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",