@rio-cloud/rio-uikit 2.5.0-beta.1 → 2.5.0

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 (119) hide show
  1. package/CountedInput.d.ts +2 -0
  2. package/CountedInput.js +5 -0
  3. package/CountedInput.js.map +1 -0
  4. package/TabbedPanel.d.ts +2 -0
  5. package/TabbedPanel.js +5 -0
  6. package/TabbedPanel.js.map +1 -0
  7. package/components/applicationHeader/NavItems.js +58 -46
  8. package/components/applicationHeader/NavItems.js.map +1 -1
  9. package/components/applicationLayout/ApplicationLayoutBody.d.ts +1 -1
  10. package/components/applicationLayout/ApplicationLayoutBody.js +29 -29
  11. package/components/applicationLayout/ApplicationLayoutBody.js.map +1 -1
  12. package/components/applicationLayout/ApplicationLayoutHeader.js +22 -7
  13. package/components/applicationLayout/ApplicationLayoutHeader.js.map +1 -1
  14. package/components/assetTree/useTreeHeight.js.map +1 -1
  15. package/components/button/Button.d.ts +11 -3
  16. package/components/button/Button.js.map +1 -1
  17. package/components/clearableInput/ClearableInput.d.ts +4 -0
  18. package/components/clearableInput/ClearableInput.js.map +1 -1
  19. package/components/countedInput/CountedInput.d.ts +91 -0
  20. package/components/countedInput/CountedInput.js +65 -0
  21. package/components/countedInput/CountedInput.js.map +1 -0
  22. package/components/datepicker/DatePicker.d.ts +1 -1
  23. package/components/datepicker/DatePicker.js +1 -1
  24. package/components/datepicker/DatePicker.js.map +1 -1
  25. package/components/datepicker/DayPicker.js +3 -2
  26. package/components/datepicker/DayPicker.js.map +1 -1
  27. package/components/datepicker/DayPickerInput.d.ts +1 -1
  28. package/components/datepicker/DayPickerInput.js.map +1 -1
  29. package/components/datepicker/dayPickerTypes.d.ts +3 -2
  30. package/components/datepicker/dayPickerTypes.js.map +1 -1
  31. package/components/datepicker/dayPickerUtils.d.ts +1 -1
  32. package/components/datepicker/dayPickerUtils.js +45 -22
  33. package/components/datepicker/dayPickerUtils.js.map +1 -1
  34. package/components/datepicker/useDayPickerInputState.d.ts +1 -1
  35. package/components/dialog/ConfirmationDialog.d.ts +17 -0
  36. package/components/dialog/ConfirmationDialog.js +43 -19
  37. package/components/dialog/ConfirmationDialog.js.map +1 -1
  38. package/components/dialog/DialogHeader.js +20 -19
  39. package/components/dialog/DialogHeader.js.map +1 -1
  40. package/components/dropdown/ButtonDropdown.d.ts +5 -0
  41. package/components/dropdown/ButtonDropdown.js +63 -61
  42. package/components/dropdown/ButtonDropdown.js.map +1 -1
  43. package/components/dropdown/DropdownToggleButton.d.ts +2 -0
  44. package/components/dropdown/DropdownToggleButton.js +39 -35
  45. package/components/dropdown/DropdownToggleButton.js.map +1 -1
  46. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +103 -105
  47. package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js.map +1 -1
  48. package/components/map/utils/eventHandling.js.map +1 -1
  49. package/components/map/utils/mapTypes.d.ts +7 -0
  50. package/components/map/utils/mapTypes.js.map +1 -1
  51. package/components/map/utils/rendering.js +5 -5
  52. package/components/numberControl/NumberControl.js.map +1 -1
  53. package/components/page/Page.d.ts +2 -0
  54. package/components/page/Page.js.map +1 -1
  55. package/components/rioglyph/Rioglyph.d.ts +8 -2
  56. package/components/rioglyph/Rioglyph.js.map +1 -1
  57. package/components/rioglyph/RioglyphIconType.d.ts +1 -1
  58. package/components/selects/BaseSelectDropdown.d.ts +8 -0
  59. package/components/selects/BaseSelectDropdown.js +76 -60
  60. package/components/selects/BaseSelectDropdown.js.map +1 -1
  61. package/components/selects/Multiselect.d.ts +5 -0
  62. package/components/selects/Multiselect.js +60 -58
  63. package/components/selects/Multiselect.js.map +1 -1
  64. package/components/selects/Select.d.ts +5 -0
  65. package/components/selects/Select.js +60 -58
  66. package/components/selects/Select.js.map +1 -1
  67. package/components/sidebars/Sidebar.js +40 -40
  68. package/components/sidebars/Sidebar.js.map +1 -1
  69. package/components/sidebars/SidebarCloseButton.d.ts +3 -1
  70. package/components/sidebars/SidebarCloseButton.js +19 -5
  71. package/components/sidebars/SidebarCloseButton.js.map +1 -1
  72. package/components/states/CustomState.d.ts +7 -1
  73. package/components/states/CustomState.js.map +1 -1
  74. package/components/states/StateButton.d.ts +11 -1
  75. package/components/states/StateButton.js +46 -10
  76. package/components/states/StateButton.js.map +1 -1
  77. package/components/statsWidget/StatsWidgetNumber.d.ts +16 -1
  78. package/components/statsWidget/StatsWidgetNumber.js +29 -12
  79. package/components/statsWidget/StatsWidgetNumber.js.map +1 -1
  80. package/components/tabbedPanel/TabbedPanel.d.ts +99 -0
  81. package/components/tabbedPanel/TabbedPanel.js +119 -0
  82. package/components/tabbedPanel/TabbedPanel.js.map +1 -0
  83. package/components/table/Table.types.d.ts +9 -1
  84. package/components/table/TableColumn.js +20 -19
  85. package/components/table/TableColumn.js.map +1 -1
  86. package/components/table/TableHeaderColumn.d.ts +4 -0
  87. package/components/table/TableHeaderColumn.js +50 -53
  88. package/components/table/TableHeaderColumn.js.map +1 -1
  89. package/components/table/TableToolbar.d.ts +4 -0
  90. package/components/table/TableToolbar.js.map +1 -1
  91. package/components/table/TableToolbarColumn.d.ts +3 -0
  92. package/components/table/TableToolbarColumn.js.map +1 -1
  93. package/components/table/render/header/resolveHeaderCellStyle.d.ts +87 -55
  94. package/components/timepicker/TimePicker.d.ts +6 -0
  95. package/components/timepicker/TimePicker.js +57 -56
  96. package/components/timepicker/TimePicker.js.map +1 -1
  97. package/hooks/useClickOutside.js +3 -3
  98. package/hooks/useClipboard.js.map +1 -1
  99. package/hooks/useScrollPosition.js.map +1 -1
  100. package/package.json +2 -4
  101. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +23 -22
  102. package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js.map +1 -1
  103. package/utils/analytics/getTrackingLabelFromNode.d.ts +2 -0
  104. package/utils/analytics/getTrackingLabelFromNode.js +24 -0
  105. package/utils/analytics/getTrackingLabelFromNode.js.map +1 -0
  106. package/utils/analytics/googleAnalyticsUtils.js +21 -28
  107. package/utils/analytics/googleAnalyticsUtils.js.map +1 -1
  108. package/utils/getNodeTextContent.d.ts +2 -0
  109. package/utils/getNodeTextContent.js +22 -0
  110. package/utils/getNodeTextContent.js.map +1 -0
  111. package/utils/init/initCSS.js +5 -5
  112. package/utils/init/initCSS.js.map +1 -1
  113. package/utils/init/initConfig.js +4 -7
  114. package/utils/init/initConfig.js.map +1 -1
  115. package/utils/init/initDocumentBootstrapping.js +14 -14
  116. package/utils/init/initDocumentBootstrapping.js.map +1 -1
  117. package/version.d.ts +1 -1
  118. package/version.js +2 -2
  119. package/version.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Rioglyph.js","sources":["../../../src/components/rioglyph/Rioglyph.tsx"],"sourcesContent":["import classNames from '../../utils/classNames';\nimport type { RioglyphIconType } from './RioglyphIconType';\n\nexport type IconType = RioglyphIconType;\n\nexport type RioglyphProps = {\n /**\n * The rioglyph icon string OR an external .svg link\n */\n icon: IconType | string;\n\n /**\n * Additional classes set to the icon span.\n */\n iconClassName?: string;\n\n /**\n * The size (text-size) of the icon\n */\n size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | '10' | '11' | '12' | '14' | '16' | '18' | '20';\n\n /**\n * Spinning animation.\n * \n * @default false\n */\n spinning?: boolean;\n\n /**\n * Pulsing animation.\n * \n * @default false\n */\n pulsing?: boolean;\n\n /**\n * Filled style.\n * \n * @default false\n */\n filled?: boolean;\n\n /**\n * Add a disabled line\n * \n * @default false\n */\n disabled?: boolean;\n\n /**\n * Recolor the disabled line to the danger color.\n * \n * @default false\n */\n disabledDanger?: boolean;\n\n /**\n * Flip the disabled line.\n * \n * @default false\n */\n disabledInverse?: boolean;\n\n /**\n * The rioglyph icon string OR an external .svg link.\n */\n pairIcon?: IconType | string;\n\n /**\n * Additional classes set to the pairIcon span.\n */\n pairIconClassName?: string;\n};\n\nconst Rioglyph = (props: RioglyphProps) => {\n const {\n icon,\n iconClassName = '',\n pairIcon,\n pairIconClassName = '',\n size,\n spinning = false,\n pulsing = false,\n filled = false,\n disabled = false,\n disabledDanger = false,\n disabledInverse = false,\n } = props;\n\n const spinningClass = spinning ? 'spinning' : '';\n const pulsingClass = pulsing ? 'pulsing' : '';\n const filledClass = filled ? 'rioglyph-filled' : '';\n const disabledClass = disabled ? 'rioglyph-disabled' : '';\n const disabledDangerClass = disabledDanger ? 'rioglyph-disabled rioglyph-disabled-danger' : '';\n const disabledInverseClass = disabledInverse ? 'rioglyph-disabled rioglyph-disabled-inverse' : '';\n\n let iconStyle: React.CSSProperties | undefined;\n if (icon.includes('.svg')) {\n iconStyle = { '--i': `url(${icon})` } as React.CSSProperties;\n }\n\n if (pairIcon) {\n const wrapperClasses = classNames('rioglyph-icon-pair', size && `text-size-${size}`);\n const iconClasses = classNames('rioglyph', !icon.includes('.svg') && icon, iconClassName);\n const pairIconClasses = classNames(\n 'rioglyph',\n !pairIcon.includes('.svg') && pairIcon,\n pairIconClassName,\n spinningClass,\n pulsingClass\n );\n\n let pairIconStyle: React.CSSProperties | undefined;\n if (pairIcon?.includes('.svg')) {\n pairIconStyle = { '--i': `url(${pairIcon})` } as React.CSSProperties;\n }\n\n return (\n <span className={wrapperClasses}>\n <span className={iconClasses} style={iconStyle} />\n <span className={pairIconClasses} style={pairIconStyle} />\n </span>\n );\n }\n\n const iconClasses = classNames(\n 'rioglyph',\n !icon.includes('.svg') && icon,\n size && `text-size-${size}`,\n disabledClass,\n disabledDangerClass,\n disabledInverseClass,\n iconClassName,\n spinningClass,\n pulsingClass,\n filledClass\n );\n\n return <span className={iconClasses} style={iconStyle} />;\n};\n\nexport default Rioglyph;\n"],"names":["Rioglyph","props","icon","iconClassName","pairIcon","pairIconClassName","size","spinning","pulsing","filled","disabled","disabledDanger","disabledInverse","spinningClass","pulsingClass","filledClass","disabledClass","disabledDangerClass","disabledInverseClass","iconStyle","wrapperClasses","classNames","iconClasses","pairIconClasses","pairIconStyle","jsxs","jsx"],"mappings":";;AA0E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nB,EAAK,SAAS,MAAM,KAAKA;AAAA,IAC1BI,KAAQ,aAAaA,CAAI;AAAA,IACzBU;AAAA,IACAC;AAAA,IACAC;AAAA,IACAf;AAAA,IACAU;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAGJ,SAAO,gBAAAW,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAC3D;"}
1
+ {"version":3,"file":"Rioglyph.js","sources":["../../../src/components/rioglyph/Rioglyph.tsx"],"sourcesContent":["import classNames from '../../utils/classNames';\nimport type { RioglyphIconType } from './RioglyphIconType';\n\nexport type IconType = RioglyphIconType;\n\nexport type RioglyphProps = {\n /**\n * The RIOglyph icon class name OR an external .svg link.\n *\n * Use only exact existing `rioglyph-*` classes from the generated UIKIT icon contract.\n * Do not compose or guess semantic icon names; an unknown icon class renders as a filled rectangle.\n */\n icon: IconType | string;\n\n /**\n * Additional classes set to the icon span.\n */\n iconClassName?: string;\n\n /**\n * The size (text-size) of the icon\n */\n size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | '10' | '11' | '12' | '14' | '16' | '18' | '20';\n\n /**\n * Spinning animation.\n * \n * @default false\n */\n spinning?: boolean;\n\n /**\n * Pulsing animation.\n * \n * @default false\n */\n pulsing?: boolean;\n\n /**\n * Filled style.\n * \n * @default false\n */\n filled?: boolean;\n\n /**\n * Add a disabled line\n * \n * @default false\n */\n disabled?: boolean;\n\n /**\n * Recolor the disabled line to the danger color.\n * \n * @default false\n */\n disabledDanger?: boolean;\n\n /**\n * Flip the disabled line.\n * \n * @default false\n */\n disabledInverse?: boolean;\n\n /**\n * The RIOglyph icon class name OR an external .svg link.\n *\n * Use only exact existing `rioglyph-*` classes from the generated UIKIT icon contract.\n * Do not compose or guess semantic icon names; an unknown icon class renders as a filled rectangle.\n */\n pairIcon?: IconType | string;\n\n /**\n * Additional classes set to the pairIcon span.\n */\n pairIconClassName?: string;\n};\n\nconst Rioglyph = (props: RioglyphProps) => {\n const {\n icon,\n iconClassName = '',\n pairIcon,\n pairIconClassName = '',\n size,\n spinning = false,\n pulsing = false,\n filled = false,\n disabled = false,\n disabledDanger = false,\n disabledInverse = false,\n } = props;\n\n const spinningClass = spinning ? 'spinning' : '';\n const pulsingClass = pulsing ? 'pulsing' : '';\n const filledClass = filled ? 'rioglyph-filled' : '';\n const disabledClass = disabled ? 'rioglyph-disabled' : '';\n const disabledDangerClass = disabledDanger ? 'rioglyph-disabled rioglyph-disabled-danger' : '';\n const disabledInverseClass = disabledInverse ? 'rioglyph-disabled rioglyph-disabled-inverse' : '';\n\n let iconStyle: React.CSSProperties | undefined;\n if (icon.includes('.svg')) {\n iconStyle = { '--i': `url(${icon})` } as React.CSSProperties;\n }\n\n if (pairIcon) {\n const wrapperClasses = classNames('rioglyph-icon-pair', size && `text-size-${size}`);\n const iconClasses = classNames('rioglyph', !icon.includes('.svg') && icon, iconClassName);\n const pairIconClasses = classNames(\n 'rioglyph',\n !pairIcon.includes('.svg') && pairIcon,\n pairIconClassName,\n spinningClass,\n pulsingClass\n );\n\n let pairIconStyle: React.CSSProperties | undefined;\n if (pairIcon?.includes('.svg')) {\n pairIconStyle = { '--i': `url(${pairIcon})` } as React.CSSProperties;\n }\n\n return (\n <span className={wrapperClasses}>\n <span className={iconClasses} style={iconStyle} />\n <span className={pairIconClasses} style={pairIconStyle} />\n </span>\n );\n }\n\n const iconClasses = classNames(\n 'rioglyph',\n !icon.includes('.svg') && icon,\n size && `text-size-${size}`,\n disabledClass,\n disabledDangerClass,\n disabledInverseClass,\n iconClassName,\n spinningClass,\n pulsingClass,\n filledClass\n );\n\n return <span className={iconClasses} style={iconStyle} />;\n};\n\nexport default Rioglyph;\n"],"names":["Rioglyph","props","icon","iconClassName","pairIcon","pairIconClassName","size","spinning","pulsing","filled","disabled","disabledDanger","disabledInverse","spinningClass","pulsingClass","filledClass","disabledClass","disabledDangerClass","disabledInverseClass","iconStyle","wrapperClasses","classNames","iconClasses","pairIconClasses","pairIconStyle","jsx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,IAChB;AAAA,IACA,CAACnB,EAAK,SAAS,MAAM,KAAKA;AAAA,IAC1BI,KAAQ,aAAaA,CAAI;AAAA,IACzBU;AAAA,IACAC;AAAA,IACAC;AAAA,IACAf;AAAA,IACAU;AAAA,IACAC;AAAA,IACAC;AAAA,EAAA;AAGJ,SAAO,gBAAAW,EAAC,QAAA,EAAK,WAAWJ,GAAa,OAAOH,GAAW;AAC3D;"}
@@ -1 +1 @@
1
- export type RioglyphIconType = 'rioglyph-academic-cap' | 'rioglyph-addressbook' | 'rioglyph-ai' | 'rioglyph-air-pay' | 'rioglyph-am' | 'rioglyph-angle-double-down' | 'rioglyph-angle-double-left' | 'rioglyph-angle-double-right' | 'rioglyph-angle-double-up' | 'rioglyph-antenna' | 'rioglyph-api' | 'rioglyph-archive' | 'rioglyph-area-chart' | 'rioglyph-area-in' | 'rioglyph-area-out' | 'rioglyph-arrow-down' | 'rioglyph-arrow-left' | 'rioglyph-arrow-right' | 'rioglyph-arrow-up' | 'rioglyph-arrows-collapse' | 'rioglyph-arrows-combine' | 'rioglyph-arrows-expand' | 'rioglyph-arrows-horizontal' | 'rioglyph-arrows-split' | 'rioglyph-assigned' | 'rioglyph-axis-x' | 'rioglyph-axis-y' | 'rioglyph-axis-z' | 'rioglyph-axle' | 'rioglyph-ban-circle' | 'rioglyph-bar-chart-box' | 'rioglyph-battery-charging' | 'rioglyph-battery-level-empty' | 'rioglyph-battery-level-full' | 'rioglyph-battery-level-low' | 'rioglyph-beacon' | 'rioglyph-big-bag' | 'rioglyph-book' | 'rioglyph-bookable-poi' | 'rioglyph-bookmark-square' | 'rioglyph-bookmark' | 'rioglyph-border-crossing' | 'rioglyph-box-open' | 'rioglyph-box' | 'rioglyph-brain' | 'rioglyph-brake' | 'rioglyph-branch-horizontal' | 'rioglyph-branch-remove' | 'rioglyph-branch-vertical' | 'rioglyph-broadcast' | 'rioglyph-building' | 'rioglyph-bulb' | 'rioglyph-bulk-container' | 'rioglyph-bus-baseline' | 'rioglyph-bus-breakdown' | 'rioglyph-bus' | 'rioglyph-businessman' | 'rioglyph-calendar-parking' | 'rioglyph-calendar-plus' | 'rioglyph-calendar-today' | 'rioglyph-calendar' | 'rioglyph-camera' | 'rioglyph-car-baseline' | 'rioglyph-car-wash' | 'rioglyph-car' | 'rioglyph-card-hotel' | 'rioglyph-card-reader' | 'rioglyph-cards-add' | 'rioglyph-cards-grid' | 'rioglyph-cards-list' | 'rioglyph-cards-table' | 'rioglyph-cargo' | 'rioglyph-carrier' | 'rioglyph-chat' | 'rioglyph-check-badge' | 'rioglyph-check-shield' | 'rioglyph-checkbox-checked' | 'rioglyph-checkbox' | 'rioglyph-checkboxes' | 'rioglyph-chevron-down' | 'rioglyph-chevron-left' | 'rioglyph-chevron-right' | 'rioglyph-chevron-up' | 'rioglyph-chip' | 'rioglyph-circle-dashed' | 'rioglyph-circle-stack' | 'rioglyph-click' | 'rioglyph-climate-control' | 'rioglyph-clipboard' | 'rioglyph-cloud-download' | 'rioglyph-cloud-not-saved' | 'rioglyph-cloud-progress' | 'rioglyph-cloud-upload' | 'rioglyph-cloud' | 'rioglyph-coasting' | 'rioglyph-code-braces' | 'rioglyph-code-brackets' | 'rioglyph-coffee' | 'rioglyph-cog' | 'rioglyph-coil' | 'rioglyph-color-swatch' | 'rioglyph-comment' | 'rioglyph-compare' | 'rioglyph-compass' | 'rioglyph-component-custom-recurrent' | 'rioglyph-component-custom' | 'rioglyph-component' | 'rioglyph-construction' | 'rioglyph-convert' | 'rioglyph-conveyor-belt' | 'rioglyph-cookie' | 'rioglyph-cooling' | 'rioglyph-cost-efficency' | 'rioglyph-cost-efficiency' | 'rioglyph-crown' | 'rioglyph-cruise-control' | 'rioglyph-csv' | 'rioglyph-cube-dashed' | 'rioglyph-cube' | 'rioglyph-currency-euro' | 'rioglyph-damages' | 'rioglyph-dangerousgoods' | 'rioglyph-dashboard-view' | 'rioglyph-dashboard' | 'rioglyph-delivery-completed' | 'rioglyph-delivery-error' | 'rioglyph-delivery-late' | 'rioglyph-delivery-on-track' | 'rioglyph-delivery-warning' | 'rioglyph-delivery' | 'rioglyph-design' | 'rioglyph-desktop' | 'rioglyph-detail-view-info' | 'rioglyph-detail-view' | 'rioglyph-direction' | 'rioglyph-discount-badge' | 'rioglyph-document-out' | 'rioglyph-document' | 'rioglyph-download' | 'rioglyph-drag-n-drop' | 'rioglyph-drive-history' | 'rioglyph-driver-card' | 'rioglyph-driver-off' | 'rioglyph-driver' | 'rioglyph-drivercard-in' | 'rioglyph-drivercard-out' | 'rioglyph-duplicate' | 'rioglyph-earphone' | 'rioglyph-emergency-stop' | 'rioglyph-empty' | 'rioglyph-engine' | 'rioglyph-envelope-indicator' | 'rioglyph-envelope-open' | 'rioglyph-envelope' | 'rioglyph-erase' | 'rioglyph-error-sign' | 'rioglyph-euro-note' | 'rioglyph-exclamation-sign' | 'rioglyph-exclamation' | 'rioglyph-eye-close' | 'rioglyph-eye-closed' | 'rioglyph-eye-open' | 'rioglyph-eye-option' | 'rioglyph-face-frown' | 'rioglyph-face-neutral' | 'rioglyph-face-smile' | 'rioglyph-facetime-video' | 'rioglyph-factory' | 'rioglyph-file-signature' | 'rioglyph-files' | 'rioglyph-fill' | 'rioglyph-filling-e-station' | 'rioglyph-filling-station' | 'rioglyph-filter-active' | 'rioglyph-filter-reset' | 'rioglyph-filter' | 'rioglyph-fingerprint' | 'rioglyph-finish' | 'rioglyph-fire' | 'rioglyph-flag' | 'rioglyph-flash' | 'rioglyph-folder-closed' | 'rioglyph-folder-open' | 'rioglyph-fuel-diesel' | 'rioglyph-fuel-electric' | 'rioglyph-fuel-gas' | 'rioglyph-fuel-hydrogen' | 'rioglyph-fuel-liquid' | 'rioglyph-fuel-mix' | 'rioglyph-fullscreen' | 'rioglyph-geofence' | 'rioglyph-get' | 'rioglyph-give' | 'rioglyph-globe-alt' | 'rioglyph-globe' | 'rioglyph-group-blocks' | 'rioglyph-group' | 'rioglyph-hand-down' | 'rioglyph-hand-left' | 'rioglyph-hand-right' | 'rioglyph-hand-up' | 'rioglyph-handshake' | 'rioglyph-hash' | 'rioglyph-heart' | 'rioglyph-heating' | 'rioglyph-hierarchy' | 'rioglyph-history' | 'rioglyph-home-sign' | 'rioglyph-home' | 'rioglyph-hour-glass' | 'rioglyph-id' | 'rioglyph-inbox-in' | 'rioglyph-inbox-out' | 'rioglyph-inbox-stack' | 'rioglyph-inbox' | 'rioglyph-info-sign' | 'rioglyph-info' | 'rioglyph-insert' | 'rioglyph-issue-tracking' | 'rioglyph-key' | 'rioglyph-kickdown' | 'rioglyph-language' | 'rioglyph-layer-pois' | 'rioglyph-layer' | 'rioglyph-leafs' | 'rioglyph-light-bulb' | 'rioglyph-line-chart' | 'rioglyph-link' | 'rioglyph-load-unload' | 'rioglyph-load' | 'rioglyph-location-arrow' | 'rioglyph-lock-open' | 'rioglyph-lock' | 'rioglyph-log-in' | 'rioglyph-logout' | 'rioglyph-looking-glass-man' | 'rioglyph-looking-glass' | 'rioglyph-magic-wand' | 'rioglyph-maintenance-components' | 'rioglyph-map-location' | 'rioglyph-map-marker' | 'rioglyph-map' | 'rioglyph-megaphone' | 'rioglyph-menu-hamburger' | 'rioglyph-merge' | 'rioglyph-mesh-box' | 'rioglyph-migrate' | 'rioglyph-milage' | 'rioglyph-minus-light' | 'rioglyph-minus-sign' | 'rioglyph-minus' | 'rioglyph-missing' | 'rioglyph-mode-dark-light' | 'rioglyph-more' | 'rioglyph-new-window' | 'rioglyph-newspaper' | 'rioglyph-note' | 'rioglyph-notification' | 'rioglyph-number-1' | 'rioglyph-number-2' | 'rioglyph-number-3' | 'rioglyph-off' | 'rioglyph-oil-can' | 'rioglyph-ok-circle' | 'rioglyph-ok-dashed' | 'rioglyph-ok-sign' | 'rioglyph-ok' | 'rioglyph-onboarding' | 'rioglyph-ongoing' | 'rioglyph-option-horizontal' | 'rioglyph-option-vertical' | 'rioglyph-order' | 'rioglyph-palette-broken' | 'rioglyph-palette-empty' | 'rioglyph-palette' | 'rioglyph-paper-clip' | 'rioglyph-parcel-broken' | 'rioglyph-parcel' | 'rioglyph-parking' | 'rioglyph-pause-circle' | 'rioglyph-pause' | 'rioglyph-pdf-file' | 'rioglyph-pencil-square' | 'rioglyph-pencil' | 'rioglyph-phone' | 'rioglyph-pictures' | 'rioglyph-pin-range' | 'rioglyph-pin' | 'rioglyph-play-circle' | 'rioglyph-play' | 'rioglyph-plugged-off' | 'rioglyph-plugged-on' | 'rioglyph-plus-light' | 'rioglyph-plus-sign' | 'rioglyph-plus' | 'rioglyph-pm' | 'rioglyph-poi' | 'rioglyph-polygon' | 'rioglyph-position' | 'rioglyph-print' | 'rioglyph-progress-ongoing' | 'rioglyph-progress-remaining' | 'rioglyph-progression' | 'rioglyph-prompt' | 'rioglyph-pto-off' | 'rioglyph-pto-on' | 'rioglyph-pushpin' | 'rioglyph-puzzle' | 'rioglyph-pylon' | 'rioglyph-qr-code' | 'rioglyph-question-sign' | 'rioglyph-question' | 'rioglyph-record' | 'rioglyph-recycle' | 'rioglyph-refresh' | 'rioglyph-remove-circle' | 'rioglyph-remove-sign' | 'rioglyph-remove' | 'rioglyph-repeat-square' | 'rioglyph-repeat' | 'rioglyph-resize-full' | 'rioglyph-resize-horizontal' | 'rioglyph-resize-small' | 'rioglyph-resize-vertical' | 'rioglyph-retrofit' | 'rioglyph-retweet' | 'rioglyph-revert' | 'rioglyph-rio-marker' | 'rioglyph-rio' | 'rioglyph-road-restrictions' | 'rioglyph-road' | 'rioglyph-robot' | 'rioglyph-rocket' | 'rioglyph-role-management' | 'rioglyph-roll-container' | 'rioglyph-route-option' | 'rioglyph-route-view' | 'rioglyph-route' | 'rioglyph-ruler' | 'rioglyph-satellite-radar' | 'rioglyph-save' | 'rioglyph-scale' | 'rioglyph-scan' | 'rioglyph-scissors' | 'rioglyph-search-list' | 'rioglyph-search-truck' | 'rioglyph-search' | 'rioglyph-send' | 'rioglyph-series' | 'rioglyph-server-stack' | 'rioglyph-settings' | 'rioglyph-share-alt' | 'rioglyph-share-nodes' | 'rioglyph-share' | 'rioglyph-shelve-empty' | 'rioglyph-shelve' | 'rioglyph-ship' | 'rioglyph-shopping-bag' | 'rioglyph-shopping-cart' | 'rioglyph-signature' | 'rioglyph-slope-down-max' | 'rioglyph-slope-down-min' | 'rioglyph-slope-up-max' | 'rioglyph-slope-up-min' | 'rioglyph-sort-by-attributes-alt' | 'rioglyph-sort-by-attributes' | 'rioglyph-sort' | 'rioglyph-sparkles' | 'rioglyph-speed' | 'rioglyph-sphere' | 'rioglyph-spinner' | 'rioglyph-split-view' | 'rioglyph-square-dashed' | 'rioglyph-stack-add' | 'rioglyph-stack-iso' | 'rioglyph-stack' | 'rioglyph-star-empty' | 'rioglyph-star' | 'rioglyph-stars' | 'rioglyph-start' | 'rioglyph-stats-high' | 'rioglyph-stats-line-dots' | 'rioglyph-stats-low' | 'rioglyph-stats-medium' | 'rioglyph-stats' | 'rioglyph-status-available' | 'rioglyph-status-change-horizontal' | 'rioglyph-status-change' | 'rioglyph-status-driving' | 'rioglyph-status-resting' | 'rioglyph-status-working' | 'rioglyph-steering-wheel' | 'rioglyph-stillage' | 'rioglyph-stopover' | 'rioglyph-support' | 'rioglyph-table-view' | 'rioglyph-tachograph-download' | 'rioglyph-tachograph' | 'rioglyph-tag' | 'rioglyph-tasks' | 'rioglyph-temperature' | 'rioglyph-th-list' | 'rioglyph-thumbs-down' | 'rioglyph-thumbs-up' | 'rioglyph-tickets' | 'rioglyph-time-alt' | 'rioglyph-time-cancle' | 'rioglyph-time-incomplete' | 'rioglyph-time' | 'rioglyph-tire' | 'rioglyph-tms' | 'rioglyph-to-bottom' | 'rioglyph-to-left' | 'rioglyph-to-right' | 'rioglyph-to-top' | 'rioglyph-tracking-package' | 'rioglyph-traffic-lights' | 'rioglyph-trailer-baseline' | 'rioglyph-trailer-liquid' | 'rioglyph-trailer-standard' | 'rioglyph-trailer-tipping' | 'rioglyph-trailer' | 'rioglyph-trailerposition' | 'rioglyph-train' | 'rioglyph-transfer' | 'rioglyph-transition-push-right' | 'rioglyph-transition-right' | 'rioglyph-trash' | 'rioglyph-triangle-bottom' | 'rioglyph-triangle-left' | 'rioglyph-triangle-right' | 'rioglyph-triangle-top' | 'rioglyph-trophy' | 'rioglyph-truck-baseline' | 'rioglyph-truck-breakdown' | 'rioglyph-truck-unit' | 'rioglyph-truck' | 'rioglyph-unassigned' | 'rioglyph-unavailable' | 'rioglyph-unlink' | 'rioglyph-upload' | 'rioglyph-user-add' | 'rioglyph-user-group' | 'rioglyph-user-ok' | 'rioglyph-user-remove' | 'rioglyph-user-sign-off' | 'rioglyph-user-sign' | 'rioglyph-user' | 'rioglyph-van-baseline' | 'rioglyph-van' | 'rioglyph-variable' | 'rioglyph-video-off' | 'rioglyph-video' | 'rioglyph-volume' | 'rioglyph-wallet' | 'rioglyph-warehouse' | 'rioglyph-warning-sign' | 'rioglyph-weather-cloudy' | 'rioglyph-weather-icy' | 'rioglyph-weather-overcast' | 'rioglyph-weather-raining' | 'rioglyph-weather-snowing' | 'rioglyph-weather-stormy' | 'rioglyph-weather-sunny' | 'rioglyph-weather-thundering' | 'rioglyph-weather-windy' | 'rioglyph-weight' | 'rioglyph-width' | 'rioglyph-wifi-off' | 'rioglyph-wifi' | 'rioglyph-window' | 'rioglyph-workflow-step' | 'rioglyph-workflow' | 'rioglyph-workshop' | 'rioglyph-wrench' | 'rioglyph-xmas-raindeer' | 'rioglyph-xmas-santa';
1
+ export type RioglyphIconType = 'rioglyph-academic-cap' | 'rioglyph-addressbook' | 'rioglyph-ai' | 'rioglyph-air-pay' | 'rioglyph-am' | 'rioglyph-angle-double-down' | 'rioglyph-angle-double-left' | 'rioglyph-angle-double-right' | 'rioglyph-angle-double-up' | 'rioglyph-antenna' | 'rioglyph-api' | 'rioglyph-archive' | 'rioglyph-area-chart' | 'rioglyph-area-in' | 'rioglyph-area-out' | 'rioglyph-arrow-down' | 'rioglyph-arrow-left' | 'rioglyph-arrow-right' | 'rioglyph-arrow-up' | 'rioglyph-arrows-collapse' | 'rioglyph-arrows-combine' | 'rioglyph-arrows-expand' | 'rioglyph-arrows-horizontal' | 'rioglyph-arrows-split' | 'rioglyph-assigned' | 'rioglyph-axis-x' | 'rioglyph-axis-y' | 'rioglyph-axis-z' | 'rioglyph-axle' | 'rioglyph-ban-circle' | 'rioglyph-bar-chart-box' | 'rioglyph-battery-charging' | 'rioglyph-battery-level-empty' | 'rioglyph-battery-level-full' | 'rioglyph-battery-level-low' | 'rioglyph-beacon' | 'rioglyph-big-bag' | 'rioglyph-book' | 'rioglyph-bookable-poi' | 'rioglyph-bookmark-square' | 'rioglyph-bookmark' | 'rioglyph-border-crossing' | 'rioglyph-box-open' | 'rioglyph-box' | 'rioglyph-brain' | 'rioglyph-brake' | 'rioglyph-branch-horizontal' | 'rioglyph-branch-remove' | 'rioglyph-branch-vertical' | 'rioglyph-broadcast' | 'rioglyph-building' | 'rioglyph-bulb' | 'rioglyph-bulk-container' | 'rioglyph-bus-baseline' | 'rioglyph-bus-breakdown' | 'rioglyph-bus' | 'rioglyph-businessman' | 'rioglyph-calendar-parking' | 'rioglyph-calendar-plus' | 'rioglyph-calendar-today' | 'rioglyph-calendar' | 'rioglyph-camera' | 'rioglyph-car-baseline' | 'rioglyph-car-wash' | 'rioglyph-car' | 'rioglyph-card-hotel' | 'rioglyph-card-reader' | 'rioglyph-cards-add' | 'rioglyph-cards-grid' | 'rioglyph-cards-list' | 'rioglyph-cards-table' | 'rioglyph-cargo' | 'rioglyph-carrier' | 'rioglyph-chat' | 'rioglyph-check-badge' | 'rioglyph-check-shield' | 'rioglyph-checkbox-checked' | 'rioglyph-checkbox' | 'rioglyph-checkboxes' | 'rioglyph-chevron-down' | 'rioglyph-chevron-left' | 'rioglyph-chevron-right' | 'rioglyph-chevron-up' | 'rioglyph-chip' | 'rioglyph-circle-dashed' | 'rioglyph-circle-stack' | 'rioglyph-click' | 'rioglyph-climate-control' | 'rioglyph-clipboard' | 'rioglyph-cloud-download' | 'rioglyph-cloud-not-saved' | 'rioglyph-cloud-progress' | 'rioglyph-cloud-upload' | 'rioglyph-cloud' | 'rioglyph-coasting' | 'rioglyph-code-braces' | 'rioglyph-code-brackets' | 'rioglyph-coffee' | 'rioglyph-cog' | 'rioglyph-coil' | 'rioglyph-color-swatch' | 'rioglyph-comment' | 'rioglyph-compare' | 'rioglyph-compass' | 'rioglyph-component-custom-recurrent' | 'rioglyph-component-custom' | 'rioglyph-component' | 'rioglyph-construction' | 'rioglyph-convert' | 'rioglyph-conveyor-belt' | 'rioglyph-cookie' | 'rioglyph-cooling' | 'rioglyph-cost-efficency' | 'rioglyph-cost-efficiency' | 'rioglyph-crown' | 'rioglyph-cruise-control' | 'rioglyph-css' | 'rioglyph-csv' | 'rioglyph-cube-dashed' | 'rioglyph-cube' | 'rioglyph-currency-euro' | 'rioglyph-damages' | 'rioglyph-dangerousgoods' | 'rioglyph-dashboard-view' | 'rioglyph-dashboard' | 'rioglyph-delivery-completed' | 'rioglyph-delivery-error' | 'rioglyph-delivery-late' | 'rioglyph-delivery-on-track' | 'rioglyph-delivery-warning' | 'rioglyph-delivery' | 'rioglyph-design' | 'rioglyph-desktop' | 'rioglyph-detail-view-info' | 'rioglyph-detail-view' | 'rioglyph-direction' | 'rioglyph-discount-badge' | 'rioglyph-document-out' | 'rioglyph-document' | 'rioglyph-download' | 'rioglyph-drag-n-drop' | 'rioglyph-drive-history' | 'rioglyph-driver-card' | 'rioglyph-driver-off' | 'rioglyph-driver' | 'rioglyph-drivercard-in' | 'rioglyph-drivercard-out' | 'rioglyph-duplicate' | 'rioglyph-earphone' | 'rioglyph-emergency-stop' | 'rioglyph-empty' | 'rioglyph-engine' | 'rioglyph-envelope-indicator' | 'rioglyph-envelope-open' | 'rioglyph-envelope' | 'rioglyph-erase' | 'rioglyph-error-sign' | 'rioglyph-euro-note' | 'rioglyph-exclamation-sign' | 'rioglyph-exclamation' | 'rioglyph-eye-close' | 'rioglyph-eye-closed' | 'rioglyph-eye-open' | 'rioglyph-eye-option' | 'rioglyph-face-frown' | 'rioglyph-face-neutral' | 'rioglyph-face-smile' | 'rioglyph-facetime-video' | 'rioglyph-factory' | 'rioglyph-file-signature' | 'rioglyph-files' | 'rioglyph-fill' | 'rioglyph-filling-e-station' | 'rioglyph-filling-station' | 'rioglyph-filter-active' | 'rioglyph-filter-reset' | 'rioglyph-filter' | 'rioglyph-fingerprint' | 'rioglyph-finish' | 'rioglyph-fire' | 'rioglyph-flag' | 'rioglyph-flash' | 'rioglyph-folder-closed' | 'rioglyph-folder-open' | 'rioglyph-fuel-diesel' | 'rioglyph-fuel-electric' | 'rioglyph-fuel-gas' | 'rioglyph-fuel-hydrogen' | 'rioglyph-fuel-liquid' | 'rioglyph-fuel-mix' | 'rioglyph-fullscreen' | 'rioglyph-geofence' | 'rioglyph-get' | 'rioglyph-give' | 'rioglyph-globe-alt' | 'rioglyph-globe' | 'rioglyph-group-blocks' | 'rioglyph-group' | 'rioglyph-hand-down' | 'rioglyph-hand-left' | 'rioglyph-hand-right' | 'rioglyph-hand-up' | 'rioglyph-handshake' | 'rioglyph-hash' | 'rioglyph-heart' | 'rioglyph-heating' | 'rioglyph-hierarchy' | 'rioglyph-history' | 'rioglyph-home-sign' | 'rioglyph-home' | 'rioglyph-hour-glass' | 'rioglyph-id' | 'rioglyph-inbox-in' | 'rioglyph-inbox-out' | 'rioglyph-inbox-stack' | 'rioglyph-inbox' | 'rioglyph-info-sign' | 'rioglyph-info' | 'rioglyph-insert' | 'rioglyph-issue-tracking' | 'rioglyph-key' | 'rioglyph-kickdown' | 'rioglyph-language' | 'rioglyph-layer-pois' | 'rioglyph-layer' | 'rioglyph-leafs' | 'rioglyph-light-bulb' | 'rioglyph-line-chart' | 'rioglyph-link' | 'rioglyph-load-unload' | 'rioglyph-load' | 'rioglyph-location-arrow' | 'rioglyph-lock-open' | 'rioglyph-lock' | 'rioglyph-log-in' | 'rioglyph-logout' | 'rioglyph-looking-glass-man' | 'rioglyph-looking-glass' | 'rioglyph-magic-wand' | 'rioglyph-maintenance-components' | 'rioglyph-map-location' | 'rioglyph-map-marker' | 'rioglyph-map' | 'rioglyph-megaphone' | 'rioglyph-menu-hamburger' | 'rioglyph-merge' | 'rioglyph-mesh-box' | 'rioglyph-migrate' | 'rioglyph-milage' | 'rioglyph-minus-light' | 'rioglyph-minus-sign' | 'rioglyph-minus' | 'rioglyph-missing' | 'rioglyph-mode-dark-light' | 'rioglyph-more' | 'rioglyph-new-window' | 'rioglyph-newspaper' | 'rioglyph-note' | 'rioglyph-notification' | 'rioglyph-number-1' | 'rioglyph-number-2' | 'rioglyph-number-3' | 'rioglyph-off' | 'rioglyph-oil-can' | 'rioglyph-ok-circle' | 'rioglyph-ok-dashed' | 'rioglyph-ok-sign' | 'rioglyph-ok' | 'rioglyph-onboarding' | 'rioglyph-ongoing' | 'rioglyph-option-horizontal' | 'rioglyph-option-vertical' | 'rioglyph-order' | 'rioglyph-palette-broken' | 'rioglyph-palette-empty' | 'rioglyph-palette' | 'rioglyph-paper-clip' | 'rioglyph-parcel-broken' | 'rioglyph-parcel' | 'rioglyph-parking' | 'rioglyph-pause-circle' | 'rioglyph-pause' | 'rioglyph-pdf-file' | 'rioglyph-pencil-square' | 'rioglyph-pencil' | 'rioglyph-phone' | 'rioglyph-pictures' | 'rioglyph-pin-range' | 'rioglyph-pin' | 'rioglyph-play-circle' | 'rioglyph-play' | 'rioglyph-plugged-off' | 'rioglyph-plugged-on' | 'rioglyph-plus-light' | 'rioglyph-plus-sign' | 'rioglyph-plus' | 'rioglyph-pm' | 'rioglyph-poi' | 'rioglyph-polygon' | 'rioglyph-position' | 'rioglyph-print' | 'rioglyph-progress-ongoing' | 'rioglyph-progress-remaining' | 'rioglyph-progression' | 'rioglyph-prompt' | 'rioglyph-pto-off' | 'rioglyph-pto-on' | 'rioglyph-pushpin' | 'rioglyph-puzzle' | 'rioglyph-pylon' | 'rioglyph-qr-code' | 'rioglyph-question-sign' | 'rioglyph-question' | 'rioglyph-record' | 'rioglyph-recycle' | 'rioglyph-refresh' | 'rioglyph-remove-circle' | 'rioglyph-remove-sign' | 'rioglyph-remove' | 'rioglyph-repeat-square' | 'rioglyph-repeat' | 'rioglyph-resize-full' | 'rioglyph-resize-horizontal' | 'rioglyph-resize-small' | 'rioglyph-resize-vertical' | 'rioglyph-retrofit' | 'rioglyph-retweet' | 'rioglyph-revert' | 'rioglyph-rio-marker' | 'rioglyph-rio' | 'rioglyph-road-restrictions' | 'rioglyph-road' | 'rioglyph-robot' | 'rioglyph-rocket' | 'rioglyph-role-management' | 'rioglyph-roll-container' | 'rioglyph-route-option' | 'rioglyph-route-view' | 'rioglyph-route' | 'rioglyph-ruler' | 'rioglyph-satellite-radar' | 'rioglyph-save' | 'rioglyph-scale' | 'rioglyph-scan' | 'rioglyph-scissors' | 'rioglyph-search-list' | 'rioglyph-search-truck' | 'rioglyph-search' | 'rioglyph-send' | 'rioglyph-series' | 'rioglyph-server-stack' | 'rioglyph-settings' | 'rioglyph-share-alt' | 'rioglyph-share-nodes' | 'rioglyph-share' | 'rioglyph-shelve-empty' | 'rioglyph-shelve' | 'rioglyph-ship' | 'rioglyph-shopping-bag' | 'rioglyph-shopping-cart' | 'rioglyph-signature' | 'rioglyph-slope-down-max' | 'rioglyph-slope-down-min' | 'rioglyph-slope-up-max' | 'rioglyph-slope-up-min' | 'rioglyph-sort-by-attributes-alt' | 'rioglyph-sort-by-attributes' | 'rioglyph-sort' | 'rioglyph-sparkles' | 'rioglyph-speed' | 'rioglyph-sphere' | 'rioglyph-spinner' | 'rioglyph-split-view' | 'rioglyph-square-dashed' | 'rioglyph-stack-add' | 'rioglyph-stack-iso' | 'rioglyph-stack' | 'rioglyph-star-empty' | 'rioglyph-star' | 'rioglyph-stars' | 'rioglyph-start' | 'rioglyph-stats-high' | 'rioglyph-stats-line-dots' | 'rioglyph-stats-low' | 'rioglyph-stats-medium' | 'rioglyph-stats' | 'rioglyph-status-available' | 'rioglyph-status-change-horizontal' | 'rioglyph-status-change' | 'rioglyph-status-driving' | 'rioglyph-status-resting' | 'rioglyph-status-working' | 'rioglyph-steering-wheel' | 'rioglyph-stillage' | 'rioglyph-stopover' | 'rioglyph-support' | 'rioglyph-table-view' | 'rioglyph-tachograph-download' | 'rioglyph-tachograph' | 'rioglyph-tag' | 'rioglyph-tasks' | 'rioglyph-temperature' | 'rioglyph-th-list' | 'rioglyph-thumbs-down' | 'rioglyph-thumbs-up' | 'rioglyph-tickets' | 'rioglyph-time-alt' | 'rioglyph-time-cancle' | 'rioglyph-time-incomplete' | 'rioglyph-time' | 'rioglyph-tire' | 'rioglyph-tms' | 'rioglyph-to-bottom' | 'rioglyph-to-left' | 'rioglyph-to-right' | 'rioglyph-to-top' | 'rioglyph-tracking-package' | 'rioglyph-traffic-lights' | 'rioglyph-trailer-baseline' | 'rioglyph-trailer-liquid' | 'rioglyph-trailer-standard' | 'rioglyph-trailer-tipping' | 'rioglyph-trailer' | 'rioglyph-trailerposition' | 'rioglyph-train' | 'rioglyph-transfer' | 'rioglyph-transition-push-right' | 'rioglyph-transition-right' | 'rioglyph-trash' | 'rioglyph-triangle-bottom' | 'rioglyph-triangle-left' | 'rioglyph-triangle-right' | 'rioglyph-triangle-top' | 'rioglyph-trophy' | 'rioglyph-truck-baseline' | 'rioglyph-truck-breakdown' | 'rioglyph-truck-unit' | 'rioglyph-truck' | 'rioglyph-unassigned' | 'rioglyph-unavailable' | 'rioglyph-unlink' | 'rioglyph-upload' | 'rioglyph-user-add' | 'rioglyph-user-group' | 'rioglyph-user-ok' | 'rioglyph-user-remove' | 'rioglyph-user-sign-off' | 'rioglyph-user-sign' | 'rioglyph-user' | 'rioglyph-van-baseline' | 'rioglyph-van' | 'rioglyph-variable' | 'rioglyph-video-off' | 'rioglyph-video' | 'rioglyph-volume' | 'rioglyph-wallet' | 'rioglyph-warehouse' | 'rioglyph-warning-sign' | 'rioglyph-weather-cloudy' | 'rioglyph-weather-icy' | 'rioglyph-weather-overcast' | 'rioglyph-weather-raining' | 'rioglyph-weather-snowing' | 'rioglyph-weather-stormy' | 'rioglyph-weather-sunny' | 'rioglyph-weather-thundering' | 'rioglyph-weather-windy' | 'rioglyph-weight' | 'rioglyph-width' | 'rioglyph-wifi-off' | 'rioglyph-wifi' | 'rioglyph-window' | 'rioglyph-workflow-step' | 'rioglyph-workflow' | 'rioglyph-workshop' | 'rioglyph-wrench' | 'rioglyph-xmas-raindeer' | 'rioglyph-xmas-santa';
@@ -12,6 +12,14 @@ export type SelectOption = {
12
12
  * The option item text.
13
13
  */
14
14
  label: string | React.ReactNode;
15
+ /**
16
+ * Optional description shown below the option item text.
17
+ */
18
+ description?: string | React.ReactNode;
19
+ /**
20
+ * Additional classes to be set on the dropdown menu item.
21
+ */
22
+ dropdownItemClassName?: string;
15
23
  /**
16
24
  * Icon to be displayed in front of the label.
17
25
  */
@@ -1,62 +1,62 @@
1
- import { jsx as c, jsxs as y, Fragment as Q } from "react/jsx-runtime";
2
- import { useState as E, useRef as R, useEffect as D, useLayoutEffect as Y } from "react";
1
+ import { jsx as a, jsxs as l, Fragment as Q } from "react/jsx-runtime";
2
+ import { useState as E, useRef as R, useEffect as b, useLayoutEffect as Y } from "react";
3
3
  import { isEmpty as _ } from "es-toolkit/compat";
4
- import { noop as b } from "es-toolkit/function";
5
- import C from "../../utils/classNames.js";
4
+ import { noop as D } from "es-toolkit/function";
5
+ import h from "../../utils/classNames.js";
6
6
  import { useDropDirection as Z } from "../../utils/useDropDirection.js";
7
- import { DOWN as g, scrollItemIntoView as T, UP as N } from "../../utils/scrollItemIntoView.js";
7
+ import { DOWN as w, scrollItemIntoView as T, UP as g } from "../../utils/scrollItemIntoView.js";
8
8
  import $ from "../../hooks/useKey.js";
9
9
  import ee from "./DropdownHeader.js";
10
10
  import te from "./NoItemMessage.js";
11
11
  import se from "../spinner/Spinner.js";
12
- const B = "data-item-id", re = 0, H = "focus", L = g, Ie = (h) => {
12
+ const B = "data-item-id", re = 0, H = "focus", L = w, Ie = (O) => {
13
13
  const {
14
14
  isOpen: s = !1,
15
- isLoading: l = !1,
16
- updateDOMValues: O = b,
17
- onOpen: i = b,
18
- onSelect: u = b,
19
- onClose: w = b,
15
+ isLoading: p = !1,
16
+ updateDOMValues: x = D,
17
+ onOpen: d = D,
18
+ onSelect: u = D,
19
+ onClose: y = D,
20
20
  options: n = [],
21
21
  autoDropDirection: V = !0,
22
22
  dropup: j = !1,
23
23
  pullRight: K = !1,
24
24
  useActiveClass: G = !1,
25
- focusedItemIndex: p,
26
- keyboardUsed: m,
25
+ focusedItemIndex: m,
26
+ keyboardUsed: f,
27
27
  noItemMessage: P,
28
28
  dropdownClassName: W
29
- } = h, [o, k] = E(p || re), [X, A] = E(m), x = R(L), r = R(null);
30
- D(() => {
29
+ } = O, [o, k] = E(m || re), [X, A] = E(f), C = R(L), r = R(null);
30
+ b(() => {
31
31
  s && r.current && (r.current.scrollTop = 0);
32
- }, [s]), D(() => {
33
- typeof p == "number" && k(p), typeof m == "boolean" && A(m), s || (x.current = L);
34
- }, [p, m, s]);
35
- const f = Z({ pullRight: K, dropup: j, autoDropDirection: V, dropdownMenuRef: r }, [s]);
32
+ }, [s]), b(() => {
33
+ typeof m == "number" && k(m), typeof f == "boolean" && A(f), s || (C.current = L);
34
+ }, [m, f, s]);
35
+ const I = Z({ pullRight: K, dropup: j, autoDropDirection: V, dropdownMenuRef: r }, [s]);
36
36
  Y(() => {
37
37
  if (r.current) {
38
38
  const e = r.current.parentElement;
39
- f.dropup ? e?.classList.add("dropup") : e?.classList.remove("dropup");
39
+ I.dropup ? e?.classList.add("dropup") : e?.classList.remove("dropup");
40
40
  }
41
- }, [f, r]), D(() => {
42
- O(q());
43
- }, [n]), D(() => {
41
+ }, [I, r]), b(() => {
42
+ x(q());
43
+ }, [n]), b(() => {
44
44
  s && T(
45
- x.current || L,
45
+ C.current || L,
46
46
  r.current,
47
- I()
47
+ N()
48
48
  );
49
49
  }, [o, s]);
50
50
  const [v, U] = E(s);
51
- s && !v ? (i(f.dropup), U(s)) : !s && v && (w(), U(s)), $((e) => {
51
+ s && !v ? (d(I.dropup), U(s)) : !s && v && (y(), U(s)), $((e) => {
52
52
  if (s)
53
53
  switch (e.key) {
54
54
  case "Escape": {
55
- w();
55
+ y();
56
56
  break;
57
57
  }
58
58
  case "Tab": {
59
- w();
59
+ y();
60
60
  break;
61
61
  }
62
62
  case "Enter": {
@@ -64,11 +64,11 @@ const B = "data-item-id", re = 0, H = "focus", L = g, Ie = (h) => {
64
64
  break;
65
65
  }
66
66
  case "ArrowUp": {
67
- e.preventDefault(), S(N), T(N, r.current, I());
67
+ e.preventDefault(), S(g), T(g, r.current, N());
68
68
  break;
69
69
  }
70
70
  case "ArrowDown": {
71
- e.preventDefault(), S(g), T(g, r.current, I());
71
+ e.preventDefault(), S(w), T(w, r.current, N());
72
72
  break;
73
73
  }
74
74
  }
@@ -76,18 +76,18 @@ const B = "data-item-id", re = 0, H = "focus", L = g, Ie = (h) => {
76
76
  const S = (e) => {
77
77
  let t = 0;
78
78
  switch (e) {
79
- case N: {
79
+ case g: {
80
80
  t = o <= 0 ? o : o - 1;
81
81
  break;
82
82
  }
83
- case g: {
83
+ case w: {
84
84
  t = o === n.length - 1 ? o : o + 1;
85
85
  break;
86
86
  }
87
87
  }
88
- x.current = e;
89
- const a = e === N ? n.length - 1 : 0;
90
- k(t < 0 ? a : t), A(!0);
88
+ C.current = e;
89
+ const c = e === g ? n.length - 1 : 0;
90
+ k(t < 0 ? c : t), A(!0);
91
91
  }, F = () => r.current?.getElementsByTagName("a") || [], q = () => {
92
92
  if (r.current)
93
93
  return [...F()].map(
@@ -96,57 +96,73 @@ const B = "data-item-id", re = 0, H = "focus", L = g, Ie = (h) => {
96
96
  text: t.textContent
97
97
  })
98
98
  );
99
- }, I = () => [...F()].find((t) => t.className.includes(H)), z = (e) => {
99
+ }, N = () => [...F()].find((t) => t.className.includes(H)), z = (e) => {
100
100
  if (e.preventDefault(), _(n))
101
101
  return;
102
- const t = I();
102
+ const t = N();
103
103
  if (t) {
104
- const a = n.find((d) => d.id === t.getAttribute(B));
105
- u(a);
104
+ const c = n.find((i) => i.id === t.getAttribute(B));
105
+ u(c);
106
106
  }
107
107
  }, J = (e) => {
108
108
  e.preventDefault();
109
- const t = e.currentTarget.getElementsByTagName("input")[0].value, a = n.find((d) => d.id === t);
110
- u(a);
111
- }, M = C("dropdown-menu", f.pullRight && "pull-right", W);
112
- return _(n) ? /* @__PURE__ */ c(te, { noItemMessage: P, className: M }) : /* @__PURE__ */ y("ul", { className: M, ref: r, role: "menu", children: [
113
- l && /* @__PURE__ */ c("div", { className: "display-flex justify-content-center padding-10", children: /* @__PURE__ */ c(se, {}) }),
114
- !l && n.map((e, t) => {
109
+ const t = e.currentTarget.getElementsByTagName("input")[0].value, c = n.find((i) => i.id === t);
110
+ u(c);
111
+ }, M = h("dropdown-menu", I.pullRight && "pull-right", W);
112
+ return _(n) ? /* @__PURE__ */ a(te, { noItemMessage: P, className: M }) : /* @__PURE__ */ l("ul", { className: M, ref: r, role: "menu", children: [
113
+ p && /* @__PURE__ */ a("div", { className: "display-flex justify-content-center padding-10", children: /* @__PURE__ */ a(se, {}) }),
114
+ !p && n.map((e, t) => {
115
115
  if (e.header)
116
- return /* @__PURE__ */ c(ee, { icon: e.icon, label: e.label }, e.id);
117
- const a = C(
116
+ return /* @__PURE__ */ a(ee, { icon: e.icon, label: e.label }, e.id);
117
+ const c = h(
118
118
  X && o === t ? H : "",
119
119
  e.disabled && "pointer-events-none",
120
- "display-flex align-items-center gap-3"
121
- ), d = C(
120
+ "display-flex align-items-center gap-3",
121
+ e.dropdownItemClassName
122
+ ), i = h(
122
123
  e.disabled && "disabled",
123
124
  G && e.selected && "active"
124
125
  );
125
- return /* @__PURE__ */ c("li", { className: d, role: "listitem", children: /* @__PURE__ */ y(
126
+ return /* @__PURE__ */ a("li", { className: i, role: "listitem", children: /* @__PURE__ */ l(
126
127
  "a",
127
128
  {
128
129
  role: "menuitem",
129
- className: a,
130
+ className: c,
130
131
  "data-item-id": e.id,
131
132
  "data-item-index": t,
132
133
  onClick: e.disabled ? void 0 : J,
133
134
  children: [
134
- /* @__PURE__ */ y("span", { className: "selected-option-dropdown-item", children: [
135
- e.icon && /* @__PURE__ */ c(Q, { children: e.icon }),
136
- e.label
137
- ] }),
138
- /* @__PURE__ */ c("input", { type: "hidden", value: e.id })
135
+ /* @__PURE__ */ l(
136
+ "span",
137
+ {
138
+ className: h(
139
+ "selected-option-dropdown-item",
140
+ e.description && "selected-option-dropdown-item-with-description"
141
+ ),
142
+ children: [
143
+ e.icon && /* @__PURE__ */ a(Q, { children: e.icon }),
144
+ e.description ? /* @__PURE__ */ l("span", { className: "selected-option-dropdown-text", children: [
145
+ /* @__PURE__ */ a("span", { className: "selected-option-dropdown-label", children: e.label }),
146
+ /* @__PURE__ */ l("span", { className: "selected-option-dropdown-description", children: [
147
+ " ",
148
+ e.description
149
+ ] })
150
+ ] }) : e.label
151
+ ]
152
+ }
153
+ ),
154
+ /* @__PURE__ */ a("input", { type: "hidden", value: e.id })
139
155
  ]
140
156
  }
141
157
  ) }, e.id);
142
158
  })
143
159
  ] });
144
- }, De = (h, s, l) => {
145
- const O = h.filter((i) => i.text.toLowerCase().includes(s.toLowerCase()));
146
- return l.filter((i) => O.find((u) => u.id === i.id));
160
+ }, Ne = (O, s, p) => {
161
+ const x = O.filter((d) => d.text.toLowerCase().includes(s.toLowerCase()));
162
+ return p.filter((d) => x.find((u) => u.id === d.id));
147
163
  };
148
164
  export {
149
165
  Ie as default,
150
- De as filterOptions
166
+ Ne as filterOptions
151
167
  };
152
168
  //# sourceMappingURL=BaseSelectDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSelectDropdown.js","sources":["../../../src/components/selects/BaseSelectDropdown.tsx"],"sourcesContent":["import type React from 'react';\nimport { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { isEmpty } from 'es-toolkit/compat';\nimport { noop } from 'es-toolkit/function';\n\nimport classNames from '../../utils/classNames';\nimport { useDropDirection } from '../../utils/useDropDirection';\nimport { DOWN, scrollItemIntoView, UP } from '../../utils/scrollItemIntoView';\nimport useKey from '../../useKey';\nimport DropdownHeader from './DropdownHeader';\nimport NoItemMessage from './NoItemMessage';\nimport Spinner from '../spinner/Spinner';\n\nconst DATA_ATTRIBUTE_ID = 'data-item-id';\nconst DEFAULT_FOCUSED_ITEM_INDEX = 0;\nconst HIGHLIGHT_CLASS = 'focus';\nconst DEFAULT_SCROLL_DIRECTION = DOWN;\n\nexport type OptionDOMValue = {\n id: string;\n text: string;\n};\n\nexport type SelectOption = {\n /**\n * Used to identify an option.\n */\n id: string;\n\n /**\n * The option item text.\n */\n label: string | React.ReactNode;\n\n /**\n * Icon to be displayed in front of the label.\n */\n icon?: React.ReactNode;\n\n /**\n * Defines whether the menu item is selected.\n *\n * @default false\n */\n selected?: boolean;\n\n /**\n * Setting \"disabled\" to true will disable the respective item.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Will treat the given value as a menu header\n */\n header?: boolean;\n};\n\nexport type BaseSelectDropdownProps<T extends SelectOption> = {\n options?: T[];\n isOpen?: boolean;\n isLoading?: boolean;\n updateDOMValues?: (values: OptionDOMValue[] | undefined) => void;\n onOpen?: (hasDropup: boolean) => void;\n onSelect?: (selectedItem: T | undefined) => void;\n onClose?: () => void;\n placeholder?: string | React.ReactNode;\n dropup?: boolean;\n pullRight?: boolean;\n autoDropDirection?: boolean;\n noItemMessage?: string | React.ReactNode;\n focusedItemIndex?: number;\n dropdownClassName?: string;\n keyboardUsed?: boolean;\n useActiveClass?: boolean;\n};\n\nconst BaseSelectDropdown = <T extends SelectOption>(props: BaseSelectDropdownProps<T>) => {\n const {\n isOpen = false,\n isLoading = false,\n updateDOMValues = noop,\n onOpen = noop,\n onSelect = noop,\n onClose = noop,\n options = [],\n autoDropDirection = true,\n dropup = false,\n pullRight = false,\n useActiveClass = false,\n focusedItemIndex: externalFocusedItemIndex,\n keyboardUsed: externalKeyboardUsed,\n noItemMessage,\n dropdownClassName,\n } = props;\n\n const [focusedItemIndex, setFocusedItemIndex] = useState(externalFocusedItemIndex || DEFAULT_FOCUSED_ITEM_INDEX);\n const [keyboardUsed, setKeyboardUsed] = useState(externalKeyboardUsed);\n const lastScrollDirectionRef = useRef<typeof UP | typeof DOWN>(DEFAULT_SCROLL_DIRECTION);\n\n const dropdownMenuRef = useRef<HTMLUListElement>(null);\n\n // Reset scroll position whenever the menu opens to avoid retaining old scroll offsets\n useEffect(() => {\n if (isOpen && dropdownMenuRef.current) {\n dropdownMenuRef.current.scrollTop = 0;\n }\n }, [isOpen]);\n\n // Keep internal focus state in sync when the dropdown opens/closes or when parent-controlled values change\n useEffect(() => {\n if (typeof externalFocusedItemIndex === 'number') {\n setFocusedItemIndex(externalFocusedItemIndex);\n }\n\n if (typeof externalKeyboardUsed === 'boolean') {\n setKeyboardUsed(externalKeyboardUsed);\n }\n\n if (!isOpen) {\n lastScrollDirectionRef.current = DEFAULT_SCROLL_DIRECTION;\n }\n }, [externalFocusedItemIndex, externalKeyboardUsed, isOpen]);\n\n // Overwrite position of dropdown menu in case auto drop is enabled\n const dropDirection = useDropDirection({ pullRight, dropup, autoDropDirection, dropdownMenuRef }, [isOpen]);\n\n // Add or remove the \"dropup\" class from the parent Select/Multiselect component to position\n // the dropdown element accordingly via CSS\n useLayoutEffect(() => {\n if (dropdownMenuRef.current) {\n const parent = dropdownMenuRef.current.parentElement;\n if (dropDirection.dropup) {\n parent?.classList.add('dropup');\n } else {\n parent?.classList.remove('dropup');\n }\n }\n }, [dropDirection, dropdownMenuRef]);\n\n useEffect(() => {\n // all available items need to be rendered in order to know their DOM value\n // which will be used for filtering in the parent component\n updateDOMValues(updateItemDOMValues());\n }, [options]);\n\n // Scroll the focused item into view whenever focus changes\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n scrollItemIntoView(\n lastScrollDirectionRef.current || DEFAULT_SCROLL_DIRECTION,\n dropdownMenuRef.current,\n getFocusedOptionNode()\n );\n }, [focusedItemIndex, isOpen]);\n\n // update internal state for isOpen\n const [previousIsOpen, setPreviousIsOpen] = useState(isOpen);\n if (isOpen && !previousIsOpen) {\n onOpen(dropDirection.dropup);\n setPreviousIsOpen(isOpen);\n } else if (!isOpen && previousIsOpen) {\n onClose();\n setPreviousIsOpen(isOpen);\n }\n\n useKey(event => {\n if (isOpen) {\n switch (event.key) {\n case 'Escape': {\n // close dropdown on esc\n onClose();\n break;\n }\n case 'Tab': {\n // close dropdown on tab\n onClose();\n break;\n }\n case 'Enter': {\n // select item on enter\n selectOptionOnEnter(event);\n break;\n }\n case 'ArrowUp': {\n // prevent scrolling the page when dropdown menu is open\n event.preventDefault();\n\n // select item above on arrow up key\n focusOption(UP);\n scrollItemIntoView(UP, dropdownMenuRef.current, getFocusedOptionNode());\n break;\n }\n case 'ArrowDown': {\n // prevent scrolling the page when dropdown menu is open\n event.preventDefault();\n\n // select item below on arrow down key\n focusOption(DOWN);\n scrollItemIntoView(DOWN, dropdownMenuRef.current, getFocusedOptionNode());\n break;\n }\n default:\n break;\n }\n }\n });\n\n const focusOption = (direction: typeof UP | typeof DOWN) => {\n let nextFocusedItem = 0;\n\n switch (direction) {\n case UP: {\n nextFocusedItem = focusedItemIndex <= 0 ? focusedItemIndex : focusedItemIndex - 1;\n break;\n }\n case DOWN: {\n nextFocusedItem = focusedItemIndex === options.length - 1 ? focusedItemIndex : focusedItemIndex + 1;\n break;\n }\n default:\n break;\n }\n\n lastScrollDirectionRef.current = direction;\n\n // In case the next item index is negative, means outside the bounds of the items,\n // reset it depending on the current direction\n const indexLimit = direction === UP ? options.length - 1 : 0;\n\n setFocusedItemIndex(nextFocusedItem < 0 ? indexLimit : nextFocusedItem);\n setKeyboardUsed(true);\n };\n\n const getOptionNodes = () => {\n const node = dropdownMenuRef.current;\n return node?.getElementsByTagName('a') || [];\n };\n\n const updateItemDOMValues = () => {\n if (dropdownMenuRef.current) {\n const optionNodes = getOptionNodes();\n return [...optionNodes].map(\n item =>\n ({\n id: item.getAttribute(DATA_ATTRIBUTE_ID),\n text: item.textContent,\n }) as OptionDOMValue\n );\n }\n };\n\n const getFocusedOptionNode = () => {\n const optionNodes = getOptionNodes();\n return [...optionNodes].find(item => item.className.includes(HIGHLIGHT_CLASS));\n };\n\n const selectOptionOnEnter = (event: KeyboardEvent) => {\n event.preventDefault();\n\n // When no filter result was found, avoid selecting anything\n if (isEmpty(options)) {\n return;\n }\n\n const match = getFocusedOptionNode();\n\n if (match) {\n const selectedItem = options.find(option => option.id === match.getAttribute(DATA_ATTRIBUTE_ID));\n onSelect(selectedItem);\n }\n };\n\n const handleOptionChange = (event: React.MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n\n const optionId = event.currentTarget.getElementsByTagName('input')[0].value;\n const selectedItem = options.find(option => option.id === optionId);\n\n onSelect(selectedItem);\n };\n\n const dropdownMenuClasses = classNames('dropdown-menu', dropDirection.pullRight && 'pull-right', dropdownClassName);\n\n // Don't show the dropdown, when no match are found when filtering unless there is a not found message\n if (isEmpty(options)) {\n return <NoItemMessage noItemMessage={noItemMessage} className={dropdownMenuClasses} />;\n }\n\n return (\n <ul className={dropdownMenuClasses} ref={dropdownMenuRef} role='menu'>\n {isLoading && (\n <div className='display-flex justify-content-center padding-10'>\n <Spinner />\n </div>\n )}\n {!isLoading &&\n options.map((option, index) => {\n if (option.header) {\n return <DropdownHeader key={option.id} icon={option.icon} label={option.label} />;\n }\n\n // Show focused style only when keyboard is in use\n const anchorClassNames = classNames(\n keyboardUsed && focusedItemIndex === index ? HIGHLIGHT_CLASS : '',\n option.disabled && 'pointer-events-none',\n 'display-flex align-items-center gap-3'\n );\n\n const wrapperClassNames = classNames(\n option.disabled && 'disabled',\n useActiveClass && option.selected && 'active'\n );\n\n return (\n <li key={option.id} className={wrapperClassNames} role='listitem'>\n <a\n role='menuitem'\n className={anchorClassNames}\n data-item-id={option.id}\n data-item-index={index}\n // Note, we need to assign the click callback only when it's not disabled\n // otherwise the functions is still triggered\n onClick={option.disabled ? undefined : handleOptionChange}\n >\n <span className='selected-option-dropdown-item'>\n {option.icon && <>{option.icon}</>}\n {option.label}\n </span>\n <input type='hidden' value={option.id} />\n </a>\n </li>\n );\n })}\n </ul>\n );\n};\n\nexport const filterOptions = <T extends SelectOption>(\n itemDOMValues: OptionDOMValue[],\n filterValue: string,\n options: T[]\n) => {\n const filteredDOMValues = itemDOMValues.filter(item => item.text.toLowerCase().includes(filterValue.toLowerCase()));\n\n // Filter the options according to the filtered DOM values and map the IDs since the filter cannot be done\n // on the options itself as they might contain arbitrary components\n return options.filter(option => filteredDOMValues.find(domValue => domValue.id === option.id));\n};\n\nexport default BaseSelectDropdown;\n"],"names":["DATA_ATTRIBUTE_ID","DEFAULT_FOCUSED_ITEM_INDEX","HIGHLIGHT_CLASS","DEFAULT_SCROLL_DIRECTION","DOWN","BaseSelectDropdown","props","isOpen","isLoading","updateDOMValues","noop","onOpen","onSelect","onClose","options","autoDropDirection","dropup","pullRight","useActiveClass","externalFocusedItemIndex","externalKeyboardUsed","noItemMessage","dropdownClassName","focusedItemIndex","setFocusedItemIndex","useState","keyboardUsed","setKeyboardUsed","lastScrollDirectionRef","useRef","dropdownMenuRef","useEffect","dropDirection","useDropDirection","useLayoutEffect","parent","updateItemDOMValues","scrollItemIntoView","getFocusedOptionNode","previousIsOpen","setPreviousIsOpen","useKey","event","selectOptionOnEnter","focusOption","UP","direction","nextFocusedItem","indexLimit","getOptionNodes","item","isEmpty","match","selectedItem","option","handleOptionChange","optionId","dropdownMenuClasses","classNames","jsx","NoItemMessage","Spinner","index","DropdownHeader","anchorClassNames","wrapperClassNames","jsxs","Fragment","filterOptions","itemDOMValues","filterValue","filteredDOMValues","domValue"],"mappings":";;;;;;;;;;;AAaA,MAAMA,IAAoB,gBACpBC,KAA6B,GAC7BC,IAAkB,SAClBC,IAA2BC,GA8D3BC,KAAqB,CAAyBC,MAAsC;AACtF,QAAM;AAAA,IACF,QAAAC,IAAS;AAAA,IACT,WAAAC,IAAY;AAAA,IACZ,iBAAAC,IAAkBC;AAAA,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AQ,OAAO,CAAAwC,MAAUiB,EAAkB,KAAK,OAAYC,EAAS,OAAOlB,EAAO,EAAE,CAAC;AACjG;"}
1
+ {"version":3,"file":"BaseSelectDropdown.js","sources":["../../../src/components/selects/BaseSelectDropdown.tsx"],"sourcesContent":["import type React from 'react';\nimport { useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport { isEmpty } from 'es-toolkit/compat';\nimport { noop } from 'es-toolkit/function';\n\nimport classNames from '../../utils/classNames';\nimport { useDropDirection } from '../../utils/useDropDirection';\nimport { DOWN, scrollItemIntoView, UP } from '../../utils/scrollItemIntoView';\nimport useKey from '../../useKey';\nimport DropdownHeader from './DropdownHeader';\nimport NoItemMessage from './NoItemMessage';\nimport Spinner from '../spinner/Spinner';\n\nconst DATA_ATTRIBUTE_ID = 'data-item-id';\nconst DEFAULT_FOCUSED_ITEM_INDEX = 0;\nconst HIGHLIGHT_CLASS = 'focus';\nconst DEFAULT_SCROLL_DIRECTION = DOWN;\n\nexport type OptionDOMValue = {\n id: string;\n text: string;\n};\n\nexport type SelectOption = {\n /**\n * Used to identify an option.\n */\n id: string;\n\n /**\n * The option item text.\n */\n label: string | React.ReactNode;\n\n /**\n * Optional description shown below the option item text.\n */\n description?: string | React.ReactNode;\n\n /**\n * Additional classes to be set on the dropdown menu item.\n */\n dropdownItemClassName?: string;\n\n /**\n * Icon to be displayed in front of the label.\n */\n icon?: React.ReactNode;\n\n /**\n * Defines whether the menu item is selected.\n *\n * @default false\n */\n selected?: boolean;\n\n /**\n * Setting \"disabled\" to true will disable the respective item.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * Will treat the given value as a menu header\n */\n header?: boolean;\n};\n\nexport type BaseSelectDropdownProps<T extends SelectOption> = {\n options?: T[];\n isOpen?: boolean;\n isLoading?: boolean;\n updateDOMValues?: (values: OptionDOMValue[] | undefined) => void;\n onOpen?: (hasDropup: boolean) => void;\n onSelect?: (selectedItem: T | undefined) => void;\n onClose?: () => void;\n placeholder?: string | React.ReactNode;\n dropup?: boolean;\n pullRight?: boolean;\n autoDropDirection?: boolean;\n noItemMessage?: string | React.ReactNode;\n focusedItemIndex?: number;\n dropdownClassName?: string;\n keyboardUsed?: boolean;\n useActiveClass?: boolean;\n};\n\nconst BaseSelectDropdown = <T extends SelectOption>(props: BaseSelectDropdownProps<T>) => {\n const {\n isOpen = false,\n isLoading = false,\n updateDOMValues = noop,\n onOpen = noop,\n onSelect = noop,\n onClose = noop,\n options = [],\n autoDropDirection = true,\n dropup = false,\n pullRight = false,\n useActiveClass = false,\n focusedItemIndex: externalFocusedItemIndex,\n keyboardUsed: externalKeyboardUsed,\n noItemMessage,\n dropdownClassName,\n } = props;\n\n const [focusedItemIndex, setFocusedItemIndex] = useState(externalFocusedItemIndex || DEFAULT_FOCUSED_ITEM_INDEX);\n const [keyboardUsed, setKeyboardUsed] = useState(externalKeyboardUsed);\n const lastScrollDirectionRef = useRef<typeof UP | typeof DOWN>(DEFAULT_SCROLL_DIRECTION);\n\n const dropdownMenuRef = useRef<HTMLUListElement>(null);\n\n // Reset scroll position whenever the menu opens to avoid retaining old scroll offsets\n useEffect(() => {\n if (isOpen && dropdownMenuRef.current) {\n dropdownMenuRef.current.scrollTop = 0;\n }\n }, [isOpen]);\n\n // Keep internal focus state in sync when the dropdown opens/closes or when parent-controlled values change\n useEffect(() => {\n if (typeof externalFocusedItemIndex === 'number') {\n setFocusedItemIndex(externalFocusedItemIndex);\n }\n\n if (typeof externalKeyboardUsed === 'boolean') {\n setKeyboardUsed(externalKeyboardUsed);\n }\n\n if (!isOpen) {\n lastScrollDirectionRef.current = DEFAULT_SCROLL_DIRECTION;\n }\n }, [externalFocusedItemIndex, externalKeyboardUsed, isOpen]);\n\n // Overwrite position of dropdown menu in case auto drop is enabled\n const dropDirection = useDropDirection({ pullRight, dropup, autoDropDirection, dropdownMenuRef }, [isOpen]);\n\n // Add or remove the \"dropup\" class from the parent Select/Multiselect component to position\n // the dropdown element accordingly via CSS\n useLayoutEffect(() => {\n if (dropdownMenuRef.current) {\n const parent = dropdownMenuRef.current.parentElement;\n if (dropDirection.dropup) {\n parent?.classList.add('dropup');\n } else {\n parent?.classList.remove('dropup');\n }\n }\n }, [dropDirection, dropdownMenuRef]);\n\n useEffect(() => {\n // all available items need to be rendered in order to know their DOM value\n // which will be used for filtering in the parent component\n updateDOMValues(updateItemDOMValues());\n }, [options]);\n\n // Scroll the focused item into view whenever focus changes\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n scrollItemIntoView(\n lastScrollDirectionRef.current || DEFAULT_SCROLL_DIRECTION,\n dropdownMenuRef.current,\n getFocusedOptionNode()\n );\n }, [focusedItemIndex, isOpen]);\n\n // update internal state for isOpen\n const [previousIsOpen, setPreviousIsOpen] = useState(isOpen);\n if (isOpen && !previousIsOpen) {\n onOpen(dropDirection.dropup);\n setPreviousIsOpen(isOpen);\n } else if (!isOpen && previousIsOpen) {\n onClose();\n setPreviousIsOpen(isOpen);\n }\n\n useKey(event => {\n if (isOpen) {\n switch (event.key) {\n case 'Escape': {\n // close dropdown on esc\n onClose();\n break;\n }\n case 'Tab': {\n // close dropdown on tab\n onClose();\n break;\n }\n case 'Enter': {\n // select item on enter\n selectOptionOnEnter(event);\n break;\n }\n case 'ArrowUp': {\n // prevent scrolling the page when dropdown menu is open\n event.preventDefault();\n\n // select item above on arrow up key\n focusOption(UP);\n scrollItemIntoView(UP, dropdownMenuRef.current, getFocusedOptionNode());\n break;\n }\n case 'ArrowDown': {\n // prevent scrolling the page when dropdown menu is open\n event.preventDefault();\n\n // select item below on arrow down key\n focusOption(DOWN);\n scrollItemIntoView(DOWN, dropdownMenuRef.current, getFocusedOptionNode());\n break;\n }\n default:\n break;\n }\n }\n });\n\n const focusOption = (direction: typeof UP | typeof DOWN) => {\n let nextFocusedItem = 0;\n\n switch (direction) {\n case UP: {\n nextFocusedItem = focusedItemIndex <= 0 ? focusedItemIndex : focusedItemIndex - 1;\n break;\n }\n case DOWN: {\n nextFocusedItem = focusedItemIndex === options.length - 1 ? focusedItemIndex : focusedItemIndex + 1;\n break;\n }\n default:\n break;\n }\n\n lastScrollDirectionRef.current = direction;\n\n // In case the next item index is negative, means outside the bounds of the items,\n // reset it depending on the current direction\n const indexLimit = direction === UP ? options.length - 1 : 0;\n\n setFocusedItemIndex(nextFocusedItem < 0 ? indexLimit : nextFocusedItem);\n setKeyboardUsed(true);\n };\n\n const getOptionNodes = () => {\n const node = dropdownMenuRef.current;\n return node?.getElementsByTagName('a') || [];\n };\n\n const updateItemDOMValues = () => {\n if (dropdownMenuRef.current) {\n const optionNodes = getOptionNodes();\n return [...optionNodes].map(\n item =>\n ({\n id: item.getAttribute(DATA_ATTRIBUTE_ID),\n text: item.textContent,\n }) as OptionDOMValue\n );\n }\n };\n\n const getFocusedOptionNode = () => {\n const optionNodes = getOptionNodes();\n return [...optionNodes].find(item => item.className.includes(HIGHLIGHT_CLASS));\n };\n\n const selectOptionOnEnter = (event: KeyboardEvent) => {\n event.preventDefault();\n\n // When no filter result was found, avoid selecting anything\n if (isEmpty(options)) {\n return;\n }\n\n const match = getFocusedOptionNode();\n\n if (match) {\n const selectedItem = options.find(option => option.id === match.getAttribute(DATA_ATTRIBUTE_ID));\n onSelect(selectedItem);\n }\n };\n\n const handleOptionChange = (event: React.MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n\n const optionId = event.currentTarget.getElementsByTagName('input')[0].value;\n const selectedItem = options.find(option => option.id === optionId);\n\n onSelect(selectedItem);\n };\n\n const dropdownMenuClasses = classNames('dropdown-menu', dropDirection.pullRight && 'pull-right', dropdownClassName);\n\n // Don't show the dropdown, when no match are found when filtering unless there is a not found message\n if (isEmpty(options)) {\n return <NoItemMessage noItemMessage={noItemMessage} className={dropdownMenuClasses} />;\n }\n\n return (\n <ul className={dropdownMenuClasses} ref={dropdownMenuRef} role='menu'>\n {isLoading && (\n <div className='display-flex justify-content-center padding-10'>\n <Spinner />\n </div>\n )}\n {!isLoading &&\n options.map((option, index) => {\n if (option.header) {\n return <DropdownHeader key={option.id} icon={option.icon} label={option.label} />;\n }\n\n // Show focused style only when keyboard is in use\n const anchorClassNames = classNames(\n keyboardUsed && focusedItemIndex === index ? HIGHLIGHT_CLASS : '',\n option.disabled && 'pointer-events-none',\n 'display-flex align-items-center gap-3',\n option.dropdownItemClassName\n );\n\n const wrapperClassNames = classNames(\n option.disabled && 'disabled',\n useActiveClass && option.selected && 'active'\n );\n\n return (\n <li key={option.id} className={wrapperClassNames} role='listitem'>\n <a\n role='menuitem'\n className={anchorClassNames}\n data-item-id={option.id}\n data-item-index={index}\n // Note, we need to assign the click callback only when it's not disabled\n // otherwise the functions is still triggered\n onClick={option.disabled ? undefined : handleOptionChange}\n >\n <span\n className={classNames(\n 'selected-option-dropdown-item',\n option.description && 'selected-option-dropdown-item-with-description'\n )}\n >\n {option.icon && <>{option.icon}</>}\n {option.description ? (\n <span className='selected-option-dropdown-text'>\n <span className='selected-option-dropdown-label'>{option.label}</span>\n <span className='selected-option-dropdown-description'>\n {' '}\n {option.description}\n </span>\n </span>\n ) : (\n option.label\n )}\n </span>\n <input type='hidden' value={option.id} />\n </a>\n </li>\n );\n })}\n </ul>\n );\n};\n\nexport const filterOptions = <T extends SelectOption>(\n itemDOMValues: OptionDOMValue[],\n filterValue: string,\n options: T[]\n) => {\n const filteredDOMValues = itemDOMValues.filter(item => item.text.toLowerCase().includes(filterValue.toLowerCase()));\n\n // Filter the options according to the filtered DOM values and map the IDs since the filter cannot be done\n // on the options itself as they might contain arbitrary components\n return options.filter(option => filteredDOMValues.find(domValue => domValue.id === option.id));\n};\n\nexport default BaseSelectDropdown;\n"],"names":["DATA_ATTRIBUTE_ID","DEFAULT_FOCUSED_ITEM_INDEX","HIGHLIGHT_CLASS","DEFAULT_SCROLL_DIRECTION","DOWN","BaseSelectDropdown","props","isOpen","isLoading","updateDOMValues","noop","onOpen","onSelect","onClose","options","autoDropDirection","dropup","pullRight","useActiveClass","externalFocusedItemIndex","externalKeyboardUsed","noItemMessage","dropdownClassName","focusedItemIndex","setFocusedItemIndex","useState","keyboardUsed","setKeyboardUsed","lastScrollDirectionRef","useRef","dropdownMenuRef","useEffect","dropDirection","useDropDirection","useLayoutEffect","parent","updateItemDOMValues","scrollItemIntoView","getFocusedOptionNode","previousIsOpen","setPreviousIsOpen","useKey","event","selectOptionOnEnter","focusOption","UP","direction","nextFocusedItem","indexLimit","getOptionNodes","item","isEmpty","match","selectedItem","option","handleOptionChange","optionId","dropdownMenuClasses","classNames","jsx","NoItemMessage","Spinner","index","DropdownHeader","anchorClassNames","wrapperClassNames","jsxs","Fragment","filterOptions","itemDOMValues","filterValue","filteredDOMValues","domValue"],"mappings":";;;;;;;;;;;AAaA,MAAMA,IAAoB,gBACpBC,KAA6B,GAC7BC,IAAkB,SAClBC,IAA2BC,GAwE3BC,KAAqB,CAAyBC,MAAsC;AACtF,QAAM;AAAA,IACF,QAAAC,IAAS;AAAA,IACT,WAAAC,IAAY;AAAA,IACZ,iBAAAC,IAAkBC;AAAA,IAClB,QAAAC,IAASD;AAAA,IACT,UAAAE,IAAWF;AAAA,IACX,SAAAG,IAAUH;AAAA,IACV,SAAAI,IAAU,CAAA;AAAA,IACV,mBAAAC,IAAoB;AAAA,IACpB,QAAAC,IAAS;AAAA,IACT,WAAAC,IAAY;AAAA,IACZ,gBAAAC,IAAiB;AAAA,IACjB,kBAAkBC;AAAA,IAClB,cAAcC;AAAA,IACd,eAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,IACAhB,GAEE,CAACiB,GAAkBC,CAAmB,IAAIC,EAASN,KAA4BlB,EAA0B,GACzG,CAACyB,GAAcC,CAAe,IAAIF,EAASL,CAAoB,GAC/DQ,IAAyBC,EAAgC1B,CAAwB,GAEjF2B,IAAkBD,EAAyB,IAAI;AAGrD,EAAAE,EAAU,MAAM;AACZ,IAAIxB,KAAUuB,EAAgB,YAC1BA,EAAgB,QAAQ,YAAY;AAAA,EAE5C,GAAG,CAACvB,CAAM,CAAC,GAGXwB,EAAU,MA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AAA,UACG,MAAK;AAAA,UACL,WAAWF;AAAA,UACX,gBAAcV,EAAO;AAAA,UACrB,mBAAiBQ;AAAA,UAGjB,SAASR,EAAO,WAAW,SAAYC;AAAA,UAEvC,UAAA;AAAA,YAAA,gBAAAW;AAAA,cAAC;AAAA,cAAA;AAAA,gBACG,WAAWR;AAAA,kBACP;AAAA,kBACAJ,EAAO,eAAe;AAAA,gBAAA;AAAA,gBAGzB,UAAA;AAAA,kBAAAA,EAAO,QAAQ,gBAAAK,EAAAQ,GAAA,EAAG,UAAAb,EAAO,MAAK;AAAA,kBAC9BA,EAAO,cACJ,gBAAAY,EAAC,QAAA,EAAK,WAAU,iCACZ,UAAA;AAAA,oBAAA,gBAAAP,EAAC,QAAA,EAAK,WAAU,kCAAkC,UAAAL,EAAO,OAAM;AAAA,oBAC/D,gBAAAY,EAAC,QAAA,EAAK,WAAU,wCACX,UAAA;AAAA,sBAAA;AAAA,sBACAZ,EAAO;AAAA,oBAAA,EAAA,CACZ;AAAA,kBAAA,EAAA,CACJ,IAEAA,EAAO;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,8BAGd,SAAA,EAAM,MAAK,UAAS,OAAOA,EAAO,GAAA,CAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA,EAC3C,GA9BKA,EAAO,EA+BhB;AAAA,IAER,CAAC;AAAA,EAAA,GACT;AAER,GAEac,KAAgB,CACzBC,GACAC,GACAxD,MACC;AACD,QAAMyD,IAAoBF,EAAc,OAAO,CAAAnB,MAAQA,EAAK,KAAK,YAAA,EAAc,SAASoB,EAAY,YAAA,CAAa,CAAC;AAIlH,SAAOxD,EAAQ,OAAO,CAAAwC,MAAUiB,EAAkB,KAAK,OAAYC,EAAS,OAAOlB,EAAO,EAAE,CAAC;AACjG;"}
@@ -1,5 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { SelectOption } from './BaseSelectDropdown';
3
+ import { TrackingAttributes } from '../../utils/analytics/googleAnalyticsUtils';
3
4
  import { WithFeedbackAndAddonProps } from './WithFeedbackAndAddon';
4
5
  export type MultiselectCounterMessage = {
5
6
  /**
@@ -170,6 +171,10 @@ export type MultiselectProps<T extends MultiselectOption> = Omit<WithFeedbackAnd
170
171
  * Additional classes to be set to the select wrapper
171
172
  */
172
173
  className?: string;
174
+ /**
175
+ * Optional tracking attributes added to the toggle button.
176
+ */
177
+ trackingAttributes?: TrackingAttributes;
173
178
  };
174
179
  declare const Multiselect: (props: MultiselectProps<MultiselectOption>) => import("react/jsx-runtime").JSX.Element;
175
180
  export default Multiselect;