@foxford/ui 2.10.0-beta-7f4c4c4-20230914 → 2.11.0-beta-e832521-20230918
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/components/Tooltip/Tooltip.js.map +1 -1
- package/dts/index.d.ts +132 -27
- package/index.cjs.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import Floater from 'react-floater'\nimport { mergeDeepRight } from 'ramda'\nimport { tooltipStyles, tooltipStylesRounend, tooltipDisplayBlockStyles } from './tooltip-styles'\n\nTooltip.defaultProps = {\n autoOpen: false,\n disableAnimation: false,\n disableFlip: false,\n disableHoverToClick: false,\n event: 'click',\n eventDelay: 0.4,\n offset: 15,\n placement: 'bottom',\n showCloseButton: false,\n styles: tooltipStyles,\n target: null,\n wrapperOptions: {\n position: false,\n },\n component: null,\n}\n\nTooltip.themes = {\n tooltipStyles,\n tooltipDisplayBlockStyles,\n tooltipStylesRounend,\n}\n\nTooltip.displayName = 'Tooltip'\n\
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import Floater from 'react-floater'\nimport type { Props } from 'react-floater/lib/types'\nimport { mergeDeepRight } from 'ramda'\nimport { tooltipStyles, tooltipStylesRounend, tooltipDisplayBlockStyles } from './tooltip-styles'\nimport type { TooltipDefaultProps, TooltipDefaultStyles } from './types'\n\nTooltip.defaultProps = {\n autoOpen: false,\n disableAnimation: false,\n disableFlip: false,\n disableHoverToClick: false,\n event: 'click',\n eventDelay: 0.4,\n offset: 15,\n placement: 'bottom',\n showCloseButton: false,\n styles: tooltipStyles,\n target: null,\n wrapperOptions: {\n position: false,\n },\n component: null,\n} as TooltipDefaultProps\n\nTooltip.themes = {\n tooltipStyles,\n tooltipDisplayBlockStyles,\n tooltipStylesRounend,\n} as TooltipDefaultStyles\n\nTooltip.displayName = 'Tooltip'\n\nexport type TooltipProps = Props\n\n/**\n * Основан на [react-floater](https://github.com/gilbarbara/react-floater).\n */\nexport function Tooltip({ children, styles = {}, ...props }: TooltipProps) {\n const tooltipStyle = mergeDeepRight(tooltipStyles || {}, styles) as TooltipProps['styles']\n\n return (\n <Floater styles={tooltipStyle} {...props}>\n <span>{children}</span>\n </Floater>\n )\n}\n"],"names":["Tooltip","_ref","children","styles","props","_objectWithoutProperties","_excluded","tooltipStyle","mergeDeepRight","tooltipStyles","_jsx","Floater","_objectSpread","defaultProps","autoOpen","disableAnimation","disableFlip","disableHoverToClick","event","eventDelay","offset","placement","showCloseButton","target","wrapperOptions","position","component","themes","tooltipDisplayBlockStyles","tooltipStylesRounend","displayName"],"mappings":"uWAqCO,SAASA,EAA2DC,GAAA,IAAnDC,SAAEA,EAAFC,OAAYA,EAAS,IAA8BF,EAAvBG,EAAuBC,EAAAJ,EAAAK,GACzE,IAAMC,EAAeC,EAAeC,GAAiB,GAAIN,GAEzD,OACEO,EAACC,EAADC,EAAAA,EAAA,CAAST,OAAQI,GAAkBH,GAAnC,GAAA,CAAAF,SACEQ,EAAA,OAAA,CAAAR,SAAOA,OApCbF,EAAQa,aAAe,CACrBC,UAAU,EACVC,oBACAC,aAAAA,EACAC,qBAAqB,EACrBC,MAAO,QACPC,WAAY,GACZC,OAAQ,GACRC,UAAW,SACXC,iBAAiB,EACjBnB,OAAQM,EACRc,OAAQ,KACRC,eAAgB,CACdC,UAAU,GAEZC,UAAW,MAGb1B,EAAQ2B,OAAS,CACflB,cAAAA,EACAmB,0BAAAA,EACAC,qBAAAA,GAGF7B,EAAQ8B,YAAc"}
|
package/dts/index.d.ts
CHANGED
|
@@ -8,9 +8,7 @@ import { Classes } from 'react-modal';
|
|
|
8
8
|
import * as rc_scrollbars_lib_Scrollbars_types from 'rc-scrollbars/lib/Scrollbars/types';
|
|
9
9
|
import * as rc_scrollbars from 'rc-scrollbars';
|
|
10
10
|
import { ScrollbarsProps } from 'rc-scrollbars';
|
|
11
|
-
import
|
|
12
|
-
import * as react_floater_lib_types from 'react-floater/lib/types';
|
|
13
|
-
import Floater from 'react-floater';
|
|
11
|
+
import { Styles, Props } from 'react-floater/lib/types';
|
|
14
12
|
import { InputState, MaskOptions } from 'react-input-mask';
|
|
15
13
|
import { ReactSelectProps } from 'react-select';
|
|
16
14
|
|
|
@@ -2398,35 +2396,142 @@ declare namespace Tabs {
|
|
|
2398
2396
|
var Tab: typeof TabsTab;
|
|
2399
2397
|
}
|
|
2400
2398
|
|
|
2401
|
-
|
|
2402
|
-
|
|
2399
|
+
/**
|
|
2400
|
+
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
2401
|
+
|
|
2402
|
+
@category Type
|
|
2403
|
+
*/
|
|
2404
|
+
type Primitive =
|
|
2405
|
+
| null
|
|
2406
|
+
| undefined
|
|
2407
|
+
| string
|
|
2408
|
+
| number
|
|
2409
|
+
| boolean
|
|
2410
|
+
| symbol
|
|
2411
|
+
| bigint;
|
|
2412
|
+
|
|
2413
|
+
declare global {
|
|
2414
|
+
interface SymbolConstructor {
|
|
2415
|
+
readonly observable: symbol;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
Matches any primitive, `Date`, or `RegExp` value.
|
|
2421
|
+
*/
|
|
2422
|
+
type BuiltIns = Primitive | Date | RegExp;
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
Create a type from another type with all keys and nested keys set to optional.
|
|
2426
|
+
|
|
2427
|
+
Use-cases:
|
|
2428
|
+
- Merging a default settings/config object with another object, the second object would be a deep partial of the default object.
|
|
2429
|
+
- Mocking and testing complex entities, where populating an entire object with its keys would be redundant in terms of the mock or test.
|
|
2430
|
+
|
|
2431
|
+
@example
|
|
2432
|
+
```
|
|
2433
|
+
import type {PartialDeep} from 'type-fest';
|
|
2434
|
+
|
|
2435
|
+
const settings: Settings = {
|
|
2436
|
+
textEditor: {
|
|
2437
|
+
fontSize: 14;
|
|
2438
|
+
fontColor: '#000000';
|
|
2439
|
+
fontWeight: 400;
|
|
2440
|
+
}
|
|
2441
|
+
autocomplete: false;
|
|
2442
|
+
autosave: true;
|
|
2443
|
+
};
|
|
2444
|
+
|
|
2445
|
+
const applySavedSettings = (savedSettings: PartialDeep<Settings>) => {
|
|
2446
|
+
return {...settings, ...savedSettings};
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
settings = applySavedSettings({textEditor: {fontWeight: 500}});
|
|
2450
|
+
```
|
|
2451
|
+
|
|
2452
|
+
@category Object
|
|
2453
|
+
@category Array
|
|
2454
|
+
@category Set
|
|
2455
|
+
@category Map
|
|
2456
|
+
*/
|
|
2457
|
+
type PartialDeep<T> = T extends BuiltIns
|
|
2458
|
+
? T
|
|
2459
|
+
: T extends Map<infer KeyType, infer ValueType>
|
|
2460
|
+
? PartialMapDeep<KeyType, ValueType>
|
|
2461
|
+
: T extends Set<infer ItemType>
|
|
2462
|
+
? PartialSetDeep<ItemType>
|
|
2463
|
+
: T extends ReadonlyMap<infer KeyType, infer ValueType>
|
|
2464
|
+
? PartialReadonlyMapDeep<KeyType, ValueType>
|
|
2465
|
+
: T extends ReadonlySet<infer ItemType>
|
|
2466
|
+
? PartialReadonlySetDeep<ItemType>
|
|
2467
|
+
: T extends ((...arguments: any[]) => unknown)
|
|
2468
|
+
? T | undefined
|
|
2469
|
+
: T extends object
|
|
2470
|
+
? T extends Array<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
|
|
2471
|
+
? ItemType[] extends T // Test for arrays (non-tuples) specifically
|
|
2472
|
+
? Array<PartialDeep<ItemType | undefined>> // Recreate relevant array type to prevent eager evaluation of circular reference
|
|
2473
|
+
: PartialObjectDeep<T> // Tuples behave properly
|
|
2474
|
+
: PartialObjectDeep<T>
|
|
2475
|
+
: unknown;
|
|
2476
|
+
|
|
2477
|
+
/**
|
|
2478
|
+
Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
|
|
2479
|
+
*/
|
|
2480
|
+
interface PartialMapDeep<KeyType, ValueType> extends Map<PartialDeep<KeyType>, PartialDeep<ValueType>> {}
|
|
2481
|
+
|
|
2482
|
+
/**
|
|
2483
|
+
Same as `PartialDeep`, but accepts only `Set`s as inputs. Internal helper for `PartialDeep`.
|
|
2484
|
+
*/
|
|
2485
|
+
interface PartialSetDeep<T> extends Set<PartialDeep<T>> {}
|
|
2486
|
+
|
|
2487
|
+
/**
|
|
2488
|
+
Same as `PartialDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `PartialDeep`.
|
|
2489
|
+
*/
|
|
2490
|
+
interface PartialReadonlyMapDeep<KeyType, ValueType> extends ReadonlyMap<PartialDeep<KeyType>, PartialDeep<ValueType>> {}
|
|
2491
|
+
|
|
2492
|
+
/**
|
|
2493
|
+
Same as `PartialDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `PartialDeep`.
|
|
2494
|
+
*/
|
|
2495
|
+
interface PartialReadonlySetDeep<T> extends ReadonlySet<PartialDeep<T>> {}
|
|
2496
|
+
|
|
2497
|
+
/**
|
|
2498
|
+
Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
|
|
2499
|
+
*/
|
|
2500
|
+
type PartialObjectDeep<ObjectType extends object> = {
|
|
2501
|
+
[KeyType in keyof ObjectType]?: PartialDeep<ObjectType[KeyType]>
|
|
2502
|
+
};
|
|
2503
|
+
|
|
2504
|
+
declare type TooltipDefaultProps = {
|
|
2505
|
+
autoOpen: boolean;
|
|
2506
|
+
disableAnimation: boolean;
|
|
2507
|
+
disableFlip: boolean;
|
|
2508
|
+
disableHoverToClick: boolean;
|
|
2509
|
+
event: string;
|
|
2510
|
+
eventDelay: number;
|
|
2511
|
+
offset: number;
|
|
2512
|
+
placement: string;
|
|
2513
|
+
showCloseButton: boolean;
|
|
2514
|
+
styles: PartialDeep<Styles> | undefined;
|
|
2515
|
+
target: null;
|
|
2516
|
+
wrapperOptions: {
|
|
2517
|
+
position: boolean;
|
|
2518
|
+
};
|
|
2519
|
+
component: null;
|
|
2520
|
+
};
|
|
2521
|
+
declare type TooltipDefaultStyles = {
|
|
2522
|
+
tooltipStyles: PartialDeep<Styles> | undefined;
|
|
2523
|
+
tooltipDisplayBlockStyles: PartialDeep<Styles> | undefined;
|
|
2524
|
+
tooltipStylesRounend: PartialDeep<Styles> | undefined;
|
|
2525
|
+
};
|
|
2526
|
+
|
|
2527
|
+
declare type TooltipProps = Props;
|
|
2403
2528
|
/**
|
|
2404
2529
|
* Основан на [react-floater](https://github.com/gilbarbara/react-floater).
|
|
2405
2530
|
*/
|
|
2406
2531
|
declare function Tooltip({ children, styles, ...props }: TooltipProps): JSX.Element;
|
|
2407
2532
|
declare namespace Tooltip {
|
|
2408
|
-
var defaultProps:
|
|
2409
|
-
|
|
2410
|
-
disableAnimation: boolean;
|
|
2411
|
-
disableFlip: boolean;
|
|
2412
|
-
disableHoverToClick: boolean;
|
|
2413
|
-
event: string;
|
|
2414
|
-
eventDelay: number;
|
|
2415
|
-
offset: number;
|
|
2416
|
-
placement: string;
|
|
2417
|
-
showCloseButton: boolean;
|
|
2418
|
-
styles: type_fest_source_partial_deep.PartialObjectDeep<react_floater_lib_types.Styles> | undefined;
|
|
2419
|
-
target: null;
|
|
2420
|
-
wrapperOptions: {
|
|
2421
|
-
position: boolean;
|
|
2422
|
-
};
|
|
2423
|
-
component: null;
|
|
2424
|
-
};
|
|
2425
|
-
var themes: {
|
|
2426
|
-
tooltipStyles: type_fest_source_partial_deep.PartialObjectDeep<react_floater_lib_types.Styles> | undefined;
|
|
2427
|
-
tooltipDisplayBlockStyles: type_fest_source_partial_deep.PartialObjectDeep<react_floater_lib_types.Styles> | undefined;
|
|
2428
|
-
tooltipStylesRounend: type_fest_source_partial_deep.PartialObjectDeep<react_floater_lib_types.Styles> | undefined;
|
|
2429
|
-
};
|
|
2533
|
+
var defaultProps: TooltipDefaultProps;
|
|
2534
|
+
var themes: TooltipDefaultStyles;
|
|
2430
2535
|
var displayName: string;
|
|
2431
2536
|
}
|
|
2432
2537
|
|