@leafygreen-ui/checkbox
Advanced tools
Comparing version 6.0.6 to 7.0.0
# @leafygreen-ui/checkbox | ||
## 7.0.0 | ||
### Major Changes | ||
- acd6919: Updates checkbox for visual brand refresh | ||
- Updates default `animate` value to `true` | ||
- Adds `description` prop | ||
- Adds support for `aria-label` and `aria-labelledby` | ||
- Currently disregarding `bold` prop, and the label will always be bold. This will be updated in a future update to the `Label` component | ||
### Patch Changes | ||
- Updated dependencies [acd6919] | ||
- Updated dependencies [acd6919] | ||
- @leafygreen-ui/lib@9.2.0 | ||
## 6.0.6 | ||
@@ -4,0 +20,0 @@ |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { HTMLElementProps } from '@leafygreen-ui/lib'; | ||
interface CheckboxProps extends HTMLElementProps<'input', never> { | ||
darkMode?: boolean; | ||
checked?: boolean; | ||
label: React.ReactNode; | ||
disabled?: boolean; | ||
indeterminate?: boolean; | ||
className?: string; | ||
onChange?: React.ChangeEventHandler<HTMLInputElement>; | ||
bold?: boolean; | ||
animate?: boolean; | ||
} | ||
declare function Checkbox({ darkMode, checked: checkedProp, label, disabled, indeterminate: indeterminateProp, bold, animate, className, onClick: onClickProp, onChange: onChangeProp, id: idProp, style, name, ...rest }: CheckboxProps): JSX.Element; | ||
import { CheckboxProps } from './types'; | ||
declare function Checkbox({ darkMode, checked: checkedProp, label, description, disabled, indeterminate: indeterminateProp, animate, className, onClick: onClickProp, onChange: onChangeProp, id: idProp, style, name, ...rest }: CheckboxProps): JSX.Element; | ||
declare namespace Checkbox { | ||
@@ -17,0 +6,0 @@ var displayName: string; |
{ | ||
"name": "@leafygreen-ui/checkbox", | ||
"version": "6.0.6", | ||
"version": "7.0.0", | ||
"description": "LeafyGreen UI Kit Checkbox", | ||
@@ -24,8 +24,10 @@ "main": "./dist/index.js", | ||
"@leafygreen-ui/hooks": "^7.0.0", | ||
"@leafygreen-ui/lib": "^9.0.0" | ||
"@leafygreen-ui/lib": "^9.2.0", | ||
"@leafygreen-ui/typography": "^9.1.0", | ||
"@leafygreen-ui/leafygreen-provider": "^2.1.3" | ||
}, | ||
"devDependencies": { | ||
"@leafygreen-ui/palette": "^3.2.2" | ||
"@leafygreen-ui/palette": "^3.3.2" | ||
}, | ||
"gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0" | ||
} |
@@ -69,16 +69,19 @@ # Checkbox | ||
| Prop | Type | Description | Default | | ||
| --------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | ||
| `darkMode` | `boolean` | Determines whether or not the Checkbox will appear in dark mode. | `false` | | ||
| `checked` | `boolean` | Checks the checkbox | `false` | | ||
| `label` | `node` | The label for the checkbox. | `''` | | ||
| `disabled` | `boolean` | Disables the checkbox. | `false` | | ||
| `indeterminate` | `boolean` | Sets the checkbox as indeterminate. **NOTE:** the checkbox will become out of sync with the indeterminate prop when it's clicked. Make sure to unset the `indeterminate` prop on change where you're controlling your input. | `false` | | ||
| `className` | `string` | Adds a className to the outermost element. | `''` | | ||
| `bold` | `boolean` | Determines whether the text will be bold or not. | `false` | | ||
| `animate` | `boolean` | Determines whether the checkbox will be animated when checked or unchecked. | `true` | | ||
| `id` | `string` or `number` | Adds an ID only to the input, and it's used elsewhere for accessibility props. | randomly generated string | | ||
| `onChange` | `function` | The event handler function for the `onChange` event. Receives the associated `event` object as the first argument. | `() => {}` | | ||
| ... | native `input` attributes | Any other props will be spread on the root `input` element | | | ||
| Prop | Type | Description | Default | | ||
| ----------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | ||
| `darkMode` | `boolean` | Determines whether or not the Checkbox will appear in dark mode. | `false` | | ||
| `checked` | `boolean` | Checks the checkbox | `false` | | ||
| `label` | `node` | The label for the checkbox. | `''` | | ||
| `description` | `string` | A description for the checkbox. | `''` | | ||
| `disabled` | `boolean` | Disables the checkbox. | `false` | | ||
| `indeterminate` | `boolean` | Sets the checkbox as indeterminate. **NOTE:** the checkbox will become out of sync with the indeterminate prop when it's clicked. Make sure to unset the `indeterminate` prop on change where you're controlling your input. | `false` | | ||
| `className` | `string` | Adds a className to the outermost element. | `''` | | ||
| `animate` | `boolean` | Determines whether the checkbox will be animated when checked or unchecked. Note the "ripple" animation will only run when `Checkbox` is rendered within `LeafygreenProvider`, and only on click. | `true` | | ||
| `id` | `string` or `number` | Adds an ID only to the input, and it's used elsewhere for accessibility props. | randomly generated string | | ||
| `onChange` | `function` | The event handler function for the `onChange` event. Receives the associated `event` object as the first argument. | `() => {}` | | ||
| `bold` | `boolean` | Determines whether the text will be bold or not. (Currently disregarded in the new design) | `false` | | ||
| `aria-labelledby` | `string` | A value for `aria-labelledby`. Allows use of the component with an external `<label>` element | | | ||
| `aria-label` | `string` | A value for `aria-label`. Allows use of the component without a `label` | | | ||
| ... | native `input` attributes | Any other props will be spread on the root `input` element | | | ||
_Any other properties will be spread on the `input` element._ |
@@ -21,4 +21,10 @@ { | ||
"path": "../hooks" | ||
}, | ||
{ | ||
"path": "../typography" | ||
}, | ||
{ | ||
"path": "../leafygreen-provider" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
46
1295
87
5
531332
4
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/generator@7.26.5(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.5(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.5(transitive)
+ Added@babel/types@7.26.5(transitive)
+ Added@emotion/babel-plugin@11.13.5(transitive)
+ Added@emotion/cache@11.14.0(transitive)
+ Added@emotion/css@11.13.5(transitive)
+ Added@emotion/hash@0.9.2(transitive)
+ Added@emotion/memoize@0.9.0(transitive)
+ Added@emotion/serialize@1.3.3(transitive)
+ Added@emotion/server@11.11.0(transitive)
+ Added@emotion/sheet@1.4.0(transitive)
+ Added@emotion/unitless@0.10.0(transitive)
+ Added@emotion/utils@1.4.2(transitive)
+ Added@emotion/weak-memoize@0.4.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.8(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Added@leafygreen-ui/box@3.1.9(transitive)
+ Added@leafygreen-ui/emotion@4.0.8(transitive)
+ Added@leafygreen-ui/icon@11.29.1(transitive)
+ Added@leafygreen-ui/leafygreen-provider@2.3.5(transitive)
+ Added@leafygreen-ui/palette@3.4.7(transitive)
+ Added@leafygreen-ui/tokens@1.4.1(transitive)
+ Added@leafygreen-ui/typography@9.1.1(transitive)
+ Added@types/parse-json@4.0.2(transitive)
+ Addedbabel-plugin-macros@3.1.0(transitive)
+ Addedbuffer-from@0.1.2(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcosmiconfig@7.1.0(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addedduplexer2@0.1.4(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedfind-root@1.1.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhtml-tokenize@2.0.1(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedisarray@0.0.11.0.0(transitive)
+ Addedjsesc@3.1.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedms@2.1.3(transitive)
+ Addedmultipipe@1.0.2(transitive)
+ Addedobject-keys@0.4.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@1.0.342.3.8(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsource-map@0.5.7(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedstylis@4.2.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedthrough2@0.4.2(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedxtend@2.1.2(transitive)
+ Addedyaml@1.10.2(transitive)
Updated@leafygreen-ui/lib@^9.2.0