@wonderflow/react-components 12.2.0 → 12.3.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/dist/components/select/select.module.css +1 -1
- package/dist/components/symbol/symbol.d.ts.map +1 -1
- package/dist/components/symbol/symbol.js +3 -1
- package/dist/components/symbol/symbol.module.css +1 -1
- package/dist/components/textfield/base-field/base-field.module.css +1 -1
- package/dist/components/textfield/textfield.d.ts.map +1 -1
- package/dist/components/textfield/textfield.js +7 -1
- package/dist/components/textfield/textfield.module.css +1 -1
- package/dist/components/tooltip/tooltip.module.css +1 -1
- package/dist/examples/shell.stories.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Select{appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Select[data-select-dimension=regular]{--field-height:2.25rem;--field-padding:0.875rem;--font-size:0.875rem}.Select[data-select-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1rem}.FieldContainer{border
|
|
1
|
+
@layer components{.Select{appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Select[data-select-dimension=regular]{--field-height:2.25rem;--field-padding:0.875rem;--font-size:0.875rem}.Select[data-select-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1rem}.FieldContainer{border-radius:.25rem;color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));block-size:var(--field-height);border:1px solid transparent;border-radius:.25rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);margin:0;min-inline-size:100%;overflow:hidden;padding:0 calc(var(--field-padding)*3.5) 0 var(--field-padding);text-overflow:ellipsis}.Field:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));color:var(--global-disabled-foreground);cursor:not-allowed}.Field[aria-invalid=true]{border:1px solid var(--highlight-red-foreground)}.Field option{color:#000}.Field optgroup{color:initial}.Field[multiple]{block-size:auto;overflow:auto;padding:.5rem 1rem}.Field[multiple] option{color:currentcolor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:#9ea5b3 linear-gradient(180deg,#9ea5b3 0,#9ea5b3);background-color:#9ea5b3;color:var(--global-background)}.Field[multiple] optgroup{color:currentcolor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}label.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/symbol.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAIL,YAAY,EACZ,aAAa,EAEd,MAAM,OAAO,CAAC;AAIf,oBAAY,WAAW,GAAG,aAAa,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG;IACpE;;;;;OAKG;IACH,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrD;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC;;;;;MAKE;IACF,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1C,CAAA;AAED,eAAO,MAAM,MAAM;IArBjB;;;;;OAKG;YACK,WAAW,GAAG,aAAa,gBAAgB,CAAC;IACpD;;;OAGG;;IAEH;;;;;MAKE;;
|
|
1
|
+
{"version":3,"file":"symbol.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/symbol.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAIL,YAAY,EACZ,aAAa,EAEd,MAAM,OAAO,CAAC;AAIf,oBAAY,WAAW,GAAG,aAAa,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG;IACpE;;;;;OAKG;IACH,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACrD;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC;;;;;MAKE;IACF,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;CAC1C,CAAA;AAED,eAAO,MAAM,MAAM;IArBjB;;;;;OAKG;YACK,WAAW,GAAG,aAAa,gBAAgB,CAAC;IACpD;;;OAGG;;IAEH;;;;;MAKE;;iDA4CF,CAAC"}
|
|
@@ -6,13 +6,15 @@ import { Children, cloneElement, forwardRef, useMemo, } from 'react';
|
|
|
6
6
|
import * as styles from './symbol.module.css';
|
|
7
7
|
export const Symbol = forwardRef(({ className, source, dimension = 16, weight = 'outline', fill, ...otherProps }, forwardedRef) => {
|
|
8
8
|
const computedStyle = useMemo(() => (+dimension < 18 ? 'solid' : weight), [weight, dimension]);
|
|
9
|
+
const colorFill = { '--fill': fill ?? otherProps.color ?? 'currentcolor' };
|
|
9
10
|
return (typeof source === 'string')
|
|
10
|
-
? (_jsx("svg", { "aria-hidden": "true", width: dimension, height: dimension, fill: fill, className: clsx(styles.Icon, className), ref: forwardedRef, ...otherProps, children: _jsx("use", { href: `${sprite}#${computedStyle}/${source}` }) }))
|
|
11
|
+
? (_jsx("svg", { "aria-hidden": "true", width: dimension, height: dimension, fill: fill, className: clsx(styles.Icon, className), style: colorFill, ref: forwardedRef, ...otherProps, children: _jsx("use", { href: `${sprite}#${computedStyle}/${source}` }) }))
|
|
11
12
|
: (_jsx(_Fragment, { children: Children.map(source, (child) => cloneElement(child, {
|
|
12
13
|
className,
|
|
13
14
|
'aria-hidden': 'true',
|
|
14
15
|
width: dimension,
|
|
15
16
|
height: dimension,
|
|
17
|
+
color: fill ?? 'currentcolor',
|
|
16
18
|
})) }));
|
|
17
19
|
});
|
|
18
20
|
Symbol.displayName = 'Symbol';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Icon [fill]{fill:currentcolor}.Icon [fill=none][stroke]{fill:none;stroke:currentcolor}}
|
|
1
|
+
@layer components{.Icon{color:var(--fill)}.Icon [fill]{fill:currentcolor}.Icon [fill=none][stroke]{fill:none;stroke:currentcolor}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.BaseField{appearance:none;background-color:var(--global-background);block-size:var(--field-height);border:1px solid var(--dimmed-2);border-radius:.25rem;box-sizing:border-box;caret-color:var(--cta-default);color:inherit;display:flex;font-family:inherit;font-size:var(--font-size);inline-size:100%;line-height:1rem;margin:0;overflow:hidden;padding:0 var(--field-padding);text-overflow:ellipsis}[data-textfield-has-icon=true] .BaseField::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:calc(var(--field-padding)/2)}.BaseField:-moz-ui-invalid{box-shadow:none}.BaseField::placeholder{color:var(--dimmed-5)}.BaseField:focus-visible{border-color:var(--dimmed-5)}.BaseField:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));border-color:transparent;color:var(--global-disabled-foreground);cursor:not-allowed}.BaseField:disabled::placeholder{color:var(--global-disabled-foreground)}.BaseField[readonly]{border-style:dashed;box-shadow:none;cursor:default}.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:active,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:hover{-webkit-text-fill-color:var(--global-vibrancy-foreground);border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}:is(.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:hover,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:active)::selection{-webkit-text-fill-color:var(--dimmed-0)}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible{border-color:var(--highlight-red-foreground)}.BaseField[type=number]{appearance:textfield}.BaseField[type=number]::-webkit-inner-spin-button,.BaseField[type=number]::-webkit-outer-spin-button{display:none}.BaseField[type=search]{appearance:none}.BaseField[type=search]::-webkit-search-cancel-button,.BaseField[type=search]::-webkit-search-decoration{appearance:none}textarea.BaseField{block-size:auto;line-height:1.5rem;min-block-size:2rem;padding:calc(var(--field-padding)/2) calc(var(--field-padding) + 1rem) calc(var(--field-padding)/2) var(--field-padding);resize:vertical}textarea.BaseField::-webkit-datetime-edit-text{opacity:.3}textarea.BaseField::-webkit-calendar-picker-indicator{color:var(--global-foreground)}textarea.BaseField:-moz-ui-invalid{box-shadow:none}textarea.BaseField::-webkit-calendar-picker-indicator:hover{background-color:transparent}}
|
|
1
|
+
@layer components{.BaseField{appearance:none;background-color:var(--global-background);block-size:var(--field-height);border:1px solid var(--dimmed-2);border-radius:.25rem;box-sizing:border-box;caret-color:var(--cta-default);color:inherit;display:flex;font-family:inherit;font-size:var(--font-size);inline-size:100%;line-height:1rem;margin:0;overflow:hidden;padding:0 var(--field-padding);text-overflow:ellipsis}.BaseField::-webkit-calendar-picker-indicator{filter:invert(13%) sepia(1%) saturate(2042%) hue-rotate(315deg) brightness(76%) contrast(75%)}[data-textfield-has-icon=true] .BaseField::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:calc(var(--field-padding)/2)}.BaseField:-moz-ui-invalid{box-shadow:none}.BaseField::placeholder{color:var(--dimmed-5)}.BaseField:focus-visible{border-color:var(--dimmed-5)}.BaseField:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));border-color:transparent;color:var(--global-disabled-foreground);cursor:not-allowed}.BaseField:disabled::placeholder{color:var(--global-disabled-foreground)}.BaseField[readonly]{border-style:dashed;box-shadow:none;cursor:default}.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:active,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:hover{-webkit-text-fill-color:var(--global-vibrancy-foreground);border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}:is(.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:hover,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:active)::selection{-webkit-text-fill-color:var(--dimmed-0)}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible{border-color:var(--highlight-red-foreground)}:is(.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible)::-webkit-calendar-picker-indicator{filter:invert(13%) sepia(87%) saturate(5603%) hue-rotate(346deg) brightness(55%) contrast(100%)}.BaseField[type=number]{appearance:textfield}.BaseField[type=number]::-webkit-inner-spin-button,.BaseField[type=number]::-webkit-outer-spin-button{display:none}.BaseField[type=search]{appearance:none}.BaseField[type=search]::-webkit-search-cancel-button,.BaseField[type=search]::-webkit-search-decoration{appearance:none}textarea.BaseField{block-size:auto;line-height:1.5rem;min-block-size:2rem;padding:calc(var(--field-padding)/2) calc(var(--field-padding) + 1rem) calc(var(--field-padding)/2) var(--field-padding);resize:vertical}textarea.BaseField::-webkit-datetime-edit-text{opacity:.3}textarea.BaseField::-webkit-calendar-picker-indicator{color:var(--global-foreground)}textarea.BaseField:-moz-ui-invalid{box-shadow:none}textarea.BaseField::-webkit-calendar-picker-indicator:hover{background-color:transparent}}
|
|
@@ -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;;;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;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,GAAG,CAAC,CAAA;AAEN,eAAO,MAAM,SAAS,
|
|
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;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,GAAG,CAAC,CAAA;AAEN,eAAO,MAAM,SAAS,sJAyIpB,CAAC"}
|
|
@@ -36,6 +36,12 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
|
|
|
36
36
|
};
|
|
37
37
|
return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Textfield, className), "data-testid": "Textfield", "data-textfield-has-icon": isPassword || Boolean(icon), "data-textfield-icon-position": iconPosition, "data-textfield-dimension": dimension, "data-textfield-invalid": invalid && !disabled, "data-textfield-fullwidth": fullWidth, "aria-disabled": disabled, "aria-invalid": invalid && !disabled, hAlign: "stretch", vAlign: "start", tabIndex: disabled ? 0 : undefined, style: style, children: [label && _jsx(Text, { as: "label", "aria-disabled": disabled, className: styles.Label, variant: dimension === 'big' ? 'body-1' : 'body-2', htmlFor: fieldID, children: label }), _jsxs("div", { className: styles.FieldContainer, children: [textarea
|
|
38
38
|
? (_jsx(BaseField, { ref: forwardedRef, as: "textarea", className: styles.Textarea, style: { ...dynamicStyle }, id: fieldID, ...commonProps, ...otherProps }))
|
|
39
|
-
: (_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", "data-testid": "RevealIcon", icon: isPasswordVisible ? 'eye-slash' : 'eye',
|
|
39
|
+
: (_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", "data-testid": "RevealIcon", icon: isPasswordVisible ? 'eye-slash' : 'eye',
|
|
40
|
+
// eslint-disable-next-line no-nested-ternary
|
|
41
|
+
iconColor: disabled
|
|
42
|
+
? 'var(--global-disabled-foreground)'
|
|
43
|
+
: invalid
|
|
44
|
+
? 'var(--highlight-red-foreground)'
|
|
45
|
+
: 'var(--global-foreground)', disabled: disabled })), !textarea && icon && !isPassword && (_jsx(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension], "aria-disabled": disabled, fill: disabled ? 'var(--global-disabled-foreground)' : 'currentcolor' }))] }), message && _jsx(Text, { as: "label", color: (invalid && !disabled) ? 'danger' : undefined, "aria-disabled": disabled, className: styles.Label, variant: dimension === 'big' ? 'body-2' : 'body-3', children: message })] }));
|
|
40
46
|
});
|
|
41
47
|
Textfield.displayName = 'Textfield';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Textfield{appearance:none;padding:0;position:relative}.Textfield[data-textfield-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Textfield[data-textfield-dimension=regular]{--field-height:2.25rem;--field-padding:0.875rem;--font-size:0.875rem}.Textfield[data-textfield-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1rem}.Textfield[data-textfield-fullwidth=true]{inline-size:100%}textarea.Textarea{max-height:var(--textarea-max-height);min-height:var(--textarea-min-height);overflow-y:var(--textarea-overflow-y);padding:.5rem 1rem}.FieldContainer{position:relative}.InputField{--factor:4}[data-textfield-has-icon=true][data-textfield-icon-position=right] .InputField{padding:0 calc(var(--field-padding)*var(--factor)) 0 var(--field-padding)}[data-textfield-has-icon=true][data-textfield-icon-position=left] .InputField{padding:0 var(--field-padding) 0 calc(var(--field-padding)*var(--factor))}[data-textfield-dimension*=big] .InputField,[data-textfield-dimension*=regular] .InputField{--factor:3}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}[data-textfield-icon-position=left] .Icon{left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .Icon{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .Icon{fill:var(--highlight-red-foreground)}.Icon[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}label.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}@layer overrides{.IconButton{--x:25%;outline-offset:-.25em;position:absolute;top:50%;transform:translateY(-50%) translateX(var(--x))}.IconButton[data-button-kind=flat]:is(:hover,:active,:focus,[data-button-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;background-color:transparent}.IconButton[aria-disabled=true]{-webkit-backdrop-filter:none;backdrop-filter:none;background-color:unset;block-size:unset;cursor:not-allowed}[data-textfield-icon-position=left] .IconButton{--x:-19%;left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .IconButton{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .IconButton{color:var(--highlight-red-foreground)}}
|
|
1
|
+
@layer components{.Textfield{appearance:none;padding:0;position:relative}.Textfield[data-textfield-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Textfield[data-textfield-dimension=regular]{--field-height:2.25rem;--field-padding:0.875rem;--font-size:0.875rem}.Textfield[data-textfield-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1rem}.Textfield[data-textfield-fullwidth=true]{inline-size:100%}textarea.Textarea{max-height:var(--textarea-max-height);min-height:var(--textarea-min-height);overflow-y:var(--textarea-overflow-y);padding:.5rem 1rem}.FieldContainer{position:relative}.InputField{--factor:4}[data-textfield-has-icon=true][data-textfield-icon-position=right] .InputField{padding:0 calc(var(--field-padding)*var(--factor)) 0 var(--field-padding)}[data-textfield-has-icon=true][data-textfield-icon-position=left] .InputField{padding:0 var(--field-padding) 0 calc(var(--field-padding)*var(--factor))}[data-textfield-dimension*=big] .InputField,[data-textfield-dimension*=regular] .InputField{--factor:3}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}[data-textfield-icon-position=left] .Icon{left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .Icon{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .Icon{fill:var(--highlight-red-foreground)}.Icon[aria-disabled=true] svg{color:var(--global-disabled-foreground);cursor:not-allowed}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}label.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}@layer overrides{.IconButton{--x:25%;outline-offset:-.25em;position:absolute;top:50%;transform:translateY(-50%) translateX(var(--x))}.IconButton[data-button-kind=flat]:is(:hover,:active,:focus,[data-button-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;background-color:transparent}.IconButton[aria-disabled=true]{-webkit-backdrop-filter:none;backdrop-filter:none;background-color:unset;block-size:unset;cursor:not-allowed}[data-textfield-icon-position=left] .IconButton{--x:-19%;left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .IconButton{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .IconButton{color:var(--highlight-red-foreground)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.Tooltip{display:contents}.Balloon{word-wrap:break-word;background-color:#31363f;border-radius:.25rem;max-inline-size:var(--max-w);padding:.5rem 1rem;position:relative;z-index:5}.Balloon,.Balloon p{font-size:.875rem}.Balloon[data-popper-reference-hidden=true]{pointer-events:none;visibility:hidden}.Arrow:before{background-color:#31363f;block-size:12px;content:"";inline-size:12px;position:absolute;transform:rotate(45deg);visibility:visible}.Balloon[data-popper-reference-hidden=true] .Arrow{pointer-events:none;visibility:hidden}.Balloon[data-popper-placement^=top] .Arrow{bottom:6px}.Balloon[data-popper-placement^=top] .Arrow:before{transform:translateX(-50%) translateY(
|
|
1
|
+
@layer components{.Tooltip{display:contents}.Balloon{word-wrap:break-word;background-color:#31363f;border-radius:.25rem;max-inline-size:var(--max-w);padding:.5rem 1rem;position:relative;z-index:5}.Balloon,.Balloon p{font-size:.875rem}.Balloon[data-popper-reference-hidden=true]{pointer-events:none;visibility:hidden}.Arrow:before{background-color:#31363f;block-size:12px;content:"";inline-size:12px;position:absolute;transform:rotate(45deg);visibility:visible}.Balloon[data-popper-reference-hidden=true] .Arrow{pointer-events:none;visibility:hidden}.Balloon[data-popper-placement^=top] .Arrow{bottom:6px}.Balloon[data-popper-placement^=top] .Arrow:before{transform:translateX(-50%) translateY(0) rotate(45deg)}.Balloon[data-popper-placement^=left] .Arrow{right:6px}.Balloon[data-popper-placement^=left] .Arrow:before{transform:translateX(-2px) translateY(-50%) rotate(45deg)}.Balloon[data-popper-placement^=bottom] .Arrow{top:-6px}.Balloon[data-popper-placement^=bottom] .Arrow:before{transform:translateX(-50%) translateY(2px) rotate(45deg)}.Balloon[data-popper-placement^=right] .Arrow{left:-6px}.Balloon[data-popper-placement^=right] .Arrow:before{transform:translateX(1px) translateY(-50%) rotate(45deg)}}
|
|
@@ -35,6 +35,6 @@ const Template = () => {
|
|
|
35
35
|
}, [isBrowser]);
|
|
36
36
|
return (_jsx(Container, { dimension: "full", padding: false, className: style.MainContainer, children: _jsxs(Stack, { direction: "row", children: [_jsxs(Stack, { id: "LeftMenu", rowGap: 16, className: style.LeftMenu, "data-is-open": isLeftOpen, children: [_jsx("div", { className: style.LeftMenuInner, "data-is-open": isLeftOpen }), isLeftOpen
|
|
37
37
|
? (_jsx("div", { children: linkIcons.map((e, i) => (_jsx(Menu.Item, { disabled: true, value: `${e}`, icon: linkIcons[i], children: e }, seed(`linkMenu${i}`)))) }))
|
|
38
|
-
: (_jsx(Stack, { inline: true, hAlign: "center", rowGap: 8, children: linkIcons.map((e, i) => (_jsx(IconButton, { disabled: true, icon: linkIcons[i], kind: "flat" }, `${e} ${seed(`icons${i}`)}`))) }))] }), _jsxs(Stack, { children: [_jsxs(Stack, { id: "MainMenu", direction: "row", vAlign: "center", hAlign: "space-between", columnGap: 16, className: style.MainMenu, children: [_jsx(Stack, { inline: true, children: _jsx(Button, { kind: "secondary", dimension: "regular", fullWidth: false, onClick: () => setIsLeftOpen(!isLeftOpen), children: "Menu" }) }), _jsx(Stack, { inline: true, children: _jsx(Button, { kind: "secondary", dimension: "regular", fullWidth: false, onClick: () => setIsRightOpen(!isRightOpen), children: "Filters" }) })] }), _jsx(Container, { ref: ref, dimension: containerValue.dimension, className: clsx(style.Container, 'ContainerEx'), children: _jsxs(Stack, { rowGap: 32, vPadding: 32, children: [_jsxs(Snackbar, { title: "Product Card Container", children: [_jsx(Text, { children: `Window Width: ${size}px - Breakpoints Match: ${matches.toUpperCase()}` }), _jsx(Text, { children: `Container Width: ${containerSize}px - Grid Columns: ${containerValue.col} - Grid Gutter: ${containerValue.gutter}px` }), _jsx(Text, { children: `useBreakpointsConfig.value: ${JSON.stringify(containerValue)} - useBreakpointsConfig.matches: ${containerMatches.toUpperCase()}` })] }), _jsx(Grid, { colMinWidth: "1rem", columns: containerValue.col, rowGap: containerValue.gutter, columnGap: containerValue.gutter, filling: false, children: Array(12).fill('Card').map((e, i) => (_jsx(Grid.Item, { children: _jsx(ProductCard, { source: ['https://storage.googleapis.com/wonderflow-product-images/KITCHENAID%20CLASSIC%20SERIES.png'], subtitle: "brand name", title: `Product-${e} ${i + 1}`, sentiment: 0.51, rating: 4.51, feedbackCount: 3251, footer:
|
|
38
|
+
: (_jsx(Stack, { inline: true, hAlign: "center", rowGap: 8, children: linkIcons.map((e, i) => (_jsx(IconButton, { disabled: true, icon: linkIcons[i], kind: "flat" }, `${e} ${seed(`icons${i}`)}`))) }))] }), _jsxs(Stack, { children: [_jsxs(Stack, { id: "MainMenu", direction: "row", vAlign: "center", hAlign: "space-between", columnGap: 16, className: style.MainMenu, children: [_jsx(Stack, { inline: true, children: _jsx(Button, { kind: "secondary", dimension: "regular", fullWidth: false, onClick: () => setIsLeftOpen(!isLeftOpen), children: "Menu" }) }), _jsx(Stack, { inline: true, children: _jsx(Button, { kind: "secondary", dimension: "regular", fullWidth: false, onClick: () => setIsRightOpen(!isRightOpen), children: "Filters" }) })] }), _jsx(Container, { ref: ref, dimension: containerValue.dimension, className: clsx(style.Container, 'ContainerEx'), children: _jsxs(Stack, { rowGap: 32, vPadding: 32, children: [_jsxs(Snackbar, { title: "Product Card Container", children: [_jsx(Text, { as: "span", variant: "body-2", children: `Window Width: ${size}px - Breakpoints Match: ${matches.toUpperCase()}` }), _jsx(Text, { as: "span", variant: "body-2", children: `Container Width: ${containerSize}px - Grid Columns: ${containerValue.col} - Grid Gutter: ${containerValue.gutter}px` }), _jsx(Text, { as: "span", variant: "body-2", children: `useBreakpointsConfig.value: ${JSON.stringify(containerValue)} - useBreakpointsConfig.matches: ${containerMatches.toUpperCase()}` })] }), _jsx(Grid, { colMinWidth: "1rem", columns: containerValue.col, rowGap: containerValue.gutter, columnGap: containerValue.gutter, filling: false, children: Array(12).fill('Card').map((e, i) => (_jsx(Grid.Item, { children: _jsx(ProductCard, { source: ['https://storage.googleapis.com/wonderflow-product-images/KITCHENAID%20CLASSIC%20SERIES.png'], subtitle: "brand name", title: `Product-${e} ${i + 1}`, sentiment: 0.51, rating: 4.51, feedbackCount: 3251, footer: "01 Aug 2023", menuActions: (_jsx(Menu, { children: _jsx(Menu.Item, { autoFocus: true, icon: "news", value: "1", children: "Stats" }) })), highlightOnHover: true }) }, seed(`cards${i}`)))) })] }) })] }), _jsxs(Stack, { id: "RightMenu", className: style.RightMenu, "data-is-open": isRightOpen, children: [_jsx("div", { className: style.RightMenuInner }), _jsx("div", { className: style.Filter, children: Array(10).fill('Filter').map((e, i) => (_jsxs(Disclosure, { summary: `${e} ${String.fromCharCode(i + 65)}`, children: [_jsx(Menu.Item, { value: "1", subtext: "Hint Text", children: "Menu Item 1" }), _jsx(Menu.Item, { value: "2", subtext: "Hint Text", children: "Menu Item 2" }), _jsx(Menu.Item, { value: "3", subtext: "Hint Text", children: "Menu Item 3" }), _jsx(Menu.Item, { value: "4", subtext: "Hint Text", children: "Menu Item 4" })] }, seed(`filters${i}`)))) })] })] }) }));
|
|
39
39
|
};
|
|
40
40
|
export const Shell = Template.bind({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "UI components from Wonderflow's Wanda design system",
|
|
5
5
|
"author": "Wonderflow",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@types/react-dom": "17.0.14",
|
|
83
83
|
"@types/react-table": "7.7.12",
|
|
84
84
|
"@types/react-test-renderer": "18.0.0",
|
|
85
|
-
"@wonderflow/config": "12.
|
|
86
|
-
"@wonderflow/tokens": "12.
|
|
85
|
+
"@wonderflow/config": "12.3.0",
|
|
86
|
+
"@wonderflow/tokens": "12.3.0",
|
|
87
87
|
"babel-loader": "8.2.5",
|
|
88
88
|
"cpy-cli": "3.1.1",
|
|
89
89
|
"postcss": "8.4.17",
|