@restio/ui 0.0.7-SNAPSHOT → 0.0.9-SNAPSHOT
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/dist/components/anchored-overlay/anchored-overlay-types.d.ts +1 -1
- package/dist/components/anchored-overlay/anchored-overlay-types.js +2 -0
- package/dist/components/anchored-overlay/anchored-overlay-types.js.map +1 -0
- package/dist/components/anchored-overlay/anchored-overlay.d.ts +2 -2
- package/dist/components/anchored-overlay/anchored-overlay.js +67 -0
- package/dist/components/anchored-overlay/anchored-overlay.js.map +1 -0
- package/dist/components/banner/banner-types.d.ts +1 -1
- package/dist/components/banner/banner-types.js +2 -0
- package/dist/components/banner/banner-types.js.map +1 -0
- package/dist/components/banner/banner.d.ts +2 -2
- package/dist/components/banner/banner.js +29 -0
- package/dist/components/banner/banner.js.map +1 -0
- package/dist/components/button/button-types.d.ts +1 -1
- package/dist/components/button/button-types.js +2 -0
- package/dist/components/button/button-types.js.map +1 -0
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/button/button.js +20 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button-group/button-group-types.js +2 -0
- package/dist/components/button-group/button-group-types.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +2 -2
- package/dist/components/button-group/button-group.js +16 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/checkbox/checkbox-types.d.ts +1 -1
- package/dist/components/checkbox/checkbox-types.js +2 -0
- package/dist/components/checkbox/checkbox-types.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -2
- package/dist/components/checkbox/checkbox.js +19 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +1 -1
- package/dist/components/code-block/code-block.js +9 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/file-upload/file-upload-types.d.ts +1 -1
- package/dist/components/file-upload/file-upload-types.js +2 -0
- package/dist/components/file-upload/file-upload-types.js.map +1 -0
- package/dist/components/file-upload/file-upload-utils.js +10 -0
- package/dist/components/file-upload/file-upload-utils.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +2 -2
- package/dist/components/file-upload/file-upload.js +106 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/graph/graph-types.js +2 -0
- package/dist/components/graph/graph-types.js.map +1 -0
- package/dist/components/graph/graph.d.ts +1 -1
- package/dist/components/graph/graph.js +21 -0
- package/dist/components/graph/graph.js.map +1 -0
- package/dist/components/input/date/date-calendar.d.ts +2 -2
- package/dist/components/input/date/date-calendar.js +114 -0
- package/dist/components/input/date/date-calendar.js.map +1 -0
- package/dist/components/input/date/date-input-field.d.ts +2 -2
- package/dist/components/input/date/date-input-field.js +61 -0
- package/dist/components/input/date/date-input-field.js.map +1 -0
- package/dist/components/input/date/date-picker.d.ts +2 -2
- package/dist/components/input/date/date-picker.js +35 -0
- package/dist/components/input/date/date-picker.js.map +1 -0
- package/dist/components/input/date/date-range-input-field.d.ts +2 -2
- package/dist/components/input/date/date-range-input-field.js +90 -0
- package/dist/components/input/date/date-range-input-field.js.map +1 -0
- package/dist/components/input/date/date-range-picker.d.ts +2 -2
- package/dist/components/input/date/date-range-picker.js +74 -0
- package/dist/components/input/date/date-range-picker.js.map +1 -0
- package/dist/components/input/date/date-shortcuts.d.ts +2 -2
- package/dist/components/input/date/date-shortcuts.js +47 -0
- package/dist/components/input/date/date-shortcuts.js.map +1 -0
- package/dist/components/input/date/date-types.d.ts +1 -1
- package/dist/components/input/date/date-types.js +2 -0
- package/dist/components/input/date/date-types.js.map +1 -0
- package/dist/components/input/date/date-utils.d.ts +1 -1
- package/dist/components/input/date/date-utils.js +203 -0
- package/dist/components/input/date/date-utils.js.map +1 -0
- package/dist/components/input/input-types.js +2 -0
- package/dist/components/input/input-types.js.map +1 -0
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +14 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/number/input-number-types.d.ts +1 -1
- package/dist/components/input/number/input-number-types.js +2 -0
- package/dist/components/input/number/input-number-types.js.map +1 -0
- package/dist/components/input/number/input-number.d.ts +2 -2
- package/dist/components/input/number/input-number.js +11 -0
- package/dist/components/input/number/input-number.js.map +1 -0
- package/dist/components/input/text/input-text-types.d.ts +1 -1
- package/dist/components/input/text/input-text-types.js +2 -0
- package/dist/components/input/text/input-text-types.js.map +1 -0
- package/dist/components/input/text/input-text.d.ts +2 -2
- package/dist/components/input/text/input-text.js +8 -0
- package/dist/components/input/text/input-text.js.map +1 -0
- package/dist/components/kbd/kbd-types.js +2 -0
- package/dist/components/kbd/kbd-types.js.map +1 -0
- package/dist/components/kbd/kbd.d.ts +2 -2
- package/dist/components/kbd/kbd.js +12 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd-group/kbd-group-types.js +2 -0
- package/dist/components/kbd-group/kbd-group-types.js.map +1 -0
- package/dist/components/kbd-group/kbd-group.d.ts +2 -2
- package/dist/components/kbd-group/kbd-group.js +15 -0
- package/dist/components/kbd-group/kbd-group.js.map +1 -0
- package/dist/components/list/list-types.d.ts +1 -1
- package/dist/components/list/list-types.js +2 -0
- package/dist/components/list/list-types.js.map +1 -0
- package/dist/components/list/list-utils.d.ts +4 -4
- package/dist/components/list/list-utils.js +73 -0
- package/dist/components/list/list-utils.js.map +1 -0
- package/dist/components/list/list.d.ts +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/list/list.js +68 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/menu/anchored-navigation-menu.d.ts +3 -3
- package/dist/components/menu/anchored-navigation-menu.js +48 -0
- package/dist/components/menu/anchored-navigation-menu.js.map +1 -0
- package/dist/components/menu/menu-assets.d.ts +1 -1
- package/dist/components/menu/menu-assets.js +35 -0
- package/dist/components/menu/menu-assets.js.map +1 -0
- package/dist/components/menu/menu-types.d.ts +2 -2
- package/dist/components/menu/menu-types.js +2 -0
- package/dist/components/menu/menu-types.js.map +1 -0
- package/dist/components/menu/menu.d.ts +2 -2
- package/dist/components/menu/menu.js +86 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/otp/otp-types.js +2 -0
- package/dist/components/otp/otp-types.js.map +1 -0
- package/dist/components/otp/otp-utils.js +22 -0
- package/dist/components/otp/otp-utils.js.map +1 -0
- package/dist/components/otp/otp.d.ts +3 -2
- package/dist/components/otp/otp.js +85 -0
- package/dist/components/otp/otp.js.map +1 -0
- package/dist/components/select/select-types.d.ts +1 -1
- package/dist/components/select/select-types.js +2 -0
- package/dist/components/select/select-types.js.map +1 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +52 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/tag/tag-types.d.ts +1 -1
- package/dist/components/tag/tag-types.js +2 -0
- package/dist/components/tag/tag-types.js.map +1 -0
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +16 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/textarea/textarea-types.d.ts +2 -2
- package/dist/components/textarea/textarea-types.js +2 -0
- package/dist/components/textarea/textarea-types.js.map +1 -0
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +19 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/toast-group/toast-group-types.d.ts +1 -1
- package/dist/components/toast-group/toast-group-types.js +2 -0
- package/dist/components/toast-group/toast-group-types.js.map +1 -0
- package/dist/components/toast-group/toast-group.d.ts +2 -2
- package/dist/components/toast-group/toast-group.js +25 -0
- package/dist/components/toast-group/toast-group.js.map +1 -0
- package/dist/components/typography/typography-types.d.ts +1 -1
- package/dist/components/typography/typography-types.js +11 -0
- package/dist/components/typography/typography-types.js.map +1 -0
- package/dist/components/typography/typography.d.ts +2 -2
- package/dist/components/typography/typography.js +17 -0
- package/dist/components/typography/typography.js.map +1 -0
- package/dist/custom-components/chat/chat-types.d.ts +1 -1
- package/dist/custom-components/chat/chat-types.js +2 -0
- package/dist/custom-components/chat/chat-types.js.map +1 -0
- package/dist/custom-components/chat/chat.d.ts +1 -1
- package/dist/custom-components/chat/chat.js +14 -0
- package/dist/custom-components/chat/chat.js.map +1 -0
- package/dist/custom-components/layout/layout-types.js +2 -0
- package/dist/custom-components/layout/layout-types.js.map +1 -0
- package/dist/custom-components/layout/layout.d.ts +2 -2
- package/dist/custom-components/layout/layout.js +46 -0
- package/dist/custom-components/layout/layout.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js +25 -0
- package/dist/custom-components/layout-builder/layout-builder-constants.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js +169 -0
- package/dist/custom-components/layout-builder/layout-builder-schema.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js +206 -0
- package/dist/custom-components/layout-builder/layout-builder-templates.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-builder-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js +251 -0
- package/dist/custom-components/layout-builder/layout-builder-utils.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.d.ts +8 -2
- package/dist/custom-components/layout-builder/layout-builder-validation.js +445 -0
- package/dist/custom-components/layout-builder/layout-builder-validation.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-builder.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-builder.js +908 -0
- package/dist/custom-components/layout-builder/layout-builder.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.d.ts +1 -1
- package/dist/custom-components/layout-builder/layout-json-editor-types.js +2 -0
- package/dist/custom-components/layout-builder/layout-json-editor-types.js.map +1 -0
- package/dist/custom-components/layout-builder/layout-json-editor.d.ts +2 -2
- package/dist/custom-components/layout-builder/layout-json-editor.js +103 -0
- package/dist/custom-components/layout-builder/layout-json-editor.js.map +1 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js +100 -0
- package/dist/custom-components/layout-builder/stories/hooks/useHistory.js.map +1 -0
- package/dist/custom-components/markdown/markdown-types.d.ts +3 -3
- package/dist/custom-components/markdown/markdown-types.js +2 -0
- package/dist/custom-components/markdown/markdown-types.js.map +1 -0
- package/dist/custom-components/markdown/markdown-utils.js +10 -0
- package/dist/custom-components/markdown/markdown-utils.js.map +1 -0
- package/dist/custom-components/markdown/markdown.d.ts +2 -2
- package/dist/custom-components/markdown/markdown.js +39 -0
- package/dist/custom-components/markdown/markdown.js.map +1 -0
- package/dist/custom-components/mindmap/index.d.ts +2 -2
- package/dist/custom-components/mindmap/index.js +2 -0
- package/dist/custom-components/mindmap/index.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree-types.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree-types.js +2 -0
- package/dist/custom-components/mindmap/mind-tree-types.js.map +1 -0
- package/dist/custom-components/mindmap/mind-tree.d.ts +1 -1
- package/dist/custom-components/mindmap/mind-tree.js +201 -0
- package/dist/custom-components/mindmap/mind-tree.js.map +1 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.d.ts +1 -1
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js +277 -0
- package/dist/custom-components/mindmap/reingold-tilford-algorithm.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js +2 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip-types.js.map +1 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.d.ts +2 -2
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js +32 -0
- package/dist/custom-components/shortcut-tooltip/shortcut-tooltip.js.map +1 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.d.ts +1 -1
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js +19 -0
- package/dist/custom-components/timeline/skeleton/timeline-skeleton.js.map +1 -0
- package/dist/custom-components/timeline/timeline-types.js +2 -0
- package/dist/custom-components/timeline/timeline-types.js.map +1 -0
- package/dist/custom-components/timeline/timeline.d.ts +2 -2
- package/dist/custom-components/timeline/timeline.js +64 -0
- package/dist/custom-components/timeline/timeline.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-edge.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-edge.js +31 -0
- package/dist/custom-components/workflow/layout/workflow-edge.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.d.ts +1 -1
- package/dist/custom-components/workflow/layout/workflow-layout-types.js +2 -0
- package/dist/custom-components/workflow/layout/workflow-layout-types.js.map +1 -0
- package/dist/custom-components/workflow/layout/workflow-layout.d.ts +2 -2
- package/dist/custom-components/workflow/layout/workflow-layout.js +284 -0
- package/dist/custom-components/workflow/layout/workflow-layout.js.map +1 -0
- package/dist/custom-components/workflow/node/workflow-node.d.ts +1 -1
- package/dist/custom-components/workflow/node/workflow-node.js +22 -0
- package/dist/custom-components/workflow/node/workflow-node.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel-types.js +2 -0
- package/dist/custom-components/workflow/panel/workflow-panel-types.js.map +1 -0
- package/dist/custom-components/workflow/panel/workflow-panel.d.ts +1 -1
- package/dist/custom-components/workflow/panel/workflow-panel.js +53 -0
- package/dist/custom-components/workflow/panel/workflow-panel.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js +2 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar-types.js.map +1 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.d.ts +1 -1
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js +19 -0
- package/dist/custom-components/workflow/toolbar/workflow-toolbar.js.map +1 -0
- package/dist/custom-components/workflow/utils/workflow-validation.d.ts +2 -2
- package/dist/custom-components/workflow/utils/workflow-validation.js +257 -0
- package/dist/custom-components/workflow/utils/workflow-validation.js.map +1 -0
- package/dist/custom-components/workflow/workflow-types.d.ts +3 -3
- package/dist/custom-components/workflow/workflow-types.js +2 -0
- package/dist/custom-components/workflow/workflow-types.js.map +1 -0
- package/dist/custom-components/workflow/workflow.d.ts +1 -1
- package/dist/custom-components/workflow/workflow.js +125 -0
- package/dist/custom-components/workflow/workflow.js.map +1 -0
- package/dist/data-components/assets/data-components-asset.js +2 -0
- package/dist/data-components/assets/data-components-asset.js.map +1 -0
- package/dist/data-components/calendar/calendar-types.d.ts +1 -1
- package/dist/data-components/calendar/calendar-types.js +2 -0
- package/dist/data-components/calendar/calendar-types.js.map +1 -0
- package/dist/data-components/calendar/calendar-utils.js +2 -0
- package/dist/data-components/calendar/calendar-utils.js.map +1 -0
- package/dist/data-components/calendar/calendar.d.ts +1 -1
- package/dist/data-components/calendar/calendar.js +78 -0
- package/dist/data-components/calendar/calendar.js.map +1 -0
- package/dist/data-components/cell/cell-switch.d.ts +1 -1
- package/dist/data-components/cell/cell-switch.js +68 -0
- package/dist/data-components/cell/cell-switch.js.map +1 -0
- package/dist/data-components/cell/cell-types.d.ts +2 -2
- package/dist/data-components/cell/cell-types.js +2 -0
- package/dist/data-components/cell/cell-types.js.map +1 -0
- package/dist/data-components/cell/cell-utils.js +60 -0
- package/dist/data-components/cell/cell-utils.js.map +1 -0
- package/dist/data-components/cell/cell.d.ts +1 -1
- package/dist/data-components/cell/cell.js +63 -0
- package/dist/data-components/cell/cell.js.map +1 -0
- package/dist/data-components/chart/chart-types.d.ts +1 -1
- package/dist/data-components/chart/chart-types.js +2 -0
- package/dist/data-components/chart/chart-types.js.map +1 -0
- package/dist/data-components/chart/chart.d.ts +1 -1
- package/dist/data-components/chart/chart.js +121 -0
- package/dist/data-components/chart/chart.js.map +1 -0
- package/dist/data-components/chart/sankey/sankeyChart.d.ts +1 -1
- package/dist/data-components/chart/sankey/sankeyChart.js +111 -0
- package/dist/data-components/chart/sankey/sankeyChart.js.map +1 -0
- package/dist/data-components/data-structure/data-structure-utils.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure-utils.js +28 -0
- package/dist/data-components/data-structure/data-structure-utils.js.map +1 -0
- package/dist/data-components/data-structure/data-structure.d.ts +1 -1
- package/dist/data-components/data-structure/data-structure.js +2 -0
- package/dist/data-components/data-structure/data-structure.js.map +1 -0
- package/dist/data-components/data-structure/stories-assets.d.ts +5 -1
- package/dist/data-components/data-structure/stories-assets.js +199 -0
- package/dist/data-components/data-structure/stories-assets.js.map +1 -0
- package/dist/data-components/form/form-types.d.ts +2 -2
- package/dist/data-components/form/form-types.js +2 -0
- package/dist/data-components/form/form-types.js.map +1 -0
- package/dist/data-components/form/form.d.ts +1 -1
- package/dist/data-components/form/form.js +124 -0
- package/dist/data-components/form/form.js.map +1 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js +31 -0
- package/dist/data-components/table-grid/aggregation/aggregation-utils.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js +264 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-executor.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js +306 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-mock.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js +33 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-panel.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js +59 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-schema.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js +167 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-tools.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.d.ts +1 -1
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js +2 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.d.ts +2 -2
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js +157 -0
- package/dist/data-components/table-grid/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js +27 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/autoDetect.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/createDataStructureFromFile.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js +21 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/csvToObj.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js +12 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/detectDelimeter.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.d.ts +6 -6
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js +7 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/index.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.d.ts +1 -1
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js +15 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/inferColumns.js.map +1 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js +50 -0
- package/dist/data-components/table-grid/external-functionalities/import/csv/parseDelimeted.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js +2 -0
- package/dist/data-components/table-grid/footer/table-grid-footer-types.js.map +1 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.d.ts +1 -1
- package/dist/data-components/table-grid/footer/table-grid-footer.js +47 -0
- package/dist/data-components/table-grid/footer/table-grid-footer.js.map +1 -0
- package/dist/data-components/table-grid/formula/evaluator.js +91 -0
- package/dist/data-components/table-grid/formula/evaluator.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder-types.js +2 -0
- package/dist/data-components/table-grid/formula/formula-builder-types.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula-builder.d.ts +1 -1
- package/dist/data-components/table-grid/formula/formula-builder.js +47 -0
- package/dist/data-components/table-grid/formula/formula-builder.js.map +1 -0
- package/dist/data-components/table-grid/formula/formula.test.js +50 -0
- package/dist/data-components/table-grid/formula/formula.test.js.map +1 -0
- package/dist/data-components/table-grid/formula/index.js +40 -0
- package/dist/data-components/table-grid/formula/index.js.map +1 -0
- package/dist/data-components/table-grid/formula/parser.js +179 -0
- package/dist/data-components/table-grid/formula/parser.js.map +1 -0
- package/dist/data-components/table-grid/formula/tokenizer.js +140 -0
- package/dist/data-components/table-grid/formula/tokenizer.js.map +1 -0
- package/dist/data-components/table-grid/formula/types.js +2 -0
- package/dist/data-components/table-grid/formula/types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js +2 -0
- package/dist/data-components/table-grid/header/grouping/group-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.d.ts +1 -1
- package/dist/data-components/table-grid/header/grouping/group-panel.js +91 -0
- package/dist/data-components/table-grid/header/grouping/group-panel.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-column-menu.js +84 -0
- package/dist/data-components/table-grid/header/table-grid-column-menu.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header-types.js +2 -0
- package/dist/data-components/table-grid/header/table-grid-header-types.js.map +1 -0
- package/dist/data-components/table-grid/header/table-grid-header.d.ts +1 -1
- package/dist/data-components/table-grid/header/table-grid-header.js +148 -0
- package/dist/data-components/table-grid/header/table-grid-header.js.map +1 -0
- package/dist/data-components/table-grid/hooks/use-table.d.ts +1 -1
- package/dist/data-components/table-grid/hooks/use-table.js +18 -0
- package/dist/data-components/table-grid/hooks/use-table.js.map +1 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.d.ts +1 -1
- package/dist/data-components/table-grid/pinning/pinning-utils.js +70 -0
- package/dist/data-components/table-grid/pinning/pinning-utils.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js +89 -0
- package/dist/data-components/table-grid/pivot/pivot-config-panel.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-table.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-table.js +26 -0
- package/dist/data-components/table-grid/pivot/pivot-table.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-types.d.ts +1 -1
- package/dist/data-components/table-grid/pivot/pivot-types.js +2 -0
- package/dist/data-components/table-grid/pivot/pivot-types.js.map +1 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.d.ts +2 -2
- package/dist/data-components/table-grid/pivot/pivot-utils.js +150 -0
- package/dist/data-components/table-grid/pivot/pivot-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts +3 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row-types.js +2 -0
- package/dist/data-components/table-grid/row/table-grid-row-types.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row-utils.js +35 -0
- package/dist/data-components/table-grid/row/table-grid-row-utils.js.map +1 -0
- package/dist/data-components/table-grid/row/table-grid-row.d.ts +2 -2
- package/dist/data-components/table-grid/row/table-grid-row.d.ts.map +1 -1
- package/dist/data-components/table-grid/row/table-grid-row.js +68 -0
- package/dist/data-components/table-grid/row/table-grid-row.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-types.js +2 -0
- package/dist/data-components/table-grid/selection/selection-types.js.map +1 -0
- package/dist/data-components/table-grid/selection/selection-utils.d.ts +2 -2
- package/dist/data-components/table-grid/selection/selection-utils.js +136 -0
- package/dist/data-components/table-grid/selection/selection-utils.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js +2 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar-types.js.map +1 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.d.ts +1 -1
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js +7 -0
- package/dist/data-components/table-grid/sidebar/table-grid-sidebar.js.map +1 -0
- package/dist/data-components/table-grid/sorting/sorting.d.ts +1 -1
- package/dist/data-components/table-grid/sorting/sorting.js +45 -0
- package/dist/data-components/table-grid/sorting/sorting.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context-types.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context-types.js +2 -0
- package/dist/data-components/table-grid/table-context/table-context-types.js.map +1 -0
- package/dist/data-components/table-grid/table-context/table-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-context/table-context.js +4 -0
- package/dist/data-components/table-grid/table-context/table-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-context.d.ts +2 -2
- package/dist/data-components/table-grid/table-grid-context.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-context.js +258 -0
- package/dist/data-components/table-grid/table-grid-context.js.map +1 -0
- package/dist/data-components/table-grid/table-grid-types.d.ts +9 -7
- package/dist/data-components/table-grid/table-grid-types.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid-types.js +2 -0
- package/dist/data-components/table-grid/table-grid-types.js.map +1 -0
- package/dist/data-components/table-grid/table-grid.d.ts +1 -1
- package/dist/data-components/table-grid/table-grid.d.ts.map +1 -1
- package/dist/data-components/table-grid/table-grid.js +144 -0
- package/dist/data-components/table-grid/table-grid.js.map +1 -0
- package/dist/data-components/table-grid/table-utils.d.ts +1 -1
- package/dist/data-components/table-grid/table-utils.js +116 -0
- package/dist/data-components/table-grid/table-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js +2 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-types.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.d.ts +1 -1
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js +61 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap-utils.js.map +1 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.d.ts +2 -2
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js +23 -0
- package/dist/experimental-components/contribution-heatmap/contribution-heatmap.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.d.ts +1 -1
- package/dist/experimental-components/filter-builder/filter-builder-types.js +2 -0
- package/dist/experimental-components/filter-builder/filter-builder-types.js.map +1 -0
- package/dist/experimental-components/filter-builder/filter-builder.d.ts +3 -2
- package/dist/experimental-components/filter-builder/filter-builder.js +139 -0
- package/dist/experimental-components/filter-builder/filter-builder.js.map +1 -0
- package/dist/framework-components/appbar/appbar-assets.js +5 -0
- package/dist/framework-components/appbar/appbar-assets.js.map +1 -0
- package/dist/framework-components/appbar/appbar-types.d.ts +1 -1
- package/dist/framework-components/appbar/appbar-types.js +2 -0
- package/dist/framework-components/appbar/appbar-types.js.map +1 -0
- package/dist/framework-components/appbar/appbar.d.ts +2 -2
- package/dist/framework-components/appbar/appbar.js +36 -0
- package/dist/framework-components/appbar/appbar.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js +2 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs-types.js.map +1 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist/framework-components/breadcrumbs/breadcrumbs.js +31 -0
- package/dist/framework-components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/framework-components/drawer/drawer-types.d.ts +2 -2
- package/dist/framework-components/drawer/drawer-types.js +2 -0
- package/dist/framework-components/drawer/drawer-types.js.map +1 -0
- package/dist/framework-components/drawer/drawer.d.ts +2 -2
- package/dist/framework-components/drawer/drawer.js +10 -0
- package/dist/framework-components/drawer/drawer.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-context.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold-context.js +10 -0
- package/dist/framework-components/scaffold/scaffold-context.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold-types.d.ts +1 -1
- package/dist/framework-components/scaffold/scaffold-types.js +2 -0
- package/dist/framework-components/scaffold/scaffold-types.js.map +1 -0
- package/dist/framework-components/scaffold/scaffold.d.ts +2 -2
- package/dist/framework-components/scaffold/scaffold.js +76 -0
- package/dist/framework-components/scaffold/scaffold.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-assets.js +4 -0
- package/dist/framework-components/sidebar/sidebar-assets.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-context.d.ts +2 -2
- package/dist/framework-components/sidebar/sidebar-context.js +9 -0
- package/dist/framework-components/sidebar/sidebar-context.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js +12 -0
- package/dist/framework-components/sidebar/sidebar-logo/sidebar-logo.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar-types.d.ts +1 -1
- package/dist/framework-components/sidebar/sidebar-types.js +2 -0
- package/dist/framework-components/sidebar/sidebar-types.js.map +1 -0
- package/dist/framework-components/sidebar/sidebar.d.ts +3 -3
- package/dist/framework-components/sidebar/sidebar.js +42 -0
- package/dist/framework-components/sidebar/sidebar.js.map +1 -0
- package/dist/hooks/useDynamicVirtualList.d.ts +76 -0
- package/dist/hooks/useDynamicVirtualList.d.ts.map +1 -0
- package/dist/hooks/useDynamicVirtualList.js +208 -0
- package/dist/hooks/useDynamicVirtualList.js.map +1 -0
- package/dist/hooks/useFixedVirtualList.d.ts +35 -0
- package/dist/hooks/useFixedVirtualList.d.ts.map +1 -0
- package/dist/hooks/useFixedVirtualList.js +64 -0
- package/dist/hooks/useFixedVirtualList.js.map +1 -0
- package/dist/hooks/useShortcut.d.ts +1 -1
- package/dist/hooks/useShortcut.js +86 -0
- package/dist/hooks/useShortcut.js.map +1 -0
- package/dist/hooks/useTour/useTour-context-internal.d.ts +2 -2
- package/dist/hooks/useTour/useTour-context-internal.js +7 -0
- package/dist/hooks/useTour/useTour-context-internal.js.map +1 -0
- package/dist/hooks/useTour/useTour-context.d.ts +3 -3
- package/dist/hooks/useTour/useTour-context.js +54 -0
- package/dist/hooks/useTour/useTour-context.js.map +1 -0
- package/dist/hooks/useTour/useTour-types.d.ts +1 -1
- package/dist/hooks/useTour/useTour-types.js +2 -0
- package/dist/hooks/useTour/useTour-types.js.map +1 -0
- package/dist/hooks/useTour/useTour.d.ts +1 -1
- package/dist/hooks/useTour/useTour.js +408 -0
- package/dist/hooks/useTour/useTour.js.map +1 -0
- package/dist/hooks/useVirtualListScroll.d.ts +1 -1
- package/dist/hooks/useVirtualListScroll.js +79 -0
- package/dist/hooks/useVirtualListScroll.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-prompts.js +98 -0
- package/dist/providers/ai-assistant/ai-assistant-prompts.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js +5 -0
- package/dist/providers/ai-assistant/ai-assistant-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-assistant-validator.js +74 -0
- package/dist/providers/ai-assistant/ai-assistant-validator.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel-types.js +2 -0
- package/dist/providers/ai-assistant/ai-chat-panel-types.js.map +1 -0
- package/dist/providers/ai-assistant/ai-chat-panel.d.ts +1 -1
- package/dist/providers/ai-assistant/ai-chat-panel.js +111 -0
- package/dist/providers/ai-assistant/ai-chat-panel.js.map +1 -0
- package/dist/providers/shortcut/shortcut-context.d.ts +2 -2
- package/dist/providers/shortcut/shortcut-context.js +7 -0
- package/dist/providers/shortcut/shortcut-context.js.map +1 -0
- package/dist/providers/shortcut/shortcut-provider.d.ts +1 -1
- package/dist/providers/shortcut/shortcut-provider.js +267 -0
- package/dist/providers/shortcut/shortcut-provider.js.map +1 -0
- package/dist/providers/theme/index.js +2 -0
- package/dist/providers/theme/index.js.map +1 -0
- package/dist/providers/theme/theme-provider-types.js +2 -0
- package/dist/providers/theme/theme-provider-types.js.map +1 -0
- package/dist/providers/theme/themeProvider.d.ts +2 -2
- package/dist/providers/theme/themeProvider.js +17 -0
- package/dist/providers/theme/themeProvider.js.map +1 -0
- package/dist/test/vitest.utils.js +2 -0
- package/dist/test/vitest.utils.js.map +1 -0
- package/dist/types/global-types.js +10 -0
- package/dist/types/global-types.js.map +1 -0
- package/dist/types/storybook-types.js +2 -0
- package/dist/types/storybook-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar-types.d.ts +1 -1
- package/dist/utility-components/avatar/avatar-types.js +2 -0
- package/dist/utility-components/avatar/avatar-types.js.map +1 -0
- package/dist/utility-components/avatar/avatar.d.ts +2 -2
- package/dist/utility-components/avatar/avatar.js +10 -0
- package/dist/utility-components/avatar/avatar.js.map +1 -0
- package/dist/utility-components/chip/chip-types.d.ts +2 -2
- package/dist/utility-components/chip/chip-types.js +2 -0
- package/dist/utility-components/chip/chip-types.js.map +1 -0
- package/dist/utility-components/chip/chip.d.ts +2 -2
- package/dist/utility-components/chip/chip.js +11 -0
- package/dist/utility-components/chip/chip.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text-types.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text-types.js +2 -0
- package/dist/utility-components/helper-text/helper-text-types.js.map +1 -0
- package/dist/utility-components/helper-text/helper-text.d.ts +1 -1
- package/dist/utility-components/helper-text/helper-text.js +12 -0
- package/dist/utility-components/helper-text/helper-text.js.map +1 -0
- package/dist/utility-components/icon/icon-assets.js +95 -0
- package/dist/utility-components/icon/icon-assets.js.map +1 -0
- package/dist/utility-components/icon/icon-types.d.ts +1 -1
- package/dist/utility-components/icon/icon-types.js +2 -0
- package/dist/utility-components/icon/icon-types.js.map +1 -0
- package/dist/utility-components/icon/icon.d.ts +2 -2
- package/dist/utility-components/icon/icon.js +28 -0
- package/dist/utility-components/icon/icon.js.map +1 -0
- package/dist/utility-components/label/label-types.js +2 -0
- package/dist/utility-components/label/label-types.js.map +1 -0
- package/dist/utility-components/label/label.d.ts +1 -1
- package/dist/utility-components/label/label.js +10 -0
- package/dist/utility-components/label/label.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js +2 -0
- package/dist/utility-components/overlay-panel/overlay-panel-types.js.map +1 -0
- package/dist/utility-components/overlay-panel/overlay-panel.d.ts +2 -2
- package/dist/utility-components/overlay-panel/overlay-panel.js +98 -0
- package/dist/utility-components/overlay-panel/overlay-panel.js.map +1 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.d.ts +1 -1
- package/dist/utility-components/overlay-panel/use-focus-trap.js +61 -0
- package/dist/utility-components/overlay-panel/use-focus-trap.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton-types.js +2 -0
- package/dist/utility-components/skeleton/skeleton-types.js.map +1 -0
- package/dist/utility-components/skeleton/skeleton.d.ts +2 -2
- package/dist/utility-components/skeleton/skeleton.js +14 -0
- package/dist/utility-components/skeleton/skeleton.js.map +1 -0
- package/dist/utility-components/stack/stack-types.js +2 -0
- package/dist/utility-components/stack/stack-types.js.map +1 -0
- package/dist/utility-components/stack/stack.d.ts +2 -2
- package/dist/utility-components/stack/stack.js +12 -0
- package/dist/utility-components/stack/stack.js.map +1 -0
- package/dist/utility-components/toast/toast-types.d.ts +1 -1
- package/dist/utility-components/toast/toast-types.js +2 -0
- package/dist/utility-components/toast/toast-types.js.map +1 -0
- package/dist/utility-components/toast/toast.d.ts +2 -2
- package/dist/utility-components/toast/toast.js +21 -0
- package/dist/utility-components/toast/toast.js.map +1 -0
- package/dist/utils/general.d.ts +1 -1
- package/dist/utils/general.js +27 -0
- package/dist/utils/general.js.map +1 -0
- package/dist/utils/shortcut-utils.js +164 -0
- package/dist/utils/shortcut-utils.js.map +1 -0
- package/package.json +1 -1
- package/dist/assets/svg/alert.svg +0 -1
- package/dist/assets/svg/arrow-down-up.svg +0 -1
- package/dist/assets/svg/arrow-down.svg +0 -1
- package/dist/assets/svg/arrow-left.svg +0 -1
- package/dist/assets/svg/arrow-right.svg +0 -1
- package/dist/assets/svg/arrow-up.svg +0 -1
- package/dist/assets/svg/arrow_drop_down.svg +0 -1
- package/dist/assets/svg/calendar.svg +0 -1
- package/dist/assets/svg/check.svg +0 -1
- package/dist/assets/svg/chevron-down.svg +0 -1
- package/dist/assets/svg/chevron-right.svg +0 -1
- package/dist/assets/svg/clipboard.svg +0 -1
- package/dist/assets/svg/close.svg +0 -1
- package/dist/assets/svg/copy.svg +0 -1
- package/dist/assets/svg/cursor.svg +0 -1
- package/dist/assets/svg/cut.svg +0 -1
- package/dist/assets/svg/delete.svg +0 -1
- package/dist/assets/svg/dock-left-arrow.svg +0 -1
- package/dist/assets/svg/dock-right-arrow.svg +0 -1
- package/dist/assets/svg/document-outline.svg +0 -1
- package/dist/assets/svg/download.svg +0 -1
- package/dist/assets/svg/drag.svg +0 -1
- package/dist/assets/svg/error.svg +0 -1
- package/dist/assets/svg/expand-right.svg +0 -1
- package/dist/assets/svg/expand.svg +0 -1
- package/dist/assets/svg/eye.svg +0 -1
- package/dist/assets/svg/fullscreen.svg +0 -1
- package/dist/assets/svg/gear.svg +0 -1
- package/dist/assets/svg/groups.svg +0 -1
- package/dist/assets/svg/help.svg +0 -1
- package/dist/assets/svg/info.svg +0 -1
- package/dist/assets/svg/logo.svg +0 -9
- package/dist/assets/svg/menu.svg +0 -1
- package/dist/assets/svg/message-bubble-question-mark.svg +0 -1
- package/dist/assets/svg/pencil.svg +0 -1
- package/dist/assets/svg/plus.svg +0 -1
- package/dist/assets/svg/restio.svg +0 -5
- package/dist/assets/svg/search.svg +0 -1
- package/dist/assets/svg/send.svg +0 -1
- package/dist/assets/svg/shrink-right.svg +0 -1
- package/dist/assets/svg/sidebar.svg +0 -1
- package/dist/assets/svg/terminal.svg +0 -1
- package/dist/assets/svg/timer.svg +0 -1
- package/dist/assets/svg/warning.svg +0 -1
- package/dist/assets/svg/zoom-minus.svg +0 -1
- package/dist/assets/svg/zoom-plus.svg +0 -1
- package/dist/restio-ui.cjs.js +0 -109
- package/dist/restio-ui.es.js +0 -34377
- package/dist/ui.css +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MenuItem } from
|
|
3
|
-
import { anchorAlign, AnchorPosition } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MenuItem } from "./menu-types";
|
|
3
|
+
import { anchorAlign, AnchorPosition } from "../../types/global-types";
|
|
4
4
|
export interface MenuComponentProps {
|
|
5
5
|
readonly items: MenuItem[];
|
|
6
6
|
readonly anchor: React.ReactNode;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { AnchoredOverlay } from "../anchored-overlay/anchored-overlay";
|
|
4
|
+
import Menu from "./menu";
|
|
5
|
+
import styles from "./anchored-navigation-menu.module.css";
|
|
6
|
+
import { Button } from "../button/button";
|
|
7
|
+
export const MenuComponent = ({ items, anchor, isOpen, onClose, onItemClick, width = 320, initialTitle = "", isClosingOnSelect = false, variant = "stack", position, align, }) => {
|
|
8
|
+
const [stack, setStack] = useState([{ title: initialTitle, items }]);
|
|
9
|
+
const current = stack[stack.length - 1];
|
|
10
|
+
const goToSubmenu = (item) => {
|
|
11
|
+
if (!item.children)
|
|
12
|
+
return;
|
|
13
|
+
setStack((s) => [...s, { title: item.label, items: item.children }]);
|
|
14
|
+
};
|
|
15
|
+
const pop = () => {
|
|
16
|
+
setStack((s) => (s.length > 1 ? s.slice(0, -1) : s));
|
|
17
|
+
};
|
|
18
|
+
const handleSelect = (item) => {
|
|
19
|
+
if (variant === "stack" && item.children) {
|
|
20
|
+
goToSubmenu(item);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (variant === "flyout" && item.children) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
onItemClick?.(item);
|
|
27
|
+
if (isClosingOnSelect)
|
|
28
|
+
onClose?.();
|
|
29
|
+
};
|
|
30
|
+
const renderFlyoutItem = (it) => {
|
|
31
|
+
if (it.type === "separator")
|
|
32
|
+
return _jsx(Menu.Separator, {}, it.id);
|
|
33
|
+
if (it.children && it.children.length > 0) {
|
|
34
|
+
return (_jsx(Menu.Submenu, { trigger: _jsx(Menu.Item, { label: it.label, leadingVisual: it.leadingVisual, disabled: it.disabled, shortcut: it.shortcut, children: it.children }), children: it.children.map(renderFlyoutItem) }, it.id));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx(Menu.Item, { label: it.label, leadingVisual: it.leadingVisual, disabled: it.disabled, shortcut: it.shortcut, content: it.content, onClick: () => handleSelect(it) }, it.id));
|
|
37
|
+
};
|
|
38
|
+
const renderStackItem = (it) => {
|
|
39
|
+
if (it.type === "separator")
|
|
40
|
+
return _jsx(Menu.Separator, {}, it.id);
|
|
41
|
+
return (_jsx(Menu.Item, { label: it.label, leadingVisual: it.leadingVisual, disabled: it.disabled, shortcut: it.shortcut, children: it.children, content: it.content, onClick: () => handleSelect(it) }, it.id));
|
|
42
|
+
};
|
|
43
|
+
const title = variant === "stack" ? current.title : initialTitle;
|
|
44
|
+
const showBack = variant === "stack" && stack.length > 1;
|
|
45
|
+
return (_jsx(AnchoredOverlay, { isOpen: isOpen, onClose: onClose, anchor: anchor, position: position, align: align, target: _jsxs("div", { className: styles["rst-anchored-navigation"], style: { width }, role: "menu", children: [_jsxs("div", { className: styles["rst-anchored-navigation-header"], children: [_jsx("div", { className: styles["rst-anchored-navigation-back"], children: showBack ? _jsx(Button, { leadingVisual: "arrow-left", variant: "invisible", onClick: pop, "aria-label": "Back" }) : _jsx("div", { style: { width: 16 } }) }), _jsx("div", { className: styles["rst-anchored-navigation-title"], children: title }), _jsx("div", { className: styles["rst-anchored-navigation-close"], children: _jsx(Button, { leadingVisual: "close", variant: "invisible", onClick: onClose, "aria-label": "Close" }) })] }), _jsx("div", { className: styles["rst-anchored-navigation-content"], children: variant === "stack" ? current.items.map(renderStackItem) : items.map(renderFlyoutItem) })] }) }));
|
|
46
|
+
};
|
|
47
|
+
export default MenuComponent;
|
|
48
|
+
//# sourceMappingURL=anchored-navigation-menu.js.map
|
|
@@ -0,0 +1 @@
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AM,aAC9E,eAAK,SAAS,EAAE,MAAM,CAAC,gCAAgC,CAAC,aACtD,cAAK,SAAS,EAAE,MAAM,CAAC,8BAA8B,CAAC,YACnD,QAAQ,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,aAAa,EAAE,YAAY,EAAE,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,GAAG,gBAAa,MAAM,GAAU,CAAC,CAAC,CAAC,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAI,GAC1I,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,+BAA+B,CAAC,YAAG,KAAK,GAAO,EACtE,cAAK,SAAS,EAAE,MAAM,CAAC,+BAA+B,CAAC,YACrD,KAAC,MAAM,IAAC,aAAa,EAAC,OAAO,EAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,gBAAa,OAAO,GAAU,GAC5F,IACF,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,iCAAiC,CAAC,YACtD,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,GACnF,IACF,GAER,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const dataMenuAsset = [
|
|
3
|
+
{
|
|
4
|
+
id: "1",
|
|
5
|
+
label: "File",
|
|
6
|
+
children: [
|
|
7
|
+
{ id: "1-1", label: "New File", leadingVisual: "file" },
|
|
8
|
+
{ id: "1-2", label: "Open", leadingVisual: "folder" },
|
|
9
|
+
{
|
|
10
|
+
id: "1-3",
|
|
11
|
+
label: "Recent",
|
|
12
|
+
children: [
|
|
13
|
+
{ id: "1-3-1", label: "project-a" },
|
|
14
|
+
{ id: "1-3-2", label: "project-b" },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "2",
|
|
21
|
+
label: "Edit",
|
|
22
|
+
children: [
|
|
23
|
+
{ id: "2-1", label: "Undo" },
|
|
24
|
+
{ id: "2-2", label: "Redo" },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{ id: "3", label: "View" },
|
|
28
|
+
{ id: "sep-1", type: "separator", label: "" },
|
|
29
|
+
{
|
|
30
|
+
id: "custom-1",
|
|
31
|
+
content: (_jsxs("div", { style: { display: "flex", gap: 12, alignItems: "center", padding: "4px 0" }, children: [_jsx("div", { style: { width: 32, height: 32, borderRadius: 4, backgroundColor: "var(--rst-backgroundColor-hover)" } }), _jsxs("div", { children: [_jsx("div", { style: { fontWeight: 600, fontSize: 13 }, children: "Custom Component" }), _jsx("div", { style: { fontSize: 11, color: "var(--rst-fontColor-muted)" }, children: "Example node" })] })] })),
|
|
32
|
+
},
|
|
33
|
+
{ id: "4", label: "Help" },
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=menu-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-assets.js","sourceRoot":"","sources":["../../../src/components/menu/menu-assets.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,aAAa,GAAe;IACvC;QACE,EAAE,EAAE,GAAG;QACP,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE;YACR,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE;YACvD,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE;YACrD;gBACE,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,QAAQ;gBACf,QAAQ,EAAE;oBACR,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE;oBACnC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE;iBACpC;aACF;SACF;KACF;IACD;QACE,EAAE,EAAE,GAAG;QACP,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE;YACR,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;YAC5B,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;SAC7B;KACF;IACD,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE;IAC1B,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7C;QACE,EAAE,EAAE,UAAU;QACd,OAAO,EAAE,CACP,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,aAC9E,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,kCAAkC,EAAE,GAAI,EAC/G,0BACE,cAAK,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,iCAAwB,EACrE,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,6BAAoB,IACjF,IACF,CACP;KACF;IACD,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE;CAC3B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { anchorAlign, AnchorPosition } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { anchorAlign, AnchorPosition } from "../../types/global-types";
|
|
3
3
|
export interface MenuItem {
|
|
4
4
|
id?: string;
|
|
5
5
|
label?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-types.js","sourceRoot":"","sources":["../../../src/components/menu/menu-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MenuProps, MenuItem, MenuSubmenuProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MenuProps, MenuItem, MenuSubmenuProps } from "./menu-types";
|
|
3
3
|
export declare const Menu: React.FC<MenuProps> & {
|
|
4
4
|
Item: React.FC<MenuItem>;
|
|
5
5
|
Separator: React.FC<React.HTMLAttributes<HTMLHRElement>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState, useRef } from "react";
|
|
3
|
+
import { AnchoredOverlay } from "../anchored-overlay/anchored-overlay";
|
|
4
|
+
import { Icon } from "../../utility-components/icon/icon";
|
|
5
|
+
import { Typography } from "../typography/typography";
|
|
6
|
+
import { KbdGroup } from "../kbd-group/kbd-group";
|
|
7
|
+
import styles from "./menu.module.css";
|
|
8
|
+
// Main Menu component
|
|
9
|
+
const MenuRoot = ({ children, className, ...props }) => {
|
|
10
|
+
const menuClassNames = [styles["rst-menu"], className].filter(Boolean).join(" ");
|
|
11
|
+
return (_jsx("div", { className: menuClassNames, role: "menu", ...props, children: children }));
|
|
12
|
+
};
|
|
13
|
+
// Menu Item component
|
|
14
|
+
const MenuItemComponent = ({ label, children, disabled = false, leadingVisual, shortcut, onClick, content, id, ...props }) => {
|
|
15
|
+
const hasSubmenu = children && children.length >= 1;
|
|
16
|
+
console.log("Rendering MenuItem:", label, content);
|
|
17
|
+
const handleClick = () => {
|
|
18
|
+
if (disabled)
|
|
19
|
+
return;
|
|
20
|
+
onClick?.({ label, disabled, leadingVisual, shortcut });
|
|
21
|
+
};
|
|
22
|
+
const handleKeyDown = (e) => {
|
|
23
|
+
if ((e.key === "Enter" || e.key === " ") && !disabled) {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
handleClick();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const menuItemClassNames = [styles["rst-menu-item"], disabled ? styles["rst-menu-item-disabled"] : ""].filter(Boolean).join(" ");
|
|
29
|
+
return (_jsx("div", { className: menuItemClassNames, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, role: "menuitem", "aria-disabled": disabled, "aria-haspopup": hasSubmenu ? "menu" : undefined, ...props, children: content ? (_jsx(_Fragment, { children: content })) : (_jsxs("div", { className: styles["rst-menu-item-content"], children: [leadingVisual && (_jsx("div", { className: styles["rst-menu-item-leading-visual"], children: _jsx(Icon, { src: leadingVisual, state: "base" }) })), _jsx(Typography, { variant: "body", children: label }), shortcut && (_jsx("div", { className: styles["rst-menu-item-shortcut"], children: _jsx(KbdGroup, { keys: shortcut, showSeparator: false }) })), hasSubmenu && (_jsx("div", { className: styles["rst-menu-item-submenu-indicator"], children: _jsx(Icon, { src: "chevron-right", state: "base" }) }))] })) }, id));
|
|
30
|
+
};
|
|
31
|
+
// Menu Separator component
|
|
32
|
+
const MenuSeparator = ({ className, ...props }) => {
|
|
33
|
+
const separatorClassNames = [styles["rst-menu-separator"], className].filter(Boolean).join(" ");
|
|
34
|
+
return _jsx("hr", { className: separatorClassNames, role: "separator", ...props });
|
|
35
|
+
};
|
|
36
|
+
// Menu Submenu component
|
|
37
|
+
const MenuSubmenu = ({ trigger, children, position = "right", align = "center", className, ...props }) => {
|
|
38
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
39
|
+
const parentRef = useRef(null);
|
|
40
|
+
const submenuRef = useRef(null);
|
|
41
|
+
const handleMouseEnter = () => {
|
|
42
|
+
setIsOpen(true);
|
|
43
|
+
};
|
|
44
|
+
const handleMouseLeave = (e) => {
|
|
45
|
+
const submenu = submenuRef.current;
|
|
46
|
+
// If the mouse leaves parent but enters submenu, don't close
|
|
47
|
+
if (submenu && submenu.contains(e.relatedTarget)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
setIsOpen(false);
|
|
51
|
+
};
|
|
52
|
+
const handleSubmenuLeave = (e) => {
|
|
53
|
+
const parent = parentRef.current;
|
|
54
|
+
// If the mouse leaves submenu but goes back to parent, keep open
|
|
55
|
+
if (parent && parent.contains(e.relatedTarget)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
setIsOpen(false);
|
|
59
|
+
};
|
|
60
|
+
const handleKeyDown = (e) => {
|
|
61
|
+
if (e.key === "ArrowRight") {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
setIsOpen(true);
|
|
64
|
+
}
|
|
65
|
+
else if (e.key === "ArrowLeft" && isOpen) {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
setIsOpen(false);
|
|
68
|
+
}
|
|
69
|
+
else if (e.key === "Escape") {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
setIsOpen(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const submenuClassNames = [styles["rst-menu-submenu"], className].filter(Boolean).join(" ");
|
|
75
|
+
// Clone the trigger and add hasSubmenu prop if it's a MenuItem
|
|
76
|
+
const triggerWithSubmenuProp = React.isValidElement(trigger) && trigger.type === MenuItemComponent ? React.cloneElement(trigger) : trigger;
|
|
77
|
+
return (_jsx("div", { className: submenuClassNames, ...props, children: _jsx(AnchoredOverlay, { isOpen: isOpen, onClose: () => setIsOpen(false), position: position, align: align, anchor: _jsx("div", { ref: parentRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onKeyDown: handleKeyDown, "aria-haspopup": "menu", "aria-expanded": isOpen, children: triggerWithSubmenuProp }), target: _jsx("div", { ref: submenuRef, className: styles["rst-menu"], role: "menu", onMouseLeave: handleSubmenuLeave, children: children }) }) }));
|
|
78
|
+
};
|
|
79
|
+
// Compound component export
|
|
80
|
+
export const Menu = Object.assign(MenuRoot, {
|
|
81
|
+
Item: MenuItemComponent,
|
|
82
|
+
Separator: MenuSeparator,
|
|
83
|
+
Submenu: MenuSubmenu,
|
|
84
|
+
});
|
|
85
|
+
export default Menu;
|
|
86
|
+
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../src/components/menu/menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,sBAAsB;AACtB,MAAM,QAAQ,GAAwB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC1E,MAAM,cAAc,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEjF,OAAO,CACL,cAAK,SAAS,EAAE,cAAc,EAAE,IAAI,EAAC,MAAM,KAAK,KAAK,YAClD,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,sBAAsB;AACtB,MAAM,iBAAiB,GAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC/I,MAAM,UAAU,GAAG,QAAQ,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,KAAK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,sBAAsB,GAC1B,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,OAAuC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE9I,OAAO,CACL,cAAK,SAAS,EAAE,iBAAiB,KAAM,KAAK,YAC1C,KAAC,eAAe,IACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC/B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EACJ,cACE,GAAG,EAAE,SAAS,EACd,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAE,aAAa,mBACV,MAAM,mBACL,MAAM,YAEpB,sBAAsB,GACnB,EAER,MAAM,EACJ,cAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAC,MAAM,EAAC,YAAY,EAAE,kBAAkB,YAC9F,QAAQ,GACL,GAER,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,4BAA4B;AAC5B,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,IAAI,EAAE,iBAAiB;IACvB,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp-types.js","sourceRoot":"","sources":["../../../src/components/otp/otp-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Focuses the input at the specified index in the ref array.
|
|
3
|
+
* @param refs - Array of input element references.
|
|
4
|
+
* @param index - Index of the input to focus.
|
|
5
|
+
*/
|
|
6
|
+
export function focusInput(refs, index) {
|
|
7
|
+
const input = refs[index];
|
|
8
|
+
if (input)
|
|
9
|
+
input.focus();
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Processes a pasted string and returns an array of characters to fill the OTP input.
|
|
13
|
+
* Only numeric digits are retained.
|
|
14
|
+
* @param pasted - The pasted string.
|
|
15
|
+
* @param length - The length of the OTP input.
|
|
16
|
+
* @returns An array of characters to set as input values.
|
|
17
|
+
*/
|
|
18
|
+
export function processPastedValue(pasted, length) {
|
|
19
|
+
const clean = pasted.replace(/\D/g, "");
|
|
20
|
+
return Array.from({ length }, (_, i) => clean[i] || "");
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=otp-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp-utils.js","sourceRoot":"","sources":["../../../src/components/otp/otp-utils.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CACxB,IAAoC,EACpC,KAAa;IAEb,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,IAAI,KAAK;QAAE,KAAK,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc;IAC/D,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./otp.css";
|
|
3
|
+
import { OTPProps } from "./otp-types";
|
|
3
4
|
export declare const OTPComponent: React.FC<OTPProps>;
|
|
4
5
|
//# sourceMappingURL=otp.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect, useCallback, } from "react";
|
|
3
|
+
import "./otp.css";
|
|
4
|
+
export const OTPComponent = ({ length = 6, onChange, onComplete, ariaLabel = "One-time password input", className = "", }) => {
|
|
5
|
+
const [otp, setOtp] = useState("");
|
|
6
|
+
const inputRefs = useRef([]);
|
|
7
|
+
const focusInput = useCallback((index) => {
|
|
8
|
+
if (index >= 0 && index < length) {
|
|
9
|
+
inputRefs.current[index]?.focus();
|
|
10
|
+
inputRefs.current[index]?.select();
|
|
11
|
+
}
|
|
12
|
+
}, [length]);
|
|
13
|
+
const handleInput = (e, index) => {
|
|
14
|
+
const value = e.currentTarget.value;
|
|
15
|
+
if (!/^\d*$/.test(value))
|
|
16
|
+
return;
|
|
17
|
+
let newOtp = otp;
|
|
18
|
+
if (index >= newOtp.length) {
|
|
19
|
+
newOtp = newOtp.padEnd(index, "");
|
|
20
|
+
}
|
|
21
|
+
newOtp = newOtp.substring(0, index) + value + newOtp.substring(index + 1);
|
|
22
|
+
newOtp = newOtp.substring(0, length);
|
|
23
|
+
setOtp(newOtp);
|
|
24
|
+
onChange?.(newOtp);
|
|
25
|
+
// Sposta il focus solo se non siamo all'ultimo campo
|
|
26
|
+
if (value && index < length - 1) {
|
|
27
|
+
focusInput(index + 1);
|
|
28
|
+
}
|
|
29
|
+
if (newOtp.length === length) {
|
|
30
|
+
onComplete?.(newOtp);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const handleKeyDown = (e, index) => {
|
|
34
|
+
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
if (e.key === "ArrowLeft" && index > 0) {
|
|
37
|
+
focusInput(index - 1);
|
|
38
|
+
}
|
|
39
|
+
else if (e.key === "ArrowRight" && index < length - 1) {
|
|
40
|
+
focusInput(index + 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (e.key === "Backspace") {
|
|
44
|
+
if (!otp[index] && index > 0) {
|
|
45
|
+
focusInput(index - 1);
|
|
46
|
+
}
|
|
47
|
+
else if (otp[index]) {
|
|
48
|
+
const newOtp = otp.substring(0, index) + otp.substring(index + 1);
|
|
49
|
+
setOtp(newOtp);
|
|
50
|
+
onChange?.(newOtp);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (e.key === "Delete" && index < length - 1) {
|
|
54
|
+
focusInput(index + 1);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const handlePaste = (e) => {
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
const pasteData = e.clipboardData.getData("text/plain").replace(/\D/g, "");
|
|
60
|
+
if (!pasteData)
|
|
61
|
+
return;
|
|
62
|
+
const newOtp = pasteData.substring(0, length);
|
|
63
|
+
setOtp(newOtp);
|
|
64
|
+
onChange?.(newOtp);
|
|
65
|
+
if (newOtp.length === length) {
|
|
66
|
+
onComplete?.(newOtp);
|
|
67
|
+
}
|
|
68
|
+
const lastFilledIndex = Math.min(pasteData.length, length) - 1;
|
|
69
|
+
focusInput(lastFilledIndex);
|
|
70
|
+
};
|
|
71
|
+
const handleFocus = (index) => {
|
|
72
|
+
inputRefs.current[index]?.select();
|
|
73
|
+
};
|
|
74
|
+
// Focus management
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
// Solo quando l'OTP è vuoto o non completo
|
|
77
|
+
if (otp.length < length) {
|
|
78
|
+
focusInput(Math.min(otp.length, length - 1));
|
|
79
|
+
}
|
|
80
|
+
}, [focusInput, length, otp]);
|
|
81
|
+
return (_jsx("div", { className: `otp-container ${className}`, "aria-label": ariaLabel, role: "group", children: Array.from({ length }).map((_, index) => (_jsx("input", { ref: (el) => {
|
|
82
|
+
inputRefs.current[index] = el;
|
|
83
|
+
}, type: "text", inputMode: "numeric", pattern: "[0-9]*", maxLength: 1, value: otp[index] || "", onInput: (e) => handleInput(e, index), onKeyDown: (e) => handleKeyDown(e, index), onPaste: handlePaste, onFocus: () => handleFocus(index), className: "otp-input", "aria-label": `Digit ${index + 1} of ${length}`, autoComplete: "one-time-code" }, index))) }));
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.js","sourceRoot":"","sources":["../../../src/components/otp/otp.tsx"],"names":[],"mappings":";AAAA,OAAc,EACZ,QAAQ,EACR,MAAM,EACN,SAAS,EAGT,WAAW,GACZ,MAAM,OAAO,CAAC;AACf,OAAO,WAAW,CAAC;AAGnB,MAAM,CAAC,MAAM,YAAY,GAAuB,CAAC,EAC/C,MAAM,GAAG,CAAC,EACV,QAAQ,EACR,UAAU,EACV,SAAS,GAAG,yBAAyB,EACrC,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,MAAM,CAAqB,EAAE,CAAC,CAAC;IAEjD,MAAM,UAAU,GAAG,WAAW,CAC5B,CAAC,KAAa,EAAE,EAAE;QAChB,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,MAAM,EAAE,CAAC;YACjC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;YAClC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACrC,CAAC;IACH,CAAC,EACD,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,CAAoC,EAAE,KAAa,EAAE,EAAE;QAC1E,MAAM,KAAK,GAAG,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;QAEpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO;QAEjC,IA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,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EACjC,SAAS,EAAC,WAAW,gBACT,SAAS,KAAK,GAAG,CAAC,OAAO,MAAM,EAAE,EAC7C,YAAY,EAAC,eAAe,IAfvB,KAAK,CAgBV,CACH,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-types.js","sourceRoot":"","sources":["../../../src/components/select/select-types.tsx"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { SelectProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SelectProps } from "./select-types";
|
|
3
3
|
export declare const Select: React.FC<SelectProps>;
|
|
4
4
|
export default Select;
|
|
5
5
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Select.tsx
|
|
3
|
+
import { useState, useId } from "react";
|
|
4
|
+
import { List } from "../list/list";
|
|
5
|
+
import { Button } from "../button/button";
|
|
6
|
+
import { AnchoredOverlay } from "../anchored-overlay/anchored-overlay";
|
|
7
|
+
import styles from "./select.module.css";
|
|
8
|
+
export const Select = ({ value, onChange, options, multiActiveIndex, disabled, multiple = false }) => {
|
|
9
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
10
|
+
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
11
|
+
const [activeIndex, setActiveIndex] = useState(Array.isArray(value) ? value : [value]);
|
|
12
|
+
const listboxId = useId();
|
|
13
|
+
const selectOption = (option) => {
|
|
14
|
+
if (multiple) {
|
|
15
|
+
const current = Array.isArray(value) ? [...value] : [];
|
|
16
|
+
const exists = current.includes(option.value);
|
|
17
|
+
const newValues = exists ? current.filter((v) => v !== option.value) : [...current, option.value];
|
|
18
|
+
onChange?.(newValues);
|
|
19
|
+
setActiveIndex(newValues);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
onChange?.(option.value);
|
|
23
|
+
const index = options.findIndex((o) => o.value === option.value);
|
|
24
|
+
setSelectedIndex(index);
|
|
25
|
+
setActiveIndex([option.value]);
|
|
26
|
+
setIsOpen(false);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const handleClose = () => {
|
|
30
|
+
setIsOpen(false);
|
|
31
|
+
setSelectedIndex(-1);
|
|
32
|
+
};
|
|
33
|
+
const selectClass = {
|
|
34
|
+
fieldWrapper: styles["rst-field-select-wrapper"],
|
|
35
|
+
};
|
|
36
|
+
const getDisplayValue = () => {
|
|
37
|
+
if (multiple && Array.isArray(value)) {
|
|
38
|
+
if (value.length >= 4) {
|
|
39
|
+
return "Selected elements: ";
|
|
40
|
+
}
|
|
41
|
+
const labels = options.filter((o) => value.includes(o.value)).map((o) => o.value);
|
|
42
|
+
return labels.length > 0 ? labels.join(", ") : "Select options";
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const selected = options.find((o) => o.value === value);
|
|
46
|
+
return selected?.value || "Select an option";
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return (_jsx("div", { role: "combobox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-owns": listboxId, "aria-disabled": disabled, "data-component": "combobox", className: selectClass.fieldWrapper, children: _jsx(AnchoredOverlay, { anchor: _jsx(Button, { value: getDisplayValue(), count: multiple && activeIndex.length >= 4 ? activeIndex.length : undefined, onClick: () => setIsOpen((prev) => !prev), "aria-label": "Toggle Select", trailingVisual: "expand", disabled: disabled }), target: _jsx(List, { id: listboxId, options: options, activeIndex: multiActiveIndex || activeIndex, onClick: selectOption, selectedIndex: selectedIndex, multiple: multiple }), isOpen: isOpen, onClose: handleClose, position: "center", align: "bottom" }) }));
|
|
50
|
+
};
|
|
51
|
+
export default Select;
|
|
52
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","s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":"tag-types.js","sourceRoot":"","sources":["../../../src/components/tag/tag-types.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./tag.module.css";
|
|
3
|
+
import { Icon } from "../../utility-components/icon/icon";
|
|
4
|
+
import { Button } from "../button/button";
|
|
5
|
+
import Typography from "../typography/typography";
|
|
6
|
+
export const Tag = ({ value, src, state, clearable = false, onClear }) => {
|
|
7
|
+
const tagClass = {
|
|
8
|
+
tag: `${styles["rst-tag"]} ${styles[`rst-tag-${state}`]} ${clearable ? styles["rst-tag-clearable"] : ""}`,
|
|
9
|
+
};
|
|
10
|
+
const handleClear = () => {
|
|
11
|
+
if (clearable && onClear)
|
|
12
|
+
onClear();
|
|
13
|
+
};
|
|
14
|
+
return (_jsxs("span", { className: tagClass.tag, children: [src && _jsx(Icon, { src: src }), _jsx(Typography, { variant: "caption", children: value }), clearable && _jsx(Button, { leadingVisual: "delete", onClick: handleClear, "aria-label": "Rimuovi tag", variant: "invisible", size: "small" })] }));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,MAAM,CAAC,MAAM,GAAG,GAAuB,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IAC3F,MAAM,QAAQ,GAAG;QACf,GAAG,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,WAAW,KAAK,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;KAC1G,CAAC;IAEF,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,SAAS,IAAI,OAAO;YAAE,OAAO,EAAE,CAAC;IACtC,CAAC,CAAC;IAEF,OAAO,CACL,gBAAM,SAAS,EAAE,QAAQ,CAAC,GAAG,aAC1B,GAAG,IAAI,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,GAAI,EAC1B,KAAC,UAAU,IAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,GAAI,EAClD,SAAS,IAAI,KAAC,MAAM,IAAC,aAAa,EAAC,QAAQ,EAAC,OAAO,EAAE,WAAW,gBAAa,aAAa,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,GAAU,IACjI,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea-types.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea-types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextareaProps } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TextareaProps } from "./textarea-types";
|
|
3
3
|
export declare const Textarea: React.FC<TextareaProps>;
|
|
4
4
|
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Label } from "../../utility-components/label/label";
|
|
4
|
+
import { HelperText } from "../../utility-components/helper-text/helper-text";
|
|
5
|
+
import styles from "./textarea.module.css";
|
|
6
|
+
export const Textarea = ({ value, onChange, onKeyDown, label, helperText, placeholder, ariaLabel, ref, disabled, size, rows = 3 }) => {
|
|
7
|
+
const textareaId = useId();
|
|
8
|
+
const helperId = `${textareaId}-helper`;
|
|
9
|
+
const textareaClass = {
|
|
10
|
+
fieldWrapper: styles["rst-textareaField-wrapper"],
|
|
11
|
+
textareaWrapper: `${styles["rst-textarea-wrapper"]} ${size ? styles[`rst-textarea-${size}`] : ""}`,
|
|
12
|
+
textarea: styles["rst-textarea"],
|
|
13
|
+
};
|
|
14
|
+
const onChangeHandler = (event) => {
|
|
15
|
+
onChange?.(event.target.value);
|
|
16
|
+
};
|
|
17
|
+
return (_jsxs("div", { className: textareaClass.fieldWrapper, children: [label && _jsx(Label, { label: label, id: textareaId, disabled: disabled }), _jsx("textarea", { id: textareaId, value: value, className: textareaClass.textarea, placeholder: placeholder, onChange: onChangeHandler, onKeyDown: onKeyDown, "aria-label": ariaLabel, "aria-describedby": helperText ? helperId : undefined, ref: ref, disabled: disabled, rows: rows }), helperText && _jsx(HelperText, { helperText: helperText, id: helperId, disabled: disabled })] }));
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAE9E,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE;IAC5J,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,GAAG,UAAU,SAAS,CAAC;IAExC,MAAM,aAAa,GAAG;QACpB,YAAY,EAAE,MAAM,CAAC,2BAA2B,CAAC;QACjD,eAAe,EAAE,GAAG,MAAM,CAAC,sBAAsB,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAClG,QAAQ,EAAE,MAAM,CAAC,cAAc,CAAC;KACjC,CAAC;IAEF,MAAM,eAAe,GAAkD,CAAC,KAAK,EAAE,EAAE;QAC/E,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAE,aAAa,CAAC,YAAY,aACvC,KAAK,IAAI,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,GAAI,EAErE,mBACE,EAAE,EAAE,UAAU,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,aAAa,CAAC,QAAQ,EACjC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,SAAS,gBACR,SAAS,sBACH,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EACnD,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,GACV,EAED,UAAU,IAAI,KAAC,UAAU,IAAC,UAAU,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,GAAI,IACnF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-group-types.js","sourceRoot":"","sources":["../../../src/components/toast-group/toast-group-types.tsx"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ToastGroupProps } from
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ToastGroupProps } from "./toast-group-types";
|
|
3
3
|
declare const ToastGroup: React.FC<ToastGroupProps>;
|
|
4
4
|
export default ToastGroup;
|
|
5
5
|
//# sourceMappingURL=toast-group.d.ts.map
|