@codeleap/web 1.1.4 → 1.2.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/ActivityIndicator/index.d.ts +1 -0
- package/dist/components/Button.d.ts +3 -4
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/ContentView.d.ts +1 -0
- package/dist/components/FileInput.d.ts +5 -1
- package/dist/components/Icon.d.ts +1 -0
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Overlay.d.ts +1 -0
- package/dist/components/PageRouter/Menu.d.ts +1 -0
- package/dist/components/Select/Custom.d.ts +2 -0
- package/dist/components/Select/Custom.js +93 -0
- package/dist/components/Select/Custom.js.map +1 -0
- package/dist/components/{Select.d.ts → Select/Native.d.ts} +4 -4
- package/dist/components/{Select.js → Select/Native.js} +6 -6
- package/dist/components/Select/Native.js.map +1 -0
- package/dist/components/Select/index.d.ts +10 -0
- package/dist/components/Select/index.js +37 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/styles.d.ts +5 -0
- package/dist/components/Select/styles.js +55 -0
- package/dist/components/Select/styles.js.map +1 -0
- package/dist/components/Select/types.d.ts +26 -0
- package/dist/components/Select/types.js +3 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/Slider.d.ts +1 -0
- package/dist/components/Text.d.ts +1 -1
- package/dist/components/TextInput.d.ts +99 -1
- package/dist/components/TextInput.js +4 -3
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/Touchable.d.ts +2 -2
- package/dist/components/View.d.ts +3 -3
- package/dist/lib/hooks.d.ts +1 -1
- package/package.json +3 -3
- package/dist/components/Select.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonStyles, ComponentVariants, ButtonComposition, IconPlaceholder } from '@codeleap/common';
|
|
3
3
|
import { StylesOf } from '../types/utility';
|
|
4
|
-
|
|
5
|
-
declare type NativeButtonProps = ComponentPropsWithRef<'button'>;
|
|
4
|
+
declare type NativeButtonProps = React.ComponentPropsWithoutRef<'button'>;
|
|
6
5
|
export declare type ButtonProps = NativeButtonProps & ComponentVariants<typeof ButtonStyles> & {
|
|
7
6
|
text?: string;
|
|
8
7
|
rightIcon?: IconPlaceholder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,2CAA0H;AAE1H,+BAA8B;AAC9B,yCAAwC;AACxC,+BAA8B;AAC9B,yDAAwD;AAejD,IAAM,MAAM,GAAyB,UAAC,WAAW;IAEpD,IAAA,KAUE,WAAW,SAVA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KASE,WAAW,mBATU,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,QAAQ,GAQN,WAAW,SARL,EACR,IAAI,GAOF,WAAW,KAPT,EACJ,IAAI,GAMF,WAAW,KANT,EACJ,OAAO,GAKL,WAAW,QALN,EACP,MAAM,GAIJ,WAAW,OAJP,EACN,OAAO,GAGL,WAAW,QAHN,EACP,SAAS,GAEP,WAAW,UAFJ,EACN,KAAK,UACN,WAAW,EAXT,2GAWL,CADS,CACK;IAGf,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,QAAQ,EAAE;QAChD,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,MAAM,QAAA;KACP,CAAC,CAAA;IAGF,SAAS,WAAW,CAAC,CAAuC;QAC1D,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAA;IACvB,CAAC;IAGD,OAAO,CACL,wBAAC,qBAAS,aACR,GAAG,EAAE,aAAa,CAAC,OAAO,EAC1B,SAAS,EAAC,QAAQ,EAClB,OAAO,EAAE,WAAW,IAChB,KAAK,eAER,OAAO,IAAI,uBAAC,qCAAiB,IAAC,GAAG,EAAE,aAAa,CAAC,MAAM,WAAI,EAC3D,CAAC,OAAO,IAAI,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,wBAAM,aAAa,CAAC,IAAI,GAAK,aAAa,CAAC,QAAQ,YAAI,EAC1F,QAAQ,IAAI,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;oBACrC,IAAI,EAAE,aAAa,CAAC,IAAI;iBACzB,WAAG,EACJ,uBAAC,WAAI,IAAC,IAAI,EAAE,SAAS,EAAE,KAAK,wBAAM,aAAa,CAAC,IAAI,GAAK,aAAa,CAAC,SAAS,YAAI,aAC1E,CACb,CAAA;AACH,CAAC,CAAA;AA3CY,QAAA,MAAM,UA2ClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,2CAA4F;AAE5F,gCAA8B;AAC9B,gCAA8B;AAG9B,2CAAwB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,2CAA4F;AAE5F,gCAA8B;AAC9B,gCAA8B;AAG9B,2CAAwB;AASjB,IAAM,QAAQ,GAAG,UAAC,aAA2B;IAC3C,IAAA,OAAO,GAA6F,aAAa,QAA1G,EAAE,aAAa,GAA8E,aAAa,cAA3F,EAAE,KAA4E,aAAa,SAA7E,EAAZ,QAAQ,mBAAE,EAAE,KAAA,EAAE,KAA8D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@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WebInputFile } from '@codeleap/common';
|
|
1
3
|
export declare type FileInputRef = {
|
|
2
4
|
openFilePicker: () => void;
|
|
3
5
|
};
|
|
4
|
-
export declare const FileInput:
|
|
6
|
+
export declare const FileInput: React.ForwardRefExoticComponent<Omit<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type"> & {
|
|
7
|
+
onFileSelect(files: WebInputFile[]): void;
|
|
8
|
+
} & React.RefAttributes<FileInputRef>>;
|
|
@@ -3,4 +3,4 @@ import { TextProps } from './Text';
|
|
|
3
3
|
export declare type LinkProps<T extends ElementType> = TextProps<T> & {
|
|
4
4
|
openNewTab?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const Link: <T extends ElementType = "a">(linkProps:
|
|
6
|
+
export declare const Link: <T extends ElementType<any> = "a">(linkProps: LinkProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.CustomSelect = void 0;
|
|
26
|
+
var react_1 = require("@emotion/react");
|
|
27
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
28
|
+
var common_1 = require("@codeleap/common");
|
|
29
|
+
var react_2 = require("react");
|
|
30
|
+
var TextInput_1 = require("../TextInput");
|
|
31
|
+
var Icon_1 = require("../Icon");
|
|
32
|
+
var Touchable_1 = require("../Touchable");
|
|
33
|
+
var View_1 = require("../View");
|
|
34
|
+
var Text_1 = require("../Text");
|
|
35
|
+
var SelectItem = function (_a) {
|
|
36
|
+
var styles = _a.styles, iconName = _a.iconName, onPress = _a.onPress, label = _a.label, inList = _a.inList;
|
|
37
|
+
return (0, jsx_runtime_1.jsxs)(Touchable_1.Touchable, __assign({ onPress: onPress, css: inList ? [
|
|
38
|
+
styles.itemWrapper,
|
|
39
|
+
] : [
|
|
40
|
+
styles.buttonWrapper,
|
|
41
|
+
] }, { children: [typeof label === 'string' ?
|
|
42
|
+
(0, jsx_runtime_1.jsx)(Text_1.Text, { text: label, css: inList ? styles.itemText : styles.buttonText }, void 0)
|
|
43
|
+
: label, !inList &&
|
|
44
|
+
(0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: iconName, style: styles.buttonIcon }, void 0)] }), void 0);
|
|
45
|
+
};
|
|
46
|
+
var InputWrapper = function (props) {
|
|
47
|
+
var styles = props.styles, label = props.label, children = props.children, currentContent = props.currentContent, open = props.open, error = props.error, wrapperProps = __rest(props, ["styles", "label", "children", "currentContent", "open", "error"]);
|
|
48
|
+
return (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: styles.wrapper }, wrapperProps, { children: [(0, jsx_runtime_1.jsx)(TextInput_1.InputLabel, { label: label, style: styles.label }, void 0), (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: styles.inputWrapper }, { children: [currentContent, (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: styles.list }, { children: children }), void 0)] }), void 0), (0, jsx_runtime_1.jsx)(TextInput_1.FormError, { message: error.message, style: styles.error }, void 0)] }), void 0);
|
|
49
|
+
};
|
|
50
|
+
var CustomSelect = function (selectProps) {
|
|
51
|
+
var _a = selectProps.options, options = _a === void 0 ? [] : _a, value = selectProps.value, onValueChange = selectProps.onValueChange, renderCurrentlySelected = selectProps.renderCurrentlySelected, renderItem = selectProps.renderItem, placeholder = selectProps.placeholder, onDropdownToggle = selectProps.onDropdownToggle, variants = selectProps.variants, responsiveVariants = selectProps.responsiveVariants, styles = selectProps.styles, validate = selectProps.validate, disabled = selectProps.disabled, arrowIconName = selectProps.arrowIconName, props = __rest(selectProps, ["options", "value", "onValueChange", "renderCurrentlySelected", "renderItem", "placeholder", "onDropdownToggle", "variants", "responsiveVariants", "styles", "validate", "disabled", "arrowIconName"]);
|
|
52
|
+
var _b = (0, common_1.useBooleanToggle)(false), isOpen = _b[0], setOpen = _b[1];
|
|
53
|
+
var _c = (0, common_1.useBooleanToggle)(false), isHovering = _c[0], setHovering = _c[1];
|
|
54
|
+
var optionLabelMap = (0, react_2.useMemo)(function () {
|
|
55
|
+
return Object.fromEntries(options.map(function (_a) {
|
|
56
|
+
var label = _a.label, value = _a.value;
|
|
57
|
+
return [value, label];
|
|
58
|
+
}));
|
|
59
|
+
}, [options]);
|
|
60
|
+
var variantStyles = (0, common_1.useComponentStyle)('Select', {
|
|
61
|
+
styles: styles,
|
|
62
|
+
variants: variants,
|
|
63
|
+
responsiveVariants: responsiveVariants,
|
|
64
|
+
});
|
|
65
|
+
var CurrentContent = renderCurrentlySelected || SelectItem;
|
|
66
|
+
var Item = renderItem || SelectItem;
|
|
67
|
+
var isValueEmpty = (value === null || typeof value === 'undefined');
|
|
68
|
+
var currentOption = isValueEmpty ? { label: placeholder, value: value } : { label: optionLabelMap[value], value: value };
|
|
69
|
+
(0, common_1.onUpdate)(function () {
|
|
70
|
+
onDropdownToggle === null || onDropdownToggle === void 0 ? void 0 : onDropdownToggle(isOpen);
|
|
71
|
+
}, [isOpen]);
|
|
72
|
+
var _d = (0, common_1.useValidate)(value, validate), showError = _d.showError, error = _d.error;
|
|
73
|
+
function getStyles(key, append) {
|
|
74
|
+
if (append === void 0) { append = {}; }
|
|
75
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, variantStyles[key]), (0, common_1.optionalObject)(isOpen, variantStyles["".concat(key, ":open")], {})), (0, common_1.optionalObject)(isHovering, variantStyles["".concat(key, ":hover")], {})), (0, common_1.optionalObject)(showError, variantStyles["".concat(key, ":error")], {})), (0, common_1.optionalObject)(disabled, variantStyles["".concat(key, ":disabled")], {})), append);
|
|
76
|
+
}
|
|
77
|
+
return (0, jsx_runtime_1.jsx)(InputWrapper, __assign({ currentContent: (0, jsx_runtime_1.jsx)(CurrentContent, __assign({}, currentOption, { onPress: function () { return setOpen(); }, styles: {
|
|
78
|
+
buttonIcon: getStyles('buttonIcon'),
|
|
79
|
+
buttonText: getStyles('buttonText'),
|
|
80
|
+
buttonWrapper: getStyles('buttonWrapper'),
|
|
81
|
+
}, open: isOpen, iconName: arrowIconName || 'selectArrow' }), void 0), error: error, styles: {
|
|
82
|
+
wrapper: getStyles('wrapper'),
|
|
83
|
+
label: getStyles('label'),
|
|
84
|
+
inputWrapper: getStyles('inputWrapper'),
|
|
85
|
+
list: getStyles('list'),
|
|
86
|
+
error: getStyles('error'),
|
|
87
|
+
} }, props, { onHover: setHovering }, { children: options.map(function (item) { return ((0, react_1.createElement)(Item, __assign({}, item, { inList: true, onPress: function () { return onValueChange(item.value); }, selected: item.value === value, key: item.value, styles: {
|
|
88
|
+
itemText: getStyles('itemText', __assign({}, (0, common_1.optionalObject)(item.value === value, variantStyles['itemText:selected'], {}))),
|
|
89
|
+
itemWrapper: getStyles('itemWrapper', __assign({}, (0, common_1.optionalObject)(item.value === value, variantStyles['itemWrapper:selected'], {}))),
|
|
90
|
+
} }))); }) }), void 0);
|
|
91
|
+
};
|
|
92
|
+
exports.CustomSelect = CustomSelect;
|
|
93
|
+
//# sourceMappingURL=Custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../../src/components/Select/Custom.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAwI;AACxI,+BAA+B;AAC/B,0CAAqD;AACrD,gCAA+B;AAC/B,0CAAyC;AACzC,gCAA8B;AAC9B,gCAA8B;AAK9B,IAAM,UAAU,GAA8D,UAAC,EAA2C;QAA1C,MAAM,YAAA,EAAE,QAAQ,cAAA,EAAG,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA;IAEvH,OAAO,wBAAC,qBAAS,aACf,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;YACZ,MAAM,CAAC,WAAW;SACnB,CAAC,CAAC,CAAC;YACF,MAAM,CAAC,aAAa;SACrB,iBACC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC;gBAC3B,uBAAC,WAAI,IAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,WAAG;gBACvE,CAAC,CAAE,KAAK,EAGR,CAAC,MAAM;gBACP,uBAAC,WAAI,IAAC,IAAI,EAAE,QAA2B,EAAE,KAAK,EAAE,MAAM,CAAC,UAAiB,WAAG,aAEnE,CAAA;AACd,CAAC,CAAA;AAGD,IAAM,YAAY,GAAG,UAAC,KAAK;IAElB,IAAA,MAAM,GAAmE,KAAK,OAAxE,EAAE,KAAK,GAA4D,KAAK,MAAjE,EAAE,QAAQ,GAAkD,KAAK,SAAvD,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K,EAC9B,GAAG,EAAE,IAAI,CAAC,KAAK,EACf,MAAM,EAAE;gBACN,QAAQ,EAAE,SAAS,CAAC,UAAU,eAAO,IAAA,uBAAc,EAAC,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAAE,EAAE,CAAC,EAAG;gBACpH,WAAW,EAAE,SAAS,CAAC,aAAa,eAAO,IAAA,uBAAc,EAAC,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE,aAAa,CAAC,sBAAsB,CAAC,EAAE,EAAE,CAAC,EAAG;aAC9H,IACD,CAAC,EAXiB,CAWjB,CACJ,YAEU,CAAA;AACjB,CAAC,CAAA;AAlGY,QAAA,YAAY,gBAkGxB"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { SelectStyles, ComponentVariants, StylesOf, SelectComposition } from '@codeleap/common';
|
|
2
2
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
-
import { ViewProps } from '
|
|
4
|
-
declare type
|
|
3
|
+
import { ViewProps } from '../View';
|
|
4
|
+
declare type HTMLSelectProps = ComponentPropsWithRef<'select'>;
|
|
5
5
|
declare type Option = {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string | number;
|
|
8
8
|
};
|
|
9
|
-
export declare type
|
|
9
|
+
export declare type NativeSelectProps = HTMLSelectProps & {
|
|
10
10
|
options: Array<Option>;
|
|
11
11
|
styles?: StylesOf<SelectComposition>;
|
|
12
12
|
label?: string | ReactNode;
|
|
13
13
|
wrapperProps?: ViewProps<'div'>;
|
|
14
14
|
onValueChange?: (value: string | number) => void;
|
|
15
15
|
} & ComponentVariants<typeof SelectStyles>;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const NativeSelect: (selectProps: NativeSelectProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -22,12 +22,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
25
|
+
exports.NativeSelect = void 0;
|
|
26
26
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
27
27
|
var common_1 = require("@codeleap/common");
|
|
28
|
-
var View_1 = require("
|
|
29
|
-
var Text_1 = require("
|
|
30
|
-
var
|
|
28
|
+
var View_1 = require("../View");
|
|
29
|
+
var Text_1 = require("../Text");
|
|
30
|
+
var NativeSelect = function (selectProps) {
|
|
31
31
|
var _a = selectProps.variants, variants = _a === void 0 ? [] : _a, _b = selectProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, options = selectProps.options, styles = selectProps.styles, label = selectProps.label, onValueChange = selectProps.onValueChange, wrapperProps = selectProps.wrapperProps, value = selectProps.value, props = __rest(selectProps, ["variants", "responsiveVariants", "options", "styles", "label", "onValueChange", "wrapperProps", "value"]);
|
|
32
32
|
var variantStyles = (0, common_1.useComponentStyle)('Select', {
|
|
33
33
|
responsiveVariants: responsiveVariants,
|
|
@@ -40,5 +40,5 @@ var Select = function (selectProps) {
|
|
|
40
40
|
}
|
|
41
41
|
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: variantStyles.wrapper }, wrapperProps, { children: [label ? (typeof label === 'string' ? (0, jsx_runtime_1.jsx)(Text_1.Text, { css: variantStyles.label, text: label }, void 0) : label) : null, (0, jsx_runtime_1.jsx)(View_1.View, __assign({ component: 'select', css: variantStyles.select }, props, { onChange: handleChange }, { children: options.map(function (option, index) { return ((0, jsx_runtime_1.jsx)("option", __assign({ value: option.value, selected: value == option.value }, { children: option.label }), index)); }) }), void 0)] }), void 0));
|
|
42
42
|
};
|
|
43
|
-
exports.
|
|
44
|
-
//# sourceMappingURL=
|
|
43
|
+
exports.NativeSelect = NativeSelect;
|
|
44
|
+
//# sourceMappingURL=Native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Native.js","sourceRoot":"","sources":["../../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C,GAAG,CAAC,UAAC,MAAM,EAAE,KAAK,IAAK,OAAA,CAC9B,4CAAQ,KAAK,EAAE,MAAM,CAAC,KAAK,EAAc,QAAQ,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK,gBACrE,MAAM,CAAC,KAAK,KADmB,KAAK,CAE9B,CACV,EAJ+B,CAI/B,CAAC,YACG,aACF,CACR,CAAA;AACH,CAAC,CAAA;AArCY,QAAA,YAAY,gBAqCxB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NativeSelectProps } from './Native';
|
|
2
|
+
import { CustomSelectProps } from './types';
|
|
3
|
+
export declare type SelectProps<T extends string | number = string> = ({
|
|
4
|
+
type?: 'native';
|
|
5
|
+
} & NativeSelectProps) | ({
|
|
6
|
+
type?: never;
|
|
7
|
+
} & CustomSelectProps<T>);
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './styles';
|
|
10
|
+
export declare const Select: <T extends string | number = string>(props: SelectProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
21
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.Select = void 0;
|
|
25
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
26
|
+
var Custom_1 = require("./Custom");
|
|
27
|
+
var Native_1 = require("./Native");
|
|
28
|
+
__exportStar(require("./types"), exports);
|
|
29
|
+
__exportStar(require("./styles"), exports);
|
|
30
|
+
var Select = function (props) {
|
|
31
|
+
if (props.type === 'native') {
|
|
32
|
+
return (0, jsx_runtime_1.jsx)(Native_1.NativeSelect, __assign({}, props), void 0);
|
|
33
|
+
}
|
|
34
|
+
return (0, jsx_runtime_1.jsx)(Custom_1.CustomSelect, __assign({}, props), void 0);
|
|
35
|
+
};
|
|
36
|
+
exports.Select = Select;
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAuC;AACvC,mCAA0D;AAS1D,0CAAuB;AACvB,2CAAwB;AAEjB,IAAM,MAAM,GAAG,UAAmC,KAAoB;IAC3E,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAC;QAC1B,OAAO,uBAAC,qBAAY,eAAK,KAAK,UAAI,CAAA;KACnC;IAED,OAAO,uBAAC,qBAAY,eAAK,KAAK,UAAG,CAAA;AACnC,CAAC,CAAA;AANY,QAAA,MAAM,UAMlB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare type WebSelectParts = 'wrapper' | 'label' | 'inputWrapper' | 'list' | 'itemWrapper' | 'itemWrapper:selected' | 'itemText' | 'itemText:selected' | 'buttonWrapper' | 'buttonText' | 'buttonIcon' | 'error';
|
|
2
|
+
export declare type WebSelectComposition = `${WebSelectParts}:hover` | `${WebSelectParts}:open` | `${WebSelectParts}:error` | `${WebSelectParts}:disabled` | WebSelectParts;
|
|
3
|
+
export declare const WebSelectStyles: {
|
|
4
|
+
default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<WebSelectComposition, any>>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.WebSelectStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createSelectStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
exports.WebSelectStyles = {
|
|
18
|
+
default: createSelectStyle(function (Theme) { return ({
|
|
19
|
+
wrapper: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
},
|
|
23
|
+
label: __assign({}, Theme.spacing.marginBottom(1)),
|
|
24
|
+
inputWrapper: {
|
|
25
|
+
position: 'relative',
|
|
26
|
+
},
|
|
27
|
+
list: __assign(__assign(__assign(__assign({ position: 'absolute', left: 0, right: 0, display: 'flex', top: '110%', backgroundColor: Theme.colors.gray }, Theme.presets.column), { overflowY: 'hidden', transition: 'all 0.5s ease', maxHeight: 0 }), Theme.border.create({
|
|
28
|
+
width: 0,
|
|
29
|
+
color: 'transparent',
|
|
30
|
+
})), { borderRadius: Theme.borderRadius.small }),
|
|
31
|
+
'list:open': __assign({ maxHeight: '500%', overflowY: 'auto' }, Theme.border.primary(1)),
|
|
32
|
+
itemText: {},
|
|
33
|
+
itemWrapper: __assign(__assign({}, Theme.spacing.padding(0.5)), { cursor: 'pointer', display: 'flex' }),
|
|
34
|
+
'itemText:selected': {},
|
|
35
|
+
'itemWrapper:selected': {},
|
|
36
|
+
buttonWrapper: __assign(__assign(__assign(__assign(__assign({}, Theme.border.primary(1)), Theme.presets.fullWidth), Theme.presets.alignCenter), Theme.spacing.padding(0.5)), { backgroundColor: Theme.colors.gray, borderRadius: Theme.borderRadius.small, cursor: 'pointer', display: 'flex' }),
|
|
37
|
+
'button:open': {},
|
|
38
|
+
buttonText: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
},
|
|
41
|
+
buttonIcon: {
|
|
42
|
+
height: 24,
|
|
43
|
+
width: 24,
|
|
44
|
+
color: Theme.colors.white,
|
|
45
|
+
transition: 'all 0.2s ease',
|
|
46
|
+
},
|
|
47
|
+
'buttonIcon:open': {
|
|
48
|
+
transform: 'rotate(180deg)',
|
|
49
|
+
},
|
|
50
|
+
error: {
|
|
51
|
+
color: Theme.colors.negative,
|
|
52
|
+
},
|
|
53
|
+
}); }),
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Select/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8D;AAuB9D,IAAM,iBAAiB,GAAG,IAAA,oCAA2B,GAAwB,CAAA;AAGhE,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,iBAAiB,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC;QACrC,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB;QACD,KAAK,eACA,KAAK,CAAC,OAAO,CAAC,YAAY,CAA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ACR;QACD,UAAU,EAAE;YACV,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK;YACzB,UAAU,EAAE,eAAe;SAC5B;QACD,iBAAiB,EAAE;YACjB,SAAS,EAAE,gBAAgB;SAC5B;QACD,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ;SAC7B;KACF,CAAC,EAjFoC,CAiFpC,CAAC;CAEJ,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentVariants, FormTypes, IconPlaceholder } from '@codeleap/common';
|
|
3
|
+
import { StylesOf } from '../../types/utility';
|
|
4
|
+
import { WebSelectComposition, WebSelectStyles } from './styles';
|
|
5
|
+
export declare type SelectRenderFNProps<T> = FormTypes.Options<T>[number] & {
|
|
6
|
+
styles: StylesOf<WebSelectComposition>;
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
inList?: boolean;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare type SelectRenderFN<T> = (props: SelectRenderFNProps<T>) => JSX.Element;
|
|
13
|
+
export declare type CustomSelectProps<T> = {
|
|
14
|
+
value: T;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
label?: FormTypes.Label;
|
|
17
|
+
options?: FormTypes.Options<T>;
|
|
18
|
+
onDropdownToggle?: (isOpen?: boolean) => void;
|
|
19
|
+
onValueChange?: (value: T) => void;
|
|
20
|
+
renderItem?: SelectRenderFN<T>;
|
|
21
|
+
renderCurrentlySelected?: SelectRenderFN<T>;
|
|
22
|
+
styles?: StylesOf<WebSelectComposition>;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
validate?: FormTypes.ValidatorFunction<any> | string;
|
|
25
|
+
arrowIconName?: IconPlaceholder;
|
|
26
|
+
} & ComponentVariants<typeof WebSelectStyles>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":""}
|
|
@@ -6,4 +6,4 @@ export declare type TextProps<T extends ElementType> = {
|
|
|
6
6
|
text?: string;
|
|
7
7
|
styles?: StylesOf<TextComposition>;
|
|
8
8
|
} & ComponentPropsWithoutRef<T> & ComponentVariants<typeof TextStyles>;
|
|
9
|
-
export declare const Text: <T extends ElementType
|
|
9
|
+
export declare const Text: <T extends ElementType<any>>(textProps: TextProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -23,7 +23,105 @@ export declare type TextInputProps = ComponentVariants<typeof TextInputStyles> &
|
|
|
23
23
|
password?: boolean;
|
|
24
24
|
visibilityToggle?: boolean;
|
|
25
25
|
};
|
|
26
|
-
export declare const TextInput:
|
|
26
|
+
export declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "form" | "label" | "slot" | "style" | "title" | "pattern" | "wrap" | "hidden" | "children" | "styles" | "disabled" | "leftIcon" | "rightIcon" | "placeholder" | "className" | "color" | "height" | "id" | "lang" | "max" | "min" | "name" | "type" | "width" | "role" | "tabIndex" | "crossOrigin" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "alt" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "autoComplete" | "accept" | "capture" | "checked" | "multiple" | "cols" | "dirName" | "maxLength" | "minLength" | "src" | "list" | "key" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "enterKeyHint" | "readOnly" | "required" | "size" | "step" | "password" | "rows" | keyof ComponentVariants<{
|
|
27
|
+
default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
28
|
+
line: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
29
|
+
box: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
30
|
+
pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
31
|
+
fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
32
|
+
block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
33
|
+
flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
34
|
+
absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
35
|
+
sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
36
|
+
row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
37
|
+
center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
38
|
+
column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
39
|
+
wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
40
|
+
inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
41
|
+
inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
42
|
+
hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
43
|
+
full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
44
|
+
noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
45
|
+
fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
46
|
+
fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
47
|
+
fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
48
|
+
fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
49
|
+
fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
50
|
+
whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
51
|
+
centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
52
|
+
listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
53
|
+
alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
54
|
+
alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
55
|
+
alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
56
|
+
justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
57
|
+
justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
58
|
+
justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
59
|
+
justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
60
|
+
textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
61
|
+
textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
62
|
+
textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
63
|
+
blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
64
|
+
elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
65
|
+
neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
66
|
+
scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
67
|
+
scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
68
|
+
scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
69
|
+
debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
70
|
+
debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
71
|
+
debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
72
|
+
debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
73
|
+
}, import("@codeleap/common").EnhancedTheme<any>, import("@codeleap/common").VariantProp<{
|
|
74
|
+
default: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
75
|
+
line: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
76
|
+
box: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
77
|
+
pill: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
78
|
+
fixed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
79
|
+
block: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
80
|
+
flex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
81
|
+
absolute: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
82
|
+
sticky: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
83
|
+
row: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
84
|
+
center: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
85
|
+
column: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
86
|
+
wrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
87
|
+
inline: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
88
|
+
inlineFlex: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
89
|
+
hidden: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
90
|
+
full: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
91
|
+
noWrap: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
92
|
+
fullWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
93
|
+
fullHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
94
|
+
fullView: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
95
|
+
fullViewWidth: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
96
|
+
fullViewHeight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
97
|
+
whole: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
98
|
+
centerRow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
99
|
+
listStyles: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
100
|
+
alignStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
101
|
+
alignEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
102
|
+
alignCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
103
|
+
justifyStart: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
104
|
+
justifyEnd: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
105
|
+
justifyCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
106
|
+
justifySpaceBetween: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
107
|
+
textRight: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
108
|
+
textLeft: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
109
|
+
textCenter: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
110
|
+
blur: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
111
|
+
elevated: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
112
|
+
neumorphism: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
113
|
+
scrollX: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
114
|
+
scrollY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
115
|
+
scrollXY: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
116
|
+
debRed: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
117
|
+
debGreen: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
118
|
+
debBlue: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
119
|
+
debYellow: (theme: import("@codeleap/common").EnhancedTheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
120
|
+
}>> | "multiline" | "onChangeText" | "edited" | "validate" | "visibilityToggle"> & React.RefAttributes<HTMLInputElement>>;
|
|
121
|
+
export declare const FormError: ({ message, ...props }: {
|
|
122
|
+
[x: string]: any;
|
|
123
|
+
message: any;
|
|
124
|
+
}) => any;
|
|
27
125
|
export declare const InputIcon: React.FC<{
|
|
28
126
|
style: any;
|
|
29
127
|
} & IconProp>;
|
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.InputLabel = exports.InputIcon = exports.TextInput = void 0;
|
|
28
|
+
exports.InputLabel = exports.InputIcon = exports.FormError = exports.TextInput = void 0;
|
|
29
29
|
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
30
|
var common_1 = require("@codeleap/common");
|
|
31
31
|
var react_1 = require("react");
|
|
@@ -87,15 +87,16 @@ exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
|
|
|
87
87
|
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: [variantStyles.wrapper, focused && variantStyles['wrapper:focus'], showError && variantStyles['wrapper:error']] }, { children: [(0, jsx_runtime_1.jsx)(exports.InputLabel, { label: label, style: variantStyles.label }, void 0), (0, jsx_runtime_1.jsxs)(View_1.View, __assign({ css: [variantStyles.innerWrapper, focused && variantStyles['innerWrapper:focus'], showError && variantStyles['innerWrapper:error']] }, { children: [(0, jsx_runtime_1.jsx)(exports.InputIcon, __assign({}, leftIcon, { style: leftIconStyle }), void 0), (0, jsx_runtime_1.jsx)(InputElement, __assign({ ref: input, type: visibilityToggle ? inputVisibilityType : inputType, onChange: handleChange, value: value, disabled: disabled, onFocus: handleFocus, onBlur: handleBlur, rows: 4 }, props, { css: [variantStyles.textField, focused && variantStyles['textField:focus'], showError && variantStyles['textField:error']] }), void 0), visibilityToggle ?
|
|
88
88
|
(0, jsx_runtime_1.jsx)(exports.InputIcon, { name: (textIsVisible ? 'input-visiblity:visible' : 'input-visiblity:hidden'), action: function () { return setTextVisible(); }, style: rightIconStyle }, void 0)
|
|
89
89
|
:
|
|
90
|
-
(0, jsx_runtime_1.jsx)(exports.InputIcon, __assign({}, rightIcon, { style: rightIconStyle }), void 0)] }), void 0), (0, jsx_runtime_1.jsx)(FormError, { message: error.message, css: __assign({}, variantStyles.error) }, void 0)] }), void 0));
|
|
90
|
+
(0, jsx_runtime_1.jsx)(exports.InputIcon, __assign({}, rightIcon, { style: rightIconStyle }), void 0)] }), void 0), (0, jsx_runtime_1.jsx)(exports.FormError, { message: error.message, css: __assign({}, variantStyles.error) }, void 0)] }), void 0));
|
|
91
91
|
});
|
|
92
92
|
var FormError = function (_a) {
|
|
93
93
|
var message = _a.message, props = __rest(_a, ["message"]);
|
|
94
94
|
if (['number', 'string', 'undefined'].includes(typeof message)) {
|
|
95
|
-
return (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ text: "".concat(message || ' ')
|
|
95
|
+
return (0, jsx_runtime_1.jsx)(Text_1.Text, __assign({ text: "".concat(message || ' ') }, props), void 0);
|
|
96
96
|
}
|
|
97
97
|
return message;
|
|
98
98
|
};
|
|
99
|
+
exports.FormError = FormError;
|
|
99
100
|
var InputIcon = function (_a) {
|
|
100
101
|
var name = _a.name, style = _a.style, action = _a.action;
|
|
101
102
|
if (!name)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAU8C;AAC9C,+BAA2G;AAC3G,oFAAsD;AACtD,+BAA8B;AAC9B,+BAA+B;AAC/B,mCAAkC;AAMlC,sBAAyB;
|
|
1
|
+
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAU8C;AAC9C,+BAA2G;AAC3G,oFAAsD;AACtD,+BAA8B;AAC9B,+BAA+B;AAC/B,mCAAkC;AAMlC,sBAAyB;AA2BZ,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAmC,UAAC,QAAQ,EAAE,QAAQ;IAErF,IAAA,QAAQ,GAmBN,QAAQ,SAnBF,EACR,IAAI,GAkBF,QAAQ,KAlBN,EACJ,KAAK,GAiBH,QAAQ,MAjBL,EACL,YAAY,GAgBV,QAAQ,aAhBE,EACZ,QAAQ,GAeN,QAAQ,SAfF,EACR,MAAM,GAcJ,QAAQ,OAdJ,EACN,OAAO,GAaL,QAAQ,QAbH,EACP,MAAM,GAYJ,QAAQ,OAZJ,EACN,SAAS,GAWP,QAAQ,UAXD,EACT,kBAAkB,GAUhB,QAAQ,mBAVQ,EAClB,QAAQ,GASN,QAAQ,SATF,EACR,KAAK,GAQH,QAAQ,MARL,EACL,QAAQ,GAON,QAAQ,SAPF,EACR,SAAS,GAMP,QAAQ,UAND,EACT,MAAM,GAKJ,QAAQ,OALJ,EACN,QAAQ,GAIN,QAAQ,SAJF,EAC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QAET,OAAO,uBAAC,eAAM,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,cAAM,OAAA,MAAM,EAAE,EAAR,CAAQ,EAAG,MAAM,EAAE;gBAC3D,IAAI,EAAE,KAAK;aACZ,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,WAAG,CAAA;KACzB;IAED,OAAO,uBAAC,OAAI,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,WAAG,CAAA;AAC1C,CAAC,CAAA;AAXY,QAAA,SAAS,aAWrB;AACM,IAAM,UAAU,GAAG,UAAC,EAAc;QAAb,KAAK,WAAA,EAAE,KAAK,WAAA;IACtC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,QAAQ,OAAO,KAAK,EAAC;QACnB,KAAK,QAAQ;YACX,OAAO,uBAAC,WAAI,IAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,WAAG,CAAA;QAC7D,KAAK,QAAQ;YAEX,OAAO,KAAK,CAAA;QACd;YACE,OAAO,IAAI,CAAA;KACd;AACH,CAAC,CAAA;AAZY,QAAA,UAAU,cAYtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { AnyFunction } from '@codeleap/common';
|
|
3
3
|
import { CSSObject } from '@emotion/react';
|
|
4
|
-
import { ComponentPropsWithRef, ElementType } from 'react';
|
|
4
|
+
import React, { ComponentPropsWithRef, ElementType } from 'react';
|
|
5
5
|
export declare type TouchableProps<T extends ElementType> = ComponentPropsWithRef<T> & {
|
|
6
6
|
css?: CSSObject;
|
|
7
7
|
component?: T;
|
|
@@ -9,4 +9,4 @@ export declare type TouchableProps<T extends ElementType> = ComponentPropsWithRe
|
|
|
9
9
|
propagate?: boolean;
|
|
10
10
|
onPress?: AnyFunction;
|
|
11
11
|
};
|
|
12
|
-
export declare const Touchable: <T extends ElementType = <T_1 extends ElementType = "div">(props:
|
|
12
|
+
export declare const Touchable: <T extends React.ElementType<any> = <T_1 extends React.ElementType<any> = "div">(props: import("./View").ViewProps<T_1>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>(touchableProps: TouchableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ComponentVariants, ViewStyles, BaseViewProps } from '@codeleap/common';
|
|
2
|
-
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
2
|
+
import { ComponentPropsWithRef, ElementType, ReactElement, ReactNode, Ref } from 'react';
|
|
3
3
|
export declare type ViewProps<T extends ElementType> = ComponentPropsWithRef<T> & ComponentVariants<typeof ViewStyles> & {
|
|
4
4
|
component?: T;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
css?: any;
|
|
7
7
|
} & BaseViewProps;
|
|
8
|
-
export declare const ViewCP: <T extends ElementType = "div">(viewProps:
|
|
9
|
-
export declare const View: <T extends ElementType = "div">(props:
|
|
8
|
+
export declare const ViewCP: <T extends ElementType<any> = "div">(viewProps: ViewProps<T>, ref: Ref<any>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const View: <T extends ElementType<any> = "div">(props: ViewProps<T>) => ReactElement;
|
package/dist/lib/hooks.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"repository": "git@github.com:codeleap-uk/codeleap-lib.git",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"license": "UNLICENSED",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@codeleap/config": "*",
|
|
11
|
+
"@types/react": "^17.0.38",
|
|
11
12
|
"@types/react-dom": "^17.0.11",
|
|
12
13
|
"@types/react-window": "^1.8.5",
|
|
13
14
|
"react": "^17.0.2",
|
|
@@ -15,8 +16,7 @@
|
|
|
15
16
|
},
|
|
16
17
|
"scripts": {
|
|
17
18
|
"build": "tsc --build",
|
|
18
|
-
"lint": "./node_modules/.bin/eslint -c .eslintrc.js \"./src/**/*.{ts,tsx,js,jsx}\""
|
|
19
|
-
"publish": "npm publish"
|
|
19
|
+
"lint": "./node_modules/.bin/eslint -c .eslintrc.js \"./src/**/*.{ts,tsx,js,jsx}\""
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/css": "^11.7.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/components/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2CAAmH;AAEnH,+BAAyC;AACzC,+BAA8B;AAiBvB,IAAM,MAAM,GAAG,UAAC,WAAuB;IAE1C,IAAA,KASE,WAAW,SATA,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAQE,WAAW,mBARU,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,OAAO,GAOL,WAAW,QAPN,EACP,MAAM,GAMJ,WAAW,OANP,EACN,KAAK,GAKH,WAAW,MALR,EACL,aAAa,GAIX,WAAW,cAJA,EACb,YAAY,GAGV,WAAW,aAHD,EACZ,KAAK,GAEH,WAAW,MAFR,EACF,KAAK,UACN,WAAW,EAVT,0GAUL,CADS,CACM;IAEhB,IAAM,aAAa,GAAG,IAAA,0BAAiB,EAAC,QAAQ,EAAE;QAChD,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,MAAM,QAAA;KACP,CAAC,CAAA;IACF,SAAS,YAAY,CAAC,CAAC;QACrB,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;QACnC,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,C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