@progress/kendo-react-labels 9.5.0 → 10.0.0-develop.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/Error.js +1 -1
- package/Error.mjs +12 -15
- package/FloatingLabel.js +1 -1
- package/FloatingLabel.mjs +26 -28
- package/Hint.js +1 -1
- package/Hint.mjs +10 -13
- package/Label.js +1 -1
- package/Label.mjs +13 -15
- package/dist/cdn/js/kendo-react-labels.js +1 -1
- package/package.json +4 -10
- package/package-metadata.js +0 -8
- package/package-metadata.mjs +0 -19
package/Error.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),o=require("prop-types"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),o=require("prop-types"),s=require("@progress/kendo-react-common");function d(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const a=d(l),c=r=>{const e={direction:"start",...r},t=s.useUnstyled(),n=t&&t.uError,i=a.useMemo(()=>s.classNames(s.uError.wrapper({c:n,direction:e.direction}),e.className),[n,e.direction,e.className]);return a.createElement("div",{id:e.id,role:"alert",style:e.style,className:i},e.children)};c.propTypes={id:o.string,direction:o.oneOf(["start","end"]),children:o.oneOfType([o.element,o.node]),style:o.object,className:o.string};c.displayName="KendoReactError";exports.Error=c;
|
package/Error.mjs
CHANGED
|
@@ -5,36 +5,33 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as t from "react";
|
|
9
9
|
import r from "prop-types";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const a = (c) => {
|
|
10
|
+
import { useUnstyled as i, classNames as l, uError as d } from "@progress/kendo-react-common";
|
|
11
|
+
const n = (a) => {
|
|
13
12
|
const e = {
|
|
14
13
|
direction: "start",
|
|
15
|
-
...
|
|
16
|
-
}
|
|
17
|
-
n(p);
|
|
18
|
-
const s = d(), t = s && s.uError, i = o.useMemo(
|
|
14
|
+
...a
|
|
15
|
+
}, s = i(), o = s && s.uError, c = t.useMemo(
|
|
19
16
|
() => l(
|
|
20
|
-
|
|
21
|
-
c:
|
|
17
|
+
d.wrapper({
|
|
18
|
+
c: o,
|
|
22
19
|
direction: e.direction
|
|
23
20
|
}),
|
|
24
21
|
e.className
|
|
25
22
|
),
|
|
26
|
-
[
|
|
23
|
+
[o, e.direction, e.className]
|
|
27
24
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ t.createElement("div", { id: e.id, role: "alert", style: e.style, className: c }, e.children);
|
|
29
26
|
};
|
|
30
|
-
|
|
27
|
+
n.propTypes = {
|
|
31
28
|
id: r.string,
|
|
32
29
|
direction: r.oneOf(["start", "end"]),
|
|
33
30
|
children: r.oneOfType([r.element, r.node]),
|
|
34
31
|
style: r.object,
|
|
35
32
|
className: r.string
|
|
36
33
|
};
|
|
37
|
-
|
|
34
|
+
n.displayName = "KendoReactError";
|
|
38
35
|
export {
|
|
39
|
-
|
|
36
|
+
n as Error
|
|
40
37
|
};
|
package/FloatingLabel.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),e=require("prop-types"),i=require("@progress/kendo-react-common"),k=require("@progress/kendo-react-intl"),r=require("./messages/index.js");function v(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const l in t)if(l!=="default"){const s=Object.getOwnPropertyDescriptor(t,l);Object.defineProperty(a,l,s.get?s:{enumerable:!0,get:()=>t[l]})}}return a.default=t,Object.freeze(a)}const o=v(_),O=t=>{const[a,l]=o.useState({focused:!1}),s=T=>{l({focused:!0})},F=T=>{l({focused:!1})},{label:c,editorId:d,className:L,labelClassName:S,editorValue:u,editorPlaceholder:h,editorValid:E,editorDisabled:b,style:j,id:m,optional:C,unstyled:g,...P}=t,q=k.useLocalization(),f=C?q.toLanguageString(r.labelsOptional,r.messages[r.labelsOptional]):"",p=f&&o.createElement("span",{className:"k-label-optional"},f),y=g&&g.uFloatingLabel,n=!h&&!u&&u!==0,R=i.classNames(i.uFloatingLabel.wrapper({c:y,focused:a.focused,empty:n,notEmpty:!n,disabled:b,isRtl:t.dir==="rtl"}),L),N=i.classNames(i.uFloatingLabel.label({c:y,focused:a.focused,empty:n,notEmpty:!n,invalid:E===!1,disabled:b}),S);return o.createElement("span",{...P,id:t.id,className:R,onFocus:s,onBlur:F,style:j,dir:t.dir},t.children,c?d?o.createElement("label",{id:m,htmlFor:d,className:N},c,p):o.createElement("span",{id:m,className:N},c,p):null)};O.propTypes={label:e.string,editorId:e.string,editorValue:e.oneOfType([e.string,e.bool,e.number]),editorPlaceholder:e.string,editorValid:e.bool,editorDisabled:e.bool,id:e.string,style:e.object,className:e.string,labelClassName:e.string,optional:e.bool};exports.FloatingLabel=O;
|
package/FloatingLabel.mjs
CHANGED
|
@@ -5,71 +5,69 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as a from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import {
|
|
10
|
+
import { classNames as g, uFloatingLabel as N } from "@progress/kendo-react-common";
|
|
11
11
|
import { useLocalization as B } from "@progress/kendo-react-intl";
|
|
12
12
|
import { labelsOptional as y, messages as D } from "./messages/index.mjs";
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
T(I);
|
|
16
|
-
const [s, i] = l.useState({
|
|
13
|
+
const I = (l) => {
|
|
14
|
+
const [o, i] = a.useState({
|
|
17
15
|
focused: !1
|
|
18
|
-
}), h = (
|
|
16
|
+
}), h = (v) => {
|
|
19
17
|
i({ focused: !0 });
|
|
20
|
-
}, E = (
|
|
18
|
+
}, E = (v) => {
|
|
21
19
|
i({ focused: !1 });
|
|
22
20
|
}, {
|
|
23
|
-
label:
|
|
21
|
+
label: s,
|
|
24
22
|
editorId: n,
|
|
25
23
|
className: F,
|
|
26
24
|
labelClassName: L,
|
|
27
25
|
editorValue: r,
|
|
28
26
|
editorPlaceholder: C,
|
|
29
|
-
editorValid:
|
|
27
|
+
editorValid: S,
|
|
30
28
|
editorDisabled: c,
|
|
31
|
-
style:
|
|
29
|
+
style: V,
|
|
32
30
|
id: d,
|
|
33
|
-
optional:
|
|
31
|
+
optional: z,
|
|
34
32
|
unstyled: m,
|
|
35
|
-
...
|
|
36
|
-
} =
|
|
33
|
+
...O
|
|
34
|
+
} = l, P = B(), b = z ? P.toLanguageString(y, D[y]) : "", u = b && /* @__PURE__ */ a.createElement("span", { className: "k-label-optional" }, b), p = m && m.uFloatingLabel, t = !C && !r && r !== 0, T = g(
|
|
37
35
|
N.wrapper({
|
|
38
36
|
c: p,
|
|
39
|
-
focused:
|
|
37
|
+
focused: o.focused,
|
|
40
38
|
empty: t,
|
|
41
39
|
notEmpty: !t,
|
|
42
40
|
disabled: c,
|
|
43
|
-
isRtl:
|
|
41
|
+
isRtl: l.dir === "rtl"
|
|
44
42
|
}),
|
|
45
43
|
F
|
|
46
44
|
), f = g(
|
|
47
45
|
N.label({
|
|
48
46
|
c: p,
|
|
49
|
-
focused:
|
|
47
|
+
focused: o.focused,
|
|
50
48
|
empty: t,
|
|
51
49
|
notEmpty: !t,
|
|
52
|
-
invalid:
|
|
50
|
+
invalid: S === !1,
|
|
53
51
|
disabled: c
|
|
54
52
|
}),
|
|
55
53
|
L
|
|
56
54
|
);
|
|
57
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ a.createElement(
|
|
58
56
|
"span",
|
|
59
57
|
{
|
|
60
|
-
...
|
|
61
|
-
id:
|
|
62
|
-
className:
|
|
58
|
+
...O,
|
|
59
|
+
id: l.id,
|
|
60
|
+
className: T,
|
|
63
61
|
onFocus: h,
|
|
64
62
|
onBlur: E,
|
|
65
|
-
style:
|
|
66
|
-
dir:
|
|
63
|
+
style: V,
|
|
64
|
+
dir: l.dir
|
|
67
65
|
},
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
l.children,
|
|
67
|
+
s ? n ? /* @__PURE__ */ a.createElement("label", { id: d, htmlFor: n, className: f }, s, u) : /* @__PURE__ */ a.createElement("span", { id: d, className: f }, s, u) : null
|
|
70
68
|
);
|
|
71
69
|
};
|
|
72
|
-
|
|
70
|
+
I.propTypes = {
|
|
73
71
|
label: e.string,
|
|
74
72
|
editorId: e.string,
|
|
75
73
|
editorValue: e.oneOfType([e.string, e.bool, e.number]),
|
|
@@ -83,5 +81,5 @@ R.propTypes = {
|
|
|
83
81
|
optional: e.bool
|
|
84
82
|
};
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
I as FloatingLabel
|
|
87
85
|
};
|
package/Hint.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),t=require("prop-types"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),t=require("prop-types"),o=require("@progress/kendo-react-common");function l(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}return e.default=n,Object.freeze(e)}const c=l(d),r=n=>{const e={direction:"start",...n},s=o.useUnstyled(),i=s&&s.uHint,a=c.useMemo(()=>o.classNames(o.uHint.wrapper({c:i,direction:e.direction,disabled:e.editorDisabled===!0}),e.className),[i,e.direction,e.editorDisabled,e.className]);return c.createElement("div",{id:e.id,style:e.style,className:a},e.children)};r.propTypes={id:t.string,direction:t.oneOf(["start","end"]),children:t.oneOfType([t.element,t.node]),style:t.object,className:t.string,editorDisabled:t.bool};r.displayName="KendoReactHint";exports.Hint=r;
|
package/Hint.mjs
CHANGED
|
@@ -5,19 +5,16 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as o from "react";
|
|
9
9
|
import t from "prop-types";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const o = (r) => {
|
|
10
|
+
import { useUnstyled as d, classNames as c, uHint as l } from "@progress/kendo-react-common";
|
|
11
|
+
const n = (r) => {
|
|
13
12
|
const e = {
|
|
14
13
|
direction: "start",
|
|
15
14
|
...r
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
() => l(
|
|
20
|
-
m.wrapper({
|
|
15
|
+
}, s = d(), i = s && s.uHint, a = o.useMemo(
|
|
16
|
+
() => c(
|
|
17
|
+
l.wrapper({
|
|
21
18
|
c: i,
|
|
22
19
|
direction: e.direction,
|
|
23
20
|
disabled: e.editorDisabled === !0
|
|
@@ -26,9 +23,9 @@ const o = (r) => {
|
|
|
26
23
|
),
|
|
27
24
|
[i, e.direction, e.editorDisabled, e.className]
|
|
28
25
|
);
|
|
29
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ o.createElement("div", { id: e.id, style: e.style, className: a }, e.children);
|
|
30
27
|
};
|
|
31
|
-
|
|
28
|
+
n.propTypes = {
|
|
32
29
|
id: t.string,
|
|
33
30
|
direction: t.oneOf(["start", "end"]),
|
|
34
31
|
children: t.oneOfType([t.element, t.node]),
|
|
@@ -36,7 +33,7 @@ o.propTypes = {
|
|
|
36
33
|
className: t.string,
|
|
37
34
|
editorDisabled: t.bool
|
|
38
35
|
};
|
|
39
|
-
|
|
36
|
+
n.displayName = "KendoReactHint";
|
|
40
37
|
export {
|
|
41
|
-
|
|
38
|
+
n as Hint
|
|
42
39
|
};
|
package/Label.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),e=require("prop-types"),r=require("@progress/kendo-react-common"),i=require("./messages/index.js"),C=require("@progress/kendo-react-intl");function D(l){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const o in l)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(a,o,t.get?t:{enumerable:!0,get:()=>l[o]})}}return a.default=l,Object.freeze(a)}const n=D(v),u=l=>{const{id:a,editorId:o,editorRef:t,editorDisabled:s,children:c,editorValid:d,style:O,className:b,optional:k}=l,L=C.useLocalization(),p=k?L.toLanguageString(i.labelsOptional,i.messages[i.labelsOptional]):"",N=p&&n.createElement("span",{className:"k-label-optional"},p),m=r.useUnstyled(),f=m&&m.uLabel,R=n.useCallback(y=>{if(t&&t.current&&!s){t.current.focus&&(y.preventDefault(),t.current.focus());const g=t.current.actionElement;g&&(y.preventDefault(),g.click())}},[t]),j=n.useMemo(()=>r.classNames(r.uLabel.label({c:f,empty:!c,invalid:d===!1,disabled:s===!0}),b),[f,c,d,s,b]);return n.createElement("label",{id:a,htmlFor:o,onClick:R,style:O,className:j},c,N)};u.propTypes={id:e.string,editorId:e.string,editorRef:e.oneOfType([e.func,e.shape({current:e.any})]),editorValid:e.bool,editorDisabled:e.bool,style:e.object,className:e.string,optional:e.bool};u.displayName="KendoReactLabel";exports.Label=u;
|
package/Label.mjs
CHANGED
|
@@ -5,36 +5,34 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as o from "react";
|
|
9
9
|
import e from "prop-types";
|
|
10
|
-
import {
|
|
11
|
-
import { labelsOptional as p, messages as
|
|
12
|
-
import { useLocalization as
|
|
13
|
-
import { packageMetadata as T } from "./package-metadata.mjs";
|
|
10
|
+
import { useUnstyled as v, classNames as D, uLabel as R } from "@progress/kendo-react-common";
|
|
11
|
+
import { labelsOptional as p, messages as h } from "./messages/index.mjs";
|
|
12
|
+
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
14
13
|
const u = (b) => {
|
|
15
|
-
|
|
16
|
-
const { id: f, editorId: y, editorRef: t, editorDisabled: o, children: l, editorValid: s, style: g, className: i, optional: k } = b, L = O(), n = k ? L.toLanguageString(p, z[p]) : "", N = n && /* @__PURE__ */ a.createElement("span", { className: "k-label-optional" }, n), r = D(), c = r && r.uLabel, v = a.useCallback(
|
|
14
|
+
const { id: f, editorId: y, editorRef: t, editorDisabled: l, children: a, editorValid: s, style: g, className: i, optional: L } = b, N = z(), n = L ? N.toLanguageString(p, h[p]) : "", k = n && /* @__PURE__ */ o.createElement("span", { className: "k-label-optional" }, n), r = v(), c = r && r.uLabel, C = o.useCallback(
|
|
17
15
|
(d) => {
|
|
18
|
-
if (t && t.current && !
|
|
16
|
+
if (t && t.current && !l) {
|
|
19
17
|
t.current.focus && (d.preventDefault(), t.current.focus());
|
|
20
18
|
const m = t.current.actionElement;
|
|
21
19
|
m && (d.preventDefault(), m.click());
|
|
22
20
|
}
|
|
23
21
|
},
|
|
24
22
|
[t]
|
|
25
|
-
),
|
|
26
|
-
() =>
|
|
27
|
-
|
|
23
|
+
), E = o.useMemo(
|
|
24
|
+
() => D(
|
|
25
|
+
R.label({
|
|
28
26
|
c,
|
|
29
|
-
empty: !
|
|
27
|
+
empty: !a,
|
|
30
28
|
invalid: s === !1,
|
|
31
|
-
disabled:
|
|
29
|
+
disabled: l === !0
|
|
32
30
|
}),
|
|
33
31
|
i
|
|
34
32
|
),
|
|
35
|
-
[c,
|
|
33
|
+
[c, a, s, l, i]
|
|
36
34
|
);
|
|
37
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ o.createElement("label", { id: f, htmlFor: y, onClick: C, style: g, className: E }, a, k);
|
|
38
36
|
};
|
|
39
37
|
u.propTypes = {
|
|
40
38
|
id: e.string,
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactLabels={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactIntl)}(this,(function(e,t,a,o,
|
|
15
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-intl"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactLabels={},e.React,e.PropTypes,e.KendoReactCommon,e.KendoReactIntl)}(this,(function(e,t,a,o,l){"use strict";function s(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var r=s(t);const i="labels.optional",n={[i]:"(Optional)"},d=e=>{const{id:t,editorId:a,editorRef:s,editorDisabled:d,children:c,editorValid:u,style:p,className:m,optional:b}=e,f=l.useLocalization(),y=b?f.toLanguageString(i,n[i]):"",g=y&&r.createElement("span",{className:"k-label-optional"},y),N=o.useUnstyled(),E=N&&N.uLabel,h=r.useCallback((e=>{if(s&&s.current&&!d){s.current.focus&&(e.preventDefault(),s.current.focus());const t=s.current.actionElement;t&&(e.preventDefault(),t.click())}}),[s]),L=r.useMemo((()=>o.classNames(o.uLabel.label({c:E,empty:!c,invalid:!1===u,disabled:!0===d}),m)),[E,c,u,d,m]);return r.createElement("label",{id:t,htmlFor:a,onClick:h,style:p,className:L},c,g)};d.propTypes={id:a.string,editorId:a.string,editorRef:a.oneOfType([a.func,a.shape({current:a.any})]),editorValid:a.bool,editorDisabled:a.bool,style:a.object,className:a.string,optional:a.bool},d.displayName="KendoReactLabel";const c=e=>{const t={direction:"start",...e},a=o.useUnstyled(),l=a&&a.uError,s=r.useMemo((()=>o.classNames(o.uError.wrapper({c:l,direction:t.direction}),t.className)),[l,t.direction,t.className]);return r.createElement("div",{id:t.id,role:"alert",style:t.style,className:s},t.children)};c.propTypes={id:a.string,direction:a.oneOf(["start","end"]),children:a.oneOfType([a.element,a.node]),style:a.object,className:a.string},c.displayName="KendoReactError";const u=e=>{const t={direction:"start",...e},a=o.useUnstyled(),l=a&&a.uHint,s=r.useMemo((()=>o.classNames(o.uHint.wrapper({c:l,direction:t.direction,disabled:!0===t.editorDisabled}),t.className)),[l,t.direction,t.editorDisabled,t.className]);return r.createElement("div",{id:t.id,style:t.style,className:s},t.children)};u.propTypes={id:a.string,direction:a.oneOf(["start","end"]),children:a.oneOfType([a.element,a.node]),style:a.object,className:a.string,editorDisabled:a.bool},u.displayName="KendoReactHint";const p=e=>{const[t,a]=r.useState({focused:!1}),{label:s,editorId:d,className:c,labelClassName:u,editorValue:p,editorPlaceholder:m,editorValid:b,editorDisabled:f,style:y,id:g,optional:N,unstyled:E,...h}=e,L=l.useLocalization(),O=N?L.toLanguageString(i,n[i]):"",T=O&&r.createElement("span",{className:"k-label-optional"},O),j=E&&E.uFloatingLabel,k=!m&&!p&&0!==p,D=o.classNames(o.uFloatingLabel.wrapper({c:j,focused:t.focused,empty:k,notEmpty:!k,disabled:f,isRtl:"rtl"===e.dir}),c),R=o.classNames(o.uFloatingLabel.label({c:j,focused:t.focused,empty:k,notEmpty:!k,invalid:!1===b,disabled:f}),u);return r.createElement("span",{...h,id:e.id,className:D,onFocus:e=>{a({focused:!0})},onBlur:e=>{a({focused:!1})},style:y,dir:e.dir},e.children,s?d?r.createElement("label",{id:g,htmlFor:d,className:R},s,T):r.createElement("span",{id:g,className:R},s,T):null)};p.propTypes={label:a.string,editorId:a.string,editorValue:a.oneOfType([a.string,a.bool,a.number]),editorPlaceholder:a.string,editorValid:a.bool,editorDisabled:a.bool,id:a.string,style:a.object,className:a.string,labelClassName:a.string,optional:a.bool},e.Error=c,e.FloatingLabel=p,e.Hint=u,e.Label=d}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-labels",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-develop.1",
|
|
4
4
|
"description": "React Labels package provides components for labelling form editors. KendoReact Labels package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.5.0",
|
|
29
|
-
"@progress/kendo-react-common": "
|
|
30
|
-
"@progress/kendo-react-intl": "
|
|
29
|
+
"@progress/kendo-react-common": "10.0.0-develop.1",
|
|
30
|
+
"@progress/kendo-react-intl": "10.0.0-develop.1",
|
|
31
31
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
32
32
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
33
33
|
},
|
|
@@ -51,13 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"@progress": {
|
|
53
53
|
"friendlyName": "Labels",
|
|
54
|
-
"framework": "KendoReact"
|
|
55
|
-
"package": {
|
|
56
|
-
"productName": "KendoReact",
|
|
57
|
-
"productCode": "KENDOUIREACT",
|
|
58
|
-
"publishDate": 1741090636,
|
|
59
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
60
|
-
}
|
|
54
|
+
"framework": "KendoReact"
|
|
61
55
|
},
|
|
62
56
|
"repository": {
|
|
63
57
|
"type": "git",
|
package/package-metadata.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-labels",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1741090636,version:"9.5.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
-
*-------------------------------------------------------------------------------------------
|
|
7
|
-
*/
|
|
8
|
-
const e = {
|
|
9
|
-
name: "@progress/kendo-react-labels",
|
|
10
|
-
productName: "KendoReact",
|
|
11
|
-
productCode: "KENDOUIREACT",
|
|
12
|
-
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate: 1741090636,
|
|
14
|
-
version: "9.5.0",
|
|
15
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
e as packageMetadata
|
|
19
|
-
};
|