
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@clds/common-definitions
Advanced tools
Common interfaces/types for other packages.
Install the package using Yarn:
pnpm install @clds/common-definitions
Interface for props of all UI components.
Interface for props of all form field components (requires implementation of mixed field control).
Interface for props of components that can be wrapped with styled() from styled-components.
Mixed control mode refers to how the component deals with specific state that is required by the component. There are two types of components:
useState()
call)useState()
call) is defined higher in the component hierarchy.Mixed control mode is about making the component to support both cases:
Design system components should expose useful API that supports both use cases at the same time.
For example, when creating <DropdownMenu items={...}/>
we don't want control the opened state, we just expect that the dropdown opens on click and closes when menu item is selected.
But there could be something special, like "in-app onboarding", when we want to open this menu programatically.
Then we need something like <DropdownMenu isOpened={stateWeControl} onOpenedChange={ourOwnLogic} items={...}/>
.
MixedControlProps
is a group of types that will help to create those props in the conventional way.
The goal is to support type-level API consistency of components.
We cover all naming conventions and forbid impossible state like having defaultValue and value at the same time. There are 3 main types:
ExplicitMixedControlProps
ImplicitMixedControlProps
ExplicitMixedControlProps
can be problematic, for example some props are additional, so forcing ie. <DropdownMenu defaultOpened={false}
seems an overkill since
for DropdownMenu defaultOpened should be just false and passing it explicitly isn't convenient.value
is also provided)ImplicitTraceableMixedControlProps
<DropdownMenu onFocusedIdChange={analytics.track('focused')} ... />
but please use it carefully to not encourage trying to use this prop as a source of truth.Import one of the interfaces and extend.
This library follows Semantic Versioning.
See LICENSE
FAQs
Common Design System TypeScript definitions
The npm package @clds/common-definitions receives a total of 335 weekly downloads. As such, @clds/common-definitions popularity was classified as not popular.
We found that @clds/common-definitions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.