@helpdice/ui 2.1.8 → 2.2.2
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/auto-complete/index.js +2147 -8
- package/dist/button/index.js +2 -2
- package/dist/carousal/index.js +2 -2
- package/dist/container/box.d.ts +47 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.js +952 -0
- package/dist/copy-to-clipboard/clipboard.d.ts +13 -1
- package/dist/copy-to-clipboard/index.d.ts +1 -1
- package/dist/copy-to-clipboard/index.js +142 -157
- package/dist/grid/index.d.ts +2 -3
- package/dist/grid/index.js +0 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +14693 -14649
- package/dist/input/index.d.ts +4 -0
- package/dist/input/index.js +2151 -9
- package/dist/input/phone-input/phone.d.ts +13 -0
- package/dist/modal/index.js +2 -2
- package/dist/placeholder/index.js +643 -8
- package/dist/table/index.js +3516 -1368
- package/dist/text/child.d.ts +1 -0
- package/dist/text/index.js +686 -8
- package/dist/text/text.d.ts +1 -0
- package/esm/button/button.js +2 -2
- package/esm/container/box.d.ts +47 -0
- package/esm/container/box.js +43 -0
- package/esm/container/index.d.ts +2 -0
- package/esm/container/index.js +2 -0
- package/esm/copy-to-clipboard/clipboard.d.ts +13 -1
- package/esm/copy-to-clipboard/clipboard.js +91 -0
- package/esm/copy-to-clipboard/index.d.ts +1 -1
- package/esm/copy-to-clipboard/index.js +1 -1
- package/esm/grid/index.d.ts +2 -3
- package/esm/grid/index.js +5 -3
- package/esm/index.d.ts +3 -4
- package/esm/index.js +4 -3
- package/esm/input/index.d.ts +4 -0
- package/esm/input/index.js +4 -0
- package/esm/input/phone-input/phone.d.ts +13 -0
- package/esm/input/phone-input/phone.js +166 -0
- package/esm/table/table-cell.js +2 -1
- package/esm/text/child.d.ts +1 -0
- package/esm/text/text.d.ts +1 -0
- package/esm/text/text.js +25 -3
- package/package.json +8 -15
- package/dist/currency-input/index.js +0 -862
- package/dist/phone-input/index.js +0 -2033
- package/dist/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.js +0 -161
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/dist/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/addSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.js +0 -0
- /package/esm/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/index.js +0 -0
- /package/esm/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{phone-input → input/phone-input}/index.js +0 -0
package/dist/text/text.d.ts
CHANGED
package/esm/button/button.js
CHANGED
|
@@ -162,7 +162,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
162
162
|
disabled: disabled,
|
|
163
163
|
onClick: clickHandler
|
|
164
164
|
}, props, {
|
|
165
|
-
className: _JSXStyle.dynamic([["
|
|
165
|
+
className: _JSXStyle.dynamic([["905110486", [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']]]) + " " + (props && props.className != null && props.className || useClasses('btn', className) || "")
|
|
166
166
|
}), loading && /*#__PURE__*/React.createElement(ButtonLoading, {
|
|
167
167
|
color: color
|
|
168
168
|
}), childrenWithIcon, dripShow && /*#__PURE__*/React.createElement(ButtonDrip, {
|
|
@@ -171,7 +171,7 @@ var ButtonComponent = /*#__PURE__*/React.forwardRef(function (btnProps, ref) {
|
|
|
171
171
|
color: dripColor,
|
|
172
172
|
onCompleted: dripCompletedHandle
|
|
173
173
|
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
174
|
-
id: "
|
|
174
|
+
id: "905110486",
|
|
175
175
|
dynamic: [SCALES.height(2.5), round ? '50%' : theme.layout.radius, SCALES.font(0.875), color, bg, shadow ? 'transparent' : border, cursor, events, shadow ? btnShadow : 'none', SCALES.pl(0.727), SCALES.height(2.5), color, bg, auto ? 'min-content' : SCALES.width(10.5), auto ? 'auto' : 'initial', SCALES.height(2.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hover.color, hover.color, hover.bg, hover.border, cursor, events, btnShadow, shadow ? '-1px' : '0px']
|
|
176
176
|
}, ".btn.__jsx-style-dynamic-selector{box-sizing:border-box;display:inline-block;line-height:".concat(SCALES.height(2.5), ";border-radius:").concat(round ? '50%' : theme.layout.radius, ";font-weight:400;font-size:").concat(SCALES.font(0.875), ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;text-transform:capitalize;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;white-space:nowrap;-webkit-transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;transition:background-color 200ms ease 0ms,box-shadow 200ms ease 0ms, border 200ms ease 0ms,color 200ms ease 0ms;position:relative;overflow:hidden;color:").concat(color, ";background-color:").concat(bg, ";border:1px solid ").concat(shadow ? 'transparent' : border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(shadow ? btnShadow : 'none', ";--helpdice-ui-button-icon-padding:").concat(SCALES.pl(0.727), ";--helpdice-ui-button-height:").concat(SCALES.height(2.5), ";--helpdice-ui-button-color:").concat(color, ";--helpdice-ui-button-bg:").concat(bg, ";min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";width:").concat(auto ? 'auto' : 'initial', ";height:").concat(SCALES.height(2.5), ";padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.btn.__jsx-style-dynamic-selector:hover,.btn.__jsx-style-dynamic-selector:focus{color:").concat(hover.color, ";--helpdice-ui-button-color:").concat(hover.color, ";background-color:").concat(hover.bg, ";border-color:").concat(hover.border, ";cursor:").concat(cursor, ";pointer-events:").concat(events, ";box-shadow:").concat(btnShadow, ";}.btn.__jsx-style-dynamic-selector .text{position:relative;z-index:1;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;line-height:inherit;top:-1px;}.btn.__jsx-style-dynamic-selector .text p,.btn.__jsx-style-dynamic-selector .text pre,.btn.__jsx-style-dynamic-selector .text div{margin:0;}.ripple.__jsx-style-dynamic-selector{position:absolute;border-radius:50%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;animation:ripple-animation-__jsx-style-dynamic-selector 600ms ease-out;background-color:rgba(0,0,0,0.3);pointer-events:none;z-index:1;}@-webkit-keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}@keyframes ripple-animation-__jsx-style-dynamic-selector{to{-webkit-transform:scale(2.5);-ms-transform:scale(2.5);transform:scale(2.5);opacity:0;}}")));
|
|
177
177
|
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const wrap: ["nowrap", "wrap", "wrap-reverse"];
|
|
3
|
+
export type Wrap = typeof wrap[number];
|
|
4
|
+
type ContainerProps = {
|
|
5
|
+
gap?: number;
|
|
6
|
+
direction?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
justify?: string;
|
|
9
|
+
alignItems?: string;
|
|
10
|
+
alignContent?: string;
|
|
11
|
+
wrap?: Wrap;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<ContainerProps & {
|
|
15
|
+
width?: string | number;
|
|
16
|
+
height?: string | number;
|
|
17
|
+
padding?: string | number;
|
|
18
|
+
margin?: string | number;
|
|
19
|
+
w?: string | number;
|
|
20
|
+
h?: string | number;
|
|
21
|
+
paddingLeft?: string | number;
|
|
22
|
+
paddingRight?: string | number;
|
|
23
|
+
paddingTop?: string | number;
|
|
24
|
+
paddingBottom?: string | number;
|
|
25
|
+
pl?: string | number;
|
|
26
|
+
pr?: string | number;
|
|
27
|
+
pt?: string | number;
|
|
28
|
+
pb?: string | number;
|
|
29
|
+
marginLeft?: string | number;
|
|
30
|
+
marginRight?: string | number;
|
|
31
|
+
marginTop?: string | number;
|
|
32
|
+
marginBottom?: string | number;
|
|
33
|
+
ml?: string | number;
|
|
34
|
+
mr?: string | number;
|
|
35
|
+
mt?: string | number;
|
|
36
|
+
mb?: string | number;
|
|
37
|
+
px?: string | number;
|
|
38
|
+
py?: string | number;
|
|
39
|
+
mx?: string | number;
|
|
40
|
+
my?: string | number;
|
|
41
|
+
font?: string | number;
|
|
42
|
+
unit?: string;
|
|
43
|
+
scale?: number;
|
|
44
|
+
children?: any;
|
|
45
|
+
className?: string;
|
|
46
|
+
} & React.InputHTMLAttributes<any> & React.RefAttributes<unknown>>;
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["gap", "children", "direction", "justify", "alignItems", "alignContent", "className"];
|
|
4
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
5
|
+
import React, { useMemo } from "react";
|
|
6
|
+
import GridBasicItem from "../grid/basic-item";
|
|
7
|
+
import useScale, { withScale } from '../use-scale';
|
|
8
|
+
import { useClasses } from '@helpdice/theme';
|
|
9
|
+
import { tuple } from '../utils/prop-types';
|
|
10
|
+
var wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
|
|
11
|
+
var Container = function Container(_ref) {
|
|
12
|
+
var _ref$gap = _ref.gap,
|
|
13
|
+
gap = _ref$gap === void 0 ? 0 : _ref$gap,
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
direction = _ref.direction,
|
|
16
|
+
justify = _ref.justify,
|
|
17
|
+
alignItems = _ref.alignItems,
|
|
18
|
+
alignContent = _ref.alignContent,
|
|
19
|
+
_ref$className = _ref.className,
|
|
20
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
var _useScale = useScale(),
|
|
23
|
+
unit = _useScale.unit,
|
|
24
|
+
SCALES = _useScale.SCALES;
|
|
25
|
+
var gapUnit = useMemo(function () {
|
|
26
|
+
return "calc(".concat(gap, " * ").concat(unit, " * 1/3)");
|
|
27
|
+
}, [gap, unit]);
|
|
28
|
+
var _styles$className = {
|
|
29
|
+
styles: /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
30
|
+
id: "635877754",
|
|
31
|
+
dynamic: [gapUnit, direction, wrap, justify, alignContent, alignItems, SCALES.width(1, 'var(--container-width)')]
|
|
32
|
+
}, "div.__jsx-style-dynamic-selector{--gap-unit:".concat(gapUnit, ";--container-width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";box-sizing:border-box;gap:var(--gap-unit);width:").concat(SCALES.width(1, 'var(--container-width)'), ";}")),
|
|
33
|
+
className: _JSXStyle.dynamic([["635877754", [gapUnit, direction, wrap, justify, alignContent, alignItems, SCALES.width(1, 'var(--container-width)')]]])
|
|
34
|
+
},
|
|
35
|
+
resolveClassName = _styles$className.className,
|
|
36
|
+
styles = _styles$className.styles;
|
|
37
|
+
var classes = useClasses(resolveClassName, className);
|
|
38
|
+
return /*#__PURE__*/React.createElement(GridBasicItem, _extends({
|
|
39
|
+
className: classes
|
|
40
|
+
}, props), children, styles);
|
|
41
|
+
};
|
|
42
|
+
Container.displayName = 'Container';
|
|
43
|
+
export default withScale(Container);
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
export function Clipboard(props: any): React.JSX.Element;
|
|
2
1
|
import React from 'react';
|
|
2
|
+
type ClipboardProps = {
|
|
3
|
+
showIcon: boolean;
|
|
4
|
+
text: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
onCopy: (text: string, result: any) => void;
|
|
7
|
+
options: {
|
|
8
|
+
debug: boolean;
|
|
9
|
+
message: string;
|
|
10
|
+
format: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default function Clipboard(props: ClipboardProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React, { Children } from 'react';
|
|
3
|
+
import copy from './copy';
|
|
4
|
+
import { Copy } from '@helpdice/icons';
|
|
5
|
+
import Button from '../button';
|
|
6
|
+
import { useToasts } from '@helpdice/theme';
|
|
7
|
+
// export function Clipboard(props: ClipboardProps) {
|
|
8
|
+
// const { setToast } = useToasts();
|
|
9
|
+
// const { showIcon, text, onCopy, options: options, children, } = props;
|
|
10
|
+
// const elem: ReactNode = React.Children.only(children) as ReactNode;
|
|
11
|
+
// const onClick = (event: MouseEventHandler<HTMLButtonElement | MouseEvent>) => {
|
|
12
|
+
// const result = copy(text, options);
|
|
13
|
+
|
|
14
|
+
// if (result) {
|
|
15
|
+
// setToast({
|
|
16
|
+
// text: 'Text Copied'
|
|
17
|
+
// });
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
// if (onCopy) {
|
|
21
|
+
// onCopy(text, result);
|
|
22
|
+
// }
|
|
23
|
+
|
|
24
|
+
// // Bypass onClick if it was present
|
|
25
|
+
// if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
|
26
|
+
// elem.props.onClick(event);
|
|
27
|
+
// }
|
|
28
|
+
// };
|
|
29
|
+
|
|
30
|
+
// if (showIcon) {
|
|
31
|
+
// return React.cloneElement(
|
|
32
|
+
// <div>
|
|
33
|
+
// {elem}
|
|
34
|
+
// <Button auto scale={0.1} px={0.6} onClick={onClick} icon={<Copy />} />
|
|
35
|
+
// </div>,
|
|
36
|
+
// { ...props }
|
|
37
|
+
// );
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
// return React.cloneElement(
|
|
41
|
+
// <div onClick={onClick}>
|
|
42
|
+
// {elem}
|
|
43
|
+
// </div>,
|
|
44
|
+
// { ...props }
|
|
45
|
+
// );
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
export default function Clipboard(props) {
|
|
49
|
+
var _useToasts = useToasts(),
|
|
50
|
+
setToast = _useToasts.setToast;
|
|
51
|
+
var showIcon = props.showIcon,
|
|
52
|
+
text = props.text,
|
|
53
|
+
onCopy = props.onCopy,
|
|
54
|
+
options = props.options,
|
|
55
|
+
children = props.children;
|
|
56
|
+
var elem = Children.only(children);
|
|
57
|
+
var _onClick = function onClick() {
|
|
58
|
+
var result = copy(text, options);
|
|
59
|
+
if (result) {
|
|
60
|
+
setToast({
|
|
61
|
+
text: 'Text Copied'
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (onCopy) {
|
|
65
|
+
onCopy(text, result);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ✅ Safely invoke child's onClick if it exists
|
|
69
|
+
// if (isValidElement(elem) && typeof elem?.props?.onClick === 'function') {
|
|
70
|
+
// elem.props.onClick();
|
|
71
|
+
// }
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// If showIcon is true, render the child + a copy icon button
|
|
75
|
+
if (showIcon) {
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", null, elem, /*#__PURE__*/React.createElement(Button, {
|
|
77
|
+
auto: true,
|
|
78
|
+
scale: 0.1,
|
|
79
|
+
px: 0.6,
|
|
80
|
+
onClick: function onClick() {
|
|
81
|
+
return _onClick;
|
|
82
|
+
},
|
|
83
|
+
icon: /*#__PURE__*/React.createElement(Copy, null)
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Otherwise, make the entire div clickable for copy
|
|
88
|
+
return /*#__PURE__*/React.cloneElement(/*#__PURE__*/React.createElement("div", {
|
|
89
|
+
onClick: _onClick
|
|
90
|
+
}, elem), _extends({}, props));
|
|
91
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Clipboard from "./clipboard";
|
|
2
2
|
export default Clipboard;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Clipboard from "./clipboard";
|
|
2
2
|
export default Clipboard;
|
package/esm/grid/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import Grid from './grid-base';
|
|
2
|
-
import
|
|
2
|
+
import GridContainer from './grid-container';
|
|
3
3
|
export type GridComponentType = typeof Grid & {
|
|
4
|
-
Container: typeof
|
|
4
|
+
Container: typeof GridContainer;
|
|
5
5
|
};
|
|
6
6
|
export type { GridContainerProps } from './grid-container';
|
|
7
7
|
export type { GridProps } from './grid-base';
|
|
8
8
|
export type { GridBreakpointsValue } from './basic-item';
|
|
9
9
|
export type { GridAlignContent, GridAlignItems, GridDirection, GridJustify, GridWrap, } from './grid-types';
|
|
10
|
-
export { Container };
|
|
11
10
|
declare const _default: GridComponentType;
|
|
12
11
|
export default _default;
|
package/esm/grid/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/* "use client" */;
|
|
2
2
|
import Grid from './grid-base';
|
|
3
|
-
import
|
|
4
|
-
Grid.Container =
|
|
5
|
-
export {
|
|
3
|
+
import GridContainer from './grid-container';
|
|
4
|
+
Grid.Container = GridContainer;
|
|
5
|
+
// export {
|
|
6
|
+
// Container
|
|
7
|
+
// }
|
|
6
8
|
export default Grid;
|
package/esm/index.d.ts
CHANGED
|
@@ -36,8 +36,9 @@ export type { DrawerProps } from './drawer';
|
|
|
36
36
|
export { default as Fieldset } from './fieldset';
|
|
37
37
|
export type { FieldsetProps, FieldsetTitleProps, FieldsetSubtitleProps, FieldsetGroupProps, FieldsetFooterProps, FieldsetContentProps, } from './fieldset';
|
|
38
38
|
export * from './form';
|
|
39
|
-
export { default as Grid
|
|
39
|
+
export { default as Grid } from './grid';
|
|
40
40
|
export type { GridProps, GridContainerProps } from './grid';
|
|
41
|
+
export { default as Container } from './container';
|
|
41
42
|
export { default as HtmlRenderer } from './html-renderer';
|
|
42
43
|
export { default as Image } from './image';
|
|
43
44
|
export type { ImageProps, ImageBrowserProps } from './image';
|
|
@@ -61,7 +62,6 @@ export { default as Popover } from './popover';
|
|
|
61
62
|
export type { PopoverProps, PopoverItemProps } from './popover';
|
|
62
63
|
export { default as List } from './list';
|
|
63
64
|
export { default as Menu } from './menu';
|
|
64
|
-
export { default as PhoneInput } from './phone-input';
|
|
65
65
|
export { default as Progress } from './progress';
|
|
66
66
|
export type { ProgressProps } from './progress';
|
|
67
67
|
export { default as Radio } from './radio';
|
|
@@ -125,8 +125,7 @@ export { default as Swipe } from './swipe';
|
|
|
125
125
|
export type { SwipeProps } from './swipe';
|
|
126
126
|
export { Carousel } from './carousal';
|
|
127
127
|
export type { CarouselProps } from './carousal';
|
|
128
|
-
export {
|
|
129
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './currency-input';
|
|
128
|
+
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './input/currency-input';
|
|
130
129
|
export { default as useToasts } from './use-toasts';
|
|
131
130
|
export type { Toast, ToastInput, ToastAction, ToastLayout } from './use-toasts';
|
|
132
131
|
export { default as Clipboard } from './copy-to-clipboard';
|
package/esm/index.js
CHANGED
|
@@ -24,7 +24,8 @@ export * from './form';
|
|
|
24
24
|
|
|
25
25
|
// export * as captcha from './captcha'
|
|
26
26
|
|
|
27
|
-
export { default as Grid
|
|
27
|
+
export { default as Grid } from './grid';
|
|
28
|
+
export { default as Container } from './container';
|
|
28
29
|
export { default as HtmlRenderer } from './html-renderer';
|
|
29
30
|
export { default as Image } from './image';
|
|
30
31
|
export { default as Input, getColors } from './input';
|
|
@@ -38,7 +39,6 @@ export { default as Pagination } from './pagination';
|
|
|
38
39
|
export { default as Popover } from './popover';
|
|
39
40
|
export { default as List } from './list';
|
|
40
41
|
export { default as Menu } from './menu';
|
|
41
|
-
export { default as PhoneInput } from './phone-input';
|
|
42
42
|
export { default as Progress } from './progress';
|
|
43
43
|
export { default as Radio } from './radio';
|
|
44
44
|
export { default as Rating } from './rating';
|
|
@@ -84,7 +84,8 @@ export * from './login-with';
|
|
|
84
84
|
export { default as Swipe } from './swipe';
|
|
85
85
|
// Carousel
|
|
86
86
|
export { Carousel } from './carousal';
|
|
87
|
+
|
|
87
88
|
// Currency Input
|
|
88
|
-
|
|
89
|
+
|
|
89
90
|
export { default as useToasts } from './use-toasts';
|
|
90
91
|
export { default as Clipboard } from './copy-to-clipboard';
|
package/esm/input/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import Input from './input-field';
|
|
2
2
|
import Textarea from '../textarea';
|
|
3
3
|
import InputPassword from './password';
|
|
4
|
+
import PhoneInput from './phone-input';
|
|
5
|
+
import CurrencyInput from './currency-input';
|
|
4
6
|
export type InputComponentType = typeof Input & {
|
|
5
7
|
Textarea: typeof Textarea;
|
|
6
8
|
Password: typeof InputPassword;
|
|
9
|
+
Phone: typeof PhoneInput;
|
|
10
|
+
Currency: typeof CurrencyInput;
|
|
7
11
|
};
|
|
8
12
|
export { getColors } from './styles';
|
|
9
13
|
export type { InputProps } from './input-field';
|
package/esm/input/index.js
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
import Input from './input-field';
|
|
3
3
|
import Textarea from '../textarea';
|
|
4
4
|
import InputPassword from './password';
|
|
5
|
+
import PhoneInput from './phone-input';
|
|
6
|
+
import CurrencyInput from './currency-input';
|
|
5
7
|
Input.Textarea = Textarea;
|
|
6
8
|
Input.Password = InputPassword;
|
|
9
|
+
Input.Phone = PhoneInput;
|
|
10
|
+
Input.Currency = CurrencyInput;
|
|
7
11
|
export { getColors } from './styles';
|
|
8
12
|
export default Input;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputTypes } from '..';
|
|
3
|
+
type PhoneInputProps = {
|
|
4
|
+
onChange: (data: string) => void;
|
|
5
|
+
value?: string;
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
country?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
color?: InputTypes;
|
|
11
|
+
};
|
|
12
|
+
declare function PhoneInput({ onChange, value, country, placeholder, color: _color, children, fullWidth }: PhoneInputProps): React.JSX.Element;
|
|
13
|
+
export default PhoneInput;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
3
|
+
import React, { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
|
+
import countries from './countries.json';
|
|
5
|
+
import { useTheme } from '@helpdice/theme';
|
|
6
|
+
import { getColors } from '../styles';
|
|
7
|
+
import useScale from '../../use-scale';
|
|
8
|
+
import InputBlockLabel from '../input-block-label';
|
|
9
|
+
function PhoneInput(_ref) {
|
|
10
|
+
var onChange = _ref.onChange,
|
|
11
|
+
_ref$value = _ref.value,
|
|
12
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
13
|
+
country = _ref.country,
|
|
14
|
+
_ref$placeholder = _ref.placeholder,
|
|
15
|
+
placeholder = _ref$placeholder === void 0 ? 'Enter phone number' : _ref$placeholder,
|
|
16
|
+
_ref$color = _ref.color,
|
|
17
|
+
_color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
18
|
+
children = _ref.children,
|
|
19
|
+
fullWidth = _ref.fullWidth;
|
|
20
|
+
var theme = useTheme();
|
|
21
|
+
var _useScale = useScale(),
|
|
22
|
+
SCALES = _useScale.SCALES;
|
|
23
|
+
var defaultValue = country ? countries.findIndex(function (cn) {
|
|
24
|
+
return cn.code == country;
|
|
25
|
+
}) : 103;
|
|
26
|
+
var _useState = useState(countries[defaultValue]),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
selectedCountry = _useState2[0],
|
|
29
|
+
setSelectedCountry = _useState2[1];
|
|
30
|
+
var _useState3 = useState(value),
|
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
+
phoneNumber = _useState4[0],
|
|
33
|
+
setPhoneNumber = _useState4[1];
|
|
34
|
+
var _useState5 = useState(false),
|
|
35
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
|
+
isFocused = _useState6[0],
|
|
37
|
+
setIsFocused = _useState6[1];
|
|
38
|
+
var _useState7 = useState(false),
|
|
39
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
40
|
+
dropdownOpen = _useState8[0],
|
|
41
|
+
setDropdownOpen = _useState8[1];
|
|
42
|
+
var _useState9 = useState(''),
|
|
43
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
44
|
+
searchTerm = _useState10[0],
|
|
45
|
+
setSearchTerm = _useState10[1];
|
|
46
|
+
var dropdownRef = useRef(null);
|
|
47
|
+
var _useMemo = useMemo(function () {
|
|
48
|
+
return getColors(theme.palette, _color);
|
|
49
|
+
}, [theme.palette]),
|
|
50
|
+
borderColor = _useMemo.borderColor,
|
|
51
|
+
hoverBorder = _useMemo.hoverBorder;
|
|
52
|
+
var handleSelectCountry = function handleSelectCountry(country) {
|
|
53
|
+
setSelectedCountry(country);
|
|
54
|
+
setDropdownOpen(false);
|
|
55
|
+
setSearchTerm('');
|
|
56
|
+
if (onChange) onChange("".concat(country.code, ":").concat(phoneNumber));
|
|
57
|
+
};
|
|
58
|
+
var handlePhoneChange = function handlePhoneChange(e) {
|
|
59
|
+
var value = e.target.value.replace(/[^\d]/g, '');
|
|
60
|
+
setPhoneNumber(value);
|
|
61
|
+
if (onChange) onChange("".concat(selectedCountry.phone, ",").concat(value));
|
|
62
|
+
};
|
|
63
|
+
var handleClickOutside = function handleClickOutside(e) {
|
|
64
|
+
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
65
|
+
setDropdownOpen(false);
|
|
66
|
+
setSearchTerm('');
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
useEffect(function () {
|
|
70
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
71
|
+
return function () {
|
|
72
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
var filteredCountries = countries.filter(function (c) {
|
|
76
|
+
return "".concat(c.label, " ").concat(c.code, " ").concat(c.phone).toLowerCase().includes(searchTerm.toLowerCase());
|
|
77
|
+
});
|
|
78
|
+
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
79
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
ref: dropdownRef,
|
|
81
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input-container ".concat(isFocused ? 'focused' : '')
|
|
82
|
+
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "input-wrapper"
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
onClick: function onClick() {
|
|
86
|
+
return setDropdownOpen(!dropdownOpen);
|
|
87
|
+
},
|
|
88
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-toggle"
|
|
89
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
style: {
|
|
91
|
+
display: 'flex',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
gap: 5
|
|
94
|
+
},
|
|
95
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
96
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
97
|
+
loading: "lazy",
|
|
98
|
+
width: "20",
|
|
99
|
+
height: "20",
|
|
100
|
+
src: "https://flagcdn.com/w20/".concat(selectedCountry.code.toLowerCase(), ".png"),
|
|
101
|
+
srcSet: "https://flagcdn.com/w40/".concat(selectedCountry.code.toLowerCase(), ".png 2x"),
|
|
102
|
+
alt: "Flag of ".concat(selectedCountry.label),
|
|
103
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
104
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
105
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
106
|
+
}, selectedCountry.phone))), /*#__PURE__*/React.createElement("input", {
|
|
107
|
+
type: "tel",
|
|
108
|
+
placeholder: placeholder,
|
|
109
|
+
value: phoneNumber,
|
|
110
|
+
onChange: handlePhoneChange,
|
|
111
|
+
onFocus: function onFocus() {
|
|
112
|
+
return setIsFocused(true);
|
|
113
|
+
},
|
|
114
|
+
onBlur: function onBlur() {
|
|
115
|
+
return setIsFocused(false);
|
|
116
|
+
},
|
|
117
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "phone-input"
|
|
118
|
+
})), dropdownOpen && /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown"
|
|
120
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
121
|
+
type: "text",
|
|
122
|
+
placeholder: "Search country...",
|
|
123
|
+
value: searchTerm,
|
|
124
|
+
onChange: function onChange(e) {
|
|
125
|
+
return setSearchTerm(e.target.value);
|
|
126
|
+
},
|
|
127
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "search-input"
|
|
128
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "country-list"
|
|
130
|
+
}, filteredCountries.length > 0 ? filteredCountries.map(function (c) {
|
|
131
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
key: c.code,
|
|
133
|
+
onClick: function onClick() {
|
|
134
|
+
return handleSelectCountry(c);
|
|
135
|
+
},
|
|
136
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item"
|
|
137
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
138
|
+
style: {
|
|
139
|
+
display: 'flex',
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
gap: 5
|
|
142
|
+
},
|
|
143
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
144
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
145
|
+
loading: "lazy",
|
|
146
|
+
width: "23",
|
|
147
|
+
height: "23",
|
|
148
|
+
src: "https://flagcdn.com/w20/".concat(c.code.toLowerCase(), ".png"),
|
|
149
|
+
srcSet: "https://flagcdn.com/w40/".concat(c.code.toLowerCase(), ".png 2x"),
|
|
150
|
+
alt: "Flag of ".concat(c.label),
|
|
151
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
152
|
+
}), c.phone, " ", /*#__PURE__*/React.createElement("span", {
|
|
153
|
+
style: {
|
|
154
|
+
color: 'grey'
|
|
155
|
+
},
|
|
156
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]])
|
|
157
|
+
}, c.label)));
|
|
158
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: _JSXStyle.dynamic([["3237870810", [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']]]) + " " + "dropdown-item disabled"
|
|
160
|
+
}, "No results"))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
161
|
+
id: "3237870810",
|
|
162
|
+
dynamic: [SCALES.width(1, defaultWidth), SCALES.height(2.25), hoverBorder, borderColor, borderColor, SCALES.width(1, defaultWidth), theme.type == 'dark' ? 'black' : 'white', borderColor, borderColor, theme.type == 'dark' ? '#3a3d3d' : '#efefef']
|
|
163
|
+
}, ".phone-input-container.__jsx-style-dynamic-selector{position:relative;width:".concat(SCALES.width(1, defaultWidth), ";height:").concat(SCALES.height(2.25), ";}.phone-input-container.focused.__jsx-style-dynamic-selector{outline:1px solid ").concat(hoverBorder, ";border-radius:6px;}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid ").concat(borderColor, ";border-radius:6px;overflow:hidden;}.dropdown-toggle.__jsx-style-dynamic-selector{padding:7px 12px;border-radius:6px 0px 0px 6px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;border-right:1px solid ").concat(borderColor, ";}.phone-input.__jsx-style-dynamic-selector{width:100%;min-width:0;padding:5px 10px;background-color:transparent;font-size:14px;border:none;}.phone-input.__jsx-style-dynamic-selector:focus{outline:none;}.dropdown.__jsx-style-dynamic-selector{position:absolute;top:100%;left:0;width:").concat(SCALES.width(1, defaultWidth), ";background:").concat(theme.type == 'dark' ? 'black' : 'white', ";border:1px solid ").concat(borderColor, ";border-radius:6px;margin-top:4px;z-index:999;box-shadow:0 4px 10px rgba(0,0,0,0.1);}.search-input.__jsx-style-dynamic-selector{width:100%;padding:8px 10px;border:none;background-color:transparent;border-bottom:1px solid ").concat(borderColor, ";font-size:14px;}.search-input.__jsx-style-dynamic-selector:focus{outline:none;}.country-list.__jsx-style-dynamic-selector{max-height:200px;overflow-y:auto;}.dropdown-item.__jsx-style-dynamic-selector{padding:10px;cursor:pointer;font-size:14px;}.dropdown-item.__jsx-style-dynamic-selector:hover{background:").concat(theme.type == 'dark' ? '#3a3d3d' : '#efefef', ";}.dropdown-item.disabled.__jsx-style-dynamic-selector{color:#888;cursor:default;}")));
|
|
164
|
+
}
|
|
165
|
+
;
|
|
166
|
+
export default PhoneInput;
|
package/esm/table/table-cell.js
CHANGED
|
@@ -8,6 +8,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
8
8
|
onCellClick = _ref.onCellClick;
|
|
9
9
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
10
10
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
11
|
+
var _row$_id;
|
|
11
12
|
var currentRowValue = row[column.prop];
|
|
12
13
|
var cellValue = currentRowValue || emptyText;
|
|
13
14
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
@@ -22,7 +23,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22
23
|
whiteSpace: column !== null && column !== void 0 && column.noWrap ? 'nowrap' : 'normal'
|
|
23
24
|
}, currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.style),
|
|
24
25
|
"data-column": column.prop,
|
|
25
|
-
key: "row-td-".concat(
|
|
26
|
+
key: "row-td-".concat((_row$_id = row === null || row === void 0 ? void 0 : row._id) !== null && _row$_id !== void 0 ? _row$_id : 'col', "-").concat(column.prop.toString()),
|
|
26
27
|
onClick: function onClick() {
|
|
27
28
|
return onCellClick && onCellClick(currentRowValue, rowIndex, index);
|
|
28
29
|
},
|
package/esm/text/child.d.ts
CHANGED