@progress/kendo-react-labels 9.0.0-develop.2 → 9.0.0-develop.20

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.mjs CHANGED
@@ -17,30 +17,21 @@ const a = (c) => {
17
17
  };
18
18
  n(p);
19
19
  const s = l(), t = s && s.uError, i = o.useMemo(
20
- () => d(m.wrapper({
21
- c: t,
22
- direction: e.direction
23
- }), e.className),
20
+ () => d(
21
+ m.wrapper({
22
+ c: t,
23
+ direction: e.direction
24
+ }),
25
+ e.className
26
+ ),
24
27
  [t, e.direction, e.className]
25
28
  );
26
- return /* @__PURE__ */ o.createElement(
27
- "div",
28
- {
29
- id: e.id,
30
- role: "alert",
31
- style: e.style,
32
- className: i
33
- },
34
- e.children
35
- );
29
+ return /* @__PURE__ */ o.createElement("div", { id: e.id, role: "alert", style: e.style, className: i }, e.children);
36
30
  };
37
31
  a.propTypes = {
38
32
  id: r.string,
39
33
  direction: r.oneOf(["start", "end"]),
40
- children: r.oneOfType([
41
- r.element,
42
- r.node
43
- ]),
34
+ children: r.oneOfType([r.element, r.node]),
44
35
  style: r.object,
45
36
  className: r.string
46
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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),e=require("prop-types"),l=require("@progress/kendo-react-common"),N=require("@progress/kendo-react-intl"),c=require("./messages/index.js"),q=require("./package-metadata.js");function L(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return t.default=a,Object.freeze(t)}const o=L(j),d=class d extends o.Component{constructor(t){super(t),this.state={focused:!1},this.handleFocus=s=>{this.setState({focused:!0})},this.handleBlur=s=>{this.setState({focused:!1})},l.validatePackage(q.packageMetadata)}render(){const{label:t,editorId:s,className:i,labelClassName:O,editorValue:u,editorPlaceholder:S,editorValid:k,editorDisabled:p,style:v,id:b,optional:C,unstyled:m,...E}=this.props,F=N.provideLocalizationService(this),g=C?F.toLanguageString(c.labelsOptional,c.messages[c.labelsOptional]):"",h=g&&o.createElement("span",{className:"k-label-optional"},g),f=m&&m.uFloatingLabel,n=!S&&!u&&u!==0,P=l.classNames(l.uFloatingLabel.wrapper({c:f,focused:this.state.focused,empty:n,notEmpty:!n,disabled:p,isRtl:this.props.dir==="rtl"}),i),y=l.classNames(l.uFloatingLabel.label({c:f,focused:this.state.focused,empty:n,notEmpty:!n,invalid:k===!1,disabled:p}),O);return o.createElement("span",{...E,id:this.props.id,className:P,onFocus:this.handleFocus,onBlur:this.handleBlur,style:v,dir:this.props.dir},this.props.children,t?s?o.createElement("label",{id:b,htmlFor:s,className:y},t,h):o.createElement("span",{id:b,className:y},t,h):null)}};d.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};let r=d;N.registerForLocalization(r);exports.FloatingLabel=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),e=require("prop-types"),s=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 o=z(R),O=t=>{s.validatePackage(_.packageMetadata);const[l,a]=o.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&&o.createElement("span",{className:"k-label-optional"},p),y=g&&g.uFloatingLabel,i=!h&&!u&&u!==0,C=s.classNames(s.uFloatingLabel.wrapper({c:y,focused:l.focused,empty:i,notEmpty:!i,disabled:b,isRtl:t.dir==="rtl"}),L),N=s.classNames(s.uFloatingLabel.label({c:y,focused:l.focused,empty:i,notEmpty:!i,invalid:k===!1,disabled:b}),S);return o.createElement("span",{...j,id:t.id,className:C,onFocus:n,onBlur:F,style:E,dir:t.dir},t.children,c?d?o.createElement("label",{id:m,htmlFor:d,className:N},c,f):o.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;
package/FloatingLabel.mjs CHANGED
@@ -6,62 +6,71 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
9
+ import * as l from "react";
10
10
  import e from "prop-types";
11
- import { validatePackage as P, classNames as b, uFloatingLabel as f } from "@progress/kendo-react-common";
12
- import { provideLocalizationService as V, registerForLocalization as k } from "@progress/kendo-react-intl";
13
- import { labelsOptional as g, messages as B } from "./messages/index.mjs";
14
- import { packageMetadata as O } from "./package-metadata.mjs";
15
- const i = class i extends t.Component {
16
- constructor(s) {
17
- super(s), this.state = {
18
- focused: !1
19
- }, this.handleFocus = (a) => {
20
- this.setState({ focused: !0 });
21
- }, this.handleBlur = (a) => {
22
- this.setState({ focused: !1 });
23
- }, P(O);
24
- }
25
- /**
26
- * @hidden
27
- */
28
- render() {
29
- const { label: s, editorId: a, className: N, labelClassName: y, editorValue: r, editorPlaceholder: E, editorValid: C, editorDisabled: n, style: v, id: c, optional: F, unstyled: d, ...S } = this.props, z = V(this), p = F ? z.toLanguageString(g, B[g]) : "", m = p && /* @__PURE__ */ t.createElement("span", { className: "k-label-optional" }, p), u = d && d.uFloatingLabel, o = !E && !r && r !== 0, L = b(f.wrapper(
30
- {
31
- c: u,
32
- focused: this.state.focused,
33
- empty: o,
34
- notEmpty: !o,
35
- disabled: n,
36
- isRtl: this.props.dir === "rtl"
37
- }
38
- ), N), h = b(f.label(
39
- {
40
- c: u,
41
- focused: this.state.focused,
42
- empty: o,
43
- notEmpty: !o,
44
- invalid: C === !1,
45
- disabled: n
46
- }
47
- ), y);
48
- return /* @__PURE__ */ t.createElement(
49
- "span",
50
- {
51
- ...S,
52
- id: this.props.id,
53
- className: L,
54
- onFocus: this.handleFocus,
55
- onBlur: this.handleBlur,
56
- style: v,
57
- dir: this.props.dir
58
- },
59
- this.props.children,
60
- s ? a ? /* @__PURE__ */ t.createElement("label", { id: c, htmlFor: a, className: h }, s, m) : /* @__PURE__ */ t.createElement("span", { id: c, className: h }, s, m) : null
61
- );
62
- }
11
+ import { validatePackage as T, classNames as g, uFloatingLabel as N } from "@progress/kendo-react-common";
12
+ import { useLocalization as B } from "@progress/kendo-react-intl";
13
+ import { labelsOptional as y, messages as D } from "./messages/index.mjs";
14
+ import { packageMetadata as I } from "./package-metadata.mjs";
15
+ const R = (a) => {
16
+ T(I);
17
+ const [s, i] = l.useState({
18
+ focused: !1
19
+ }), h = (O) => {
20
+ i({ focused: !0 });
21
+ }, E = (O) => {
22
+ i({ focused: !1 });
23
+ }, {
24
+ label: o,
25
+ editorId: n,
26
+ className: F,
27
+ labelClassName: L,
28
+ editorValue: r,
29
+ editorPlaceholder: C,
30
+ editorValid: P,
31
+ editorDisabled: c,
32
+ style: S,
33
+ id: d,
34
+ optional: V,
35
+ unstyled: m,
36
+ ...k
37
+ } = a, v = B(), u = V ? v.toLanguageString(y, D[y]) : "", b = u && /* @__PURE__ */ l.createElement("span", { className: "k-label-optional" }, u), p = m && m.uFloatingLabel, t = !C && !r && r !== 0, z = g(
38
+ N.wrapper({
39
+ c: p,
40
+ focused: s.focused,
41
+ empty: t,
42
+ notEmpty: !t,
43
+ disabled: c,
44
+ isRtl: a.dir === "rtl"
45
+ }),
46
+ F
47
+ ), f = g(
48
+ N.label({
49
+ c: p,
50
+ focused: s.focused,
51
+ empty: t,
52
+ notEmpty: !t,
53
+ invalid: P === !1,
54
+ disabled: c
55
+ }),
56
+ L
57
+ );
58
+ return /* @__PURE__ */ l.createElement(
59
+ "span",
60
+ {
61
+ ...k,
62
+ id: a.id,
63
+ className: z,
64
+ onFocus: h,
65
+ onBlur: E,
66
+ style: S,
67
+ dir: a.dir
68
+ },
69
+ a.children,
70
+ o ? n ? /* @__PURE__ */ l.createElement("label", { id: d, htmlFor: n, className: f }, o, b) : /* @__PURE__ */ l.createElement("span", { id: d, className: f }, o, b) : null
71
+ );
63
72
  };
64
- i.propTypes = {
73
+ R.propTypes = {
65
74
  label: e.string,
66
75
  editorId: e.string,
67
76
  editorValue: e.oneOfType([e.string, e.bool, e.number]),
@@ -74,8 +83,6 @@ i.propTypes = {
74
83
  labelClassName: e.string,
75
84
  optional: e.bool
76
85
  };
77
- let l = i;
78
- k(l);
79
86
  export {
80
- l as FloatingLabel
87
+ R as FloatingLabel
81
88
  };
package/Hint.mjs CHANGED
@@ -17,30 +17,22 @@ const o = (n) => {
17
17
  };
18
18
  d(p);
19
19
  const s = c(), i = s && s.uHint, r = a.useMemo(
20
- () => l(m.wrapper({
21
- c: i,
22
- direction: e.direction,
23
- disabled: e.editorDisabled === !0
24
- }), e.className),
20
+ () => l(
21
+ m.wrapper({
22
+ c: i,
23
+ direction: e.direction,
24
+ disabled: e.editorDisabled === !0
25
+ }),
26
+ e.className
27
+ ),
25
28
  [i, e.direction, e.editorDisabled, e.className]
26
29
  );
27
- return /* @__PURE__ */ a.createElement(
28
- "div",
29
- {
30
- id: e.id,
31
- style: e.style,
32
- className: r
33
- },
34
- e.children
35
- );
30
+ return /* @__PURE__ */ a.createElement("div", { id: e.id, style: e.style, className: r }, e.children);
36
31
  };
37
32
  o.propTypes = {
38
33
  id: t.string,
39
34
  direction: t.oneOf(["start", "end"]),
40
- children: t.oneOfType([
41
- t.element,
42
- t.node
43
- ]),
35
+ children: t.oneOfType([t.element, t.node]),
44
36
  style: t.object,
45
37
  className: t.string,
46
38
  editorDisabled: t.bool
package/Label.mjs CHANGED
@@ -24,34 +24,23 @@ const u = (b) => {
24
24
  },
25
25
  [t]
26
26
  ), C = a.useMemo(
27
- () => R(h.label({
28
- c,
29
- empty: !l,
30
- invalid: s === !1,
31
- disabled: o === !0
32
- }), i),
27
+ () => R(
28
+ h.label({
29
+ c,
30
+ empty: !l,
31
+ invalid: s === !1,
32
+ disabled: o === !0
33
+ }),
34
+ i
35
+ ),
33
36
  [c, l, s, o, i]
34
37
  );
35
- return /* @__PURE__ */ a.createElement(
36
- "label",
37
- {
38
- id: f,
39
- htmlFor: y,
40
- onClick: v,
41
- style: g,
42
- className: C
43
- },
44
- l,
45
- N
46
- );
38
+ return /* @__PURE__ */ a.createElement("label", { id: f, htmlFor: y, onClick: v, style: g, className: C }, l, N);
47
39
  };
48
40
  u.propTypes = {
49
41
  id: e.string,
50
42
  editorId: e.string,
51
- editorRef: e.oneOfType([
52
- e.func,
53
- e.shape({ current: e.any })
54
- ]),
43
+ editorRef: e.oneOfType([e.func, e.shape({ current: e.any })]),
55
44
  editorValid: e.bool,
56
45
  editorDisabled: e.bool,
57
46
  style: e.object,
package/README.md CHANGED
@@ -5,10 +5,11 @@
5
5
  # KendoReact Labels Library for React
6
6
 
7
7
  > **Important**
8
- > * This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)—a commercial UI library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
11
- > * The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
8
+ >
9
+ > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)—a commercial UI library.
10
+ > - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
11
+ > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
12
+ > - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
12
13
  >
13
14
  > [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) and speed up your development process!
14
15
 
@@ -16,12 +17,12 @@ The React Labels package, part of KendoReact, provides components for labelling
16
17
 
17
18
  What's in this package (ToC):
18
19
 
19
- * [React FloatingLabel component](#react-floatinglabel-component)
20
- * [React Label component](#react-label-component)
21
- * [React Hint component](#react-hint-component)
22
- * [React Error component](#react-error-component)
23
- * [Support Options](#support-options)
24
- * [Resources](#resources)
20
+ - [React FloatingLabel component](#react-floatinglabel-component)
21
+ - [React Label component](#react-label-component)
22
+ - [React Hint component](#react-hint-component)
23
+ - [React Error component](#react-error-component)
24
+ - [Support Options](#support-options)
25
+ - [Resources](#resources)
25
26
 
26
27
  ## React FloatingLabel Component
27
28
 
@@ -43,26 +44,26 @@ What's in this package (ToC):
43
44
 
44
45
  For any issues you might encounter while working with the KendoReact Internationalization, use any of the available support channels:
45
46
 
46
- * Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
47
- * Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) are part of the free support you can get from the community and from the KendoReact team.
48
- * Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) is where you can request and vote for new features to be added.
47
+ - Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels).
48
+ - Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) are part of the free support you can get from the community and from the KendoReact team.
49
+ - Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels) is where you can request and vote for new features to be added.
49
50
 
50
51
  ## Resources
51
52
 
52
- * [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
53
- * [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
54
- * [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
55
- * [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
56
- * [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
57
- * [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
53
+ - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
54
+ - [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
55
+ - [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
56
+ - [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
57
+ - [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
58
+ - [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-labels)
58
59
 
59
- *Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
60
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
60
61
 
61
62
  High-level component overview pages
62
63
 
63
- * [React Error Component](https://www.telerik.com/kendo-react-ui/error)
64
- * [React Floating Label Component](https://www.telerik.com/kendo-react-ui/floating-labels)
65
- * [React Hint Component](https://www.telerik.com/kendo-react-ui/hint)
66
- * [React Label Component](https://www.telerik.com/kendo-react-ui/labels)
64
+ - [React Error Component](https://www.telerik.com/kendo-react-ui/error)
65
+ - [React Floating Label Component](https://www.telerik.com/kendo-react-ui/floating-labels)
66
+ - [React Hint Component](https://www.telerik.com/kendo-react-ui/hint)
67
+ - [React Label Component](https://www.telerik.com/kendo-react-ui/labels)
67
68
 
68
- *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
69
+ _Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
@@ -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
- !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,s,a,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=r(t);const i="labels.optional",n={[i]:"(Optional)"},c={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},d=e=>{a.validatePackage(c);const{id:t,editorId:s,editorRef:r,editorDisabled:d,children:p,editorValid:u,style:m,className:b,optional:y}=e,f=o.useLocalization(),g=y?f.toLanguageString(i,n[i]):"",h=g&&l.createElement("span",{className:"k-label-optional"},g),N=a.useUnstyled(),E=N&&N.uLabel,k=l.useCallback((e=>{if(r&&r.current&&!d){r.current.focus&&(e.preventDefault(),r.current.focus());const t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),v=l.useMemo((()=>a.classNames(a.uLabel.label({c:E,empty:!p,invalid:!1===u,disabled:!0===d}),b)),[E,p,u,d,b]);return l.createElement("label",{id:t,htmlFor:s,onClick:k,style:m,className:v},p,h)};d.propTypes={id:s.string,editorId:s.string,editorRef:s.oneOfType([s.func,s.shape({current:s.any})]),editorValid:s.bool,editorDisabled:s.bool,style:s.object,className:s.string,optional:s.bool},d.displayName="KendoReactLabel";const p=e=>{const t={direction:"start",...e};a.validatePackage(c);const s=a.useUnstyled(),o=s&&s.uError,r=l.useMemo((()=>a.classNames(a.uError.wrapper({c:o,direction:t.direction}),t.className)),[o,t.direction,t.className]);return l.createElement("div",{id:t.id,role:"alert",style:t.style,className:r},t.children)};p.propTypes={id:s.string,direction:s.oneOf(["start","end"]),children:s.oneOfType([s.element,s.node]),style:s.object,className:s.string},p.displayName="KendoReactError";const u=e=>{const t={direction:"start",...e};a.validatePackage(c);const s=a.useUnstyled(),o=s&&s.uHint,r=l.useMemo((()=>a.classNames(a.uHint.wrapper({c:o,direction:t.direction,disabled:!0===t.editorDisabled}),t.className)),[o,t.direction,t.editorDisabled,t.className]);return l.createElement("div",{id:t.id,style:t.style,className:r},t.children)};u.propTypes={id:s.string,direction:s.oneOf(["start","end"]),children:s.oneOfType([s.element,s.node]),style:s.object,className:s.string,editorDisabled:s.bool},u.displayName="KendoReactHint";const m=class extends l.Component{constructor(e){super(e),this.state={focused:!1},this.handleFocus=e=>{this.setState({focused:!0})},this.handleBlur=e=>{this.setState({focused:!1})},a.validatePackage(c)}render(){const{label:e,editorId:t,className:s,labelClassName:r,editorValue:c,editorPlaceholder:d,editorValid:p,editorDisabled:u,style:m,id:b,optional:y,unstyled:f,...g}=this.props,h=o.provideLocalizationService(this),N=y?h.toLanguageString(i,n[i]):"",E=N&&l.createElement("span",{className:"k-label-optional"},N),k=f&&f.uFloatingLabel,v=!d&&!c&&0!==c,O=a.classNames(a.uFloatingLabel.wrapper({c:k,focused:this.state.focused,empty:v,notEmpty:!v,disabled:u,isRtl:"rtl"===this.props.dir}),s),L=a.classNames(a.uFloatingLabel.label({c:k,focused:this.state.focused,empty:v,notEmpty:!v,invalid:!1===p,disabled:u}),r);return l.createElement("span",{...g,id:this.props.id,className:O,onFocus:this.handleFocus,onBlur:this.handleBlur,style:m,dir:this.props.dir},this.props.children,e?t?l.createElement("label",{id:b,htmlFor:t,className:L},e,E):l.createElement("span",{id:b,className:L},e,E):null)}};m.propTypes={label:s.string,editorId:s.string,editorValue:s.oneOfType([s.string,s.bool,s.number]),editorPlaceholder:s.string,editorValid:s.bool,editorDisabled:s.bool,id:s.string,style:s.object,className:s.string,labelClassName:s.string,optional:s.bool};let b=m;o.registerForLocalization(b),e.Error=p,e.FloatingLabel=b,e.Hint=u,e.Label=d}));
8
+ !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",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,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),L=h&&h.uFloatingLabel,T=!b&&!m&&0!==m,R=o.classNames(o.uFloatingLabel.wrapper({c:L,focused:t.focused,empty:T,notEmpty:!T,disabled:f,isRtl:"rtl"===e.dir}),p),j=o.classNames(o.uFloatingLabel.label({c:L,focused:t.focused,empty:T,notEmpty:!T,invalid:!1===y,disabled:f}),u);return r.createElement("span",{...k,id:e.id,className:R,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}));
package/index.d.mts CHANGED
@@ -87,11 +87,9 @@ export declare interface ErrorProps {
87
87
  * ReactDOM.render(<App />, document.querySelector('my-app'));
88
88
  * ```
89
89
  */
90
- export declare class FloatingLabel extends React_2.Component<FloatingLabelProps, FloatingLabelState> {
91
- /**
92
- * @hidden
93
- */
94
- static propTypes: {
90
+ export declare const FloatingLabel: {
91
+ (props: FloatingLabelProps): JSX_2.Element;
92
+ propTypes: {
95
93
  label: PropTypes.Requireable<string>;
96
94
  editorId: PropTypes.Requireable<string>;
97
95
  editorValue: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
@@ -104,24 +102,7 @@ export declare class FloatingLabel extends React_2.Component<FloatingLabelProps,
104
102
  labelClassName: PropTypes.Requireable<string>;
105
103
  optional: PropTypes.Requireable<boolean>;
106
104
  };
107
- /**
108
- * @hidden
109
- */
110
- readonly state: FloatingLabelState;
111
- constructor(props: FloatingLabelProps);
112
- /**
113
- * @hidden
114
- */
115
- handleFocus: (_: React_2.SyntheticEvent<HTMLSpanElement>) => void;
116
- /**
117
- * @hidden
118
- */
119
- handleBlur: (_: React_2.SyntheticEvent<HTMLSpanElement>) => void;
120
- /**
121
- * @hidden
122
- */
123
- render(): JSX_2.Element;
124
- }
105
+ };
125
106
 
126
107
  /**
127
108
  * Represents the props of the KendoReact FloatingLabel component.
@@ -183,13 +164,6 @@ export declare interface FloatingLabelProps extends KendoReactComponentBaseProps
183
164
  unstyled?: LabelsClassStructure;
184
165
  }
185
166
 
186
- /**
187
- * @hidden
188
- */
189
- declare interface FloatingLabelState {
190
- focused?: boolean;
191
- }
192
-
193
167
  /**
194
168
  * Represents the KendoReact Hint component.
195
169
  * Render the hint text that will be shown underneath the form editor.
package/index.d.ts CHANGED
@@ -87,11 +87,9 @@ export declare interface ErrorProps {
87
87
  * ReactDOM.render(<App />, document.querySelector('my-app'));
88
88
  * ```
89
89
  */
90
- export declare class FloatingLabel extends React_2.Component<FloatingLabelProps, FloatingLabelState> {
91
- /**
92
- * @hidden
93
- */
94
- static propTypes: {
90
+ export declare const FloatingLabel: {
91
+ (props: FloatingLabelProps): JSX_2.Element;
92
+ propTypes: {
95
93
  label: PropTypes.Requireable<string>;
96
94
  editorId: PropTypes.Requireable<string>;
97
95
  editorValue: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
@@ -104,24 +102,7 @@ export declare class FloatingLabel extends React_2.Component<FloatingLabelProps,
104
102
  labelClassName: PropTypes.Requireable<string>;
105
103
  optional: PropTypes.Requireable<boolean>;
106
104
  };
107
- /**
108
- * @hidden
109
- */
110
- readonly state: FloatingLabelState;
111
- constructor(props: FloatingLabelProps);
112
- /**
113
- * @hidden
114
- */
115
- handleFocus: (_: React_2.SyntheticEvent<HTMLSpanElement>) => void;
116
- /**
117
- * @hidden
118
- */
119
- handleBlur: (_: React_2.SyntheticEvent<HTMLSpanElement>) => void;
120
- /**
121
- * @hidden
122
- */
123
- render(): JSX_2.Element;
124
- }
105
+ };
125
106
 
126
107
  /**
127
108
  * Represents the props of the KendoReact FloatingLabel component.
@@ -183,13 +164,6 @@ export declare interface FloatingLabelProps extends KendoReactComponentBaseProps
183
164
  unstyled?: LabelsClassStructure;
184
165
  }
185
166
 
186
- /**
187
- * @hidden
188
- */
189
- declare interface FloatingLabelState {
190
- focused?: boolean;
191
- }
192
-
193
167
  /**
194
168
  * Represents the KendoReact Hint component.
195
169
  * Render the hint text that will be shown underneath the form editor.
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-labels",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1729236195,
13
+ publishDate: 1731056585,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-labels",
3
- "version": "9.0.0-develop.2",
3
+ "version": "9.0.0-develop.20",
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",
@@ -23,8 +23,8 @@
23
23
  "sideEffects": false,
24
24
  "peerDependencies": {
25
25
  "@progress/kendo-licensing": "^1.3.4",
26
- "@progress/kendo-react-common": "9.0.0-develop.2",
27
- "@progress/kendo-react-intl": "9.0.0-develop.2",
26
+ "@progress/kendo-react-common": "9.0.0-develop.20",
27
+ "@progress/kendo-react-intl": "9.0.0-develop.20",
28
28
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
29
29
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
30
30
  },