@progress/kendo-react-labels 7.4.0 → 7.5.0-develop.2

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/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 q=require("react"),e=require("prop-types"),i=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),n=require("./messages/index.js"),v=require("./package-metadata.js");function C(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}return t.default=a,Object.freeze(t)}const l=C(q),c=class c extends l.Component{constructor(t){super(t),this.state={focused:!1},this.handleFocus=s=>{this.setState({focused:!0})},this.handleBlur=s=>{this.setState({focused:!1})},i.validatePackage(v.packageMetadata)}render(){const{label:t,editorId:s,className:o,labelClassName:f,editorValue:d,editorPlaceholder:k,editorValid:N,editorDisabled:u,style:y,id:p,optional:O,...S}=this.props,P=g.provideLocalizationService(this),m=O?P.toLanguageString(n.labelsOptional,n.messages[n.labelsOptional]):"",b=m&&l.createElement("span",{className:"k-label-optional"},m),j=i.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!k&&!d&&d!==0,"k-text-disabled":u,"k-rtl":this.props.dir==="rtl"},o),h=i.classNames({"k-label":!0,"k-text-error":N===!1,"k-text-disabled":u},f);return l.createElement("span",{...S,id:this.props.id,className:j,onFocus:this.handleFocus,onBlur:this.handleBlur,style:y,dir:this.props.dir},this.props.children,t?s?l.createElement("label",{id:p,htmlFor:s,className:h},t,b):l.createElement("span",{id:p,className:h},t,b):null)}};c.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=c;g.registerForLocalization(r);exports.FloatingLabel=r;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),e=require("prop-types"),i=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),n=require("./messages/index.js"),v=require("./package-metadata.js");function C(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>a[s]})}}return t.default=a,Object.freeze(t)}const l=C(q),c=class c extends l.Component{constructor(t){super(t),this.state={focused:!1},this.handleFocus=s=>{this.setState({focused:!0})},this.handleBlur=s=>{this.setState({focused:!1})},i.validatePackage(v.packageMetadata)}render(){const{label:t,editorId:s,className:o,labelClassName:f,editorValue:d,editorPlaceholder:k,editorValid:N,editorDisabled:u,style:y,id:p,optional:O,...S}=this.props,P=g.provideLocalizationService(this),m=O?P.toLanguageString(n.labelsOptional,n.messages[n.labelsOptional]):"",b=m&&l.createElement("span",{className:"k-label-optional"},m),j=i.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!k&&!d&&d!==0,"k-text-disabled":u,"k-rtl":this.props.dir==="rtl"},o),h=i.classNames({"k-floating-label":!0,"k-text-error":N===!1,"k-text-disabled":u},f);return l.createElement("span",{...S,id:this.props.id,className:j,onFocus:this.handleFocus,onBlur:this.handleBlur,style:y,dir:this.props.dir},this.props.children,t?s?l.createElement("label",{id:p,htmlFor:s,className:h},t,b):l.createElement("span",{id:p,className:h},t,b):null)}};c.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=c;g.registerForLocalization(r);exports.FloatingLabel=r;
package/FloatingLabel.mjs CHANGED
@@ -37,7 +37,7 @@ const l = class l extends s.Component {
37
37
  u
38
38
  ), p = m(
39
39
  {
40
- "k-label": !0,
40
+ "k-floating-label": !0,
41
41
  "k-text-error": g === !1,
42
42
  "k-text-disabled": i
43
43
  },
@@ -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,r,a){"use strict";function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var l=o(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=>{r.validatePackage(c);const{id:t,editorId:s,editorRef:o,editorDisabled:d,children:p,editorValid:m,style:u,className:b,optional:f}=e,g=a.useLocalization(),y=f?g.toLanguageString(i,n[i]):"",h=y&&l.createElement("span",{className:"k-label-optional"},y),k=l.useCallback((e=>{if(o&&o.current&&!d){o.current.focus&&(e.preventDefault(),o.current.focus());const t=o.current.actionElement;t&&(e.preventDefault(),t.click())}}),[o]),N=r.classNames({"k-label":!0,"k-label-empty":!p,"k-text-error":!1===m,"k-text-disabled":!0===d},b);return l.createElement("label",{id:t,htmlFor:s,onClick:k,style:u,className:N},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};r.validatePackage(c);const s=r.classNames({"k-form-error":!0,"k-text-start":"start"===t.direction,"k-text-end":"end"===t.direction},t.className);return l.createElement("div",{id:t.id,role:"alert",style:t.style,className:s},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 m=e=>{const t={direction:"start",...e};r.validatePackage(c);const s=r.classNames({"k-form-hint":!0,"k-text-start":"start"===t.direction,"k-text-end":"end"===t.direction,"k-text-disabled":!0===t.editorDisabled},t.className);return l.createElement("div",{id:t.id,style:t.style,className:s},t.children)};m.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},m.displayName="KendoReactHint";const u=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})},r.validatePackage(c)}render(){const{label:e,editorId:t,className:s,labelClassName:o,editorValue:c,editorPlaceholder:d,editorValid:p,editorDisabled:m,style:u,id:b,optional:f,...g}=this.props,y=a.provideLocalizationService(this),h=f?y.toLanguageString(i,n[i]):"",k=h&&l.createElement("span",{className:"k-label-optional"},h),N=r.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!d&&!c&&0!==c,"k-text-disabled":m,"k-rtl":"rtl"===this.props.dir},s),E=r.classNames({"k-label":!0,"k-text-error":!1===p,"k-text-disabled":m},o);return l.createElement("span",{...g,id:this.props.id,className:N,onFocus:this.handleFocus,onBlur:this.handleBlur,style:u,dir:this.props.dir},this.props.children,e?t?l.createElement("label",{id:b,htmlFor:t,className:E},e,k):l.createElement("span",{id:b,className:E},e,k):null)}};u.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=u;a.registerForLocalization(b),e.Error=p,e.FloatingLabel=b,e.Hint=m,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,s,a,r){"use strict";function o(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=o(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:o,editorDisabled:d,children:p,editorValid:m,style:u,className:b,optional:f}=e,g=r.useLocalization(),y=f?g.toLanguageString(i,n[i]):"",h=y&&l.createElement("span",{className:"k-label-optional"},y),k=l.useCallback((e=>{if(o&&o.current&&!d){o.current.focus&&(e.preventDefault(),o.current.focus());const t=o.current.actionElement;t&&(e.preventDefault(),t.click())}}),[o]),N=a.classNames({"k-label":!0,"k-label-empty":!p,"k-text-error":!1===m,"k-text-disabled":!0===d},b);return l.createElement("label",{id:t,htmlFor:s,onClick:k,style:u,className:N},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.classNames({"k-form-error":!0,"k-text-start":"start"===t.direction,"k-text-end":"end"===t.direction},t.className);return l.createElement("div",{id:t.id,role:"alert",style:t.style,className:s},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 m=e=>{const t={direction:"start",...e};a.validatePackage(c);const s=a.classNames({"k-form-hint":!0,"k-text-start":"start"===t.direction,"k-text-end":"end"===t.direction,"k-text-disabled":!0===t.editorDisabled},t.className);return l.createElement("div",{id:t.id,style:t.style,className:s},t.children)};m.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},m.displayName="KendoReactHint";const u=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:o,editorValue:c,editorPlaceholder:d,editorValid:p,editorDisabled:m,style:u,id:b,optional:f,...g}=this.props,y=r.provideLocalizationService(this),h=f?y.toLanguageString(i,n[i]):"",k=h&&l.createElement("span",{className:"k-label-optional"},h),N=a.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!d&&!c&&0!==c,"k-text-disabled":m,"k-rtl":"rtl"===this.props.dir},s),E=a.classNames({"k-floating-label":!0,"k-text-error":!1===p,"k-text-disabled":m},o);return l.createElement("span",{...g,id:this.props.id,className:N,onFocus:this.handleFocus,onBlur:this.handleBlur,style:u,dir:this.props.dir},this.props.children,e?t?l.createElement("label",{id:b,htmlFor:t,className:E},e,k):l.createElement("span",{id:b,className:E},e,k):null)}};u.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=u;r.registerForLocalization(b),e.Error=p,e.FloatingLabel=b,e.Hint=m,e.Label=d}));
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-labels",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1712846550,
13
+ publishDate: 1712928223,
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": "7.4.0",
3
+ "version": "7.5.0-develop.2",
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": "7.4.0",
27
- "@progress/kendo-react-intl": "7.4.0",
26
+ "@progress/kendo-react-common": "7.5.0-develop.2",
27
+ "@progress/kendo-react-intl": "7.5.0-develop.2",
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
  },