@panneau/element-range 4.0.38 → 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.
Files changed (2) hide show
  1. package/dist/index.js +68 -22
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,32 +1,58 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import classNames from 'classnames';
3
- import { useCallback } from 'react';
4
- import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
4
 
6
5
  var styles = {"container":"panneau-element-range-container"};
7
6
 
8
- function Range(_ref) {
9
- var _ref$title = _ref.title,
10
- title = _ref$title === void 0 ? null : _ref$title,
11
- _ref$value = _ref.value,
12
- value = _ref$value === void 0 ? 50 : _ref$value,
13
- onChange = _ref.onChange,
14
- _ref$max = _ref.max,
15
- max = _ref$max === void 0 ? 100 : _ref$max,
16
- _ref$className = _ref.className,
17
- className = _ref$className === void 0 ? null : _ref$className;
18
- var onValueChange = useCallback(function (e) {
19
- onChange(e.target.value);
20
- }, [onChange, max]);
21
- return /*#__PURE__*/jsxs("div", {
22
- className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
23
- children: [/*#__PURE__*/jsx("h4", {
7
+ function Range(t0) {
8
+ const $ = c(14);
9
+ const {
10
+ title: t1,
11
+ value: t2,
12
+ onChange,
13
+ max: t3,
14
+ className: t4
15
+ } = t0;
16
+ const title = t1 === undefined ? null : t1;
17
+ const value = t2 === undefined ? 50 : t2;
18
+ const max = t3 === undefined ? 100 : t3;
19
+ const className = t4 === undefined ? null : t4;
20
+ let t5;
21
+ if ($[0] !== onChange) {
22
+ t5 = e => {
23
+ onChange(e.target.value);
24
+ };
25
+ $[0] = onChange;
26
+ $[1] = t5;
27
+ } else {
28
+ t5 = $[1];
29
+ }
30
+ const onValueChange = t5;
31
+ let t6;
32
+ if ($[2] !== className) {
33
+ t6 = classNames([styles.container, className]);
34
+ $[2] = className;
35
+ $[3] = t6;
36
+ } else {
37
+ t6 = $[3];
38
+ }
39
+ let t7;
40
+ if ($[4] !== title) {
41
+ t7 = /*#__PURE__*/jsx("h4", {
24
42
  children: /*#__PURE__*/jsx("label", {
25
43
  className: styles.label,
26
44
  htmlFor: "range",
27
45
  children: title
28
46
  })
29
- }), /*#__PURE__*/jsx("input", {
47
+ });
48
+ $[4] = title;
49
+ $[5] = t7;
50
+ } else {
51
+ t7 = $[5];
52
+ }
53
+ let t8;
54
+ if ($[6] !== max || $[7] !== onValueChange || $[8] !== value) {
55
+ t8 = /*#__PURE__*/jsx("input", {
30
56
  className: "form-range",
31
57
  type: "range",
32
58
  id: "range",
@@ -34,8 +60,28 @@ function Range(_ref) {
34
60
  max: max,
35
61
  onChange: onValueChange,
36
62
  value: value
37
- })]
38
- });
63
+ });
64
+ $[6] = max;
65
+ $[7] = onValueChange;
66
+ $[8] = value;
67
+ $[9] = t8;
68
+ } else {
69
+ t8 = $[9];
70
+ }
71
+ let t9;
72
+ if ($[10] !== t6 || $[11] !== t7 || $[12] !== t8) {
73
+ t9 = /*#__PURE__*/jsxs("div", {
74
+ className: t6,
75
+ children: [t7, t8]
76
+ });
77
+ $[10] = t6;
78
+ $[11] = t7;
79
+ $[12] = t8;
80
+ $[13] = t9;
81
+ } else {
82
+ t9 = $[13];
83
+ }
84
+ return t9;
39
85
  }
40
86
 
41
87
  export { Range as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/element-range",
3
- "version": "4.0.38",
3
+ "version": "4.0.40-alpha.1",
4
4
  "description": "Range element",
5
5
  "keywords": [
6
6
  "javascript"
@@ -64,12 +64,12 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@babel/runtime": "^7.28.6",
67
- "@panneau/core": "^4.0.38",
67
+ "@panneau/core": "^4.0.40-alpha.1",
68
68
  "classnames": "^2.5.1",
69
69
  "react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "fa4b9c4ec7fe5c0e360dda5a40f8b5d8c7ada651"
74
+ "gitHead": "66520f92373b3aa371222b354d60ed3cf3d20c96"
75
75
  }