@helpdice/ui 2.5.4 → 2.5.8
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 +1273 -404
- package/dist/avatar/index.js +88 -49
- package/dist/badge/index.js +69 -27
- package/dist/breadcrumbs/index.js +107 -56
- package/dist/button/button.icon.d.ts +3 -16
- package/dist/button/button.small.d.ts +3 -16
- package/dist/button/index.js +143 -157
- package/dist/button-dropdown/index.js +96 -83
- package/dist/button-group/index.js +61 -21
- package/dist/capacity/index.js +61 -22
- package/dist/card/index.js +147 -123
- package/dist/carousal/index.js +349 -330
- package/dist/checkbox/index.js +72 -67
- package/dist/circular-progress/CircularProgress.d.ts +17 -0
- package/dist/circular-progress/index.d.ts +3 -4
- package/dist/circular-progress/index.js +713 -336
- package/dist/circular-progress/useCircularProgress.d.ts +12 -0
- package/dist/code/index.js +70 -26
- package/dist/col/index.js +61 -24
- package/dist/collapse/index.js +102 -52
- package/dist/container/index.js +187 -190
- package/dist/copy-to-clipboard/index.js +158 -210
- package/dist/description/index.js +64 -23
- package/dist/display/index.js +64 -23
- package/dist/divider/index.js +62 -22
- package/dist/dot/index.js +63 -23
- package/dist/drawer/index.js +74 -61
- package/dist/fieldset/index.js +127 -63
- package/dist/form/index.js +15 -40
- package/dist/grid/index.js +74 -29
- package/dist/html-renderer/index.js +3 -2
- package/dist/image/index.js +163 -104
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5240 -4755
- package/dist/input/index.js +1183 -277
- package/dist/keyboard/index.js +73 -29
- package/dist/linear-progress/index.js +27 -24
- package/dist/link/index.js +78 -36
- package/dist/list/index.js +118 -63
- package/dist/loadable/index.js +76 -27
- package/dist/loading/index.js +70 -29
- package/dist/menu/index.js +53 -47
- package/dist/modal/index.js +225 -178
- package/dist/note/index.js +64 -23
- package/dist/notetip/index.js +54 -45
- package/dist/notetip/note-tip.d.ts +2 -0
- package/dist/page/index.js +102 -51
- package/dist/pagination/index.js +181 -124
- package/dist/placeholder/index.js +554 -538
- package/dist/popover/index.js +94 -81
- package/dist/progress/index.js +66 -27
- package/dist/radio/index.js +94 -48
- package/dist/rating/index.js +78 -38
- package/dist/row/index.js +62 -25
- package/dist/search-bar/index.js +172 -162
- package/dist/select/index.js +1098 -163
- package/dist/select/select.d.ts +2 -0
- package/dist/slider/index.js +91 -47
- package/dist/snippet/index.js +39 -39
- package/dist/spacer/index.js +58 -19
- package/dist/spinner/index.js +69 -28
- package/dist/swipe/index.js +28 -13
- package/dist/table/index.js +4162 -3863
- package/dist/table/table-body.d.ts +4 -3
- package/dist/table/table-cell.d.ts +4 -2
- package/dist/table/table-types.d.ts +2 -0
- package/dist/table/table.d.ts +5 -1
- package/dist/tabs/index.js +61 -59
- package/dist/tag/index.js +16 -20
- package/dist/text/index.js +187 -184
- package/dist/text/text.d.ts +3 -0
- package/dist/textarea/index.js +916 -36
- package/dist/textarea/textarea.d.ts +3 -0
- package/dist/toggle/index.js +75 -33
- package/dist/tooltip/index.d.ts +1 -2
- package/dist/tooltip/index.js +59 -53
- package/dist/tooltip/tooltip-content.d.ts +1 -1
- package/dist/tooltip/tooltip-small.d.ts +2 -5
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tree/index.js +176 -115
- package/dist/use-scale/index.js +50 -13
- package/dist/user/index.js +152 -100
- package/esm/avatar/avatar.js +8 -6
- package/esm/button/button.icon.d.ts +3 -16
- package/esm/button/button.icon.js +22 -22
- package/esm/button/button.js +5 -5
- package/esm/button/button.small.d.ts +3 -16
- package/esm/button/button.small.js +20 -23
- package/esm/circular-progress/CircularProgress.d.ts +17 -0
- package/esm/circular-progress/CircularProgress.js +110 -0
- package/esm/circular-progress/index.d.ts +3 -4
- package/esm/circular-progress/index.js +3 -4
- package/esm/circular-progress/useCircularProgress.d.ts +12 -0
- package/esm/circular-progress/useCircularProgress.js +35 -0
- package/esm/index.d.ts +2 -1
- package/esm/index.js +1 -1
- package/esm/input/input-field.js +11 -9
- package/esm/list/list-item.js +11 -11
- package/esm/notetip/note-tip.d.ts +2 -0
- package/esm/notetip/note-tip.js +8 -5
- package/esm/pagination/pagination-item.js +6 -6
- package/esm/select/select.d.ts +2 -0
- package/esm/select/select.js +15 -2
- package/esm/skeleton/index.js +9 -4
- package/esm/table/table-body.d.ts +4 -3
- package/esm/table/table-body.js +25 -15
- package/esm/table/table-cell.d.ts +4 -2
- package/esm/table/table-cell.js +19 -3
- package/esm/table/table-types.d.ts +2 -0
- package/esm/table/table.d.ts +5 -1
- package/esm/table/table.js +52 -25
- package/esm/text/text.d.ts +3 -0
- package/esm/text/text.js +9 -2
- package/esm/textarea/textarea.d.ts +3 -0
- package/esm/textarea/textarea.js +19 -2
- package/esm/tooltip/index.d.ts +1 -2
- package/esm/tooltip/tooltip-content.d.ts +1 -1
- package/esm/tooltip/tooltip-content.js +5 -5
- package/esm/tooltip/tooltip-small.d.ts +2 -5
- package/esm/tooltip/tooltip-small.js +0 -1
- package/esm/tooltip/tooltip.d.ts +2 -1
- package/esm/tooltip/tooltip.js +6 -5
- package/package.json +3 -3
- package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
- package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/dist/circular-progress/Path.d.ts +0 -9
- package/dist/circular-progress/buildStyles.d.ts +0 -12
- package/dist/circular-progress/constants.d.ts +0 -5
- package/dist/circular-progress/types.d.ts +0 -50
- package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
- package/esm/circular-progress/CircularProgressbar.js +0 -118
- package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
- package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
- package/esm/circular-progress/Path.d.ts +0 -9
- package/esm/circular-progress/Path.js +0 -52
- package/esm/circular-progress/buildStyles.d.ts +0 -12
- package/esm/circular-progress/buildStyles.js +0 -45
- package/esm/circular-progress/constants.d.ts +0 -5
- package/esm/circular-progress/constants.js +0 -5
- package/esm/circular-progress/types.d.ts +0 -50
- package/esm/circular-progress/types.js +0 -1
|
@@ -1,31 +1,28 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import Button from './button';
|
|
3
4
|
// import { useTheme } from '@helpdice/theme';
|
|
5
|
+
// import { ButtonTypes } from 'components/button-group';
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
// type SmallButtonProps = {
|
|
8
|
+
// children?: React.ReactNode;
|
|
9
|
+
// iconRight?: React.ReactNode;
|
|
10
|
+
// to: string;
|
|
11
|
+
// icon?: React.ReactNode;
|
|
12
|
+
// scale?: number;
|
|
13
|
+
// type?: any;
|
|
14
|
+
// style?: CSSProperties;
|
|
15
|
+
// target?: string;
|
|
16
|
+
// color?: ButtonTypes;
|
|
17
|
+
// onClick?: () => void
|
|
18
|
+
// };
|
|
19
|
+
|
|
20
|
+
var SmallButton = function SmallButton(props) {
|
|
17
21
|
// const theme = useTheme();
|
|
18
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
19
|
-
to: to,
|
|
20
|
-
a: a,
|
|
21
|
-
icon: icon,
|
|
22
|
-
style: style,
|
|
23
|
-
type: type,
|
|
24
|
-
onClick: onClick,
|
|
22
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
25
23
|
auto: true,
|
|
26
|
-
scale:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, children);
|
|
24
|
+
scale: 2 / 3,
|
|
25
|
+
px: 0.6
|
|
26
|
+
}, props), props.children);
|
|
30
27
|
};
|
|
31
28
|
export default /*#__PURE__*/memo(SmallButton);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ProgressVariant } from "./useCircularProgress";
|
|
3
|
+
type Status = "default" | "success" | "warning" | "error";
|
|
4
|
+
interface CircularProgressProps {
|
|
5
|
+
size?: number;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
value?: number;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
variant?: ProgressVariant;
|
|
11
|
+
status?: Status;
|
|
12
|
+
gradient?: boolean;
|
|
13
|
+
showPercentage?: boolean;
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const CircularProgress: React.ForwardRefExoticComponent<CircularProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export default CircularProgress;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _JSXStyle from "../styled-jsx.es.js";
|
|
4
|
+
import React, { forwardRef, useId } from "react";
|
|
5
|
+
import { motion } from "framer-motion";
|
|
6
|
+
import { useCircularProgress } from "./useCircularProgress";
|
|
7
|
+
var statusColors = {
|
|
8
|
+
"default": "#3b82f6",
|
|
9
|
+
success: "#10b981",
|
|
10
|
+
warning: "#f59e0b",
|
|
11
|
+
error: "#ef4444"
|
|
12
|
+
};
|
|
13
|
+
var CircularProgress = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
|
+
var _ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? 140 : _ref$size,
|
|
16
|
+
_ref$strokeWidth = _ref.strokeWidth,
|
|
17
|
+
strokeWidth = _ref$strokeWidth === void 0 ? 12 : _ref$strokeWidth,
|
|
18
|
+
_ref$value = _ref.value,
|
|
19
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
20
|
+
_ref$min = _ref.min,
|
|
21
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
22
|
+
_ref$max = _ref.max,
|
|
23
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
24
|
+
_ref$variant = _ref.variant,
|
|
25
|
+
variant = _ref$variant === void 0 ? "determinate" : _ref$variant,
|
|
26
|
+
_ref$status = _ref.status,
|
|
27
|
+
status = _ref$status === void 0 ? "default" : _ref$status,
|
|
28
|
+
_ref$gradient = _ref.gradient,
|
|
29
|
+
gradient = _ref$gradient === void 0 ? true : _ref$gradient,
|
|
30
|
+
_ref$showPercentage = _ref.showPercentage,
|
|
31
|
+
showPercentage = _ref$showPercentage === void 0 ? true : _ref$showPercentage,
|
|
32
|
+
label = _ref.label;
|
|
33
|
+
var _useCircularProgress = useCircularProgress({
|
|
34
|
+
value: value,
|
|
35
|
+
min: min,
|
|
36
|
+
max: max,
|
|
37
|
+
variant: variant
|
|
38
|
+
}),
|
|
39
|
+
percentage = _useCircularProgress.percentage,
|
|
40
|
+
displayValue = _useCircularProgress.displayValue;
|
|
41
|
+
var radius = (size - strokeWidth) / 2;
|
|
42
|
+
var circumference = 2 * Math.PI * radius;
|
|
43
|
+
var strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
44
|
+
var baseColor = statusColors[status];
|
|
45
|
+
|
|
46
|
+
// SSR-SAFE ID
|
|
47
|
+
var gradientId = useId();
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
ref: ref,
|
|
50
|
+
role: "progressbar",
|
|
51
|
+
"aria-valuemin": min,
|
|
52
|
+
"aria-valuemax": max,
|
|
53
|
+
"aria-valuenow": variant === "determinate" ? value : undefined,
|
|
54
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]]) + " " + "wrapper"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
56
|
+
width: size,
|
|
57
|
+
height: size,
|
|
58
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
59
|
+
}, gradient && /*#__PURE__*/React.createElement("defs", {
|
|
60
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
61
|
+
}, /*#__PURE__*/React.createElement("linearGradient", {
|
|
62
|
+
id: gradientId,
|
|
63
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
64
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
65
|
+
offset: "0%",
|
|
66
|
+
stopColor: baseColor,
|
|
67
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
68
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
69
|
+
offset: "100%",
|
|
70
|
+
stopColor: "#9333ea",
|
|
71
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
72
|
+
}))), /*#__PURE__*/React.createElement("circle", {
|
|
73
|
+
stroke: "#e5e7eb",
|
|
74
|
+
fill: "none",
|
|
75
|
+
strokeWidth: strokeWidth,
|
|
76
|
+
r: radius,
|
|
77
|
+
cx: size / 2,
|
|
78
|
+
cy: size / 2,
|
|
79
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]])
|
|
80
|
+
}), /*#__PURE__*/React.createElement(motion.circle, {
|
|
81
|
+
fill: "none",
|
|
82
|
+
stroke: gradient ? "url(#".concat(gradientId, ")") : baseColor,
|
|
83
|
+
strokeWidth: strokeWidth,
|
|
84
|
+
strokeLinecap: "round",
|
|
85
|
+
strokeDasharray: circumference,
|
|
86
|
+
r: radius,
|
|
87
|
+
cx: size / 2,
|
|
88
|
+
cy: size / 2,
|
|
89
|
+
initial: false,
|
|
90
|
+
animate: {
|
|
91
|
+
strokeDashoffset: variant === "determinate" ? strokeDashoffset : circumference * 0.4,
|
|
92
|
+
rotate: variant === "indeterminate" ? 360 : 0
|
|
93
|
+
},
|
|
94
|
+
transition: variant === "indeterminate" ? {
|
|
95
|
+
repeat: Infinity,
|
|
96
|
+
duration: 1.2,
|
|
97
|
+
ease: "linear"
|
|
98
|
+
} : {
|
|
99
|
+
duration: 0.6,
|
|
100
|
+
ease: "easeOut"
|
|
101
|
+
}
|
|
102
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: _JSXStyle.dynamic([["4042284457", [size * 0.18]]]) + " " + "label"
|
|
104
|
+
}, label !== null && label !== void 0 ? label : showPercentage && variant === "determinate" ? "".concat(Math.round(displayValue), "%") : null), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
105
|
+
id: "4042284457",
|
|
106
|
+
dynamic: [size * 0.18]
|
|
107
|
+
}, ".wrapper.__jsx-style-dynamic-selector{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}svg.__jsx-style-dynamic-selector{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.label.__jsx-style-dynamic-selector{position:absolute;font-weight:700;font-size:".concat(size * 0.18, "px;}")));
|
|
108
|
+
});
|
|
109
|
+
CircularProgress.displayName = "CircularProgress";
|
|
110
|
+
export default CircularProgress;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { CircularProgressBar, CircularProgress, buildStyles };
|
|
1
|
+
import CircularProgress from "./CircularProgress";
|
|
2
|
+
export { useCircularProgress } from "./useCircularProgress";
|
|
3
|
+
export default CircularProgress;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { CircularProgressBar, CircularProgress, buildStyles };
|
|
1
|
+
import CircularProgress from "./CircularProgress";
|
|
2
|
+
export { useCircularProgress } from "./useCircularProgress";
|
|
3
|
+
export default CircularProgress;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ProgressVariant = "determinate" | "indeterminate";
|
|
2
|
+
interface UseCircularProgressProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
variant?: ProgressVariant;
|
|
7
|
+
}
|
|
8
|
+
export declare function useCircularProgress({ value, min, max, variant, }: UseCircularProgressProps): {
|
|
9
|
+
percentage: number;
|
|
10
|
+
displayValue: number;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import { useEffect, useMemo, useState } from "react";
|
|
5
|
+
export function useCircularProgress(_ref) {
|
|
6
|
+
var _ref$value = _ref.value,
|
|
7
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
8
|
+
_ref$min = _ref.min,
|
|
9
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
10
|
+
_ref$max = _ref.max,
|
|
11
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
12
|
+
_ref$variant = _ref.variant,
|
|
13
|
+
variant = _ref$variant === void 0 ? "determinate" : _ref$variant;
|
|
14
|
+
var normalizedValue = useMemo(function () {
|
|
15
|
+
if (variant !== "determinate") return 0;
|
|
16
|
+
return Math.min(Math.max(value, min), max);
|
|
17
|
+
}, [value, min, max, variant]);
|
|
18
|
+
var percentage = useMemo(function () {
|
|
19
|
+
if (variant !== "determinate") return 0;
|
|
20
|
+
return (normalizedValue - min) / (max - min) * 100;
|
|
21
|
+
}, [normalizedValue, min, max, variant]);
|
|
22
|
+
|
|
23
|
+
// SSR-safe animated number
|
|
24
|
+
var _useState = useState(normalizedValue),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
displayValue = _useState2[0],
|
|
27
|
+
setDisplayValue = _useState2[1];
|
|
28
|
+
useEffect(function () {
|
|
29
|
+
setDisplayValue(normalizedValue);
|
|
30
|
+
}, [normalizedValue]);
|
|
31
|
+
return {
|
|
32
|
+
percentage: percentage,
|
|
33
|
+
displayValue: displayValue
|
|
34
|
+
};
|
|
35
|
+
}
|
package/esm/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { default as Checkbox } from './checkbox';
|
|
|
20
20
|
export type { CheckboxProps, CheckboxGroupProps } from './checkbox';
|
|
21
21
|
export { default as Code } from './code';
|
|
22
22
|
export type { CodeProps } from './code';
|
|
23
|
-
export {
|
|
23
|
+
export { default as CircularProgress, useCircularProgress } from './circular-progress';
|
|
24
24
|
export { default as Collapse } from './collapse';
|
|
25
25
|
export type { CollapseProps, CollapseGroupProps } from './collapse';
|
|
26
26
|
export { default as Description } from './description';
|
|
@@ -80,6 +80,7 @@ export { default as Spinner } from './spinner';
|
|
|
80
80
|
export type { SpinnerProps } from './spinner';
|
|
81
81
|
export { default as Table } from './table';
|
|
82
82
|
export type { TableProps, TableColumnProps } from './table';
|
|
83
|
+
export type { RowErrorMap, FieldError } from './table/table-types';
|
|
83
84
|
export { default as Tabs } from './tabs';
|
|
84
85
|
export type { TabsProps } from './tabs';
|
|
85
86
|
export { default as Tag } from './tag';
|
package/esm/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { default as Capacity } from './capacity';
|
|
|
12
12
|
export { default as Card } from './card';
|
|
13
13
|
export { default as Checkbox } from './checkbox';
|
|
14
14
|
export { default as Code } from './code';
|
|
15
|
-
export {
|
|
15
|
+
export { default as CircularProgress, useCircularProgress } from './circular-progress';
|
|
16
16
|
export { default as Collapse } from './collapse';
|
|
17
17
|
export { default as Description } from './description';
|
|
18
18
|
export { default as Display } from './display';
|
package/esm/input/input-field.js
CHANGED
|
@@ -13,6 +13,7 @@ import InputLabel from './input-label';
|
|
|
13
13
|
import InputBlockLabel from './input-block-label';
|
|
14
14
|
import InputIcon from './input-icon';
|
|
15
15
|
import InputClearIcon from './input-icon-clear';
|
|
16
|
+
import Text from '../text';
|
|
16
17
|
import { getColors } from './styles';
|
|
17
18
|
import useScale, { withScale } from '../use-scale';
|
|
18
19
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
@@ -143,11 +144,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
143
144
|
var inputProps = _extends({}, props, controlledValue);
|
|
144
145
|
var defaultWidth = fullWidth ? '100%' : 'initial';
|
|
145
146
|
return /*#__PURE__*/React.createElement("div", {
|
|
146
|
-
className: _JSXStyle.dynamic([["
|
|
147
|
+
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + "with-label"
|
|
147
148
|
}, children && /*#__PURE__*/React.createElement(InputBlockLabel, null, children), /*#__PURE__*/React.createElement("div", {
|
|
148
|
-
className: _JSXStyle.dynamic([["
|
|
149
|
+
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-container', className) || "")
|
|
149
150
|
}, label && /*#__PURE__*/React.createElement(InputLabel, null, label), /*#__PURE__*/React.createElement("div", {
|
|
150
|
-
className: _JSXStyle.dynamic([["
|
|
151
|
+
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (useClasses('input-wrapper', {
|
|
151
152
|
hover: hover,
|
|
152
153
|
disabled: disabled
|
|
153
154
|
}, labelClasses) || "")
|
|
@@ -165,7 +166,7 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
165
166
|
autoComplete: autoComplete,
|
|
166
167
|
onKeyDown: handleKeyDown
|
|
167
168
|
}, inputProps, {
|
|
168
|
-
className: _JSXStyle.dynamic([["
|
|
169
|
+
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || useClasses({
|
|
169
170
|
disabled: disabled
|
|
170
171
|
}, iconClasses) || "")
|
|
171
172
|
})), clearable && /*#__PURE__*/React.createElement(InputClearIcon, {
|
|
@@ -177,8 +178,9 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
177
178
|
}, iconProps))), labelRight && /*#__PURE__*/React.createElement(InputLabel, {
|
|
178
179
|
isRight: true
|
|
179
180
|
}, labelRight), /*#__PURE__*/React.createElement("br", {
|
|
180
|
-
className: _JSXStyle.dynamic([["
|
|
181
|
-
})), helperText && /*#__PURE__*/React.createElement(
|
|
181
|
+
className: _JSXStyle.dynamic([["1343268165", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]]])
|
|
182
|
+
})), helperText && /*#__PURE__*/React.createElement(Text, {
|
|
183
|
+
font: 0.8,
|
|
182
184
|
style: {
|
|
183
185
|
marginTop: 0.4,
|
|
184
186
|
marginRight: 0,
|
|
@@ -186,11 +188,11 @@ var InputComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
186
188
|
marginBottom: '0.4rem',
|
|
187
189
|
textAlign: 'left'
|
|
188
190
|
},
|
|
189
|
-
|
|
191
|
+
color: error ? "error" : 'default'
|
|
190
192
|
}, "\xA0", helperText), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
191
|
-
id: "
|
|
193
|
+
id: "1343268165",
|
|
192
194
|
dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, defaultWidth), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, defaultWidth), variant === 'normal' ? theme.layout.radius : '', variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), theme.palette.accents_1, theme.palette.accents_2, hoverBorder, SCALES.font(0.875), color, theme.palette.accents_3, theme.palette.background, color]
|
|
193
|
-
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-
|
|
195
|
+
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, defaultWidth), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, defaultWidth), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(variant === 'normal' ? theme.layout.radius : '', ";").concat(variant === 'none' ? '' : variant === 'line' ? "border-bottom: 1px solid ".concat(borderColor) : "border: 1px solid ".concat(borderColor), ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{background-color:").concat(theme.palette.accents_1, ";border-color:").concat(theme.palette.accents_2, ";cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;-webkit-text-fill-color:").concat(color, " !important;}")));
|
|
194
196
|
});
|
|
195
197
|
InputComponent.displayName = 'Input';
|
|
196
198
|
var Input = withScale(InputComponent);
|
package/esm/list/list-item.js
CHANGED
|
@@ -59,23 +59,23 @@ var ListItemComponent = function ListItemComponent(_ref) {
|
|
|
59
59
|
},
|
|
60
60
|
onClick: clickHandler
|
|
61
61
|
}, props, {
|
|
62
|
-
className: _JSXStyle.dynamic([["
|
|
62
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
63
63
|
}), children ? children : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
64
|
-
className: _JSXStyle.dynamic([["
|
|
65
|
-
}, /*#__PURE__*/React.createElement("
|
|
66
|
-
className: _JSXStyle.dynamic([["
|
|
64
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + "item-left"
|
|
65
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]])
|
|
67
67
|
}, leading), /*#__PURE__*/React.createElement("div", {
|
|
68
|
-
className: _JSXStyle.dynamic([["
|
|
68
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + "item-description"
|
|
69
69
|
}, /*#__PURE__*/React.createElement("p", {
|
|
70
|
-
className: _JSXStyle.dynamic([["
|
|
70
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + "item-description-primary"
|
|
71
71
|
}, primary), secondary && /*#__PURE__*/React.createElement("small", {
|
|
72
|
-
className: _JSXStyle.dynamic([["
|
|
72
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + "item-description-secondary"
|
|
73
73
|
}, secondary))), /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: _JSXStyle.dynamic([["
|
|
74
|
+
className: _JSXStyle.dynamic([["2945599429", [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]]]) + " " + "item-right"
|
|
75
75
|
}, trailing)), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
76
|
-
id: "
|
|
77
|
-
dynamic: [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.
|
|
78
|
-
}, ".item.__jsx-style-dynamic-selector{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, ";box-sizing:border-box;-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";color:").concat(theme.palette.accents_5, ";-webkit-transition:color,background-color 150ms linear;transition:color,background-color 150ms linear;line-height:1.25em;font-size:").concat(SCALES.font(0.
|
|
76
|
+
id: "2945599429",
|
|
77
|
+
dynamic: [direction, justify, alignItems, theme.palette.accents_5, SCALES.font(0.775), SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.5), SCALES.pr(0.75), SCALES.pb(0.5), SCALES.pl(0.75), hasHandler ? 'pointer' : 'default', theme.palette.foreground, theme.palette.border, SCALES.height(0.0625), SCALES.mt(0.35), SCALES.mr(0), SCALES.mb(0.35), SCALES.ml(0), SCALES.width(1, '100%'), SCALES.font(0.925), theme.palette.foreground]
|
|
78
|
+
}, ".item.__jsx-style-dynamic-selector{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, ";box-sizing:border-box;gap:5px;-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";color:").concat(theme.palette.accents_5, ";-webkit-transition:color,background-color 150ms linear;transition:color,background-color 150ms linear;line-height:1.25em;font-size:").concat(SCALES.font(0.775), ";width:").concat(SCALES.width(1, 'auto'), ";height:").concat(SCALES.height(1, 'auto'), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";padding:").concat(SCALES.pt(0.5), " ").concat(SCALES.pr(0.75), " ").concat(SCALES.pb(0.5), " ").concat(SCALES.pl(0.75), ";cursor:").concat(hasHandler ? 'pointer' : 'default', ";}.item-description.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.item-description-primary.__jsx-style-dynamic-selector{font-weight:500;margin:0;}.item-description-secondary.__jsx-style-dynamic-selector{margin:0;}.item-left.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.7rem;}.item.__jsx-style-dynamic-selector:hover{color:").concat(theme.palette.foreground, ";}.item.line.__jsx-style-dynamic-selector{line-height:0;padding:0;background-color:").concat(theme.palette.border, ";height:").concat(SCALES.height(0.0625), ";margin:").concat(SCALES.mt(0.35), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0.35), " ").concat(SCALES.ml(0), ";width:").concat(SCALES.width(1, '100%'), ";}.item.title.__jsx-style-dynamic-selector{font-weight:500;font-size:").concat(SCALES.font(0.925), ";color:").concat(theme.palette.foreground, ";}"))), line && /*#__PURE__*/React.createElement(ListItem, {
|
|
79
79
|
line: true,
|
|
80
80
|
showTitle: false
|
|
81
81
|
}));
|
package/esm/notetip/note-tip.js
CHANGED
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
3
3
|
import React, { useState, useRef, useEffect, useLayoutEffect } from 'react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
|
-
import { useTheme } from '@helpdice/theme';
|
|
5
|
+
import { useTheme, useClasses } from '@helpdice/theme';
|
|
6
6
|
var OFFSET = 8;
|
|
7
7
|
var Notetip = function Notetip(_ref) {
|
|
8
8
|
var children = _ref.children,
|
|
@@ -14,7 +14,10 @@ var Notetip = function Notetip(_ref) {
|
|
|
14
14
|
_ref$duration = _ref.duration,
|
|
15
15
|
duration = _ref$duration === void 0 ? 200 : _ref$duration,
|
|
16
16
|
_ref$animation = _ref.animation,
|
|
17
|
-
animation = _ref$animation === void 0 ? 'fade' : _ref$animation
|
|
17
|
+
animation = _ref$animation === void 0 ? 'fade' : _ref$animation,
|
|
18
|
+
_ref$disabled = _ref.disabled,
|
|
19
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
20
|
+
className = _ref.className;
|
|
18
21
|
var theme = useTheme();
|
|
19
22
|
var referenceRef = useRef(null);
|
|
20
23
|
var tooltipRef = useRef(null);
|
|
@@ -90,8 +93,8 @@ var Notetip = function Notetip(_ref) {
|
|
|
90
93
|
return setOpen(false);
|
|
91
94
|
}, 2000);
|
|
92
95
|
},
|
|
93
|
-
className: _JSXStyle.dynamic([["633836393", [theme.palette.accents_1, duration, duration, duration]]])
|
|
94
|
-
}, children), show && /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: _JSXStyle.dynamic([["633836393", [theme.palette.accents_1, duration, duration, duration]]]) + " " + (useClasses('', className) || "")
|
|
97
|
+
}, children), show && !disabled ? /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement("div", {
|
|
95
98
|
ref: tooltipRef,
|
|
96
99
|
style: {
|
|
97
100
|
position: 'fixed',
|
|
@@ -100,7 +103,7 @@ var Notetip = function Notetip(_ref) {
|
|
|
100
103
|
transitionDuration: "".concat(duration, "ms")
|
|
101
104
|
},
|
|
102
105
|
className: _JSXStyle.dynamic([["633836393", [theme.palette.accents_1, duration, duration, duration]]]) + " " + "tooltip-box ".concat(animation)
|
|
103
|
-
}, text), document.body), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
106
|
+
}, text), document.body) : null, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
104
107
|
id: "633836393",
|
|
105
108
|
dynamic: [theme.palette.accents_1, duration, duration, duration]
|
|
106
109
|
}, ".tooltip-box.__jsx-style-dynamic-selector{background:".concat(theme.palette.accents_1, ";padding:4px 10px;border-radius:4px;font-size:12px;white-space:nowrap;z-index:9999;opacity:0;}.fade.__jsx-style-dynamic-selector{-webkit-animation:fadeIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;animation:fadeIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;}.scale.__jsx-style-dynamic-selector{-webkit-animation:scaleIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;animation:scaleIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;}.slide.__jsx-style-dynamic-selector{-webkit-animation:slideIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;animation:slideIn-__jsx-style-dynamic-selector ").concat(duration, "ms ease forwards;}@-webkit-keyframes fadeIn-__jsx-style-dynamic-selector{to{opacity:1;}}@keyframes fadeIn-__jsx-style-dynamic-selector{to{opacity:1;}}@-webkit-keyframes scaleIn-__jsx-style-dynamic-selector{from{opacity:0;-webkit-transform:scale(0.95);-ms-transform:scale(0.95);transform:scale(0.95);}to{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}}@keyframes scaleIn-__jsx-style-dynamic-selector{from{opacity:0;-webkit-transform:scale(0.95);-ms-transform:scale(0.95);transform:scale(0.95);}to{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}}@-webkit-keyframes slideIn-__jsx-style-dynamic-selector{from{opacity:0;-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px);}to{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}}@keyframes slideIn-__jsx-style-dynamic-selector{from{opacity:0;-webkit-transform:translateY(5px);-ms-transform:translateY(5px);transform:translateY(5px);}to{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);}}")));
|
|
@@ -14,7 +14,7 @@ var PaginationItem = function PaginationItem(_ref) {
|
|
|
14
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
var theme = useTheme();
|
|
16
16
|
var _useMemo = useMemo(function () {
|
|
17
|
-
return [addColorAlpha(theme.palette.
|
|
17
|
+
return [addColorAlpha(theme.palette.accents_7, 0.1), addColorAlpha(theme.palette.accents_7, 0.8)];
|
|
18
18
|
}, [theme.palette.success]),
|
|
19
19
|
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
20
20
|
hover = _useMemo2[0],
|
|
@@ -28,15 +28,15 @@ var PaginationItem = function PaginationItem(_ref) {
|
|
|
28
28
|
onClick && onClick(event);
|
|
29
29
|
};
|
|
30
30
|
return /*#__PURE__*/React.createElement("li", {
|
|
31
|
-
className: _JSXStyle.dynamic([["
|
|
31
|
+
className: _JSXStyle.dynamic([["3250617587", [theme.palette.accents_7, theme.layout.radius, theme.palette.background, hover, theme.palette.accents_6, theme.palette.background, theme.expressiveness.shadowSmall, activeHover, theme.expressiveness.shadowMedium, theme.palette.accents_4, theme.palette.accents_2]]])
|
|
32
32
|
}, /*#__PURE__*/React.createElement("button", _extends({
|
|
33
33
|
onClick: clickHandler
|
|
34
34
|
}, props, {
|
|
35
|
-
className: _JSXStyle.dynamic([["
|
|
35
|
+
className: _JSXStyle.dynamic([["3250617587", [theme.palette.accents_7, theme.layout.radius, theme.palette.background, hover, theme.palette.accents_6, theme.palette.background, theme.expressiveness.shadowSmall, activeHover, theme.expressiveness.shadowMedium, theme.palette.accents_4, theme.palette.accents_2]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
36
36
|
}), children), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
37
|
-
id: "
|
|
38
|
-
dynamic: [theme.palette.
|
|
39
|
-
}, "li.__jsx-style-dynamic-selector{margin-right:0.428em;display:inline-block;}button.__jsx-style-dynamic-selector{border:none;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;box-sizing:border-box;text-transform:capitalize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-align:center;vertical-align:middle;box-shadow:none;outline:none;height:var(--pagination-size);min-width:var(--pagination-size);font-size:inherit;cursor:pointer;color:".concat(theme.palette.
|
|
37
|
+
id: "3250617587",
|
|
38
|
+
dynamic: [theme.palette.accents_7, theme.layout.radius, theme.palette.background, hover, theme.palette.accents_6, theme.palette.background, theme.expressiveness.shadowSmall, activeHover, theme.expressiveness.shadowMedium, theme.palette.accents_4, theme.palette.accents_2]
|
|
39
|
+
}, "li.__jsx-style-dynamic-selector{margin-right:0.428em;display:inline-block;}button.__jsx-style-dynamic-selector{border:none;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;box-sizing:border-box;text-transform:capitalize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-align:center;vertical-align:middle;box-shadow:none;outline:none;height:var(--pagination-size);min-width:var(--pagination-size);font-size:inherit;cursor:pointer;color:".concat(theme.palette.accents_7, ";border-radius:").concat(theme.layout.radius, ";background-color:").concat(theme.palette.background, ";-webkit-transition:all linear 200ms 0ms;transition:all linear 200ms 0ms;}button.__jsx-style-dynamic-selector:hover{background-color:").concat(hover, ";}.active.__jsx-style-dynamic-selector{font-weight:bold;background-color:").concat(theme.palette.accents_6, ";color:").concat(theme.palette.background, ";box-shadow:").concat(theme.expressiveness.shadowSmall, ";}.active.__jsx-style-dynamic-selector:hover{background-color:").concat(activeHover, ";box-shadow:").concat(theme.expressiveness.shadowMedium, ";}.disabled.__jsx-style-dynamic-selector{color:").concat(theme.palette.accents_4, ";cursor:not-allowed;}.disabled.__jsx-style-dynamic-selector:hover{background-color:").concat(theme.palette.accents_2, ";}button.__jsx-style-dynamic-selector svg{width:1.3em;height:1.3em;}")));
|
|
40
40
|
};
|
|
41
41
|
PaginationItem.displayName = 'PaginationItem';
|
|
42
42
|
export default PaginationItem;
|
package/esm/select/select.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ interface Props {
|
|
|
23
23
|
dropdownClassName?: string;
|
|
24
24
|
dropdownStyle?: CSSProperties;
|
|
25
25
|
disableMatchWidth?: boolean;
|
|
26
|
+
error?: boolean;
|
|
27
|
+
helperText?: string;
|
|
26
28
|
onDropdownVisibleChange?: (visible: boolean) => void;
|
|
27
29
|
getPopupContainer?: () => HTMLElement | null;
|
|
28
30
|
}
|
package/esm/select/select.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "getPopupContainer", "onDropdownVisibleChange"];
|
|
5
|
+
var _excluded = ["children", "label", "type", "disabled", "initialValue", "value", "icon", "onChange", "pure", "multiple", "fullWidth", "clearable", "placeholder", "className", "dropdownClassName", "dropdownStyle", "disableMatchWidth", "helperText", "error", "getPopupContainer", "onDropdownVisibleChange"];
|
|
6
6
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
7
7
|
/* "use client" */
|
|
8
8
|
|
|
@@ -13,6 +13,7 @@ import SelectIcon from './select-icon';
|
|
|
13
13
|
import SelectDropdown from './select-dropdown';
|
|
14
14
|
import SelectMultipleValue from './select-multiple-value';
|
|
15
15
|
import Grid from '../grid';
|
|
16
|
+
import Text from '../text';
|
|
16
17
|
import { SelectContext } from './select-context';
|
|
17
18
|
import { getColors } from './styles';
|
|
18
19
|
import SelectInput from './select-input';
|
|
@@ -44,6 +45,8 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
|
|
|
44
45
|
dropdownStyle = _ref.dropdownStyle,
|
|
45
46
|
_ref$disableMatchWidt = _ref.disableMatchWidth,
|
|
46
47
|
disableMatchWidth = _ref$disableMatchWidt === void 0 ? false : _ref$disableMatchWidt,
|
|
48
|
+
helperText = _ref.helperText,
|
|
49
|
+
error = _ref.error,
|
|
47
50
|
getPopupContainer = _ref.getPopupContainer,
|
|
48
51
|
_ref$onDropdownVisibl = _ref.onDropdownVisibleChange,
|
|
49
52
|
onDropdownVisibleChange = _ref$onDropdownVisibl === void 0 ? function () {} : _ref$onDropdownVisibl,
|
|
@@ -212,7 +215,17 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
|
|
|
212
215
|
className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "icon"
|
|
213
216
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
214
217
|
className: _JSXStyle.dynamic([["1795507141", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
|
|
215
|
-
})))), /*#__PURE__*/React.createElement(
|
|
218
|
+
})))), helperText && /*#__PURE__*/React.createElement(Text, {
|
|
219
|
+
font: 0.8,
|
|
220
|
+
style: {
|
|
221
|
+
marginTop: 0.4,
|
|
222
|
+
marginRight: 0,
|
|
223
|
+
marginLeft: 0,
|
|
224
|
+
marginBottom: '0.4rem',
|
|
225
|
+
textAlign: 'left'
|
|
226
|
+
},
|
|
227
|
+
color: error ? "error" : 'default'
|
|
228
|
+
}, "\xA0", helperText), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
216
229
|
id: "1795507141",
|
|
217
230
|
dynamic: [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, fullWidth ? '100%' : 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]
|
|
218
231
|
}, ".select.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(border, ";border-radius:").concat(theme.layout.radius, ";background-color:").concat(disabled ? theme.palette.accents_1 : theme.palette.background, ";--select-font-size:").concat(SCALES.font(0.875), ";--select-height:").concat(SCALES.height(2.25), ";min-width:11.5em;width:").concat(SCALES.width(1, fullWidth ? '100%' : 'initial'), ";height:var(--select-height);padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.multiple.__jsx-style-dynamic-selector{height:auto;min-height:var(--select-height);padding:").concat(SCALES.pt(0.334), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0.334), " ").concat(SCALES.pl(0.667), ";}.select.active.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover{border-color:").concat(disabled ? theme.palette.border : borderActive, ";}.select.active.icon.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover .icon.__jsx-style-dynamic-selector{color:").concat(disabled ? theme.palette.accents_5 : borderActive, ";}.value.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0;margin-right:1.25em;font-size:var(--select-font-size);color:").concat(disabled ? theme.palette.accents_4 : theme.palette.foreground, ";width:calc(100% - 1.25em);}.value.__jsx-style-dynamic-selector>div,.value.__jsx-style-dynamic-selector>div:hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}.placeholder.__jsx-style-dynamic-selector{color:").concat(placeholderColor, ";}.icon.__jsx-style-dynamic-selector{position:absolute;right:").concat(theme.layout.gapQuarter, ";font-size:var(--select-font-size);top:50%;bottom:0;-webkit-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);-ms-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);pointer-events:none;-webkit-transition:-webkit-transform 200ms ease;-webkit-transition:transform 200ms ease;transition:transform 200ms ease;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;color:").concat(iconBorder, ";}")));
|