@dfx.swiss/react-components 1.1.3-beta.25 → 1.1.3-beta.26
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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface StyledTextBoxProps {
|
|
2
|
+
darkTheme?: boolean;
|
|
3
|
+
full?: boolean;
|
|
4
|
+
text: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
smallLabel?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const StyledTextBox: ({ darkTheme, full, text, label, smallLabel, ...props }: StyledTextBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default StyledTextBox;
|
|
10
|
+
//# sourceMappingURL=StyledTextBox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledTextBox.d.ts","sourceRoot":"","sources":["../../src/stories/StyledTextBox.tsx"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,2DAA4E,kBAAkB,4CA+BhH,CAAC;AACF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import StyledVerticalStack from './layout-helpers/StyledVerticalStack';
|
|
25
|
+
var StyledTextBox = function (_a) {
|
|
26
|
+
var _b = _a.darkTheme, darkTheme = _b === void 0 ? false : _b, _c = _a.full, full = _c === void 0 ? false : _c, text = _a.text, label = _a.label, smallLabel = _a.smallLabel, props = __rest(_a, ["darkTheme", "full", "text", "label", "smallLabel"]);
|
|
27
|
+
var textColor = darkTheme ? 'text-white' : 'text-dfxBlue-800';
|
|
28
|
+
var backgroundColor = darkTheme ? 'bg-white bg-opacity-5' : 'bg-white';
|
|
29
|
+
var placeholderColor = darkTheme ? 'placeholder:text-dfxGray-800' : 'placeholder:text-dfxGray-600';
|
|
30
|
+
var borderColor = darkTheme ? 'border-none' : 'border border-dfxGray-500';
|
|
31
|
+
var outlineColor = darkTheme ? 'outline-none' : 'outline-2 outline-dfxBlue-400';
|
|
32
|
+
return (_jsxs(StyledVerticalStack, __assign({ gap: 1, full: full }, { children: [label && (_jsx("label", __assign({ className: "text-start ".concat(smallLabel ? 'text-sm' : 'text-base', " font-semibold pl-3 pl- ") + [textColor].join(' ') }, { children: label }))), _jsx("div", __assign({ className: "text-base font-normal rounded-md w-full " +
|
|
33
|
+
[textColor, backgroundColor, placeholderColor, borderColor, outlineColor].join(' ') }, { children: _jsx("div", __assign({ className: "p-4 w-full ".concat(textColor) }, { children: _jsx("div", __assign({ className: "flex-1" }, { children: text })) })) }))] })));
|
|
34
|
+
};
|
|
35
|
+
export default StyledTextBox;
|
|
36
|
+
//# sourceMappingURL=StyledTextBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledTextBox.js","sourceRoot":"","sources":["../../src/stories/StyledTextBox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,mBAAmB,MAAM,sCAAsC,CAAC;AAUvE,IAAM,aAAa,GAAG,UAAC,EAA0F;IAAxF,IAAA,iBAAiB,EAAjB,SAAS,mBAAG,KAAK,KAAA,EAAE,YAAY,EAAZ,IAAI,mBAAG,KAAK,KAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,UAAU,gBAAA,EAAK,KAAK,cAApE,oDAAsE,CAAF;IACzF,IAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAChE,IAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,UAAU,CAAC;IACzE,IAAM,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,8BAA8B,CAAC;IACrG,IAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAC5E,IAAM,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,+BAA+B,CAAC;IAElF,OAAO,CACL,MAAC,mBAAmB,aAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,iBACpC,KAAK,IAAI,CACR,yBACE,SAAS,EACP,qBAAc,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,6BAA0B,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAGrG,KAAK,IACA,CACT,EAED,uBACE,SAAS,EACP,0CAA0C;oBAC1C,CAAC,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAGrF,uBAAK,SAAS,EAAE,qBAAc,SAAS,CAAE,gBACvC,uBAAK,SAAS,EAAC,QAAQ,gBAAE,IAAI,IAAO,IAChC,IACF,KACc,CACvB,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@dfx.swiss/react-components",
|
|
4
|
-
"version": "1.1.3-beta.
|
|
4
|
+
"version": "1.1.3-beta.26",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"tailwindcss": "^3.2.4",
|
|
88
88
|
"webpack": "^5.75.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "6c4ddf07436d557405c90420d6f1397630013320"
|
|
91
91
|
}
|