@cerebruminc/cerebellum 16.0.0 → 16.1.0

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,3 +1,7 @@
1
1
  import { BaseProps, InputGroupProps } from "./types";
2
2
  export declare const Base: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, BaseProps>> & string;
3
+ export declare const DashSeparator: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
4
+ $themeOverride?: any;
5
+ disabled?: boolean;
6
+ }>> & string;
3
7
  export declare const InputGroup: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, InputGroupProps>> & string;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEvent, FocusEvent, ReactElement, ReactNode, RefObject } from "react";
2
+ import { SingleAlphaCharacter } from "../../sharedTypes/types";
2
3
  export interface DigitalInputProps {
3
4
  /** Sets HTML attribute `autofocus`, which will focus on the first input on load. */
4
5
  autofocus?: boolean;
@@ -28,6 +29,8 @@ export interface DigitalInputProps {
28
29
  onInputBlur?: (event: FocusEvent<HTMLInputElement>) => void;
29
30
  /** Called when the Input is focused */
30
31
  onInputFocus?: (event: FocusEvent<HTMLInputElement>) => void;
32
+ /** Prefix for the input - must be exactly one character. */
33
+ prefix?: SingleAlphaCharacter;
31
34
  /** Displays an asterisk after the label. This does not handle any validation */
32
35
  required?: boolean;
33
36
  /** Displays `validationMessage` */
@@ -89,3 +89,8 @@ export declare const isChildlessOptionType: (option: OptionType) => option is Ch
89
89
  export declare const isFilterType: (tag: OptionType) => tag is FilterType;
90
90
  export declare const isUSStatesEnum: (maybeState: string) => maybeState is keyof typeof USStatesEnum;
91
91
  export type YupSchema = StringSchema | NumberSchema | BooleanSchema | DateSchema | ArraySchema<any> | ObjectSchema<any>;
92
+ type StringToUnion<T extends string> = T extends `${infer First}${infer Rest}` ? First | StringToUnion<Rest> : never;
93
+ type LowercaseLetters = StringToUnion<'abcdefghijklmnopqrstuvwxyz'>;
94
+ type UppercaseLetters = StringToUnion<'ABCDEFGHIJKLMNOPQRSTUVWXYZ'>;
95
+ export type SingleAlphaCharacter = LowercaseLetters | UppercaseLetters;
96
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerebruminc/cerebellum",
3
- "version": "16.0.0",
3
+ "version": "16.1.0",
4
4
  "description": "Cerebrum's React Component Library",
5
5
  "type": "module",
6
6
  "main": "lib/cjs/index.cjs",
@@ -27,7 +27,9 @@
27
27
  "release": "npm run build && npm publish",
28
28
  "tsc": "./node_modules/.bin/tsc",
29
29
  "build": "rollup -c",
30
- "prepublishOnly": "npm run build"
30
+ "prepublishOnly": "npm run build",
31
+ "chromatic": "chromatic",
32
+ "chromatic:ci": "chromatic --exit-zero-on-changes"
31
33
  },
32
34
  "repository": {
33
35
  "type": "git",
@@ -66,6 +68,7 @@
66
68
  "@biomejs/biome": "^1.6.4",
67
69
  "@rollup/plugin-commonjs": "^28.0.0",
68
70
  "@rollup/plugin-image": "^3.0.3",
71
+ "@rollup/plugin-json": "^6.1.0",
69
72
  "@rollup/plugin-node-resolve": "^16.0.0",
70
73
  "@storybook/addon-a11y": "^9.0.0",
71
74
  "@storybook/addon-docs": "^9.0.0",
@@ -91,6 +94,7 @@
91
94
  "babel-loader": "^10.0.0",
92
95
  "babel-plugin-dynamic-import-node": "^2.3.3",
93
96
  "babel-plugin-styled-components": "^2.1.1",
97
+ "chromatic": "^13.1.3",
94
98
  "husky": "^9.0.0",
95
99
  "identity-obj-proxy": "^3.0.0",
96
100
  "jest": "^29.7.0",
@@ -106,7 +110,6 @@
106
110
  "rollup-plugin-cleaner": "^1.0.0",
107
111
  "rollup-plugin-import-css": "^3.5.0",
108
112
  "rollup-plugin-includepaths": "^0.2.4",
109
- "@rollup/plugin-json": "^6.1.0",
110
113
  "rollup-plugin-node-externals": "^8.0.0",
111
114
  "rollup-plugin-typescript2": "^0.36.0",
112
115
  "rollup-plugin-visualizer": "^5.12.0",