Socket
Socket
Sign inDemoInstall

@entur/utils

Package Overview
Dependencies
Maintainers
13
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/utils - npm Package Compare versions

Comparing version 0.4.8 to 0.4.9

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.4.9](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.4.8...@entur/utils@0.4.9) (2023-01-19)
### Performance Improvements
- **button:** remove usage of react-polymorphic-types in favor of own implementation in button packa ([d15d852](https://bitbucket.org/enturas/design-system/commits/d15d85245d7f7273f0700fafcef3201d4fa2e0ff))
- **layout:** remove usage of react-polymorphic-types in favor of own implementation in layout packa ([b7ada6d](https://bitbucket.org/enturas/design-system/commits/b7ada6d7b9776cce86dea51f58c4b7ea0300451b))
- **packages:** remove all referenves to react-polymorphic-types npm-package ([e47a304](https://bitbucket.org/enturas/design-system/commits/e47a304d87eb77adae5dd002e89f03026c7eadce))
## [0.4.8](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.4.5...@entur/utils@0.4.8) (2022-12-09)

@@ -8,0 +16,0 @@

43

dist/PolymorphicComponent.d.ts

@@ -1,2 +0,41 @@

import type { PolymorphicPropsWithoutRef, PolymorphicPropsWithRef, PolymorphicForwardRefExoticComponent } from 'react-polymorphic-types';
export { PolymorphicPropsWithoutRef, PolymorphicPropsWithRef, PolymorphicForwardRefExoticComponent, };
/** These polymorphic types are derrived from Ben Ilegbodu's article available at the following link:
* https://www.benmvp.com/blog/forwarding-refs-polymorphic-react-component-typescript/
*/
import React from 'react';
export declare type PropsOf<C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>> = JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;
declare type AsProp<C extends React.ElementType> = {
/**
* An override of the default HTML tag.
* Can also be another React component.
*/
as?: C;
};
/**
* Allows for extending a set of props (`ExtendedProps`) by an overriding set of props
* (`OverrideProps`), ensuring that any duplicates are overridden by the overriding
* set of props.
*/
export declare type ExtendableProps<ExtendedProps = Record<string, unknown>, OverrideProps = Record<string, unknown>> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;
/**
* Allows for inheriting the props from the specified element type so that
* props like children, className & style work, as well as element-specific
* attributes like aria roles. The component (`C`) must be passed in.
*/
export declare type InheritableElementProps<C extends React.ElementType, Props = Record<string, unknown>> = ExtendableProps<PropsOf<C>, Props>;
/**
* A more sophisticated version of `InheritableElementProps` where
* the passed in `as` prop will determine which props can be included
*/
export declare type PolymorphicComponentProps<C extends React.ElementType, Props = Record<string, unknown>> = InheritableElementProps<C, Props & AsProp<C>>;
/**
* Utility type to extract the `ref` prop from a polymorphic component
*/
export declare type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
/**
* A wrapper of `PolymorphicComponentProps` that also includes the `ref`
* prop for the polymorphic component
*/
export declare type PolymorphicComponentPropsWithRef<C extends React.ElementType, Props = Record<string, unknown>> = PolymorphicComponentProps<C, Props> & {
ref?: PolymorphicRef<C>;
};
export {};

6

package.json
{
"name": "@entur/utils",
"version": "0.4.8",
"version": "0.4.9",
"license": "EUPL-1.2",

@@ -22,3 +22,2 @@ "main": "dist/index.js",

"build": "dts build && cp src/*.scss dist",
"test": "dts test --env=jsdom",
"lint": "dts lint"

@@ -31,6 +30,5 @@ },

"dependencies": {
"react-polymorphic-types": "^1.1.0",
"tiny-warning": "^1.0.3"
},
"gitHead": "103844c30bdc32296f3998a360cf6066492173e9"
"gitHead": "de71e205560a699e2dce301e133966dc9348c459"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc