@wonderflow/react-components 12.1.1 → 12.1.3
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/icon-button/icon-button.module.css +1 -1
- package/dist/components/input-group/input-group.stories.d.ts.map +1 -1
- package/dist/components/input-group/input-group.stories.js +1 -1
- package/dist/components/select/select.module.css +1 -1
- package/dist/components/star-meter/star-meter.js +1 -1
- package/dist/components/text/text.js +1 -1
- package/dist/components/textfield/textfield.module.css +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.IconButton{padding:0}.IconButton[data-icon-button-squared=false]{border-radius:
|
|
1
|
+
@layer components{.IconButton{padding:0}.IconButton[data-icon-button-squared=false]{border-radius:50%}.IconButton[data-button-dimension=small]{inline-size:1.5rem;min-inline-size:1.5rem;padding:0}.IconButton[data-button-dimension=regular]{block-size:2.5rem;inline-size:2.5rem;min-inline-size:2.5rem;padding:0}.IconButton[data-button-dimension=big]{inline-size:3rem;min-inline-size:3rem;padding: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,CAc3C,CAAC;AAEF,eAAe,KAAK,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;AA6BrB,eAAO,MAAM,MAAM;;;wFAAmB,CAAC"}
|
|
@@ -17,5 +17,5 @@ const story = {
|
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
export default story;
|
|
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, {
|
|
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, { 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 })] }));
|
|
21
21
|
export const Single = Default.bind({});
|
|
@@ -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.
|
|
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{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:0;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 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[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
|
|
@@ -61,5 +61,5 @@ export const StarMeter = forwardRef(({ className, value = 0, starCount = 5, labe
|
|
|
61
61
|
return (_jsx(Symbol, { source: "star", weight: "solid", className: styles.Icon, dimension: properties[dimension].iconSize, fill: fillType }, starIndex));
|
|
62
62
|
});
|
|
63
63
|
}, [dimension, properties, roundValue]);
|
|
64
|
-
return (_jsxs(Stack, { inline: true, direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.StarMeter, className), role: "meter", fill: false, "aria-valuenow": clamp(value, 0, starCount), "aria-valuemin": 0, "aria-valuemax": starCount, "aria-labelledby": seedID('star-meter'), "data-star-meter-dimension": dimension, ref: forwardedRef, ...otherProps, children: [_jsx("svg", { "aria-hidden": "true", className: styles.Gradient, width: "100", height: "50", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("defs", { children: _jsxs("linearGradient", { id: "HalfStar", children: [_jsx("stop", { offset: "0", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50%", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50.1%", style: { stopColor: 'var(--star-dimmed-color)' } }), _jsx("stop", { offset: "100%", style: { stopColor: 'var(--star-dimmed-color)' } })] }) }) }), _jsx(Stack, { direction: "row", columnGap: dimension === 'small' ? 2 : 4, vAlign: "center", children: starType(starCount, value) }), _jsx(Text, { preventResponsive: true, id: seedID('star-meter'), variant: properties[dimension].labelSize, children: _jsx("b", { children: (!hideLabel && label) ?? value.toString() }) })] }));
|
|
64
|
+
return (_jsxs(Stack, { inline: true, direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.StarMeter, className), role: "meter", fill: false, "aria-valuenow": clamp(value, 0, starCount), "aria-valuemin": 0, "aria-valuemax": starCount, "aria-labelledby": seedID('star-meter'), "data-star-meter-dimension": dimension, ref: forwardedRef, ...otherProps, children: [_jsx("svg", { "aria-hidden": "true", className: styles.Gradient, width: "100", height: "50", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("defs", { children: _jsxs("linearGradient", { id: "HalfStar", children: [_jsx("stop", { offset: "0", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50%", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50.1%", style: { stopColor: 'var(--star-dimmed-color)' } }), _jsx("stop", { offset: "100%", style: { stopColor: 'var(--star-dimmed-color)' } })] }) }) }), _jsx(Stack, { direction: "row", columnGap: dimension === 'small' ? 2 : 4, vAlign: "center", children: starType(starCount, value) }), _jsx(Text, { preventResponsive: true, preventBreakWord: true, id: seedID('star-meter'), variant: properties[dimension].labelSize, children: _jsx("b", { children: (!hideLabel && label) ?? value.toString() }) })] }));
|
|
65
65
|
});
|
|
@@ -77,7 +77,7 @@ export const Text = forwardRef(({ children, className, variant = 'body-1', color
|
|
|
77
77
|
return label;
|
|
78
78
|
}, [children]);
|
|
79
79
|
const generatedID = slugify(String(id ?? getTextFromChildren()), { lower: true, replacement: '_' });
|
|
80
|
-
return (_jsxs(Wrapper, { ref: forwardedRef, "data-text-variant": variant, "data-text-color": color, "data-text-prevent-responsive": preventResponsive, "data-text-truncate": truncate, "data-text-decorator": hasStart || hasEnd, "data-text-prevent-break-word": preventBreakWord, className: clsx(styles.Text, className), style: { ...dynamicStyle, ...style }, id: id || (isTitle &&
|
|
80
|
+
return (_jsxs(Wrapper, { ref: forwardedRef, "data-text-variant": variant, "data-text-color": color, "data-text-prevent-responsive": preventResponsive, "data-text-truncate": truncate, "data-text-decorator": hasStart || hasEnd, "data-text-prevent-break-word": preventBreakWord, className: clsx(styles.Text, className), style: { ...dynamicStyle, ...style }, id: id || (isTitle && anchor) ? generatedID : undefined, ...otherProps, children: [hasStart
|
|
81
81
|
&& isValidElement(decoratorStart)
|
|
82
82
|
&& cloneElement(decoratorStart, {
|
|
83
83
|
...decoratorStart.props,
|
|
@@ -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.
|
|
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%}.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)}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}.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}[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)}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wonderflow/react-components",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.3",
|
|
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.1.
|
|
86
|
-
"@wonderflow/tokens": "12.1.
|
|
85
|
+
"@wonderflow/config": "12.1.3",
|
|
86
|
+
"@wonderflow/tokens": "12.1.3",
|
|
87
87
|
"babel-loader": "8.2.5",
|
|
88
88
|
"cpy-cli": "3.1.1",
|
|
89
89
|
"postcss": "8.4.17",
|