@loomhq/lens 11.18.0 → 11.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.
|
@@ -7,6 +7,7 @@ export declare const radiusVariables: VarsObject;
|
|
|
7
7
|
export declare const shadowVariables: VarsObject;
|
|
8
8
|
export declare const spaceVariables: VarsObject;
|
|
9
9
|
export declare const formFieldVariables: VarsObject;
|
|
10
|
+
export declare const gradientVariables: VarsObject;
|
|
10
11
|
export declare const getSizingVariablesCssVarsObject: () => VarsObject;
|
|
11
12
|
export declare const getVariablesCssVarsObject: () => VarsObject;
|
|
12
13
|
export declare const getColorsCssVarsObject: () => VarsObject;
|
package/dist/index.js
CHANGED
|
@@ -484,6 +484,10 @@ var breakpoints = {
|
|
|
484
484
|
medium: "64em",
|
|
485
485
|
large: "75em"
|
|
486
486
|
};
|
|
487
|
+
var gradients = {
|
|
488
|
+
"ai-primary": "radial-gradient(134.96% 884.49% at 119.29% 112.58%, #DC43BE 0%, #565ADD 70%)",
|
|
489
|
+
"ai-secondary": "radial-gradient(100% 138.41% at 100% 100%, #EFF0FF 0%, #FFFFFF 100%)"
|
|
490
|
+
};
|
|
487
491
|
|
|
488
492
|
// src/components/text/text.tsx
|
|
489
493
|
import React2 from "react";
|
|
@@ -1213,6 +1217,10 @@ var formFieldVariables = getCssVarsFromObject(void 0, {
|
|
|
1213
1217
|
formFieldBorderShadowFocus: `
|
|
1214
1218
|
inset 0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-blurple),
|
|
1215
1219
|
0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-focusRing)
|
|
1220
|
+
`,
|
|
1221
|
+
formFieldBorderShadowError: `
|
|
1222
|
+
inset 0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-danger),
|
|
1223
|
+
0 0 0 var(--lns-formFieldBorderWidthFocus) var(--lns-color-orangeLight)
|
|
1216
1224
|
`
|
|
1217
1225
|
});
|
|
1218
1226
|
var colorVariables = getCssVarsFromObject("color", getColorsObject());
|
|
@@ -1220,6 +1228,7 @@ var themeColorVariables = getCssVarsFromObject(
|
|
|
1220
1228
|
void 0,
|
|
1221
1229
|
getThemeColorsObject()
|
|
1222
1230
|
);
|
|
1231
|
+
var gradientVariables = getCssVarsFromObject("gradient", gradients);
|
|
1223
1232
|
var sizingVariables = [
|
|
1224
1233
|
unitVariables,
|
|
1225
1234
|
textSizeVariables,
|
|
@@ -1235,7 +1244,7 @@ var getVariablesCssVarsObject = () => {
|
|
|
1235
1244
|
return Object.assign({}, fontWeightVariables, ...sizingVariables);
|
|
1236
1245
|
};
|
|
1237
1246
|
var getColorsCssVarsObject = () => {
|
|
1238
|
-
return __spreadValues(__spreadValues({}, colorVariables), themeColorVariables);
|
|
1247
|
+
return __spreadValues(__spreadValues(__spreadValues({}, colorVariables), themeColorVariables), gradientVariables);
|
|
1239
1248
|
};
|
|
1240
1249
|
var assignLightThemeColors = () => {
|
|
1241
1250
|
return Object.keys(themeColors.light).map(
|
|
@@ -3899,18 +3908,19 @@ var TextareaWrapper = styled22.textarea`
|
|
|
3899
3908
|
padding: ${(props) => sizesStyles3[props.size].padding};
|
|
3900
3909
|
${getRadius("large")};
|
|
3901
3910
|
box-shadow: inset 0 0 0 var(--lns-formFieldBorderWidth)
|
|
3902
|
-
var(--lns-color-formFieldBorder);
|
|
3911
|
+
${(props) => props.error ? "var(--lns-color-danger)" : "var(--lns-color-formFieldBorder)"};
|
|
3903
3912
|
${(props) => getTextSize(sizesStyles3[props.size].textSize)};
|
|
3904
3913
|
resize: ${(props) => props.resize};
|
|
3905
3914
|
|
|
3906
3915
|
&:hover {
|
|
3907
3916
|
box-shadow: inset 0 0 0 var(--lns-formFieldBorderWidthFocus)
|
|
3908
|
-
var(--lns-color-blurple);
|
|
3917
|
+
${(props) => props.error ? "var(--lns-color-danger)" : "var(--lns-color-blurple)"};
|
|
3909
3918
|
}
|
|
3910
3919
|
|
|
3911
3920
|
&:focus {
|
|
3912
|
-
outline: 1px solid
|
|
3913
|
-
|
|
3921
|
+
outline: 1px solid
|
|
3922
|
+
${(props) => props.error ? "var(--lns-color-orangeLight)" : "transparent"};
|
|
3923
|
+
box-shadow: ${(props) => props.error != "" ? "var(--lns-formFieldBorderShadowError)" : "var(--lns-formFieldBorderShadowFocus)"};
|
|
3914
3924
|
}
|
|
3915
3925
|
|
|
3916
3926
|
&:disabled {
|
|
@@ -3936,7 +3946,8 @@ var Textarea = React28.forwardRef(
|
|
|
3936
3946
|
isDisabled,
|
|
3937
3947
|
placeholder,
|
|
3938
3948
|
size = "medium",
|
|
3939
|
-
resize = "both"
|
|
3949
|
+
resize = "both",
|
|
3950
|
+
error = void 0
|
|
3940
3951
|
} = _b, props = __objRest(_b, [
|
|
3941
3952
|
"onChange",
|
|
3942
3953
|
"value",
|
|
@@ -3944,9 +3955,10 @@ var Textarea = React28.forwardRef(
|
|
|
3944
3955
|
"isDisabled",
|
|
3945
3956
|
"placeholder",
|
|
3946
3957
|
"size",
|
|
3947
|
-
"resize"
|
|
3958
|
+
"resize",
|
|
3959
|
+
"error"
|
|
3948
3960
|
]);
|
|
3949
|
-
return /* @__PURE__ */ React28.createElement(
|
|
3961
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(
|
|
3950
3962
|
TextareaWrapper,
|
|
3951
3963
|
__spreadValues({
|
|
3952
3964
|
disabled: isDisabled,
|
|
@@ -3956,9 +3968,10 @@ var Textarea = React28.forwardRef(
|
|
|
3956
3968
|
rows,
|
|
3957
3969
|
value,
|
|
3958
3970
|
size,
|
|
3959
|
-
resize
|
|
3971
|
+
resize,
|
|
3972
|
+
error
|
|
3960
3973
|
}, props)
|
|
3961
|
-
);
|
|
3974
|
+
), error ? /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(spacer_default, { bottom: "xmsall" }), /* @__PURE__ */ React28.createElement(text_default, { color: "danger", fontWeight: "book", size: "body-md" }, error)) : null);
|
|
3962
3975
|
}
|
|
3963
3976
|
);
|
|
3964
3977
|
var textarea_default = Textarea;
|
|
@@ -7550,6 +7563,8 @@ export {
|
|
|
7550
7563
|
getThemeStyles,
|
|
7551
7564
|
getThemeStylesString,
|
|
7552
7565
|
getVariablesCssVarsObject,
|
|
7566
|
+
gradientVariables,
|
|
7567
|
+
gradients,
|
|
7553
7568
|
growRules,
|
|
7554
7569
|
heightRules,
|
|
7555
7570
|
hslaBaseColors,
|
package/dist/variables.d.ts
CHANGED