@neo4j-ndl/react 4.9.17 → 4.9.19
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/_common/ButtonSpinner.js +53 -0
- package/lib/cjs/_common/ButtonSpinner.js.map +1 -0
- package/lib/cjs/_common/readme-docs-page.js +55 -0
- package/lib/cjs/_common/readme-docs-page.js.map +1 -0
- package/lib/cjs/button/ButtonBase.js +5 -3
- package/lib/cjs/button/ButtonBase.js.map +1 -1
- package/lib/cjs/button/stories/button-loading.story.js +1 -1
- package/lib/cjs/button/stories/button-loading.story.js.map +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
- package/lib/cjs/clean-icon-button/stories/clean-icon-button-loading.story.js.map +1 -1
- package/lib/cjs/color-picker/ColorPicker.js +1 -1
- package/lib/cjs/color-picker/ColorPicker.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 +1 -1
- 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/drawer/Drawer.js +144 -31
- package/lib/cjs/drawer/Drawer.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-full.story.js +3 -1
- package/lib/cjs/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js +2 -4
- package/lib/cjs/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-overlay.story.js +5 -3
- package/lib/cjs/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-portaled.story.js +8 -7
- package/lib/cjs/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-push.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-resizable.story.js +5 -3
- package/lib/cjs/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-right-side.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js +4 -2
- package/lib/cjs/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/cjs/dropdown-button/DropdownButton.js +18 -4
- package/lib/cjs/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js +30 -0
- package/lib/cjs/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
- package/lib/cjs/dropdown-button/stories/index.js +5 -1
- package/lib/cjs/dropdown-button/stories/index.js.map +1 -1
- package/lib/cjs/icon-button/stories/icon-button-loading.story.js +1 -1
- package/lib/cjs/icon-button/stories/icon-button-loading.story.js.map +1 -1
- package/lib/cjs/icon-button-base/IconButtonBase.js +7 -3
- package/lib/cjs/icon-button-base/IconButtonBase.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-default.story.js +2 -2
- package/lib/cjs/menu/stories/menu-default.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-in-popover.story.js +1 -1
- package/lib/cjs/menu/stories/menu-in-popover.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-placements.story.js +2 -2
- package/lib/cjs/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js +2 -2
- package/lib/cjs/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-radio-items.story.js +2 -2
- package/lib/cjs/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-divider.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/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
- package/lib/cjs/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/cjs/select/Overrides.js +17 -2
- package/lib/cjs/select/Overrides.js.map +1 -1
- package/lib/cjs/select/Select.js +10 -5
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/select/types.js.map +1 -1
- package/lib/cjs/select-icon-button/SelectIconButton.js +16 -5
- package/lib/cjs/select-icon-button/SelectIconButton.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/text-area/TextArea.js +1 -1
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js +1 -1
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-clearable.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-clearable.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-default.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-default.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-disabled.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-disabled.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-email.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-email.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-error.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-error.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-full.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-full.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-information-icon.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-information-icon.story.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-loading.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-loading.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-number.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-number.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-password.story.js +1 -0
- package/lib/cjs/text-input/stories/text-input-password.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-readonly.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-readonly.story.js.map +1 -1
- package/lib/cjs/text-input/stories/text-input-required.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-required.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-input/stories/text-input-with-icons.story.js +1 -1
- package/lib/cjs/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/cjs/time-picker/TimePicker.js +5 -4
- package/lib/cjs/time-picker/TimePicker.js.map +1 -1
- package/lib/cjs/time-picker/stories/index.js +5 -1
- package/lib/cjs/time-picker/stories/index.js.map +1 -1
- package/lib/cjs/time-picker/stories/time-picker-default.story.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker-default.story.js.map +1 -1
- package/lib/cjs/time-picker/stories/time-picker-error.story.js +32 -0
- package/lib/cjs/time-picker/stories/time-picker-error.story.js.map +1 -0
- package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js +1 -1
- package/lib/cjs/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +5 -4
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/index.js +5 -1
- package/lib/cjs/timezone-picker/stories/index.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js +35 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-fluid.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-sizes.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
- package/lib/cjs/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
- package/lib/esm/_common/ButtonSpinner.js +46 -0
- package/lib/esm/_common/ButtonSpinner.js.map +1 -0
- package/lib/esm/_common/readme-docs-page.js +52 -0
- package/lib/esm/_common/readme-docs-page.js.map +1 -0
- package/lib/esm/button/ButtonBase.js +5 -3
- package/lib/esm/button/ButtonBase.js.map +1 -1
- package/lib/esm/button/stories/button-loading.story.js +1 -1
- package/lib/esm/button/stories/button-loading.story.js.map +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.js +1 -1
- package/lib/esm/clean-icon-button/stories/clean-icon-button-loading.story.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +1 -1
- package/lib/esm/color-picker/ColorPicker.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 +1 -1
- 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/drawer/Drawer.js +146 -33
- package/lib/esm/drawer/Drawer.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-full.story.js +3 -1
- package/lib/esm/drawer/stories/drawer-full.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js +3 -5
- package/lib/esm/drawer/stories/drawer-not-closeable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-overlay.story.js +5 -3
- package/lib/esm/drawer/stories/drawer-overlay.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-portaled.story.js +10 -9
- package/lib/esm/drawer/stories/drawer-portaled.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-push.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-push.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-resizable.story.js +5 -3
- package/lib/esm/drawer/stories/drawer-resizable.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-right-side.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-right-side.story.js.map +1 -1
- package/lib/esm/drawer/stories/drawer-scrollable.story.js +4 -2
- package/lib/esm/drawer/stories/drawer-scrollable.story.js.map +1 -1
- package/lib/esm/dropdown-button/DropdownButton.js +18 -4
- package/lib/esm/dropdown-button/DropdownButton.js.map +1 -1
- package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js +28 -0
- package/lib/esm/dropdown-button/stories/dropdown-button-loading.story.js.map +1 -0
- package/lib/esm/dropdown-button/stories/index.js +3 -0
- package/lib/esm/dropdown-button/stories/index.js.map +1 -1
- package/lib/esm/icon-button/stories/icon-button-loading.story.js +1 -1
- package/lib/esm/icon-button/stories/icon-button-loading.story.js.map +1 -1
- package/lib/esm/icon-button-base/IconButtonBase.js +7 -3
- package/lib/esm/icon-button-base/IconButtonBase.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-default.story.js +2 -2
- package/lib/esm/menu/stories/menu-default.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-in-popover.story.js +1 -1
- package/lib/esm/menu/stories/menu-in-popover.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-placements.story.js +2 -2
- package/lib/esm/menu/stories/menu-placements.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js +2 -2
- package/lib/esm/menu/stories/menu-radio-and-normal.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-radio-items.story.js +2 -2
- package/lib/esm/menu/stories/menu-radio-items.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-category.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-disabled-item.story.js.map +1 -1
- package/lib/esm/menu/stories/menu-with-divider.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-divider.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/menu/stories/menu-with-keyboard-shortcuts.story.js +1 -1
- package/lib/esm/menu/stories/menu-with-keyboard-shortcuts.story.js.map +1 -1
- package/lib/esm/select/Overrides.js +17 -2
- package/lib/esm/select/Overrides.js.map +1 -1
- package/lib/esm/select/Select.js +10 -5
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/select/types.js.map +1 -1
- package/lib/esm/select-icon-button/SelectIconButton.js +16 -5
- package/lib/esm/select-icon-button/SelectIconButton.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/text-area/TextArea.js +1 -1
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-input/TextInput.js +1 -1
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-clearable.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-clearable.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-default.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-default.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-disabled.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-disabled.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-email.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-email.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-error.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-error.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-full.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-full.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-information-icon.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-information-icon.story.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-loading.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-loading.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-number.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-number.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-password.story.js +1 -0
- package/lib/esm/text-input/stories/text-input-password.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-readonly.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-readonly.story.js.map +1 -1
- package/lib/esm/text-input/stories/text-input-required.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-required.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-input/stories/text-input-with-icons.story.js +1 -1
- package/lib/esm/text-input/stories/text-input-with-icons.story.js.map +1 -1
- package/lib/esm/time-picker/TimePicker.js +6 -5
- package/lib/esm/time-picker/TimePicker.js.map +1 -1
- package/lib/esm/time-picker/stories/index.js +3 -0
- package/lib/esm/time-picker/stories/index.js.map +1 -1
- package/lib/esm/time-picker/stories/time-picker-default.story.js +1 -1
- package/lib/esm/time-picker/stories/time-picker-default.story.js.map +1 -1
- package/lib/esm/time-picker/stories/time-picker-error.story.js +30 -0
- package/lib/esm/time-picker/stories/time-picker-error.story.js.map +1 -0
- package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js +1 -1
- package/lib/esm/time-picker/stories/time-picker-in-dialog.story.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/timezone-picker/stories/index.js +3 -0
- package/lib/esm/timezone-picker/stories/index.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-both-mode.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-default.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-disabled.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-dst-aware.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js +33 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-error.story.js.map +1 -0
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-fluid.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-sizes.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-sizes.story.js.map +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js +1 -1
- package/lib/esm/timezone-picker/stories/timezone-picker-utc-only.story.js.map +1 -1
- package/lib/types/_common/ButtonSpinner.d.ts +29 -0
- package/lib/types/_common/ButtonSpinner.d.ts.map +1 -0
- package/lib/types/_common/readme-docs-page.d.ts +23 -0
- package/lib/types/_common/readme-docs-page.d.ts.map +1 -0
- package/lib/types/button/ButtonBase.d.ts +3 -1
- package/lib/types/button/ButtonBase.d.ts.map +1 -1
- package/lib/types/button/stories/button-loading.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-danger.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-default.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-image.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-info.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-top-aligned.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-variants.story.d.ts.map +1 -1
- package/lib/types/dialog/stories/dialog-warning.story.d.ts.map +1 -1
- package/lib/types/drawer/Drawer.d.ts +32 -7
- package/lib/types/drawer/Drawer.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-full.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-not-closeable.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-overlay.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-portaled.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-push.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-resizable.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-right-side.story.d.ts.map +1 -1
- package/lib/types/drawer/stories/drawer-scrollable.story.d.ts.map +1 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts +5 -1
- package/lib/types/dropdown-button/DropdownButton.d.ts.map +1 -1
- package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts +24 -0
- package/lib/types/dropdown-button/stories/dropdown-button-loading.story.d.ts.map +1 -0
- package/lib/types/dropdown-button/stories/index.d.ts +2 -0
- package/lib/types/dropdown-button/stories/index.d.ts.map +1 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts +3 -1
- package/lib/types/icon-button-base/IconButtonBase.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-custom-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-default.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-dialog.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-in-popover.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-nested.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-placements.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-radio-and-normal.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-radio-items.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-category.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-disabled-item.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-divider.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-icon.story.d.ts.map +1 -1
- package/lib/types/menu/stories/menu-with-keyboard-shortcuts.story.d.ts.map +1 -1
- package/lib/types/select/Overrides.d.ts +1 -1
- package/lib/types/select/Overrides.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/select/types.d.ts +4 -1
- package/lib/types/select/types.d.ts.map +1 -1
- package/lib/types/select-icon-button/SelectIconButton.d.ts +3 -1
- package/lib/types/select-icon-button/SelectIconButton.d.ts.map +1 -1
- package/lib/types/select-icon-button/stories/select-icon-button-states.story.d.ts.map +1 -1
- package/lib/types/text-area/TextArea.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-clearable.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-default.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-disabled.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-email.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-error.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-full.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-information-icon.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-loading-spinner.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-loading.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-number.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-optional.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-password.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-readonly.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-required.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-sizes.story.d.ts.map +1 -1
- package/lib/types/text-input/stories/text-input-with-icons.story.d.ts.map +1 -1
- package/lib/types/time-picker/TimePicker.d.ts.map +1 -1
- package/lib/types/time-picker/stories/index.d.ts +2 -0
- package/lib/types/time-picker/stories/index.d.ts.map +1 -1
- package/lib/types/time-picker/stories/time-picker-default.story.d.ts.map +1 -1
- package/lib/types/time-picker/stories/time-picker-error.story.d.ts +24 -0
- package/lib/types/time-picker/stories/time-picker-error.story.d.ts.map +1 -0
- package/lib/types/time-picker/stories/time-picker-in-dialog.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/index.d.ts +2 -0
- package/lib/types/timezone-picker/stories/index.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-both-mode.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-default.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-disabled.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-dst-aware.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts +24 -0
- package/lib/types/timezone-picker/stories/timezone-picker-error.story.d.ts.map +1 -0
- package/lib/types/timezone-picker/stories/timezone-picker-fluid.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-in-dialog.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-sizes.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/stories/timezone-picker-utc-only.story.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-information-icon.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-information-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"text-input-information-icon.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-information-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,mBAAmB,EAAC,uBAAuB,EAC3C,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Label\"\n moreInformationText=\"Information icon text\"\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,7 +23,7 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
|
23
23
|
import { TextInput } from '@neo4j-ndl/react';
|
|
24
24
|
import { CalendarDaysIconOutline } from '@neo4j-ndl/react/icons';
|
|
25
25
|
const Component = () => {
|
|
26
|
-
return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsx(TextInput, { label: "Default loading", isLoading: true, placeholder: "Placeholder" }), _jsx(TextInput, { label: "With leading element", isLoading: true, leadingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder" }), _jsx(TextInput, { label: "With trailing element", isLoading: true, trailingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder" }), _jsx(TextInput, { label: "With leading and trailing element", isLoading: true, leadingElement: _jsx(CalendarDaysIconOutline, {}), trailingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder" })] }));
|
|
26
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsx(TextInput, { label: "Default loading", isLoading: true, placeholder: "Placeholder", htmlAttributes: { id: 'text-input-loading' } }), _jsx(TextInput, { label: "With leading element", isLoading: true, leadingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder", htmlAttributes: { id: 'text-input-loading-leading' } }), _jsx(TextInput, { label: "With trailing element", isLoading: true, trailingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder", htmlAttributes: { id: 'text-input-loading-trailing' } }), _jsx(TextInput, { label: "With leading and trailing element", isLoading: true, leadingElement: _jsx(CalendarDaysIconOutline, {}), trailingElement: _jsx(CalendarDaysIconOutline, {}), placeholder: "Placeholder", htmlAttributes: { id: 'text-input-loading-both' } })] }));
|
|
27
27
|
};
|
|
28
28
|
export default Component;
|
|
29
29
|
//# sourceMappingURL=text-input-loading-spinner.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-loading-spinner.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-loading-spinner.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"text-input-loading-spinner.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-loading-spinner.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,SAAS,IACR,KAAK,EAAC,iBAAiB,EACvB,SAAS,QACT,WAAW,EAAC,aAAa,EACzB,cAAc,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE,GAC5C,EACF,KAAC,SAAS,IACR,KAAK,EAAC,sBAAsB,EAC5B,SAAS,QACT,cAAc,EAAE,KAAC,uBAAuB,KAAG,EAC3C,WAAW,EAAC,aAAa,EACzB,cAAc,EAAE,EAAE,EAAE,EAAE,4BAA4B,EAAE,GACpD,EACF,KAAC,SAAS,IACR,KAAK,EAAC,uBAAuB,EAC7B,SAAS,QACT,eAAe,EAAE,KAAC,uBAAuB,KAAG,EAC5C,WAAW,EAAC,aAAa,EACzB,cAAc,EAAE,EAAE,EAAE,EAAE,6BAA6B,EAAE,GACrD,EACF,KAAC,SAAS,IACR,KAAK,EAAC,mCAAmC,EACzC,SAAS,QACT,cAAc,EAAE,KAAC,uBAAuB,KAAG,EAC3C,eAAe,EAAE,KAAC,uBAAuB,KAAG,EAC5C,WAAW,EAAC,aAAa,EACzB,cAAc,EAAE,EAAE,EAAE,EAAE,yBAAyB,EAAE,GACjD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\nimport { CalendarDaysIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <TextInput\n label=\"Default loading\"\n isLoading\n placeholder=\"Placeholder\"\n htmlAttributes={{ id: 'text-input-loading' }}\n />\n <TextInput\n label=\"With leading element\"\n isLoading\n leadingElement={<CalendarDaysIconOutline />}\n placeholder=\"Placeholder\"\n htmlAttributes={{ id: 'text-input-loading-leading' }}\n />\n <TextInput\n label=\"With trailing element\"\n isLoading\n trailingElement={<CalendarDaysIconOutline />}\n placeholder=\"Placeholder\"\n htmlAttributes={{ id: 'text-input-loading-trailing' }}\n />\n <TextInput\n label=\"With leading and trailing element\"\n isLoading\n leadingElement={<CalendarDaysIconOutline />}\n trailingElement={<CalendarDaysIconOutline />}\n placeholder=\"Placeholder\"\n htmlAttributes={{ id: 'text-input-loading-both' }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -25,7 +25,7 @@ const Component = () => {
|
|
|
25
25
|
return (_jsx(TextInput, { label: "Label", helpText: "Help text", isSkeletonLoading: true, skeletonProps: {
|
|
26
26
|
onBackground: 'weak',
|
|
27
27
|
shape: 'rectangular',
|
|
28
|
-
} }));
|
|
28
|
+
}, htmlAttributes: { id: 'text-input' } }));
|
|
29
29
|
};
|
|
30
30
|
export default Component;
|
|
31
31
|
//# sourceMappingURL=text-input-loading.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-loading.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-loading.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,iBAAiB,EAAE,IAAI,EACvB,aAAa,EAAE;YACb,YAAY,EAAE,MAAM;YACpB,KAAK,EAAE,aAAa;SACrB,
|
|
1
|
+
{"version":3,"file":"text-input-loading.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-loading.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,iBAAiB,EAAE,IAAI,EACvB,aAAa,EAAE;YACb,YAAY,EAAE,MAAM;YACpB,KAAK,EAAE,aAAa;SACrB,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Label\"\n helpText=\"Help text\"\n isSkeletonLoading={true}\n skeletonProps={{\n onBackground: 'weak',\n shape: 'rectangular',\n }}\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-number.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-number.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,KAAK,EACX,cAAc,EAAE;YACd,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,QAAQ;SACf,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Age\"\n htmlAttributes={{\n max: '100',\n min: '0',\n type: 'number',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
1
|
+
{"version":3,"file":"text-input-number.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-number.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,KAAK,EACX,cAAc,EAAE;YACd,EAAE,EAAE,YAAY;YAChB,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,GAAG;YACR,IAAI,EAAE,QAAQ;SACf,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Age\"\n htmlAttributes={{\n id: 'text-input',\n max: '100',\n min: '0',\n type: 'number',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { TextInput } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
|
-
return (_jsx(TextInput, { label: "Label", helpText: "Help text", showRequiredOrOptionalLabel: true }));
|
|
25
|
+
return (_jsx(TextInput, { label: "Label", helpText: "Help text", showRequiredOrOptionalLabel: true, htmlAttributes: { id: 'text-input' } }));
|
|
26
26
|
};
|
|
27
27
|
export default Component;
|
|
28
28
|
//# sourceMappingURL=text-input-optional.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-optional.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-optional.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"text-input-optional.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-optional.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,2BAA2B,QAC3B,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Label\"\n helpText=\"Help text\"\n showRequiredOrOptionalLabel\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -26,6 +26,7 @@ import { useState } from 'react';
|
|
|
26
26
|
const Component = () => {
|
|
27
27
|
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
28
28
|
return (_jsx(TextInput, { label: "Password", trailingElement: _jsx(CleanIconButton, { onClick: () => setIsPasswordVisible(!isPasswordVisible), description: "toggle password visibility", children: isPasswordVisible ? _jsx(EyeIconOutline, {}) : _jsx(EyeSlashIconOutline, {}) }), placeholder: "Enter password", htmlAttributes: {
|
|
29
|
+
id: 'text-input',
|
|
29
30
|
type: isPasswordVisible ? 'text' : 'password',
|
|
30
31
|
} }));
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-password.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-password.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,UAAU,EAChB,eAAe,EACb,KAAC,eAAe,IACd,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,EACvD,WAAW,EAAC,4BAA4B,YAEvC,iBAAiB,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC,CAAC,CAAC,KAAC,mBAAmB,KAAG,GACjD,EAEpB,WAAW,EAAC,gBAAgB,EAC5B,cAAc,EAAE;YACd,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;SAC9C,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { CleanIconButton, TextInput } from '@neo4j-ndl/react';\nimport { EyeIconOutline, EyeSlashIconOutline } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n return (\n <TextInput\n label=\"Password\"\n trailingElement={\n <CleanIconButton\n onClick={() => setIsPasswordVisible(!isPasswordVisible)}\n description=\"toggle password visibility\"\n >\n {isPasswordVisible ? <EyeIconOutline /> : <EyeSlashIconOutline />}\n </CleanIconButton>\n }\n placeholder=\"Enter password\"\n htmlAttributes={{\n type: isPasswordVisible ? 'text' : 'password',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
1
|
+
{"version":3,"file":"text-input-password.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-password.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,UAAU,EAChB,eAAe,EACb,KAAC,eAAe,IACd,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,EACvD,WAAW,EAAC,4BAA4B,YAEvC,iBAAiB,CAAC,CAAC,CAAC,KAAC,cAAc,KAAG,CAAC,CAAC,CAAC,KAAC,mBAAmB,KAAG,GACjD,EAEpB,WAAW,EAAC,gBAAgB,EAC5B,cAAc,EAAE;YACd,EAAE,EAAE,YAAY;YAChB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU;SAC9C,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { CleanIconButton, TextInput } from '@neo4j-ndl/react';\nimport { EyeIconOutline, EyeSlashIconOutline } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n\n return (\n <TextInput\n label=\"Password\"\n trailingElement={\n <CleanIconButton\n onClick={() => setIsPasswordVisible(!isPasswordVisible)}\n description=\"toggle password visibility\"\n >\n {isPasswordVisible ? <EyeIconOutline /> : <EyeSlashIconOutline />}\n </CleanIconButton>\n }\n placeholder=\"Enter password\"\n htmlAttributes={{\n id: 'text-input',\n type: isPasswordVisible ? 'text' : 'password',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { TextInput } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
|
-
return (_jsx(TextInput, { label: "Label", isReadOnly: true, helpText: "Help text", value: "Value" }));
|
|
25
|
+
return (_jsx(TextInput, { label: "Label", isReadOnly: true, helpText: "Help text", value: "Value", htmlAttributes: { id: 'text-input' } }));
|
|
26
26
|
};
|
|
27
27
|
export default Component;
|
|
28
28
|
//# sourceMappingURL=text-input-readonly.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-readonly.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-readonly.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"text-input-readonly.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-readonly.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,UAAU,QACV,QAAQ,EAAC,WAAW,EACpB,KAAK,EAAC,OAAO,EACb,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Label\"\n isReadOnly\n helpText=\"Help text\"\n value=\"Value\"\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { TextInput } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
|
-
return (_jsx(TextInput, { label: "Label", isRequired: true, helpText: "Help text", showRequiredOrOptionalLabel: true }));
|
|
25
|
+
return (_jsx(TextInput, { label: "Label", isRequired: true, helpText: "Help text", showRequiredOrOptionalLabel: true, htmlAttributes: { id: 'text-input' } }));
|
|
26
26
|
};
|
|
27
27
|
export default Component;
|
|
28
28
|
//# sourceMappingURL=text-input-required.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-required.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-required.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,UAAU,QACV,QAAQ,EAAC,WAAW,EACpB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"text-input-required.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-required.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,OAAO,EACb,UAAU,QACV,QAAQ,EAAC,WAAW,EACpB,2BAA2B,QAC3B,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <TextInput\n label=\"Label\"\n isRequired\n helpText=\"Help text\"\n showRequiredOrOptionalLabel\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
23
|
import { TextInput } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
|
-
return (_jsxs("div", { className: "n-flex n-gap-token-16", children: [_jsx(TextInput, { label: "Small Input", size: "small" }), _jsx(TextInput, { label: "Medium Input", size: "medium" }), _jsx(TextInput, { label: "Large Input", size: "large" })] }));
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-gap-token-16", children: [_jsx(TextInput, { label: "Small Input", size: "small", htmlAttributes: { id: 'text-input-small' } }), _jsx(TextInput, { label: "Medium Input", size: "medium", htmlAttributes: { id: 'text-input-medium' } }), _jsx(TextInput, { label: "Large Input", size: "large", htmlAttributes: { id: 'text-input-large' } })] }));
|
|
26
26
|
};
|
|
27
27
|
export default Component;
|
|
28
28
|
//# sourceMappingURL=text-input-sizes.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-sizes.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"text-input-sizes.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,SAAS,IACR,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,OAAO,EACZ,cAAc,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,GAC1C,EACF,KAAC,SAAS,IACR,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,QAAQ,EACb,cAAc,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,GAC3C,EACF,KAAC,SAAS,IACR,KAAK,EAAC,aAAa,EACnB,IAAI,EAAC,OAAO,EACZ,cAAc,EAAE,EAAE,EAAE,EAAE,kBAAkB,EAAE,GAC1C,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-gap-token-16\">\n <TextInput\n label=\"Small Input\"\n size=\"small\"\n htmlAttributes={{ id: 'text-input-small' }}\n />\n <TextInput\n label=\"Medium Input\"\n size=\"medium\"\n htmlAttributes={{ id: 'text-input-medium' }}\n />\n <TextInput\n label=\"Large Input\"\n size=\"large\"\n htmlAttributes={{ id: 'text-input-large' }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -25,7 +25,7 @@ import { DatabasePlugIcon, DatabasePlusIcon } from '@neo4j-ndl/react/icons';
|
|
|
25
25
|
import { useState } from 'react';
|
|
26
26
|
const Component = () => {
|
|
27
27
|
const [searchValue, setSearchValue] = useState('');
|
|
28
|
-
return (_jsx(TextInput, { label: "With icons", leadingElement: _jsx(DatabasePlugIcon, {}), trailingElement: _jsx(DatabasePlusIcon, {}), value: searchValue, onChange: (e) => setSearchValue(e.target.value) }));
|
|
28
|
+
return (_jsx(TextInput, { label: "With icons", leadingElement: _jsx(DatabasePlugIcon, {}), trailingElement: _jsx(DatabasePlusIcon, {}), value: searchValue, onChange: (e) => setSearchValue(e.target.value), htmlAttributes: { id: 'text-input' } }));
|
|
29
29
|
};
|
|
30
30
|
export default Component;
|
|
31
31
|
//# sourceMappingURL=text-input-with-icons.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input-with-icons.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-with-icons.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,YAAY,EAClB,cAAc,EAAE,KAAC,gBAAgB,KAAG,EACpC,eAAe,EAAE,KAAC,gBAAgB,KAAG,EACrC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"text-input-with-icons.story.js","sourceRoot":"","sources":["../../../../src/text-input/stories/text-input-with-icons.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEnD,OAAO,CACL,KAAC,SAAS,IACR,KAAK,EAAC,YAAY,EAClB,cAAc,EAAE,KAAC,gBAAgB,KAAG,EACpC,eAAe,EAAE,KAAC,gBAAgB,KAAG,EACrC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC/C,cAAc,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GACpC,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { TextInput } from '@neo4j-ndl/react';\nimport { DatabasePlugIcon, DatabasePlusIcon } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [searchValue, setSearchValue] = useState('');\n\n return (\n <TextInput\n label=\"With icons\"\n leadingElement={<DatabasePlugIcon />}\n trailingElement={<DatabasePlusIcon />}\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n htmlAttributes={{ id: 'text-input' }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -33,7 +33,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
33
33
|
import { autoUpdate, flip, FloatingFocusManager, FloatingPortal, offset, shift, useDismiss, useFloating, useInteractions, useMergeRefs, useTransitionStyles, } from '@floating-ui/react';
|
|
34
34
|
import { tokens } from '@neo4j-ndl/base';
|
|
35
35
|
import classNames from 'classnames';
|
|
36
|
-
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
36
|
+
import { useCallback, useEffect, useId, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
37
37
|
import { ConditionalWrap } from '../conditional-wrap';
|
|
38
38
|
import { useIsInsideDialog } from '../dialog/dialog-context';
|
|
39
39
|
import { ClockIconOutline, ExclamationCircleIconSolid } from '../icons';
|
|
@@ -53,13 +53,15 @@ export const TimePicker = (_a) => {
|
|
|
53
53
|
useImperativeHandle(ref, () => inputRef.current, []);
|
|
54
54
|
const [lastAction, setLastAction] = useState('type');
|
|
55
55
|
const [error, setError] = useState(undefined);
|
|
56
|
+
const errorTextId = useId();
|
|
56
57
|
const timeOptions = useMemo(() => generateTimeOptions(is24Hour, timeInterval), [is24Hour, timeInterval]);
|
|
57
58
|
const { themeClassName } = useNeedleTheme();
|
|
58
59
|
const { isPopoverOpen, setIsPopoverOpen } = useTimePickerPopover(false);
|
|
59
60
|
const { focusedIndex, setFocusedIndex, handleArrowNavigation } = useKeyboardNavigation(listRef, timeOptions.length);
|
|
61
|
+
const errorToShow = errorText !== undefined && errorText !== '' ? errorText : error;
|
|
60
62
|
const classes = {
|
|
61
63
|
'ndl-disabled': isDisabled,
|
|
62
|
-
'ndl-error':
|
|
64
|
+
'ndl-error': errorToShow !== undefined,
|
|
63
65
|
'ndl-fluid': isFluid,
|
|
64
66
|
'ndl-large': size === 'large',
|
|
65
67
|
'ndl-medium': size === 'medium',
|
|
@@ -67,7 +69,6 @@ export const TimePicker = (_a) => {
|
|
|
67
69
|
'ndl-small': size === 'small',
|
|
68
70
|
};
|
|
69
71
|
const inputWidth = isFluid === true ? '100%' : is24Hour === true ? '6rem' : '9rem';
|
|
70
|
-
const errorToShow = errorText !== undefined && errorText !== '' ? errorText : error;
|
|
71
72
|
const isValidTime = useCallback((hours, minutes) => {
|
|
72
73
|
if (hours > 23 || hours < 0) {
|
|
73
74
|
return false;
|
|
@@ -236,7 +237,7 @@ export const TimePicker = (_a) => {
|
|
|
236
237
|
const mergedRef = useMergeRefs([refs.setReference, containerRef]);
|
|
237
238
|
return (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: classNames('ndl-time-picker', className, Object.assign({}, classes)), ref: mergedRef }, getReferenceProps(), { style: {
|
|
238
239
|
width: isFluid === true ? '100%' : 'fit-content',
|
|
239
|
-
}, children: [_jsxs("label", { className: "ndl-time-picker-label", children: [label !== undefined && (_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', children: label })), _jsxs("div", { className: "ndl-time-picker-input-wrapper", style: Object.assign({ width: inputWidth }, style), children: [_jsx("input", Object.assign({ "aria-label": label, className: "ndl-time-picker-input", type: "text", ref: inputRef, value: inputValue, disabled: isDisabled, readOnly: isReadOnly, required: isRequired, onChange: newHandleInputChange, onKeyDown: handleKeyDown, onClick: () => {
|
|
240
|
+
}, children: [_jsxs("label", { className: "ndl-time-picker-label", children: [label !== undefined && (_jsx(Typography, { variant: size === 'large' ? 'body-large' : 'body-medium', children: label })), _jsxs("div", { className: "ndl-time-picker-input-wrapper", style: Object.assign({ width: inputWidth }, style), children: [_jsx("input", Object.assign({ "aria-label": label, "aria-invalid": Boolean(errorToShow), "aria-describedby": errorToShow ? errorTextId : undefined, className: "ndl-time-picker-input", type: "text", ref: inputRef, value: inputValue, disabled: isDisabled, readOnly: isReadOnly, required: isRequired, onChange: newHandleInputChange, onKeyDown: handleKeyDown, onClick: () => {
|
|
240
241
|
if (isReadOnly === true || isDisabled === true) {
|
|
241
242
|
return;
|
|
242
243
|
}
|
|
@@ -265,7 +266,7 @@ export const TimePicker = (_a) => {
|
|
|
265
266
|
setError(undefined);
|
|
266
267
|
setInputValue(time.toString(is24Hour));
|
|
267
268
|
}
|
|
268
|
-
}, placeholder: format, maxLength: is24Hour ? 5 : 8 }, restProps, htmlAttributes)), _jsx(ClockIconOutline, { className: "ndl-icon-svg ndl-time-picker-icon" })] })] }), errorToShow !== undefined && (_jsxs("div", { className: "ndl-time-picker-error-wrapper", children: [_jsx(ExclamationCircleIconSolid, { className: "ndl-time-picker-error-icon" }), _jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-time-picker-error-text", children: errorToShow })] }))] })), context.open && (_jsx(ConditionalWrap, { shouldWrap: isPortaled, wrap: (wrapChildren) => (_jsx(FloatingPortal, { children: wrapChildren })), children: _jsx(FloatingFocusManager, { context: context, modal: false, initialFocus: -1, children: _jsx("div", Object.assign({ ref: refs.setFloating, className: classNames(themeClassName, 'ndl-time-picker-popover', Object.assign({}, classes)), style: Object.assign(Object.assign(Object.assign({}, transitionStyles), floatingStyles), { width: isFluid === true
|
|
269
|
+
}, placeholder: format, maxLength: is24Hour ? 5 : 8 }, restProps, htmlAttributes)), _jsx(ClockIconOutline, { className: "ndl-icon-svg ndl-time-picker-icon" })] })] }), errorToShow !== undefined && (_jsxs("div", { className: "ndl-time-picker-error-wrapper", role: "status", children: [_jsx(ExclamationCircleIconSolid, { className: "ndl-time-picker-error-icon" }), _jsx(Typography, { variant: size === 'large' ? 'body-medium' : 'body-small', className: "ndl-time-picker-error-text", htmlAttributes: { id: errorTextId }, children: errorToShow })] }))] })), context.open && (_jsx(ConditionalWrap, { shouldWrap: isPortaled, wrap: (wrapChildren) => (_jsx(FloatingPortal, { children: wrapChildren })), children: _jsx(FloatingFocusManager, { context: context, modal: false, initialFocus: -1, children: _jsx("div", Object.assign({ ref: refs.setFloating, className: classNames(themeClassName, 'ndl-time-picker-popover', Object.assign({}, classes)), style: Object.assign(Object.assign(Object.assign({}, transitionStyles), floatingStyles), { width: isFluid === true
|
|
269
270
|
? (_d = containerRef.current) === null || _d === void 0 ? void 0 : _d.clientWidth
|
|
270
271
|
: undefined }) }, getFloatingProps(), { children: _jsx("ul", { ref: listRef, tabIndex: -1, children: timeOptions.map((time, i) => (_jsx("li", { role: "option", "aria-selected": (value === null || value === void 0 ? void 0 : value.toString(is24Hour)) === time ||
|
|
271
272
|
(editedInput === null || editedInput === void 0 ? void 0 : editedInput.toString(is24Hour)) === time, value: time, onClick: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../../src/time-picker/TimePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;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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 {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ClockIconOutline, ExclamationCircleIconSolid } from '../icons';\nimport { useNeedleTheme } from '../theme';\nimport { Typography } from '../typography';\nimport { generateTimeOptions } from './generate-time-options';\nimport { NeedleTime } from './needle-time';\nimport {\n useKeyboardNavigation,\n useTimePickerPopover,\n} from './time-picker-hooks';\n\nexport type TimeFormat = 'hh:mm' | 'hh:mm aa';\n\nexport type TimePickerProps = {\n /** The value of the time picker */\n value?: NeedleTime;\n /** The format of the time picker */\n format?: TimeFormat;\n /** Whether the time picker is fluid */\n isFluid?: boolean;\n /** Whether the time picker is read only */\n isReadOnly?: boolean;\n /** Whether the time picker is required */\n isRequired?: boolean;\n /** Whether the time picker is disabled */\n isDisabled?: boolean;\n /** The time interval of the time picker, in minutes */\n timeInterval?: number;\n /** The label of the time picker */\n label?: string;\n /** The size of the time picker */\n size?: 'small' | 'medium' | 'large';\n /** Manually set the error text */\n errorText?: string;\n /** Callback function triggered when the time picker value changes */\n onChange?: (time: NeedleTime) => void;\n /** Callback function triggered when the time picker encounters an error */\n onError?: (error: string, time: NeedleTime) => void;\n /**\n * Strategy for the dropdown floating element.\n * By default it is absolute, but if the component is inside of a needle Dialog, it is set to fixed.\n * If this prop is set, no auto-detection of Dialog is done.\n */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Whether the dropdown element is rendered in a portal. */\n isPortaled?: boolean;\n};\n\nexport const TimePicker = <T extends React.ElementType = 'div'>({\n format = 'hh:mm',\n isDisabled,\n isFluid,\n isReadOnly,\n isRequired,\n value,\n timeInterval = 15,\n label,\n onChange,\n className,\n onError,\n style,\n size = 'medium',\n errorText,\n htmlAttributes,\n floatingStrategy,\n isPortaled: isPortaledProp,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TimePickerProps>) => {\n const [editedInput, setEditedInput] = useState<NeedleTime | undefined>(value);\n\n const is24Hour = format === 'hh:mm';\n const [inputValue, setInputValue] = useState<string>(\n value?.toString(is24Hour) ?? '',\n );\n const listRef = useRef<HTMLUListElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n const [lastAction, setLastAction] = useState<'type' | 'arrow'>('type');\n const [error, setError] = useState<string | undefined>(undefined);\n\n const timeOptions = useMemo(\n () => generateTimeOptions(is24Hour, timeInterval),\n [is24Hour, timeInterval],\n );\n\n const { themeClassName } = useNeedleTheme();\n const { isPopoverOpen, setIsPopoverOpen } = useTimePickerPopover(false);\n const { focusedIndex, setFocusedIndex, handleArrowNavigation } =\n useKeyboardNavigation(listRef, timeOptions.length);\n\n const classes = {\n 'ndl-disabled': isDisabled,\n 'ndl-error': error !== undefined,\n 'ndl-fluid': isFluid,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n };\n\n const inputWidth =\n isFluid === true ? '100%' : is24Hour === true ? '6rem' : '9rem';\n\n const errorToShow =\n errorText !== undefined && errorText !== '' ? errorText : error;\n\n const isValidTime = useCallback((hours: number, minutes: number) => {\n if (hours > 23 || hours < 0) {\n return false;\n }\n\n if (minutes > 59 || minutes < 0) {\n return false;\n }\n\n return true;\n }, []);\n\n useEffect(() => {\n if (error !== undefined) {\n onError?.(error, NeedleTime.fromString(inputValue));\n }\n }, [error, inputValue, onError]);\n\n useEffect(() => {\n setEditedInput(value);\n setInputValue(value?.toString(is24Hour) ?? '');\n }, [is24Hour, value]);\n\n useEffect(() => {\n if (isPopoverOpen) {\n setTimeout(() => {\n listRef.current?.children[focusedIndex]?.scrollIntoView({\n block: 'center',\n inline: 'nearest',\n });\n }, 0);\n } else {\n setTimeout(() => {\n inputRef.current?.blur();\n const selectedIndex =\n timeOptions.indexOf(value?.toString(is24Hour) ?? '') ?? 0;\n setFocusedIndex(selectedIndex);\n }, 0);\n }\n }, [\n focusedIndex,\n is24Hour,\n isPopoverOpen,\n value,\n setFocusedIndex,\n timeOptions,\n ]);\n\n const handleOnClick = (timeText: string) => {\n if (onChange) {\n onChange(NeedleTime.fromString(timeText));\n }\n setError(undefined);\n setInputValue(timeText);\n setEditedInput(NeedleTime.fromString(timeText));\n setIsPopoverOpen(false);\n };\n const newHandleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n scrollToTime(e.target.value);\n setInputValue(e.target.value);\n setLastAction('type');\n\n const time = NeedleTime.fromString(e.target.value);\n if (!isValidTime(time.hour, time.minute)) {\n setError('Invalid time');\n } else {\n setError(undefined);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (isReadOnly === true || isDisabled === true) {\n e.preventDefault();\n return;\n }\n\n if (e.key === 'Escape') {\n setIsPopoverOpen(false);\n }\n\n setIsPopoverOpen(true);\n\n if (e.key === 'Enter') {\n if (lastAction === 'type' && inputValue.length >= (is24Hour ? 5 : 6)) {\n const time = NeedleTime.fromString(inputValue);\n handleOnClick(time.toString(is24Hour));\n } else if (lastAction === 'type' && !inputValue.includes(':')) {\n const time = NeedleTime.fromString(inputValue);\n if (isValidTime(time.hour, time.minute)) {\n handleOnClick(time.toString(is24Hour));\n }\n setIsPopoverOpen(false);\n } else {\n handleOnClick(timeOptions[focusedIndex]);\n }\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n setLastAction('arrow');\n handleArrowNavigation(e.key);\n }\n };\n\n const scrollToTime = (startOfTime: string) => {\n const parsedTime = startOfTime.toLowerCase().replace(/[^0-9amp]/g, '');\n let index = -1;\n\n // Handle AM/PM input\n const isPM = parsedTime.includes('p');\n const isAM = parsedTime.includes('a');\n const timeDigits = parsedTime.replace(/[amp]/g, '');\n\n if (timeDigits.length === 1) {\n // Single digit - assume it's an hour\n const hour = `0${timeDigits}`;\n const searchTime = is24Hour\n ? `${hour}:00`\n : `${hour}:00 ${isPM ? 'PM' : 'AM'}`;\n index = timeOptions.indexOf(searchTime);\n } else {\n // Find closest matching time\n const closestTime = timeOptions.find((time) => {\n const timeWithoutSpecialChars = time\n .toLowerCase()\n .replace(/[^0-9amp]/g, '');\n if (isPM || isAM) {\n // If AM/PM specified, match that specifically\n return timeWithoutSpecialChars.startsWith(parsedTime);\n } else {\n // Otherwise just match the numbers\n return timeWithoutSpecialChars\n .replace(/[amp]/g, '')\n .startsWith(timeDigits);\n }\n });\n index = closestTime !== undefined ? timeOptions.indexOf(closestTime) : -1;\n }\n\n if (index !== -1) {\n setFocusedIndex(index);\n }\n\n return index;\n };\n\n /** Custom floating ui solution */\n const isInsideDialog = useIsInsideDialog();\n const isPortaled = isPortaledProp ?? !isInsideDialog;\n const containerRef = useRef<HTMLDivElement>(null);\n const { refs, floatingStyles, context } = useFloating({\n elements: {\n reference: containerRef.current,\n },\n middleware: [\n offset(10),\n flip({\n fallbackPlacements: ['top'],\n fallbackStrategy: 'bestFit',\n }),\n shift({ padding: 5 }),\n ],\n onOpenChange: (open) => {\n setIsPopoverOpen(open);\n },\n open: isDisabled !== true && isReadOnly !== true && isPopoverOpen,\n placement: 'bottom',\n strategy: floatingStrategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n const dismiss = useDismiss(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n const mergedRef = useMergeRefs([refs.setReference, containerRef]);\n\n return (\n <>\n <div\n className={classNames('ndl-time-picker', className, {\n ...classes,\n })}\n ref={mergedRef}\n {...getReferenceProps()}\n style={{\n width: isFluid === true ? '100%' : 'fit-content',\n }}\n >\n <label className=\"ndl-time-picker-label\">\n {label !== undefined && (\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n >\n {label}\n </Typography>\n )}\n <div\n className=\"ndl-time-picker-input-wrapper\"\n style={{\n width: inputWidth,\n ...style,\n }}\n >\n <input\n aria-label={label} // TODO: handle label natively\n className=\"ndl-time-picker-input\"\n type=\"text\"\n ref={inputRef}\n value={inputValue}\n disabled={isDisabled}\n readOnly={isReadOnly}\n required={isRequired}\n onChange={newHandleInputChange}\n onKeyDown={handleKeyDown}\n onClick={() => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n setIsPopoverOpen(true);\n }}\n onBlur={(e) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n\n if (\n e.relatedTarget?.classList.contains(\n 'ndl-time-picker-popover-item',\n ) === true\n ) {\n return;\n }\n\n if (inputValue.length < 4) {\n setError('Invalid time');\n return;\n }\n\n const time = NeedleTime.fromString(inputValue);\n\n if (time === undefined || time === null) {\n setError('Invalid time');\n return;\n }\n\n if (!isValidTime(time.hour, time.minute)) {\n setError('Invalid time');\n } else {\n setError(undefined);\n setInputValue(time.toString(is24Hour));\n }\n }}\n placeholder={format}\n maxLength={is24Hour ? 5 : 8}\n {...restProps}\n {...htmlAttributes}\n />\n <ClockIconOutline className=\"ndl-icon-svg ndl-time-picker-icon\" />\n </div>\n </label>\n {errorToShow !== undefined && (\n <div className=\"ndl-time-picker-error-wrapper\">\n <ExclamationCircleIconSolid className=\"ndl-time-picker-error-icon\" />\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-time-picker-error-text\"\n >\n {errorToShow}\n </Typography>\n </div>\n )}\n </div>\n\n {context.open && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal>{wrapChildren}</FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n >\n <div\n ref={refs.setFloating}\n className={classNames(themeClassName, 'ndl-time-picker-popover', {\n ...classes,\n })}\n style={{\n ...transitionStyles,\n ...floatingStyles,\n width:\n isFluid === true\n ? containerRef.current?.clientWidth\n : undefined,\n }}\n {...getFloatingProps()}\n >\n <ul ref={listRef} tabIndex={-1}>\n {timeOptions.map((time, i) => (\n <li\n key={i}\n role=\"option\"\n aria-selected={\n value?.toString(is24Hour) === time ||\n editedInput?.toString(is24Hour) === time\n }\n value={time}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n handleOnClick(time);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === i ? 'focused' : '',\n 'ndl-time-picker-popover-item',\n )}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n handleOnClick(time);\n }\n }}\n >\n {time}\n </li>\n ))}\n </ul>\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../../src/time-picker/TimePicker.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,UAAU,EACV,IAAI,EACJ,oBAAoB,EACpB,cAAc,EACd,MAAM,EACN,KAAK,EAC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ACe,GACP,CACnB,IACA,CACJ,CAAC;AACJ,CAAC,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 */\nimport {\n autoUpdate,\n flip,\n FloatingFocusManager,\n FloatingPortal,\n offset,\n shift,\n useDismiss,\n useFloating,\n useInteractions,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport {\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ClockIconOutline, ExclamationCircleIconSolid } from '../icons';\nimport { useNeedleTheme } from '../theme';\nimport { Typography } from '../typography';\nimport { generateTimeOptions } from './generate-time-options';\nimport { NeedleTime } from './needle-time';\nimport {\n useKeyboardNavigation,\n useTimePickerPopover,\n} from './time-picker-hooks';\n\nexport type TimeFormat = 'hh:mm' | 'hh:mm aa';\n\nexport type TimePickerProps = {\n /** The value of the time picker */\n value?: NeedleTime;\n /** The format of the time picker */\n format?: TimeFormat;\n /** Whether the time picker is fluid */\n isFluid?: boolean;\n /** Whether the time picker is read only */\n isReadOnly?: boolean;\n /** Whether the time picker is required */\n isRequired?: boolean;\n /** Whether the time picker is disabled */\n isDisabled?: boolean;\n /** The time interval of the time picker, in minutes */\n timeInterval?: number;\n /** The label of the time picker */\n label?: string;\n /** The size of the time picker */\n size?: 'small' | 'medium' | 'large';\n /** Manually set the error text */\n errorText?: string;\n /** Callback function triggered when the time picker value changes */\n onChange?: (time: NeedleTime) => void;\n /** Callback function triggered when the time picker encounters an error */\n onError?: (error: string, time: NeedleTime) => void;\n /**\n * Strategy for the dropdown floating element.\n * By default it is absolute, but if the component is inside of a needle Dialog, it is set to fixed.\n * If this prop is set, no auto-detection of Dialog is done.\n */\n floatingStrategy?: 'absolute' | 'fixed';\n /** Whether the dropdown element is rendered in a portal. */\n isPortaled?: boolean;\n};\n\nexport const TimePicker = <T extends React.ElementType = 'div'>({\n format = 'hh:mm',\n isDisabled,\n isFluid,\n isReadOnly,\n isRequired,\n value,\n timeInterval = 15,\n label,\n onChange,\n className,\n onError,\n style,\n size = 'medium',\n errorText,\n htmlAttributes,\n floatingStrategy,\n isPortaled: isPortaledProp,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TimePickerProps>) => {\n const [editedInput, setEditedInput] = useState<NeedleTime | undefined>(value);\n\n const is24Hour = format === 'hh:mm';\n const [inputValue, setInputValue] = useState<string>(\n value?.toString(is24Hour) ?? '',\n );\n const listRef = useRef<HTMLUListElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => inputRef.current as HTMLInputElement, []);\n const [lastAction, setLastAction] = useState<'type' | 'arrow'>('type');\n const [error, setError] = useState<string | undefined>(undefined);\n const errorTextId = useId();\n\n const timeOptions = useMemo(\n () => generateTimeOptions(is24Hour, timeInterval),\n [is24Hour, timeInterval],\n );\n\n const { themeClassName } = useNeedleTheme();\n const { isPopoverOpen, setIsPopoverOpen } = useTimePickerPopover(false);\n const { focusedIndex, setFocusedIndex, handleArrowNavigation } =\n useKeyboardNavigation(listRef, timeOptions.length);\n\n const errorToShow =\n errorText !== undefined && errorText !== '' ? errorText : error;\n\n const classes = {\n 'ndl-disabled': isDisabled,\n 'ndl-error': errorToShow !== undefined,\n 'ndl-fluid': isFluid,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n };\n\n const inputWidth =\n isFluid === true ? '100%' : is24Hour === true ? '6rem' : '9rem';\n\n const isValidTime = useCallback((hours: number, minutes: number) => {\n if (hours > 23 || hours < 0) {\n return false;\n }\n\n if (minutes > 59 || minutes < 0) {\n return false;\n }\n\n return true;\n }, []);\n\n useEffect(() => {\n if (error !== undefined) {\n onError?.(error, NeedleTime.fromString(inputValue));\n }\n }, [error, inputValue, onError]);\n\n useEffect(() => {\n setEditedInput(value);\n setInputValue(value?.toString(is24Hour) ?? '');\n }, [is24Hour, value]);\n\n useEffect(() => {\n if (isPopoverOpen) {\n setTimeout(() => {\n listRef.current?.children[focusedIndex]?.scrollIntoView({\n block: 'center',\n inline: 'nearest',\n });\n }, 0);\n } else {\n setTimeout(() => {\n inputRef.current?.blur();\n const selectedIndex =\n timeOptions.indexOf(value?.toString(is24Hour) ?? '') ?? 0;\n setFocusedIndex(selectedIndex);\n }, 0);\n }\n }, [\n focusedIndex,\n is24Hour,\n isPopoverOpen,\n value,\n setFocusedIndex,\n timeOptions,\n ]);\n\n const handleOnClick = (timeText: string) => {\n if (onChange) {\n onChange(NeedleTime.fromString(timeText));\n }\n setError(undefined);\n setInputValue(timeText);\n setEditedInput(NeedleTime.fromString(timeText));\n setIsPopoverOpen(false);\n };\n const newHandleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n scrollToTime(e.target.value);\n setInputValue(e.target.value);\n setLastAction('type');\n\n const time = NeedleTime.fromString(e.target.value);\n if (!isValidTime(time.hour, time.minute)) {\n setError('Invalid time');\n } else {\n setError(undefined);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (isReadOnly === true || isDisabled === true) {\n e.preventDefault();\n return;\n }\n\n if (e.key === 'Escape') {\n setIsPopoverOpen(false);\n }\n\n setIsPopoverOpen(true);\n\n if (e.key === 'Enter') {\n if (lastAction === 'type' && inputValue.length >= (is24Hour ? 5 : 6)) {\n const time = NeedleTime.fromString(inputValue);\n handleOnClick(time.toString(is24Hour));\n } else if (lastAction === 'type' && !inputValue.includes(':')) {\n const time = NeedleTime.fromString(inputValue);\n if (isValidTime(time.hour, time.minute)) {\n handleOnClick(time.toString(is24Hour));\n }\n setIsPopoverOpen(false);\n } else {\n handleOnClick(timeOptions[focusedIndex]);\n }\n } else if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n setLastAction('arrow');\n handleArrowNavigation(e.key);\n }\n };\n\n const scrollToTime = (startOfTime: string) => {\n const parsedTime = startOfTime.toLowerCase().replace(/[^0-9amp]/g, '');\n let index = -1;\n\n // Handle AM/PM input\n const isPM = parsedTime.includes('p');\n const isAM = parsedTime.includes('a');\n const timeDigits = parsedTime.replace(/[amp]/g, '');\n\n if (timeDigits.length === 1) {\n // Single digit - assume it's an hour\n const hour = `0${timeDigits}`;\n const searchTime = is24Hour\n ? `${hour}:00`\n : `${hour}:00 ${isPM ? 'PM' : 'AM'}`;\n index = timeOptions.indexOf(searchTime);\n } else {\n // Find closest matching time\n const closestTime = timeOptions.find((time) => {\n const timeWithoutSpecialChars = time\n .toLowerCase()\n .replace(/[^0-9amp]/g, '');\n if (isPM || isAM) {\n // If AM/PM specified, match that specifically\n return timeWithoutSpecialChars.startsWith(parsedTime);\n } else {\n // Otherwise just match the numbers\n return timeWithoutSpecialChars\n .replace(/[amp]/g, '')\n .startsWith(timeDigits);\n }\n });\n index = closestTime !== undefined ? timeOptions.indexOf(closestTime) : -1;\n }\n\n if (index !== -1) {\n setFocusedIndex(index);\n }\n\n return index;\n };\n\n /** Custom floating ui solution */\n const isInsideDialog = useIsInsideDialog();\n const isPortaled = isPortaledProp ?? !isInsideDialog;\n const containerRef = useRef<HTMLDivElement>(null);\n const { refs, floatingStyles, context } = useFloating({\n elements: {\n reference: containerRef.current,\n },\n middleware: [\n offset(10),\n flip({\n fallbackPlacements: ['top'],\n fallbackStrategy: 'bestFit',\n }),\n shift({ padding: 5 }),\n ],\n onOpenChange: (open) => {\n setIsPopoverOpen(open);\n },\n open: isDisabled !== true && isReadOnly !== true && isPopoverOpen,\n placement: 'bottom',\n strategy: floatingStrategy ?? (isInsideDialog ? 'fixed' : 'absolute'),\n whileElementsMounted: autoUpdate,\n });\n const dismiss = useDismiss(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n const mergedRef = useMergeRefs([refs.setReference, containerRef]);\n\n return (\n <>\n <div\n className={classNames('ndl-time-picker', className, {\n ...classes,\n })}\n ref={mergedRef}\n {...getReferenceProps()}\n style={{\n width: isFluid === true ? '100%' : 'fit-content',\n }}\n >\n <label className=\"ndl-time-picker-label\">\n {label !== undefined && (\n <Typography\n variant={size === 'large' ? 'body-large' : 'body-medium'}\n >\n {label}\n </Typography>\n )}\n <div\n className=\"ndl-time-picker-input-wrapper\"\n style={{\n width: inputWidth,\n ...style,\n }}\n >\n <input\n aria-label={label} // TODO: handle label natively\n aria-invalid={Boolean(errorToShow)}\n aria-describedby={errorToShow ? errorTextId : undefined}\n className=\"ndl-time-picker-input\"\n type=\"text\"\n ref={inputRef}\n value={inputValue}\n disabled={isDisabled}\n readOnly={isReadOnly}\n required={isRequired}\n onChange={newHandleInputChange}\n onKeyDown={handleKeyDown}\n onClick={() => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n setIsPopoverOpen(true);\n }}\n onBlur={(e) => {\n if (isReadOnly === true || isDisabled === true) {\n return;\n }\n\n if (\n e.relatedTarget?.classList.contains(\n 'ndl-time-picker-popover-item',\n ) === true\n ) {\n return;\n }\n\n if (inputValue.length < 4) {\n setError('Invalid time');\n return;\n }\n\n const time = NeedleTime.fromString(inputValue);\n\n if (time === undefined || time === null) {\n setError('Invalid time');\n return;\n }\n\n if (!isValidTime(time.hour, time.minute)) {\n setError('Invalid time');\n } else {\n setError(undefined);\n setInputValue(time.toString(is24Hour));\n }\n }}\n placeholder={format}\n maxLength={is24Hour ? 5 : 8}\n {...restProps}\n {...htmlAttributes}\n />\n <ClockIconOutline className=\"ndl-icon-svg ndl-time-picker-icon\" />\n </div>\n </label>\n {errorToShow !== undefined && (\n <div className=\"ndl-time-picker-error-wrapper\" role=\"status\">\n <ExclamationCircleIconSolid className=\"ndl-time-picker-error-icon\" />\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-time-picker-error-text\"\n htmlAttributes={{ id: errorTextId }}\n >\n {errorToShow}\n </Typography>\n </div>\n )}\n </div>\n\n {context.open && (\n <ConditionalWrap\n shouldWrap={isPortaled}\n wrap={(wrapChildren) => (\n <FloatingPortal>{wrapChildren}</FloatingPortal>\n )}\n >\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n >\n <div\n ref={refs.setFloating}\n className={classNames(themeClassName, 'ndl-time-picker-popover', {\n ...classes,\n })}\n style={{\n ...transitionStyles,\n ...floatingStyles,\n width:\n isFluid === true\n ? containerRef.current?.clientWidth\n : undefined,\n }}\n {...getFloatingProps()}\n >\n <ul ref={listRef} tabIndex={-1}>\n {timeOptions.map((time, i) => (\n <li\n key={i}\n role=\"option\"\n aria-selected={\n value?.toString(is24Hour) === time ||\n editedInput?.toString(is24Hour) === time\n }\n value={time}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n handleOnClick(time);\n setIsPopoverOpen(false);\n }}\n onMouseDown={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n tabIndex={-1}\n className={classNames(\n focusedIndex === i ? 'focused' : '',\n 'ndl-time-picker-popover-item',\n )}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n e.stopPropagation();\n handleOnClick(time);\n }\n }}\n >\n {time}\n </li>\n ))}\n </ul>\n </div>\n </FloatingFocusManager>\n </ConditionalWrap>\n )}\n </>\n );\n};\n"]}
|
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
export { default as TimePickerDefault } from './time-picker-default.story';
|
|
22
|
+
export { default as TimePickerError } from './time-picker-error.story';
|
|
22
23
|
export { default as TimePickerInDialog } from './time-picker-in-dialog.story';
|
|
23
24
|
import { removeLicenseHeader } from '../../_common/export-stories-utils';
|
|
24
25
|
import TimePickerDefaultSrcRaw from './time-picker-default.story.tsx?raw';
|
|
26
|
+
import TimePickerErrorSrcRaw from './time-picker-error.story.tsx?raw';
|
|
25
27
|
import TimePickerInDialogSrcRaw from './time-picker-in-dialog.story.tsx?raw';
|
|
26
28
|
export const TimePickerDefaultSrc = removeLicenseHeader(TimePickerDefaultSrcRaw);
|
|
29
|
+
export const TimePickerErrorSrc = removeLicenseHeader(TimePickerErrorSrcRaw);
|
|
27
30
|
export const TimePickerInDialogSrc = removeLicenseHeader(TimePickerInDialogSrcRaw);
|
|
28
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,uBAAuB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAE7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,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\nexport { default as TimePickerDefault } from './time-picker-default.story';\nexport { default as TimePickerInDialog } from './time-picker-in-dialog.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TimePickerDefaultSrcRaw from './time-picker-default.story.tsx?raw';\nimport TimePickerInDialogSrcRaw from './time-picker-in-dialog.story.tsx?raw';\n\nexport const TimePickerDefaultSrc = removeLicenseHeader(\n TimePickerDefaultSrcRaw,\n);\nexport const TimePickerInDialogSrc = removeLicenseHeader(\n TimePickerInDialogSrcRaw,\n);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,uBAAuB,MAAM,qCAAqC,CAAC;AAC1E,OAAO,qBAAqB,MAAM,mCAAmC,CAAC;AACtE,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAE7E,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,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\nexport { default as TimePickerDefault } from './time-picker-default.story';\nexport { default as TimePickerError } from './time-picker-error.story';\nexport { default as TimePickerInDialog } from './time-picker-in-dialog.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TimePickerDefaultSrcRaw from './time-picker-default.story.tsx?raw';\nimport TimePickerErrorSrcRaw from './time-picker-error.story.tsx?raw';\nimport TimePickerInDialogSrcRaw from './time-picker-in-dialog.story.tsx?raw';\n\nexport const TimePickerDefaultSrc = removeLicenseHeader(\n TimePickerDefaultSrcRaw,\n);\nexport const TimePickerErrorSrc = removeLicenseHeader(TimePickerErrorSrcRaw);\nexport const TimePickerInDialogSrc = removeLicenseHeader(\n TimePickerInDialogSrcRaw,\n);\n"]}
|
|
@@ -24,7 +24,7 @@ import { TimePicker } from '@neo4j-ndl/react';
|
|
|
24
24
|
import { useState } from 'react';
|
|
25
25
|
const Component = () => {
|
|
26
26
|
const [selectedTime, setSelectedTime] = useState();
|
|
27
|
-
return (_jsx("div", { style: { height: '600px', padding: '20px' }, children: _jsx(TimePicker, { label: "Select Time", value: selectedTime, onChange: (time) => setSelectedTime(time) }) }));
|
|
27
|
+
return (_jsx("div", { style: { height: '600px', padding: '20px' }, children: _jsx(TimePicker, { label: "Select Time", value: selectedTime, onChange: (time) => setSelectedTime(time), htmlAttributes: { id: 'time-picker-input' } }) }));
|
|
28
28
|
};
|
|
29
29
|
export default Component;
|
|
30
30
|
//# sourceMappingURL=time-picker-default.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker-default.story.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/time-picker-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAmB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAc,CAAC;IAE/D,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAC9C,KAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"time-picker-default.story.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/time-picker-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAmB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAc,CAAC;IAE/D,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAC9C,KAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EACzC,cAAc,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,GAC3C,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { type NeedleTime, TimePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedTime, setSelectedTime] = useState<NeedleTime>();\n\n return (\n <div style={{ height: '600px', padding: '20px' }}>\n <TimePicker\n label=\"Select Time\"\n value={selectedTime}\n onChange={(time) => setSelectedTime(time)}\n htmlAttributes={{ id: 'time-picker-input' }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { TimePicker } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [selectedTime, setSelectedTime] = useState();
|
|
27
|
+
return (_jsx("div", { style: { height: '600px', padding: '20px' }, children: _jsx(TimePicker, { label: "Select Time", value: selectedTime, onChange: (time) => setSelectedTime(time), errorText: "Please select a valid time", htmlAttributes: { id: 'time-picker-input' } }) }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=time-picker-error.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker-error.story.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/time-picker-error.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAmB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAc,CAAC;IAE/D,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,YAC9C,KAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EACzC,SAAS,EAAC,4BAA4B,EACtC,cAAc,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,GAC3C,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { type NeedleTime, TimePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedTime, setSelectedTime] = useState<NeedleTime>();\n\n return (\n <div style={{ height: '600px', padding: '20px' }}>\n <TimePicker\n label=\"Select Time\"\n value={selectedTime}\n onChange={(time) => setSelectedTime(time)}\n errorText=\"Please select a valid time\"\n htmlAttributes={{ id: 'time-picker-input' }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -24,7 +24,7 @@ import { Dialog, TimePicker } from '@neo4j-ndl/react';
|
|
|
24
24
|
import { useState } from 'react';
|
|
25
25
|
const Component = () => {
|
|
26
26
|
const [selectedTime, setSelectedTime] = useState();
|
|
27
|
-
return (_jsxs(Dialog, { isOpen: true, "aria-label": "Dialog", children: [_jsx(Dialog.Header, { children: "Using Time Picker inside a dialog" }), _jsx(Dialog.Content, { children: _jsx(TimePicker, { label: "Select Time", value: selectedTime, onChange: (time) => setSelectedTime(time) }) })] }));
|
|
27
|
+
return (_jsxs(Dialog, { isOpen: true, "aria-label": "Dialog", children: [_jsx(Dialog.Header, { children: "Using Time Picker inside a dialog" }), _jsx(Dialog.Content, { children: _jsx(TimePicker, { label: "Select Time", value: selectedTime, onChange: (time) => setSelectedTime(time), htmlAttributes: { id: 'time-picker-input' } }) })] }));
|
|
28
28
|
};
|
|
29
29
|
export default Component;
|
|
30
30
|
//# sourceMappingURL=time-picker-in-dialog.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/time-picker-in-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAmB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAc,CAAC;IAE/D,OAAO,CACL,MAAC,MAAM,IAAC,MAAM,EAAE,IAAI,gBAAa,QAAQ,aACvC,KAAC,MAAM,CAAC,MAAM,oDAAkD,EAChE,KAAC,MAAM,CAAC,OAAO,cACb,KAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"time-picker-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/time-picker/stories/time-picker-in-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAmB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,EAAc,CAAC;IAE/D,OAAO,CACL,MAAC,MAAM,IAAC,MAAM,EAAE,IAAI,gBAAa,QAAQ,aACvC,KAAC,MAAM,CAAC,MAAM,oDAAkD,EAChE,KAAC,MAAM,CAAC,OAAO,cACb,KAAC,UAAU,IACT,KAAK,EAAC,aAAa,EACnB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,EACzC,cAAc,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,GAC3C,GACa,IACV,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,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 { Dialog, type NeedleTime, TimePicker } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selectedTime, setSelectedTime] = useState<NeedleTime>();\n\n return (\n <Dialog isOpen={true} aria-label=\"Dialog\">\n <Dialog.Header>Using Time Picker inside a dialog</Dialog.Header>\n <Dialog.Content>\n <TimePicker\n label=\"Select Time\"\n value={selectedTime}\n onChange={(time) => setSelectedTime(time)}\n htmlAttributes={{ id: 'time-picker-input' }}\n />\n </Dialog.Content>\n </Dialog>\n );\n};\n\nexport default Component;\n"]}
|