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