@muraldevkit/ui-toolkit 4.18.0 → 4.20.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.
package/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # Mural's UI Toolkit
2
+
2
3
  Shared React components for use across the Mural platform.
3
4
 
4
5
  ## Table of contents
6
+
5
7
  - [Quick start](#quick-start)
6
8
  - [Documentation](#documentation)
7
9
  - [Component standards](./src/storybook_docs/getting-started/component-standards.mdx)
8
10
  - [Contribution Guide](./CONTRIBUTING.md)
11
+
9
12
  ## Quick start
10
13
 
11
14
  We use Storybook as both a living documentation site and dev environment. To get started:
@@ -15,6 +18,7 @@ We use Storybook as both a living documentation site and dev environment. To get
15
18
  - `npm run dev`
16
19
 
17
20
  To run tests locally:
21
+
18
22
  - `npm run test`
19
23
 
20
24
  If you need to verify your local changes in an external project see our [Local Environment Guide](./docs/local-development.md).
@@ -24,14 +28,14 @@ If you need to verify your local changes in an external project see our [Local E
24
28
  Within the project you'll find the `src/` directory, which logically groups components together. For more information on our components see our [Component standards](./src/storybook_docs/getting-started/component-standards.mdx)
25
29
 
26
30
  ## Documentation
31
+
27
32
  ### Usage
33
+
28
34
  The source of truth for component and token documentation is at http://uitoolkit.mural.co/. Sign in with your Google account and explore.
29
35
  If you have any questions or feedback, please let us know in slack `#ask-fe-platform`
30
36
 
31
37
  ### Development
32
- Our doc site uses Storybook as living documentation and dev environment. We support [mdx](https://mdxjs.com/) files and standard Storybook files, we use [CSF version 3](https://storybook.js.org/blog/component-story-format-3-0/). You can find examples on how to add markdown docs to the doc section of our site in the `src/storybook_docs`. For documentation on how to write [Storybook stories](https://storybook.js.org/docs/react/writing-stories/introduction).
33
-
34
- *During deployments we remove the docs and strip comments.*
35
-
36
38
 
39
+ Our doc site uses Storybook as living documentation and dev environment. We support [mdx](https://mdxjs.com/) files and standard Storybook files, we use [CSF version 3](https://storybook.js.org/blog/component-story-format-3-0/). You can find examples on how to add markdown docs to the doc section of our site in the `src/storybook_docs`. For documentation on how to write [Storybook stories](https://storybook.js.org/docs/react/writing-stories/introduction).
37
40
 
41
+ _During deployments we remove the docs and strip comments._
@@ -1,7 +1,7 @@
1
1
  export declare const allowedValues: {
2
2
  kinds: readonly ["default", "inverse"];
3
3
  orientations: readonly ["horizontal", "vertical"];
4
- spacings: readonly ["small", "medium", "large"];
4
+ spacings: readonly ["small", "medium", "large", "xlarge"];
5
5
  };
6
6
  export type Kind = (typeof allowedValues.kinds)[number];
7
7
  export type Orientation = (typeof allowedValues.orientations)[number];
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { InputStates } from '../constants';
3
+ import { DataQa } from '../../../utils/dataQa';
4
+ export interface MrlDatePickerProps extends React.ComponentPropsWithRef<'input'>, DataQa {
5
+ /** Id of the text input */
6
+ inputId: string;
7
+ /** The value of the text input used to make it a controlled input */
8
+ value?: string;
9
+ /**
10
+ * Changes the state of the input based on user permissions or actions.
11
+ */
12
+ state?: InputStates;
13
+ autofocus?: boolean;
14
+ /**
15
+ * Event handler for onChange Events
16
+ * The value is normalized to yyyy-mm-dd
17
+ *
18
+ * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
19
+ */
20
+ onChange?: React.ComponentPropsWithRef<'input'>['onChange'];
21
+ }
22
+ /**
23
+ * Allows the user to input a date
24
+ *
25
+ * @param {MrlDatePickerProps} props - the component props
26
+ * @param {HTMLInputElement} ref - a ref to the input element in the DOM
27
+ * @returns a date input element
28
+ */
29
+ export declare const MrlDatePicker: React.ForwardRefExoticComponent<Pick<MrlDatePickerProps, "form" | "slot" | "style" | "title" | "pattern" | "dir" | "name" | "height" | "width" | "children" | "disabled" | "checked" | "placeholder" | "id" | "defaultValue" | "state" | "value" | "size" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "max" | "min" | "type" | "key" | "multiple" | "data-qa" | "list" | "step" | "alt" | "src" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "autoComplete" | "capture" | "crossOrigin" | "maxLength" | "minLength" | "readOnly" | "required" | "inputId" | "autofocus"> & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ export * from './MrlDatePicker';
@@ -4,9 +4,9 @@ type useActiveColorReturn = {
4
4
  setHasActiveColor: (hasActiveColor: boolean) => void;
5
5
  };
6
6
  /**
7
- * Custom hook used to track the active color state of the text input
7
+ * Custom hook used to track the active color state of inputs
8
8
  *
9
- * @param {InputStates | undefined} state - the text input state
9
+ * @param {InputStates | undefined} state - the input state
10
10
  * @returns the hasActiveColor state and handler
11
11
  */
12
12
  export declare function useActiveColor(state?: InputStates): useActiveColorReturn;