Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@preply/ds-web-core

Package Overview
Dependencies
Maintainers
0
Versions
401
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@preply/ds-web-core - npm Package Compare versions

Comparing version 0.93.0 to 0.94.0

47

dist/field/types.d.ts

@@ -12,3 +12,3 @@ import type { Dataset } from '@preply/ds-core';

*/
export interface FieldLabelProps {
export declare type FieldLabelProps = {
id: string;

@@ -20,4 +20,4 @@ label?: ReactNode | string;

requiredLabel?: ReactNode | string;
}
export interface FieldButtonProps {
};
export declare type FieldButtonProps = {
svg: ReactSVGComponentType;

@@ -27,4 +27,4 @@ assistiveText: string;

dataset?: Dataset;
}
export interface FieldLayoutBaseProps {
};
export declare type FieldLayoutBaseProps = {
id: string;

@@ -51,9 +51,16 @@ className?: string;

preplyDsComponent?: string;
}
export interface InputImperativeHandle {
};
export declare type InputImperativeHandle = {
setFocus: () => void;
scrollIntoView: () => void;
}
export interface FieldLayoutProps extends Omit<FieldLayoutBaseProps, 'children'> {
};
export declare type FieldLayoutProps = Omit<FieldLayoutBaseProps, 'children'> & {
/**
* An `<input>` element.
*/
input: React.ReactElement;
/**
* A ref handle to the `<input>` element, used to manage focus when
* clicking on elements within the layout, such as the button and icon.
*/
inputHandle: InputImperativeHandle | null;

@@ -63,16 +70,24 @@ icon?: React.ReactElement<IconProps>;

onClick?: MouseEventHandler;
}
};
export declare type FieldAdditionalTextVariant = 'normal' | 'error';
export interface FieldAdditionalTextProps {
export declare type FieldAdditionalTextProps = {
variant?: FieldAdditionalTextVariant;
id?: string;
children: ReactNode;
}
};
/**
* <Field*>
*/
export interface FieldCommonProps {
export declare type FieldCommonProps = {
id?: string;
/**
* The field label. This is needed for accessibility purposes, but can be
* hidden using the `hideLabel` prop.
*/
label: ReactNode | string;
requiredLabel?: ReactNode | string;
/**
* Use this to hide the `label` visually, but keep it in the accessibility
* tree.
*/
hideLabel?: boolean;

@@ -86,8 +101,8 @@ wrapLabel?: boolean;

inputDataset?: Dataset;
}
export interface SingleLineFieldCommonProps extends FieldCommonProps {
};
export declare type SingleLineFieldCommonProps = FieldCommonProps & {
type?: SingleLineInputType;
icon?: React.ReactElement<IconProps>;
button?: React.ReactElement<FieldButtonProps>;
}
};
/**

@@ -94,0 +109,0 @@ * public <*Field> props

import type { ColorName, Dataset, IconSize, TextAccent, TokyoUiIconSize } from '@preply/ds-core';
import { ReactSVGComponentType } from '../svg/types';
export interface IconProps {
export declare type IconProps = {
svg: ReactSVGComponentType;

@@ -11,5 +11,9 @@ size?: IconSize | TokyoUiIconSize;

color?: ColorName;
/**
* If using the icon without any adjacent descriptive text, use this prop to
* provide an `aria-label` for assistive technologies.
*/
label?: string;
dataset?: Dataset;
}
};
//# sourceMappingURL=types.d.ts.map

@@ -10,3 +10,2 @@ export * from './accessibility';

export * from './input';
export * from './instrument';
export * from './keyboard';

@@ -13,0 +12,0 @@ export * from './layout';

@@ -24,4 +24,2 @@ export { getDatasetProps, getExternalUrlProps } from './dom/props/index.js';

export { useForcedRef } from './input/utils/useForcedRef.js';
export { useInstrument } from './instrument/hooks/useInstrument.js';
export { InstrumentProvider } from './instrument/providers/Instrument.js';
export { useLayoutClassNames } from './layout/hooks/useLayoutClassNames.js';

@@ -58,2 +56,2 @@ export { useLayoutFlexClassNames } from './layout/hooks/useLayoutFlexClassNames.js';

export { useTextWeightClassNames } from './typography/module-text-weight/hooks/useTextWeightClassNames.js';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
import React from 'react';
import { getToken } from '../private/getToken.js';
import { useInstrument } from '../../instrument/hooks/useInstrument.js';
import { useTheme } from '../../theme/hooks/useTheme.js';

@@ -9,3 +8,2 @@ import { useColorScheme } from '../../color-scheme/hooks/useColorScheme.js';

const Wrapper = ({ ...props }) => {
useInstrument('api', { api: 'withGetToken' });
const { theme } = useTheme();

@@ -21,2 +19,2 @@ const { colorScheme } = useColorScheme();

export { withGetToken };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2l0aEdldFRva2VuLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdG9rZW4vaG9jcy93aXRoR2V0VG9rZW4udHN4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVG9rZW4sIFRva2VuVmFsdWUgfSBmcm9tICdAcHJlcGx5L2RzLWNvcmUtdHlwZXMnO1xuaW1wb3J0IFJlYWN0LCB7IENvbXBvbmVudFR5cGUsIEZDIH0gZnJvbSAncmVhY3QnO1xuXG5pbXBvcnQgeyB1c2VDb2xvclNjaGVtZSB9IGZyb20gJy4uLy4uL2NvbG9yLXNjaGVtZSc7XG5pbXBvcnQgeyB1c2VJbnN0cnVtZW50IH0gZnJvbSAnLi4vLi4vaW5zdHJ1bWVudCc7XG5pbXBvcnQgeyB1c2VUaGVtZSB9IGZyb20gJy4uLy4uL3RoZW1lJztcbmltcG9ydCB7IGdldFRva2VuIGFzIGdldFRva2VuUHJpdmF0ZSB9IGZyb20gJy4uL3ByaXZhdGUvZ2V0VG9rZ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NQSxVQUFRLEdBQUcsQ0FBQyxLQUFZLEtBQUtDLFFBQWUsQ0FBQyxLQUFLLEVBQUUsV0FBVyxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBRTlFLE9BQU8sb0JBQUMsU0FBUyxPQUFNLEtBQVcsRUFBRSxRQUFRLEVBQUVELFVBQVEsR0FBSSxDQUFDO0tBQzlELENBQUM7SUFFRixPQUFPLENBQUMsV0FBVyxHQUFHLGdCQUFnQixTQUFTLENBQUMsV0FBVyxHQUFHLENBQUM7SUFDL0QsT0FBTyxPQUFPLENBQUM7QUFDbkI7Ozs7In0=
import { TOKEN_ID_FIELD } from '@preply/ds-core-types';
import { loadInstrumentation, instrument } from '../../instrument/private/loader.js';
loadInstrumentation();
const ERROR_MESSAGE = 'Illegal "token" argument provided to getToken(). Are you using indexes? Example: "tokens.action.size[size]". Make sure it resolves to a token.';

@@ -18,3 +16,2 @@ const getToken = (theme, colorScheme, token) => {

}
instrument({ name: 'token', attributes: { token: id } });
return value;

@@ -24,2 +21,2 @@ };

export { getToken };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VG9rZW4uanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b2tlbi9wcml2YXRlL2dldFRva2VuLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRPS0VOX0lEX0ZJRUxELCBUb2tlbiwgVG9rZW5WYWx1ZSB9IGZyb20gJ0BwcmVwbHkvZHMtY29yZS10eXBlcyc7XG5cbmltcG9ydCB7IENvbG9yU2NoZW1lSW50ZXJmYWNlIH0gZnJvbSAnLi4vLi4vY29sb3Itc2NoZW1lJztcbmltcG9ydCB7IGluc3RydW1lbnQsIGxvYWRJbnN0cnVtZW50YXRpb24gfSBmcm9tICcuLi8uLi9pbnN0cnVtZW50L3ByaXZhdGUvbG9hZGVyJztcbmltcG9ydCB7IFRoZW1lSW50ZXJmYWNlIH0gZnJvbS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sUUFBUSxDQUFDLEtBQUssRUFBRSxXQUFXLENBQUMsQ0FBQztJQUVqRCxNQUFNLEVBQUUsR0FBRyxLQUFLLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDakMsSUFBSSxLQUFLLEtBQUssU0FBUyxFQUFFO1FBQ3JCLE1BQU0sSUFBSSxLQUFLLENBQUMsU0FBUyxFQUFFLFlBQVksQ0FBQyxDQUFDO0tBQzVDO0lBRUQsT0FBTyxLQUFVLENBQUM7QUFDdEI7Ozs7In0=
import { TOKEN_ID_FIELD } from '@preply/ds-core-types';
import { loadInstrumentation, instrument } from '../../instrument/private/loader.js';
loadInstrumentation();
function getTokenVar(token) {
const id = token[TOKEN_ID_FIELD];
instrument({ name: 'token', attributes: { token: id } });
return `var(--${id})`;

@@ -12,2 +9,2 @@ }

export { getTokenVar };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VG9rZW5WYXIuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b2tlbi91dGlsL2dldFRva2VuVmFyLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRPS0VOX0lEX0ZJRUxELCBUb2tlbiB9IGZyb20gJ0BwcmVwbHkvZHMtY29yZS10eXBlcyc7XG5cbmltcG9ydCB7IGluc3RydW1lbnQsIGxvYWRJbnN0cnVtZW50YXRpb24gfSBmcm9tICcuLi8uLi9pbnN0cnVtZW50L3ByaXZhdGUvbG9hZGVyJztcblxubG9hZEluc3RydW1lbnRhdGlvbigpO1xuXG5leHBvcnQgZnVuY3Rpb24gZ2V0VG9rZW5WYXIodG9rZW46IFRva2VuKTogc3RyaW5nIHtcbiAgICBjb25zdCBpZCA9IHRva2VuW1RPS0VOX0lEX0ZJRUxEXTtcbiAgICBpbnN0cnVtZW50KHsgbmFtZTogJ3Rva2VuJywgYXR0cmlidXRlczogeyB0b2tlbjogaWQgfSB9KTtcbiAgICByZXR1cm4gYHZhcigtLSR7aWR9KWA7XG59XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBSUEsbUJBQW1CLEVBQUUsQ0FBQztTQUVOLFdBQVcsQ0FBQyxLQUFZO0lBQ3BDLE1BQU0sRUFBRSxHQUFHLEtBQUssQ0FBQyxjQUFjLENBQUMsQ0FBQztJQUNqQyxVQUFVLENBQUMsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLFVBQVUsRUFBRSxFQUFFLEtBQUssRUFBRSxFQUFFLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDekQsT0FBTyxTQUFTLEVBQUUsR0FBRyxDQUFDO0FBQzFCOzs7OyJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0VG9rZW5WYXIuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b2tlbi91dGlsL2dldFRva2VuVmFyLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRPS0VOX0lEX0ZJRUxELCBUb2tlbiB9IGZyb20gJ0BwcmVwbHkvZHMtY29yZS10eXBlcyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRUb2tlblZhcih0b2tlbjogVG9rZW4pOiBzdHJpbmcge1xuICAgIGNvbnN0IGlkID0gdG9rZW5bVE9LRU5fSURfRklFTERdO1xuICAgIHJldHVybiBgdmFyKC0tJHtpZH0pYDtcbn1cbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztTQUVnQixXQUFXLENBQUMsS0FBWTtJQUNwQyxNQUFNLEVBQUUsR0FBRyxLQUFLLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDakMsT0FBTyxTQUFTLEVBQUUsR0FBRyxDQUFDO0FBQzFCOzs7OyJ9
import { useStyleExtract } from '../../../ssr/hooks/useStyleExtract.js';
import styles from '../style/index.module.less.js';
import { useInstrument } from '../../../instrument/hooks/useInstrument.js';
import { moduleLocals, stringClassNames } from '../../../css-module/classNames.js';

@@ -8,6 +7,2 @@

const useTextWeightClassNames = (weight) => {
useInstrument('render', {
component: '*',
props: { weight },
});
useStyleExtract(styles);

@@ -18,2 +13,2 @@ return moduleLocals(styles, TEXT_WEIGHT, [stringClassNames('weight', weight)]);

export { useTextWeightClassNames };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVGV4dFdlaWdodENsYXNzTmFtZXMuanMiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy90eXBvZ3JhcGh5L21vZHVsZS10ZXh0LXdlaWdodC9ob29rcy91c2VUZXh0V2VpZ2h0Q2xhc3NOYW1lcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBUZXh0V2VpZ2h0IH0gZnJvbSAnQHByZXBseS9kcy1jb3JlJztcblxuaW1wb3J0IHsgbW9kdWxlTG9jYWxzLCBzdHJpbmdDbGFzc05hbWVzIH0gZnJvbSAnLi4vLi4vLi4vY3NzLW1vZHVsZSc7XG5pbXBvcnQgeyB1c2VJbnN0cnVtZW50IH0gZnJvbSAnLi4vLi4vLi4vaW5zdHJ1bWVudCc7XG5pbXBvcnQgeyB1c2VTdHlsZUV4dHJhY3QgfSBmcm9tICcuLi8uLi8uLi9zc3IvaG9va3MvdXNlU3R5bGVFeHRyYWN0JztcbmltcG9ydCBzdHlsZXMgZnJvbSAnLi4vc3R5bGUvaW5kZXgubW9kdWxlLmxlc3MnO1xuXG5jb25zdCBURVhUX1dFSUdIVCA9ICdUZXh0V2VpZ2h0JztcblxuZXhwb3J0IGNvbnN0IHVzZVRleHRXZWlnaHRDbGFzc05hbWVzID0gKHdlaWdodD86IFRleHRXZWlnaHQpOiBzdHJpbmdbXSA9PiB7XG4gICAgdXNlSW5zdHJ1bWVudCgncmVuZGVyJywge1xuICAgICAgICBjb21wb25lbnQ6ICcqJyxcbiAgICAgICAgcHJvcHM6IHsgd2VpZ2h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i8uLi8uLi9zc3IvaG9va3MvdXNlU3R5bGVFeHRyYWN0JztcbmltcG9ydCBzdHlsZXMgZnJvbSAnLi4vc3R5bGUvaW5kZXgubW9kdWxlLmxlc3MnO1xuXG5jb25zdCBURVhUX1dFSUdIVCA9ICdUZXh0V2VpZ2h0JztcblxuZXhwb3J0IGNvbnN0IHVzZVRleHRXZWlnaHRDbGFzc05hbWVzID0gKHdlaWdodD86IFRleHRXZWlnaHQpOiBzdHJpbmdbXSA9PiB7XG4gICAgdXNlU3R5bGVFeHRyYWN0KHN0eWxlcyk7XG5cbiAgICByZXR1cm4gbW9kdWxlTG9jYWxzKHN0eWxlcywgVEVYVF9XRUlHSFQsIFtzdHJpbmdDbGFzc05hbWVzKCd3ZWlnaHQnLCB3ZWlnaHQpXSk7XG59O1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFNQSxNQUFNLFdBQVcsR0FBRyxZQUFZLENBQUM7TUFFcEIsdUJBQXVCLEdBQUcsQ0FBQyxNQUFtQjtJQUN2RCxlQUFlLENBQUMsTUFBTSxDQUFDLENBQUM7SUFFeEIsT0FBTyxZQUFZLENBQUMsTUFBTSxFQUFFLFdBQVcsRUFBRSxDQUFDLGdCQUFnQixDQUFDLFFBQVEsRUFBRSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDbkY7Ozs7In0=
{
"name": "@preply/ds-web-core",
"version": "0.93.0",
"version": "0.94.0",
"publishConfig": {

@@ -22,12 +22,12 @@ "access": "public"

"dependencies": {
"@preply/ds-core": "0.93.0",
"@preply/ds-core-types": "0.93.0"
"@preply/ds-core": "0.94.0",
"@preply/ds-core-types": "0.94.0"
},
"peerDependencies": {
"@preply/ds-core": "0.93.0",
"@preply/ds-core-types": "0.93.0",
"@preply/ds-core": "0.94.0",
"@preply/ds-core-types": "0.94.0",
"react": "^16.8.3",
"react-dom": "^16.8.3"
},
"gitHead": "9c5106a46de31327e9dcb5c26a360bff6f8c1b2f"
"gitHead": "b29323b5a055a62fa75d0370f86423ac562cb43e"
}

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

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

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