carbon-react 159.12.3 → 159.13.0
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/esm/__internal__/input/input-style-overrides.style.d.ts +1 -0
- package/esm/__internal__/input/input-style-overrides.style.js +1 -1
- package/esm/__internal__/input/input.style.js +1 -1
- package/esm/components/password/password.component.d.ts +7 -3
- package/esm/components/password/password.component.js +1 -1
- package/esm/components/password/password.style.d.ts +1 -3
- package/esm/components/password/password.style.js +1 -1
- package/esm/components/textbox/__internal__/__next__/text-input.component.d.ts +2 -2
- package/lib/__internal__/input/input-style-overrides.style.d.ts +1 -0
- package/lib/__internal__/input/input-style-overrides.style.js +1 -1
- package/lib/__internal__/input/input.style.js +1 -1
- package/lib/components/password/password.component.d.ts +7 -3
- package/lib/components/password/password.component.js +1 -1
- package/lib/components/password/password.style.d.ts +1 -3
- package/lib/components/password/password.style.js +1 -1
- package/lib/components/textbox/__internal__/__next__/text-input.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -6,3 +6,4 @@ export declare const searchStyleOverrides: import("styled-components").FlattenSi
|
|
|
6
6
|
export declare const selectStyleOverrides: ($size?: string, $isDisabled?: boolean, $isReadOnly?: boolean) => import("styled-components").FlattenSimpleInterpolation;
|
|
7
7
|
export declare const pagerStyleOverrides: import("styled-components").FlattenSimpleInterpolation;
|
|
8
8
|
export declare const numeralDateStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
9
|
+
export declare const passwordStyleOverrides: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css as t}from"styled-components";const
|
|
1
|
+
import{css as t}from"styled-components";import a from"../../style/utils/add-focus-styling.js";const o=t([".date &{.input-text-container input{padding:0 0 0 12px;margin-right:-12px;}}"]),n=t([".search &{height:40px;box-sizing:border-box;.input-text-container{flex-wrap:wrap;}input{width:30px;}}"]),r=t([".search:not(.with-button):not(.has-value) &:not(:focus-within){border-color:transparent;background:transparent;}"]),e=t([".search.with-button &{border-top-right-radius:0;border-bottom-right-radius:0;}"]),i=t([".search.dark-background &{input{::-moz-placeholder{color:var(--colorsUtilityYang080);opacity:1;}::placeholder{color:var(--colorsUtilityYang080);}}}"]),l=t([".search.dark-background:not(.with-button) &{input{color:var(--input-typical-inverse-txt-default);}}.search.dark-background.has-value:not(.with-button) &{.input-text-container,input{color:var(--colorsUtilityYang080);}.input-text-container:hover{input{color:var(--colorsUtilityYang100);}}}"]),p=t([".search.dark-background.with-button:not(.has-value) &{input{color:var(--colorsUtilityYang100);}}"]),s=t([".search.dark-background:not(.with-button) &{background-color:transparent;border-color:var(--colorsUtilityYang080);}"]),c=t([""," "," "," "," "," "," ",""],n,r,e,i,l,p,s),d=t(['[data-role="select-textbox"] &[data-is-transparent="false"]{.input-text-container{position:relative;.select-text:not(.disabled):not(.read-only){position:absolute;top:0;left:0;width:calc(100% - 48px);height:100%;padding:var(--global-space-none) var(--global-space-none) var(--global-space-none) var(--global-space-comp-m);cursor:pointer;}}}']),u=t([".multi-select &,.filterable-select &{.input-text-container:not(.disabled):not(.read-only){cursor:text;input{cursor:text;}}}"]),g=t(['[data-element="simple-select-input"] &{input{opacity:0;}input{cursor:pointer;}}']),b=(a,o,n)=>t([""," "," "," "," ",""],g,((a,o)=>t(['&[data-is-transparent="true"]{&&&{background:transparent;border:none;}'," input{text-align:right;position:absolute;padding:var(--global-space-none);&::placeholder{color:var(--colorsUtilityYin100);}}}"],!a&&!o&&t(["cursor:pointer;*{cursor:pointer;}"])))(o,n),d,u,(a=>t([".multi-select &{input{padding:var(--global-space-none);width:30px;}.input-text-container{"," "," ","}}"],"small"===a&&t(["padding:var(--global-space-none) var(--global-space-comp-2-xl) var(--global-space-none) var(--global-space-comp-s);"]),"medium"===a&&t(["padding:var(--global-space-none) 40px var(--global-space-none) var(--global-space-comp-m);"]),"large"===a&&t(["padding:var(--global-space-none) 48px var(--global-space-none) var(--global-space-comp-l);"])))(a)),h=t([".pager-navigation &{margin:4px 8px;height:26px;min-height:unset;.input-text-container{padding:0px;line-height:26px;min-height:24px;input{text-align:center;padding:0;}}}"]),x=t(["&&&{.pager-size-options &{min-height:unset;.input-text-container{width:64px;height:26px;min-height:26px;min-width:10px;margin:0px;.select-text:not(.disabled):not(.read-only){width:calc(100% - 28px);}}}}"]),v=t([""," ",""],h,x),m=t([".numeral-date-wrapper &{.input-text-container input{text-align:center;}}"]),w=t(['[data-component="password"] &{&:focus-within{box-shadow:none !important;-webkit-box-shadow:none !important;outline:none !important;}[data-role="input"]:focus{',' border-radius:var(--global-radius-action-m) var(--global-radius-none) var(--global-radius-none) var(--global-radius-action-m);z-index:1;}[data-role="input"]:focus ~ [data-role="password-divider"]{visibility:hidden;}& [data-component="button"]{border-radius:var(--global-radius-none) var(--global-radius-action-m) var(--global-radius-action-m) var(--global-radius-none);border-left:none;}}'],a());export{o as dateStyleOverrides,m as numeralDateStyles,v as pagerStyleOverrides,w as passwordStyleOverrides,c as searchStyleOverrides,b as selectStyleOverrides};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import a,{css as
|
|
1
|
+
import a,{css as e}from"styled-components";import t from"../../style/utils/add-focus-styling.js";import{dateStyleOverrides as l,searchStyleOverrides as o,selectStyleOverrides as r,pagerStyleOverrides as i,numeralDateStyles as n,passwordStyleOverrides as d}from"./input-style-overrides.style.js";const s=a.div.withConfig({displayName:"input.style__InputContainer",componentId:"sc-6ec36578-0"})([""," "," "," "," "," ",' &[data-is-open="true"]{z-index:var( --adaptiveSidebarModalBackdrop,var(--carbon-zindex-above-all) );&:focus-within:has(:focus:not(button)){z-index:var( --adaptiveSidebarModalBackdrop,var(--carbon-zindex-above-all) );}}',""],(({$align:a,$error:l,$isDisabled:o,$isReadOnly:r,$size:i})=>e(["display:flex;align-items:center;align-self:stretch;max-width:100%;border-radius:var(--global-radius-action-m);"," "," "," &&&{"," ","}"," "," .input-text-container{display:flex;flex-wrap:wrap;align-items:center;flex:1 0 0;max-width:100%;align-self:stretch;input{align-self:stretch;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;min-width:0;overflow:hidden;border:none;outline:none;background:transparent;text-overflow:ellipsis;text-align:",";"," "," "," "," "," ",'}[data-element="textbox-prefix"]{font-weight:500;margin-left:var(--global-space-comp-m);}}'],"small"===i&&e(["min-height:var(--global-size-s);"]),"medium"===i&&e(["min-height:var(--global-size-m);"]),"large"===i&&e(["min-height:var(--global-size-l);"]),r&&e(["cursor:default;*{cursor:default;}background:var(--input-typical-bg-read-only);border:var(--global-borderwidth-xs) solid var(--input-typical-border-read-only);&:focus-within:has(:focus:not(button)){"," z-index:2;}"],t()),o&&e(["cursor:not-allowed;background:var(--input-typical-bg-disabled);border:var(--global-borderwidth-xs) solid var(--input-typical-border-disabled);*{cursor:not-allowed;}"]),!o&&!r&&e(["cursor:text;&:focus-within:has(:focus:not(button)){"," z-index:2;}"],t()),!o&&!r&&e(["background:var(--input-typical-bg-default);border:",";"],l?"var(--global-borderwidth-s) solid var(--input-validation-border-error)":"var(--global-borderwidth-xs) solid var(--input-typical-border-default)"),a,r&&e(["color:var(--input-typical-txt-read-only);"]),o&&e(["color:var(--input-typical-txt-disabled);"]),!r&&!o&&e(["color:var(--input-typical-txt-default);"]),"small"===i&&e(["font:var(--global-font-static-comp-regular-s);padding:var(--global-space-none) var(--global-space-comp-s);"]),"medium"===i&&e(["font:var(--global-font-static-comp-regular-m);padding:var(--global-space-none) var(--global-space-comp-m);"]),"large"===i&&e(["font:var(--global-font-static-comp-regular-l);padding:var(--global-space-none) var(--global-space-comp-l);"]))),l,o,(({$size:a,$isDisabled:e,$isReadOnly:t})=>r(a,e,t)),i,n,d);export{s as default};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
export interface PasswordProps extends Omit<
|
|
2
|
+
import { TextInputProps } from "../textbox/__internal__/__next__";
|
|
3
|
+
export interface PasswordProps extends Omit<TextInputProps, "data-component"> {
|
|
4
4
|
/** When `true` input `type` is `password` and text is obscured. */
|
|
5
5
|
forceObscurity?: boolean;
|
|
6
|
+
/** @deprecated `characterLimit` has been deprecated and will be removed in a future release. */
|
|
7
|
+
characterLimit?: number;
|
|
8
|
+
/** @deprecated `prefix` has been deprecated and will be removed in a future release. */
|
|
9
|
+
prefix?: string;
|
|
6
10
|
}
|
|
7
|
-
export declare const Password: ({ id, disabled, forceObscurity, ...rest }: PasswordProps) => React.JSX.Element;
|
|
11
|
+
export declare const Password: ({ id, disabled, forceObscurity, inputIcon, size, ...rest }: PasswordProps) => React.JSX.Element;
|
|
8
12
|
export default Password;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useRef as o,useState as n}from"react";import
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useRef as o,useState as n}from"react";import i from"./password.style.js";import{Button as l}from"../button/__next__/button.component.js";import a from"../../__internal__/utils/helpers/guid/index.js";import s from"../../__internal__/utils/helpers/tags/tags.js";import c from"../../hooks/__internal__/useLocale/useLocale.js";import{Divider as p}from"../divider/divider.component.js";import{TextInput as d}from"../textbox/__internal__/__next__/text-input.component.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function b(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){u(e,r,t[r])}))}return e}const f=u=>{var f,m,v,y,O,j,w,_,{id:g,disabled:h,forceObscurity:P=!1,inputIcon:x,size:S}=u,L=function(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}(u,["id","disabled","forceObscurity","inputIcon","size"]);const k=o(g||a()),z=c(),[D,I]=n(!1),E=!P&&D;return e(r,{children:[t(d,(H=b({"data-element":"styled-password-container",id:k.current,autoComplete:"off",type:E?"text":"password",disabled:h,size:S},L,s("password",L)),C={inputIcon:e(r,{children:[t(p,{"aria-hidden":!0,"data-role":"password-divider",height:`calc(100% - var(--global-space-comp-${(null==S?void 0:S.charAt(0))||"m"}))`,p:0,type:"vertical"}),t(l,{"aria-label":E?null===(m=z.password)||void 0===m||null===(f=m.ariaLabelHide)||void 0===f?void 0:f.call(m):null===(y=z.password)||void 0===y||null===(v=y.ariaLabelShow)||void 0===v?void 0:v.call(y),"aria-controls":k.current,onClick:()=>I(!D),pr:1,variantType:"subtle",iconType:E?"hide":"view",iconPosition:"before",size:S,disabled:P||h,children:E?null===(j=z.password)||void 0===j||null===(O=j.buttonLabelHide)||void 0===O?void 0:O.call(j):null===(_=z.password)||void 0===_||null===(w=_.buttonLabelShow)||void 0===w?void 0:w.call(_)})]})},C=null!=C?C:{},Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(C)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(C)).forEach((function(e){Object.defineProperty(H,e,Object.getOwnPropertyDescriptor(C,e))})),H)),t(i,{role:"status","aria-live":"polite",children:E?z.password.ariaLiveShownMessage():z.password.ariaLiveHiddenMessage()})]});var H,C};export{f as Password,f as default};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { PasswordProps } from "./password.component";
|
|
2
|
-
declare const StyledPassword: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../textbox").TextboxProps & import("react").RefAttributes<HTMLInputElement>>, any, PasswordProps, never>;
|
|
3
1
|
declare const HiddenAriaLive: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
4
|
-
export
|
|
2
|
+
export default HiddenAriaLive;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from"styled-components";import o from"../../style/utils/visually-hidden.js";const t=s.p.withConfig({displayName:"password.style__HiddenAriaLive",componentId:"sc-213d9b67-0"})(["",""],o);export{t as default};
|
|
@@ -44,8 +44,8 @@ export interface TextInputProps extends Omit<ValidationProps, "info">, MarginPro
|
|
|
44
44
|
* The label's htmlFor attribute will be set to match the input's id to ensure they are properly associated.
|
|
45
45
|
*/
|
|
46
46
|
id?: string;
|
|
47
|
-
/** A hint
|
|
48
|
-
inputHint?:
|
|
47
|
+
/** A hint element rendered before the input but after the label. Intended to describe the purpose or content of the input */
|
|
48
|
+
inputHint?: React.ReactNode;
|
|
49
49
|
/**
|
|
50
50
|
* @internal @private @ignore
|
|
51
51
|
* An Icon to be rendered next to the input
|
|
@@ -6,3 +6,4 @@ export declare const searchStyleOverrides: import("styled-components").FlattenSi
|
|
|
6
6
|
export declare const selectStyleOverrides: ($size?: string, $isDisabled?: boolean, $isReadOnly?: boolean) => import("styled-components").FlattenSimpleInterpolation;
|
|
7
7
|
export declare const pagerStyleOverrides: import("styled-components").FlattenSimpleInterpolation;
|
|
8
8
|
export declare const numeralDateStyles: import("styled-components").FlattenSimpleInterpolation;
|
|
9
|
+
export declare const passwordStyleOverrides: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("styled-components");const e=t.css([".date &{.input-text-container input{padding:0 0 0 12px;margin-right:-12px;}}"]),
|
|
1
|
+
"use strict";var t=require("styled-components"),a=require("../../style/utils/add-focus-styling.js");const e=t.css([".date &{.input-text-container input{padding:0 0 0 12px;margin-right:-12px;}}"]),o=t.css([".search &{height:40px;box-sizing:border-box;.input-text-container{flex-wrap:wrap;}input{width:30px;}}"]),r=t.css([".search:not(.with-button):not(.has-value) &:not(:focus-within){border-color:transparent;background:transparent;}"]),n=t.css([".search.with-button &{border-top-right-radius:0;border-bottom-right-radius:0;}"]),i=t.css([".search.dark-background &{input{::-moz-placeholder{color:var(--colorsUtilityYang080);opacity:1;}::placeholder{color:var(--colorsUtilityYang080);}}}"]),s=t.css([".search.dark-background:not(.with-button) &{input{color:var(--input-typical-inverse-txt-default);}}.search.dark-background.has-value:not(.with-button) &{.input-text-container,input{color:var(--colorsUtilityYang080);}.input-text-container:hover{input{color:var(--colorsUtilityYang100);}}}"]),l=t.css([".search.dark-background.with-button:not(.has-value) &{input{color:var(--colorsUtilityYang100);}}"]),c=t.css([".search.dark-background:not(.with-button) &{background-color:transparent;border-color:var(--colorsUtilityYang080);}"]),p=t.css([""," "," "," "," "," "," ",""],o,r,n,i,s,l,c),d=t.css(['[data-role="select-textbox"] &[data-is-transparent="false"]{.input-text-container{position:relative;.select-text:not(.disabled):not(.read-only){position:absolute;top:0;left:0;width:calc(100% - 48px);height:100%;padding:var(--global-space-none) var(--global-space-none) var(--global-space-none) var(--global-space-comp-m);cursor:pointer;}}}']),u=t.css([".multi-select &,.filterable-select &{.input-text-container:not(.disabled):not(.read-only){cursor:text;input{cursor:text;}}}"]),g=t.css(['[data-element="simple-select-input"] &{input{opacity:0;}input{cursor:pointer;}}']),b=t.css([".pager-navigation &{margin:4px 8px;height:26px;min-height:unset;.input-text-container{padding:0px;line-height:26px;min-height:24px;input{text-align:center;padding:0;}}}"]),h=t.css(["&&&{.pager-size-options &{min-height:unset;.input-text-container{width:64px;height:26px;min-height:26px;min-width:10px;margin:0px;.select-text:not(.disabled):not(.read-only){width:calc(100% - 28px);}}}}"]),x=t.css([""," ",""],b,h),v=t.css([".numeral-date-wrapper &{.input-text-container input{text-align:center;}}"]),m=t.css(['[data-component="password"] &{&:focus-within{box-shadow:none !important;-webkit-box-shadow:none !important;outline:none !important;}[data-role="input"]:focus{',' border-radius:var(--global-radius-action-m) var(--global-radius-none) var(--global-radius-none) var(--global-radius-action-m);z-index:1;}[data-role="input"]:focus ~ [data-role="password-divider"]{visibility:hidden;}& [data-component="button"]{border-radius:var(--global-radius-none) var(--global-radius-action-m) var(--global-radius-action-m) var(--global-radius-none);border-left:none;}}'],a.default());exports.dateStyleOverrides=e,exports.numeralDateStyles=v,exports.pagerStyleOverrides=x,exports.passwordStyleOverrides=m,exports.searchStyleOverrides=p,exports.selectStyleOverrides=(a,e,o)=>t.css([""," "," "," "," ",""],g,((a,e)=>t.css(['&[data-is-transparent="true"]{&&&{background:transparent;border:none;}'," input{text-align:right;position:absolute;padding:var(--global-space-none);&::placeholder{color:var(--colorsUtilityYin100);}}}"],!a&&!e&&t.css(["cursor:pointer;*{cursor:pointer;}"])))(e,o),d,u,(a=>t.css([".multi-select &{input{padding:var(--global-space-none);width:30px;}.input-text-container{"," "," ","}}"],"small"===a&&t.css(["padding:var(--global-space-none) var(--global-space-comp-2-xl) var(--global-space-none) var(--global-space-comp-s);"]),"medium"===a&&t.css(["padding:var(--global-space-none) 40px var(--global-space-none) var(--global-space-comp-m);"]),"large"===a&&t.css(["padding:var(--global-space-none) 48px var(--global-space-none) var(--global-space-comp-l);"])))(a));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),a=require("../../style/utils/add-focus-styling.js"),r=require("./input-style-overrides.style.js");function t(e){return e&&e.__esModule?e:{default:e}}const l=t(e).default.div.withConfig({displayName:"input.style__InputContainer",componentId:"sc-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),a=require("../../style/utils/add-focus-styling.js"),r=require("./input-style-overrides.style.js");function t(e){return e&&e.__esModule?e:{default:e}}const l=t(e).default.div.withConfig({displayName:"input.style__InputContainer",componentId:"sc-6ec36578-0"})([""," "," "," "," "," ",' &[data-is-open="true"]{z-index:var( --adaptiveSidebarModalBackdrop,var(--carbon-zindex-above-all) );&:focus-within:has(:focus:not(button)){z-index:var( --adaptiveSidebarModalBackdrop,var(--carbon-zindex-above-all) );}}',""],(({$align:r,$error:t,$isDisabled:l,$isReadOnly:i,$size:o})=>e.css(["display:flex;align-items:center;align-self:stretch;max-width:100%;border-radius:var(--global-radius-action-m);"," "," "," &&&{"," ","}"," "," .input-text-container{display:flex;flex-wrap:wrap;align-items:center;flex:1 0 0;max-width:100%;align-self:stretch;input{align-self:stretch;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;flex:1 0 0;min-width:0;overflow:hidden;border:none;outline:none;background:transparent;text-overflow:ellipsis;text-align:",";"," "," "," "," "," ",'}[data-element="textbox-prefix"]{font-weight:500;margin-left:var(--global-space-comp-m);}}'],"small"===o&&e.css(["min-height:var(--global-size-s);"]),"medium"===o&&e.css(["min-height:var(--global-size-m);"]),"large"===o&&e.css(["min-height:var(--global-size-l);"]),i&&e.css(["cursor:default;*{cursor:default;}background:var(--input-typical-bg-read-only);border:var(--global-borderwidth-xs) solid var(--input-typical-border-read-only);&:focus-within:has(:focus:not(button)){"," z-index:2;}"],a.default()),l&&e.css(["cursor:not-allowed;background:var(--input-typical-bg-disabled);border:var(--global-borderwidth-xs) solid var(--input-typical-border-disabled);*{cursor:not-allowed;}"]),!l&&!i&&e.css(["cursor:text;&:focus-within:has(:focus:not(button)){"," z-index:2;}"],a.default()),!l&&!i&&e.css(["background:var(--input-typical-bg-default);border:",";"],t?"var(--global-borderwidth-s) solid var(--input-validation-border-error)":"var(--global-borderwidth-xs) solid var(--input-typical-border-default)"),r,i&&e.css(["color:var(--input-typical-txt-read-only);"]),l&&e.css(["color:var(--input-typical-txt-disabled);"]),!i&&!l&&e.css(["color:var(--input-typical-txt-default);"]),"small"===o&&e.css(["font:var(--global-font-static-comp-regular-s);padding:var(--global-space-none) var(--global-space-comp-s);"]),"medium"===o&&e.css(["font:var(--global-font-static-comp-regular-m);padding:var(--global-space-none) var(--global-space-comp-m);"]),"large"===o&&e.css(["font:var(--global-font-static-comp-regular-l);padding:var(--global-space-none) var(--global-space-comp-l);"]))),r.dateStyleOverrides,r.searchStyleOverrides,(({$size:e,$isDisabled:a,$isReadOnly:t})=>r.selectStyleOverrides(e,a,t)),r.pagerStyleOverrides,r.numeralDateStyles,r.passwordStyleOverrides);exports.default=l;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
export interface PasswordProps extends Omit<
|
|
2
|
+
import { TextInputProps } from "../textbox/__internal__/__next__";
|
|
3
|
+
export interface PasswordProps extends Omit<TextInputProps, "data-component"> {
|
|
4
4
|
/** When `true` input `type` is `password` and text is obscured. */
|
|
5
5
|
forceObscurity?: boolean;
|
|
6
|
+
/** @deprecated `characterLimit` has been deprecated and will be removed in a future release. */
|
|
7
|
+
characterLimit?: number;
|
|
8
|
+
/** @deprecated `prefix` has been deprecated and will be removed in a future release. */
|
|
9
|
+
prefix?: string;
|
|
6
10
|
}
|
|
7
|
-
export declare const Password: ({ id, disabled, forceObscurity, ...rest }: PasswordProps) => React.JSX.Element;
|
|
11
|
+
export declare const Password: ({ id, disabled, forceObscurity, inputIcon, size, ...rest }: PasswordProps) => React.JSX.Element;
|
|
8
12
|
export default Password;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("./password.style.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("./password.style.js"),n=require("../button/__next__/button.component.js"),i=require("../../__internal__/utils/helpers/guid/index.js"),o=require("../../__internal__/utils/helpers/tags/tags.js"),l=require("../../hooks/__internal__/useLocale/useLocale.js"),s=require("../divider/divider.component.js"),a=require("../textbox/__internal__/__next__/text-input.component.js");function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){u(e,r,t[r])}))}return e}const d=u=>{var d,p,b,f,v,y,j,O,{id:w,disabled:_,forceObscurity:g=!1,inputIcon:h,size:x}=u,m=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(u,["id","disabled","forceObscurity","inputIcon","size"]);const P=r.useRef(w||i.default()),S=l.default(),[q,L]=r.useState(!1),k=!g&&q;return e.jsxs(e.Fragment,{children:[e.jsx(a.TextInput,(D=c({"data-element":"styled-password-container",id:P.current,autoComplete:"off",type:k?"text":"password",disabled:_,size:x},m,o.default("password",m)),I={inputIcon:e.jsxs(e.Fragment,{children:[e.jsx(s.Divider,{"aria-hidden":!0,"data-role":"password-divider",height:`calc(100% - var(--global-space-comp-${(null==x?void 0:x.charAt(0))||"m"}))`,p:0,type:"vertical"}),e.jsx(n.Button,{"aria-label":k?null===(p=S.password)||void 0===p||null===(d=p.ariaLabelHide)||void 0===d?void 0:d.call(p):null===(f=S.password)||void 0===f||null===(b=f.ariaLabelShow)||void 0===b?void 0:b.call(f),"aria-controls":P.current,onClick:()=>L(!q),pr:1,variantType:"subtle",iconType:k?"hide":"view",iconPosition:"before",size:x,disabled:g||_,children:k?null===(y=S.password)||void 0===y||null===(v=y.buttonLabelHide)||void 0===v?void 0:v.call(y):null===(O=S.password)||void 0===O||null===(j=O.buttonLabelShow)||void 0===j?void 0:j.call(O)})]})},I=null!=I?I:{},Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(I)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(I)).forEach((function(e){Object.defineProperty(D,e,Object.getOwnPropertyDescriptor(I,e))})),D)),e.jsx(t.default,{role:"status","aria-live":"polite",children:k?S.password.ariaLiveShownMessage():S.password.ariaLiveHiddenMessage()})]});var D,I};exports.Password=d,exports.default=d;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import { PasswordProps } from "./password.component";
|
|
2
|
-
declare const StyledPassword: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../textbox").TextboxProps & import("react").RefAttributes<HTMLInputElement>>, any, PasswordProps, never>;
|
|
3
1
|
declare const HiddenAriaLive: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
4
|
-
export
|
|
2
|
+
export default HiddenAriaLive;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("styled-components"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../style/utils/visually-hidden.js");function s(e){return e&&e.__esModule?e:{default:e}}const d=s(e).default.p.withConfig({displayName:"password.style__HiddenAriaLive",componentId:"sc-213d9b67-0"})(["",""],t.default);exports.default=d;
|
|
@@ -44,8 +44,8 @@ export interface TextInputProps extends Omit<ValidationProps, "info">, MarginPro
|
|
|
44
44
|
* The label's htmlFor attribute will be set to match the input's id to ensure they are properly associated.
|
|
45
45
|
*/
|
|
46
46
|
id?: string;
|
|
47
|
-
/** A hint
|
|
48
|
-
inputHint?:
|
|
47
|
+
/** A hint element rendered before the input but after the label. Intended to describe the purpose or content of the input */
|
|
48
|
+
inputHint?: React.ReactNode;
|
|
49
49
|
/**
|
|
50
50
|
* @internal @private @ignore
|
|
51
51
|
* An Icon to be rendered next to the input
|