@neo4j-ndl/react 4.25.10 → 5.0.0-alpha.0.b2b2481
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/lib/cjs/_generated/style-rules/index.js +5 -11
- package/lib/cjs/_generated/style-rules/index.js.map +1 -1
- package/lib/cjs/_generated/style-rules/literal-guards.js +50 -0
- package/lib/cjs/_generated/style-rules/literal-guards.js.map +1 -0
- package/lib/cjs/_generated/style-rules/literal-schemas.js +6 -21
- package/lib/cjs/_generated/style-rules/literal-schemas.js.map +1 -1
- package/lib/cjs/{text-overflow/index.js → _generated/style-rules/literal-types.js} +9 -6
- package/lib/cjs/_generated/style-rules/literal-types.js.map +1 -0
- package/lib/cjs/_generated/style-rules/numeric-utils.js.map +1 -1
- package/lib/cjs/_generated/style-rules/range-utils.js.map +1 -1
- package/lib/cjs/ai/presence/stories/ai-presence-default.story.js +1 -1
- package/lib/cjs/ai/presence/stories/ai-presence-default.story.js.map +1 -1
- package/lib/cjs/ai/presence/stories/ai-presence-thinking.story.js +1 -1
- package/lib/cjs/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
- package/lib/cjs/ai/reasoning/Reasoning.js +1 -1
- package/lib/cjs/ai/reasoning/Reasoning.js.map +1 -1
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js +1 -1
- package/lib/cjs/ai/reasoning/stories/reasoning-full.story.js.map +1 -1
- package/lib/cjs/ai/response/Response.js +1 -1
- package/lib/cjs/ai/response/Response.js.map +1 -1
- package/lib/cjs/ai/response/stories/response-full-example.story.js +3 -3
- package/lib/cjs/ai/response/stories/response-full-example.story.js.map +1 -1
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js +1 -1
- package/lib/cjs/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -1
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
- package/lib/cjs/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
- package/lib/cjs/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-custom-icon.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-custom-icon.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-shapes.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-shapes.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-sizes.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-sizes.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-statuses.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-statuses.story.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-types.story.js +1 -1
- package/lib/cjs/avatar/stories/avatar-types.story.js.map +1 -1
- package/lib/cjs/banner/stories/banner-variants.story.js +1 -1
- package/lib/cjs/banner/stories/banner-variants.story.js.map +1 -1
- package/lib/cjs/banner/stories/banner-with-icons.story.js +1 -1
- package/lib/cjs/banner/stories/banner-with-icons.story.js.map +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
- package/lib/cjs/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
- package/lib/cjs/button/ButtonBase.js +1 -3
- package/lib/cjs/button/ButtonBase.js.map +1 -1
- package/lib/cjs/button/stories/button-sizes.story.js +1 -1
- package/lib/cjs/button/stories/button-sizes.story.js.map +1 -1
- package/lib/cjs/button/stories/button-variants.story.js +1 -1
- package/lib/cjs/button/stories/button-variants.story.js.map +1 -1
- package/lib/cjs/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/cjs/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
- package/lib/cjs/clipboard-button/stories/clipboard-button-sizes.story.js +1 -1
- package/lib/cjs/clipboard-button/stories/clipboard-button-sizes.story.js.map +1 -1
- package/lib/cjs/code-block/CodeBlock.js +3 -7
- package/lib/cjs/code-block/CodeBlock.js.map +1 -1
- package/lib/cjs/code-block/stories/code-disabled.story.js +2 -2
- package/lib/cjs/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-full.story.js +2 -2
- package/lib/cjs/code-block/stories/code-full.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-languages.story.js +1 -1
- package/lib/cjs/code-block/stories/code-languages.story.js.map +1 -1
- package/lib/cjs/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/cjs/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/cjs/color-picker/ColorPicker.js +0 -3
- package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
- package/lib/cjs/color-picker/stories/color-picker-dialog.story.js +1 -1
- package/lib/cjs/color-picker/stories/color-picker-dialog.story.js.map +1 -1
- package/lib/cjs/color-picker/stories/color-picker-popover.story.js +1 -1
- package/lib/cjs/color-picker/stories/color-picker-popover.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-action-on-select.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-action-on-select.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-actions.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-actions.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-async.story.js +2 -2
- package/lib/cjs/combobox/stories/combobox-async.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-disabled.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-disabled.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-fluid.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-fluid.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-hidden-label.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-hidden-label.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-in-popover.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-in-popover.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-native-form.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-native-form.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-sizes.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-sizes.story.js.map +1 -1
- package/lib/cjs/combobox/stories/combobox-validation.story.js +1 -1
- package/lib/cjs/combobox/stories/combobox-validation.story.js.map +1 -1
- package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js +1 -1
- package/lib/cjs/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-compact-mode.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-compact-mode.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js +2 -2
- package/lib/cjs/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js +2 -2
- package/lib/cjs/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-percentage-width-columns.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-percentage-width-columns.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js +3 -3
- package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-placeholder-states.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-placeholder-states.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-resizable-column.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-resizable-column.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +5 -5
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-simple.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-simple.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-skeleton-loading.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-skeleton-loading.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-sortable.story.js +1 -1
- package/lib/cjs/data-grid/stories/datagrid-sortable.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-using-editable-cells.story.js +2 -2
- package/lib/cjs/data-grid/stories/datagrid-using-editable-cells.story.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js +3 -3
- package/lib/cjs/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/guard.js +47 -0
- package/lib/cjs/data-grid/style-rules/guard.js.map +1 -0
- package/lib/cjs/data-grid/style-rules/index.js +3 -19
- package/lib/cjs/data-grid/style-rules/index.js.map +1 -1
- package/lib/cjs/data-grid/style-rules/internal/schemas.js +213 -0
- package/lib/cjs/data-grid/style-rules/internal/schemas.js.map +1 -0
- package/lib/cjs/data-grid/style-rules/types.js +0 -205
- package/lib/cjs/data-grid/style-rules/types.js.map +1 -1
- package/lib/cjs/date-picker/DatePicker.js +8 -6
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-in-dialog.story.js +1 -1
- package/lib/cjs/date-picker/stories/date-picker-in-dialog.story.js.map +1 -1
- package/lib/cjs/date-picker/stories/date-picker-in-popover-dialog.story.js +1 -1
- package/lib/cjs/date-picker/stories/date-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/cjs/dialog/Dialog.js +1 -2
- package/lib/cjs/dialog/Dialog.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-danger.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-danger.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-default.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-default.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-image.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-image.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-info.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-info.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-top-aligned.story.js +2 -2
- package/lib/cjs/dialog/stories/dialog-top-aligned.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-variants.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-variants.story.js.map +1 -1
- package/lib/cjs/dialog/stories/dialog-warning.story.js +1 -1
- package/lib/cjs/dialog/stories/dialog-warning.story.js.map +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-colors.story.js +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-colors.story.js.map +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
- package/lib/cjs/drawer/Drawer.js +7 -6
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-full.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-overlay.story.js +1 -1
- package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-portaled.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-push.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-resizable.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-right-side.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js +2 -2
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/cjs/dropzone/stories/dropzone-full.story.js +3 -3
- package/lib/cjs/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/cjs/flex/stories/flex-default.story.js +1 -1
- package/lib/cjs/flex/stories/flex-default.story.js.map +1 -1
- package/lib/cjs/graph-label/stories/graph-label-color.story.js +1 -1
- package/lib/cjs/graph-label/stories/graph-label-color.story.js.map +1 -1
- package/lib/cjs/graph-label/stories/graph-label-sizes.story.js +1 -1
- package/lib/cjs/graph-label/stories/graph-label-sizes.story.js.map +1 -1
- package/lib/cjs/graph-label/stories/graph-label-types.story.js +1 -1
- package/lib/cjs/graph-label/stories/graph-label-types.story.js.map +1 -1
- package/lib/cjs/hooks/use-debounce-callback/index.js +6 -6
- package/lib/cjs/hooks/use-debounce-callback/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button-sizes.story.js +1 -1
- package/lib/cjs/icon-button/stories/icon-button-sizes.story.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button-tone.story.js +1 -1
- package/lib/cjs/icon-button/stories/icon-button-tone.story.js.map +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array-sizes.story.js +1 -1
- package/lib/cjs/icon-button-array/stories/icon-button-array-sizes.story.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +1 -3
- package/lib/cjs/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/cjs/icons/generated/custom/index.js +3 -17
- package/lib/cjs/icons/generated/custom/index.js.map +1 -1
- package/lib/cjs/inline-edit/InlineEdit.js +3 -2
- package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
- package/lib/cjs/kbd/Kbd.js +0 -1
- package/lib/cjs/kbd/Kbd.js.map +1 -1
- package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js +1 -1
- package/lib/cjs/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -1
- package/lib/cjs/logo/stories/logo-black.story.js +1 -1
- package/lib/cjs/logo/stories/logo-black.story.js.map +1 -1
- package/lib/cjs/logo/stories/logo-default.story.js +1 -1
- package/lib/cjs/logo/stories/logo-default.story.js.map +1 -1
- package/lib/cjs/logo/stories/logo-icon.story.js +1 -1
- package/lib/cjs/logo/stories/logo-icon.story.js.map +1 -1
- package/lib/cjs/menu/Menu.js +2 -2
- package/lib/cjs/menu/Menu.js.map +1 -1
- package/lib/cjs/menu/menu-types.js.map +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js +1 -1
- package/lib/cjs/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-in-dialog.story.js +2 -2
- package/lib/cjs/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js +1 -1
- package/lib/cjs/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +1 -1
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-items.story.js +1 -1
- package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/cjs/next/tree-view/TreeView.js +3 -3
- package/lib/cjs/next/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-large.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-large.story.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-multiple-replace.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-multiple-replace.story.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-root-selection.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-root-selection.story.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-tooltip.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-tooltip.story.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-trailing.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-trailing.story.js.map +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-uncontrolled.story.js +1 -1
- package/lib/cjs/next/tree-view/stories/tree-view-uncontrolled.story.js.map +1 -1
- package/lib/cjs/popover/Popover.js +6 -6
- package/lib/cjs/popover/Popover.js.map +1 -1
- package/lib/cjs/popover/stories/popover-controlled.story.js +1 -1
- package/lib/cjs/popover/stories/popover-controlled.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-custom-offset.story.js +1 -1
- package/lib/cjs/popover/stories/popover-custom-offset.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-default.story.js +1 -1
- package/lib/cjs/popover/stories/popover-default.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-in-dialog.story.js +1 -1
- package/lib/cjs/popover/stories/popover-in-dialog.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-no-button-wrapper.story.js +1 -1
- package/lib/cjs/popover/stories/popover-no-button-wrapper.story.js.map +1 -1
- package/lib/cjs/popover/stories/popover-separate-anchor.story.js +1 -1
- package/lib/cjs/popover/stories/popover-separate-anchor.story.js.map +1 -1
- package/lib/cjs/popover/use-popover.js +7 -9
- package/lib/cjs/popover/use-popover.js.map +1 -1
- package/lib/cjs/progress-bar/stories/progress-bar-sizes.story.js +1 -1
- package/lib/cjs/progress-bar/stories/progress-bar-sizes.story.js.map +1 -1
- package/lib/cjs/radio/stories/radio-disabled.story.js +1 -1
- package/lib/cjs/radio/stories/radio-disabled.story.js.map +1 -1
- package/lib/cjs/radio/stories/radio-truncated-label.story.js +1 -1
- package/lib/cjs/radio/stories/radio-truncated-label.story.js.map +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-colors.story.js +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-colors.story.js.map +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
- package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js +1 -1
- package/lib/cjs/segmented-control/stories/segmented-control-sizes.story.js.map +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -1
- package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/cjs/select/stories/select-required.story.js +1 -1
- package/lib/cjs/select/stories/select-required.story.js.map +1 -1
- package/lib/cjs/select/stories/select-sizes.story.js +1 -1
- package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js +1 -1
- package/lib/cjs/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
- package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js +1 -1
- package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -1
- package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
- package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
- package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-badges.story.js +2 -2
- package/lib/cjs/side-navigation/stories/side-nav-badges.story.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-compact.story.js +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-compact.story.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-default.story.js +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-default.story.js.map +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-secondary.story.js +1 -1
- package/lib/cjs/side-navigation/stories/side-nav-secondary.story.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton-circular.story.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton-circular.story.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton-default.story.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton-default.story.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton-full-example.story.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton-full-example.story.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton-inherit-height.story.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton-inherit-height.story.js.map +1 -1
- package/lib/cjs/skeleton/stories/skeleton-inherit-width.story.js +1 -1
- package/lib/cjs/skeleton/stories/skeleton-inherit-width.story.js.map +1 -1
- package/lib/cjs/slider/Slider.js +3 -3
- package/lib/cjs/slider/Slider.js.map +1 -1
- package/lib/cjs/slider/stories/slider-custom-step-length.story.js +1 -1
- package/lib/cjs/slider/stories/slider-custom-step-length.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-range.story.js +1 -1
- package/lib/cjs/slider/stories/slider-range.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-show-steps.story.js +1 -1
- package/lib/cjs/slider/stories/slider-show-steps.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-show-values.story.js +1 -1
- package/lib/cjs/slider/stories/slider-show-values.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-single-controlled.story.js +2 -2
- package/lib/cjs/slider/stories/slider-single-controlled.story.js.map +1 -1
- package/lib/cjs/slider/stories/slider-single.story.js +1 -1
- package/lib/cjs/slider/stories/slider-single.story.js.map +1 -1
- package/lib/cjs/spotlight/Spotlight.js +3 -3
- package/lib/cjs/spotlight/Spotlight.js.map +1 -1
- package/lib/cjs/spotlight/SpotlightTarget.js +3 -3
- package/lib/cjs/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-on-tabs.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-on-tabs.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-tour.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-tour.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/cjs/spotlight/use-spotlight.js +5 -5
- package/lib/cjs/spotlight/use-spotlight.js.map +1 -1
- package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js +1 -1
- package/lib/cjs/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
- package/lib/cjs/status-label/stories/status-label-colors.story.js +1 -1
- package/lib/cjs/status-label/stories/status-label-colors.story.js.map +1 -1
- package/lib/cjs/status-label/stories/status-label-fills.story.js +1 -1
- package/lib/cjs/status-label/stories/status-label-fills.story.js.map +1 -1
- package/lib/cjs/status-label/stories/status-label-with-icons.story.js +1 -1
- package/lib/cjs/status-label/stories/status-label-with-icons.story.js.map +1 -1
- package/lib/cjs/switch/stories/switch-disabled.story.js +1 -1
- package/lib/cjs/switch/stories/switch-disabled.story.js.map +1 -1
- package/lib/cjs/tabs/Tabs.js +2 -2
- package/lib/cjs/tabs/Tabs.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-badge.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-badge.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-default.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-default.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-disabled.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-disabled.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-fill-variants.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-fill-variants.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-sizes.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-sizes.story.js.map +1 -1
- package/lib/cjs/tabs/stories/tabs-with-icons.story.js +1 -1
- package/lib/cjs/tabs/stories/tabs-with-icons.story.js.map +1 -1
- package/lib/cjs/tag/stories/tag-sizes.story.js +1 -1
- package/lib/cjs/tag/stories/tag-sizes.story.js.map +1 -1
- package/lib/cjs/tag/stories/tag-types.story.js +1 -1
- package/lib/cjs/tag/stories/tag-types.story.js.map +1 -1
- package/lib/cjs/tag-base/stories/tag-variants.story.js +1 -1
- package/lib/cjs/tag-base/stories/tag-variants.story.js.map +1 -1
- package/lib/cjs/text-area/stories/text-area-sizes.story.js +1 -1
- package/lib/cjs/text-area/stories/text-area-sizes.story.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-optional.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-optional.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-sizes.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-sizes.story.js.map +1 -1
- package/lib/cjs/text-link/TextLink.js +2 -6
- package/lib/cjs/text-link/TextLink.js.map +1 -1
- package/lib/cjs/text-link/stories/index.js +5 -17
- package/lib/cjs/text-link/stories/index.js.map +1 -1
- package/lib/cjs/text-link/stories/text-link-external.story.js +1 -1
- package/lib/cjs/text-link/stories/text-link-external.story.js.map +1 -1
- package/lib/cjs/text-link/stories/{text-link-internal-underline.story.js → text-link-internal.story.js} +2 -2
- package/lib/cjs/text-link/stories/text-link-internal.story.js.map +1 -0
- package/lib/cjs/time-picker/stories/time-picker-in-popover-dialog.story.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js +1 -1
- package/lib/cjs/toast/stories/toast-action-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-closeable-story.js +1 -1
- package/lib/cjs/toast/stories/toast-closeable-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-controlled-story.js +1 -1
- package/lib/cjs/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-custom-story.js +1 -1
- package/lib/cjs/toast/stories/toast-custom-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-danger-story.js +1 -1
- package/lib/cjs/toast/stories/toast-danger-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-neutral-story.js +1 -1
- package/lib/cjs/toast/stories/toast-neutral-story.js.map +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js +1 -1
- package/lib/cjs/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/cjs/toast/stories/toast-success-story.js +1 -1
- package/lib/cjs/toast/stories/toast-success-story.js.map +1 -1
- package/lib/cjs/tooltip/Tooltip.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-in-dialog.story.js +1 -1
- package/lib/cjs/tooltip/stories/tooltip-in-dialog.story.js.map +1 -1
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js +1 -1
- package/lib/cjs/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/cjs/tooltip/use-tooltip.js.map +1 -1
- package/lib/cjs/tree-view/TreeView.js +3 -0
- package/lib/cjs/tree-view/TreeView.js.map +1 -1
- package/lib/cjs/tree-view/TreeViewItem.js.map +1 -1
- package/lib/cjs/tree-view/stories/treeview-custom.story.js +2 -2
- package/lib/cjs/tree-view/stories/treeview-custom.story.js.map +1 -1
- package/lib/cjs/tree-view/tree-view-utils.js.map +1 -1
- package/lib/cjs/typography/Typography.js +7 -1
- package/lib/cjs/typography/Typography.js.map +1 -1
- package/lib/esm/_generated/style-rules/index.js +1 -1
- package/lib/esm/_generated/style-rules/index.js.map +1 -1
- package/lib/esm/_generated/style-rules/literal-guards.js +45 -0
- package/lib/esm/_generated/style-rules/literal-guards.js.map +1 -0
- package/lib/esm/_generated/style-rules/literal-schemas.js +6 -18
- package/lib/esm/_generated/style-rules/literal-schemas.js.map +1 -1
- package/lib/esm/{text-overflow/index.js → _generated/style-rules/literal-types.js} +8 -2
- package/lib/esm/_generated/style-rules/literal-types.js.map +1 -0
- package/lib/esm/_generated/style-rules/numeric-utils.js.map +1 -1
- package/lib/esm/_generated/style-rules/range-utils.js.map +1 -1
- package/lib/esm/ai/presence/stories/ai-presence-default.story.js +1 -1
- package/lib/esm/ai/presence/stories/ai-presence-default.story.js.map +1 -1
- package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js +1 -1
- package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
- package/lib/esm/ai/reasoning/Reasoning.js +1 -1
- package/lib/esm/ai/reasoning/Reasoning.js.map +1 -1
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js +1 -1
- package/lib/esm/ai/reasoning/stories/reasoning-full.story.js.map +1 -1
- package/lib/esm/ai/response/Response.js +1 -1
- package/lib/esm/ai/response/Response.js.map +1 -1
- package/lib/esm/ai/response/stories/response-full-example.story.js +3 -3
- package/lib/esm/ai/response/stories/response-full-example.story.js.map +1 -1
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js +1 -1
- package/lib/esm/ai/suggestion/stories/suggestion-sizes.story.js.map +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js +1 -1
- package/lib/esm/ai/user-bubble/stories/user-bubble-and-files.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-custom-icons.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-non-urgent.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-injected-urgent.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-present-at-page-render.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-variants.story.js.map +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js +1 -1
- package/lib/esm/announcement-banner/stories/announcement-banner-with-page-content.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-custom-icon.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-custom-icon.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-shapes.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-shapes.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-sizes.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-sizes.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-statuses.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-statuses.story.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-types.story.js +1 -1
- package/lib/esm/avatar/stories/avatar-types.story.js.map +1 -1
- package/lib/esm/banner/stories/banner-variants.story.js +1 -1
- package/lib/esm/banner/stories/banner-variants.story.js.map +1 -1
- package/lib/esm/banner/stories/banner-with-icons.story.js +1 -1
- package/lib/esm/banner/stories/banner-with-icons.story.js.map +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js +1 -1
- package/lib/esm/breadcrumbs/stories/breadcrumbs-header.story.js.map +1 -1
- package/lib/esm/button/ButtonBase.js +1 -3
- package/lib/esm/button/ButtonBase.js.map +1 -1
- package/lib/esm/button/stories/button-sizes.story.js +1 -1
- package/lib/esm/button/stories/button-sizes.story.js.map +1 -1
- package/lib/esm/button/stories/button-variants.story.js +1 -1
- package/lib/esm/button/stories/button-variants.story.js.map +1 -1
- package/lib/esm/checkbox/stories/checkbox-full.story.js +2 -2
- package/lib/esm/checkbox/stories/checkbox-full.story.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-keyboard-display.story.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-sizes.story.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-tone.story.js.map +1 -1
- package/lib/esm/clipboard-button/stories/clipboard-button-sizes.story.js +1 -1
- package/lib/esm/clipboard-button/stories/clipboard-button-sizes.story.js.map +1 -1
- package/lib/esm/code-block/CodeBlock.js +3 -7
- package/lib/esm/code-block/CodeBlock.js.map +1 -1
- package/lib/esm/code-block/stories/code-disabled.story.js +2 -2
- package/lib/esm/code-block/stories/code-disabled.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-full.story.js +2 -2
- package/lib/esm/code-block/stories/code-full.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-languages.story.js +1 -1
- package/lib/esm/code-block/stories/code-languages.story.js.map +1 -1
- package/lib/esm/code-block/stories/code-with-actions.story.js +2 -2
- package/lib/esm/code-block/stories/code-with-actions.story.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +0 -3
- package/lib/esm/color-picker/ColorPicker.js.map +1 -1
- package/lib/esm/color-picker/stories/color-picker-dialog.story.js +1 -1
- package/lib/esm/color-picker/stories/color-picker-dialog.story.js.map +1 -1
- package/lib/esm/color-picker/stories/color-picker-popover.story.js +1 -1
- package/lib/esm/color-picker/stories/color-picker-popover.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-action-on-select.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-action-on-select.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-actions.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-actions.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-async.story.js +2 -2
- package/lib/esm/combobox/stories/combobox-async.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-disabled.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-disabled.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-fluid.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-fluid.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-hidden-label.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-hidden-label.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-in-popover.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-in-popover.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-native-form.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-native-form.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-sizes.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-sizes.story.js.map +1 -1
- package/lib/esm/combobox/stories/combobox-validation.story.js +1 -1
- package/lib/esm/combobox/stories/combobox-validation.story.js.map +1 -1
- package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js +1 -1
- package/lib/esm/conditional-wrap/stories/conditional-wrap-default.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-compact-mode.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-compact-mode.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js +2 -2
- package/lib/esm/data-grid/stories/datagrid-component-overriding.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-custom-cell-with-style-rules.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js +2 -2
- package/lib/esm/data-grid/stories/datagrid-in-dialog.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-keyboard-navigation.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-kitchen-sink.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-percentage-width-columns.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-percentage-width-columns.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +3 -3
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-placeholder-states.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-placeholder-states.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-resizable-column.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-resizable-column.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling-datetime.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-rule-based-styling.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +5 -5
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-simple.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-simple.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-single-selectable.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-skeleton-loading.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-skeleton-loading.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-sortable.story.js +1 -1
- package/lib/esm/data-grid/stories/datagrid-sortable.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-using-editable-cells.story.js +2 -2
- package/lib/esm/data-grid/stories/datagrid-using-editable-cells.story.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-virtualization.story.js +3 -3
- package/lib/esm/data-grid/stories/datagrid-virtualization.story.js.map +1 -1
- package/lib/esm/data-grid/style-rules/guard.js +43 -0
- package/lib/esm/data-grid/style-rules/guard.js.map +1 -0
- package/lib/esm/data-grid/style-rules/index.js +1 -3
- package/lib/esm/data-grid/style-rules/index.js.map +1 -1
- package/lib/esm/data-grid/style-rules/internal/schemas.js +210 -0
- package/lib/esm/data-grid/style-rules/internal/schemas.js.map +1 -0
- package/lib/esm/data-grid/style-rules/types.js +1 -203
- package/lib/esm/data-grid/style-rules/types.js.map +1 -1
- package/lib/esm/date-picker/DatePicker.js +8 -6
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-in-dialog.story.js +1 -1
- package/lib/esm/date-picker/stories/date-picker-in-dialog.story.js.map +1 -1
- package/lib/esm/date-picker/stories/date-picker-in-popover-dialog.story.js +1 -1
- package/lib/esm/date-picker/stories/date-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/esm/dialog/Dialog.js +1 -2
- package/lib/esm/dialog/Dialog.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-danger.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-danger.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-default.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-default.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-image.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-image.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-info.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-info.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-top-aligned.story.js +2 -2
- package/lib/esm/dialog/stories/dialog-top-aligned.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-variants.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-variants.story.js.map +1 -1
- package/lib/esm/dialog/stories/dialog-warning.story.js +1 -1
- package/lib/esm/dialog/stories/dialog-warning.story.js.map +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-colors.story.js +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-colors.story.js.map +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
- package/lib/esm/drawer/Drawer.js +7 -6
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-full.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-overlay.story.js +1 -1
- package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-portaled.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-push.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-resizable.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-right-side.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-scrollable.story.js +2 -2
- package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/esm/dropzone/stories/dropzone-full.story.js +3 -3
- package/lib/esm/dropzone/stories/dropzone-full.story.js.map +1 -1
- package/lib/esm/flex/stories/flex-default.story.js +1 -1
- package/lib/esm/flex/stories/flex-default.story.js.map +1 -1
- package/lib/esm/graph-label/stories/graph-label-color.story.js +1 -1
- package/lib/esm/graph-label/stories/graph-label-color.story.js.map +1 -1
- package/lib/esm/graph-label/stories/graph-label-sizes.story.js +1 -1
- package/lib/esm/graph-label/stories/graph-label-sizes.story.js.map +1 -1
- package/lib/esm/graph-label/stories/graph-label-types.story.js +1 -1
- package/lib/esm/graph-label/stories/graph-label-types.story.js.map +1 -1
- package/lib/esm/hooks/use-debounce-callback/index.js +6 -6
- package/lib/esm/hooks/use-debounce-callback/index.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button-sizes.story.js +1 -1
- package/lib/esm/icon-button/stories/icon-button-sizes.story.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button-tone.story.js +1 -1
- package/lib/esm/icon-button/stories/icon-button-tone.story.js.map +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array-sizes.story.js +1 -1
- package/lib/esm/icon-button-array/stories/icon-button-array-sizes.story.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +1 -3
- package/lib/esm/icon-button-base/IconButtonBase.js.map +1 -1
- package/lib/esm/icons/generated/custom/index.js +0 -7
- package/lib/esm/icons/generated/custom/index.js.map +1 -1
- package/lib/esm/inline-edit/InlineEdit.js +3 -2
- package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
- package/lib/esm/kbd/Kbd.js +0 -1
- package/lib/esm/kbd/Kbd.js.map +1 -1
- package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js +1 -1
- package/lib/esm/loading-spinner/stories/loading-spinner-sizes.story.js.map +1 -1
- package/lib/esm/logo/stories/logo-black.story.js +1 -1
- package/lib/esm/logo/stories/logo-black.story.js.map +1 -1
- package/lib/esm/logo/stories/logo-default.story.js +1 -1
- package/lib/esm/logo/stories/logo-default.story.js.map +1 -1
- package/lib/esm/logo/stories/logo-icon.story.js +1 -1
- package/lib/esm/logo/stories/logo-icon.story.js.map +1 -1
- package/lib/esm/menu/Menu.js +2 -2
- package/lib/esm/menu/Menu.js.map +1 -1
- package/lib/esm/menu/menu-types.js.map +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js +1 -1
- package/lib/esm/menu/stories/menu-custom-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-in-dialog.story.js +2 -2
- package/lib/esm/menu/stories/menu-in-dialog.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js +1 -1
- package/lib/esm/menu/stories/menu-nested.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js +1 -1
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-items.story.js +1 -1
- package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-icon.story.js.map +1 -1
- package/lib/esm/next/tree-view/TreeView.js +3 -3
- package/lib/esm/next/tree-view/TreeView.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-large.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-large.story.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-multiple-replace.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-multiple-replace.story.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-root-selection.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-root-selection.story.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-tooltip.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-tooltip.story.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-trailing.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-trailing.story.js.map +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-uncontrolled.story.js +1 -1
- package/lib/esm/next/tree-view/stories/tree-view-uncontrolled.story.js.map +1 -1
- package/lib/esm/popover/Popover.js +6 -6
- package/lib/esm/popover/Popover.js.map +1 -1
- package/lib/esm/popover/stories/popover-controlled.story.js +1 -1
- package/lib/esm/popover/stories/popover-controlled.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-custom-offset.story.js +1 -1
- package/lib/esm/popover/stories/popover-custom-offset.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-default.story.js +1 -1
- package/lib/esm/popover/stories/popover-default.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-in-dialog.story.js +1 -1
- package/lib/esm/popover/stories/popover-in-dialog.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-no-button-wrapper.story.js +1 -1
- package/lib/esm/popover/stories/popover-no-button-wrapper.story.js.map +1 -1
- package/lib/esm/popover/stories/popover-separate-anchor.story.js +1 -1
- package/lib/esm/popover/stories/popover-separate-anchor.story.js.map +1 -1
- package/lib/esm/popover/use-popover.js +7 -9
- package/lib/esm/popover/use-popover.js.map +1 -1
- package/lib/esm/progress-bar/stories/progress-bar-sizes.story.js +1 -1
- package/lib/esm/progress-bar/stories/progress-bar-sizes.story.js.map +1 -1
- package/lib/esm/radio/stories/radio-disabled.story.js +1 -1
- package/lib/esm/radio/stories/radio-disabled.story.js.map +1 -1
- package/lib/esm/radio/stories/radio-truncated-label.story.js +1 -1
- package/lib/esm/radio/stories/radio-truncated-label.story.js.map +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-colors.story.js +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-colors.story.js.map +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
- package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js +1 -1
- package/lib/esm/segmented-control/stories/segmented-control-sizes.story.js.map +1 -1
- package/lib/esm/select/stories/select-controlled.story.js +1 -1
- package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/esm/select/stories/select-menu-positionings.story.js +1 -1
- package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/esm/select/stories/select-required.story.js +1 -1
- package/lib/esm/select/stories/select-required.story.js.map +1 -1
- package/lib/esm/select/stories/select-sizes.story.js +1 -1
- package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-sizes.story.js.map +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js +1 -1
- package/lib/esm/select-icon-button/stories/select-icon-button-states.story.js.map +1 -1
- package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js +1 -1
- package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -1
- package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js +1 -1
- package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -1
- package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav-badges.story.js +2 -2
- package/lib/esm/side-navigation/stories/side-nav-badges.story.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav-compact.story.js +1 -1
- package/lib/esm/side-navigation/stories/side-nav-compact.story.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav-default.story.js +1 -1
- package/lib/esm/side-navigation/stories/side-nav-default.story.js.map +1 -1
- package/lib/esm/side-navigation/stories/side-nav-secondary.story.js +1 -1
- package/lib/esm/side-navigation/stories/side-nav-secondary.story.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton-circular.story.js +1 -1
- package/lib/esm/skeleton/stories/skeleton-circular.story.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton-default.story.js +1 -1
- package/lib/esm/skeleton/stories/skeleton-default.story.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton-full-example.story.js +1 -1
- package/lib/esm/skeleton/stories/skeleton-full-example.story.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton-inherit-height.story.js +1 -1
- package/lib/esm/skeleton/stories/skeleton-inherit-height.story.js.map +1 -1
- package/lib/esm/skeleton/stories/skeleton-inherit-width.story.js +1 -1
- package/lib/esm/skeleton/stories/skeleton-inherit-width.story.js.map +1 -1
- package/lib/esm/slider/Slider.js +3 -3
- package/lib/esm/slider/Slider.js.map +1 -1
- package/lib/esm/slider/stories/slider-custom-step-length.story.js +1 -1
- package/lib/esm/slider/stories/slider-custom-step-length.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-range.story.js +1 -1
- package/lib/esm/slider/stories/slider-range.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-show-steps.story.js +1 -1
- package/lib/esm/slider/stories/slider-show-steps.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-show-values.story.js +1 -1
- package/lib/esm/slider/stories/slider-show-values.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-single-controlled.story.js +2 -2
- package/lib/esm/slider/stories/slider-single-controlled.story.js.map +1 -1
- package/lib/esm/slider/stories/slider-single.story.js +1 -1
- package/lib/esm/slider/stories/slider-single.story.js.map +1 -1
- package/lib/esm/spotlight/Spotlight.js +3 -3
- package/lib/esm/spotlight/Spotlight.js.map +1 -1
- package/lib/esm/spotlight/SpotlightTarget.js +3 -3
- package/lib/esm/spotlight/SpotlightTarget.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-on-tabs.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-on-tabs.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-tour.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-tour.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/esm/spotlight/use-spotlight.js +5 -5
- package/lib/esm/spotlight/use-spotlight.js.map +1 -1
- package/lib/esm/status-indicator/stories/status-indicator-variants.story.js +1 -1
- package/lib/esm/status-indicator/stories/status-indicator-variants.story.js.map +1 -1
- package/lib/esm/status-label/stories/status-label-colors.story.js +1 -1
- package/lib/esm/status-label/stories/status-label-colors.story.js.map +1 -1
- package/lib/esm/status-label/stories/status-label-fills.story.js +1 -1
- package/lib/esm/status-label/stories/status-label-fills.story.js.map +1 -1
- package/lib/esm/status-label/stories/status-label-with-icons.story.js +1 -1
- package/lib/esm/status-label/stories/status-label-with-icons.story.js.map +1 -1
- package/lib/esm/switch/stories/switch-disabled.story.js +1 -1
- package/lib/esm/switch/stories/switch-disabled.story.js.map +1 -1
- package/lib/esm/tabs/Tabs.js +2 -2
- package/lib/esm/tabs/Tabs.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-badge.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-badge.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-default.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-default.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-disabled.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-disabled.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-fill-variants.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-fill-variants.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-overflow.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-sizes.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-sizes.story.js.map +1 -1
- package/lib/esm/tabs/stories/tabs-with-icons.story.js +1 -1
- package/lib/esm/tabs/stories/tabs-with-icons.story.js.map +1 -1
- package/lib/esm/tag/stories/tag-sizes.story.js +1 -1
- package/lib/esm/tag/stories/tag-sizes.story.js.map +1 -1
- package/lib/esm/tag/stories/tag-types.story.js +1 -1
- package/lib/esm/tag/stories/tag-types.story.js.map +1 -1
- package/lib/esm/tag-base/stories/tag-variants.story.js +1 -1
- package/lib/esm/tag-base/stories/tag-variants.story.js.map +1 -1
- package/lib/esm/text-area/stories/text-area-sizes.story.js +1 -1
- package/lib/esm/text-area/stories/text-area-sizes.story.js.map +1 -1
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-loading-spinner.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-optional.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-optional.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-sizes.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-sizes.story.js.map +1 -1
- package/lib/esm/text-link/TextLink.js +2 -6
- package/lib/esm/text-link/TextLink.js.map +1 -1
- package/lib/esm/text-link/stories/index.js +3 -12
- package/lib/esm/text-link/stories/index.js.map +1 -1
- package/lib/esm/text-link/stories/text-link-external.story.js +3 -3
- package/lib/esm/text-link/stories/text-link-external.story.js.map +1 -1
- package/lib/esm/text-link/stories/{text-link-internal-underline.story.js → text-link-internal.story.js} +2 -2
- package/lib/esm/text-link/stories/text-link-internal.story.js.map +1 -0
- package/lib/esm/time-picker/stories/time-picker-in-popover-dialog.story.js +1 -1
- package/lib/esm/time-picker/stories/time-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-in-dialog.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-in-popover-dialog.story.js.map +1 -1
- package/lib/esm/toast/stories/toast-action-story.js +1 -1
- package/lib/esm/toast/stories/toast-action-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-closeable-story.js +1 -1
- package/lib/esm/toast/stories/toast-closeable-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-controlled-story.js +1 -1
- package/lib/esm/toast/stories/toast-controlled-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-custom-story.js +1 -1
- package/lib/esm/toast/stories/toast-custom-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-danger-story.js +1 -1
- package/lib/esm/toast/stories/toast-danger-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-neutral-story.js +1 -1
- package/lib/esm/toast/stories/toast-neutral-story.js.map +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js +1 -1
- package/lib/esm/toast/stories/toast-progress-bar.js.map +1 -1
- package/lib/esm/toast/stories/toast-success-story.js +1 -1
- package/lib/esm/toast/stories/toast-success-story.js.map +1 -1
- package/lib/esm/tooltip/Tooltip.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-in-dialog.story.js +1 -1
- package/lib/esm/tooltip/stories/tooltip-in-dialog.story.js.map +1 -1
- package/lib/esm/tooltip/stories/tooltip-placements.story.js +1 -1
- package/lib/esm/tooltip/stories/tooltip-placements.story.js.map +1 -1
- package/lib/esm/tooltip/use-tooltip.js.map +1 -1
- package/lib/esm/tree-view/TreeView.js +3 -0
- package/lib/esm/tree-view/TreeView.js.map +1 -1
- package/lib/esm/tree-view/TreeViewItem.js.map +1 -1
- package/lib/esm/tree-view/stories/treeview-custom.story.js +2 -2
- package/lib/esm/tree-view/stories/treeview-custom.story.js.map +1 -1
- package/lib/esm/tree-view/tree-view-utils.js.map +1 -1
- package/lib/esm/typography/Typography.js +7 -1
- package/lib/esm/typography/Typography.js.map +1 -1
- package/lib/types/_generated/style-rules/index.d.ts +2 -2
- package/lib/types/_generated/style-rules/index.d.ts.map +1 -1
- package/lib/{cjs/text-link/stories/text-link-default.story.js → types/_generated/style-rules/literal-guards.d.ts} +8 -10
- package/lib/types/_generated/style-rules/literal-guards.d.ts.map +1 -0
- package/lib/types/_generated/style-rules/literal-schemas.d.ts +0 -12
- package/lib/types/_generated/style-rules/literal-schemas.d.ts.map +1 -1
- package/lib/types/_generated/style-rules/literal-types.d.ts +80 -0
- package/lib/types/_generated/style-rules/literal-types.d.ts.map +1 -0
- package/lib/types/_generated/style-rules/numeric-utils.d.ts +1 -1
- package/lib/types/_generated/style-rules/numeric-utils.d.ts.map +1 -1
- package/lib/types/_generated/style-rules/range-utils.d.ts +1 -1
- package/lib/types/_generated/style-rules/range-utils.d.ts.map +1 -1
- package/lib/types/ai/reasoning/Reasoning.d.ts +1 -10
- package/lib/types/ai/reasoning/Reasoning.d.ts.map +1 -1
- package/lib/types/ai/reasoning/stories/reasoning-full.story.d.ts.map +1 -1
- package/lib/types/button/ButtonBase.d.ts.map +1 -1
- package/lib/types/code-block/CodeBlock.d.ts +2 -2
- package/lib/types/code-block/CodeBlock.d.ts.map +1 -1
- package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/guard.d.ts +43 -0
- package/lib/types/data-grid/style-rules/guard.d.ts.map +1 -0
- package/lib/types/data-grid/style-rules/index.d.ts +1 -2
- package/lib/types/data-grid/style-rules/index.d.ts.map +1 -1
- package/lib/types/data-grid/style-rules/internal/schemas.d.ts +321 -0
- package/lib/types/data-grid/style-rules/internal/schemas.d.ts.map +1 -0
- package/lib/types/data-grid/style-rules/types.d.ts +60 -284
- package/lib/types/data-grid/style-rules/types.d.ts.map +1 -1
- package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/types/dialog/Dialog.d.ts.map +1 -1
- package/lib/types/drawer/Drawer.d.ts +7 -13
- package/lib/types/drawer/Drawer.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-overlay.story.d.ts.map +1 -1
- package/lib/types/dropzone/stories/dropzone-full.story.d.ts.map +1 -1
- package/lib/types/hooks/use-debounce-callback/index.d.ts +2 -2
- package/lib/types/hooks/use-debounce-callback/index.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/icons/generated/custom/index.d.ts +0 -7
- package/lib/types/icons/generated/custom/index.d.ts.map +1 -1
- package/lib/types/inline-edit/InlineEdit.d.ts +6 -1
- package/lib/types/inline-edit/InlineEdit.d.ts.map +1 -1
- package/lib/types/kbd/Kbd.d.ts +1 -1
- package/lib/types/kbd/Kbd.d.ts.map +1 -1
- package/lib/types/menu/Menu.d.ts +1 -1
- package/lib/types/menu/Menu.d.ts.map +1 -1
- package/lib/types/menu/menu-types.d.ts +2 -2
- package/lib/types/menu/menu-types.d.ts.map +1 -1
- package/lib/types/next/tree-view/TreeView.d.ts +2 -2
- package/lib/types/next/tree-view/TreeView.d.ts.map +1 -1
- package/lib/types/popover/Popover.d.ts +15 -12
- package/lib/types/popover/Popover.d.ts.map +1 -1
- package/lib/types/popover/stories/popover-controlled.story.d.ts.map +1 -1
- package/lib/types/popover/stories/popover-default.story.d.ts.map +1 -1
- package/lib/types/popover/stories/popover-no-button-wrapper.story.d.ts.map +1 -1
- package/lib/types/popover/use-popover.d.ts +14 -9
- package/lib/types/popover/use-popover.d.ts.map +1 -1
- package/lib/types/side-navigation/SideNavigation.d.ts.map +1 -1
- package/lib/types/slider/Slider.d.ts +3 -3
- package/lib/types/slider/Slider.d.ts.map +1 -1
- package/lib/types/spotlight/Spotlight.d.ts +2 -2
- package/lib/types/spotlight/Spotlight.d.ts.map +1 -1
- package/lib/types/spotlight/SpotlightTarget.d.ts +3 -3
- package/lib/types/spotlight/SpotlightTarget.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-tour.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
- package/lib/types/spotlight/use-spotlight.d.ts +4 -4
- package/lib/types/spotlight/use-spotlight.d.ts.map +1 -1
- package/lib/types/tabs/Tabs.d.ts +3 -1
- package/lib/types/tabs/Tabs.d.ts.map +1 -1
- package/lib/types/text-link/TextLink.d.ts +2 -13
- package/lib/types/text-link/TextLink.d.ts.map +1 -1
- package/lib/types/text-link/stories/index.d.ts +2 -8
- package/lib/types/text-link/stories/index.d.ts.map +1 -1
- package/lib/types/text-link/stories/text-link-external.story.d.ts.map +1 -1
- package/lib/types/{text-overflow/stories/character-limit.story.d.ts → text-link/stories/text-link-internal.story.d.ts} +1 -1
- package/lib/types/text-link/stories/text-link-internal.story.d.ts.map +1 -0
- package/lib/types/tooltip/Tooltip.d.ts +0 -1
- package/lib/types/tooltip/Tooltip.d.ts.map +1 -1
- package/lib/types/tooltip/use-tooltip.d.ts.map +1 -1
- package/lib/types/tree-view/TreeView.d.ts +3 -0
- package/lib/types/tree-view/TreeView.d.ts.map +1 -1
- package/lib/types/tree-view/TreeViewItem.d.ts.map +1 -1
- package/lib/types/tree-view/tree-view-utils.d.ts.map +1 -1
- package/lib/types/typography/Typography.d.ts +6 -0
- package/lib/types/typography/Typography.d.ts.map +1 -1
- package/package.json +6 -4
- package/skills/ndl-react/SKILL.md +22 -20
- package/skills/ndl-react/components/ai/presence.md +3 -3
- package/skills/ndl-react/components/ai/reasoning.md +2 -6
- package/skills/ndl-react/components/ai/response.md +17 -17
- package/skills/ndl-react/components/ai/suggestion.md +1 -1
- package/skills/ndl-react/components/ai/user-bubble.md +2 -2
- package/skills/ndl-react/components/announcement-banner.md +10 -10
- package/skills/ndl-react/components/avatar.md +5 -5
- package/skills/ndl-react/components/banner.md +2 -2
- package/skills/ndl-react/components/breadcrumbs.md +3 -3
- package/skills/ndl-react/components/checkbox.md +5 -5
- package/skills/ndl-react/components/clean-icon-button.md +9 -103
- package/skills/ndl-react/components/clipboard-button.md +1 -1
- package/skills/ndl-react/components/code-block.md +8 -9
- package/skills/ndl-react/components/color-picker.md +3 -3
- package/skills/ndl-react/components/combobox.md +20 -20
- package/skills/ndl-react/components/conditional-wrap.md +1 -1
- package/skills/ndl-react/components/data-grid.md +28 -28
- package/skills/ndl-react/components/date-picker.md +3 -3
- package/skills/ndl-react/components/dialog.md +9 -9
- package/skills/ndl-react/components/dismissible-tag.md +2 -2
- package/skills/ndl-react/components/drawer.md +39 -37
- package/skills/ndl-react/components/dropzone.md +10 -13
- package/skills/ndl-react/components/flex.md +1 -1
- package/skills/ndl-react/components/graph-label.md +3 -3
- package/skills/ndl-react/components/icon-button-array.md +1 -1
- package/skills/ndl-react/components/icon-button.md +7 -7
- package/skills/ndl-react/components/inline-edit.md +4 -1
- package/skills/ndl-react/components/loading-spinner.md +1 -1
- package/skills/ndl-react/components/logo.md +3 -3
- package/skills/ndl-react/components/menu.md +14 -14
- package/skills/ndl-react/components/next/tree-view.md +18 -18
- package/skills/ndl-react/components/popover.md +15 -21
- package/skills/ndl-react/components/progress-bar.md +1 -1
- package/skills/ndl-react/components/radio.md +2 -2
- package/skills/ndl-react/components/read-only-tag.md +2 -2
- package/skills/ndl-react/components/segmented-control.md +1 -1
- package/skills/ndl-react/components/select-icon-button.md +8 -8
- package/skills/ndl-react/components/select.md +8 -8
- package/skills/ndl-react/components/selectable-tag.md +2 -2
- package/skills/ndl-react/components/side-navigation.md +19 -19
- package/skills/ndl-react/components/skeleton.md +13 -13
- package/skills/ndl-react/components/slider.md +13 -13
- package/skills/ndl-react/components/spotlight.md +43 -27
- package/skills/ndl-react/components/status-indicator.md +6 -6
- package/skills/ndl-react/components/status-label.md +3 -3
- package/skills/ndl-react/components/switch.md +1 -1
- package/skills/ndl-react/components/tabs.md +21 -20
- package/skills/ndl-react/components/tag.md +2 -2
- package/skills/ndl-react/components/text-area.md +1 -1
- package/skills/ndl-react/components/text-input.md +3 -3
- package/skills/ndl-react/components/text-link.md +12 -63
- package/skills/ndl-react/components/time-picker.md +2 -2
- package/skills/ndl-react/components/timezone-picker.md +4 -4
- package/skills/ndl-react/components/tooltip.md +3 -3
- package/skills/ndl-react/components/tree-view.md +6 -4
- package/skills/ndl-react/components/typography.md +4 -0
- package/skills/ndl-react/references/styling.md +56 -48
- package/lib/cjs/icons/generated/custom/AddNode.js +0 -31
- package/lib/cjs/icons/generated/custom/AddNode.js.map +0 -1
- package/lib/cjs/icons/generated/custom/PanelBottom.js +0 -31
- package/lib/cjs/icons/generated/custom/PanelBottom.js.map +0 -1
- package/lib/cjs/icons/generated/custom/PanelLeft.js +0 -31
- package/lib/cjs/icons/generated/custom/PanelLeft.js.map +0 -1
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js +0 -31
- package/lib/cjs/icons/generated/custom/PanelLeftCollapsed.js.map +0 -1
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js +0 -31
- package/lib/cjs/icons/generated/custom/PanelLeftExpanded.js.map +0 -1
- package/lib/cjs/icons/generated/custom/PanelRight.js +0 -31
- package/lib/cjs/icons/generated/custom/PanelRight.js.map +0 -1
- package/lib/cjs/icons/generated/custom/ThreePanel.js +0 -31
- package/lib/cjs/icons/generated/custom/ThreePanel.js.map +0 -1
- package/lib/cjs/text-link/stories/text-link-default.story.js.map +0 -1
- package/lib/cjs/text-link/stories/text-link-external-underline.story.js +0 -30
- package/lib/cjs/text-link/stories/text-link-external-underline.story.js.map +0 -1
- package/lib/cjs/text-link/stories/text-link-internal-icon.story.js +0 -30
- package/lib/cjs/text-link/stories/text-link-internal-icon.story.js.map +0 -1
- package/lib/cjs/text-link/stories/text-link-internal-underline.story.js.map +0 -1
- package/lib/cjs/text-overflow/TextOverflow.js +0 -146
- package/lib/cjs/text-overflow/TextOverflow.js.map +0 -1
- package/lib/cjs/text-overflow/constants.js +0 -44
- package/lib/cjs/text-overflow/constants.js.map +0 -1
- package/lib/cjs/text-overflow/index.js.map +0 -1
- package/lib/cjs/text-overflow/stories/character-limit.story.js +0 -32
- package/lib/cjs/text-overflow/stories/character-limit.story.js.map +0 -1
- package/lib/cjs/text-overflow/stories/expand-collapse-buttons.story.js +0 -32
- package/lib/cjs/text-overflow/stories/expand-collapse-buttons.story.js.map +0 -1
- package/lib/cjs/text-overflow/stories/index.js +0 -48
- package/lib/cjs/text-overflow/stories/index.js.map +0 -1
- package/lib/cjs/text-overflow/stories/line-clamp.story.js +0 -32
- package/lib/cjs/text-overflow/stories/line-clamp.story.js.map +0 -1
- package/lib/cjs/text-overflow/stories/mixed-content.story.js +0 -31
- package/lib/cjs/text-overflow/stories/mixed-content.story.js.map +0 -1
- package/lib/cjs/text-overflow/stories/width-based-truncation.story.js +0 -32
- package/lib/cjs/text-overflow/stories/width-based-truncation.story.js.map +0 -1
- package/lib/cjs/text-overflow/text-overflow-utils.js +0 -167
- package/lib/cjs/text-overflow/text-overflow-utils.js.map +0 -1
- package/lib/cjs/text-overflow/use-ellipsis-observer.js +0 -66
- package/lib/cjs/text-overflow/use-ellipsis-observer.js.map +0 -1
- package/lib/cjs/text-overflow/use-truncate-with-button.js +0 -205
- package/lib/cjs/text-overflow/use-truncate-with-button.js.map +0 -1
- package/lib/esm/icons/generated/custom/AddNode.js +0 -29
- package/lib/esm/icons/generated/custom/AddNode.js.map +0 -1
- package/lib/esm/icons/generated/custom/PanelBottom.js +0 -29
- package/lib/esm/icons/generated/custom/PanelBottom.js.map +0 -1
- package/lib/esm/icons/generated/custom/PanelLeft.js +0 -29
- package/lib/esm/icons/generated/custom/PanelLeft.js.map +0 -1
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js +0 -29
- package/lib/esm/icons/generated/custom/PanelLeftCollapsed.js.map +0 -1
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js +0 -29
- package/lib/esm/icons/generated/custom/PanelLeftExpanded.js.map +0 -1
- package/lib/esm/icons/generated/custom/PanelRight.js +0 -29
- package/lib/esm/icons/generated/custom/PanelRight.js.map +0 -1
- package/lib/esm/icons/generated/custom/ThreePanel.js +0 -29
- package/lib/esm/icons/generated/custom/ThreePanel.js.map +0 -1
- package/lib/esm/text-link/stories/text-link-default.story.js +0 -28
- package/lib/esm/text-link/stories/text-link-default.story.js.map +0 -1
- package/lib/esm/text-link/stories/text-link-external-underline.story.js +0 -28
- package/lib/esm/text-link/stories/text-link-external-underline.story.js.map +0 -1
- package/lib/esm/text-link/stories/text-link-internal-icon.story.js +0 -28
- package/lib/esm/text-link/stories/text-link-internal-icon.story.js.map +0 -1
- package/lib/esm/text-link/stories/text-link-internal-underline.story.js.map +0 -1
- package/lib/esm/text-overflow/TextOverflow.js +0 -139
- package/lib/esm/text-overflow/TextOverflow.js.map +0 -1
- package/lib/esm/text-overflow/constants.js +0 -41
- package/lib/esm/text-overflow/constants.js.map +0 -1
- package/lib/esm/text-overflow/index.js.map +0 -1
- package/lib/esm/text-overflow/stories/character-limit.story.js +0 -30
- package/lib/esm/text-overflow/stories/character-limit.story.js.map +0 -1
- package/lib/esm/text-overflow/stories/expand-collapse-buttons.story.js +0 -30
- package/lib/esm/text-overflow/stories/expand-collapse-buttons.story.js.map +0 -1
- package/lib/esm/text-overflow/stories/index.js +0 -37
- package/lib/esm/text-overflow/stories/index.js.map +0 -1
- package/lib/esm/text-overflow/stories/line-clamp.story.js +0 -30
- package/lib/esm/text-overflow/stories/line-clamp.story.js.map +0 -1
- package/lib/esm/text-overflow/stories/mixed-content.story.js +0 -29
- package/lib/esm/text-overflow/stories/mixed-content.story.js.map +0 -1
- package/lib/esm/text-overflow/stories/width-based-truncation.story.js +0 -30
- package/lib/esm/text-overflow/stories/width-based-truncation.story.js.map +0 -1
- package/lib/esm/text-overflow/text-overflow-utils.js +0 -159
- package/lib/esm/text-overflow/text-overflow-utils.js.map +0 -1
- package/lib/esm/text-overflow/use-ellipsis-observer.js +0 -63
- package/lib/esm/text-overflow/use-ellipsis-observer.js.map +0 -1
- package/lib/esm/text-overflow/use-truncate-with-button.js +0 -202
- package/lib/esm/text-overflow/use-truncate-with-button.js.map +0 -1
- package/lib/types/icons/generated/custom/AddNode.d.ts +0 -30
- package/lib/types/icons/generated/custom/AddNode.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/PanelBottom.d.ts +0 -30
- package/lib/types/icons/generated/custom/PanelBottom.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/PanelLeft.d.ts +0 -30
- package/lib/types/icons/generated/custom/PanelLeft.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts +0 -30
- package/lib/types/icons/generated/custom/PanelLeftCollapsed.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts +0 -30
- package/lib/types/icons/generated/custom/PanelLeftExpanded.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/PanelRight.d.ts +0 -30
- package/lib/types/icons/generated/custom/PanelRight.d.ts.map +0 -1
- package/lib/types/icons/generated/custom/ThreePanel.d.ts +0 -30
- package/lib/types/icons/generated/custom/ThreePanel.d.ts.map +0 -1
- package/lib/types/text-link/stories/text-link-default.story.d.ts +0 -24
- package/lib/types/text-link/stories/text-link-default.story.d.ts.map +0 -1
- package/lib/types/text-link/stories/text-link-external-underline.story.d.ts +0 -24
- package/lib/types/text-link/stories/text-link-external-underline.story.d.ts.map +0 -1
- package/lib/types/text-link/stories/text-link-internal-icon.story.d.ts +0 -24
- package/lib/types/text-link/stories/text-link-internal-icon.story.d.ts.map +0 -1
- package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts +0 -24
- package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts.map +0 -1
- package/lib/types/text-overflow/TextOverflow.d.ts +0 -63
- package/lib/types/text-overflow/TextOverflow.d.ts.map +0 -1
- package/lib/types/text-overflow/constants.d.ts +0 -41
- package/lib/types/text-overflow/constants.d.ts.map +0 -1
- package/lib/types/text-overflow/index.d.ts +0 -22
- package/lib/types/text-overflow/index.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/character-limit.story.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/expand-collapse-buttons.story.d.ts +0 -24
- package/lib/types/text-overflow/stories/expand-collapse-buttons.story.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/index.d.ts +0 -31
- package/lib/types/text-overflow/stories/index.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/line-clamp.story.d.ts +0 -24
- package/lib/types/text-overflow/stories/line-clamp.story.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/mixed-content.story.d.ts +0 -24
- package/lib/types/text-overflow/stories/mixed-content.story.d.ts.map +0 -1
- package/lib/types/text-overflow/stories/width-based-truncation.story.d.ts +0 -24
- package/lib/types/text-overflow/stories/width-based-truncation.story.d.ts.map +0 -1
- package/lib/types/text-overflow/text-overflow-utils.d.ts +0 -35
- package/lib/types/text-overflow/text-overflow-utils.d.ts.map +0 -1
- package/lib/types/text-overflow/use-ellipsis-observer.d.ts +0 -28
- package/lib/types/text-overflow/use-ellipsis-observer.d.ts.map +0 -1
- package/lib/types/text-overflow/use-truncate-with-button.d.ts +0 -45
- package/lib/types/text-overflow/use-truncate-with-button.d.ts.map +0 -1
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
/*!
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) "Neo4j"
|
|
7
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
-
*
|
|
9
|
-
* This file is part of Neo4j.
|
|
10
|
-
*
|
|
11
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
-
* it under the terms of the GNU General Public License as published by
|
|
13
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
-
* (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
-
*/
|
|
24
|
-
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
-
const react_1 = require("@neo4j-ndl/react");
|
|
26
|
-
const TextOverflow_1 = require("../TextOverflow");
|
|
27
|
-
const Component = () => {
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "n-max-w-[600px]", children: (0, jsx_runtime_1.jsxs)(TextOverflow_1.TextOverflow, { maxCharacters: 50, expandButton: "view-more", shouldShowTooltip: false, children: ["The", ' ', (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", className: "n-italic n-inline", as: "em", children: "quick brown fox" }), ' ', "jumps over the", ' ', (0, jsx_runtime_1.jsx)(react_1.TextLink, { href: "#", type: "internal-underline", children: "lazy dog" }), ". Pack my", ' ', (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-large", className: "n-font-bold n-inline", as: "strong", children: "box" }), ' ', "with five dozen liquor jugs. Waltz,", ' ', (0, jsx_runtime_1.jsx)(react_1.Typography, { variant: "body-medium", className: "n-italic n-inline", as: "em", children: "bad nymph" }), ", for quick jigs vex. The five", ' ', (0, jsx_runtime_1.jsx)(react_1.TextLink, { href: "#", type: "internal-underline", children: "boxing wizards" }), ' ', "jump quickly."] }) }));
|
|
29
|
-
};
|
|
30
|
-
exports.default = Component;
|
|
31
|
-
//# sourceMappingURL=mixed-content.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mixed-content.story.js","sourceRoot":"","sources":["../../../../src/text-overflow/stories/mixed-content.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwD;AAExD,kDAA+C;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,gCAAK,SAAS,EAAC,iBAAiB,YAC9B,wBAAC,2BAAY,IACX,aAAa,EAAE,EAAE,EACjB,YAAY,EAAC,WAAW,EACxB,iBAAiB,EAAE,KAAK,oBAEpB,GAAG,EACP,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,mBAAmB,EAAC,EAAE,EAAC,IAAI,gCAE1D,EAAC,GAAG,oBACF,GAAG,EAClB,uBAAC,gBAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,oBAAoB,yBAEjC,eACD,GAAG,EACb,uBAAC,kBAAU,IACT,OAAO,EAAC,YAAY,EACpB,SAAS,EAAC,sBAAsB,EAChC,EAAE,EAAC,QAAQ,oBAGA,EAAC,GAAG,yCACmB,GAAG,EACvC,uBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,mBAAmB,EAAC,EAAE,EAAC,IAAI,0BAE1D,oCACkB,GAAG,EAClC,uBAAC,gBAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,oBAAoB,+BAEjC,EAAC,GAAG,qBAEF,GACX,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { TextLink, Typography } from '@neo4j-ndl/react';\n\nimport { TextOverflow } from '../TextOverflow';\n\nconst Component = () => {\n return (\n <div className=\"n-max-w-[600px]\">\n <TextOverflow\n maxCharacters={50}\n expandButton=\"view-more\"\n shouldShowTooltip={false}\n >\n The{' '}\n <Typography variant=\"body-medium\" className=\"n-italic n-inline\" as=\"em\">\n quick brown fox\n </Typography>{' '}\n jumps over the{' '}\n <TextLink href=\"#\" type=\"internal-underline\">\n lazy dog\n </TextLink>\n . Pack my{' '}\n <Typography\n variant=\"body-large\"\n className=\"n-font-bold n-inline\"\n as=\"strong\"\n >\n box\n </Typography>{' '}\n with five dozen liquor jugs. Waltz,{' '}\n <Typography variant=\"body-medium\" className=\"n-italic n-inline\" as=\"em\">\n bad nymph\n </Typography>\n , for quick jigs vex. The five{' '}\n <TextLink href=\"#\" type=\"internal-underline\">\n boxing wizards\n </TextLink>{' '}\n jump quickly.\n </TextOverflow>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
/*!
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) "Neo4j"
|
|
7
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
-
*
|
|
9
|
-
* This file is part of Neo4j.
|
|
10
|
-
*
|
|
11
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
-
* it under the terms of the GNU General Public License as published by
|
|
13
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
-
* (at your option) any later version.
|
|
15
|
-
*
|
|
16
|
-
* This program is distributed in the hope that it will be useful,
|
|
17
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
-
* GNU General Public License for more details.
|
|
20
|
-
*
|
|
21
|
-
* You should have received a copy of the GNU General Public License
|
|
22
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
-
*/
|
|
24
|
-
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
-
// import { TextOverflow } from '@neo4j-ndl/react';
|
|
26
|
-
const TextOverflow_1 = require("../TextOverflow");
|
|
27
|
-
const Component = () => {
|
|
28
|
-
const longText = 'The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.';
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "n-max-w-52", children: (0, jsx_runtime_1.jsx)(TextOverflow_1.TextOverflow, { children: longText }) }));
|
|
30
|
-
};
|
|
31
|
-
exports.default = Component;
|
|
32
|
-
//# sourceMappingURL=width-based-truncation.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"width-based-truncation.story.js","sourceRoot":"","sources":["../../../../src/text-overflow/stories/width-based-truncation.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,mDAAmD;AACnD,kDAA+C;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,QAAQ,GACZ,uFAAuF,CAAC;IAE1F,OAAO,CACL,gCAAK,SAAS,EAAC,YAAY,YACzB,uBAAC,2BAAY,cAAE,QAAQ,GAAgB,GACnC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\n// import { TextOverflow } from '@neo4j-ndl/react';\nimport { TextOverflow } from '../TextOverflow';\n\nconst Component = () => {\n const longText =\n 'The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.';\n\n return (\n <div className=\"n-max-w-52\">\n <TextOverflow>{longText}</TextOverflow>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.truncateReactNodeByCharacters = exports.getTextContent = void 0;
|
|
7
|
-
/*!
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) "Neo4j"
|
|
10
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
11
|
-
*
|
|
12
|
-
* This file is part of Neo4j.
|
|
13
|
-
*
|
|
14
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
15
|
-
* it under the terms of the GNU General Public License as published by
|
|
16
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
17
|
-
* (at your option) any later version.
|
|
18
|
-
*
|
|
19
|
-
* This program is distributed in the hope that it will be useful,
|
|
20
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
21
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
22
|
-
* GNU General Public License for more details.
|
|
23
|
-
*
|
|
24
|
-
* You should have received a copy of the GNU General Public License
|
|
25
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
26
|
-
*/
|
|
27
|
-
const react_1 = __importDefault(require("react"));
|
|
28
|
-
const constants_1 = require("./constants");
|
|
29
|
-
/**
|
|
30
|
-
* Recursively extracts plain text from React nodes
|
|
31
|
-
*/
|
|
32
|
-
const getTextContent = (node) => {
|
|
33
|
-
if (typeof node === 'string') {
|
|
34
|
-
return node;
|
|
35
|
-
}
|
|
36
|
-
if (typeof node === 'number') {
|
|
37
|
-
return node.toString();
|
|
38
|
-
}
|
|
39
|
-
if (react_1.default.isValidElement(node)) {
|
|
40
|
-
// Type assertion to access props safely
|
|
41
|
-
const element = node;
|
|
42
|
-
return (0, exports.getTextContent)(element.props.children);
|
|
43
|
-
}
|
|
44
|
-
if (Array.isArray(node)) {
|
|
45
|
-
return node.map(exports.getTextContent).join('');
|
|
46
|
-
}
|
|
47
|
-
return '';
|
|
48
|
-
};
|
|
49
|
-
exports.getTextContent = getTextContent;
|
|
50
|
-
/**
|
|
51
|
-
* Truncates React node content by character count while preserving element structure.
|
|
52
|
-
*/
|
|
53
|
-
const truncateReactNodeByCharacters = (node, maxCharacters, shouldAddEllipsis = true) => {
|
|
54
|
-
// Handle the case where node is an array (React children)
|
|
55
|
-
const normalizedNode = Array.isArray(node)
|
|
56
|
-
? react_1.default.createElement(react_1.default.Fragment, null, ...node)
|
|
57
|
-
: node;
|
|
58
|
-
// Get the total character count first to determine if truncation is needed
|
|
59
|
-
const totalLength = (0, exports.getTextContent)(normalizedNode).length;
|
|
60
|
-
if (totalLength <= maxCharacters) {
|
|
61
|
-
return { shouldTruncation: false, truncatedContent: null };
|
|
62
|
-
}
|
|
63
|
-
let charCount = 0;
|
|
64
|
-
let hasReachedLimit = false;
|
|
65
|
-
const truncateNode = (currentNode) => {
|
|
66
|
-
// Stop processing if character limit is reached
|
|
67
|
-
if (hasReachedLimit || charCount >= maxCharacters) {
|
|
68
|
-
hasReachedLimit = true;
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
// Handle arrays of children (mixed content case)
|
|
72
|
-
if (Array.isArray(currentNode)) {
|
|
73
|
-
const truncatedChildren = [];
|
|
74
|
-
for (const child of currentNode) {
|
|
75
|
-
if (hasReachedLimit || charCount >= maxCharacters) {
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
const truncatedChild = truncateNode(child);
|
|
79
|
-
if (truncatedChild !== null) {
|
|
80
|
-
truncatedChildren.push(truncatedChild);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return truncatedChildren.length > 0 ? truncatedChildren : null;
|
|
84
|
-
}
|
|
85
|
-
if (typeof currentNode === 'string') {
|
|
86
|
-
const availableChars = maxCharacters - charCount;
|
|
87
|
-
if (currentNode.length <= availableChars) {
|
|
88
|
-
charCount += currentNode.length;
|
|
89
|
-
return currentNode;
|
|
90
|
-
}
|
|
91
|
-
// Truncate at character limit, preferring word boundaries
|
|
92
|
-
let truncated = currentNode.substring(0, availableChars);
|
|
93
|
-
const lastSpaceIndex = truncated.lastIndexOf(' ');
|
|
94
|
-
if (lastSpaceIndex > availableChars * constants_1.ESTIMATION_FACTORS.WORD_BOUNDARY) {
|
|
95
|
-
truncated = truncated.substring(0, lastSpaceIndex);
|
|
96
|
-
}
|
|
97
|
-
truncated = truncated.trim();
|
|
98
|
-
charCount += truncated.length;
|
|
99
|
-
hasReachedLimit = true;
|
|
100
|
-
return truncated;
|
|
101
|
-
}
|
|
102
|
-
if (typeof currentNode === 'number') {
|
|
103
|
-
const str = currentNode.toString();
|
|
104
|
-
const availableChars = maxCharacters - charCount;
|
|
105
|
-
if (str.length <= availableChars) {
|
|
106
|
-
charCount += str.length;
|
|
107
|
-
return currentNode;
|
|
108
|
-
}
|
|
109
|
-
const truncated = str.substring(0, availableChars);
|
|
110
|
-
charCount += truncated.length;
|
|
111
|
-
hasReachedLimit = true;
|
|
112
|
-
return truncated;
|
|
113
|
-
}
|
|
114
|
-
if (!react_1.default.isValidElement(currentNode)) {
|
|
115
|
-
return currentNode;
|
|
116
|
-
}
|
|
117
|
-
const { children } = currentNode.props;
|
|
118
|
-
if (children === null || children === undefined) {
|
|
119
|
-
return currentNode;
|
|
120
|
-
}
|
|
121
|
-
if (typeof children === 'string') {
|
|
122
|
-
const truncatedChild = truncateNode(children);
|
|
123
|
-
if (truncatedChild === null) {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
return react_1.default.cloneElement(currentNode, {}, truncatedChild);
|
|
127
|
-
}
|
|
128
|
-
if (Array.isArray(children)) {
|
|
129
|
-
const truncatedChildren = [];
|
|
130
|
-
for (const child of children) {
|
|
131
|
-
if (hasReachedLimit || charCount >= maxCharacters) {
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
const truncatedChild = truncateNode(child);
|
|
135
|
-
if (truncatedChild !== null) {
|
|
136
|
-
truncatedChildren.push(truncatedChild);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (truncatedChildren.length === 0) {
|
|
140
|
-
return null;
|
|
141
|
-
}
|
|
142
|
-
return react_1.default.cloneElement(currentNode, {}, ...truncatedChildren);
|
|
143
|
-
}
|
|
144
|
-
// Single React element child
|
|
145
|
-
const truncatedChild = truncateNode(children);
|
|
146
|
-
if (truncatedChild === null) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
return react_1.default.cloneElement(currentNode, {}, truncatedChild);
|
|
150
|
-
};
|
|
151
|
-
const truncatedResult = truncateNode(normalizedNode);
|
|
152
|
-
// Convert array results to proper React elements
|
|
153
|
-
const finalResult = Array.isArray(truncatedResult)
|
|
154
|
-
? react_1.default.createElement(react_1.default.Fragment, null, ...truncatedResult)
|
|
155
|
-
: truncatedResult;
|
|
156
|
-
// Add ellipsis if needed
|
|
157
|
-
if (shouldAddEllipsis && finalResult !== null) {
|
|
158
|
-
const withEllipsis = react_1.default.createElement(react_1.default.Fragment, null, finalResult, constants_1.ELLIPSIS_CHAR);
|
|
159
|
-
return { shouldTruncation: true, truncatedContent: withEllipsis };
|
|
160
|
-
}
|
|
161
|
-
return {
|
|
162
|
-
shouldTruncation: true,
|
|
163
|
-
truncatedContent: finalResult,
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
exports.truncateReactNodeByCharacters = truncateReactNodeByCharacters;
|
|
167
|
-
//# sourceMappingURL=text-overflow-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text-overflow-utils.js","sourceRoot":"","sources":["../../../src/text-overflow/text-overflow-utils.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,kDAA8C;AAE9C,2CAAgE;AAOhE;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,IAAqB,EAAU,EAAE;IAC9D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IACD,IAAI,eAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,wCAAwC;QACxC,MAAM,OAAO,GAAG,IAAoD,CAAC;QACrE,OAAO,IAAA,sBAAc,EAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,sBAAc,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAhBW,QAAA,cAAc,kBAgBzB;AAEF;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAC3C,IAAqB,EACrB,aAAqB,EACrB,iBAAiB,GAAG,IAAI,EACG,EAAE;IAC7B,0DAA0D;IAC1D,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QACxC,CAAC,CAAC,eAAK,CAAC,aAAa,CAAC,eAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACpD,CAA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OAAO,CAAC,eAAe,CAAC;QAChD,CAAC,CAAC,eAAK,CAAC,aAAa,CAAC,eAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,eAAe,CAAC;QAC/D,CAAC,CAAC,eAAe,CAAC;IAEpB,yBAAyB;IACzB,IAAI,iBAAiB,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QAC9C,MAAM,YAAY,GAAG,eAAK,CAAC,aAAa,CACtC,eAAK,CAAC,QAAQ,EACd,IAAI,EACJ,WAAW,EACX,yBAAa,CACd,CAAC;QACF,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACpE,CAAC;IAED,OAAO;QACL,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,WAAW;KAC9B,CAAC;AACJ,CAAC,CAAC;AApJW,QAAA,6BAA6B,iCAoJxC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport React, { type ReactNode } from 'react';\n\nimport { ELLIPSIS_CHAR, ESTIMATION_FACTORS } from './constants';\n\ntype ReactNodeTruncationResult = {\n shouldTruncation: boolean;\n truncatedContent: React.ReactNode | null;\n};\n\n/**\n * Recursively extracts plain text from React nodes\n */\nexport const getTextContent = (node: React.ReactNode): string => {\n if (typeof node === 'string') {\n return node;\n }\n if (typeof node === 'number') {\n return node.toString();\n }\n if (React.isValidElement(node)) {\n // Type assertion to access props safely\n const element = node as React.ReactElement<{ children?: ReactNode }>;\n return getTextContent(element.props.children);\n }\n if (Array.isArray(node)) {\n return node.map(getTextContent).join('');\n }\n return '';\n};\n\n/**\n * Truncates React node content by character count while preserving element structure.\n */\nexport const truncateReactNodeByCharacters = (\n node: React.ReactNode,\n maxCharacters: number,\n shouldAddEllipsis = true,\n): ReactNodeTruncationResult => {\n // Handle the case where node is an array (React children)\n const normalizedNode = Array.isArray(node)\n ? React.createElement(React.Fragment, null, ...node)\n : node;\n\n // Get the total character count first to determine if truncation is needed\n const totalLength = getTextContent(normalizedNode).length;\n\n if (totalLength <= maxCharacters) {\n return { shouldTruncation: false, truncatedContent: null };\n }\n\n let charCount = 0;\n let hasReachedLimit = false;\n\n const truncateNode = (currentNode: React.ReactNode): React.ReactNode => {\n // Stop processing if character limit is reached\n if (hasReachedLimit || charCount >= maxCharacters) {\n hasReachedLimit = true;\n return null;\n }\n\n // Handle arrays of children (mixed content case)\n if (Array.isArray(currentNode)) {\n const truncatedChildren: React.ReactNode[] = [];\n\n for (const child of currentNode) {\n if (hasReachedLimit || charCount >= maxCharacters) {\n break;\n }\n\n const truncatedChild = truncateNode(child);\n if (truncatedChild !== null) {\n truncatedChildren.push(truncatedChild);\n }\n }\n\n return truncatedChildren.length > 0 ? truncatedChildren : null;\n }\n\n if (typeof currentNode === 'string') {\n const availableChars = maxCharacters - charCount;\n\n if (currentNode.length <= availableChars) {\n charCount += currentNode.length;\n return currentNode;\n }\n\n // Truncate at character limit, preferring word boundaries\n let truncated = currentNode.substring(0, availableChars);\n const lastSpaceIndex = truncated.lastIndexOf(' ');\n\n if (lastSpaceIndex > availableChars * ESTIMATION_FACTORS.WORD_BOUNDARY) {\n truncated = truncated.substring(0, lastSpaceIndex);\n }\n\n truncated = truncated.trim();\n charCount += truncated.length;\n hasReachedLimit = true;\n return truncated;\n }\n\n if (typeof currentNode === 'number') {\n const str = currentNode.toString();\n const availableChars = maxCharacters - charCount;\n\n if (str.length <= availableChars) {\n charCount += str.length;\n return currentNode;\n }\n\n const truncated = str.substring(0, availableChars);\n charCount += truncated.length;\n hasReachedLimit = true;\n return truncated;\n }\n\n if (!React.isValidElement(currentNode)) {\n return currentNode;\n }\n\n const { children } = currentNode.props as { children?: ReactNode };\n if (children === null || children === undefined) {\n return currentNode;\n }\n\n if (typeof children === 'string') {\n const truncatedChild = truncateNode(children);\n if (truncatedChild === null) {\n return null;\n }\n return React.cloneElement(currentNode, {}, truncatedChild);\n }\n\n if (Array.isArray(children)) {\n const truncatedChildren: React.ReactNode[] = [];\n for (const child of children) {\n if (hasReachedLimit || charCount >= maxCharacters) {\n break;\n }\n\n const truncatedChild = truncateNode(child);\n if (truncatedChild !== null) {\n truncatedChildren.push(truncatedChild);\n }\n }\n\n if (truncatedChildren.length === 0) {\n return null;\n }\n return React.cloneElement(currentNode, {}, ...truncatedChildren);\n }\n\n // Single React element child\n const truncatedChild = truncateNode(children);\n if (truncatedChild === null) {\n return null;\n }\n return React.cloneElement(currentNode, {}, truncatedChild);\n };\n\n const truncatedResult = truncateNode(normalizedNode);\n\n // Convert array results to proper React elements\n const finalResult = Array.isArray(truncatedResult)\n ? React.createElement(React.Fragment, null, ...truncatedResult)\n : truncatedResult;\n\n // Add ellipsis if needed\n if (shouldAddEllipsis && finalResult !== null) {\n const withEllipsis = React.createElement(\n React.Fragment,\n null,\n finalResult,\n ELLIPSIS_CHAR,\n );\n return { shouldTruncation: true, truncatedContent: withEllipsis };\n }\n\n return {\n shouldTruncation: true,\n truncatedContent: finalResult,\n };\n};\n"]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) "Neo4j"
|
|
5
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
-
*
|
|
7
|
-
* This file is part of Neo4j.
|
|
8
|
-
*
|
|
9
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
-
* it under the terms of the GNU General Public License as published by
|
|
11
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
-
* (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* This program is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU General Public License
|
|
20
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.useEllipsisObserver = useEllipsisObserver;
|
|
24
|
-
const react_1 = require("react");
|
|
25
|
-
const debounce_1 = require("../helpers/debounce");
|
|
26
|
-
function useEllipsisObserver(options = {}) {
|
|
27
|
-
const { lineClamp = 1, debounceMs = 100 } = options;
|
|
28
|
-
const ref = (0, react_1.useRef)(null);
|
|
29
|
-
const [isEllipsized, setIsEllipsized] = (0, react_1.useState)(false);
|
|
30
|
-
(0, react_1.useEffect)(() => {
|
|
31
|
-
const el = ref.current;
|
|
32
|
-
if (!el) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const checkEllipsis = () => {
|
|
36
|
-
let hasEllipsis = false;
|
|
37
|
-
if (lineClamp > 1) {
|
|
38
|
-
// For multi-line ellipsis (line-clamp)
|
|
39
|
-
// Check if scrollHeight is greater than clientHeight
|
|
40
|
-
hasEllipsis = el.scrollHeight > el.clientHeight;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
// For single-line ellipsis (text-overflow: ellipsis)
|
|
44
|
-
// Check if scrollWidth is greater than clientWidth
|
|
45
|
-
hasEllipsis = el.scrollWidth > el.clientWidth;
|
|
46
|
-
}
|
|
47
|
-
setIsEllipsized(hasEllipsis);
|
|
48
|
-
};
|
|
49
|
-
const debouncedCheck = (0, debounce_1.debounce)(checkEllipsis, debounceMs);
|
|
50
|
-
// Initial check
|
|
51
|
-
checkEllipsis();
|
|
52
|
-
const resizeObserver = new ResizeObserver(debouncedCheck);
|
|
53
|
-
resizeObserver.observe(el);
|
|
54
|
-
// Also observe the parent element to catch container size changes
|
|
55
|
-
if (el.parentElement) {
|
|
56
|
-
resizeObserver.observe(el.parentElement);
|
|
57
|
-
}
|
|
58
|
-
window.addEventListener('resize', debouncedCheck);
|
|
59
|
-
return () => {
|
|
60
|
-
resizeObserver.disconnect();
|
|
61
|
-
window.removeEventListener('resize', debouncedCheck);
|
|
62
|
-
};
|
|
63
|
-
}, [lineClamp, debounceMs]);
|
|
64
|
-
return [ref, isEllipsized];
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=use-ellipsis-observer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-ellipsis-observer.js","sourceRoot":"","sources":["../../../src/text-overflow/use-ellipsis-observer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;AAWH,kDAmDC;AA5DD,iCAAoE;AAEpE,kDAA+C;AAO/C,SAAgB,mBAAmB,CACjC,UAAsC,EAAE;IAExC,MAAM,EAAE,SAAS,GAAG,CAAC,EAAE,UAAU,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC;IACpD,MAAM,GAAG,GAAG,IAAA,cAAM,EAAW,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAExD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO;QACT,CAAC;QAED,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,WAAW,GAAG,KAAK,CAAC;YAExB,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;gBAClB,uCAAuC;gBACvC,qDAAqD;gBACrD,WAAW,GAAG,EAAE,CAAC,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACN,qDAAqD;gBACrD,mDAAmD;gBACnD,WAAW,GAAG,EAAE,CAAC,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;YAChD,CAAC;YAED,eAAe,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC,CAAC;QAEF,MAAM,cAAc,GAAG,IAAA,mBAAQ,EAAC,aAAa,EAAE,UAAU,CAAC,CAAC;QAE3D,gBAAgB;QAChB,aAAa,EAAE,CAAC;QAEhB,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,cAAc,CAAC,CAAC;QAC1D,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAE3B,kEAAkE;QAClE,IAAI,EAAE,CAAC,aAAa,EAAE,CAAC;YACrB,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAElD,OAAO,GAAG,EAAE;YACV,cAAc,CAAC,UAAU,EAAE,CAAC;YAC5B,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QACvD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAE5B,OAAO,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type RefObject, useEffect, useRef, useState } from 'react';\n\nimport { debounce } from '../helpers/debounce';\n\ninterface UseEllipsisObserverOptions {\n lineClamp?: number;\n debounceMs?: number;\n}\n\nexport function useEllipsisObserver<T extends Element = Element>(\n options: UseEllipsisObserverOptions = {},\n): [RefObject<T | null>, boolean] {\n const { lineClamp = 1, debounceMs = 100 } = options;\n const ref = useRef<T | null>(null);\n const [isEllipsized, setIsEllipsized] = useState(false);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) {\n return;\n }\n\n const checkEllipsis = () => {\n let hasEllipsis = false;\n\n if (lineClamp > 1) {\n // For multi-line ellipsis (line-clamp)\n // Check if scrollHeight is greater than clientHeight\n hasEllipsis = el.scrollHeight > el.clientHeight;\n } else {\n // For single-line ellipsis (text-overflow: ellipsis)\n // Check if scrollWidth is greater than clientWidth\n hasEllipsis = el.scrollWidth > el.clientWidth;\n }\n\n setIsEllipsized(hasEllipsis);\n };\n\n const debouncedCheck = debounce(checkEllipsis, debounceMs);\n\n // Initial check\n checkEllipsis();\n\n const resizeObserver = new ResizeObserver(debouncedCheck);\n resizeObserver.observe(el);\n\n // Also observe the parent element to catch container size changes\n if (el.parentElement) {\n resizeObserver.observe(el.parentElement);\n }\n\n window.addEventListener('resize', debouncedCheck);\n\n return () => {\n resizeObserver.disconnect();\n window.removeEventListener('resize', debouncedCheck);\n };\n }, [lineClamp, debounceMs]);\n\n return [ref, isEllipsized];\n}\n"]}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) "Neo4j"
|
|
5
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
-
*
|
|
7
|
-
* This file is part of Neo4j.
|
|
8
|
-
*
|
|
9
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
-
* it under the terms of the GNU General Public License as published by
|
|
11
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
-
* (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* This program is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU General Public License
|
|
20
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.useTruncateWithButton = useTruncateWithButton;
|
|
24
|
-
const base_1 = require("@neo4j-ndl/base");
|
|
25
|
-
const react_1 = require("react");
|
|
26
|
-
const hooks_1 = require("../hooks");
|
|
27
|
-
const text_overflow_utils_1 = require("./text-overflow-utils");
|
|
28
|
-
// Cache for computed styles to avoid repeated getComputedStyle calls
|
|
29
|
-
const styleCache = new WeakMap();
|
|
30
|
-
// Helper function to copy relevant styles for measurement
|
|
31
|
-
const copyStylesForMeasurement = (measureElement, sourceElement) => {
|
|
32
|
-
// Use cached styles if available
|
|
33
|
-
let sourceStyles = styleCache.get(sourceElement);
|
|
34
|
-
if (sourceStyles === undefined) {
|
|
35
|
-
sourceStyles = window.getComputedStyle(sourceElement);
|
|
36
|
-
styleCache.set(sourceElement, sourceStyles);
|
|
37
|
-
}
|
|
38
|
-
measureElement.style.position = 'absolute';
|
|
39
|
-
measureElement.style.visibility = 'hidden';
|
|
40
|
-
measureElement.style.top = '-9999px';
|
|
41
|
-
measureElement.style.left = '-9999px';
|
|
42
|
-
measureElement.style.width = sourceStyles.width;
|
|
43
|
-
measureElement.style.fontFamily = sourceStyles.fontFamily;
|
|
44
|
-
measureElement.style.fontSize = sourceStyles.fontSize;
|
|
45
|
-
measureElement.style.fontWeight = sourceStyles.fontWeight;
|
|
46
|
-
measureElement.style.lineHeight = sourceStyles.lineHeight;
|
|
47
|
-
measureElement.style.letterSpacing = sourceStyles.letterSpacing;
|
|
48
|
-
measureElement.style.wordSpacing = sourceStyles.wordSpacing;
|
|
49
|
-
measureElement.style.overflow = 'hidden';
|
|
50
|
-
measureElement.style.wordBreak = 'break-word';
|
|
51
|
-
};
|
|
52
|
-
// Helper function to find the optimal truncation point using optimized binary search
|
|
53
|
-
const findTruncationPoint = (content, allText, measureElement, maxHeight, button, buttonType) => {
|
|
54
|
-
let low = 0;
|
|
55
|
-
let high = allText.length;
|
|
56
|
-
let bestFitContent = null;
|
|
57
|
-
// Pre-calculate button text to avoid repeated string operations
|
|
58
|
-
const buttonText = typeof button === 'string' ? button : 'View more';
|
|
59
|
-
const buttonMargin = buttonType !== 'ellipsis' ? base_1.tokens.space[4] : '0';
|
|
60
|
-
// Create reusable DOM elements to avoid repeated creation
|
|
61
|
-
const tempSpan = document.createElement('span');
|
|
62
|
-
const btnSpan = document.createElement('span');
|
|
63
|
-
btnSpan.style.display = 'inline-block';
|
|
64
|
-
btnSpan.style.marginLeft = buttonMargin;
|
|
65
|
-
while (low <= high) {
|
|
66
|
-
const mid = Math.floor((low + high) / 2);
|
|
67
|
-
const testText = allText.slice(0, mid);
|
|
68
|
-
measureElement.innerHTML = '';
|
|
69
|
-
// Reuse span elements
|
|
70
|
-
tempSpan.textContent =
|
|
71
|
-
buttonType === 'ellipsis' ? testText : `${testText}\u2026`;
|
|
72
|
-
measureElement.appendChild(tempSpan);
|
|
73
|
-
btnSpan.textContent = buttonText;
|
|
74
|
-
measureElement.appendChild(btnSpan);
|
|
75
|
-
if (measureElement.scrollHeight <= maxHeight) {
|
|
76
|
-
bestFitContent = (0, text_overflow_utils_1.truncateReactNodeByCharacters)(content, mid, buttonType !== 'ellipsis').truncatedContent;
|
|
77
|
-
low = mid + 1;
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
high = mid - 1;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return bestFitContent;
|
|
84
|
-
};
|
|
85
|
-
function useTruncateWithButton({ content, lineClamp, button, onExpandedToggle, maxCharacters, buttonType, closeTooltip, isDisabled, }) {
|
|
86
|
-
const containerRef = (0, react_1.useRef)(null);
|
|
87
|
-
const measureRef = (0, react_1.useRef)(null);
|
|
88
|
-
const [isExpanded, setIsExpanded] = (0, react_1.useState)(false);
|
|
89
|
-
const [isTruncated, setIsTruncated] = (0, react_1.useState)(false);
|
|
90
|
-
const [truncatedContent, setTruncatedContent] = (0, react_1.useState)(content);
|
|
91
|
-
// Memoize text content to avoid repeated traversals
|
|
92
|
-
const textContent = (0, react_1.useMemo)(() => (0, text_overflow_utils_1.getTextContent)(content), [content]);
|
|
93
|
-
const toggleExpand = (0, react_1.useCallback)(() => {
|
|
94
|
-
if (isDisabled === true) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const shouldExpand = !isExpanded;
|
|
98
|
-
setIsExpanded(shouldExpand);
|
|
99
|
-
if (shouldExpand) {
|
|
100
|
-
onExpandedToggle === null || onExpandedToggle === void 0 ? void 0 : onExpandedToggle(true);
|
|
101
|
-
closeTooltip === null || closeTooltip === void 0 ? void 0 : closeTooltip();
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
onExpandedToggle === null || onExpandedToggle === void 0 ? void 0 : onExpandedToggle(false);
|
|
105
|
-
}
|
|
106
|
-
}, [isExpanded, onExpandedToggle, closeTooltip, isDisabled]);
|
|
107
|
-
const recalculateTruncation = (0, react_1.useCallback)(() => {
|
|
108
|
-
// If disabled, don't perform any calculations
|
|
109
|
-
if (isDisabled === true) {
|
|
110
|
-
setIsTruncated(false);
|
|
111
|
-
setTruncatedContent(content);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
// Character-based truncation takes precedence
|
|
115
|
-
if (typeof maxCharacters === 'number') {
|
|
116
|
-
const result = (0, text_overflow_utils_1.truncateReactNodeByCharacters)(content, maxCharacters);
|
|
117
|
-
setIsTruncated(result.shouldTruncation);
|
|
118
|
-
setTruncatedContent(result.shouldTruncation ? result.truncatedContent : content);
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
// Fallback to line-based truncation
|
|
122
|
-
if (!measureRef.current || !containerRef.current) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const measure = measureRef.current;
|
|
126
|
-
const container = containerRef.current;
|
|
127
|
-
copyStylesForMeasurement(measure, container);
|
|
128
|
-
const containerStyles = window.getComputedStyle(container);
|
|
129
|
-
const lineHeight = parseFloat(containerStyles.lineHeight);
|
|
130
|
-
const maxHeight = lineHeight * lineClamp;
|
|
131
|
-
const allText = textContent;
|
|
132
|
-
// Early exit if no text content
|
|
133
|
-
if (allText.length === 0) {
|
|
134
|
-
setIsTruncated(false);
|
|
135
|
-
setTruncatedContent(content);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
// First, check if truncation is needed at all
|
|
139
|
-
measure.innerHTML = '';
|
|
140
|
-
const fullTextSpan = document.createElement('span');
|
|
141
|
-
fullTextSpan.textContent = allText;
|
|
142
|
-
measure.appendChild(fullTextSpan);
|
|
143
|
-
const isTruncationNeeded = measure.scrollHeight > maxHeight;
|
|
144
|
-
if (!isTruncationNeeded) {
|
|
145
|
-
setIsTruncated(false);
|
|
146
|
-
setTruncatedContent(content);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
// Binary search for truncation point
|
|
150
|
-
const bestFitContent = findTruncationPoint(content, allText, measure, maxHeight, button, buttonType);
|
|
151
|
-
setIsTruncated(true);
|
|
152
|
-
setTruncatedContent(bestFitContent);
|
|
153
|
-
}, [
|
|
154
|
-
content,
|
|
155
|
-
button,
|
|
156
|
-
lineClamp,
|
|
157
|
-
maxCharacters,
|
|
158
|
-
buttonType,
|
|
159
|
-
isDisabled,
|
|
160
|
-
textContent,
|
|
161
|
-
]);
|
|
162
|
-
// Create debounced version of recalculateTruncation for resize events
|
|
163
|
-
const debouncedRecalculateTruncation = (0, hooks_1.useDebounceCallback)(recalculateTruncation, 100);
|
|
164
|
-
// Initial calculation and resize handling
|
|
165
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
166
|
-
// If disabled, don't set up any observers or event listeners
|
|
167
|
-
if (isDisabled === true) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
recalculateTruncation();
|
|
171
|
-
// Set up resize observer for container size changes
|
|
172
|
-
const container = containerRef.current;
|
|
173
|
-
if (!container) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
177
|
-
debouncedRecalculateTruncation();
|
|
178
|
-
});
|
|
179
|
-
resizeObserver.observe(container);
|
|
180
|
-
// Also observe parent element to catch container size changes
|
|
181
|
-
if (container.parentElement) {
|
|
182
|
-
resizeObserver.observe(container.parentElement);
|
|
183
|
-
}
|
|
184
|
-
// Handle window resize events
|
|
185
|
-
const handleWindowResize = () => {
|
|
186
|
-
debouncedRecalculateTruncation();
|
|
187
|
-
};
|
|
188
|
-
window.addEventListener('resize', handleWindowResize);
|
|
189
|
-
return () => {
|
|
190
|
-
resizeObserver.disconnect();
|
|
191
|
-
window.removeEventListener('resize', handleWindowResize);
|
|
192
|
-
};
|
|
193
|
-
}, [recalculateTruncation, debouncedRecalculateTruncation, isDisabled]);
|
|
194
|
-
// Compute the final content to render based on expanded state
|
|
195
|
-
const contentToRender = isExpanded ? content : truncatedContent;
|
|
196
|
-
return {
|
|
197
|
-
containerRef,
|
|
198
|
-
contentToRender,
|
|
199
|
-
isExpanded,
|
|
200
|
-
isTruncated,
|
|
201
|
-
measureRef,
|
|
202
|
-
toggleExpand,
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
//# sourceMappingURL=use-truncate-with-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-truncate-with-button.js","sourceRoot":"","sources":["../../../src/text-overflow/use-truncate-with-button.tsx"],"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"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport {\n type ReactNode,\n useCallback,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useDebounceCallback } from '../hooks';\nimport {\n getTextContent,\n truncateReactNodeByCharacters,\n} from './text-overflow-utils';\n\n// Cache for computed styles to avoid repeated getComputedStyle calls\nconst styleCache = new WeakMap<HTMLElement, CSSStyleDeclaration>();\n\n// Helper function to copy relevant styles for measurement\nconst copyStylesForMeasurement = (\n measureElement: HTMLElement,\n sourceElement: HTMLElement,\n) => {\n // Use cached styles if available\n let sourceStyles = styleCache.get(sourceElement);\n if (sourceStyles === undefined) {\n sourceStyles = window.getComputedStyle(sourceElement);\n styleCache.set(sourceElement, sourceStyles);\n }\n\n measureElement.style.position = 'absolute';\n measureElement.style.visibility = 'hidden';\n measureElement.style.top = '-9999px';\n measureElement.style.left = '-9999px';\n measureElement.style.width = sourceStyles.width;\n measureElement.style.fontFamily = sourceStyles.fontFamily;\n measureElement.style.fontSize = sourceStyles.fontSize;\n measureElement.style.fontWeight = sourceStyles.fontWeight;\n measureElement.style.lineHeight = sourceStyles.lineHeight;\n measureElement.style.letterSpacing = sourceStyles.letterSpacing;\n measureElement.style.wordSpacing = sourceStyles.wordSpacing;\n measureElement.style.overflow = 'hidden';\n measureElement.style.wordBreak = 'break-word';\n};\n\n// Helper function to find the optimal truncation point using optimized binary search\nconst findTruncationPoint = (\n content: ReactNode,\n allText: string,\n measureElement: HTMLElement,\n maxHeight: number,\n button: ReactNode,\n buttonType?: 'view-more' | 'ellipsis',\n) => {\n let low = 0;\n let high = allText.length;\n let bestFitContent: ReactNode = null;\n\n // Pre-calculate button text to avoid repeated string operations\n const buttonText = typeof button === 'string' ? button : 'View more';\n const buttonMargin = buttonType !== 'ellipsis' ? tokens.space[4] : '0';\n\n // Create reusable DOM elements to avoid repeated creation\n const tempSpan = document.createElement('span');\n const btnSpan = document.createElement('span');\n btnSpan.style.display = 'inline-block';\n btnSpan.style.marginLeft = buttonMargin;\n\n while (low <= high) {\n const mid = Math.floor((low + high) / 2);\n const testText = allText.slice(0, mid);\n\n measureElement.innerHTML = '';\n\n // Reuse span elements\n tempSpan.textContent =\n buttonType === 'ellipsis' ? testText : `${testText}\\u2026`;\n measureElement.appendChild(tempSpan);\n\n btnSpan.textContent = buttonText;\n measureElement.appendChild(btnSpan);\n\n if (measureElement.scrollHeight <= maxHeight) {\n bestFitContent = truncateReactNodeByCharacters(\n content,\n mid,\n buttonType !== 'ellipsis',\n ).truncatedContent;\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n return bestFitContent;\n};\n\ninterface UseTruncateOptions {\n button: ReactNode;\n content: ReactNode;\n lineClamp: number;\n onExpandedToggle?: (isExpanded: boolean) => void;\n maxCharacters?: number;\n buttonType?: 'view-more' | 'ellipsis';\n closeTooltip?: () => void;\n /**\n * When true, skips all expensive DOM calculations and measurements.\n * Useful for performance optimization when the hook functionality isn't needed.\n */\n isDisabled?: boolean;\n}\n\nexport function useTruncateWithButton({\n content,\n lineClamp,\n button,\n onExpandedToggle,\n maxCharacters,\n buttonType,\n closeTooltip,\n isDisabled,\n}: UseTruncateOptions) {\n const containerRef = useRef<HTMLDivElement>(null);\n const measureRef = useRef<HTMLDivElement>(null);\n\n const [isExpanded, setIsExpanded] = useState(false);\n const [isTruncated, setIsTruncated] = useState(false);\n const [truncatedContent, setTruncatedContent] = useState<ReactNode>(content);\n\n // Memoize text content to avoid repeated traversals\n const textContent = useMemo(() => getTextContent(content), [content]);\n\n const toggleExpand = useCallback(() => {\n if (isDisabled === true) {\n return;\n }\n\n const shouldExpand = !isExpanded;\n setIsExpanded(shouldExpand);\n\n if (shouldExpand) {\n onExpandedToggle?.(true);\n closeTooltip?.();\n } else {\n onExpandedToggle?.(false);\n }\n }, [isExpanded, onExpandedToggle, closeTooltip, isDisabled]);\n\n const recalculateTruncation = useCallback(() => {\n // If disabled, don't perform any calculations\n if (isDisabled === true) {\n setIsTruncated(false);\n setTruncatedContent(content);\n return;\n }\n\n // Character-based truncation takes precedence\n if (typeof maxCharacters === 'number') {\n const result = truncateReactNodeByCharacters(content, maxCharacters);\n setIsTruncated(result.shouldTruncation);\n setTruncatedContent(\n result.shouldTruncation ? result.truncatedContent : content,\n );\n return;\n }\n\n // Fallback to line-based truncation\n if (!measureRef.current || !containerRef.current) {\n return;\n }\n\n const measure = measureRef.current;\n const container = containerRef.current;\n\n copyStylesForMeasurement(measure, container);\n const containerStyles = window.getComputedStyle(container);\n const lineHeight = parseFloat(containerStyles.lineHeight);\n const maxHeight = lineHeight * lineClamp;\n\n const allText = textContent;\n\n // Early exit if no text content\n if (allText.length === 0) {\n setIsTruncated(false);\n setTruncatedContent(content);\n return;\n }\n\n // First, check if truncation is needed at all\n measure.innerHTML = '';\n const fullTextSpan = document.createElement('span');\n fullTextSpan.textContent = allText;\n measure.appendChild(fullTextSpan);\n\n const isTruncationNeeded = measure.scrollHeight > maxHeight;\n\n if (!isTruncationNeeded) {\n setIsTruncated(false);\n setTruncatedContent(content);\n return;\n }\n\n // Binary search for truncation point\n const bestFitContent = findTruncationPoint(\n content,\n allText,\n measure,\n maxHeight,\n button,\n buttonType,\n );\n\n setIsTruncated(true);\n setTruncatedContent(bestFitContent);\n }, [\n content,\n button,\n lineClamp,\n maxCharacters,\n buttonType,\n isDisabled,\n textContent,\n ]);\n\n // Create debounced version of recalculateTruncation for resize events\n const debouncedRecalculateTruncation = useDebounceCallback(\n recalculateTruncation,\n 100,\n );\n\n // Initial calculation and resize handling\n useLayoutEffect(() => {\n // If disabled, don't set up any observers or event listeners\n if (isDisabled === true) {\n return;\n }\n\n recalculateTruncation();\n\n // Set up resize observer for container size changes\n const container = containerRef.current;\n if (!container) {\n return;\n }\n\n const resizeObserver = new ResizeObserver(() => {\n debouncedRecalculateTruncation();\n });\n\n resizeObserver.observe(container);\n\n // Also observe parent element to catch container size changes\n if (container.parentElement) {\n resizeObserver.observe(container.parentElement);\n }\n\n // Handle window resize events\n const handleWindowResize = () => {\n debouncedRecalculateTruncation();\n };\n\n window.addEventListener('resize', handleWindowResize);\n\n return () => {\n resizeObserver.disconnect();\n window.removeEventListener('resize', handleWindowResize);\n };\n }, [recalculateTruncation, debouncedRecalculateTruncation, isDisabled]);\n\n // Compute the final content to render based on expanded state\n const contentToRender = isExpanded ? content : truncatedContent;\n\n return {\n containerRef,\n contentToRender,\n isExpanded,\n isTruncated,\n measureRef,\n toggleExpand,\n };\n}\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/*!
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) "Neo4j"
|
|
5
|
-
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
-
*
|
|
7
|
-
* This file is part of Neo4j.
|
|
8
|
-
*
|
|
9
|
-
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
-
* it under the terms of the GNU General Public License as published by
|
|
11
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
-
* (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* This program is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU General Public License
|
|
20
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*/
|
|
22
|
-
// THIS FILE IS GENERATED BY BUILD TOOL
|
|
23
|
-
// DO NOT EDIT IT MANUAL
|
|
24
|
-
import { wrapIcon } from '../../wrapIcon';
|
|
25
|
-
const SvgAddNodeBase = (props) => (_jsx("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("path", { d: "M15.9275 18.1774H20.4275M18.1775 15.9274V20.4274M17.7605 13.3024C18.3124 11.7395 18.3167 10.0353 17.7726 8.46965C17.2285 6.90396 16.1684 5.56971 14.7662 4.68584C13.364 3.80197 11.7029 3.42097 10.0557 3.60538C8.40845 3.78979 6.87281 4.52864 5.70075 5.70069C4.5287 6.87275 3.78985 8.40839 3.60544 10.0556C3.42104 11.7029 3.80203 13.3639 4.6859 14.7661C5.56977 16.1683 6.90402 17.2284 8.46971 17.7725C10.0354 18.3166 11.7395 18.3124 13.3025 17.7604", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) })));
|
|
26
|
-
/** @deprecated Use `NodeAddIcon` instead. */
|
|
27
|
-
const SvgAddNode = wrapIcon(SvgAddNodeBase);
|
|
28
|
-
export default SvgAddNode;
|
|
29
|
-
//# sourceMappingURL=AddNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AddNode.js","sourceRoot":"","sources":["../../../../../src/icons/generated/custom/AddNode.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,uCAAuC;AACvC,wBAAwB;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,cAAc,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACzD,4BACE,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,IAC9B,KAAK,cAET,eACE,CAAC,EAAC,+bAA+b,EACjc,MAAM,EAAC,cAAc,EACrB,WAAW,EAAE,GAAG,EAChB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,IACE,CACP,CAAC;AACF,6CAA6C;AAC7C,MAAM,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC5C,eAAe,UAAU,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n// THIS FILE IS GENERATED BY BUILD TOOL\n// DO NOT EDIT IT MANUAL\nimport { wrapIcon } from '../../wrapIcon';\nimport { SVGProps } from 'react';\nconst SvgAddNodeBase = (props: SVGProps<SVGSVGElement>) => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n d=\"M15.9275 18.1774H20.4275M18.1775 15.9274V20.4274M17.7605 13.3024C18.3124 11.7395 18.3167 10.0353 17.7726 8.46965C17.2285 6.90396 16.1684 5.56971 14.7662 4.68584C13.364 3.80197 11.7029 3.42097 10.0557 3.60538C8.40845 3.78979 6.87281 4.52864 5.70075 5.70069C4.5287 6.87275 3.78985 8.40839 3.60544 10.0556C3.42104 11.7029 3.80203 13.3639 4.6859 14.7661C5.56977 16.1683 6.90402 17.2284 8.46971 17.7725C10.0354 18.3166 11.7395 18.3124 13.3025 17.7604\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n/** @deprecated Use `NodeAddIcon` instead. */\nconst SvgAddNode = wrapIcon(SvgAddNodeBase);\nexport default SvgAddNode;\n"]}
|