nebula-galaxy
Advanced tools
Comparing version 0.1.1 to 0.2.0
export { default as Google } from './google'; | ||
export { default as Nebula } from './nebula'; | ||
export { default as NebulaWordMark } from './nebula-word-mark'; |
export { default as Google } from './google'; | ||
export { default as Nebula } from './nebula'; | ||
export { default as NebulaWordMark } from './nebula-word-mark'; |
import type { InputHTMLAttributes, ReactNode } from 'react'; | ||
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> { | ||
className?: string; | ||
displayClassName?: string; | ||
label?: ReactNode; | ||
@@ -13,3 +14,3 @@ size?: 'SM' | 'MD'; | ||
*/ | ||
export declare const Checkbox: ({ className, label, size, isPartiallyChecked, checked, disabled, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element; | ||
export declare const Checkbox: ({ className, displayClassName, label, size, isPartiallyChecked, checked, disabled, "aria-label": ariaLabel, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element; | ||
export default Checkbox; |
@@ -32,8 +32,8 @@ var __assign = (this && this.__assign) || function () { | ||
var _b; | ||
var className = _a.className, label = _a.label, _c = _a.size, size = _c === void 0 ? 'MD' : _c, isPartiallyChecked = _a.isPartiallyChecked, checked = _a.checked, disabled = _a.disabled, props = __rest(_a, ["className", "label", "size", "isPartiallyChecked", "checked", "disabled"]); | ||
return (_jsxs("label", __assign({ "aria-label": "checkbox", className: cn(className, styles.checkbox, styles["checkbox".concat(size)], (_b = {}, | ||
var className = _a.className, displayClassName = _a.displayClassName, label = _a.label, _c = _a.size, size = _c === void 0 ? 'MD' : _c, isPartiallyChecked = _a.isPartiallyChecked, checked = _a.checked, disabled = _a.disabled, ariaLabel = _a["aria-label"], props = __rest(_a, ["className", "displayClassName", "label", "size", "isPartiallyChecked", "checked", "disabled", 'aria-label']); | ||
return (_jsxs("label", __assign({ "aria-label": ariaLabel || 'checkbox-container', className: cn(className, styles.checkbox, styles["checkbox".concat(size)], (_b = {}, | ||
_b[styles.checkboxPartiallyChecked] = isPartiallyChecked && !checked, | ||
_b[styles.checkboxDisabled] = disabled, | ||
_b)) }, { children: [_jsx("input", __assign({ type: "checkbox", checked: checked, disabled: disabled }, props)), _jsx("div", __assign({ className: styles.checkboxDisplayWrapper }, { children: _jsx("span", __assign({ className: styles.checkboxDisplay }, { children: _jsx(Icon, { name: isPartiallyChecked && !checked ? 'Minus' : 'Check', className: styles.checkboxIcon }) })) })), label && _jsx("div", __assign({ className: styles.checkboxLabel }, { children: label }))] }))); | ||
_b)) }, { children: [_jsx("input", __assign({ type: "checkbox", checked: checked, disabled: disabled }, props)), _jsx("div", __assign({ className: cn(displayClassName, styles.checkboxDisplayWrapper) }, { children: _jsx("span", __assign({ className: styles.checkboxDisplay }, { children: _jsx(Icon, { name: isPartiallyChecked && !checked ? 'Minus' : 'Check', className: styles.checkboxIcon }) })) })), label && _jsx("div", __assign({ className: styles.checkboxLabel }, { children: label }))] }))); | ||
}; | ||
export default Checkbox; |
@@ -7,4 +7,8 @@ export { default as Alert } from './alert'; | ||
export { default as Checkbox } from './checkbox'; | ||
export { default as Divider } from './divider'; | ||
export { default as DropdownMenu } from './dropdown-menu'; | ||
export { default as Icon, iconset } from './icon'; | ||
export { default as NebulaLogo } from './nebula-logo'; | ||
export { default as Radio } from './radio'; | ||
export { default as TextField, PasswordTextField } from './textfield'; | ||
export { default as ThemeSwitch } from './theme-switch'; |
@@ -7,4 +7,8 @@ export { default as Alert } from './alert'; | ||
export { default as Checkbox } from './checkbox'; | ||
export { default as Divider } from './divider'; | ||
export { default as DropdownMenu } from './dropdown-menu'; | ||
export { default as Icon, iconset } from './icon'; | ||
export { default as NebulaLogo } from './nebula-logo'; | ||
export { default as Radio } from './radio'; | ||
export { default as TextField, PasswordTextField } from './textfield'; | ||
export { default as ThemeSwitch } from './theme-switch'; |
import type { InputHTMLAttributes, ReactNode } from 'react'; | ||
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> { | ||
className?: string; | ||
displayClassName?: string; | ||
label?: ReactNode; | ||
@@ -12,3 +13,3 @@ size?: 'SM' | 'MD'; | ||
*/ | ||
export declare const Radio: ({ className, label, size, checked, disabled, ...props }: RadioProps) => import("react/jsx-runtime").JSX.Element; | ||
export declare const Radio: ({ className, displayClassName, label, size, checked, disabled, ...props }: RadioProps) => import("react/jsx-runtime").JSX.Element; | ||
export default Radio; |
@@ -31,7 +31,7 @@ var __assign = (this && this.__assign) || function () { | ||
var _b; | ||
var className = _a.className, label = _a.label, _c = _a.size, size = _c === void 0 ? 'MD' : _c, checked = _a.checked, disabled = _a.disabled, props = __rest(_a, ["className", "label", "size", "checked", "disabled"]); | ||
return (_jsxs("label", __assign({ "aria-label": "radio", className: cn(className, styles.radio, styles["radio".concat(size)], (_b = {}, | ||
var className = _a.className, displayClassName = _a.displayClassName, label = _a.label, _c = _a.size, size = _c === void 0 ? 'MD' : _c, checked = _a.checked, disabled = _a.disabled, props = __rest(_a, ["className", "displayClassName", "label", "size", "checked", "disabled"]); | ||
return (_jsxs("label", __assign({ "aria-label": "radio-container", className: cn(className, styles.radio, styles["radio".concat(size)], (_b = {}, | ||
_b[styles.radioDisabled] = disabled, | ||
_b)) }, { children: [_jsx("input", __assign({ type: "radio", checked: checked, disabled: disabled }, props)), _jsx("div", __assign({ className: styles.radioDisplayWrapper }, { children: _jsx("span", { className: styles.radioDisplay }) })), label && _jsx("div", __assign({ className: styles.radioLabel }, { children: label }))] }))); | ||
_b)) }, { children: [_jsx("input", __assign({ type: "radio", checked: checked, disabled: disabled }, props)), _jsx("div", __assign({ className: cn(displayClassName, styles.radioDisplayWrapper) }, { children: _jsx("span", { className: styles.radioDisplay }) })), label && _jsx("div", __assign({ className: styles.radioLabel }, { children: label }))] }))); | ||
}; | ||
export default Radio; |
@@ -7,3 +7,3 @@ export var getInitials = function (fullName) { | ||
var initials = "".concat(firstName.substring(0, 1)).concat(lastName ? lastName.substring(0, 1) : ''); | ||
return initials; | ||
return initials.toUpperCase(); | ||
}; |
export * from './generators'; | ||
export * from './validators'; |
export * from './generators'; | ||
export * from './validators'; |
export * from './functions'; | ||
export * from './hooks'; | ||
export * from './constants'; | ||
export * from './types'; |
export * from './functions'; | ||
export * from './hooks'; | ||
export * from './constants'; | ||
export * from './types'; |
@@ -0,1 +1,2 @@ | ||
import type { ReactNode } from 'react'; | ||
export type IconElement = { | ||
@@ -8,1 +9,18 @@ color?: string; | ||
}; | ||
export type SelectOption = { | ||
label: string; | ||
display?: ReactNode; | ||
value: string; | ||
}; | ||
export type SelectOptionGroup = { | ||
title: ReactNode; | ||
options: SelectOption[]; | ||
}; | ||
export type SelectValue = string | string[] | undefined; | ||
export type SelectEvent = { | ||
target: { | ||
name?: string; | ||
value?: SelectValue; | ||
checked?: boolean; | ||
}; | ||
}; |
{ | ||
"name": "nebula-galaxy", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"main": "dist/index.js", | ||
@@ -9,7 +9,9 @@ "module": "dist/index.js", | ||
], | ||
"scripts": { | ||
"scripts": { | ||
"prepublishOnly": "npm run build", | ||
"build": "rm -rf dist && npm run build:esm", | ||
"build:esm": "tsc --project tsconfig.build.json && copyfiles -u 1 src/**/*.scss src/**/**/*.scss src/**/*.js src/**/**/*.js src/**/**/*.woff dist", | ||
"test": "jest", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"typescript": "tsc --project tsconfig.json --noEmit", | ||
"storybook": "storybook dev -p 6006", | ||
@@ -21,7 +23,7 @@ "build-storybook": "storybook build -o nebula", | ||
"src/**/*.(ts|tsx|js|jsx)": [ | ||
"prettier --ignore-path .eslintignore --single-quote --write", | ||
"eslint --cache --fix" | ||
"prettier --ignore-path .eslintignore --single-quote --write", | ||
"eslint --cache --fix" | ||
], | ||
"src/**/*.(json|css|scss|md)|.(babelrc|prettierrc|eslint.js|tsconfig.json)": [ | ||
"prettier --ignore-path .eslintignore --write" | ||
"prettier --ignore-path .eslintignore --write" | ||
] | ||
@@ -48,10 +50,10 @@ }, | ||
"@storybook/test": "^8.0.5", | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^13.4.0", | ||
"@testing-library/user-event": "^13.5.0", | ||
"@types/jest": "^27.5.2", | ||
"@types/node": "^16.18.93", | ||
"@types/react": "^18.2.73", | ||
"@types/react-dom": "^18.2.23", | ||
"@types/react-test-renderer": "^18.0.7", | ||
"@testing-library/jest-dom": "^6.4.5", | ||
"@testing-library/react": "^15.0.7", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^20.12.11", | ||
"@types/react": "^18.3.1", | ||
"@types/react-dom": "^18.3.0", | ||
"@types/react-test-renderer": "18.0.7", | ||
"classnames": "^2.5.1", | ||
@@ -62,12 +64,18 @@ "copyfiles": "^2.4.1", | ||
"husky": "^9.0.11", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"jest-transformer-svg": "^2.0.2", | ||
"lint-staged": "^15.2.2", | ||
"prettier": "^3.2.5", | ||
"prop-types": "^15.8.1", | ||
"prop-types": "15.8.1", | ||
"react-scripts": "5.0.1", | ||
"react-test-renderer": "^18.2.0", | ||
"react-test-renderer": "18.2.0", | ||
"sass": "^1.72.0", | ||
"storybook": "^8.0.5", | ||
"tsc-files": "^1.1.4", | ||
"typescript": "^4.9.5", | ||
"webpack": "^5.91.0" | ||
"ts-jest": "^29.1.2", | ||
"ts-node": "^10.9.2", | ||
"tsc-files": "1.1.4", | ||
"typescript": "4.9.5", | ||
"webpack": "5.91.0" | ||
}, | ||
@@ -121,2 +129,2 @@ "eslintConfig": { | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
355367
145
1416
1
40