@popsure/dirty-swan 0.45.0-alpha → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cjs/index.js +421 -362
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/button/index.d.ts +4 -9
  4. package/dist/cjs/lib/components/button/index.stories.d.ts +2 -10
  5. package/dist/cjs/lib/components/dateSelector/components/Calendar.d.ts +16 -0
  6. package/dist/cjs/lib/components/dateSelector/index.d.ts +5 -7
  7. package/dist/cjs/lib/components/dateSelector/index.stories.d.ts +1 -1
  8. package/dist/cjs/lib/components/input/currency/input.stories.d.ts +7 -0
  9. package/dist/cjs/lib/components/input/index.d.ts +5 -3
  10. package/dist/cjs/lib/components/input/input.stories.d.ts +11 -3
  11. package/dist/cjs/lib/components/input/stories/config.d.ts +7 -0
  12. package/dist/esm/{index-f0e3bc9a.js → Calendar-62c6cf21.js} +24 -150
  13. package/dist/esm/Calendar-62c6cf21.js.map +1 -0
  14. package/dist/esm/components/button/index.js +2 -3
  15. package/dist/esm/components/button/index.js.map +1 -1
  16. package/dist/esm/components/button/index.stories.js +3 -16
  17. package/dist/esm/components/button/index.stories.js.map +1 -1
  18. package/dist/esm/components/card/index.js.map +1 -1
  19. package/dist/esm/components/card/index.stories.js +2 -2
  20. package/dist/esm/components/card/index.stories.js.map +1 -1
  21. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +7 -10
  22. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js.map +1 -1
  23. package/dist/esm/components/comparisonTable/index.js +2 -0
  24. package/dist/esm/components/comparisonTable/index.js.map +1 -1
  25. package/dist/esm/components/dateSelector/components/Calendar.js +11 -0
  26. package/dist/esm/components/dateSelector/components/Calendar.js.map +1 -0
  27. package/dist/esm/components/dateSelector/index.js +203 -7
  28. package/dist/esm/components/dateSelector/index.js.map +1 -1
  29. package/dist/esm/components/dateSelector/index.stories.js +14 -5
  30. package/dist/esm/components/dateSelector/index.stories.js.map +1 -1
  31. package/dist/esm/components/dateSelector/index.test.js +177 -23
  32. package/dist/esm/components/dateSelector/index.test.js.map +1 -1
  33. package/dist/esm/components/icon/icons/Info.js +2 -2
  34. package/dist/esm/components/icon/icons/Info.js.map +1 -1
  35. package/dist/esm/components/icon/icons.stories.js +1 -1
  36. package/dist/esm/components/icon/index.stories.js +1 -1
  37. package/dist/esm/components/input/currency/input.stories.js +1 -1
  38. package/dist/esm/components/input/iban/index.js +1 -1
  39. package/dist/esm/components/input/iban/index.js.map +1 -1
  40. package/dist/esm/components/input/index.js +10 -7
  41. package/dist/esm/components/input/index.js.map +1 -1
  42. package/dist/esm/components/input/input.stories.js +3 -3
  43. package/dist/esm/components/input/input.stories.js.map +1 -1
  44. package/dist/esm/{config-56f12c98.js → config-1d276a9d.js} +7 -2
  45. package/dist/esm/config-1d276a9d.js.map +1 -0
  46. package/dist/esm/{index-03b0133a.js → index-e506c4ca.js} +3 -3
  47. package/dist/esm/{index-03b0133a.js.map → index-e506c4ca.js.map} +1 -1
  48. package/dist/esm/index.js +4 -3
  49. package/dist/esm/index.js.map +1 -1
  50. package/dist/esm/lib/components/button/index.d.ts +4 -9
  51. package/dist/esm/lib/components/button/index.stories.d.ts +2 -10
  52. package/dist/esm/lib/components/dateSelector/components/Calendar.d.ts +16 -0
  53. package/dist/esm/lib/components/dateSelector/index.d.ts +5 -7
  54. package/dist/esm/lib/components/dateSelector/index.stories.d.ts +1 -1
  55. package/dist/esm/lib/components/input/currency/input.stories.d.ts +7 -0
  56. package/dist/esm/lib/components/input/index.d.ts +5 -3
  57. package/dist/esm/lib/components/input/input.stories.d.ts +11 -3
  58. package/dist/esm/lib/components/input/stories/config.d.ts +7 -0
  59. package/package.json +1 -1
  60. package/src/lib/components/button/index.stories.tsx +1 -26
  61. package/src/lib/components/button/index.tsx +10 -21
  62. package/src/lib/components/card/index.tsx +1 -1
  63. package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +5 -30
  64. package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +6 -2
  65. package/src/lib/components/dateSelector/components/Calendar.tsx +112 -0
  66. package/src/lib/components/dateSelector/{datepicker.scss → components/datepicker.scss} +4 -4
  67. package/src/lib/components/dateSelector/components/style.module.scss +3 -0
  68. package/src/lib/components/dateSelector/index.stories.tsx +18 -8
  69. package/src/lib/components/dateSelector/index.test.tsx +118 -20
  70. package/src/lib/components/dateSelector/index.tsx +196 -227
  71. package/src/lib/components/dateSelector/style.module.scss +6 -79
  72. package/src/lib/components/input/iban/index.tsx +1 -1
  73. package/src/lib/components/input/index.tsx +13 -7
  74. package/src/lib/components/input/input.stories.tsx +2 -0
  75. package/src/lib/components/input/stories/config.ts +6 -1
  76. package/src/lib/components/input/style.module.scss +8 -1
  77. package/dist/esm/config-56f12c98.js.map +0 -1
  78. package/dist/esm/index-f0e3bc9a.js.map +0 -1
  79. package/src/lib/components/dateSelector/icons/chevron-left.svg +0 -3
  80. package/src/lib/components/dateSelector/icons/chevron-right.svg +0 -3
  81. package/src/lib/components/dateSelector/index.test.ts +0 -33
@@ -1,9 +1,6 @@
1
- import React, { ReactElement, ElementType, ComponentProps, ReactNode } from 'react';
1
+ import React, { ReactElement, ReactNode } from 'react';
2
2
  declare type ButtonVariant = 'filledColor' | 'filledGray' | 'filledWhite' | 'textColor' | 'textWhite' | 'outlineWhite' | 'filledSuccess' | 'filledError';
3
- declare const buttonDefaultAs: "button";
4
- declare type ButtonDefaultAsType = typeof buttonDefaultAs;
5
- declare type ButtonOwnProps<E> = {
6
- as?: E;
3
+ declare type ButtonProps = {
7
4
  children: ReactNode;
8
5
  variant?: ButtonVariant;
9
6
  leftIcon?: ReactElement;
@@ -11,15 +8,13 @@ declare type ButtonOwnProps<E> = {
11
8
  loading?: boolean;
12
9
  hideLabel?: boolean;
13
10
  } & Omit<JSX.IntrinsicElements['button'], 'children'>;
14
- export declare type ButtonProps<E extends ElementType = ButtonDefaultAsType> = ButtonOwnProps<E> & Omit<ComponentProps<E>, keyof ButtonOwnProps<E>>;
15
11
  declare const Button: React.ForwardRefExoticComponent<Pick<{
16
- as?: React.ElementType<any> | undefined;
17
12
  children: ReactNode;
18
13
  variant?: ButtonVariant | undefined;
19
14
  leftIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
20
15
  rightIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
21
16
  loading?: boolean | undefined;
22
17
  hideLabel?: boolean | undefined;
23
- } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children"> & Omit<any, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "leftIcon" | "rightIcon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "hideLabel" | keyof React.ClassAttributes<HTMLButtonElement> | "as" | "variant" | "loading">, string | number | symbol> & React.RefAttributes<"symbol" | "object" | React.ComponentClass<any, any> | React.FunctionComponent<any> | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">>;
18
+ } & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "placeholder" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "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" | "hideLabel" | "loading" | "variant" | "leftIcon" | "rightIcon"> & React.RefAttributes<HTMLButtonElement>>;
24
19
  export { Button };
25
- export type { ButtonVariant };
20
+ export type { ButtonProps, ButtonVariant };
@@ -3,21 +3,14 @@ import { ButtonProps, ButtonVariant } from '.';
3
3
  declare const story: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<Pick<{
6
- as?: import("react").ElementType<any> | undefined;
7
6
  children: import("react").ReactNode;
8
7
  variant?: ButtonVariant | undefined;
9
8
  leftIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
10
9
  rightIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
11
10
  loading?: boolean | undefined;
12
11
  hideLabel?: boolean | undefined;
13
- } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children"> & Omit<any, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "leftIcon" | "rightIcon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "hideLabel" | keyof import("react").ClassAttributes<HTMLButtonElement> | "as" | "variant" | "loading">, string | number | symbol> & import("react").RefAttributes<"symbol" | "object" | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noindex" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "webview" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">>;
12
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "placeholder" | "value" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "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" | "hideLabel" | "loading" | "variant" | "leftIcon" | "rightIcon"> & import("react").RefAttributes<HTMLButtonElement>>;
14
13
  argTypes: {
15
- as: {
16
- control: {
17
- type: string;
18
- };
19
- description: string;
20
- };
21
14
  children: {
22
15
  control: {
23
16
  type: string;
@@ -57,7 +50,7 @@ declare const story: {
57
50
  };
58
51
  };
59
52
  export declare const ButtonStory: {
60
- ({ as, className, loading, children, variant, hideLabel }: ButtonProps): JSX.Element;
53
+ ({ className, loading, children, variant, hideLabel }: ButtonProps): JSX.Element;
61
54
  storyName: string;
62
55
  };
63
56
  export declare const ButtonVariants: ({ children, onClick }: ButtonProps) => JSX.Element;
@@ -66,5 +59,4 @@ export declare const ButtonWithIcons: ({ children, onClick }: ButtonProps) => JS
66
59
  export declare const ButtonWithIconOnly: ({ children, onClick }: ButtonProps) => JSX.Element;
67
60
  export declare const ButtonLoading: ({ children, onClick }: ButtonProps) => JSX.Element;
68
61
  export declare const ButtonDisabled: ({ children, onClick }: ButtonProps) => JSX.Element;
69
- export declare const ButtonAsOtherComponents: ({ children, as, onClick }: ButtonProps) => JSX.Element;
70
62
  export default story;
@@ -0,0 +1,16 @@
1
+ import './datepicker.scss';
2
+ export interface CalendarProps {
3
+ dateFormat: string;
4
+ value?: string;
5
+ onChange: (date: string) => void;
6
+ yearBoundaries: {
7
+ min: number;
8
+ max: number;
9
+ };
10
+ displayCalendar?: boolean;
11
+ dayjsLocale?: ILocale;
12
+ firstDayOfWeek?: number;
13
+ isOpen?: boolean;
14
+ setCalendarOpen: (isOpen: boolean) => void;
15
+ }
16
+ export declare const Calendar: ({ dateFormat, value, onChange, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, setCalendarOpen, isOpen }: CalendarProps) => JSX.Element | null;
@@ -1,9 +1,3 @@
1
- import './datepicker.scss';
2
- export declare const fillArray: (from: number, to: number) => number[];
3
- export declare const daysInMonthOfYear: ({ month, year, }: {
4
- month: number;
5
- year: number;
6
- }) => number;
7
1
  export interface DateSelectorProps {
8
2
  value?: string;
9
3
  onChange: (date: string) => void;
@@ -15,9 +9,13 @@ export interface DateSelectorProps {
15
9
  dayjsLocale?: ILocale;
16
10
  placeholders?: {
17
11
  day?: string;
12
+ dayFormat?: string;
18
13
  month?: string;
14
+ monthFormat?: string;
19
15
  year?: string;
16
+ yearFormat?: string;
17
+ error?: string;
20
18
  };
21
19
  firstDayOfWeek?: number;
22
20
  }
23
- export declare const DateSelector: ({ value, onChange, yearBoundaries, displayCalendar, placeholders, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
21
+ export declare const DateSelector: ({ value, onChange, placeholders: placeholdersProps, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { DateSelectorProps } from '.';
2
2
  declare const story: {
3
3
  title: string;
4
- component: ({ value, onChange, yearBoundaries, displayCalendar, placeholders, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
4
+ component: ({ value, onChange, placeholders: placeholdersProps, yearBoundaries, displayCalendar, dayjsLocale, firstDayOfWeek, }: DateSelectorProps) => JSX.Element;
5
5
  decorators: ((Story: any) => JSX.Element)[];
6
6
  argTypes: {
7
7
  yearBoundaries: {
@@ -38,6 +38,13 @@ declare const story: {
38
38
  type: string;
39
39
  };
40
40
  };
41
+ labelInsideInput: {
42
+ description: string;
43
+ defaultValue: boolean;
44
+ control: {
45
+ type: string;
46
+ };
47
+ };
41
48
  prefix: {
42
49
  description: string;
43
50
  defaultValue: string;
@@ -1,15 +1,17 @@
1
1
  import React from 'react';
2
2
  export declare type InputProps = Omit<JSX.IntrinsicElements['input'], 'enterKeyHint'> & Partial<Pick<JSX.IntrinsicElements['input'], 'enterKeyHint'>> & {
3
- error?: string;
3
+ error?: string | boolean;
4
4
  prefix?: string;
5
5
  label?: string;
6
6
  id?: string;
7
7
  hideLabel?: boolean;
8
+ labelInsideInput?: boolean;
8
9
  };
9
10
  export declare const Input: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint"> & Partial<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint">> & {
10
- error?: string | undefined;
11
+ error?: string | boolean | undefined;
11
12
  prefix?: string | undefined;
12
13
  label?: string | undefined;
13
14
  id?: string | undefined;
14
15
  hideLabel?: boolean | undefined;
15
- }, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "step" | "disabled" | "enterKeyHint" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "src" | "width" | "hideLabel"> & React.RefAttributes<HTMLInputElement>>;
16
+ labelInsideInput?: boolean | undefined;
17
+ }, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "enterKeyHint" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "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" | "hideLabel" | "labelInsideInput"> & React.RefAttributes<HTMLInputElement>>;
@@ -3,12 +3,13 @@ import { InputProps } from '.';
3
3
  declare const story: {
4
4
  title: string;
5
5
  component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint"> & Partial<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "enterKeyHint">> & {
6
- error?: string | undefined;
6
+ error?: string | boolean | undefined;
7
7
  prefix?: string | undefined;
8
8
  label?: string | undefined;
9
9
  id?: string | undefined;
10
10
  hideLabel?: boolean | undefined;
11
- }, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "step" | "disabled" | "enterKeyHint" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "required" | "src" | "width" | "hideLabel"> & import("react").RefAttributes<HTMLInputElement>>;
11
+ labelInsideInput?: boolean | undefined;
12
+ }, "className" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "children" | "onClick" | "error" | "size" | "color" | "hidden" | "type" | "list" | "enterKeyHint" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "src" | "step" | "value" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "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" | "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" | "hideLabel" | "labelInsideInput"> & import("react").RefAttributes<HTMLInputElement>>;
12
13
  argTypes: {
13
14
  value: {
14
15
  defaultValue: string;
@@ -45,6 +46,13 @@ declare const story: {
45
46
  type: string;
46
47
  };
47
48
  };
49
+ labelInsideInput: {
50
+ description: string;
51
+ defaultValue: boolean;
52
+ control: {
53
+ type: string;
54
+ };
55
+ };
48
56
  prefix: {
49
57
  description: string;
50
58
  defaultValue: string;
@@ -84,7 +92,7 @@ declare const story: {
84
92
  };
85
93
  };
86
94
  export declare const InputStory: {
87
- ({ onChange, className, placeholder, value, label, hideLabel, prefix, error }: InputProps): JSX.Element;
95
+ ({ onChange, className, placeholder, value, label, hideLabel, labelInsideInput, prefix, error }: InputProps): JSX.Element;
88
96
  storyName: string;
89
97
  };
90
98
  export default story;
@@ -34,6 +34,13 @@ declare const sharedConfig: {
34
34
  type: string;
35
35
  };
36
36
  };
37
+ labelInsideInput: {
38
+ description: string;
39
+ defaultValue: boolean;
40
+ control: {
41
+ type: string;
42
+ };
43
+ };
37
44
  prefix: {
38
45
  description: string;
39
46
  defaultValue: string;
@@ -1,9 +1,10 @@
1
1
  import { _ as __assign } from './tslib.es6-5bc94358.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import require$$0__default, { useEffect, useState, useRef } from 'react';
3
+ import require$$0__default, { useEffect, useRef } from 'react';
4
4
  import { c as commonjsGlobal, a as getDefaultExportFromCjs } from './_commonjsHelpers-e7f67fd8.js';
5
5
  import CalendarIcon from './components/icon/icons/Calendar.js';
6
6
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
+ import { Button } from './components/button/index.js';
7
8
 
8
9
  var dayjs_min = {exports: {}};
9
10
 
@@ -13,14 +14,6 @@ var dayjs_min = {exports: {}};
13
14
 
14
15
  var dayjs = dayjs_min.exports;
15
16
 
16
- var localeData$1 = {exports: {}};
17
-
18
- (function (module, exports) {
19
- !function(n,e){module.exports=e();}(commonjsGlobal,(function(){return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.substr(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return {months:function(e){return e?e.format("MMMM"):u(n,"months")},monthsShort:function(e){return e?e.format("MMM"):u(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):u(n,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):u(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):u(n,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return {firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),"months")},t.monthsShort=function(){return u(i(),"monthsShort","months",3)},t.weekdays=function(n){return u(i(),"weekdays",null,null,n)},t.weekdaysShort=function(n){return u(i(),"weekdaysShort","weekdays",3,n)},t.weekdaysMin=function(n){return u(i(),"weekdaysMin","weekdays",2,n)};}}));
20
- }(localeData$1));
21
-
22
- var localeData = localeData$1.exports;
23
-
24
17
  var build = {};
25
18
 
26
19
  var DayPicker$2 = {};
@@ -1995,39 +1988,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1995
1988
 
1996
1989
  var DayPicker = /*@__PURE__*/getDefaultExportFromCjs(build);
1997
1990
 
1998
- var customParseFormat$1 = {exports: {}};
1999
-
2000
- (function (module, exports) {
2001
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
2002
- }(customParseFormat$1));
2003
-
2004
- var customParseFormat = customParseFormat$1.exports;
2005
-
2006
- function zerofill(input, size) {
2007
- if (size === void 0) { size = 2; }
2008
- var toReturn = String(input);
2009
- while (toReturn.length < size) {
2010
- toReturn = '0' + toReturn;
2011
- }
2012
- return toReturn;
2013
- }
2014
-
2015
- dayjs.extend(customParseFormat);
2016
- function calendarDateToISODate(calendarDate) {
2017
- return calendarDate.year + "-" + zerofill(calendarDate.month) + "-" + zerofill(calendarDate.day);
2018
- }
2019
- function isoStringtoCalendarDate(input) {
2020
- var date = dayjs(input, 'YYYY-MM-DD');
2021
- var dateValidity = dayjs(input, 'YYYY-MM-DD', true).isValid();
2022
- if (dateValidity === false) {
2023
- return;
2024
- }
2025
- var year = date.year();
2026
- var month = date.get('month');
2027
- var day = date.date();
2028
- return { year: year, month: month + 1, day: day };
2029
- }
2030
-
2031
1991
  var useOnClickOutside = function (ref, callback) {
2032
1992
  useEffect(function () {
2033
1993
  var listener = function (event) {
@@ -2045,59 +2005,18 @@ var useOnClickOutside = function (ref, callback) {
2045
2005
  }, [ref, callback]);
2046
2006
  };
2047
2007
 
2048
- var css_248z = ".style-module_container__3bJf5 {\n display: flex;\n align-items: center;\n}\n\n.style-module_date-selector-container__165Ii {\n margin-left: -8px;\n display: flex;\n}\n.style-module_date-selector-container__165Ii > select {\n margin-left: 8px;\n}\n@media (max-width: 34rem) {\n .style-module_date-selector-container__165Ii > select {\n margin-left: 0;\n }\n}\n@media (max-width: 34rem) {\n .style-module_date-selector-container__165Ii {\n margin-left: 0;\n display: unset;\n }\n}\n\n.style-module_row-container__2J4YP > select {\n margin-left: 8px;\n}\n@media (max-width: 34rem) {\n .style-module_row-container__2J4YP > select {\n margin-left: 0;\n }\n}\n@media (max-width: 34rem) {\n .style-module_row-container__2J4YP {\n display: flex;\n justify-content: space-between;\n }\n}\n\n.style-module_day-select__pHm0x {\n width: 88px;\n}\n@media (max-width: 34rem) {\n .style-module_day-select__pHm0x {\n flex: 1;\n margin-right: 8px;\n }\n}\n\n.style-module_month-select__2RXk9 {\n width: 104px;\n}\n@media (max-width: 34rem) {\n .style-module_month-select__2RXk9 {\n flex: 1;\n }\n}\n\n.style-module_year-select__8HXni {\n width: 104px;\n}\n@media (max-width: 34rem) {\n .style-module_year-select__8HXni {\n display: block;\n margin-top: 8px;\n width: 100%;\n }\n}\n\n.style-module_date-calendar-container__2ERYZ {\n position: relative;\n margin-left: 24px;\n}\n@media (max-width: 34rem) {\n .style-module_date-calendar-container__2ERYZ {\n margin-left: 16px;\n }\n}\n\n.style-module_calendarButton__UpA2t {\n background: none;\n border: none;\n padding: 0;\n margin: 0;\n color: inherit;\n text-align: inherit;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n cursor: pointer;\n}\n\n.style-module_calendarIcon__bNDfo {\n margin: 0px;\n}";
2049
- var styles = {"container":"style-module_container__3bJf5","date-selector-container":"style-module_date-selector-container__165Ii","row-container":"style-module_row-container__2J4YP","day-select":"style-module_day-select__pHm0x","month-select":"style-module_month-select__2RXk9","year-select":"style-module_year-select__8HXni","date-calendar-container":"style-module_date-calendar-container__2ERYZ","calendarButton":"style-module_calendarButton__UpA2t","calendarIcon":"style-module_calendarIcon__bNDfo"};
2008
+ var css_248z = ".style-module_container__3SY_g {\n position: relative;\n}";
2009
+ var styles = {"container":"style-module_container__3SY_g"};
2050
2010
  styleInject(css_248z);
2051
2011
 
2052
- dayjs.extend(localeData);
2053
- var COLLECTABLE_DATE_FORMAT = 'YYYY-MM-DD';
2054
- /*
2055
- Fill an array with an increment from a number to another number.
2056
- i.e. fillArray from 1 to 4 will return the following: [1, 2, 3, 4]
2057
-
2058
- You can fill descending by flipping the to value
2059
- i.e. fillArray from 4 to 1 will return the following: [4, 3, 2, 1]
2060
- */
2061
- var fillArray = function (from, to) {
2062
- var ascending = from > to;
2063
- var arraySize = Math.abs(from - to) + 1;
2064
- var toReturn = new Array(arraySize).fill(0).map(function (_, index) {
2065
- return ascending ? to + index : from + index;
2066
- });
2067
- if (ascending) {
2068
- return toReturn.reverse();
2069
- }
2070
- return toReturn;
2071
- };
2072
- /*
2073
- Return the maximum number of days given a month and a year.
2074
- */
2075
- var daysInMonthOfYear = function (_a) {
2076
- var month = _a.month, year = _a.year;
2077
- return dayjs(year + "-" + month).daysInMonth();
2078
- };
2079
- var DateSelector = function (_a) {
2080
- var _b, _c, _d;
2081
- var value = _a.value, onChange = _a.onChange, yearBoundaries = _a.yearBoundaries, displayCalendar = _a.displayCalendar, placeholders = _a.placeholders, dayjsLocale = _a.dayjsLocale, _e = _a.firstDayOfWeek, firstDayOfWeek = _e === void 0 ? 0 : _e;
2082
- var calendarDateValue = value ? isoStringtoCalendarDate(value) : undefined;
2083
- var daysInSelectedDate = calendarDateValue
2084
- ? daysInMonthOfYear({
2085
- month: calendarDateValue.month,
2086
- year: calendarDateValue.year,
2087
- })
2088
- : 31;
2012
+ var Calendar = function (_a) {
2013
+ var dateFormat = _a.dateFormat, value = _a.value, onChange = _a.onChange, yearBoundaries = _a.yearBoundaries, displayCalendar = _a.displayCalendar, dayjsLocale = _a.dayjsLocale, firstDayOfWeek = _a.firstDayOfWeek, setCalendarOpen = _a.setCalendarOpen, isOpen = _a.isOpen;
2089
2014
  var localeDate = dayjsLocale
2090
2015
  ? dayjs().locale(dayjsLocale).localeData()
2091
2016
  : dayjs().locale('en').localeData();
2092
2017
  var localizedWeekdays = localeDate.weekdays();
2093
2018
  var localizedWeekdaysShort = localeDate.weekdaysShort();
2094
2019
  var localizedMonths = localeDate.months();
2095
- var localizedMonthsShort = localeDate.monthsShort();
2096
- var availableDays = fillArray(1, daysInSelectedDate);
2097
- var availableYears = fillArray(yearBoundaries.max, yearBoundaries.min);
2098
- var availableMonths = localizedMonthsShort;
2099
- var _f = useState(calendarDateValue !== null && calendarDateValue !== void 0 ? calendarDateValue : {}), date = _f[0], setDate = _f[1];
2100
- var _g = useState(false), openCalendar = _g[0], setOpenCalendar = _g[1];
2101
2020
  var calendarContainerRef = useRef(null);
2102
2021
  var calendarDefaultDate = dayjs().year() >= yearBoundaries.min && dayjs().year() <= yearBoundaries.max
2103
2022
  ? dayjs().toDate()
@@ -2111,68 +2030,23 @@ var DateSelector = function (_a) {
2111
2030
  var dateCalendarToMonth = dayjs(String(yearBoundaries.max))
2112
2031
  .endOf('year')
2113
2032
  .toDate();
2114
- useOnClickOutside(calendarContainerRef, function () { return setOpenCalendar(false); });
2115
- useEffect(function () {
2116
- if (calendarDateValue) {
2117
- setDate(calendarDateValue);
2118
- }
2119
- }, [value]); //eslint-disable-line react-hooks/exhaustive-deps
2120
- useEffect(function () {
2121
- if (date.year !== undefined &&
2122
- date.month !== undefined &&
2123
- date.day !== undefined) {
2124
- if (calendarDateValue === undefined ||
2125
- date.day !== calendarDateValue.day ||
2126
- date.month !== calendarDateValue.month ||
2127
- date.year !== calendarDateValue.year) {
2128
- onChange(calendarDateToISODate({
2129
- day: date.day,
2130
- month: date.month,
2131
- year: date.year,
2132
- }));
2133
- }
2134
- }
2135
- }, [date]); //eslint-disable-line react-hooks/exhaustive-deps
2136
- var handleOnChange = function (key, v) {
2137
- var _a;
2138
- var newValue = __assign(__assign({}, date), (_a = {}, _a[key] = v, _a));
2139
- if (key !== 'day' &&
2140
- newValue.month !== undefined &&
2141
- newValue.year !== undefined &&
2142
- newValue.day !== undefined) {
2143
- var cappedDays = Math.min(daysInMonthOfYear({ month: newValue.month, year: newValue.year }), newValue.day);
2144
- setDate(__assign(__assign({}, newValue), { day: cappedDays }));
2145
- }
2146
- else {
2147
- setDate(newValue);
2148
- }
2149
- setOpenCalendar(false);
2150
- };
2151
- return (jsxs("div", __assign({ className: styles.container }, { children: [jsxs("div", __assign({ className: styles['date-selector-container'] }, { children: [jsxs("div", __assign({ className: styles['row-container'] }, { children: [jsxs("select", __assign({ "data-cy": "date-selector-day", className: "p-select " + styles['day-select'], id: "day", name: "day", required: true, value: (_b = date.day) !== null && _b !== void 0 ? _b : '', onChange: function (e) {
2152
- handleOnChange('day', parseInt(e.target.value, 10));
2153
- } }, { children: [jsx("option", __assign({ value: "", disabled: true }, { children: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.day) || 'Day' }), void 0),
2154
- availableDays.map(function (day) { return (jsx("option", __assign({ value: day }, { children: day }), day)); })] }), void 0),
2155
- jsxs("select", __assign({ "data-cy": "date-selector-month", className: "p-select " + styles['month-select'], id: "month", name: "month", required: true, value: (_c = date.month) !== null && _c !== void 0 ? _c : '', onChange: function (e) {
2156
- handleOnChange('month', parseInt(e.target.value, 10));
2157
- } }, { children: [jsx("option", __assign({ value: "", disabled: true }, { children: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.month) || 'Month' }), void 0),
2158
- availableMonths.map(function (month, i) { return (jsx("option", __assign({ value: i + 1 }, { children: month }), month)); })] }), void 0)] }), void 0),
2159
- jsxs("select", __assign({ "data-cy": "date-selector-year", className: "p-select " + styles['year-select'], id: "year", name: "year", required: true, value: (_d = date.year) !== null && _d !== void 0 ? _d : '', onChange: function (e) {
2160
- handleOnChange('year', parseInt(e.target.value, 10));
2161
- } }, { children: [jsx("option", __assign({ value: "", disabled: true }, { children: (placeholders === null || placeholders === void 0 ? void 0 : placeholders.year) || 'Year' }), void 0),
2162
- availableYears.map(function (year) { return (jsx("option", __assign({ value: year }, { children: year }), year)); })] }), void 0)] }), void 0),
2163
- displayCalendar && (jsxs("div", __assign({ className: styles['date-calendar-container'], ref: calendarContainerRef }, { children: [jsx("button", __assign({ type: "button", onClick: function () { return setOpenCalendar(!openCalendar); }, className: styles.calendarButton, "data-testid": "calendar-button" }, { children: jsx(CalendarIcon, { color: 'purple-500', size: 24, className: "" + styles.calendarIcon }, void 0) }), void 0),
2164
- openCalendar && (jsx(DayPicker, { month: selectedDateInDateType, showOutsideDays: true, fromMonth: dateCalendarFromMonth, toMonth: dateCalendarToMonth, selectedDays: selectedDateInDateType, onDayClick: function (date) {
2165
- if (dayjs(date).isAfter(dateCalendarFromMonth) ||
2166
- dayjs(date).isBefore(dateCalendarToMonth)) {
2167
- var selectedDate = dayjs(date).format(COLLECTABLE_DATE_FORMAT);
2168
- onChange(selectedDate);
2169
- setOpenCalendar(false);
2170
- }
2171
- }, pagedNavigation: true, disabledDays: {
2172
- before: dateCalendarFromMonth,
2173
- after: dateCalendarToMonth,
2174
- }, firstDayOfWeek: firstDayOfWeek, locale: (dayjsLocale === null || dayjsLocale === void 0 ? void 0 : dayjsLocale.name) || 'en', months: localizedMonths, weekdaysLong: localizedWeekdays, weekdaysShort: localizedWeekdaysShort }, void 0))] }), void 0))] }), void 0));
2033
+ useOnClickOutside(calendarContainerRef, function () { return setCalendarOpen(false); });
2034
+ if (!displayCalendar) {
2035
+ return null;
2036
+ }
2037
+ return (jsxs("div", __assign({ className: styles.container + " ml8", ref: calendarContainerRef }, { children: [jsx(Button, __assign({ onClick: function () { return setCalendarOpen(!isOpen); }, "data-testid": "calendar-button", hideLabel: true, variant: 'textColor', leftIcon: jsx(CalendarIcon, {}, void 0) }, { children: "Select date" }), void 0),
2038
+ isOpen && (jsx(DayPicker, { month: selectedDateInDateType, showOutsideDays: true, fromMonth: dateCalendarFromMonth, toMonth: dateCalendarToMonth, selectedDays: selectedDateInDateType, onDayClick: function (date) {
2039
+ if (dayjs(date).isAfter(dateCalendarFromMonth) ||
2040
+ dayjs(date).isBefore(dateCalendarToMonth)) {
2041
+ var selectedDate = dayjs(date).format(dateFormat);
2042
+ onChange(selectedDate);
2043
+ setCalendarOpen(false);
2044
+ }
2045
+ }, pagedNavigation: true, disabledDays: {
2046
+ before: dateCalendarFromMonth,
2047
+ after: dateCalendarToMonth,
2048
+ }, firstDayOfWeek: firstDayOfWeek, locale: (dayjsLocale === null || dayjsLocale === void 0 ? void 0 : dayjsLocale.name) || 'en', months: localizedMonths, weekdaysLong: localizedWeekdays, weekdaysShort: localizedWeekdaysShort }, void 0))] }), void 0));
2175
2049
  };
2176
2050
 
2177
- export { DateSelector as D, daysInMonthOfYear as a, dayjs_min as d, fillArray as f };
2178
- //# sourceMappingURL=index-f0e3bc9a.js.map
2051
+ export { Calendar as C, dayjs as a, dayjs_min as d };
2052
+ //# sourceMappingURL=Calendar-62c6cf21.js.map