@maelstrom-futurism/input 0.7.4-beta.3 → 0.7.4-beta.8

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/dist/Input.d.ts CHANGED
@@ -17,6 +17,10 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
17
17
  * The label to display above the input. Leave blank to hide.
18
18
  */
19
19
  label?: string;
20
+ /**
21
+ * Help text is displayed below the field to help users determine how the field is used
22
+ */
23
+ helpText?: string;
20
24
  /**
21
25
  * Text to use as a placeholder
22
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAMtD,MAAM,MAAM,OAAO,GACb,QAAQ,GACR,UAAU,CAAC;AAEjB,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAE3E;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE1D,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,4EAoBT,CAAC;AAIH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAMtD,MAAM,MAAM,OAAO,GACb,QAAQ,GACR,UAAU,CAAC;AAEjB,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAE3E;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAE7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE1D,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,4EAuBT,CAAC;AAIH,eAAe,KAAK,CAAC"}
package/dist/Input.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { useTheme } from "@maelstrom-futurism/core";
4
- import { fcContainer, materialStyledInput, normalStyledInput } from "./styles";
5
- const Input = React.forwardRef(({ variant = "normal", type, name, label, ...rest }, ref) => {
4
+ import { outsideContainer, fcContainer, materialStyledInput, normalStyledInput, helpText as helpTextCss } from "./styles";
5
+ const Input = React.forwardRef(({ variant = "normal", type, name, label, helpText, ...rest }, ref) => {
6
6
  const theme = useTheme();
7
7
  const isMaterial = variant === "material";
8
8
  const additionalStyles = isMaterial ? materialStyledInput(theme) : normalStyledInput(theme);
9
- return (_jsxs("div", { css: [fcContainer, additionalStyles], children: [_jsx("input", { id: name, name: name, type: type, ref: ref, placeholder: " ", ...rest }), label && _jsx("label", { htmlFor: name, children: label }), isMaterial && _jsx("span", { className: "underline" })] }));
9
+ return (_jsxs("div", { css: outsideContainer, children: [_jsxs("div", { css: [fcContainer, additionalStyles], children: [_jsx("input", { id: name, name: name, type: type, ref: ref, placeholder: " ", ...rest }), label && _jsx("label", { htmlFor: name, children: label }), isMaterial && _jsx("span", { className: "underline" })] }), helpText && _jsx("span", { css: helpTextCss, children: helpText })] }));
10
10
  });
11
11
  export default Input;
12
12
  //# sourceMappingURL=Input.js.map
package/dist/Input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA8D/E,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,IAAI,EAAc,EAAE,GAAS,EAAE,EAAE;IACzG,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,OAAO,KAAK,UAAU,CAAC;IAE1C,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAA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IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,WAAW,EAAC,GAAG,KACX,IAAI,GACV,EACD,KAAK,IAAI,gBAAO,OAAO,EAAE,IAAI,YAAG,KAAK,GAAS,EAC9C,UAAU,IAAI,eAAM,SAAS,EAAC,WAAW,GAAG,IAC3C,EACL,QAAQ,IAAI,eAAM,GAAG,EAAE,WAAW,YAAG,QAAQ,GAAQ,IACpD,CACT,CAAC;AACN,CAAC,CAAC,CAAC;AAIH,eAAe,KAAK,CAAC"}
package/dist/styles.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Theme } from '@maelstrom-futurism/core';
2
+ export declare const outsideContainer: import("@emotion/react").SerializedStyles;
2
3
  export declare const fcContainer: import("@emotion/react").SerializedStyles;
4
+ export declare const helpText: import("@emotion/react").SerializedStyles;
3
5
  export declare const materialStyledInput: (theme: Theme) => import("@emotion/react").SerializedStyles;
4
6
  export declare const normalStyledInput: (theme: Theme) => import("@emotion/react").SerializedStyles;
5
7
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKjD,eAAO,MAAM,WAAW,2CAGvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,8CAuD/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,8CA8C7C,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAKjD,eAAO,MAAM,gBAAgB,2CAE5B,CAAC;AAEF,eAAO,MAAM,WAAW,2CAGvB,CAAC;AAEF,eAAO,MAAM,QAAQ,2CAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,8CAuD/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,KAAK,8CA8C7C,CAAC"}
package/dist/styles.js CHANGED
@@ -1,9 +1,19 @@
1
1
  import { css } from '@emotion/react';
2
2
  const EASE_FUNCTION = 'cubic-bezier(.65, .05, .36, 1)';
3
+ export const outsideContainer = css `
4
+ background-color: inherit;
5
+ `;
3
6
  export const fcContainer = css `
4
7
  position: relative;
5
8
  margin-top: 14px;
6
9
  `;
10
+ export const helpText = css `
11
+ position: relative;
12
+ display: block;
13
+ padding: 2px 0 2px 12px;
14
+ font-size: 0.9em;
15
+ opacity: 0.7;
16
+ `;
7
17
  export const materialStyledInput = (theme) => css `
8
18
  input {
9
19
  color: ${theme.color("textColor")};
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAIrC,MAAM,aAAa,GAAG,gCAAgC,CAAC;AAEvD,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;CAG7B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,GAAG,CAAA;;iBAEvC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;;mCAIN,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;qBAGtC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;0BACb,aAAa;;;;;;;;;;;;0BAYb,aAAa;;;;;;;;;;;;;;;;;;qCAkBF,aAAa;mCACf,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;;;;;;mCAQxB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;;iBAI1C,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,GAAG,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,CAAA;;;;iBAIrC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;6BAEZ,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;;qBAIhC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;0BACb,aAAa;;;;;;;;;;;;;0BAab,aAAa;;;;;;;;;;;;;;6BAcV,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;;;6BAGtB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC;;;iBAGpC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;;CAEtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maelstrom-futurism/input",
3
- "version": "0.7.4-beta.3",
3
+ "version": "0.7.4-beta.8",
4
4
  "description": "Re-usable input components of MF",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "homepage": "https://github.com/DawsonG/maelstrom-futurism#readme",
39
39
  "dependencies": {
40
- "@maelstrom-futurism/core": "^0.7.4-beta.3"
40
+ "@maelstrom-futurism/core": "^0.7.4-beta.8"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@emotion/react": ">= 11.10.5",
44
44
  "react": ">= 18.0.0"
45
45
  },
46
- "gitHead": "a983c5e5cbfec4d2fb1ba7ac0406ebf988794eef"
46
+ "gitHead": "8ec034fa52a53c140d6bc59276834be44998eb8c"
47
47
  }