@foxford/ui 2.7.0-beta-5133c5e-20230721 → 2.7.0-beta-2a454ae-20230811

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dts/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { DefaultTheme, FlattenSimpleInterpolation, CSSObject, SimpleInterpolatio
4
4
  import * as react from 'react';
5
5
  import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes, PureComponent } from 'react';
6
6
  import { ResponsiveNamedProperty as ResponsiveNamedProperty$1, ResponsiveProperty as ResponsiveProperty$1 } from 'mixins/responsive-property';
7
- import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1 } from 'shared/interfaces';
7
+ import { BaseProps as BaseProps$1, Nullable as Nullable$1, FontWeight as FontWeight$1, InputField as InputField$1 } from 'shared/interfaces';
8
8
  import { SizeLatin as SizeLatin$1 } from 'shared/enums/sizeLatin';
9
9
  import { Link, NavLink } from 'react-router-dom';
10
10
  import { Display as Display$1 } from 'mixins/display';
@@ -332,11 +332,7 @@ interface InputField extends Color, Color<'placeholderColor'>, ResponsiveNamedPr
332
332
  */
333
333
  fluid?: boolean;
334
334
  /**
335
- * Children react node
336
- */
337
- children?: React.ReactNode;
338
- /**
339
- * Rounded style
335
+ * @preset {Default} Rounded style
340
336
  */
341
337
  rounded?: boolean;
342
338
  /**
@@ -2135,56 +2131,27 @@ declare class ContextMenu extends PureComponent<ContextMenuProps, {
2135
2131
  }
2136
2132
 
2137
2133
  declare type TextAreaHTMLAttributes = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'cols' | 'rows' | 'color'>;
2138
- interface TextareaProps extends BaseProps, InputField, TextAreaHTMLAttributes {
2139
- /**
2140
- * Specifies the visible width of a text area
2141
- */
2134
+ interface TextareaProps extends BaseProps$1, InputField$1, TextAreaHTMLAttributes {
2135
+ /** Specifies the visible width of a text area */
2142
2136
  cols?: number;
2143
- /**
2144
- * Specifies the visible number of lines in a text area
2145
- */
2137
+ /** Specifies the visible number of lines in a text area */
2146
2138
  rows?: number;
2147
- /**
2148
- * Specifies the visible max number of lines in a text area
2149
- */
2139
+ /** Specifies the visible max number of lines in a text area */
2150
2140
  maxRows?: number;
2151
- /**
2152
- * Specifies the maximum number of characters allowed in the text area
2153
- */
2141
+ /** Specifies the maximum number of characters allowed in the text area */
2154
2142
  maxLength?: number;
2155
- /**
2156
- * On change handler
2157
- */
2143
+ /** On change handler */
2158
2144
  onChange?(_event: React.ChangeEvent<HTMLTextAreaElement>): void;
2159
- /**
2160
- * Value
2161
- */
2145
+ /** Value */
2162
2146
  value?: string;
2163
- /**
2164
- * Autosize for textarea
2165
- */
2147
+ /** Autosize for textarea */
2166
2148
  autosize?: boolean;
2167
2149
  }
2168
- /**
2169
- * Расширен:
2170
- * - [`BaseProps`](#/Миксины)
2171
- * - [`InputField`](#/Миксины)
2172
- * - `React.TextareaHTMLAttributes<HTMLTextAreaElement>`
2173
- */
2174
- declare function Textarea({ cols, disabled, error, fluid, name, onChange, maxLength, placeholder, required, rounded, rows, tabIndex, value, className, style, children, autosize, maxRows, color, placeholderColor, ...props }: typeof Textarea.defaultProps & TextareaProps): JSX.Element;
2175
- declare namespace Textarea {
2176
- var defaultProps: {
2177
- onChange: (e: react.ChangeEvent<HTMLTextAreaElement>) => void;
2178
- rounded: boolean;
2179
- color: string;
2180
- placeholderColor: string;
2181
- cols: number;
2182
- maxRows: number;
2183
- rows: number;
2184
- autosize: boolean;
2185
- };
2186
- var displayName: string;
2187
- }
2150
+
2151
+ declare const Textarea: {
2152
+ (props: TextareaProps): JSX.Element;
2153
+ displayName: string;
2154
+ };
2188
2155
 
2189
2156
  interface InputPhoneProps extends InputProps {
2190
2157
  /**
@@ -1,2 +1,2 @@
1
- import e from'@babel/runtime/helpers/objectSpread2';import{useMemo as r}from'react';function t(t,n){return r((()=>{var r=null!=t?t:{};var u=null!=n?n:{};return[...new Set([...Object.keys(r),...Object.keys(u)])].reduce(((t,n)=>{var a;return o(r[n])&&(a=r[n]),o(u[n])&&(a=u[n]),o(a)?e(e({},t),{},{[n]:a}):t}),{})}),[t,n])}function o(e){return Boolean(e)||'boolean'==typeof e||'number'==typeof e}export{t as useConfigPriority};
1
+ import e from'@babel/runtime/helpers/objectSpread2';import{useMemo as r}from'react';function t(t,n){return r((()=>{var r=null!=t?t:{};var u=null!=n?n:{};return[...new Set([...Object.keys(r),...Object.keys(u)])].reduce(((t,n)=>{var a;return o(r[n])&&(a=r[n]),o(u[n])&&(a=u[n]),o(a)?e(e({},t),{},{[n]:a}):t}),{})}),[t,n])}function o(e){return Boolean(e)||'boolean'==typeof e||'number'==typeof e||'string'==typeof e}export{t as useConfigPriority};
2
2
  //# sourceMappingURL=use-config-priority.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-config-priority.js","sources":["../../../src/hooks/use-config-priority.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nexport function useConfigPriority<T extends object>(minor?: Partial<T>, major?: Partial<T>): Partial<T> {\n return useMemo(() => {\n const minorConfig = minor ?? {}\n const majorConfig = major ?? {}\n const uniqueKeys = [...new Set([...Object.keys(minorConfig), ...Object.keys(majorConfig)])]\n\n return uniqueKeys.reduce((prioritized, key) => {\n let finalVal\n\n if (valid(minorConfig[key])) finalVal = minorConfig[key]\n if (valid(majorConfig[key])) finalVal = majorConfig[key]\n\n return valid(finalVal) ? { ...prioritized, [key]: finalVal } : prioritized\n }, {} as Partial<T>)\n }, [minor, major])\n}\n\nfunction valid(value: unknown): boolean {\n return Boolean(value) || typeof value === 'boolean' || typeof value === 'number'\n}\n"],"names":["useConfigPriority","minor","major","useMemo","minorConfig","majorConfig","Set","Object","keys","reduce","prioritized","key","finalVal","valid","value","Boolean"],"mappings":"oFAEO,SAASA,EAAoCC,EAAoBC,GACtE,OAAOC,GAAQ,KACb,IAAMC,EAAcH,MAAAA,EAAAA,EAAS,GAC7B,IAAMI,EAAcH,MAAAA,EAAAA,EAAS,GAG7B,MAFmB,IAAI,IAAII,IAAI,IAAIC,OAAOC,KAAKJ,MAAiBG,OAAOC,KAAKH,MAE1DI,QAAO,CAACC,EAAaC,KACrC,IAAIC,EAKJ,OAHIC,EAAMT,EAAYO,MAAOC,EAAWR,EAAYO,IAChDE,EAAMR,EAAYM,MAAOC,EAAWP,EAAYM,IAE7CE,EAAMD,UAAiBF,GAAvB,GAAA,CAAoCC,CAACA,GAAMC,IAAaF,IAC9D,MACF,CAACT,EAAOC,IAGb,SAASW,EAAMC,GACb,OAAOC,QAAQD,IAA2B,kBAAVA,GAAwC,iBAAVA"}
1
+ {"version":3,"file":"use-config-priority.js","sources":["../../../src/hooks/use-config-priority.ts"],"sourcesContent":["import { useMemo } from 'react'\n\nexport function useConfigPriority<T extends object>(minor?: Partial<T>, major?: Partial<T>): Partial<T> {\n return useMemo(() => {\n const minorConfig = minor ?? {}\n const majorConfig = major ?? {}\n const uniqueKeys = [...new Set([...Object.keys(minorConfig), ...Object.keys(majorConfig)])]\n\n return uniqueKeys.reduce((prioritized, key) => {\n let finalVal\n\n if (valid(minorConfig[key])) finalVal = minorConfig[key]\n if (valid(majorConfig[key])) finalVal = majorConfig[key]\n\n return valid(finalVal) ? { ...prioritized, [key]: finalVal } : prioritized\n }, {} as Partial<T>)\n }, [minor, major])\n}\n\nfunction valid(value: unknown): boolean {\n return Boolean(value) || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string'\n}\n"],"names":["useConfigPriority","minor","major","useMemo","minorConfig","majorConfig","Set","Object","keys","reduce","prioritized","key","finalVal","valid","value","Boolean"],"mappings":"oFAEO,SAASA,EAAoCC,EAAoBC,GACtE,OAAOC,GAAQ,KACb,IAAMC,EAAcH,MAAAA,EAAAA,EAAS,GAC7B,IAAMI,EAAcH,MAAAA,EAAAA,EAAS,GAG7B,MAFmB,IAAI,IAAII,IAAI,IAAIC,OAAOC,KAAKJ,MAAiBG,OAAOC,KAAKH,MAE1DI,SAAQC,EAAaC,KACrC,IAAIC,EAKJ,OAHIC,EAAMT,EAAYO,MAAOC,EAAWR,EAAYO,IAChDE,EAAMR,EAAYM,MAAOC,EAAWP,EAAYM,IAE7CE,EAAMD,UAAiBF,GAAvB,GAAA,CAAoCC,CAACA,GAAMC,IAAaF,IAC9D,MACF,CAACT,EAAOC,IAGb,SAASW,EAAMC,GACb,OAAOC,QAAQD,IAA2B,kBAAVA,GAAwC,iBAAVA,GAAuC,iBAAVA"}