@panneau/filter-button 4.0.39 → 4.0.40-alpha.1
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/index.js +114 -43
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,54 +1,125 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { useMemo, useCallback } from 'react';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
4
2
|
import Button from '@panneau/element-button';
|
|
5
3
|
import { jsx } from 'react/jsx-runtime';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
5
|
+
function ButtonFilter(t0) {
|
|
6
|
+
const $ = c(27);
|
|
7
|
+
let props;
|
|
8
|
+
let t1;
|
|
9
|
+
let t10;
|
|
10
|
+
let t2;
|
|
11
|
+
let t3;
|
|
12
|
+
let t4;
|
|
13
|
+
let t5;
|
|
14
|
+
let t6;
|
|
15
|
+
let t7;
|
|
16
|
+
let t8;
|
|
17
|
+
let t9;
|
|
18
|
+
if ($[0] !== t0) {
|
|
19
|
+
({
|
|
20
|
+
onChange: t1,
|
|
21
|
+
onClear: t2,
|
|
22
|
+
name: t3,
|
|
23
|
+
label: t4,
|
|
24
|
+
value: t5,
|
|
25
|
+
href: t6,
|
|
26
|
+
theme: t7,
|
|
27
|
+
activeTheme: t8,
|
|
28
|
+
disableOutline: t9,
|
|
29
|
+
className: t10,
|
|
30
|
+
...props
|
|
31
|
+
} = t0);
|
|
32
|
+
$[0] = t0;
|
|
33
|
+
$[1] = props;
|
|
34
|
+
$[2] = t1;
|
|
35
|
+
$[3] = t10;
|
|
36
|
+
$[4] = t2;
|
|
37
|
+
$[5] = t3;
|
|
38
|
+
$[6] = t4;
|
|
39
|
+
$[7] = t5;
|
|
40
|
+
$[8] = t6;
|
|
41
|
+
$[9] = t7;
|
|
42
|
+
$[10] = t8;
|
|
43
|
+
$[11] = t9;
|
|
44
|
+
} else {
|
|
45
|
+
props = $[1];
|
|
46
|
+
t1 = $[2];
|
|
47
|
+
t10 = $[3];
|
|
48
|
+
t2 = $[4];
|
|
49
|
+
t3 = $[5];
|
|
50
|
+
t4 = $[6];
|
|
51
|
+
t5 = $[7];
|
|
52
|
+
t6 = $[8];
|
|
53
|
+
t7 = $[9];
|
|
54
|
+
t8 = $[10];
|
|
55
|
+
t9 = $[11];
|
|
56
|
+
}
|
|
57
|
+
const onChange = t1 === undefined ? null : t1;
|
|
58
|
+
const name = t3 === undefined ? "button" : t3;
|
|
59
|
+
const label = t4 === undefined ? null : t4;
|
|
60
|
+
const value = t5 === undefined ? false : t5;
|
|
61
|
+
const href = t6 === undefined ? null : t6;
|
|
62
|
+
const theme = t7 === undefined ? "primary" : t7;
|
|
63
|
+
const activeTheme = t8 === undefined ? "primary" : t8;
|
|
64
|
+
const disableOutline = t9 === undefined ? false : t9;
|
|
65
|
+
const className = t10 === undefined ? null : t10;
|
|
66
|
+
const isActive = value !== null && (value === true || value === "true" || value === 1 || value === "1");
|
|
67
|
+
let t11;
|
|
68
|
+
if ($[12] !== href || $[13] !== isActive || $[14] !== onChange) {
|
|
69
|
+
t11 = () => {
|
|
70
|
+
if (href === null) {
|
|
71
|
+
if (isActive) {
|
|
72
|
+
onChange(null);
|
|
73
|
+
} else {
|
|
74
|
+
onChange(true);
|
|
75
|
+
}
|
|
38
76
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
77
|
+
};
|
|
78
|
+
$[12] = href;
|
|
79
|
+
$[13] = isActive;
|
|
80
|
+
$[14] = onChange;
|
|
81
|
+
$[15] = t11;
|
|
82
|
+
} else {
|
|
83
|
+
t11 = $[15];
|
|
84
|
+
}
|
|
85
|
+
const onClick = t11;
|
|
86
|
+
const t12 = (!isActive || href !== null) && !disableOutline;
|
|
87
|
+
const t13 = isActive ? activeTheme : theme;
|
|
88
|
+
let t14;
|
|
89
|
+
if ($[16] !== href || $[17] !== label || $[18] !== name || $[19] !== onClick || $[20] !== props || $[21] !== t12 || $[22] !== t13) {
|
|
90
|
+
t14 = /*#__PURE__*/jsx(Button, {
|
|
44
91
|
href: href,
|
|
45
92
|
label: label,
|
|
46
93
|
name: name,
|
|
47
94
|
onClick: onClick,
|
|
48
|
-
outline:
|
|
49
|
-
theme:
|
|
50
|
-
|
|
51
|
-
|
|
95
|
+
outline: t12,
|
|
96
|
+
theme: t13,
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
$[16] = href;
|
|
100
|
+
$[17] = label;
|
|
101
|
+
$[18] = name;
|
|
102
|
+
$[19] = onClick;
|
|
103
|
+
$[20] = props;
|
|
104
|
+
$[21] = t12;
|
|
105
|
+
$[22] = t13;
|
|
106
|
+
$[23] = t14;
|
|
107
|
+
} else {
|
|
108
|
+
t14 = $[23];
|
|
109
|
+
}
|
|
110
|
+
let t15;
|
|
111
|
+
if ($[24] !== className || $[25] !== t14) {
|
|
112
|
+
t15 = /*#__PURE__*/jsx("div", {
|
|
113
|
+
className: className,
|
|
114
|
+
children: t14
|
|
115
|
+
});
|
|
116
|
+
$[24] = className;
|
|
117
|
+
$[25] = t14;
|
|
118
|
+
$[26] = t15;
|
|
119
|
+
} else {
|
|
120
|
+
t15 = $[26];
|
|
121
|
+
}
|
|
122
|
+
return t15;
|
|
52
123
|
}
|
|
53
124
|
|
|
54
125
|
export { ButtonFilter as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/filter-button",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.40-alpha.1",
|
|
4
4
|
"description": "Button filter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@babel/runtime": "^7.28.6",
|
|
63
|
-
"@panneau/core": "^4.0.
|
|
64
|
-
"@panneau/element-button": "^4.0.
|
|
65
|
-
"@panneau/themes": "^4.0.
|
|
63
|
+
"@panneau/core": "^4.0.40-alpha.1",
|
|
64
|
+
"@panneau/element-button": "^4.0.40-alpha.1",
|
|
65
|
+
"@panneau/themes": "^4.0.40-alpha.1",
|
|
66
66
|
"classnames": "^2.5.1"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "66520f92373b3aa371222b354d60ed3cf3d20c96"
|
|
72
72
|
}
|