@gooddata/sdk-ui-kit 10.27.0-alpha.5 → 10.27.0-alpha.51
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/esm/@ui/@types/icon.d.ts +1 -1
- package/esm/@ui/@types/icon.d.ts.map +1 -1
- package/esm/@ui/UiButton/UiButton.d.ts +2 -0
- package/esm/@ui/UiButton/UiButton.d.ts.map +1 -1
- package/esm/@ui/UiButton/UiButton.js +2 -2
- package/esm/@ui/UiButton/UiButton.js.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.d.ts.map +1 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js +9 -1
- package/esm/@ui/UiFocusTrap/UiFocusTrap.js.map +1 -1
- package/esm/@ui/UiIcon/icons.d.ts +92 -2
- package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
- package/esm/@ui/UiIcon/icons.js +78 -0
- package/esm/@ui/UiIcon/icons.js.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.d.ts.map +1 -1
- package/esm/@ui/UiListbox/UiListbox.js +1 -3
- package/esm/@ui/UiListbox/UiListbox.js.map +1 -1
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.d.ts +5 -2
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.d.ts.map +1 -1
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxStaticItemComponent.js.map +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.d.ts +2 -2
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.d.ts.map +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.js +1 -1
- package/esm/@ui/UiListbox/defaults/firstCharacterSearch.js.map +1 -1
- package/esm/@ui/UiListbox/types.d.ts +4 -4
- package/esm/@ui/UiListbox/types.d.ts.map +1 -1
- package/esm/@ui/UiMenu/UiMenu.d.ts +11 -0
- package/esm/@ui/UiMenu/UiMenu.d.ts.map +1 -0
- package/esm/@ui/UiMenu/UiMenu.js +36 -0
- package/esm/@ui/UiMenu/UiMenu.js.map +1 -0
- package/esm/@ui/UiMenu/context.d.ts +11 -0
- package/esm/@ui/UiMenu/context.d.ts.map +1 -0
- package/esm/@ui/UiMenu/context.js +11 -0
- package/esm/@ui/UiMenu/context.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts +7 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.js +22 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuGroupItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts +9 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js +39 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuHeaderComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts +11 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js +59 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuInteractiveItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts +8 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.d.ts.map +1 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js +14 -0
- package/esm/@ui/UiMenu/defaults/DefaultUiMenuStaticItemComponent.js.map +1 -0
- package/esm/@ui/UiMenu/hooks.d.ts +16 -0
- package/esm/@ui/UiMenu/hooks.d.ts.map +1 -0
- package/esm/@ui/UiMenu/hooks.js +173 -0
- package/esm/@ui/UiMenu/hooks.js.map +1 -0
- package/esm/@ui/UiMenu/itemUtils.d.ts +18 -0
- package/esm/@ui/UiMenu/itemUtils.d.ts.map +1 -0
- package/esm/@ui/UiMenu/itemUtils.js +101 -0
- package/esm/@ui/UiMenu/itemUtils.js.map +1 -0
- package/esm/@ui/UiMenu/menuBem.d.ts +2 -0
- package/esm/@ui/UiMenu/menuBem.d.ts.map +1 -0
- package/esm/@ui/UiMenu/menuBem.js +4 -0
- package/esm/@ui/UiMenu/menuBem.js.map +1 -0
- package/esm/@ui/UiMenu/types.d.ts +124 -0
- package/esm/@ui/UiMenu/types.d.ts.map +1 -0
- package/esm/@ui/UiMenu/types.js +3 -0
- package/esm/@ui/UiMenu/types.js.map +1 -0
- package/esm/Dialog/ConfirmDialogBase.d.ts.map +1 -1
- package/esm/Dialog/ConfirmDialogBase.js +1 -1
- package/esm/Dialog/ConfirmDialogBase.js.map +1 -1
- package/esm/Dialog/DialogBase.d.ts.map +1 -1
- package/esm/Dialog/DialogBase.js +2 -2
- package/esm/Dialog/DialogBase.js.map +1 -1
- package/esm/Dialog/DialogCloseButton.d.ts +1 -1
- package/esm/Dialog/DialogCloseButton.d.ts.map +1 -1
- package/esm/Dialog/DialogCloseButton.js +11 -2
- package/esm/Dialog/DialogCloseButton.js.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.js +1 -5
- package/esm/Dialog/ShareDialog/ShareDialogBase/AddGranteeBase.js.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.js +1 -5
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.js.map +1 -1
- package/esm/Dialog/typings.d.ts +1 -0
- package/esm/Dialog/typings.d.ts.map +1 -1
- package/esm/Dropdown/Dropdown.d.ts +1 -1
- package/esm/Dropdown/Dropdown.d.ts.map +1 -1
- package/esm/Dropdown/Dropdown.js +1 -1
- package/esm/Dropdown/Dropdown.js.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.d.ts +5 -4
- package/esm/Header/generateHeaderAccountMenuItems.d.ts.map +1 -1
- package/esm/Header/generateHeaderAccountMenuItems.js +18 -24
- package/esm/Header/generateHeaderAccountMenuItems.js.map +1 -1
- package/esm/List/ListItem.js +2 -2
- package/esm/List/ListItem.js.map +1 -1
- package/esm/index.d.ts +5 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -0
- package/esm/index.js.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.d.ts +8 -0
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.d.ts.map +1 -1
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.js +94 -32
- package/esm/measureNumberFormat/customFormatDialog/FormatInput.js.map +1 -1
- package/esm/sdk-ui-kit.d.ts +282 -28
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts +3 -5
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js +81 -58
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js.map +1 -1
- package/esm/typings/accessibility.d.ts +2 -2
- package/esm/typings/accessibility.d.ts.map +1 -1
- package/package.json +15 -12
- package/src/@ui/UiChip/UiChip.scss +1 -0
- package/src/@ui/UiListbox/UiListbox.scss +2 -4
- package/src/@ui/UiMenu/UiMenu.scss +122 -0
- package/src/@ui/index.scss +1 -0
- package/styles/css/list.css +1 -1
- package/styles/css/main.css +126 -540
- package/styles/css/main.css.map +1 -1
- package/styles/css/menu.css +1 -1
- package/styles/css/syntaxHighlightingInput.css +19 -537
- package/styles/css/syntaxHighlightingInput.css.map +1 -1
- package/styles/scss/list.scss +1 -1
- package/styles/scss/mixins.scss +6 -0
- package/styles/scss/syntaxHighlightingInput.scss +10 -43
- package/styles/scss/typo-mixins.scss +1 -1
package/esm/sdk-ui-kit.d.ts
CHANGED
@@ -16,6 +16,7 @@ import { ColorFormats } from 'tinycolor2';
|
|
16
16
|
import { Component } from 'react';
|
17
17
|
import { CSSProperties } from 'react';
|
18
18
|
import { DebouncedFunc } from 'lodash';
|
19
|
+
import { Extension } from '@codemirror/state';
|
19
20
|
import { GoodDataSdkError } from '@gooddata/sdk-ui';
|
20
21
|
import { IAccessControlAware } from '@gooddata/sdk-model';
|
21
22
|
import { IAccessGrantee } from '@gooddata/sdk-model';
|
@@ -557,6 +558,17 @@ export declare function DefaultUiListboxInteractiveItemComponent<T>({ item, isFo
|
|
557
558
|
*/
|
558
559
|
export declare function DefaultUiListboxStaticItemComponent<T>({ item, }: UiListboxStaticItemProps<T>): React_2.ReactNode;
|
559
560
|
|
561
|
+
/**
|
562
|
+
* @internal
|
563
|
+
*/
|
564
|
+
export declare function DefaultUiMenuInteractiveItemComponent<T extends IUiMenuItemData = object>({ item, isFocused, onSelect, }: UiMenuInteractiveItemProps<T>): React_2.ReactNode;
|
565
|
+
|
566
|
+
/**
|
567
|
+
* By default just renders the data.
|
568
|
+
* @internal
|
569
|
+
*/
|
570
|
+
export declare const DefaultUiMenuStaticItemComponent: React_2.MemoExoticComponent<(<T extends IUiMenuItemData = object>({ item }: UiMenuStaticItemProps<T>) => React_2.ReactElement)>;
|
571
|
+
|
560
572
|
/**
|
561
573
|
* @internal
|
562
574
|
*/
|
@@ -802,10 +814,12 @@ export declare const GD_COLOR_WHITE = "#fff";
|
|
802
814
|
/**
|
803
815
|
* @internal
|
804
816
|
*/
|
805
|
-
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions,
|
806
|
-
|
807
|
-
|
808
|
-
|
817
|
+
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, uiSettings: IUiSettings, workspaceId?: string, showOnlyLogoutItem?: boolean, featureFlags?: ISettings): IHeaderMenuItem[];
|
818
|
+
|
819
|
+
/**
|
820
|
+
* @internal
|
821
|
+
*/
|
822
|
+
export declare function generateHeaderAccountMenuItems(workspacePermissions: IWorkspacePermissions, workspaceId?: string, featureFlags?: ISettings): IHeaderMenuItem[];
|
809
823
|
|
810
824
|
/**
|
811
825
|
* @internal
|
@@ -1081,6 +1095,7 @@ export declare interface IAccessibilityConfigBase {
|
|
1081
1095
|
ariaLabelledBy?: React.AriaAttributes["aria-labelledby"];
|
1082
1096
|
ariaDescribedBy?: React.AriaAttributes["aria-describedby"];
|
1083
1097
|
role?: React.HTMLAttributes<HTMLElement>["role"];
|
1098
|
+
ariaExpanded?: "true" | "false";
|
1084
1099
|
}
|
1085
1100
|
|
1086
1101
|
/**
|
@@ -1533,12 +1548,103 @@ export declare interface IConfirmDialogBaseProps extends Omit<IDialogBaseProps,
|
|
1533
1548
|
/**
|
1534
1549
|
* @internal
|
1535
1550
|
*/
|
1536
|
-
export declare const iconPaths:
|
1551
|
+
export declare const iconPaths: {
|
1552
|
+
check: React_2.JSX.Element;
|
1553
|
+
checkCircle: React_2.JSX.Element;
|
1554
|
+
plus: React_2.JSX.Element;
|
1555
|
+
plusCircle: React_2.JSX.Element;
|
1556
|
+
sync: React_2.JSX.Element;
|
1557
|
+
alert: React_2.JSX.Element;
|
1558
|
+
alertPaused: React_2.JSX.Element;
|
1559
|
+
close: React_2.JSX.Element;
|
1560
|
+
cross: React_2.JSX.Element;
|
1561
|
+
crossCircle: React_2.JSX.Element;
|
1562
|
+
question: React_2.JSX.Element;
|
1563
|
+
chevronUp: React_2.JSX.Element;
|
1564
|
+
chevronRight: React_2.JSX.Element;
|
1565
|
+
chevronDown: React_2.JSX.Element;
|
1566
|
+
chevronLeft: React_2.JSX.Element;
|
1567
|
+
date: React_2.JSX.Element;
|
1568
|
+
navigateUp: React_2.JSX.Element;
|
1569
|
+
navigateDown: React_2.JSX.Element;
|
1570
|
+
navigateRight: React_2.JSX.Element;
|
1571
|
+
download: React_2.JSX.Element;
|
1572
|
+
slack: React_2.JSX.Element;
|
1573
|
+
expand: React_2.JSX.Element;
|
1574
|
+
exclamationCircle: React_2.JSX.Element;
|
1575
|
+
book: React_2.JSX.Element;
|
1576
|
+
visible: React_2.JSX.Element;
|
1577
|
+
invisible: React_2.JSX.Element;
|
1578
|
+
lock: React_2.JSX.Element;
|
1579
|
+
unlock: React_2.JSX.Element;
|
1580
|
+
ai: React_2.JSX.Element;
|
1581
|
+
aiFill: React_2.JSX.Element;
|
1582
|
+
drawer: React_2.JSX.Element;
|
1583
|
+
prohibited: React_2.JSX.Element;
|
1584
|
+
dropDown: React_2.JSX.Element;
|
1585
|
+
dropRight: React_2.JSX.Element;
|
1586
|
+
clock: React_2.JSX.Element;
|
1587
|
+
questionMark: React_2.JSX.Element;
|
1588
|
+
upload: React_2.JSX.Element;
|
1589
|
+
expandRectangle: React_2.JSX.Element;
|
1590
|
+
file: React_2.JSX.Element;
|
1591
|
+
number: React_2.JSX.Element;
|
1592
|
+
code: React_2.JSX.Element;
|
1593
|
+
user: React_2.JSX.Element;
|
1594
|
+
userPlus: React_2.JSX.Element;
|
1595
|
+
users: React_2.JSX.Element;
|
1596
|
+
magic: React_2.JSX.Element;
|
1597
|
+
tab: React_2.JSX.Element;
|
1598
|
+
pauseCircle: React_2.JSX.Element;
|
1599
|
+
filter: React_2.JSX.Element;
|
1600
|
+
timer: React_2.JSX.Element;
|
1601
|
+
mail: React_2.JSX.Element;
|
1602
|
+
envelope: React_2.JSX.Element;
|
1603
|
+
copy: React_2.JSX.Element;
|
1604
|
+
rain: React_2.JSX.Element;
|
1605
|
+
earth: React_2.JSX.Element;
|
1606
|
+
minimize: React_2.JSX.Element;
|
1607
|
+
copyright: React_2.JSX.Element;
|
1608
|
+
ellipsis: React_2.JSX.Element;
|
1609
|
+
pencil: React_2.JSX.Element;
|
1610
|
+
folder: React_2.JSX.Element;
|
1611
|
+
folderPlus: React_2.JSX.Element;
|
1612
|
+
trash: React_2.JSX.Element;
|
1613
|
+
arrowUp: React_2.JSX.Element;
|
1614
|
+
arrowRight: React_2.JSX.Element;
|
1615
|
+
arrowDown: React_2.JSX.Element;
|
1616
|
+
arrowLeft: React_2.JSX.Element;
|
1617
|
+
undo: React_2.JSX.Element;
|
1618
|
+
redo: React_2.JSX.Element;
|
1619
|
+
trendDown: React_2.JSX.Element;
|
1620
|
+
trendUp: React_2.JSX.Element;
|
1621
|
+
save: React_2.JSX.Element;
|
1622
|
+
minusCircle: React_2.JSX.Element;
|
1623
|
+
percent: React_2.JSX.Element;
|
1624
|
+
enter: React_2.JSX.Element;
|
1625
|
+
enterRight: React_2.JSX.Element;
|
1626
|
+
money: React_2.JSX.Element;
|
1627
|
+
ghost: React_2.JSX.Element;
|
1628
|
+
warning: React_2.JSX.Element;
|
1629
|
+
home: React_2.JSX.Element;
|
1630
|
+
settings: React_2.JSX.Element;
|
1631
|
+
search: React_2.JSX.Element;
|
1632
|
+
university: React_2.JSX.Element;
|
1633
|
+
printer: React_2.JSX.Element;
|
1634
|
+
picture: React_2.JSX.Element;
|
1635
|
+
visualization: React_2.JSX.Element;
|
1636
|
+
dashboard: React_2.JSX.Element;
|
1637
|
+
sharp: React_2.JSX.Element;
|
1638
|
+
attribute: React_2.JSX.Element;
|
1639
|
+
horn: React_2.JSX.Element;
|
1640
|
+
cw: React_2.JSX.Element;
|
1641
|
+
ccw: React_2.JSX.Element;
|
1642
|
+
};
|
1537
1643
|
|
1538
1644
|
/**
|
1539
1645
|
* @internal
|
1540
1646
|
*/
|
1541
|
-
export declare type IconType = "check" | "plus" | "sync" | "alert" | "close" | "
|
1647
|
+
export declare type IconType = "check" | "checkCircle" | "plus" | "plusCircle" | "sync" | "alert" | "alertPaused" | "close" | "cross" | "crossCircle" | "question" | "chevronUp" | "chevronRight" | "chevronDown" | "chevronLeft" | "date" | "navigateUp" | "navigateDown" | "navigateRight" | "download" | "slack" | "expand" | "exclamationCircle" | "book" | "visible" | "invisible" | "lock" | "unlock" | "ai" | "aiFill" | "drawer" | "prohibited" | "dropDown" | "dropRight" | "clock" | "questionMark" | "upload" | "expandRectangle" | "file" | "number" | "code" | "user" | "userPlus" | "users" | "magic" | "tab" | "pauseCircle" | "filter" | "timer" | "mail" | "envelope" | "copy" | "rain" | "earth" | "minimize" | "copyright" | "ellipsis" | "pencil" | "folder" | "folderPlus" | "trash" | "arrowUp" | "arrowRight" | "arrowDown" | "arrowLeft" | "undo" | "redo" | "trendDown" | "trendUp" | "save" | "minusCircle" | "percent" | "enter" | "enterRight" | "money" | "ghost" | "warning" | "home" | "settings" | "search" | "university" | "printer" | "picture" | "visualization" | "dashboard" | "sharp" | "attribute" | "horn" | "cw" | "ccw";
|
1542
1648
|
|
1543
1649
|
/**
|
1544
1650
|
* @internal
|
@@ -1676,6 +1782,7 @@ export declare interface IDialogBaseProps {
|
|
1676
1782
|
CloseButton?: React_2.ComponentType<IDialogCloseButtonProps>;
|
1677
1783
|
initialFocus?: React_2.RefObject<HTMLElement> | string;
|
1678
1784
|
returnFocusTo?: React_2.RefObject<HTMLElement> | string;
|
1785
|
+
returnFocusAfterClose?: boolean;
|
1679
1786
|
}
|
1680
1787
|
|
1681
1788
|
/**
|
@@ -1786,7 +1893,7 @@ export declare interface IDomNativeProps {
|
|
1786
1893
|
export declare interface IDropdownBodyRenderProps {
|
1787
1894
|
isMobile: boolean;
|
1788
1895
|
closeDropdown: () => void;
|
1789
|
-
ariaAttributes: Pick<React_2.AriaAttributes, "aria-labelledby"> & {
|
1896
|
+
ariaAttributes: Pick<React_2.AriaAttributes, "aria-labelledby" | "aria-label"> & {
|
1790
1897
|
role: React_2.AriaAttributes["aria-haspopup"] & React_2.AriaRole;
|
1791
1898
|
id: string;
|
1792
1899
|
};
|
@@ -2862,20 +2969,6 @@ export declare interface ILegacySingleSelectListProps<T> {
|
|
2862
2969
|
width: number;
|
2863
2970
|
}
|
2864
2971
|
|
2865
|
-
/**
|
2866
|
-
* @internal
|
2867
|
-
*/
|
2868
|
-
export declare interface IListboxContext<InteractiveItemData, StaticItemData = React_2.ReactNode> {
|
2869
|
-
items: IUiListboxItem<InteractiveItemData, StaticItemData>[];
|
2870
|
-
itemRefs: React_2.MutableRefObject<(HTMLLIElement | null)[]>;
|
2871
|
-
onSelect: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
2872
|
-
onClose?: () => void;
|
2873
|
-
selectedItemId: string | undefined;
|
2874
|
-
focusedIndex: number | undefined;
|
2875
|
-
setFocusedIndex: React_2.Dispatch<React_2.SetStateAction<number>>;
|
2876
|
-
isItemFocusable: (item: IUiListboxItem<InteractiveItemData, StaticItemData>) => boolean;
|
2877
|
-
}
|
2878
|
-
|
2879
2972
|
/**
|
2880
2973
|
* @internal
|
2881
2974
|
*/
|
@@ -3029,8 +3122,7 @@ export declare interface IMenuAccessibilityConfig extends IAccessibilityConfigBa
|
|
3029
3122
|
id?: string;
|
3030
3123
|
role?: "menu" | "menuitem" | "separator" | "presentation";
|
3031
3124
|
ariaDisabled?: "true" | "false";
|
3032
|
-
|
3033
|
-
ariaExpanded?: "true" | "false";
|
3125
|
+
ariaHasPopup?: "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
3034
3126
|
ariaControls?: string;
|
3035
3127
|
}
|
3036
3128
|
|
@@ -4205,8 +4297,8 @@ export declare interface ISyntaxHighlightingInputProps {
|
|
4205
4297
|
value: string;
|
4206
4298
|
onChange: (value: string) => void;
|
4207
4299
|
onCursor?: (from: number, to: number) => void;
|
4208
|
-
|
4209
|
-
|
4300
|
+
placeholder?: string;
|
4301
|
+
extensions?: Extension[];
|
4210
4302
|
className?: string;
|
4211
4303
|
}
|
4212
4304
|
|
@@ -4320,6 +4412,20 @@ export declare interface IUiChipAccessibilityConfig extends IAccessibilityConfig
|
|
4320
4412
|
deleteAriaLabel?: string;
|
4321
4413
|
}
|
4322
4414
|
|
4415
|
+
/**
|
4416
|
+
* @internal
|
4417
|
+
*/
|
4418
|
+
export declare interface IUiListboxContext<InteractiveItemData, StaticItemData = React_2.ReactNode> {
|
4419
|
+
items: IUiListboxItem<InteractiveItemData, StaticItemData>[];
|
4420
|
+
itemRefs: React_2.MutableRefObject<(HTMLLIElement | null)[]>;
|
4421
|
+
onSelect: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
4422
|
+
onClose?: () => void;
|
4423
|
+
selectedItemId: string | undefined;
|
4424
|
+
focusedIndex: number | undefined;
|
4425
|
+
setFocusedIndex: React_2.Dispatch<React_2.SetStateAction<number | undefined>>;
|
4426
|
+
isItemFocusable: (item: IUiListboxItem<InteractiveItemData, StaticItemData>) => boolean;
|
4427
|
+
}
|
4428
|
+
|
4323
4429
|
/**
|
4324
4430
|
* @internal
|
4325
4431
|
*/
|
@@ -4345,6 +4451,86 @@ export declare interface IUiListboxStaticItem<T> {
|
|
4345
4451
|
data: T;
|
4346
4452
|
}
|
4347
4453
|
|
4454
|
+
/**
|
4455
|
+
* @internal
|
4456
|
+
*/
|
4457
|
+
export declare interface IUiMenuContext<T extends IUiMenuItemData = object> extends IUiMenuPluggableComponents<T> {
|
4458
|
+
items: IUiMenuItem<T>[];
|
4459
|
+
focusedItem: IUiMenuInteractiveItem<T> | undefined;
|
4460
|
+
onSelect: (item: IUiMenuInteractiveItem<T> | undefined) => void;
|
4461
|
+
onClose?: () => void;
|
4462
|
+
setFocusedId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
|
4463
|
+
isItemFocusable: (item: IUiMenuItem<T>) => boolean;
|
4464
|
+
controlType: IUiMenuControlType;
|
4465
|
+
setControlType: React_2.Dispatch<React_2.SetStateAction<IUiMenuControlType>>;
|
4466
|
+
scrollToView: (element: HTMLElement | null) => void;
|
4467
|
+
makeItemId: (item: IUiMenuItem<T>) => string;
|
4468
|
+
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
4469
|
+
ItemComponent: React_2.ComponentType<UiMenuItemProps<T>>;
|
4470
|
+
menuComponentRef: React_2.RefObject<HTMLElement>;
|
4471
|
+
itemsContainerRef: React_2.RefObject<HTMLElement>;
|
4472
|
+
}
|
4473
|
+
|
4474
|
+
/**
|
4475
|
+
* @internal
|
4476
|
+
*/
|
4477
|
+
export declare type IUiMenuControlType = "keyboard" | "mouse" | "unknown";
|
4478
|
+
|
4479
|
+
/**
|
4480
|
+
* @internal
|
4481
|
+
*/
|
4482
|
+
export declare type IUiMenuGroupItem<T extends IUiMenuItemData = object> = {
|
4483
|
+
type: "group";
|
4484
|
+
id: string;
|
4485
|
+
stringTitle: string;
|
4486
|
+
data: T["group"];
|
4487
|
+
subItems: IUiMenuItem<T>[];
|
4488
|
+
};
|
4489
|
+
|
4490
|
+
/**
|
4491
|
+
* @internal
|
4492
|
+
*/
|
4493
|
+
export declare type IUiMenuInteractiveItem<T extends IUiMenuItemData = object> = {
|
4494
|
+
type: "interactive";
|
4495
|
+
id: string;
|
4496
|
+
stringTitle: string;
|
4497
|
+
isDisabled?: boolean;
|
4498
|
+
data: T["interactive"];
|
4499
|
+
subItems?: IUiMenuItem<T>[];
|
4500
|
+
};
|
4501
|
+
|
4502
|
+
/**
|
4503
|
+
* @internal
|
4504
|
+
*/
|
4505
|
+
export declare type IUiMenuItem<T extends IUiMenuItemData = object> = IUiMenuStaticItem<T> | IUiMenuInteractiveItem<T> | IUiMenuGroupItem<T>;
|
4506
|
+
|
4507
|
+
/**
|
4508
|
+
* @internal
|
4509
|
+
*/
|
4510
|
+
export declare type IUiMenuItemData = {
|
4511
|
+
[type in IUiMenuItem<any>["type"]]?: unknown;
|
4512
|
+
};
|
4513
|
+
|
4514
|
+
/**
|
4515
|
+
* @internal
|
4516
|
+
*/
|
4517
|
+
export declare interface IUiMenuPluggableComponents<T extends IUiMenuItemData = object> {
|
4518
|
+
InteractiveItemComponent: React_2.ComponentType<UiMenuInteractiveItemProps<T>>;
|
4519
|
+
InteractiveItemWrapperComponent: React_2.ComponentType<UiMenuInteractiveItemWrapperProps<T>>;
|
4520
|
+
GroupItemComponent: React_2.ComponentType<UiMenuGroupItemProps<T>>;
|
4521
|
+
StaticItemComponent: React_2.ComponentType<UiMenuStaticItemProps<T>>;
|
4522
|
+
MenuHeaderComponent: React_2.ComponentType;
|
4523
|
+
}
|
4524
|
+
|
4525
|
+
/**
|
4526
|
+
* @internal
|
4527
|
+
*/
|
4528
|
+
export declare type IUiMenuStaticItem<T extends IUiMenuItemData = object> = {
|
4529
|
+
type: "static";
|
4530
|
+
id?: string;
|
4531
|
+
data: T["static"];
|
4532
|
+
};
|
4533
|
+
|
4348
4534
|
/**
|
4349
4535
|
* @internal
|
4350
4536
|
*/
|
@@ -4963,7 +5149,10 @@ export declare type Separators = {
|
|
4963
5149
|
/**
|
4964
5150
|
* @internal
|
4965
5151
|
*/
|
4966
|
-
export declare const separatorStaticItem:
|
5152
|
+
export declare const separatorStaticItem: {
|
5153
|
+
data: React_2.JSX.Element;
|
5154
|
+
type: "static";
|
5155
|
+
};
|
4967
5156
|
|
4968
5157
|
/**
|
4969
5158
|
* @internal
|
@@ -5331,6 +5520,7 @@ export declare interface UiButtonProps {
|
|
5331
5520
|
tooltip?: React_2.ReactNode;
|
5332
5521
|
onClick?: (e: React_2.MouseEvent<HTMLButtonElement>) => void;
|
5333
5522
|
dataId?: string;
|
5523
|
+
accessibilityConfig?: IAccessibilityConfigBase;
|
5334
5524
|
}
|
5335
5525
|
|
5336
5526
|
/**
|
@@ -5450,7 +5640,7 @@ export declare interface UiListboxProps<InteractiveItemData, StaticItemData = Re
|
|
5450
5640
|
maxWidth?: number;
|
5451
5641
|
onSelect?: (item: IUiListboxInteractiveItem<InteractiveItemData>) => void;
|
5452
5642
|
onClose?: () => void;
|
5453
|
-
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context:
|
5643
|
+
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiListboxContext<InteractiveItemData, StaticItemData>) => void;
|
5454
5644
|
selectedItemId?: string;
|
5455
5645
|
InteractiveItemComponent?: React_2.ComponentType<UiListboxInteractiveItemProps<InteractiveItemData>>;
|
5456
5646
|
StaticItemComponent?: React_2.ComponentType<UiListboxStaticItemProps<StaticItemData>>;
|
@@ -5458,7 +5648,7 @@ export declare interface UiListboxProps<InteractiveItemData, StaticItemData = Re
|
|
5458
5648
|
shouldKeyboardActionStopPropagation?: boolean;
|
5459
5649
|
shouldCloseOnSelect?: boolean;
|
5460
5650
|
isDisabledFocusable?: boolean;
|
5461
|
-
ariaAttributes: IDropdownBodyRenderProps["ariaAttributes"]
|
5651
|
+
ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
|
5462
5652
|
}
|
5463
5653
|
|
5464
5654
|
/**
|
@@ -5468,6 +5658,70 @@ export declare interface UiListboxStaticItemProps<T> {
|
|
5468
5658
|
item: IUiListboxStaticItem<T>;
|
5469
5659
|
}
|
5470
5660
|
|
5661
|
+
/**
|
5662
|
+
* An accessible menu component that can be navigated by keyboard.
|
5663
|
+
* Usable in a <Dropdown /> component.
|
5664
|
+
* Should implement https://www.w3.org/WAI/ARIA/apg/patterns/menubar/
|
5665
|
+
*
|
5666
|
+
* @internal
|
5667
|
+
*/
|
5668
|
+
export declare function UiMenu<T extends IUiMenuItemData = object>(props: UiMenuProps<T>): React_2.ReactNode;
|
5669
|
+
|
5670
|
+
/**
|
5671
|
+
* @internal
|
5672
|
+
*/
|
5673
|
+
export declare interface UiMenuGroupItemProps<T extends IUiMenuItemData = object> {
|
5674
|
+
item: IUiMenuGroupItem<T>;
|
5675
|
+
}
|
5676
|
+
|
5677
|
+
/**
|
5678
|
+
* @internal
|
5679
|
+
*/
|
5680
|
+
export declare interface UiMenuInteractiveItemProps<T extends IUiMenuItemData = object> {
|
5681
|
+
item: IUiMenuInteractiveItem<T>;
|
5682
|
+
isFocused: boolean;
|
5683
|
+
onSelect: () => void;
|
5684
|
+
}
|
5685
|
+
|
5686
|
+
/**
|
5687
|
+
* @internal
|
5688
|
+
*/
|
5689
|
+
export declare interface UiMenuInteractiveItemWrapperProps<T extends IUiMenuItemData = object> {
|
5690
|
+
item: IUiMenuInteractiveItem<T>;
|
5691
|
+
}
|
5692
|
+
|
5693
|
+
/**
|
5694
|
+
* @internal
|
5695
|
+
*/
|
5696
|
+
export declare interface UiMenuItemProps<T extends IUiMenuItemData = object> {
|
5697
|
+
item: IUiMenuItem<T>;
|
5698
|
+
}
|
5699
|
+
|
5700
|
+
/**
|
5701
|
+
* @internal
|
5702
|
+
*/
|
5703
|
+
export declare interface UiMenuProps<T extends IUiMenuItemData = object> extends Partial<IUiMenuPluggableComponents<T>> {
|
5704
|
+
items: IUiMenuItem<T>[];
|
5705
|
+
className?: string;
|
5706
|
+
itemClassName?: ((item: IUiMenuItem<T>) => string | undefined) | string;
|
5707
|
+
maxWidth?: number;
|
5708
|
+
onSelect?: (item: IUiMenuInteractiveItem<T>) => void;
|
5709
|
+
onClose?: () => void;
|
5710
|
+
onUnhandledKeyDown?: (event: React_2.KeyboardEvent, context: IUiMenuContext<T>) => void;
|
5711
|
+
shouldKeyboardActionPreventDefault?: boolean;
|
5712
|
+
shouldKeyboardActionStopPropagation?: boolean;
|
5713
|
+
shouldCloseOnSelect?: boolean;
|
5714
|
+
isDisabledFocusable?: boolean;
|
5715
|
+
ariaAttributes: Omit<IDropdownBodyRenderProps["ariaAttributes"], "role">;
|
5716
|
+
}
|
5717
|
+
|
5718
|
+
/**
|
5719
|
+
* @internal
|
5720
|
+
*/
|
5721
|
+
export declare interface UiMenuStaticItemProps<T extends IUiMenuItemData = object> {
|
5722
|
+
item: IUiMenuStaticItem<T>;
|
5723
|
+
}
|
5724
|
+
|
5471
5725
|
/**
|
5472
5726
|
* @internal
|
5473
5727
|
*/
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import "codemirror/
|
3
|
-
import "codemirror/addon/edit/matchbrackets.js";
|
4
|
-
import "codemirror/addon/display/placeholder.js";
|
2
|
+
import { Extension } from "@codemirror/state";
|
5
3
|
/**
|
6
4
|
* @internal
|
7
5
|
*/
|
@@ -9,8 +7,8 @@ export interface ISyntaxHighlightingInputProps {
|
|
9
7
|
value: string;
|
10
8
|
onChange: (value: string) => void;
|
11
9
|
onCursor?: (from: number, to: number) => void;
|
12
|
-
|
13
|
-
|
10
|
+
placeholder?: string;
|
11
|
+
extensions?: Extension[];
|
14
12
|
className?: string;
|
15
13
|
}
|
16
14
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SyntaxHighlightingInput.d.ts","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"SyntaxHighlightingInput.d.ts","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAe,SAAS,EAAgC,MAAM,mBAAmB,CAAC;AAmBzF;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAkF3E,CAAC"}
|
@@ -1,70 +1,93 @@
|
|
1
|
-
// (C) 2020-
|
1
|
+
// (C) 2020-2025 GoodData Corporation
|
2
2
|
import React, { useRef, useEffect } from "react";
|
3
3
|
import cx from "classnames";
|
4
|
-
import
|
5
|
-
|
6
|
-
import "codemirror/
|
7
|
-
|
8
|
-
import "codemirror/
|
9
|
-
//
|
10
|
-
|
11
|
-
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
22
|
-
return lineIndex < cursorLineIndex ? line.length + CODE_MIRROR_EOL.length : cursorLineCharacterIndex;
|
23
|
-
};
|
24
|
-
return text
|
25
|
-
.split(CODE_MIRROR_EOL)
|
26
|
-
.map(getLineLengthToCursor)
|
27
|
-
.reduce((sum, lineLength) => sum + lineLength, 0);
|
28
|
-
};
|
4
|
+
import { EditorView, keymap, placeholder } from "@codemirror/view";
|
5
|
+
import { EditorState, Transaction, EditorSelection } from "@codemirror/state";
|
6
|
+
import { bracketMatching, syntaxHighlighting, HighlightStyle } from "@codemirror/language";
|
7
|
+
import { tags as t } from "@lezer/highlight";
|
8
|
+
import { defaultKeymap, historyKeymap } from "@codemirror/commands";
|
9
|
+
// Disable autofocus
|
10
|
+
const disableAutofocus = EditorView.contentAttributes.of({ autofocus: "false" });
|
11
|
+
// Custom syntax highlighting
|
12
|
+
const customHighlightStyle = HighlightStyle.define([
|
13
|
+
{ tag: t.punctuation, color: "#94a1ad" },
|
14
|
+
{ tag: t.bracket, color: "#94a1ad" },
|
15
|
+
{ tag: t.variableName, color: "#464e56" },
|
16
|
+
{ tag: t.string, color: "#a11" },
|
17
|
+
{ tag: t.special(t.variableName), color: "#13b1e2", fontWeight: "bold" },
|
18
|
+
{ tag: t.standard(t.variableName), color: "#00c18e", fontWeight: "bold" },
|
19
|
+
{ tag: t.keyword, color: "#ab55a3", fontWeight: "bold" },
|
20
|
+
]);
|
29
21
|
/**
|
30
22
|
* @internal
|
31
23
|
*/
|
32
24
|
export const SyntaxHighlightingInput = (props) => {
|
33
|
-
const { value, onChange, onCursor,
|
34
|
-
const
|
35
|
-
const
|
36
|
-
|
37
|
-
if (onCursor) {
|
38
|
-
const from = editor.getCursor("from");
|
39
|
-
const to = editor.getCursor("to");
|
40
|
-
const currentValue = editor.getValue();
|
41
|
-
onCursor(findCursorIndexAcrossMultipleLines(currentValue, from.line, from.ch), findCursorIndexAcrossMultipleLines(currentValue, to.line, to.ch));
|
42
|
-
}
|
43
|
-
};
|
44
|
-
const handleOnChange = () => {
|
45
|
-
onChange(view.current.getValue());
|
46
|
-
};
|
25
|
+
const { value, onChange, onCursor, placeholder: placeholderText, className, extensions = [] } = props;
|
26
|
+
const editorRef = useRef(null);
|
27
|
+
const viewRef = useRef();
|
28
|
+
// Create the editor only once
|
47
29
|
useEffect(() => {
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
30
|
+
if (!editorRef.current) {
|
31
|
+
return undefined;
|
32
|
+
}
|
33
|
+
// Create an extension for handling changes
|
34
|
+
const changeHandler = EditorView.updateListener.of((update) => {
|
35
|
+
if (update.docChanged) {
|
36
|
+
onChange(update.state.doc.toString());
|
37
|
+
}
|
38
|
+
if (onCursor && update.selectionSet) {
|
39
|
+
const range = update.state.selection.main;
|
40
|
+
onCursor(range.from, range.to);
|
41
|
+
}
|
42
|
+
});
|
43
|
+
const view = new EditorView({
|
44
|
+
state: EditorState.create({
|
45
|
+
doc: value,
|
46
|
+
extensions: [
|
47
|
+
bracketMatching(),
|
48
|
+
keymap.of([...defaultKeymap, ...historyKeymap]),
|
49
|
+
syntaxHighlighting(customHighlightStyle),
|
50
|
+
EditorView.lineWrapping,
|
51
|
+
disableAutofocus,
|
52
|
+
changeHandler,
|
53
|
+
placeholderText ? placeholder(placeholderText) : [],
|
54
|
+
...extensions,
|
55
|
+
],
|
56
|
+
}),
|
57
|
+
parent: editorRef.current,
|
54
58
|
});
|
55
|
-
|
56
|
-
view.
|
57
|
-
|
58
|
-
|
59
|
-
view.current.off("cursorActivity", reportCursorPosition);
|
60
|
-
};
|
61
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
62
|
-
}, []);
|
59
|
+
viewRef.current = view;
|
60
|
+
return () => view.destroy();
|
61
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
62
|
+
// Handle external value changes
|
63
63
|
useEffect(() => {
|
64
|
-
const
|
65
|
-
view
|
66
|
-
|
64
|
+
const view = viewRef.current;
|
65
|
+
if (!view)
|
66
|
+
return;
|
67
|
+
const currentValue = view.state.doc.toString();
|
68
|
+
if (currentValue !== value) {
|
69
|
+
const selection = view.state.selection;
|
70
|
+
const hasFocus = view.hasFocus;
|
71
|
+
const newLength = value.length;
|
72
|
+
// Adjust selection to stay within bounds of new content
|
73
|
+
const adjustedSelection = EditorSelection.create(selection.ranges.map((range) => {
|
74
|
+
const from = Math.min(range.from, newLength);
|
75
|
+
const to = Math.min(range.to, newLength);
|
76
|
+
return EditorSelection.range(from, to);
|
77
|
+
}), selection.mainIndex);
|
78
|
+
view.dispatch({
|
79
|
+
changes: { from: 0, to: currentValue.length, insert: value },
|
80
|
+
selection: adjustedSelection,
|
81
|
+
annotations: [
|
82
|
+
// Mark this as a remote change to avoid triggering the change handler
|
83
|
+
Transaction.remote.of(true),
|
84
|
+
],
|
85
|
+
});
|
86
|
+
if (hasFocus) {
|
87
|
+
view.focus();
|
88
|
+
}
|
89
|
+
}
|
67
90
|
}, [value]);
|
68
|
-
return React.createElement("div", { className: cx(className, "gd-input-syntax-highlighting-input"), ref:
|
91
|
+
return React.createElement("div", { className: cx(className, "gd-input-syntax-highlighting-input"), ref: editorRef });
|
69
92
|
};
|
70
93
|
//# sourceMappingURL=SyntaxHighlightingInput.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SyntaxHighlightingInput.js","sourceRoot":"","sources":["../../src/syntaxHighlightingInput/SyntaxHighlightingInput.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,UAAU,MAAM,
|
1
|
+
{"version":3,"file":"SyntaxHighlightingInput.js","sourceRoot":"","sources":["../../src/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IAAI,EAAE,EAAE,CAAC,CAAC;YAC3C,CAAC,CAAC,EACF,SAAS,CAAC,SAAS,CACtB,CAAC;YAEF,IAAI,CAAC,QAAQ,CAAC;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;gBAC5D,SAAS,EAAE,iBAAiB;gBAC5B,WAAW,EAAE;oBACT,sEAAsE;oBACtE,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;iBAC9B;aACJ,CAAC,CAAC;YAEH,IAAI,QAAQ,EAAE,CAAC;gBACX,IAAI,CAAC,KAAK,EAAE,CAAC;YACjB,CAAC;QACL,CAAC;IACL,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,6BAAK,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,oCAAoC,CAAC,EAAE,GAAG,EAAE,SAAS,GAAI,CAAC;AACnG,CAAC,CAAC"}
|
@@ -7,6 +7,7 @@ export interface IAccessibilityConfigBase {
|
|
7
7
|
ariaLabelledBy?: React.AriaAttributes["aria-labelledby"];
|
8
8
|
ariaDescribedBy?: React.AriaAttributes["aria-describedby"];
|
9
9
|
role?: React.HTMLAttributes<HTMLElement>["role"];
|
10
|
+
ariaExpanded?: "true" | "false";
|
10
11
|
}
|
11
12
|
/**
|
12
13
|
* @internal
|
@@ -15,8 +16,7 @@ export interface IMenuAccessibilityConfig extends IAccessibilityConfigBase {
|
|
15
16
|
id?: string;
|
16
17
|
role?: "menu" | "menuitem" | "separator" | "presentation";
|
17
18
|
ariaDisabled?: "true" | "false";
|
18
|
-
|
19
|
-
ariaExpanded?: "true" | "false";
|
19
|
+
ariaHasPopup?: "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog";
|
20
20
|
ariaControls?: string;
|
21
21
|
}
|
22
22
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/typings/accessibility.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACtE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC;IAC1D,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClF,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM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