@progress/kendo-react-labels 7.0.0-develop.10 → 7.0.0-develop.12

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.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-intl"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a.KendoReactLabels={},a.React,a.PropTypes,a.KendoReactCommon,a.KendoReactIntl))})(this,function(a,n,K,i,k){"use strict";function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const o=j(n),e=j(K),c="labels.optional",x={[c]:"(Optional)"},u={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},E=r=>{i.validatePackage(u);const{id:t,editorId:s,editorRef:l,editorDisabled:m,children:d,editorValid:D,style:P,className:b,optional:L}=r,f=k.useLocalization(),g=L?f.toLanguageString(c,x[c]):"",S=g&&o.createElement("span",{className:"k-label-optional"},g),h=o.useCallback(N=>{if(l&&l.current&&!m){l.current.focus&&(N.preventDefault(),l.current.focus());const p=l.current.actionElement;p&&(N.preventDefault(),p.click())}},[l]),y=i.classNames({"k-label":!0,"k-label-empty":!d,"k-text-error":D===!1,"k-text-disabled":m===!0},b);return o.createElement("label",{id:t,htmlFor:s,onClick:h,style:P,className:y},d,S)};E.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},E.displayName="KendoReactLabel";const O=r=>{const t={direction:"start",...r};i.validatePackage(u);const s=i.classNames({"k-form-error":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end"},t.className);return o.createElement("div",{id:t.id,role:"alert",style:t.style,className:s},t.children)};O.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string},O.displayName="KendoReactError";const T=r=>{const t={direction:"start",...r};i.validatePackage(u);const s=i.classNames({"k-form-hint":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end","k-text-disabled":t.editorDisabled===!0},t.className);return o.createElement("div",{id:t.id,style:t.style,className:s},t.children)};T.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string,editorDisabled:e.bool},T.displayName="KendoReactHint";class v 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})},i.validatePackage(u)}render(){const{label:t,editorId:s,className:l,labelClassName:m,editorValue:d,editorPlaceholder:D,editorValid:P,editorDisabled:b,style:L,id:f,optional:g}=this.props,S=k.provideLocalizationService(this),h=g?S.toLanguageString(c,x[c]):"",y=h&&o.createElement("span",{className:"k-label-optional"},h),N=i.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!D&&!d&&d!==0,"k-text-disabled":b,"k-rtl":this.props.dir==="rtl"},l),p=i.classNames({"k-label":!0,"k-text-error":P===!1,"k-text-disabled":b},m);return o.createElement("span",{id:this.props.id,className:N,onFocus:this.handleFocus,onBlur:this.handleBlur,style:L,dir:this.props.dir},this.props.children,t?s?o.createElement("label",{id:f,htmlFor:s,className:p},t,y):o.createElement("span",{id:f,className:p},t,y):null)}}v.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},k.registerForLocalization(v),a.Error=O,a.FloatingLabel=v,a.Hint=T,a.Label=E,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
5
+ (function(a,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("react"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-react-intl")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-common","@progress/kendo-react-intl"],n):(a=typeof globalThis<"u"?globalThis:a||self,n(a.KendoReactLabels={},a.React,a.PropTypes,a.KendoReactCommon,a.KendoReactIntl))})(this,function(a,n,K,i,k){"use strict";"use client";function j(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,l.get?l:{enumerable:!0,get:()=>r[s]})}}return t.default=r,Object.freeze(t)}const o=j(n),e=j(K),c="labels.optional",x={[c]:"(Optional)"},u={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},E=r=>{i.validatePackage(u);const{id:t,editorId:s,editorRef:l,editorDisabled:m,children:d,editorValid:D,style:P,className:b,optional:L}=r,f=k.useLocalization(),g=L?f.toLanguageString(c,x[c]):"",S=g&&o.createElement("span",{className:"k-label-optional"},g),h=o.useCallback(N=>{if(l&&l.current&&!m){l.current.focus&&(N.preventDefault(),l.current.focus());const p=l.current.actionElement;p&&(N.preventDefault(),p.click())}},[l]),y=i.classNames({"k-label":!0,"k-label-empty":!d,"k-text-error":D===!1,"k-text-disabled":m===!0},b);return o.createElement("label",{id:t,htmlFor:s,onClick:h,style:P,className:y},d,S)};E.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},E.displayName="KendoReactLabel";const O=r=>{const t={direction:"start",...r};i.validatePackage(u);const s=i.classNames({"k-form-error":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end"},t.className);return o.createElement("div",{id:t.id,role:"alert",style:t.style,className:s},t.children)};O.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string},O.displayName="KendoReactError";const T=r=>{const t={direction:"start",...r};i.validatePackage(u);const s=i.classNames({"k-form-hint":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end","k-text-disabled":t.editorDisabled===!0},t.className);return o.createElement("div",{id:t.id,style:t.style,className:s},t.children)};T.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string,editorDisabled:e.bool},T.displayName="KendoReactHint";class v 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})},i.validatePackage(u)}render(){const{label:t,editorId:s,className:l,labelClassName:m,editorValue:d,editorPlaceholder:D,editorValid:P,editorDisabled:b,style:L,id:f,optional:g}=this.props,S=k.provideLocalizationService(this),h=g?S.toLanguageString(c,x[c]):"",y=h&&o.createElement("span",{className:"k-label-optional"},h),N=i.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!D&&!d&&d!==0,"k-text-disabled":b,"k-rtl":this.props.dir==="rtl"},l),p=i.classNames({"k-label":!0,"k-text-error":P===!1,"k-text-disabled":b},m);return o.createElement("span",{id:this.props.id,className:N,onFocus:this.handleFocus,onBlur:this.handleBlur,style:L,dir:this.props.dir},this.props.children,t?s?o.createElement("label",{id:f,htmlFor:s,className:p},t,y):o.createElement("span",{id:f,className:p},t,y):null)}}v.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},k.registerForLocalization(v),a.Error=O,a.FloatingLabel=v,a.Hint=T,a.Label=E,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
package/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),R=require("prop-types"),r=require("@progress/kendo-react-common"),O=require("@progress/kendo-react-intl");function T(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>s[a]})}}return t.default=s,Object.freeze(t)}const l=T(x),e=T(R),c="labels.optional",L={[c]:"(Optional)"},k={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},v=s=>{r.validatePackage(k);const{id:t,editorId:a,editorRef:o,editorDisabled:d,children:n,editorValid:N,style:h,className:p,optional:y}=s,m=O.useLocalization(),u=y?m.toLanguageString(c,L[c]):"",E=u&&l.createElement("span",{className:"k-label-optional"},u),b=l.useCallback(f=>{if(o&&o.current&&!d){o.current.focus&&(f.preventDefault(),o.current.focus());const i=o.current.actionElement;i&&(f.preventDefault(),i.click())}},[o]),g=r.classNames({"k-label":!0,"k-label-empty":!n,"k-text-error":N===!1,"k-text-disabled":d===!0},p);return l.createElement("label",{id:t,htmlFor:a,onClick:b,style:h,className:g},n,E)};v.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};v.displayName="KendoReactLabel";const C=s=>{const t={direction:"start",...s};r.validatePackage(k);const a=r.classNames({"k-form-error":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end"},t.className);return l.createElement("div",{id:t.id,role:"alert",style:t.style,className:a},t.children)};C.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string};C.displayName="KendoReactError";const D=s=>{const t={direction:"start",...s};r.validatePackage(k);const a=r.classNames({"k-form-hint":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end","k-text-disabled":t.editorDisabled===!0},t.className);return l.createElement("div",{id:t.id,style:t.style,className:a},t.children)};D.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string,editorDisabled:e.bool};D.displayName="KendoReactHint";class P extends l.Component{constructor(t){super(t),this.state={focused:!1},this.handleFocus=a=>{this.setState({focused:!0})},this.handleBlur=a=>{this.setState({focused:!1})},r.validatePackage(k)}render(){const{label:t,editorId:a,className:o,labelClassName:d,editorValue:n,editorPlaceholder:N,editorValid:h,editorDisabled:p,style:y,id:m,optional:u}=this.props,E=O.provideLocalizationService(this),b=u?E.toLanguageString(c,L[c]):"",g=b&&l.createElement("span",{className:"k-label-optional"},b),f=r.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!N&&!n&&n!==0,"k-text-disabled":p,"k-rtl":this.props.dir==="rtl"},o),i=r.classNames({"k-label":!0,"k-text-error":h===!1,"k-text-disabled":p},d);return l.createElement("span",{id:this.props.id,className:f,onFocus:this.handleFocus,onBlur:this.handleBlur,style:y,dir:this.props.dir},this.props.children,t?a?l.createElement("label",{id:m,htmlFor:a,className:i},t,g):l.createElement("span",{id:m,className:i},t,g):null)}}P.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};O.registerForLocalization(P);exports.Error=C;exports.FloatingLabel=P;exports.Hint=D;exports.Label=v;
5
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),R=require("prop-types"),r=require("@progress/kendo-react-common"),O=require("@progress/kendo-react-intl");function T(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const a in s)if(a!=="default"){const o=Object.getOwnPropertyDescriptor(s,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:()=>s[a]})}}return t.default=s,Object.freeze(t)}const l=T(x),e=T(R),c="labels.optional",L={[c]:"(Optional)"},k={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},v=s=>{r.validatePackage(k);const{id:t,editorId:a,editorRef:o,editorDisabled:d,children:n,editorValid:N,style:h,className:p,optional:y}=s,m=O.useLocalization(),u=y?m.toLanguageString(c,L[c]):"",E=u&&l.createElement("span",{className:"k-label-optional"},u),b=l.useCallback(f=>{if(o&&o.current&&!d){o.current.focus&&(f.preventDefault(),o.current.focus());const i=o.current.actionElement;i&&(f.preventDefault(),i.click())}},[o]),g=r.classNames({"k-label":!0,"k-label-empty":!n,"k-text-error":N===!1,"k-text-disabled":d===!0},p);return l.createElement("label",{id:t,htmlFor:a,onClick:b,style:h,className:g},n,E)};v.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};v.displayName="KendoReactLabel";const C=s=>{const t={direction:"start",...s};r.validatePackage(k);const a=r.classNames({"k-form-error":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end"},t.className);return l.createElement("div",{id:t.id,role:"alert",style:t.style,className:a},t.children)};C.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string};C.displayName="KendoReactError";const D=s=>{const t={direction:"start",...s};r.validatePackage(k);const a=r.classNames({"k-form-hint":!0,"k-text-start":t.direction==="start","k-text-end":t.direction==="end","k-text-disabled":t.editorDisabled===!0},t.className);return l.createElement("div",{id:t.id,style:t.style,className:a},t.children)};D.propTypes={id:e.string,direction:e.oneOf(["start","end"]),children:e.oneOfType([e.element,e.node]),style:e.object,className:e.string,editorDisabled:e.bool};D.displayName="KendoReactHint";class P extends l.Component{constructor(t){super(t),this.state={focused:!1},this.handleFocus=a=>{this.setState({focused:!0})},this.handleBlur=a=>{this.setState({focused:!1})},r.validatePackage(k)}render(){const{label:t,editorId:a,className:o,labelClassName:d,editorValue:n,editorPlaceholder:N,editorValid:h,editorDisabled:p,style:y,id:m,optional:u}=this.props,E=O.provideLocalizationService(this),b=u?E.toLanguageString(c,L[c]):"",g=b&&l.createElement("span",{className:"k-label-optional"},b),f=r.classNames({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!N&&!n&&n!==0,"k-text-disabled":p,"k-rtl":this.props.dir==="rtl"},o),i=r.classNames({"k-label":!0,"k-text-error":h===!1,"k-text-disabled":p},d);return l.createElement("span",{id:this.props.id,className:f,onFocus:this.handleFocus,onBlur:this.handleBlur,style:y,dir:this.props.dir},this.props.children,t?a?l.createElement("label",{id:m,htmlFor:a,className:i},t,g):l.createElement("span",{id:m,className:i},t,g):null)}}P.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};O.registerForLocalization(P);exports.Error=C;exports.FloatingLabel=P;exports.Hint=D;exports.Label=v;
package/index.mjs CHANGED
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ "use client";
5
6
  import * as o from "react";
6
7
  import * as e from "prop-types";
7
8
  import { validatePackage as k, classNames as n } from "@progress/kendo-react-common";
@@ -12,7 +13,7 @@ const c = "labels.optional", O = {
12
13
  name: "@progress/kendo-react-labels",
13
14
  productName: "KendoReact",
14
15
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
15
- publishDate: 1701439196,
16
+ publishDate: 1701865883,
16
17
  version: "",
17
18
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
18
19
  }, x = (l) => {
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-labels",
3
- "version": "7.0.0-develop.10",
3
+ "version": "7.0.0-develop.12",
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",
7
7
  "homepage": "https://www.telerik.com/kendo-react-ui",
8
8
  "main": "./index.js",
9
+ "module": "./index.mjs",
9
10
  "types": "./index.d.ts",
10
11
  "exports": {
11
12
  ".": {
@@ -16,8 +17,8 @@
16
17
  "sideEffects": false,
17
18
  "peerDependencies": {
18
19
  "@progress/kendo-licensing": "^1.3.0",
19
- "@progress/kendo-react-common": "7.0.0-develop.10",
20
- "@progress/kendo-react-intl": "7.0.0-develop.10",
20
+ "@progress/kendo-react-common": "7.0.0-develop.12",
21
+ "@progress/kendo-react-intl": "7.0.0-develop.12",
21
22
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
22
23
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
23
24
  },