@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 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"),n=require("@progress/kendo-react-common"),d=require("./package-metadata.js");function u(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const c=u(l),s=t=>{const e={direction:"start",...t};n.validatePackage(d.packageMetadata);const r=n.useUnstyled(),a=r&&r.uError,i=c.useMemo(()=>n.classNames(n.uError.wrapper({c:a,direction:e.direction}),e.className),[a,e.direction,e.className]);return c.createElement("div",{id:e.id,role:"alert",style:e.style,className:i},e.children)};s.propTypes={id:o.string,direction:o.oneOf(["start","end"]),children:o.oneOfType([o.element,o.node]),style:o.object,className:o.string};s.displayName="KendoReactError";exports.Error=s;
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 o from "react";
8
+ import * as t from "react";
9
9
  import r from "prop-types";
10
- import { validatePackage as n, useUnstyled as d, classNames as l, uError as m } from "@progress/kendo-react-common";
11
- import { packageMetadata as p } from "./package-metadata.mjs";
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
- ...c
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
- m.wrapper({
21
- c: t,
17
+ d.wrapper({
18
+ c: o,
22
19
  direction: e.direction
23
20
  }),
24
21
  e.className
25
22
  ),
26
- [t, e.direction, e.className]
23
+ [o, e.direction, e.className]
27
24
  );
28
- return /* @__PURE__ */ o.createElement("div", { id: e.id, role: "alert", style: e.style, className: i }, e.children);
25
+ return /* @__PURE__ */ t.createElement("div", { id: e.id, role: "alert", style: e.style, className: c }, e.children);
29
26
  };
30
- a.propTypes = {
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
- a.displayName = "KendoReactError";
34
+ n.displayName = "KendoReactError";
38
35
  export {
39
- a as Error
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 R=require("react"),e=require("prop-types"),o=require("@progress/kendo-react-common"),T=require("@progress/kendo-react-intl"),r=require("./messages/index.js"),_=require("./package-metadata.js");function z(t){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(l,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return l.default=t,Object.freeze(l)}const s=z(R),O=t=>{o.validatePackage(_.packageMetadata);const[l,a]=s.useState({focused:!1}),n=v=>{a({focused:!0})},F=v=>{a({focused:!1})},{label:c,editorId:d,className:L,labelClassName:S,editorValue:u,editorPlaceholder:h,editorValid:k,editorDisabled:b,style:E,id:m,optional:P,unstyled:g,...j}=t,q=T.useLocalization(),p=P?q.toLanguageString(r.labelsOptional,r.messages[r.labelsOptional]):"",f=p&&s.createElement("span",{className:"k-label-optional"},p),y=g&&g.uFloatingLabel,i=!h&&!u&&u!==0,C=o.classNames(o.uFloatingLabel.wrapper({c:y,focused:l.focused,empty:i,notEmpty:!i,disabled:b,isRtl:t.dir==="rtl"}),L),N=o.classNames(o.uFloatingLabel.label({c:y,focused:l.focused,empty:i,notEmpty:!i,invalid:k===!1,disabled:b}),S);return s.createElement("span",{...j,id:t.id,className:C,onFocus:n,onBlur:F,style:E,dir:t.dir},t.children,c?d?s.createElement("label",{id:m,htmlFor:d,className:N},c,f):s.createElement("span",{id:m,className:N},c,f):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;
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 l from "react";
8
+ import * as a from "react";
9
9
  import e from "prop-types";
10
- import { validatePackage as T, classNames as g, uFloatingLabel as N } from "@progress/kendo-react-common";
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
- import { packageMetadata as I } from "./package-metadata.mjs";
14
- const R = (a) => {
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 = (O) => {
16
+ }), h = (v) => {
19
17
  i({ focused: !0 });
20
- }, E = (O) => {
18
+ }, E = (v) => {
21
19
  i({ focused: !1 });
22
20
  }, {
23
- label: o,
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: P,
27
+ editorValid: S,
30
28
  editorDisabled: c,
31
- style: S,
29
+ style: V,
32
30
  id: d,
33
- optional: V,
31
+ optional: z,
34
32
  unstyled: m,
35
- ...k
36
- } = a, v = B(), b = V ? v.toLanguageString(y, D[y]) : "", u = b && /* @__PURE__ */ l.createElement("span", { className: "k-label-optional" }, b), p = m && m.uFloatingLabel, t = !C && !r && r !== 0, z = g(
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: s.focused,
37
+ focused: o.focused,
40
38
  empty: t,
41
39
  notEmpty: !t,
42
40
  disabled: c,
43
- isRtl: a.dir === "rtl"
41
+ isRtl: l.dir === "rtl"
44
42
  }),
45
43
  F
46
44
  ), f = g(
47
45
  N.label({
48
46
  c: p,
49
- focused: s.focused,
47
+ focused: o.focused,
50
48
  empty: t,
51
49
  notEmpty: !t,
52
- invalid: P === !1,
50
+ invalid: S === !1,
53
51
  disabled: c
54
52
  }),
55
53
  L
56
54
  );
57
- return /* @__PURE__ */ l.createElement(
55
+ return /* @__PURE__ */ a.createElement(
58
56
  "span",
59
57
  {
60
- ...k,
61
- id: a.id,
62
- className: z,
58
+ ...O,
59
+ id: l.id,
60
+ className: T,
63
61
  onFocus: h,
64
62
  onBlur: E,
65
- style: S,
66
- dir: a.dir
63
+ style: V,
64
+ dir: l.dir
67
65
  },
68
- a.children,
69
- o ? n ? /* @__PURE__ */ l.createElement("label", { id: d, htmlFor: n, className: f }, o, u) : /* @__PURE__ */ l.createElement("span", { id: d, className: f }, o, u) : null
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
- R.propTypes = {
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
- R as FloatingLabel
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"),i=require("@progress/kendo-react-common"),l=require("./package-metadata.js");function u(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const a in n)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}return e.default=n,Object.freeze(e)}const o=u(d),r=n=>{const e={direction:"start",...n};i.validatePackage(l.packageMetadata);const a=i.useUnstyled(),s=a&&a.uHint,c=o.useMemo(()=>i.classNames(i.uHint.wrapper({c:s,direction:e.direction,disabled:e.editorDisabled===!0}),e.className),[s,e.direction,e.editorDisabled,e.className]);return o.createElement("div",{id:e.id,style:e.style,className:c},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;
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 a from "react";
8
+ import * as o from "react";
9
9
  import t from "prop-types";
10
- import { validatePackage as d, useUnstyled as c, classNames as l, uHint as m } from "@progress/kendo-react-common";
11
- import { packageMetadata as p } from "./package-metadata.mjs";
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
- d(p);
18
- const s = c(), i = s && s.uHint, n = a.useMemo(
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__ */ a.createElement("div", { id: e.id, style: e.style, className: n }, e.children);
26
+ return /* @__PURE__ */ o.createElement("div", { id: e.id, style: e.style, className: a }, e.children);
30
27
  };
31
- o.propTypes = {
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
- o.displayName = "KendoReactHint";
36
+ n.displayName = "KendoReactHint";
40
37
  export {
41
- o as Hint
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 j=require("react"),e=require("prop-types"),n=require("@progress/kendo-react-common"),i=require("./messages/index.js"),q=require("@progress/kendo-react-intl"),C=require("./package-metadata.js");function D(a){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const l in a)if(l!=="default"){const t=Object.getOwnPropertyDescriptor(a,l);Object.defineProperty(o,l,t.get?t:{enumerable:!0,get:()=>a[l]})}}return o.default=a,Object.freeze(o)}const c=D(j),d=a=>{n.validatePackage(C.packageMetadata);const{id:o,editorId:l,editorRef:t,editorDisabled:s,children:r,editorValid:u,style:k,className:b,optional:O}=a,L=q.useLocalization(),p=O?L.toLanguageString(i.labelsOptional,i.messages[i.labelsOptional]):"",N=p&&c.createElement("span",{className:"k-label-optional"},p),m=n.useUnstyled(),f=m&&m.uLabel,v=c.useCallback(g=>{if(t&&t.current&&!s){t.current.focus&&(g.preventDefault(),t.current.focus());const y=t.current.actionElement;y&&(g.preventDefault(),y.click())}},[t]),R=c.useMemo(()=>n.classNames(n.uLabel.label({c:f,empty:!r,invalid:u===!1,disabled:s===!0}),b),[f,r,u,s,b]);return c.createElement("label",{id:o,htmlFor:l,onClick:v,style:k,className:R},r,N)};d.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};d.displayName="KendoReactLabel";exports.Label=d;
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 a from "react";
8
+ import * as o from "react";
9
9
  import e from "prop-types";
10
- import { validatePackage as E, useUnstyled as D, classNames as R, uLabel as h } from "@progress/kendo-react-common";
11
- import { labelsOptional as p, messages as z } from "./messages/index.mjs";
12
- import { useLocalization as O } from "@progress/kendo-react-intl";
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
- E(T);
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 && !o) {
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
- ), C = a.useMemo(
26
- () => R(
27
- h.label({
23
+ ), E = o.useMemo(
24
+ () => D(
25
+ R.label({
28
26
  c,
29
- empty: !l,
27
+ empty: !a,
30
28
  invalid: s === !1,
31
- disabled: o === !0
29
+ disabled: l === !0
32
30
  }),
33
31
  i
34
32
  ),
35
- [c, l, s, o, i]
33
+ [c, a, s, l, i]
36
34
  );
37
- return /* @__PURE__ */ a.createElement("label", { id: f, htmlFor: y, onClick: v, style: g, className: C }, l, N);
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,s){"use strict";function l(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=l(t);const n="labels.optional",i={[n]:"(Optional)"},c={name:"@progress/kendo-react-labels",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"$VERSION",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},d=e=>{o.validatePackage(c);const{id:t,editorId:a,editorRef:l,editorDisabled:d,children:p,editorValid:u,style:m,className:b,optional:y}=e,f=s.useLocalization(),g=y?f.toLanguageString(n,i[n]):"",N=g&&r.createElement("span",{className:"k-label-optional"},g),E=o.useUnstyled(),h=E&&E.uLabel,k=r.useCallback((e=>{if(l&&l.current&&!d){l.current.focus&&(e.preventDefault(),l.current.focus());const t=l.current.actionElement;t&&(e.preventDefault(),t.click())}}),[l]),O=r.useMemo((()=>o.classNames(o.uLabel.label({c:h,empty:!p,invalid:!1===u,disabled:!0===d}),b)),[h,p,u,d,b]);return r.createElement("label",{id:t,htmlFor:a,onClick:k,style:m,className:O},p,N)};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 p=e=>{const t={direction:"start",...e};o.validatePackage(c);const a=o.useUnstyled(),s=a&&a.uError,l=r.useMemo((()=>o.classNames(o.uError.wrapper({c:s,direction:t.direction}),t.className)),[s,t.direction,t.className]);return r.createElement("div",{id:t.id,role:"alert",style:t.style,className:l},t.children)};p.propTypes={id:a.string,direction:a.oneOf(["start","end"]),children:a.oneOfType([a.element,a.node]),style:a.object,className:a.string},p.displayName="KendoReactError";const u=e=>{const t={direction:"start",...e};o.validatePackage(c);const a=o.useUnstyled(),s=a&&a.uHint,l=r.useMemo((()=>o.classNames(o.uHint.wrapper({c:s,direction:t.direction,disabled:!0===t.editorDisabled}),t.className)),[s,t.direction,t.editorDisabled,t.className]);return r.createElement("div",{id:t.id,style:t.style,className:l},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 m=e=>{o.validatePackage(c);const[t,a]=r.useState({focused:!1}),{label:l,editorId:d,className:p,labelClassName:u,editorValue:m,editorPlaceholder:b,editorValid:y,editorDisabled:f,style:g,id:N,optional:E,unstyled:h,...k}=e,O=s.useLocalization(),v=E?O.toLanguageString(n,i[n]):"",D=v&&r.createElement("span",{className:"k-label-optional"},v),R=h&&h.uFloatingLabel,L=!b&&!m&&0!==m,T=o.classNames(o.uFloatingLabel.wrapper({c:R,focused:t.focused,empty:L,notEmpty:!L,disabled:f,isRtl:"rtl"===e.dir}),p),j=o.classNames(o.uFloatingLabel.label({c:R,focused:t.focused,empty:L,notEmpty:!L,invalid:!1===y,disabled:f}),u);return r.createElement("span",{...k,id:e.id,className:T,onFocus:e=>{a({focused:!0})},onBlur:e=>{a({focused:!1})},style:g,dir:e.dir},e.children,l?d?r.createElement("label",{id:N,htmlFor:d,className:j},l,D):r.createElement("span",{id:N,className:j},l,D):null)};m.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=p,e.FloatingLabel=m,e.Hint=u,e.Label=d}));
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": "9.5.0",
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": "9.5.0",
30
- "@progress/kendo-react-intl": "9.5.0",
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",
@@ -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;
@@ -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
- };