@digigov/react-core 2.0.0-rc.4 → 2.0.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{src/AutoCompleteWrapper → AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/AutoCompleteContainer/index.d.ts +22 -0
- package/{AutoCompleteWrapper → AutoCompleteContainer}/index.js +5 -5
- package/AutoCompleteContainer/index.test/index.js +7 -0
- package/{AutoCompleteStatusWrapper → AutoCompleteContainer}/index.test/package.json +1 -1
- package/{AutoCompleteWrapper → AutoCompleteContainer}/package.json +1 -1
- package/AutoCompleteInput/index.d.ts +1 -9
- package/AutoCompleteInput/index.js +2 -4
- package/AutoCompleteInput/index.test/index.js +5 -19
- package/AutoCompleteMultipleInput/index.d.ts +9 -0
- package/AutoCompleteMultipleInput/index.js +21 -0
- package/{AutoCompleteStatusWrapper → AutoCompleteMultipleInput}/package.json +1 -1
- package/AutoCompleteMultipleInputContainer/index.d.ts +12 -0
- package/AutoCompleteMultipleInputContainer/index.js +24 -0
- package/AutoCompleteMultipleInputContainer/package.json +6 -0
- package/AutoCompleteResultList/index.d.ts +1 -10
- package/AutoCompleteResultList/index.js +2 -3
- package/AutoCompleteResultList/index.test/index.js +0 -14
- package/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/AutoCompleteStatus/index.d.ts +1 -1
- package/AutoCompleteStatus/index.js +2 -2
- package/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/AutoCompleteStatusContainer/index.d.ts +10 -0
- package/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.js +5 -5
- package/AutoCompleteStatusContainer/index.test/index.js +7 -0
- package/AutoCompleteStatusContainer/index.test/package.json +6 -0
- package/{AutoCompleteWrapper/index.test → AutoCompleteStatusContainer}/package.json +1 -1
- package/Base/index.js +1 -1
- package/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/FooterContentLogos/index.js +1 -1
- package/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/Hint/index.js +1 -1
- package/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/ImageLogo/index.js +1 -2
- package/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/NormalText/index.js +1 -1
- package/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/PhaseBannerHeaderContainer/index.js +1 -1
- package/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/Unpurge/index.js +1 -1
- package/{AutoCompleteWrapper → cjs/AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/cjs/{AutoCompleteWrapper → AutoCompleteContainer}/index.js +6 -6
- package/cjs/{AutoCompleteWrapper → AutoCompleteContainer}/index.test/index.js +2 -2
- package/cjs/AutoCompleteInput/index.js +2 -4
- package/cjs/AutoCompleteInput/index.test/index.js +5 -19
- package/cjs/AutoCompleteMultipleInput/index.js +28 -0
- package/cjs/AutoCompleteMultipleInputContainer/index.js +31 -0
- package/cjs/AutoCompleteResultList/index.js +2 -3
- package/cjs/AutoCompleteResultList/index.test/index.js +0 -14
- package/cjs/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/AutoCompleteStatus/index.js +2 -2
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.js +6 -6
- package/cjs/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/index.test/index.js +2 -2
- package/cjs/Base/index.js +1 -1
- package/cjs/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/FooterContentLogos/index.js +1 -1
- package/cjs/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/cjs/Hint/index.js +1 -1
- package/cjs/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/cjs/ImageLogo/index.js +1 -2
- package/cjs/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/cjs/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/cjs/NormalText/index.js +1 -1
- package/cjs/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/cjs/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/cjs/PhaseBannerHeaderContainer/index.js +1 -1
- package/cjs/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/cjs/Unpurge/index.js +1 -1
- package/cjs/index.js +26 -4
- package/cjs/registry/index.js +8 -4
- package/index.d.ts +3 -1
- package/index.js +4 -2
- package/lazy.d.ts +4 -4
- package/package.json +3 -3
- package/registry/index.js +8 -4
- package/registry.d.ts +4 -2
- package/{cjs/AutoCompleteWrapper → src/AutoCompleteContainer}/__snapshots__/index.test.tsx.snap +4 -4
- package/src/{AutoCompleteWrapper → AutoCompleteContainer}/index.test.tsx +2 -2
- package/src/{AutoCompleteWrapper → AutoCompleteContainer}/index.tsx +8 -8
- package/src/AutoCompleteInput/index.test.tsx +4 -12
- package/src/AutoCompleteInput/index.tsx +2 -11
- package/src/AutoCompleteMultipleInput/index.tsx +28 -0
- package/src/AutoCompleteMultipleInputContainer/index.tsx +38 -0
- package/src/AutoCompleteResultList/index.test.tsx +0 -20
- package/src/AutoCompleteResultList/index.tsx +1 -13
- package/src/AutoCompleteStatus/__snapshots__/index.test.tsx.snap +2 -2
- package/src/AutoCompleteStatus/index.tsx +2 -2
- package/src/AutoCompleteStatusContainer/__snapshots__/index.test.tsx.snap +16 -0
- package/src/AutoCompleteStatusContainer/index.test.tsx +10 -0
- package/src/AutoCompleteStatusContainer/index.tsx +28 -0
- package/src/Base/index.tsx +5 -5
- package/src/FooterContentLogos/__snapshots__/index.test.tsx.snap +2 -2
- package/src/FooterContentLogos/index.tsx +1 -1
- package/src/Hidden/__snapshots__/index.test.tsx.snap +5 -5
- package/src/Hint/index.tsx +2 -2
- package/src/ImageLogo/__snapshots__/index.test.tsx.snap +2 -2
- package/src/ImageLogo/index.tsx +1 -2
- package/src/ImageLogoSet/__snapshots__/index.test.tsx.snap +10 -10
- package/src/NormalText/__snapshots__/index.test.tsx.snap +60 -60
- package/src/NormalText/index.tsx +2 -2
- package/src/Paragraph/__snapshots__/index.test.tsx.snap +54 -54
- package/src/PhaseBannerHeaderContainer/__snapshots__/inde.test.tsx.snap +2 -2
- package/src/PhaseBannerHeaderContainer/index.tsx +1 -1
- package/src/TabsHeading/__snapshots__/index.test.tsx.snap +3 -3
- package/src/Unpurge/index.tsx +5 -2
- package/src/index.ts +3 -1
- package/src/registry.js +8 -4
- package/AutoCompleteStatusWrapper/index.d.ts +0 -10
- package/AutoCompleteStatusWrapper/index.test/index.js +0 -7
- package/AutoCompleteWrapper/index.d.ts +0 -22
- package/AutoCompleteWrapper/index.test/index.js +0 -7
- package/src/AutoCompleteStatusWrapper/__snapshots__/index.test.tsx.snap +0 -16
- package/src/AutoCompleteStatusWrapper/index.test.tsx +0 -10
- package/src/AutoCompleteStatusWrapper/index.tsx +0 -28
- /package/{AutoCompleteStatusWrapper → AutoCompleteContainer}/index.test.d.ts +0 -0
- /package/{AutoCompleteWrapper → AutoCompleteStatusContainer}/index.test.d.ts +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the AdminContainer with no props 1`] = `
|
|
4
|
-
<ForwardRef(
|
|
4
|
+
<ForwardRef(AutoCompleteContainer)>
|
|
5
5
|
<ForwardRef(Base)
|
|
6
6
|
as="div"
|
|
7
|
-
className="ds-
|
|
7
|
+
className="ds-autocomplete__container"
|
|
8
8
|
>
|
|
9
9
|
<div
|
|
10
|
-
className="ds-
|
|
10
|
+
className="ds-autocomplete__container"
|
|
11
11
|
>
|
|
12
12
|
hello
|
|
13
13
|
</div>
|
|
14
14
|
</ForwardRef(Base)>
|
|
15
|
-
</ForwardRef(
|
|
15
|
+
</ForwardRef(AutoCompleteContainer)>
|
|
16
16
|
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface AutoCompleteContainerProps extends BaseProps<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* width is optional.
|
|
6
|
+
* Use width prop to define a custom width in your component.
|
|
7
|
+
* @value '25%';
|
|
8
|
+
* @value '33.3%';
|
|
9
|
+
* @value '50%';
|
|
10
|
+
* @value '66.6%';
|
|
11
|
+
* @value '75%';
|
|
12
|
+
* @value '100%';
|
|
13
|
+
* @value 'full';
|
|
14
|
+
*/
|
|
15
|
+
width?: '25%' | '33.3%' | '50%' | '66.6%' | '75%' | '100%' | 'full';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* AutoCompleteContainer is a wrapper for autocomplete element.
|
|
19
|
+
* Use AutoCompleteContainer to wrap autocomplete elements.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AutoCompleteContainer: React.ForwardRefExoticComponent<Pick<AutoCompleteContainerProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "width" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default AutoCompleteContainer;
|
|
@@ -5,10 +5,10 @@ import React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Base from '@digigov/react-core/Base';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Use
|
|
8
|
+
* AutoCompleteContainer is a wrapper for autocomplete element.
|
|
9
|
+
* Use AutoCompleteContainer to wrap autocomplete elements.
|
|
10
10
|
*/
|
|
11
|
-
export var
|
|
11
|
+
export var AutoCompleteContainer = /*#__PURE__*/React.forwardRef(function AutoCompleteContainer(_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
width = _ref.width,
|
|
14
14
|
children = _ref.children,
|
|
@@ -16,7 +16,7 @@ export var AutoCompleteWrapper = /*#__PURE__*/React.forwardRef(function AutoComp
|
|
|
16
16
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
17
17
|
as: "div",
|
|
18
18
|
ref: ref,
|
|
19
|
-
className: clsx(className, width === '33.3%' && 'ds-!-width-one-third', width === '66.6%' && 'ds-!-width-two-thirds', width === 'full' && 'ds-!-width-full', width === '25%' && 'ds-!-width-one-quarter', width === '50%' && 'ds-!-width-one-half', width === '75%' && 'ds-!-width-three-quarters', true && 'ds-
|
|
19
|
+
className: clsx(className, width === '33.3%' && 'ds-!-width-one-third', width === '66.6%' && 'ds-!-width-two-thirds', width === 'full' && 'ds-!-width-full', width === '25%' && 'ds-!-width-one-quarter', width === '50%' && 'ds-!-width-one-half', width === '75%' && 'ds-!-width-three-quarters', true && 'ds-autocomplete__container')
|
|
20
20
|
}, props), children);
|
|
21
21
|
});
|
|
22
|
-
export default
|
|
22
|
+
export default AutoCompleteContainer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import AutoCompleteContainer from '@digigov/react-core/AutoCompleteContainer';
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(AutoCompleteContainer, null, "hello");
|
|
5
|
+
it('renders the AdminContainer with no props', function () {
|
|
6
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
+
});
|
|
@@ -8,18 +8,10 @@ export interface AutoCompleteInputProps extends BaseProps<'input'> {
|
|
|
8
8
|
* @value false
|
|
9
9
|
*/
|
|
10
10
|
isFocused?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* showAllValues is optional. The default value is false.
|
|
13
|
-
* showAllValues prop is used to change the css input.
|
|
14
|
-
* @value true
|
|
15
|
-
* @value false
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
showAllValues?: boolean;
|
|
19
11
|
}
|
|
20
12
|
/**
|
|
21
13
|
* AutoCompleteInput component is used to display the value that the user is typing.
|
|
22
14
|
*
|
|
23
15
|
*/
|
|
24
|
-
export declare const AutoCompleteInput: React.ForwardRefExoticComponent<Pick<AutoCompleteInputProps, "form" | "p" | "slot" | "style" | "title" | "pattern" | "as" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "isFocused"
|
|
16
|
+
export declare const AutoCompleteInput: React.ForwardRefExoticComponent<Pick<AutoCompleteInputProps, "form" | "p" | "slot" | "style" | "title" | "pattern" | "as" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "isFocused"> & React.RefAttributes<HTMLInputElement>>;
|
|
25
17
|
export default AutoCompleteInput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["name", "isFocused", "
|
|
3
|
+
var _excluded = ["name", "isFocused", "className"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Base from '@digigov/react-core/Base';
|
|
@@ -11,8 +11,6 @@ import Base from '@digigov/react-core/Base';
|
|
|
11
11
|
export var AutoCompleteInput = /*#__PURE__*/React.forwardRef(function AutoCompleteInput(_ref, ref) {
|
|
12
12
|
var name = _ref.name,
|
|
13
13
|
isFocused = _ref.isFocused,
|
|
14
|
-
_ref$showAllValues = _ref.showAllValues,
|
|
15
|
-
showAllValues = _ref$showAllValues === void 0 ? false : _ref$showAllValues,
|
|
16
14
|
className = _ref.className,
|
|
17
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
16
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
@@ -20,7 +18,7 @@ export var AutoCompleteInput = /*#__PURE__*/React.forwardRef(function AutoComple
|
|
|
20
18
|
type: "text",
|
|
21
19
|
name: name,
|
|
22
20
|
ref: ref,
|
|
23
|
-
className: clsx(className,
|
|
21
|
+
className: clsx(className, isFocused && 'ds-autocomplete__input--focused', true && 'ds-autocomplete__input')
|
|
24
22
|
}, props));
|
|
25
23
|
});
|
|
26
24
|
export default AutoCompleteInput;
|
|
@@ -6,29 +6,15 @@ it('renders the AutoCompleteInput with no props', function () {
|
|
|
6
6
|
expect(mount(_ref)).toMatchSnapshot();
|
|
7
7
|
});
|
|
8
8
|
var _ref2 = /*#__PURE__*/React.createElement(AutoCompleteInput, {
|
|
9
|
-
|
|
9
|
+
isFocused: true
|
|
10
10
|
});
|
|
11
|
-
it('renders the AutoCompleteInput with
|
|
11
|
+
it('renders the AutoCompleteInput with isFocused', function () {
|
|
12
12
|
expect(mount(_ref2)).toMatchSnapshot();
|
|
13
13
|
});
|
|
14
14
|
var _ref3 = /*#__PURE__*/React.createElement(AutoCompleteInput, {
|
|
15
|
-
showAllValues: true
|
|
16
|
-
});
|
|
17
|
-
it('renders the AutoCompleteInput with showAllValues', function () {
|
|
18
|
-
expect(mount(_ref3)).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
var _ref4 = /*#__PURE__*/React.createElement(AutoCompleteInput, {
|
|
21
|
-
isFocused: true,
|
|
22
|
-
showAllValues: true
|
|
23
|
-
});
|
|
24
|
-
it('renders the AutoCompleteInput with showAllValues isFocused', function () {
|
|
25
|
-
expect(mount(_ref4)).toMatchSnapshot();
|
|
26
|
-
});
|
|
27
|
-
var _ref5 = /*#__PURE__*/React.createElement(AutoCompleteInput, {
|
|
28
15
|
name: "some-name",
|
|
29
|
-
isFocused: true
|
|
30
|
-
showAllValues: true
|
|
16
|
+
isFocused: true
|
|
31
17
|
});
|
|
32
|
-
it('renders the AutoCompleteInput with
|
|
33
|
-
expect(mount(
|
|
18
|
+
it('renders the AutoCompleteInput with isFocused and name props', function () {
|
|
19
|
+
expect(mount(_ref3)).toMatchSnapshot();
|
|
34
20
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface AutoCompleteMultipleInputProps extends BaseProps<'input'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* AutoCompleteMultipleInput is used inside AutoCompleteMultipleInputContainer for multiple values input.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AutoCompleteMultipleInput: React.ForwardRefExoticComponent<Pick<AutoCompleteMultipleInputProps, "form" | "p" | "slot" | "style" | "title" | "pattern" | "as" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "alt" | "src" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "list" | "maxLength" | "minLength" | "multiple" | "readOnly" | "required" | "size" | "step" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
export default AutoCompleteMultipleInput;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import Base from '@digigov/react-core/Base';
|
|
7
|
+
/**
|
|
8
|
+
* AutoCompleteMultipleInput is used inside AutoCompleteMultipleInputContainer for multiple values input.
|
|
9
|
+
*/
|
|
10
|
+
export var AutoCompleteMultipleInput = /*#__PURE__*/React.forwardRef(function AutoCompleteMultipleInput(_ref, ref) {
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
className = _ref.className,
|
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
15
|
+
as: "input",
|
|
16
|
+
type: "text",
|
|
17
|
+
ref: ref,
|
|
18
|
+
className: clsx(className, true && 'ds-autocomplete__multi-input')
|
|
19
|
+
}, props), children);
|
|
20
|
+
});
|
|
21
|
+
export default AutoCompleteMultipleInput;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface AutoCompleteMultipleInputContainerProps extends BaseProps<'div'> {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
isFocused?: boolean;
|
|
6
|
+
numberOfSelected?: 1 | 2 | 3 | 'all';
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Use AutoCompleteMultipleInputContainer to accept multiple values input.
|
|
10
|
+
*/
|
|
11
|
+
export declare const AutoCompleteMultipleInputContainer: React.ForwardRefExoticComponent<Pick<AutoCompleteMultipleInputContainerProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "open" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "isFocused" | "numberOfSelected"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export default AutoCompleteMultipleInputContainer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["numberOfSelected", "open", "children", "isFocused", "className"];
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import Base from '@digigov/react-core/Base';
|
|
7
|
+
/**
|
|
8
|
+
* Use AutoCompleteMultipleInputContainer to accept multiple values input.
|
|
9
|
+
*/
|
|
10
|
+
export var AutoCompleteMultipleInputContainer = /*#__PURE__*/React.forwardRef(function AutoCompleteMultipleInputContainer(_ref, ref) {
|
|
11
|
+
var _ref$numberOfSelected = _ref.numberOfSelected,
|
|
12
|
+
numberOfSelected = _ref$numberOfSelected === void 0 ? 'all' : _ref$numberOfSelected,
|
|
13
|
+
open = _ref.open,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
isFocused = _ref.isFocused,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
19
|
+
as: "div",
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: clsx(className, typeof numberOfSelected === 'number' && "ds-autocomplete__multi-input-container--".concat(numberOfSelected), isFocused && 'ds-autocomplete__multi-input-container--focused', true && 'ds-autocomplete__multi-input-container')
|
|
22
|
+
}, props), children);
|
|
23
|
+
});
|
|
24
|
+
export default AutoCompleteMultipleInputContainer;
|
|
@@ -11,19 +11,10 @@ export interface AutoCompleteResultListProps extends BaseProps<'ul'> {
|
|
|
11
11
|
* @default false
|
|
12
12
|
*/
|
|
13
13
|
isVisible?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* displayMenu is optional.
|
|
16
|
-
* Use displayMenu to choose the display of the manue
|
|
17
|
-
* default value is inline.
|
|
18
|
-
*
|
|
19
|
-
* @value 'inline'
|
|
20
|
-
* @value 'overlay'
|
|
21
|
-
*/
|
|
22
|
-
displayMenu?: 'inline' | 'overlay';
|
|
23
14
|
}
|
|
24
15
|
/**
|
|
25
16
|
* AutoCompleteResultList component is used for listing items.
|
|
26
17
|
* This component must contain AutoCompleteResultListItem component.
|
|
27
18
|
*/
|
|
28
|
-
export declare const AutoCompleteResultList: React.ForwardRefExoticComponent<Pick<AutoCompleteResultListProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "isVisible"
|
|
19
|
+
export declare const AutoCompleteResultList: React.ForwardRefExoticComponent<Pick<AutoCompleteResultListProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden" | "isVisible"> & React.RefAttributes<HTMLUListElement>>;
|
|
29
20
|
export default AutoCompleteResultList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["isVisible", "
|
|
3
|
+
var _excluded = ["isVisible", "className", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Base from '@digigov/react-core/Base';
|
|
@@ -11,14 +11,13 @@ import Base from '@digigov/react-core/Base';
|
|
|
11
11
|
export var AutoCompleteResultList = /*#__PURE__*/React.forwardRef(function List(_ref, ref) {
|
|
12
12
|
var _ref$isVisible = _ref.isVisible,
|
|
13
13
|
isVisible = _ref$isVisible === void 0 ? false : _ref$isVisible,
|
|
14
|
-
displayMenu = _ref.displayMenu,
|
|
15
14
|
className = _ref.className,
|
|
16
15
|
children = _ref.children,
|
|
17
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
17
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
19
18
|
as: "ul",
|
|
20
19
|
ref: ref,
|
|
21
|
-
className: clsx(className,
|
|
20
|
+
className: clsx(className, isVisible === false && 'ds-autocomplete__menu--hidden', true && 'ds-autocomplete__menu')
|
|
22
21
|
}, props), children);
|
|
23
22
|
});
|
|
24
23
|
export default AutoCompleteResultList;
|
|
@@ -10,18 +10,4 @@ var _ref2 = /*#__PURE__*/React.createElement(AutoCompleteResultList, {
|
|
|
10
10
|
}, "Hello");
|
|
11
11
|
it('renders the AutoCompleteResultList with isVisible props', function () {
|
|
12
12
|
expect(mount(_ref2)).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
var _ref3 = /*#__PURE__*/React.createElement(AutoCompleteResultList, {
|
|
15
|
-
isVisible: true,
|
|
16
|
-
displayMenu: "inline"
|
|
17
|
-
}, "Hello");
|
|
18
|
-
it('renders the AutoCompleteResultList with isVisible displayMenu="inline props', function () {
|
|
19
|
-
expect(mount(_ref3)).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
var _ref4 = /*#__PURE__*/React.createElement(AutoCompleteResultList, {
|
|
22
|
-
isVisible: true,
|
|
23
|
-
displayMenu: "overlay"
|
|
24
|
-
}, "Hello");
|
|
25
|
-
it('renders the AutoCompleteResultList with isVisible displayMenu="overlay props', function () {
|
|
26
|
-
expect(mount(_ref4)).toMatchSnapshot();
|
|
27
13
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the AdminContainer with no props 1`] = `
|
|
4
|
-
<ForwardRef(
|
|
4
|
+
<ForwardRef(AutoCompleteStatusContainer)>
|
|
5
5
|
<ForwardRef(Base)
|
|
6
6
|
aria-atomic="true"
|
|
7
7
|
aria-live="polite"
|
|
@@ -18,5 +18,5 @@ exports[`renders the AdminContainer with no props 1`] = `
|
|
|
18
18
|
hello
|
|
19
19
|
</div>
|
|
20
20
|
</ForwardRef(Base)>
|
|
21
|
-
</ForwardRef(
|
|
21
|
+
</ForwardRef(AutoCompleteStatusContainer)>
|
|
22
22
|
`;
|
|
@@ -4,7 +4,7 @@ export interface AutoCompleteStatusProps extends BaseProps<'div'> {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* AutoCompleteStatus is a div element for displaying the autocomplete status.
|
|
7
|
-
* Use AutoCompleteStatus inside
|
|
7
|
+
* Use AutoCompleteStatus inside AutoCompleteStatusContainer wrapper.
|
|
8
8
|
*/
|
|
9
9
|
export declare const AutoCompleteStatus: React.ForwardRefExoticComponent<Pick<AutoCompleteStatusProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export default AutoCompleteStatus;
|
|
@@ -6,9 +6,9 @@ import clsx from 'clsx';
|
|
|
6
6
|
import Base from '@digigov/react-core/Base';
|
|
7
7
|
/**
|
|
8
8
|
* AutoCompleteStatus is a div element for displaying the autocomplete status.
|
|
9
|
-
* Use AutoCompleteStatus inside
|
|
9
|
+
* Use AutoCompleteStatus inside AutoCompleteStatusContainer wrapper.
|
|
10
10
|
*/
|
|
11
|
-
export var AutoCompleteStatus = /*#__PURE__*/React.forwardRef(function
|
|
11
|
+
export var AutoCompleteStatus = /*#__PURE__*/React.forwardRef(function AutoCompleteStatusContainer(_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
package/{AutoCompleteStatusWrapper → AutoCompleteStatusContainer}/__snapshots__/index.test.tsx.snap
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`renders the AdminContainer with no props 1`] = `
|
|
4
|
-
<ForwardRef(
|
|
4
|
+
<ForwardRef(AutoCompleteStatusContainer)>
|
|
5
5
|
<ForwardRef(Base)
|
|
6
6
|
as="div"
|
|
7
|
-
className="ds-
|
|
7
|
+
className="ds-autocomplete__status__container"
|
|
8
8
|
>
|
|
9
9
|
<div
|
|
10
|
-
className="ds-
|
|
10
|
+
className="ds-autocomplete__status__container"
|
|
11
11
|
>
|
|
12
12
|
hello
|
|
13
13
|
</div>
|
|
14
14
|
</ForwardRef(Base)>
|
|
15
|
-
</ForwardRef(
|
|
15
|
+
</ForwardRef(AutoCompleteStatusContainer)>
|
|
16
16
|
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '@digigov/react-core/Base';
|
|
3
|
+
export interface AutoCompleteStatusContainerProps extends BaseProps<'div'> {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* AutoCompleteStatusContainer is a wrapper for autocomplete element.
|
|
7
|
+
* Use AutoCompleteStatusContainer to wrap autocomplete elements.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AutoCompleteStatusContainer: React.ForwardRefExoticComponent<Pick<AutoCompleteStatusContainerProps, "p" | "slot" | "style" | "title" | "as" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "margin" | "marginTop" | "marginBottom" | "marginLeft" | "marginRight" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "padding" | "paddingTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "printHidden" | "printVisible" | "xsUpHidden" | "smUpHidden" | "mdUpHidden" | "lgUpHidden" | "xlUpHidden" | "xsHidden" | "smHidden" | "mdHidden" | "lgHidden" | "xlHidden"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default AutoCompleteStatusContainer;
|
|
@@ -5,17 +5,17 @@ import React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import Base from '@digigov/react-core/Base';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* Use
|
|
8
|
+
* AutoCompleteStatusContainer is a wrapper for autocomplete element.
|
|
9
|
+
* Use AutoCompleteStatusContainer to wrap autocomplete elements.
|
|
10
10
|
*/
|
|
11
|
-
export var
|
|
11
|
+
export var AutoCompleteStatusContainer = /*#__PURE__*/React.forwardRef(function AutoCompleteStatusContainer(_ref, ref) {
|
|
12
12
|
var className = _ref.className,
|
|
13
13
|
children = _ref.children,
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
16
16
|
as: "div",
|
|
17
17
|
ref: ref,
|
|
18
|
-
className: clsx(className, true && 'ds-
|
|
18
|
+
className: clsx(className, true && 'ds-autocomplete__status__container')
|
|
19
19
|
}, props), children);
|
|
20
20
|
});
|
|
21
|
-
export default
|
|
21
|
+
export default AutoCompleteStatusContainer;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from 'enzyme';
|
|
3
|
+
import AutoCompleteStatusContainer from '@digigov/react-core/AutoCompleteStatusContainer';
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(AutoCompleteStatusContainer, null, "hello");
|
|
5
|
+
it('renders the AdminContainer with no props', function () {
|
|
6
|
+
expect(mount(_ref)).toMatchSnapshot();
|
|
7
|
+
});
|