pixel-react 1.22.4 → 1.22.6

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.
Files changed (35) hide show
  1. package/lib/components/AutoTruncateText/AutoTruncateText.js +38 -30
  2. package/lib/components/AutoTruncateText/AutoTruncateText.js.map +1 -1
  3. package/lib/components/AutoTruncateText/resizeObserverService.d.ts +10 -2
  4. package/lib/components/AutoTruncateText/resizeObserverService.js +19 -12
  5. package/lib/components/AutoTruncateText/resizeObserverService.js.map +1 -1
  6. package/lib/components/HighlightText/HighlightText.d.ts +2 -2
  7. package/lib/components/HighlightText/HighlightText.js +144 -13
  8. package/lib/components/HighlightText/HighlightText.js.map +1 -1
  9. package/lib/components/HighlightText/index.d.ts +1 -0
  10. package/lib/components/HighlightText/types.d.ts +46 -0
  11. package/lib/components/Icon/iconList.js +2 -0
  12. package/lib/components/Icon/iconList.js.map +1 -1
  13. package/lib/components/MenuOption/MenuOption.js +22 -31
  14. package/lib/components/MenuOption/MenuOption.js.map +1 -1
  15. package/lib/components/Tooltip/Tooltip.js +20 -26
  16. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  17. package/lib/components/TooltipService/TooltipService.js +219 -109
  18. package/lib/components/TooltipService/TooltipService.js.map +1 -1
  19. package/lib/hooks/useFocusTrap.d.ts +29 -0
  20. package/lib/hooks/useFocusTrap.js +97 -0
  21. package/lib/hooks/useFocusTrap.js.map +1 -0
  22. package/lib/hooks/useInteractiveAncestor.d.ts +7 -0
  23. package/lib/hooks/useInteractiveAncestor.js +18 -0
  24. package/lib/hooks/useInteractiveAncestor.js.map +1 -0
  25. package/lib/index.d.ts +48 -3
  26. package/lib/index.js +9 -9
  27. package/lib/index.js.map +1 -1
  28. package/lib/styles.css +1 -1
  29. package/lib/tsconfig.tsbuildinfo +1 -1
  30. package/lib/utils/a11y/a11y.d.ts +28 -0
  31. package/lib/utils/a11y/a11y.js +62 -0
  32. package/lib/utils/a11y/a11y.js.map +1 -0
  33. package/lib/utils/truncateText/truncateText.js +29 -15
  34. package/lib/utils/truncateText/truncateText.js.map +1 -1
  35. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2582,13 +2582,58 @@ interface BrowserTabsProps {
2582
2582
 
2583
2583
  declare const BrowserTabs: ({ tabsData, activeTabId, onTabClick, onTabClose, onTabAdd, maxTabWidth, showCloseOnActive, maxTabs, enableOverflowTooltip, onTabMouseEnter, onTabMouseLeave, }: BrowserTabsProps) => React$1.JSX.Element;
2584
2584
 
2585
+ /** A styled part of the text, e.g. a variable inside a step name */
2586
+ interface HighlightTextPart {
2587
+ text: string;
2588
+ /**
2589
+ * Needs the same contrast as `color` on the row. Colour alone must not tell
2590
+ * kinds of parts apart (WCAG 1.4.1): a tooltip can say what the part is.
2591
+ */
2592
+ color?: string;
2593
+ fontWeight?: CSSProperties['fontWeight'];
2594
+ /**
2595
+ * Shown on hover over this part only. Text or JSX, as for `tooltip` below.
2596
+ * A line break (`\n`) in text starts a new line, e.g. for an element's name
2597
+ * and type; prefer that over JSX in long lists, since JSX tooltips render a
2598
+ * hidden copy in every row.
2599
+ */
2600
+ tooltip?: string | ReactElement;
2601
+ }
2602
+ /** Plain text, or a styled part */
2603
+ type HighlightTextSegment = string | HighlightTextPart;
2585
2604
  interface HighlightTextProps {
2586
2605
  text?: string;
2606
+ /**
2607
+ * Use instead of `text` when parts need their own colour or tooltip.
2608
+ * Search highlighting runs on the joined text, so a match can span parts.
2609
+ */
2610
+ segments?: HighlightTextSegment[];
2587
2611
  highlight?: String;
2588
2612
  onlyExactMatch?: boolean;
2613
+ /**
2614
+ * Text colour: any CSS colour value or variable, e.g. `var(--brand-color)`.
2615
+ * WCAG 1.4.6 (AAA) needs 7:1 contrast with the background (4.5:1 for large
2616
+ * text), also against the search highlight.
2617
+ */
2618
+ color?: string;
2619
+ fontWeight?: CSSProperties['fontWeight'];
2620
+ /**
2621
+ * Shown on hover or keyboard focus, through the global TooltipService. The
2622
+ * text takes focus for it, except inside another control (e.g. a button),
2623
+ * which should then carry the tooltip itself. Escape hides it. JSX is copied
2624
+ * into the tooltip as HTML, so it is static: event handlers inside it do not
2625
+ * run.
2626
+ */
2627
+ tooltip?: string | ReactElement;
2628
+ /**
2629
+ * Keep to one line and end with an ellipsis when it does not fit. The full
2630
+ * text shows on hover or focus, only while it is cut off (unless `tooltip`
2631
+ * is set); the row takes focus only then.
2632
+ */
2633
+ truncate?: boolean;
2589
2634
  }
2590
2635
 
2591
- declare const HighlightText: React.FC<HighlightTextProps>;
2636
+ declare const MemoizedHighlightText: React$1.MemoExoticComponent<({ text, segments, highlight, onlyExactMatch, color, fontWeight, tooltip, truncate, }: HighlightTextProps) => React$1.JSX.Element>;
2592
2637
 
2593
2638
  interface CheckboxProps {
2594
2639
  /**
@@ -6570,5 +6615,5 @@ interface DotLoaderProps {
6570
6615
 
6571
6616
  declare const DotLoader: ({ dotCount, label, labelFontSize, labelFontWeight, dotFontSize, dotFontWeight }: DotLoaderProps) => React$1.JSX.Element;
6572
6617
 
6573
- export { AADHAAR_REGEX, ALPHABET_ONLY_REGEX, ALPHABET_WITH_SPACES_ONLY_REGEX, ALPHANUMERIC_PARENTHESIS_REGEX, ALPHANUMERIC_REGEX, ALPHANUMERIC_WITH_DOT_REGEX, ALPHANUMERIC_WITH_ROUND_BRACES_REGEX, ALPHA_NUM_EXTENDED_REGEX, ALPHA_NUM_REGEX, Accordion, AddContentButton, AddResourceButton, AiToggle, AllProjectsDropdown, AnimatedSetting, AppHeader, AttachMedia, AttachmentButton, AudioPlayer, AutoTruncateText, Avatar, BASE64_REGEX, BIG_END_WHITESPACE, BINARY_NUMBER_REGEX, BODY_TAG_TYPE_VALIDATION, BarChart, Card as Box, BrowserTabs, Button, CAMEL_CASE_REGEX, CERTIFICATES_NAME_REGEX, CHECK_CAMEL_CASE, CREDIT_CARD_REGEX, CURRENCY_GENERIC_REGEX, CardPanel, ChatModal, ChatModalAi, Checkbox, Chip, ChipWithCount, ChooseFile, Col, Comments, ConditionalDropdown, ConnectingBranch, Container, ContentCard, CreateVariableSlider, DATE_REGEX, DECIMAL_NUMBER_REGEX, DRIVING_LICENSE_REGEX, DYNAMIC_VALUE_PATTERN_REGEX, DYNAMIC_VALUE_TYPE_REGEX, DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX, DYNAMIC_VALUE__PLACEHOLDER_REGEX, DashboardDonutChart, CustomDatePicker as DatePicker, DebugToolsPanel, DonutChart, DotLoader, DownloadClient, DragAndDrop, Drawer, Dropzone, ELEMENTS_TRAILING_SPACE_REGEX, ELEMENTS_WHITE_SPACE_REGEX, EMAIL_FORMAT_REGEX, EMAIL_REGEX, EMAIL_VALIDATION_REGEX, EXCEL_SPACING_REGEX, EXECUTION_ID_VALIDATION, EditLabel, EditTextField, Editor, ErrorBoundary, ExcelFile as Excel, ExpandableMenu, FILENAME_VALIDATION_REGEX, FILE_EXTENSION_REGEX, FILE_NAME_REGEX, FieldSet, FileDropzone, FilePreview, ForwardedForms as Form, formatString as FormatString, GSTIN_REGEX, HEXADECIMAL_NUMBER_REGEX, HEX_COLOR_REGEX, HSL_COLOR_REGEX, HTML_ATTRIBUTE_REGEX, HTML_FILE_TYPE_VALIDATION, HTML_TAG_REGEX, HighlightText, HistoryCard, INDIAN_CURRENCY_REGEX, INDIAN_PASSPORT_REGEX, INDIAN_PHONE_REGEX, INDIAN_PIN_CODE_REGEX, INTERNATIONAL_PHONE_REGEX, INVALID_EMAIL_REGEX, IPV4_REGEX, IPV6_REGEX, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, JAVASCRIPT_FILE_TYPE_VALIDATION, LINKEDIN_PROFILE_REGEX, LINK_VALIDATION_REGEX, LabelEditTextField, LayoutWithDrawer, LineChart, LineLoader, Link, Loader, MAC_ADDRESS_REGEX, MEMORY_VALIDATION_REGEX, MachineInputField, MediaPreview, MediaViewerModal as MediaViewerModel, MenuOption, MessageBox, MiniModal, MobileSkin, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, NLP_DESCRIPTION_REGEX, NO_LEADING_TRAILING_SPACE_REGEX, NUMBERS_ONLY_REGEX, NUMBER_REGEX, NetworkErrorBoundary, NoDataAvailable, NoDataContent, NoResultFound, OsTree, OtpVerification, OverviewModal, PAN_CARD_REGEX, PARAMETER_ALPHANUMERIC_REGEX, PASSWORD_COMPLEX_REGEX, PASSWORD_SIMPLE_REGEX, PHONE_REGEX, POSTAL_CODE_REGEX, Paper, PhoneInputField, PieChart, PopUpModal, PrePostTable, ProcessedSourceSelector, ProgressBar, Prompt, PromptContainer, RGB_COLOR_REGEX, ROMAN_NUMERALS_REGEX, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, SCRIPT_REGEX, SERVER_HOST_REGEX, SSN_REGEX, START_END_WHITESPACE_REGEX, STEP_GROUP_NAME_REGEX, ScoreGaugeChart, ScriptGenerationLoader, ScriptSwitchButton, Search, Select, SelectionSwitcher, SequentialConnectingBranch, SessionDropdown, SessionManager, StackedBarChart, StateDropdown, StatusBadge, StatusButton, StatusCard, StatusIndicator, StepLandingTable, StepResultStats, StorageUsageBar, SwitchButton, TIME_REGEX, TWITTER_HANDLE_REGEX, Table, TreeTable as TableTree, TableTreeFn, TableWithAccordion, Tabs, TabsWithSilder, Textarea as TextArea, TextEditor, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, TooltipService, TruncatedTooltip, Typography, UNIT_REGEX, URL_REGEX, USERNAME_REGEX, USERNAME_SPECIAL_REGEX, US_ZIP_CODE_REGEX, UUID_REGEX, VALID_NAME_PATTERN, VEHICLE_REGISTRATION_REGEX, VariableDropdown, VariableInput, VariableSuggestionInputDropDown, WHITESPACE_REGEX, WeightageTable, XML_FILE_TYPE_VALIDATION, ZoomControl, addPrePostStepGroup, addStepGroup, autoScrollToTableLastRow, capitalize, checkEmpty, checkMicrophoneAccess, cleanAllTooltips, clearStore, compareArrays, compareObjects, computeTreeCountsAndFormatNodes, convertFormDataToObject, convertToBytes, convertToGB, convertToISO, copyToClipboard, debounce, deleteStoreValue, ffid, findAndInsert, formatDate, formatResponseDate, getEncryptedData, getExtension, getExtensionWithPeriod, getFiltersFromUrl, getNavigateToKey, getSequentialPayload, getStoreValue, getTopVisibleNodeKey, getTreeDetails, handleTimeZoneChange, handleTreeExpandAllCollapseAll, handleTreeNodeExpandCollapse, handleTreeNodeSect, handleUnCheckAllTreeNodesWithUpdates, hasDuplicateFile, isEmptyObject, isTextTruncated, nlpInputDelay, passesFilters, rearrangeDragItem, restoreSelectedFilters, saveFileFromBlob, scrollToView, setStoreValue, throttle, toCamelCase, toast, toggleShowHideEntity, truncateText, updateSearchTree, updateTreeState, useBeforeUnload, useClickOutside, useDeviceType, useFileDropzone, useKeyboardActions, useTheme, useTriggerControl, validateFileContent };
6574
- export type { RootNode$1 as RootNode, TreeNodeProps, WeightageCellRenderProps, WeightageColumnLabels, WeightageGroup, WeightageRow, WeightageTableProps };
6618
+ export { AADHAAR_REGEX, ALPHABET_ONLY_REGEX, ALPHABET_WITH_SPACES_ONLY_REGEX, ALPHANUMERIC_PARENTHESIS_REGEX, ALPHANUMERIC_REGEX, ALPHANUMERIC_WITH_DOT_REGEX, ALPHANUMERIC_WITH_ROUND_BRACES_REGEX, ALPHA_NUM_EXTENDED_REGEX, ALPHA_NUM_REGEX, Accordion, AddContentButton, AddResourceButton, AiToggle, AllProjectsDropdown, AnimatedSetting, AppHeader, AttachMedia, AttachmentButton, AudioPlayer, AutoTruncateText, Avatar, BASE64_REGEX, BIG_END_WHITESPACE, BINARY_NUMBER_REGEX, BODY_TAG_TYPE_VALIDATION, BarChart, Card as Box, BrowserTabs, Button, CAMEL_CASE_REGEX, CERTIFICATES_NAME_REGEX, CHECK_CAMEL_CASE, CREDIT_CARD_REGEX, CURRENCY_GENERIC_REGEX, CardPanel, ChatModal, ChatModalAi, Checkbox, Chip, ChipWithCount, ChooseFile, Col, Comments, ConditionalDropdown, ConnectingBranch, Container, ContentCard, CreateVariableSlider, DATE_REGEX, DECIMAL_NUMBER_REGEX, DRIVING_LICENSE_REGEX, DYNAMIC_VALUE_PATTERN_REGEX, DYNAMIC_VALUE_TYPE_REGEX, DYNAMIC_VALUE_WITH_VALID_BRACKETS_REGEX, DYNAMIC_VALUE__PLACEHOLDER_REGEX, DashboardDonutChart, CustomDatePicker as DatePicker, DebugToolsPanel, DonutChart, DotLoader, DownloadClient, DragAndDrop, Drawer, Dropzone, ELEMENTS_TRAILING_SPACE_REGEX, ELEMENTS_WHITE_SPACE_REGEX, EMAIL_FORMAT_REGEX, EMAIL_REGEX, EMAIL_VALIDATION_REGEX, EXCEL_SPACING_REGEX, EXECUTION_ID_VALIDATION, EditLabel, EditTextField, Editor, ErrorBoundary, ExcelFile as Excel, ExpandableMenu, FILENAME_VALIDATION_REGEX, FILE_EXTENSION_REGEX, FILE_NAME_REGEX, FieldSet, FileDropzone, FilePreview, ForwardedForms as Form, formatString as FormatString, GSTIN_REGEX, HEXADECIMAL_NUMBER_REGEX, HEX_COLOR_REGEX, HSL_COLOR_REGEX, HTML_ATTRIBUTE_REGEX, HTML_FILE_TYPE_VALIDATION, HTML_TAG_REGEX, MemoizedHighlightText as HighlightText, HistoryCard, INDIAN_CURRENCY_REGEX, INDIAN_PASSPORT_REGEX, INDIAN_PHONE_REGEX, INDIAN_PIN_CODE_REGEX, INTERNATIONAL_PHONE_REGEX, INVALID_EMAIL_REGEX, IPV4_REGEX, IPV6_REGEX, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, JAVASCRIPT_FILE_TYPE_VALIDATION, LINKEDIN_PROFILE_REGEX, LINK_VALIDATION_REGEX, LabelEditTextField, LayoutWithDrawer, LineChart, LineLoader, Link, Loader, MAC_ADDRESS_REGEX, MEMORY_VALIDATION_REGEX, MachineInputField, MediaPreview, MediaViewerModal as MediaViewerModel, MenuOption, MessageBox, MiniModal, MobileSkin, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, NLP_DESCRIPTION_REGEX, NO_LEADING_TRAILING_SPACE_REGEX, NUMBERS_ONLY_REGEX, NUMBER_REGEX, NetworkErrorBoundary, NoDataAvailable, NoDataContent, NoResultFound, OsTree, OtpVerification, OverviewModal, PAN_CARD_REGEX, PARAMETER_ALPHANUMERIC_REGEX, PASSWORD_COMPLEX_REGEX, PASSWORD_SIMPLE_REGEX, PHONE_REGEX, POSTAL_CODE_REGEX, Paper, PhoneInputField, PieChart, PopUpModal, PrePostTable, ProcessedSourceSelector, ProgressBar, Prompt, PromptContainer, RGB_COLOR_REGEX, ROMAN_NUMERALS_REGEX, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, SCRIPT_REGEX, SERVER_HOST_REGEX, SSN_REGEX, START_END_WHITESPACE_REGEX, STEP_GROUP_NAME_REGEX, ScoreGaugeChart, ScriptGenerationLoader, ScriptSwitchButton, Search, Select, SelectionSwitcher, SequentialConnectingBranch, SessionDropdown, SessionManager, StackedBarChart, StateDropdown, StatusBadge, StatusButton, StatusCard, StatusIndicator, StepLandingTable, StepResultStats, StorageUsageBar, SwitchButton, TIME_REGEX, TWITTER_HANDLE_REGEX, Table, TreeTable as TableTree, TableTreeFn, TableWithAccordion, Tabs, TabsWithSilder, Textarea as TextArea, TextEditor, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, TooltipService, TruncatedTooltip, Typography, UNIT_REGEX, URL_REGEX, USERNAME_REGEX, USERNAME_SPECIAL_REGEX, US_ZIP_CODE_REGEX, UUID_REGEX, VALID_NAME_PATTERN, VEHICLE_REGISTRATION_REGEX, VariableDropdown, VariableInput, VariableSuggestionInputDropDown, WHITESPACE_REGEX, WeightageTable, XML_FILE_TYPE_VALIDATION, ZoomControl, addPrePostStepGroup, addStepGroup, autoScrollToTableLastRow, capitalize, checkEmpty, checkMicrophoneAccess, cleanAllTooltips, clearStore, compareArrays, compareObjects, computeTreeCountsAndFormatNodes, convertFormDataToObject, convertToBytes, convertToGB, convertToISO, copyToClipboard, debounce, deleteStoreValue, ffid, findAndInsert, formatDate, formatResponseDate, getEncryptedData, getExtension, getExtensionWithPeriod, getFiltersFromUrl, getNavigateToKey, getSequentialPayload, getStoreValue, getTopVisibleNodeKey, getTreeDetails, handleTimeZoneChange, handleTreeExpandAllCollapseAll, handleTreeNodeExpandCollapse, handleTreeNodeSect, handleUnCheckAllTreeNodesWithUpdates, hasDuplicateFile, isEmptyObject, isTextTruncated, nlpInputDelay, passesFilters, rearrangeDragItem, restoreSelectedFilters, saveFileFromBlob, scrollToView, setStoreValue, throttle, toCamelCase, toast, toggleShowHideEntity, truncateText, updateSearchTree, updateTreeState, useBeforeUnload, useClickOutside, useDeviceType, useFileDropzone, useKeyboardActions, useTheme, useTriggerControl, validateFileContent };
6619
+ export type { HighlightTextPart, HighlightTextSegment, RootNode$1 as RootNode, TreeNodeProps, WeightageCellRenderProps, WeightageColumnLabels, WeightageGroup, WeightageRow, WeightageTableProps };