@wonderflow/react-components 10.17.0 → 10.18.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.
@@ -1 +1 @@
1
- @layer components{.Button{-webkit-touch-callout:none;grid-gap:.5rem;align-items:center;appearance:none;background:none;border:0;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;transition:all .1s cubic-bezier(.3,.07,.34,1);-webkit-user-select:none;user-select:none;white-space:nowrap}.Button:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}.Button[data-button-dimension=big]{block-size:3rem;font-size:1.13rem;padding:.55rem 1.5rem .66rem}.Button[data-button-dimension=regular]{block-size:2.5rem;font-size:1rem;padding:.33rem 1rem .5rem}.Button[data-button-dimension=small]{grid-gap:.25rem;block-size:1.5rem;font-size:.88rem;padding:0 .5rem .11rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:hover){background:#9e0018;color:#fff}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background:var(--cta-dark)}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:hover){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]:is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]:is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed;pointer-events:none}.Button[aria-busy=true]{pointer-events:none}.Button[aria-busy=true]>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>*+*{box-shadow:inset 1px 0 0 hsla(0,0%,40%,.2)}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0}}
1
+ @layer components{.Button{-webkit-touch-callout:none;grid-gap:.5rem;align-items:center;appearance:none;background:none;border:0;border-radius:.25rem;box-sizing:border-box;cursor:pointer;display:inline-flex;font-family:inherit;font-weight:600;justify-content:center;margin:0;min-inline-size:min-content;overflow:hidden;position:relative;text-decoration:none;transition:all .1s cubic-bezier(.3,.07,.34,1);-webkit-user-select:none;user-select:none;white-space:nowrap}.Button:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):active{transform:scale(.98);transform-origin:center}.Button[data-button-dimension=big]{block-size:3rem;font-size:1.13rem;padding:.75rem 1.5rem}.Button[data-button-dimension=regular]{block-size:2.5rem;font-size:1rem;padding:.5rem 1rem}.Button[data-button-dimension=small]{grid-gap:.25rem;block-size:1.5rem;font-size:.88rem;padding:.13rem .5rem}.Button[data-button-kind=primary]{background:var(--cta-default);color:var(--cta-foreground)}.Button[data-button-kind=primary]:where([aria-pressed=true]),.Button[data-button-kind=primary]:where([aria-pressed=true]:hover){background:#9e0018;color:#fff}.Button[data-button-kind=primary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background:var(--cta-dark)}.Button[data-button-kind=secondary]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=secondary]:where([aria-pressed=true]),.Button[data-button-kind=secondary]:where([aria-pressed=true]:hover){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=secondary]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background-hard);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]{color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:where([aria-pressed=true]),.Button[data-button-kind=flat]:where([aria-pressed=true]:is(:active,:focus)){background:var(--dimmed-7);color:var(--dimmed-0)}.Button[data-button-kind=flat]:is(:hover,:focus){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);color:var(--global-vibrancy-foreground)}.Button[data-button-kind=flat]:not([aria-pressed=true],[aria-disabled=true],[aria-busy=true]):is(:hover){background-color:var(--global-vibrancy-background)}.Button[data-button-fullwidth=true]{inline-size:100%}.Button[data-button-icon-position=right]{flex-direction:row-reverse}.Button[aria-disabled=true],.Button[aria-disabled=true]:is(:hover,:focus,:active){-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed;pointer-events:none}.Button[aria-busy=true]{pointer-events:none}.Button[aria-busy=true]>:not(.SpinnerIndicator){visibility:hidden}.SpinnerIndicator{bottom:0;display:grid;left:0;place-content:center;position:absolute;right:0;top:0}.ButtonsGroup{display:inline-flex}.ButtonsGroup>*+*{box-shadow:inset 1px 0 0 hsla(0,0%,40%,.2)}.ButtonsGroup>:not(:first-child,:last-child,:only-of-type){border-radius:0}.ButtonsGroup>:first-child:not(:only-of-type){border-bottom-right-radius:0;border-top-right-radius:0}.ButtonsGroup>:last-child:not(:only-of-type){border-bottom-left-radius:0;border-top-left-radius:0}}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
- * Copyright 2022 Wonderflow <authored by Mattia Astorino>
3
+ * Copyright 2022-2023 Wonderflow <authored by Mattia Astorino>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import { Stack, Text } from '../..';
21
21
  import * as styles from './input-group.module.css';
22
22
  export const InputGroup = forwardRef(({ className, input, suffix, prefix, label, dimension = 'regular', ...otherProps }, forwardedRef) => {
23
23
  const seedID = useUIDSeed();
24
- return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('field'), children: label }), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(suffix), "data-input-group-has-start": !!prefix, ...otherProps, children: [_jsx("div", { className: styles.Start, children: Children.map(prefix, child => isValidElement(child) && cloneElement(child, {
24
+ return (_jsxs(Stack, { rowGap: 4, hAlign: "stretch", vAlign: "start", fill: false, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, lineHeight: "small", htmlFor: seedID('field'), children: label }), _jsxs(Stack, { as: "fieldset", direction: "row", vAlign: "start", hAlign: "start", fill: false, inline: true, ref: forwardedRef, className: clsx(styles.InputGroup, className), "data-input-group-has-end": Boolean(suffix), "data-input-group-has-start": !!prefix, ...otherProps, children: [_jsx("div", { className: styles.Start, children: Children.map(prefix, child => isValidElement(child) && cloneElement(child, {
25
25
  dimension,
26
26
  })) }), _jsx("div", { className: styles.InputField, children: Children.map(input, child => isValidElement(child) && cloneElement(child, {
27
27
  id: seedID('field'),
@@ -1 +1 @@
1
- @layer components{.InputGroup{position:relative}.Start :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .Start *{border-bottom-right-radius:0;border-top-right-radius:0}.InputField :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .InputField input{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}.InputGroup[data-input-group-has-start=true] .InputField input{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0}.End :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .End *{border-bottom-left-radius:0;border-top-left-radius:0}}
1
+ @layer components{.InputGroup{position:relative}.Start :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .Start *{border-bottom-right-radius:0;border-top-right-radius:0}.InputField :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .InputField input{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}.InputGroup[data-input-group-has-start=true] .InputField input{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0}.End{line-height:1rem}.End :is(button,input,a,select,fieldset[tabindex="0"]){outline-offset:-2px}.InputGroup[data-input-group-has-end=true] .End *{border-bottom-left-radius:0;border-top-left-radius:0}}
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.stories.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,UAAU,CAM3C,CAAC;AAEF,eAAe,KAAK,CAAC;AA8BrB,eAAO,MAAM,MAAM;;;wFAAmB,CAAC"}
1
+ {"version":3,"file":"input-group.stories.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,UAAU,CAc3C,CAAC;AAEF,eAAe,KAAK,CAAC;AA8BrB,eAAO,MAAM,MAAM;;;wFAAmB,CAAC"}
@@ -5,8 +5,16 @@ const story = {
5
5
  title: 'Inputs/Input group',
6
6
  component: InputGroup,
7
7
  args: {
8
+ label: 'Label',
9
+ dimension: 'regular',
8
10
  input: _jsx(Textfield, { type: "text", defaultValue: "sample" }),
9
11
  },
12
+ argTypes: {
13
+ dimension: {
14
+ options: ['small', 'regular', 'big'],
15
+ control: { type: 'radio' },
16
+ },
17
+ },
10
18
  };
11
19
  export default story;
12
20
  const Default = args => (_jsxs(Stack, { inline: true, fill: false, hAlign: "start", rowGap: 32, children: [_jsx(InputGroup, { suffix: _jsx(Button, { children: "Confirm" }), ...args }), _jsx(InputGroup, { suffix: _jsx(Textfield, { disabled: true, size: 9, placeholder: "@mail.com" }), ...args }), _jsx(InputGroup, { dimension: "big", label: "Sample label", prefix: _jsx(Textfield, { readOnly: true, size: 6, defaultValue: "https://" }), suffix: (_jsxs(Select, { defaultValue: 1, children: [_jsx("option", { value: "1", children: ".com" }), _jsx("option", { value: "2", children: ".it" }), _jsx("option", { value: "3", children: ".org" }), _jsx("option", { value: "4", children: ".dev" }), _jsx("option", { value: "5", children: ".io" })] })), ...args })] }));
@@ -16,6 +16,11 @@ export declare type TextfieldProps<T = Record<string, unknown>> = BaseFieldProps
16
16
  * you can bind a custom label to the input by using an id.
17
17
  */
18
18
  label?: string;
19
+ /**
20
+ * Optional hint text field, it provides additional help or context
21
+ * to the user, it is often used to explain the correct format of the textfield data.
22
+ */
23
+ message?: string;
19
24
  /**
20
25
  * Set the input type. The value can be anything that
21
26
  * is supported by the HTML input element.
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACZ,MAAM,OAAO,CAAC;AAGf,OAAO,EACuC,WAAW,EACxD,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAa,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG7E,oBAAY,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,GAAG,CAAC,CAAA;AAEN,eAAO,MAAM,SAAS,sJA8GpB,CAAC"}
1
+ {"version":3,"file":"textfield.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACZ,MAAM,OAAO,CAAC;AAGf,OAAO,EACuC,WAAW,EACxD,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAa,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG7E,oBAAY,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,cAAc,CAAC;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAC5D;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,GAAG,CAAC,CAAA;AAEN,eAAO,MAAM,SAAS,sJAmHpB,CAAC"}
@@ -5,7 +5,7 @@ import { useUIDSeed } from 'react-uid';
5
5
  import { IconButton, Stack, Symbol, Text, } from '../..';
6
6
  import { BaseField } from './base-field';
7
7
  import * as styles from './textfield.module.css';
8
- export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, id, iconPosition = 'right', dimension = 'regular', type, style, onChange, fullWidth, ...otherProps }, forwardedRef) => {
8
+ export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, id, iconPosition = 'right', dimension = 'regular', message, type, style, onChange, fullWidth, ...otherProps }, forwardedRef) => {
9
9
  const [isPasswordVisible, setPasswordVisible] = useState(false);
10
10
  const seedID = useUIDSeed();
11
11
  const isPassword = type === 'password';
@@ -29,8 +29,8 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
29
29
  disabled,
30
30
  onChange,
31
31
  };
32
- return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Textfield, className), "data-textfield-has-icon": isPassword || Boolean(icon), "data-textfield-icon-position": iconPosition, "data-textfield-dimension": dimension, "data-textfield-invalid": invalid, "data-textfield-fullwidth": fullWidth, "aria-disabled": disabled, hAlign: "stretch", vAlign: "start", tabIndex: disabled ? 0 : undefined, style: style, children: [label && _jsx(Text, { as: "label", "aria-disabled": disabled, className: styles.Label, size: dimension === 'small' ? 14 : 16, htmlFor: fieldID, children: label }), _jsxs("div", { className: styles.FieldContainer, children: [textarea
32
+ return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Textfield, className), "data-textfield-has-icon": isPassword || Boolean(icon), "data-textfield-icon-position": iconPosition, "data-textfield-dimension": dimension, "data-textfield-invalid": invalid, "data-textfield-fullwidth": fullWidth, "aria-disabled": disabled, hAlign: "stretch", vAlign: "start", tabIndex: disabled ? 0 : undefined, style: style, children: [label && _jsx(Text, { as: "label", lineHeight: "small", "aria-disabled": disabled, className: styles.Label, size: dimension === 'small' ? 14 : 16, htmlFor: fieldID, children: label }), _jsxs("div", { className: styles.FieldContainer, children: [textarea
33
33
  ? (_jsx(BaseField, { ref: forwardedRef, as: "textarea", id: fieldID, ...commonProps, ...otherProps }))
34
- : (_jsx(BaseField, { className: styles.InputField, id: fieldID, ref: forwardedRef, type: isPasswordVisible ? 'text' : type, spellCheck: isPassword ? false : undefined, ...commonProps, ...otherProps })), isPassword && (_jsx(IconButton, { className: styles.IconButton, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: isPasswordVisible ? 'eye-slash' : 'eye' })), !textarea && icon && !isPassword && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
34
+ : (_jsx(BaseField, { className: styles.InputField, id: fieldID, ref: forwardedRef, type: isPasswordVisible ? 'text' : type, spellCheck: isPassword ? false : undefined, ...commonProps, ...otherProps })), isPassword && (_jsx(IconButton, { className: styles.IconButton, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: isPasswordVisible ? 'eye-slash' : 'eye' })), !textarea && icon && !isPassword && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] }), message && _jsx(Text, { as: "label", lineHeight: "small", sentiment: invalid ? 'danger' : undefined, "aria-disabled": disabled, className: styles.Label, size: 14, children: message })] }));
35
35
  });
36
36
  Textfield.displayName = 'Textfield';
@@ -1 +1 @@
1
- {"version":3,"file":"textfield.stories.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAoC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AA4BrB,eAAO,MAAM,MAAM,+LAA0B,CAAC;AAa9C,eAAO,MAAM,KAAK,+LAA4B,CAAC;AAgB/C,eAAO,MAAM,QAAQ,+LAA4B,CAAC;AAalD,eAAO,MAAM,QAAQ,+LAA0B,CAAC"}
1
+ {"version":3,"file":"textfield.stories.d.ts","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAoC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AA2BrB,eAAO,MAAM,MAAM,+LAA0B,CAAC;AAc9C,eAAO,MAAM,KAAK,+LAA4B,CAAC;AAgB/C,eAAO,MAAM,QAAQ,+LAA4B,CAAC;AAalD,eAAO,MAAM,QAAQ,+LAA0B,CAAC"}
@@ -39,12 +39,13 @@ const story = {
39
39
  },
40
40
  };
41
41
  export default story;
42
- const SingleTemplate = args => (_jsxs(Stack, { rowGap: 24, children: [_jsx(Textfield, { ...args, size: 4, placeholder: "Placeholder" }), _jsx(Textfield, { ...args, size: 4, placeholder: "Placeholder" }), _jsx(Textfield, { ...args, size: 4, placeholder: "Placeholder" }), _jsx(Textfield, { ...args, type: "password", label: "Password", defaultValue: "123123kl\u00F2asj", placeholder: "Placeholder" })] }));
42
+ const SingleTemplate = args => (_jsxs(Stack, { rowGap: 24, children: [_jsx(Textfield, { ...args, size: 4, placeholder: "Placeholder", message: "" }), _jsx(Textfield, { ...args, size: 4, placeholder: "Placeholder" }), _jsx(Textfield, { ...args, type: "password", label: "Password", defaultValue: "123123kl\u00F2asj", placeholder: "Placeholder" })] }));
43
43
  const MultipleTemplate = args => (_jsxs(Stack, { rowGap: 24, children: [_jsx(Textfield, { ...args, label: "Filled", defaultValue: "Sample value" }), _jsx(Textfield, { ...args, label: "Filled read only", defaultValue: "Sample value", readOnly: true }), _jsx(Textfield, { ...args, label: "Empty disbled", placeholder: "Placeholder", disabled: true }), _jsx(Textfield, { ...args, label: "Filled disabled", defaultValue: "Sample value", disabled: true }), _jsx(Textfield, { ...args, type: "password", label: "Type password", defaultValue: "912435jh345" }), _jsx(Textfield, { ...args, type: "number", label: "Type number", defaultValue: 100 }), _jsx(Textfield, { ...args, type: "search", label: "Type search" }), _jsx(Textfield, { ...args, type: "date", label: "Type date" }), _jsx(Textfield, { ...args, type: "time", label: "Type time" }), _jsx(Textfield, { ...args, type: "month", label: "Type month" }), _jsx(Textfield, { ...args, type: "week", label: "Type week" }), _jsx(Textfield, { ...args, type: "datetime-local", label: "Type datetime-local" })] }));
44
44
  export const Single = SingleTemplate.bind({});
45
45
  Single.args = {
46
46
  disabled: false,
47
- label: 'Empty',
47
+ label: 'Label',
48
+ message: 'Sample hint text',
48
49
  };
49
50
  Single.argTypes = {
50
51
  textarea: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "10.17.0",
3
+ "version": "10.18.0",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "Apache-2.0",
@@ -30,6 +30,7 @@
30
30
  "lint:styles": "stylelint ./src/**/*.css",
31
31
  "storybook": "start-storybook --quiet -p 6006",
32
32
  "build-storybook": "build-storybook",
33
+ "deploy:storybook": "build-storybook && gh-pages -d storybook-static",
33
34
  "clean": "rimraf dist core core.css",
34
35
  "watch:csstypes": "tcm -w -p '**/*.module.css' src",
35
36
  "build:csstypes": "tcm -p '**/*.module.css' src"
@@ -73,14 +74,15 @@
73
74
  "@types/react": "17.0.43",
74
75
  "@types/react-dom": "17.0.14",
75
76
  "@types/react-table": "7.7.12",
76
- "@wonderflow/config": "10.17.0",
77
- "@wonderflow/tokens": "10.17.0",
77
+ "@wonderflow/config": "10.18.0",
78
+ "@wonderflow/tokens": "10.18.0",
78
79
  "babel-loader": "8.2.5",
79
80
  "cpy-cli": "3.1.1",
80
81
  "postcss": "8.4.17",
81
82
  "postcss-cli": "10.0.0",
82
83
  "react": "17.0.2",
83
84
  "react-dom": "17.0.2",
85
+ "storybook-addon-breakpoints": "1.0.0",
84
86
  "storybook-addon-themes": "6.1.0",
85
87
  "storybook-css-modules-preset": "1.1.1",
86
88
  "tsconfig": "10.0.0",