carbon-react 155.12.1 → 155.14.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/components/badge/badge.component.d.ts +15 -8
- package/esm/components/badge/badge.component.js +1 -1
- package/esm/components/badge/badge.style.d.ts +6 -5
- package/esm/components/badge/badge.style.js +1 -1
- package/esm/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/esm/components/icon/fonts/carbon-icons-webfont.woff2 +0 -0
- package/esm/components/icon/icon-config.js +1 -1
- package/esm/components/icon/icon-type.d.ts +1 -1
- package/esm/components/icon/icon-unicodes.d.ts +6 -1
- package/esm/components/icon/icon-unicodes.js +1 -1
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +1 -1
- package/esm/style/assets/carbon-icons-webfont.woff +0 -0
- package/esm/style/assets/carbon-icons-webfont.woff2 +0 -0
- package/lib/components/badge/badge.component.d.ts +15 -8
- package/lib/components/badge/badge.component.js +1 -1
- package/lib/components/badge/badge.style.d.ts +6 -5
- package/lib/components/badge/badge.style.js +1 -1
- package/lib/components/icon/fonts/carbon-icons-webfont.woff +0 -0
- package/lib/components/icon/fonts/carbon-icons-webfont.woff2 +0 -0
- package/lib/components/icon/icon-config.js +1 -1
- package/lib/components/icon/icon-type.d.ts +1 -1
- package/lib/components/icon/icon-unicodes.d.ts +6 -1
- package/lib/components/icon/icon-unicodes.js +1 -1
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -1
- package/lib/style/assets/carbon-icons-webfont.woff +0 -0
- package/lib/style/assets/carbon-icons-webfont.woff2 +0 -0
- package/package.json +1 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
|
+
export interface BadgeProps extends TagProps, MarginProps {
|
|
5
|
+
/** @deprecated Prop to specify an aria-label for the component */
|
|
5
6
|
"aria-label"?: string;
|
|
6
|
-
/** The badge will be
|
|
7
|
-
children
|
|
7
|
+
/** The badge will be positioned relative to this element */
|
|
8
|
+
children?: React.ReactNode;
|
|
8
9
|
/** The number rendered in the badge component */
|
|
9
10
|
counter?: string | number;
|
|
10
|
-
/** Prop to specify the color of the component */
|
|
11
|
+
/** @deprecated Prop to specify the color of the component */
|
|
11
12
|
color?: string;
|
|
12
|
-
/** Callback fired when badge is clicked */
|
|
13
|
+
/** @deprecated Callback fired when badge is clicked */
|
|
13
14
|
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
14
15
|
/** Unique identifier for the component. */
|
|
15
16
|
id?: string;
|
|
17
|
+
/** Size of the badge */
|
|
18
|
+
size?: "small" | "medium" | "large";
|
|
19
|
+
/** Badge variant */
|
|
20
|
+
variant?: "typical" | "subtle";
|
|
21
|
+
/** Set the style of the Badge to inverse */
|
|
22
|
+
inverse?: boolean;
|
|
16
23
|
}
|
|
17
|
-
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, id,
|
|
24
|
+
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, id, size, variant, inverse, ...rest }: BadgeProps) => React.JSX.Element | null;
|
|
18
25
|
export default Badge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useRef as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useRef as n}from"react";import"../../style/utils/filter-styled-system-padding-props.js";import o from"../../style/utils/filter-styled-system-margin-props.js";import{StyledBadgeWrapper as i,StyledBadge as l,StyledCounter as a}from"./badge.style.js";import s from"../icon/icon.component.js";import c from"../../__internal__/utils/helpers/tags/tags.js";import p from"../../__internal__/utils/helpers/guid/index.js";import d from"../../__internal__/utils/logger/index.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}let b=!1,m=!1,f=!1;const y=y=>{var{"aria-label":g,children:O,counter:j=0,color:h,onClick:v,id:w,size:P="medium",variant:_="typical",inverse:k=!1}=y,x=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(y,["aria-label","children","counter","color","onClick","id","size","variant","inverse"]);v&&!b&&(d.deprecate("The `onClick` prop in `Badge` is deprecated and will soon be removed."),b=!0),g&&!m&&(d.deprecate("The `aria-label` prop in `Badge` is deprecated and will soon be removed."),m=!0),h&&!f&&(d.deprecate("The `color` prop in `Badge` is deprecated and will soon be removed."),f=!0);const[C,S]=t(!1),[B,D]=t(!1),{current:E}=n(w||p());let T=!0;const z=v&&"small"!==P,M=z&&(C||B);let F=j;"string"==typeof j?(j.length>4&&(F=j.substring(0,4)),""===j&&(T=!1)):"number"==typeof j&&(j>999&&(F="999+"),(j<=0||j%1!=0)&&(T=!1));const I=()=>{return T?r(l,(e=function(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}({customColor:h,id:E,"aria-label":g,size:P,variant:_,inverse:k,hasChildren:!!O,onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},onMouseEnter:()=>{D(!0)},onMouseLeave:()=>{D(!1)}},z&&{buttonType:"secondary",onClick:v},c("badge",x),o(x)),t=null!=(t={children:M?r(s,{"data-role":"badge-cross-icon","data-element":"badge-cross-icon",type:"cross",color:"white"}):"small"!==P?r(a,{"data-element":"badge-counter",children:F}):null})?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e)):null;var e,t};return O?e(i,{"data-role":"badge-wrapper",children:[O,I()]}):I()};export{y as Badge,y as default};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
declare const StyledBadgeWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
declare const StyledCounter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
interface StyledBadgeProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
customColor?: string;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
variant?: "typical" | "subtle";
|
|
7
|
+
inverse?: boolean;
|
|
8
|
+
hasChildren?: boolean;
|
|
7
9
|
}
|
|
8
10
|
declare const StyledBadge: import("styled-components").StyledComponent<"span", any, {
|
|
9
11
|
theme: object;
|
|
10
12
|
} & {
|
|
11
13
|
as: import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>> | undefined;
|
|
12
14
|
} & StyledBadgeProps, "theme" | "as">;
|
|
13
|
-
|
|
14
|
-
export { StyledBadge, StyledBadgeWrapper, StyledCrossIcon, StyledCounter };
|
|
15
|
+
export { StyledBadge, StyledBadgeWrapper, StyledCounter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o,{css as t}from"styled-components";import{margin as r}from"styled-system";import i from"../icon/icon.style.js";import e from"../button/button.component.js";import n from"../../style/themes/apply-base-theme.js";import{toColor as l}from"../../style/utils/color.js";const s=(o,t)=>"subtle"===o?`\n ${t?"#007ED9":"#0060A7"};\n `:`\n ${t?"#E13E53":"#CD384B"};\n `,a=o.div.withConfig({displayName:"badge.style__StyledBadgeWrapper",componentId:"sc-62fb7324-0"})([""," position:relative;display:inline-block;"],r),p=o.div.withConfig({displayName:"badge.style__StyledCounter",componentId:"sc-62fb7324-1"})(["font-weight:500;font-size:13px;line-height:150%;"]),c=o.span.attrs(n).attrs((({onClick:o})=>({as:o?e:void 0}))).withConfig({displayName:"badge.style__StyledBadge",componentId:"sc-62fb7324-2"})([""," box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;border:solid 2px;",""],r,(({size:o,variant:r,inverse:e,hasChildren:n,customColor:a,theme:p,onClick:c})=>t(["",";background-color:",";border-color:",";color:",";"," "," ",""],(o=>{switch(o){case"small":return t(["width:12px;height:12px;"]);case"large":return t(["min-width:28px;height:28px;padding:0px 4px 1px;"]);default:return t(["min-width:24px;height:24px;padding:0px 2px 1px;"])}})(o),s(r,e),e?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)",e?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)",n&&t(["position:absolute;z-index:2;",";"],(o=>{switch(o){case"small":return t(["top:-3px;right:-2px;"]);case"large":return t(["top:-14px;right:-8px;"]);default:return t(["top:-12px;right:-8px;"])}})(o)),c&&t(["min-height:0;:hover,:focus{padding:0;border-color:",";background-color:",";","{margin:0;color:",";}}"],s(r,e),s(r,e),i,e?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)"),a&&t(["background-color:var(--colorsUtilityYang100);border-color:",";color:",";",""],l(p,a),l(p,a),c&&t([":hover,:focus{background-color:",";border-color:",";}"],l(p,a),l(p,a))))));export{c as StyledBadge,a as StyledBadgeWrapper,p as StyledCounter};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={backgroundSize:{"extra-small":"16px",small:"24px",medium:"32px",large:"40px","extra-large":"56px"},backgroundShape:{square:"0%","rounded-rect":"20%",circle:"50%"},iconSize:{small:"var(--sizing250)",medium:"var(--sizing300)",large:"var(--sizing400)","extra-large":"var(--sizing600)"}},r=["bottom","left","right","top"],a=["circle","rounded-rect","square"],t=["small","medium","large","extra-large"],i=["small","medium","large","extra-large"],l=["accessibility_web","add","admin","airplay","alert","alert_on","analysis","app_facebook","app_instagram","app_tiktok","app_twitter","app_youtube","apps","arrow","arrow_bottom_right_circle","arrow_down","arrow_left","arrow_left_boxed","arrow_left_right_small","arrow_left_small","arrow_right","arrow_right_small","arrow_top_left_circle","arrow_up","arrows_left_right","attach","bank","bank_with_card","basket","basket_with_squares","batch","bed","bill_paid","bill_unpaid","bin","biometric","blocked","blocked_square","block_arrow_right","bold","box_arrow_left","box_arrow_right","boxed_shapes","bulk_destroy","bullet_list","bullet_list_dotted","bullet_list_numbers","business","calendar","calendar_today","call","calendar_pay_date","camera","car_lock","car_money","car_repair","card_view","card_wallet","caret_down","caret_left","caret_right","caret_up","caret_large_down","caret_large_left","caret_large_right","caret_large_up","cart","cash","chat","chart_bar","chart_line","chart_pie","chat_notes","check_all","check_none","chevron_down","chevron_left","chevron_right","chevron_up","chevron_down_thick","chevron_left_thick","chevron_right_thick","chevron_up_thick","chromecast","circle_with_dots","circles_connection","clock","close","cloud_co2","coins","collaborate","computer_clock","connect","connect_off","construction","contacts","contact_card","copy","create","credit_card","credit_card_slash","cross","cross_circle","csv","dashboard","delete","delivery","disconnect","disputed","document_right_align","document_tick","document_vertical_lines","download","drag","drag_vertical","draft","drill","dropdown","duplicate","edit","edited","email","email_switch","entry","ellipsis_horizontal","ellipsis_vertical","envelope_dollar","envelope_euro","error","error_square","euro","expand","export","factory","favourite","favourite_lined","fax","feedback","file_excel","file_generic","file_image","file_pdf","file_word","files_leaning","filter","filter_new","fit_height","fit_width","flag","folder","form_refresh","framerate","fullscreen","gift","go","graduation_hat","graph","grid","heart_pulse","help","hide","hand_cash_coins","hand_cash_note","home","image","import","in_progress","in_transit","individual","info","intranet","italic","job_seeked","key","laptop","leaf","ledger","ledger_arrow_left","ledger_arrow_right","lightbulb_off","lightbulb_on","like","like_no","link","link_cloud","link_on","list_view","locked","location","logout","lookup","marker","message","microphone","minimise","minus","minus_large","mobile","money_bag","mute","none","normalscreen","old_warning","page","palm_tree","pause","pause_circle","petrol_pump","pdf","pin","people","people_switch","percentage_boxed","person","person_info","person_tick","phone","picture_in_picture","piggy_bank","plane","play","play_circle","plus","plus_large","pound","print","progress","progressed","protect","question","question_hollow","question_mark","recruiting","refresh","refresh_clock","remove","replay","sage_coin","save","scan","search","send","services","settings","settings_old","share","shield_with_tick","shield_with_tick_outline","shop","sort_down","sort_up","spanner","speaker","split","split_container","
|
|
1
|
+
const e={backgroundSize:{"extra-small":"16px",small:"24px",medium:"32px",large:"40px","extra-large":"56px"},backgroundShape:{square:"0%","rounded-rect":"20%",circle:"50%"},iconSize:{small:"var(--sizing250)",medium:"var(--sizing300)",large:"var(--sizing400)","extra-large":"var(--sizing600)"}},r=["bottom","left","right","top"],a=["circle","rounded-rect","square"],t=["small","medium","large","extra-large"],i=["small","medium","large","extra-large"],l=["accessibility_web","add","admin","airplay","alert","alert_on","analysis","app_facebook","app_instagram","app_tiktok","app_twitter","app_youtube","apps","arrow","arrow_bottom_right_circle","arrow_down","arrow_left","arrow_left_boxed","arrow_left_right_small","arrow_left_small","arrow_right","arrow_right_small","arrow_top_left_circle","arrow_up","arrows_left_right","attach","bank","bank_with_card","basket","basket_with_squares","batch","bed","bill_paid","bill_unpaid","bin","biometric","blocked","blocked_square","block_arrow_right","bold","box_arrow_left","box_arrow_right","boxed_shapes","bulk_destroy","bullet_list","bullet_list_dotted","bullet_list_numbers","business","calendar","calendar_today","call","calendar_pay_date","camera","car_lock","car_money","car_repair","card_view","card_wallet","caret_down","caret_left","caret_right","caret_up","caret_large_down","caret_large_left","caret_large_right","caret_large_up","cart","cash","chat","chart_bar","chart_line","chart_pie","chat_notes","check_all","check_none","chevron_down","chevron_first","chevron_last","chevron_left","chevron_right","chevron_up","chevron_down_thick","chevron_left_thick","chevron_right_thick","chevron_up_thick","chromecast","circle_with_dots","circles_connection","clock","close","cloud_co2","coins","collaborate","computer_clock","connect","connect_off","construction","contacts","contact_card","copy","create","credit_card","credit_card_slash","cross","cross_circle","csv","dashboard","delete","delivery","disconnect","disputed","document_right_align","document_tick","document_vertical_lines","download","drag","drag_hover","drag_vertical","draft","drill","dropdown","duplicate","edit","edited","email","email_switch","entry","ellipsis_horizontal","ellipsis_vertical","envelope_dollar","envelope_euro","error","error_square","euro","expand","export","factory","favourite","favourite_lined","fax","feedback","file_excel","file_generic","file_image","file_pdf","file_word","files_leaning","filter","filter_new","fit_height","fit_width","flag","folder","form_refresh","framerate","fullscreen","gift","go","graduation_hat","graph","grid","heart_pulse","help","hide","hierarchy","hand_cash_coins","hand_cash_note","home","image","import","in_progress","in_transit","individual","info","intranet","italic","job_seeked","key","laptop","leaf","ledger","ledger_arrow_left","ledger_arrow_right","lightbulb_off","lightbulb_on","like","like_no","link","link_cloud","link_on","list_view","locked","location","logout","lookup","marker","message","microphone","minimise","minus","minus_large","mobile","money_bag","mute","none","normalscreen","old_warning","page","palm_tree","pause","pause_circle","petrol_pump","pdf","pin","people","people_switch","percentage_boxed","person","person_info","person_tick","phone","picture_in_picture","piggy_bank","placeholder","plane","play","play_circle","plus","plus_large","pound","print","progress","progressed","protect","question","question_hollow","question_mark","recruiting","refresh","refresh_clock","remove","replay","sage_coin","save","scan","search","send","services","settings","settings_old","share","shield_with_tick","shield_with_tick_outline","shop","sort_down","sort_up","spanner","speaker","split","split_container","squares_nine","stacked_boxes","stacked_squares","stop","stop_circle","submitted","subtitles","support_online","sync","tag","talk","target","target_man","theatre_masks","three_boxes","tick","tick_circle","tick_thick","true_tick","u_turn_left","u_turn_right","underline","undo","unlocked","upload","uploaded","video","view","volume_high","volume_low","volume_medium","volunteering","warning","website","welfare","worldwide_location"];export{l as ICONS,i as ICON_FONT_SIZES,a as ICON_SHAPES,t as ICON_SIZES,r as ICON_TOOLTIP_POSITIONS,e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type IconType = "accessibility_web" | "add" | "admin" | "airplay" | "alert" | "alert_on" | "analysis" | "app_facebook" | "app_instagram" | "app_tiktok" | "app_twitter" | "app_youtube" | "apps" | "arrow" | "arrow_bottom_right_circle" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_top_left_circle" | "arrow_up" | "arrows_left_right" | "attach" | "bank" | "bank_with_card" | "basket" | "basket_with_squares" | "batch" | "bed" | "bill_paid" | "bill_unpaid" | "bin" | "biometric" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "box_arrow_left" | "box_arrow_right" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_pay_date" | "calendar_today" | "call" | "camera" | "car_lock" | "car_money" | "car_repair" | "card_wallet" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "cash" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "check_all" | "check_none" | "chevron_down" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "chromecast" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "cloud_co2" | "coins" | "collaborate" | "computer_clock" | "connect" | "connect_off" | "construction" | "contacts" | "contact_card" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "dashboard" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_vertical" | "draft" | "drill" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "export" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "form_refresh" | "framerate" | "fullscreen" | "gift" | "go" | "graduation_hat" | "graph" | "grid" | "hand_cash_coins" | "hand_cash_note" | "heart_pulse" | "help" | "hide" | "home" | "image" | "import" | "in_progress" | "in_transit" | "individual" | "info" | "intranet" | "italic" | "job_seeked" | "key" | "laptop" | "leaf" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "like" | "like_no" | "link" | "lightbulb_off" | "lightbulb_on" | "link_cloud" | "link_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "microphone" | "minimise" | "minus" | "minus_large" | "mobile" | "money_bag" | "mute" | "none" | "normalscreen" | "old_warning" | "page" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "pin" | "people" | "people_switch" | "percentage_boxed" | "person" | "person_info" | "person_tick" | "petrol_pump" | "phone" | "picture_in_picture" | "piggy_bank" | "plane" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "protect" | "question" | "question_hollow" | "question_mark" | "recruiting" | "refresh" | "refresh_clock" | "remove" | "replay" | "sage_coin" | "save" | "scan" | "send" | "search" | "services" | "settings" | "settings_old" | "share" | "shield_with_tick" | "shield_with_tick_outline" | "shop" | "sort_down" | "sort_up" | "spanner" | "speaker" | "split" | "split_container" | "
|
|
1
|
+
export type IconType = "accessibility_web" | "add" | "admin" | "airplay" | "alert" | "alert_on" | "analysis" | "app_facebook" | "app_instagram" | "app_tiktok" | "app_twitter" | "app_youtube" | "apps" | "arrow" | "arrow_bottom_right_circle" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_top_left_circle" | "arrow_up" | "arrows_left_right" | "attach" | "bank" | "bank_with_card" | "basket" | "basket_with_squares" | "batch" | "bed" | "bill_paid" | "bill_unpaid" | "bin" | "biometric" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "box_arrow_left" | "box_arrow_right" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_pay_date" | "calendar_today" | "call" | "camera" | "car_lock" | "car_money" | "car_repair" | "card_wallet" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "cash" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "check_all" | "check_none" | "chevron_down" | "chevron_first" | "chevron_last" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "chromecast" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "cloud_co2" | "coins" | "collaborate" | "computer_clock" | "connect" | "connect_off" | "construction" | "contacts" | "contact_card" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "dashboard" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_hover" | "drag_vertical" | "draft" | "drill" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "export" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "form_refresh" | "framerate" | "fullscreen" | "gift" | "go" | "graduation_hat" | "graph" | "grid" | "hand_cash_coins" | "hand_cash_note" | "heart_pulse" | "help" | "hide" | "hierarchy" | "home" | "image" | "import" | "in_progress" | "in_transit" | "individual" | "info" | "intranet" | "italic" | "job_seeked" | "key" | "laptop" | "leaf" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "like" | "like_no" | "link" | "lightbulb_off" | "lightbulb_on" | "link_cloud" | "link_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "microphone" | "minimise" | "minus" | "minus_large" | "mobile" | "money_bag" | "mute" | "none" | "normalscreen" | "old_warning" | "page" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "pin" | "people" | "people_switch" | "percentage_boxed" | "person" | "person_info" | "person_tick" | "petrol_pump" | "phone" | "picture_in_picture" | "piggy_bank" | "placeholder" | "plane" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "protect" | "question" | "question_hollow" | "question_mark" | "recruiting" | "refresh" | "refresh_clock" | "remove" | "replay" | "sage_coin" | "save" | "scan" | "send" | "search" | "services" | "settings" | "settings_old" | "share" | "shield_with_tick" | "shield_with_tick_outline" | "shop" | "sort_down" | "sort_up" | "spanner" | "speaker" | "split" | "split_container" | "squares_nine" | "stacked_boxes" | "stacked_squares" | "stop" | "stop_circle" | "subtitles" | "support_online" | "submitted" | "sync" | "tag" | "talk" | "target" | "target_man" | "theatre_masks" | "three_boxes" | "tick" | "tick_circle" | "tick_thick" | "true_tick" | "u_turn_left" | "u_turn_right" | "underline" | "undo" | "unlocked" | "upload" | "uploaded" | "video" | "view" | "volume_high" | "volume_low" | "volume_medium" | "volunteering" | "warning" | "website" | "welfare" | "worldwide_location";
|
|
@@ -89,7 +89,7 @@ declare namespace iconUnicodes {
|
|
|
89
89
|
export let stacked_squares: string;
|
|
90
90
|
export let expand: string;
|
|
91
91
|
export let flag: string;
|
|
92
|
-
export let
|
|
92
|
+
export let placeholder: string;
|
|
93
93
|
export let envelope_dollar: string;
|
|
94
94
|
export let envelope_euro: string;
|
|
95
95
|
export let sage_coin: string;
|
|
@@ -174,6 +174,11 @@ declare namespace iconUnicodes {
|
|
|
174
174
|
export let volume_high: string;
|
|
175
175
|
export let volume_low: string;
|
|
176
176
|
export let volume_medium: string;
|
|
177
|
+
export let hierarchy: string;
|
|
178
|
+
export let underline: string;
|
|
179
|
+
export let chevron_first: string;
|
|
180
|
+
export let chevron_last: string;
|
|
181
|
+
export let drag_hover: string;
|
|
177
182
|
export let error: string;
|
|
178
183
|
export let warning: string;
|
|
179
184
|
export let tick: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const r={call:"\\e93d",mobile:"\\e932",fax:"\\e925",email:"\\e922",email_switch:"\\e996",marker:"\\e93f"},t={person:"\\e93c",person_info:"\\e994",person_tick:"\\e97b",people:"\\e93b",people_switch:"\\e995",business:"\\e90d",shop:"\\e947",bank:"\\e977"},a={home:"\\e929",dashboard:"\\f007",settings:"\\e91a",search:"\\e92f",feedback:"\\e930",logout:"\\e92e",alert:"\\e90b",alert_on:"\\f001",talk:"\\e95a"},o={calendar:"\\e90e",calendar_today:"\\e970",dropdown:"\\e910",caret_up:"\\e9a8",caret_left:"\\e9a6",caret_right:"\\e9a7",caret_large_down:"\\e9a4",caret_large_up:"\\e9a5",caret_large_left:"\\e9a2",caret_large_right:"\\e9a3",plus:"\\e940",plus_large:"\\e967",minus:"\\e931",minus_large:"\\e968",edit:"\\e93a",edited:"\\e938",favourite:"\\e94f",favourite_lined:"\\e94e",credit_card:"\\e91c",credit_card_slash:"\\e966",save:"\\e926",uploaded:"\\e905",arrow_left_boxed:"\\e988",question:"\\e943",info:"\\e92a",download:"\\e900",upload:"\\e906",share:"\\e946",close:"\\e91e",cross:"\\e91d",cross_circle:"\\e992",filter:"\\e928",refresh:"\\e945",computer_clock:"\\e997",refresh_clock:"\\e986",sync:"\\e944",attach:"\\e937",camera:"\\e90f",image:"\\e93e",folder:"\\e927",help:"\\e951",connect:"\\e955",disconnect:"\\e953",split:"\\e952",filter_new:"\\e954",delivery:"\\e959",chat:"\\e914",chat_notes:"\\e956",bullet_list:"\\e95b",bullet_list_numbers:"\\e989",bullet_list_dotted:"\\e98a",view:"\\e957",hide:"\\e998",video:"\\e95e",play:"\\e95f",pause:"\\e96d",play_circle:"\\e96c",pause_circle:"\\e96b",scan:"\\e96e",lookup:"\\e96f",bold:"\\e98c",italic:"\\e98b",undo:"\\e9aa",box_arrow_left:"\\f006"},i={cart:"\\e90a",basket_with_squares:"\\e975",delete:"\\e90c",print:"\\e942",csv:"\\e94a",pdf:"\\e91f",duplicate:"\\e921",copy:"\\e91b",check_all:"\\f028",check_none:"\\f029"},l={chevron_up:"\\e918",chevron_down:"\\e915",chevron_right:"\\e917",chevron_left:"\\e916",chevron_up_thick:"\\e99d",chevron_down_thick:"\\e99c",chevron_left_thick:"\\e99f",chevron_right_thick:"\\e99e",link:"\\e92d",list_view:"\\e92c",card_view:"\\e94b",sort_down:"\\e948",sort_up:"\\e949",arrow_left:"\\e902",arrow_right:"\\e904",arrow_down:"\\e901",arrow_up:"\\e907",arrow_left_right_small:"\\e964",arrow_left_small:"\\e963",arrow_right_small:"\\e962",block_arrow_right:"\\e97e",drag_vertical:"\\e94d",drag:"\\e94c",fit_height:"\\e909",fit_width:"\\e908",ellipsis_horizontal:"\\e960",ellipsis_vertical:"\\e961",u_turn_left:"\\f004",u_turn_right:"\\f005"},c={error:"\\e923",warning:"\\e924",tick:"\\e950",tick_circle:"\\e993",tick_thick:"\\f003",draft:"\\e939",progressed:"\\e903",in_progress:"\\e920",clock:"\\e919",locked:"\\e935",unlocked:"\\e936",gift:"\\e941",blocked:"\\e933",key:"\\e92b",chart_line:"\\e912",chart_pie:"\\e913",chart_bar:"\\e911",blocked_square:"\\e934",disputed:"\\e958",lightbulb_on:"\\e95d",lightbulb_off:"\\e95c"},_={boxed_shapes:"\\e982",circles_connection:"\\e979",document_right_align:"\\e981",document_tick:"\\e980",document_vertical_lines:"\\e978",error_square:"\\e97f",factory:"\\e976",files_leaning:"\\e97a",ledger:"\\e973",ledger_arrow_left:"\\e971",ledger_arrow_right:"\\e972",money_bag:"\\e974",spanner:"\\e984",split_container:"\\e987",stacked_boxes:"\\e97c",tag:"\\e985",three_boxes:"\\e97d",circle_with_dots:"\\e965",squares_nine:"\\e969",coins:"\\e96a",file_generic:"\\e991",file_pdf:"\\e990",file_excel:"\\e98e",file_word:"\\e98f",file_image:"\\e98d",euro:"\\e9a0",pound:"\\e9a1",stacked_squares:"\\e983",expand:"\\e99b",flag:"\\e999",
|
|
1
|
+
function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const r={call:"\\e93d",mobile:"\\e932",fax:"\\e925",email:"\\e922",email_switch:"\\e996",marker:"\\e93f"},t={person:"\\e93c",person_info:"\\e994",person_tick:"\\e97b",people:"\\e93b",people_switch:"\\e995",business:"\\e90d",shop:"\\e947",bank:"\\e977"},a={home:"\\e929",dashboard:"\\f007",settings:"\\e91a",search:"\\e92f",feedback:"\\e930",logout:"\\e92e",alert:"\\e90b",alert_on:"\\f001",talk:"\\e95a"},o={calendar:"\\e90e",calendar_today:"\\e970",dropdown:"\\e910",caret_up:"\\e9a8",caret_left:"\\e9a6",caret_right:"\\e9a7",caret_large_down:"\\e9a4",caret_large_up:"\\e9a5",caret_large_left:"\\e9a2",caret_large_right:"\\e9a3",plus:"\\e940",plus_large:"\\e967",minus:"\\e931",minus_large:"\\e968",edit:"\\e93a",edited:"\\e938",favourite:"\\e94f",favourite_lined:"\\e94e",credit_card:"\\e91c",credit_card_slash:"\\e966",save:"\\e926",uploaded:"\\e905",arrow_left_boxed:"\\e988",question:"\\e943",info:"\\e92a",download:"\\e900",upload:"\\e906",share:"\\e946",close:"\\e91e",cross:"\\e91d",cross_circle:"\\e992",filter:"\\e928",refresh:"\\e945",computer_clock:"\\e997",refresh_clock:"\\e986",sync:"\\e944",attach:"\\e937",camera:"\\e90f",image:"\\e93e",folder:"\\e927",help:"\\e951",connect:"\\e955",disconnect:"\\e953",split:"\\e952",filter_new:"\\e954",delivery:"\\e959",chat:"\\e914",chat_notes:"\\e956",bullet_list:"\\e95b",bullet_list_numbers:"\\e989",bullet_list_dotted:"\\e98a",view:"\\e957",hide:"\\e998",video:"\\e95e",play:"\\e95f",pause:"\\e96d",play_circle:"\\e96c",pause_circle:"\\e96b",scan:"\\e96e",lookup:"\\e96f",bold:"\\e98c",italic:"\\e98b",undo:"\\e9aa",box_arrow_left:"\\f006"},i={cart:"\\e90a",basket_with_squares:"\\e975",delete:"\\e90c",print:"\\e942",csv:"\\e94a",pdf:"\\e91f",duplicate:"\\e921",copy:"\\e91b",check_all:"\\f028",check_none:"\\f029"},l={chevron_up:"\\e918",chevron_down:"\\e915",chevron_right:"\\e917",chevron_left:"\\e916",chevron_up_thick:"\\e99d",chevron_down_thick:"\\e99c",chevron_left_thick:"\\e99f",chevron_right_thick:"\\e99e",link:"\\e92d",list_view:"\\e92c",card_view:"\\e94b",sort_down:"\\e948",sort_up:"\\e949",arrow_left:"\\e902",arrow_right:"\\e904",arrow_down:"\\e901",arrow_up:"\\e907",arrow_left_right_small:"\\e964",arrow_left_small:"\\e963",arrow_right_small:"\\e962",block_arrow_right:"\\e97e",drag_vertical:"\\e94d",drag:"\\e94c",fit_height:"\\e909",fit_width:"\\e908",ellipsis_horizontal:"\\e960",ellipsis_vertical:"\\e961",u_turn_left:"\\f004",u_turn_right:"\\f005"},c={error:"\\e923",warning:"\\e924",tick:"\\e950",tick_circle:"\\e993",tick_thick:"\\f003",draft:"\\e939",progressed:"\\e903",in_progress:"\\e920",clock:"\\e919",locked:"\\e935",unlocked:"\\e936",gift:"\\e941",blocked:"\\e933",key:"\\e92b",chart_line:"\\e912",chart_pie:"\\e913",chart_bar:"\\e911",blocked_square:"\\e934",disputed:"\\e958",lightbulb_on:"\\e95d",lightbulb_off:"\\e95c"},_={boxed_shapes:"\\e982",circles_connection:"\\e979",document_right_align:"\\e981",document_tick:"\\e980",document_vertical_lines:"\\e978",error_square:"\\e97f",factory:"\\e976",files_leaning:"\\e97a",ledger:"\\e973",ledger_arrow_left:"\\e971",ledger_arrow_right:"\\e972",money_bag:"\\e974",spanner:"\\e984",split_container:"\\e987",stacked_boxes:"\\e97c",tag:"\\e985",three_boxes:"\\e97d",circle_with_dots:"\\e965",squares_nine:"\\e969",coins:"\\e96a",file_generic:"\\e991",file_pdf:"\\e990",file_excel:"\\e98e",file_word:"\\e98f",file_image:"\\e98d",euro:"\\e9a0",pound:"\\e9a1",stacked_squares:"\\e983",expand:"\\e99b",flag:"\\e999",placeholder:"\\e99a",envelope_dollar:"\\e9ab",envelope_euro:"\\e9a9",sage_coin:"\\e9ac",palm_tree:"\\f002",arrow_bottom_right_circle:"\\f014",arrow_top_left_circle:"\\f017",arrows_left_right:"\\f027",bank_with_card:"\\f019",bed:"\\f010",car_lock:"\\f021",car_money:"\\f011",car_repair:"\\f022",cash:"\\f020",construction:"\\f008",drill:"\\f015",form_refresh:"\\f018",graduation_hat:"\\f013",hand_cash_coins:"\\f009",hand_cash_note:"\\f024",laptop:"\\f012",percentage_boxed:"\\f016",petrol_pump:"\\f026",plane:"\\f025",theatre_masks:"\\f023",accessibility_web:"\\f045",app_facebook:"\\f052",app_instagram:"\\f046",app_tiktok:"\\f035",app_twitter:"\\f041",app_youtube:"\\f047",apps:"\\f040",bill_paid:"\\f049",bill_unpaid:"\\f063",box_arrow_right:"\\f057",calendar_pay_date:"\\f038",card_wallet:"\\f030",connect_off:"\\f053",heart_pulse:"\\f031",intranet:"\\f048",job_seeked:"\\f037",like:"\\f056",link_cloud:"\\f036",link_on:"\\f043",microphone:"\\f054",protect:"\\f044",recruiting:"\\f033",send:"\\f055",support_online:"\\f032",target_man:"\\f050",target:"\\f042",volunteering:"\\f039",website:"\\f051",welfare:"\\f034",contact_card:"\\f059",cloud_co2:"\\f060",leaf:"\\f061",like_no:"\\f058",minimise:"\\f062",pin:"\\f064",biometric:"\\f067",import:"\\f066",export:"\\f065",shield_with_tick:"\\f070",shield_with_tick_outline:"\\f071",stop:"\\f068",stop_circle:"\\f069",worldwide_location:"\\f072",airplay:"\\f073",batch:"\\f074",chromecast:"\\f075",framerate:"\\f076",fullscreen:"\\f077",mute:"\\f078",normalscreen:"\\f079",page:"\\f080",picture_in_picture:"\\f081",replay:"\\f082",speaker:"\\f083",subtitles:"\\f084",volume_high:"\\f087",volume_low:"\\f085",volume_medium:"\\f086",hierarchy:"\\f088",underline:"\\f089",chevron_first:"\\f090",chevron_last:"\\f091",drag_hover:"\\f092"},n=(f=function(r){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},o=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),o.forEach((function(t){e(r,t,a[t])}))}return r}({},r,t,a,o,i,l,c,_,{add:o.plus,create:o.plus,services:o.plus,admin:o.favourite,analysis:c.chart_line,graph:c.chart_line,basket:i.cart,bin:i.delete,bulk_destroy:i.delete,caret_down:o.dropdown,collaborate:o.share,contacts:t.people,entry:l.list_view,go:c.progressed,submitted:c.progressed,grid:o.split,individual:t.person,location:r.marker,message:r.email,old_warning:c.warning,phone:r.call,piggy_bank:o.save,question_hollow:o.video,question_mark:o.question,remove:o.minus,settings_old:a.settings,true_tick:c.tick,arrow:l.arrow_right,in_transit:l.arrow_left_right_small,progress:_.circle_with_dots}),s=null!=(s={none:""})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(s)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(s)).forEach((function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(s,e))})),f);var f,s;export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import n,{useState as o,useRef as i,useContext as a}from"react";import{StyledTitleContent as l,StyledLayoutWrapper as s,StyledVerticalIndicator as c,StyledSelectedIndicator as d,StyledTabTitleLink as p,StyledTabTitleButton as b}from"./tab-title.style.js";import f from"../../../../__internal__/utils/helpers/tags/tags.js";import{ValidationIcon as u}from"../../../../__internal__/validations/validation-icon.component.js";import g from"../../../icon/icon.component.js";import m from"../../../../__internal__/utils/helpers/events/events.js";import{TooltipProvider as y}from"../../../../__internal__/tooltip-provider/index.js";import O from"./tab-title.context.js";import{Typography as h}from"../../../typography/typography.component.js";import v from"../../../carbon-provider/__internal__/new-validation.context.js";function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){j(e,t,r[t])}))}return e}function _(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const S=n.forwardRef(((j,S)=>{var{isTabSelected:P,dataTabId:I,"data-role":k,title:x,position:R,error:B,warning:L,info:T,size:
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import n,{useState as o,useRef as i,useContext as a}from"react";import{StyledTitleContent as l,StyledLayoutWrapper as s,StyledVerticalIndicator as c,StyledSelectedIndicator as d,StyledTabTitleLink as p,StyledTabTitleButton as b}from"./tab-title.style.js";import f from"../../../../__internal__/utils/helpers/tags/tags.js";import{ValidationIcon as u}from"../../../../__internal__/validations/validation-icon.component.js";import g from"../../../icon/icon.component.js";import m from"../../../../__internal__/utils/helpers/events/events.js";import{TooltipProvider as y}from"../../../../__internal__/tooltip-provider/index.js";import O from"./tab-title.context.js";import{Typography as h}from"../../../typography/typography.component.js";import v from"../../../carbon-provider/__internal__/new-validation.context.js";function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){j(e,t,r[t])}))}return e}function _(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const S=n.forwardRef(((j,S)=>{var{isTabSelected:P,dataTabId:I,"data-role":k,title:x,position:R,error:B,warning:L,info:T,size:D="default",onClick:M,titlePosition:C="before",siblings:E,errorMessage:z="",warningMessage:K="",infoMessage:$="",borders:F,alternateStyling:H=!1,noLeftBorder:N=!1,noRightBorder:V=!1,customLayout:q,isInSidebar:A,href:G,onKeyDown:J,align:Q,tabIndex:U,id:W}=j,X=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(j,["isTabSelected","dataTabId","data-role","title","position","error","warning","info","size","onClick","titlePosition","siblings","errorMessage","warningMessage","infoMessage","borders","alternateStyling","noLeftBorder","noRightBorder","customLayout","isInSidebar","href","onKeyDown","align","tabIndex","id"]);const Y=!!G,Z=H||A,ee=B||L||T,[te,re]=o(!1),ne=i(!1),{validationRedesignOptIn:oe}=a(v);let ie="";B?ie=z:L&&(ie=K);const ae=()=>{re(!0)},le=()=>{"object"!=typeof S||(null==S?void 0:S.current)===document.activeElement||ne.current||re(!1)},se=e(t,{children:[e(l,{"data-role":"tab-title-content",error:B,warning:L,info:T,position:R,size:D,noLeftBorder:N,noRightBorder:V,borders:F,hasSiblings:!!E,isTabSelected:P,hasCustomLayout:!!q,alternateStyling:Z,align:Q,hasHref:!!G,validationRedesignOptIn:oe,children:[(()=>{if(q)return r(s,{hasCustomLayout:!0,children:q});if(!E)return x;const e=r(n.Fragment,{children:x},"title"),t=r(s,{titlePosition:C,children:E},"title-siblings");return"before"===C?[e,t]:[t,e]})(),Y&&r(g,{type:"link"}),ee&&e(s,{position:R,hasCustomSibling:!!q,validationRedesignOptIn:oe,children:[B&&r(u,{tooltipPosition:"top",error:z}),!B&&L&&r(u,{tooltipPosition:"top",warning:K}),!L&&!B&&T&&r(u,{tooltipPosition:"top",info:$})]})]}),oe&&"left"===R&&r(c,{}),(!(ee||Z)||oe)&&P&&r(d,{warning:L,error:B,"data-element":"tab-selected-indicator","data-role":"tab-selected-indicator",position:R})]}),ce=_(w(_(w({"aria-selected":P,"data-element":"select-tab","data-tabid":I,"data-role":k,role:"tab",position:R,isTabSelected:P,error:B,warning:L,info:T,noRightBorder:V,noLeftBorder:N,alternateStyling:H||A,borders:F,isInSidebar:A,tabIndex:U,id:W},X,f("tab-header",w({id:W},X))),{onKeyDown:e=>G&&m.isEnterOrSpaceKey(e)?window.open(G,"_blank"):J(e),onClick:e=>{return e.preventDefault(),G?(M(e),window.open(G,"_blank")):("object"==typeof S&&(null==S||null===(t=S.current)||void 0===t||t.focus({preventScroll:!0})),M(e));var t},size:D,onMouseOver:()=>{ne.current=!0,ae()},onMouseLeave:()=>{ne.current=!1,le()},onFocus:ae,onBlur:le}),oe&&ee&&{"aria-invalid":!0,"aria-errormessage":`${W}-message`,"aria-describedby":`${W}-message`}),{validationRedesignOptIn:oe}),de=Y?r(p,_(w({},ce),{ref:S,href:G,target:"_blank",children:se})):r(b,_(w({},ce),{type:"button",ref:S,children:se}));return e(y,{tooltipVisible:!oe&&te,children:[r(O.Provider,{value:{isInTab:!0},children:de}),oe&&ee&&r(h,{screenReaderOnly:!0,id:`${W}-message`,children:ie})]})}));S.displayName="TabTitle";export{S as default};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
|
|
4
|
+
export interface BadgeProps extends TagProps, MarginProps {
|
|
5
|
+
/** @deprecated Prop to specify an aria-label for the component */
|
|
5
6
|
"aria-label"?: string;
|
|
6
|
-
/** The badge will be
|
|
7
|
-
children
|
|
7
|
+
/** The badge will be positioned relative to this element */
|
|
8
|
+
children?: React.ReactNode;
|
|
8
9
|
/** The number rendered in the badge component */
|
|
9
10
|
counter?: string | number;
|
|
10
|
-
/** Prop to specify the color of the component */
|
|
11
|
+
/** @deprecated Prop to specify the color of the component */
|
|
11
12
|
color?: string;
|
|
12
|
-
/** Callback fired when badge is clicked */
|
|
13
|
+
/** @deprecated Callback fired when badge is clicked */
|
|
13
14
|
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
14
15
|
/** Unique identifier for the component. */
|
|
15
16
|
id?: string;
|
|
17
|
+
/** Size of the badge */
|
|
18
|
+
size?: "small" | "medium" | "large";
|
|
19
|
+
/** Badge variant */
|
|
20
|
+
variant?: "typical" | "subtle";
|
|
21
|
+
/** Set the style of the Badge to inverse */
|
|
22
|
+
inverse?: boolean;
|
|
16
23
|
}
|
|
17
|
-
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, id,
|
|
24
|
+
export declare const Badge: ({ "aria-label": ariaLabel, children, counter, color, onClick, id, size, variant, inverse, ...rest }: BadgeProps) => React.JSX.Element | null;
|
|
18
25
|
export default Badge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("../../style/utils/filter-styled-system-padding-props.js");var t=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("./badge.style.js"),o=require("../icon/icon.component.js"),l=require("../../__internal__/utils/helpers/tags/tags.js"),i=require("../../__internal__/utils/helpers/guid/index.js"),a=require("../../__internal__/utils/logger/index.js");function s(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}let c=!1,u=!1,d=!1;const p=p=>{var{"aria-label":b,children:y,counter:f=0,color:g,onClick:j,id:O,size:m="medium",variant:v="typical",inverse:h=!1}=p,w=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)t=l[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(p,["aria-label","children","counter","color","onClick","id","size","variant","inverse"]);j&&!c&&(a.default.deprecate("The `onClick` prop in `Badge` is deprecated and will soon be removed."),c=!0),b&&!u&&(a.default.deprecate("The `aria-label` prop in `Badge` is deprecated and will soon be removed."),u=!0),g&&!d&&(a.default.deprecate("The `color` prop in `Badge` is deprecated and will soon be removed."),d=!0);const[P,_]=r.useState(!1),[x,S]=r.useState(!1),{current:q}=r.useRef(O||i.default());let k=!0;const B=j&&"small"!==m,C=B&&(P||x);let D=f;"string"==typeof f?(f.length>4&&(D=f.substring(0,4)),""===f&&(k=!1)):"number"==typeof f&&(f>999&&(D="999+"),(f<=0||f%1!=0)&&(k=!1));const E=()=>{const r={buttonType:"secondary",onClick:j};return k?e.jsx(n.StyledBadge,(i=function(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){s(e,r,t[r])}))}return e}({customColor:g,id:q,"aria-label":b,size:m,variant:v,inverse:h,hasChildren:!!y,onFocus:()=>{_(!0)},onBlur:()=>{_(!1)},onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)}},B&&r,l.default("badge",w),t.default(w)),a=null!=(a={children:C?e.jsx(o.default,{"data-role":"badge-cross-icon","data-element":"badge-cross-icon",type:"cross",color:"white"}):"small"!==m?e.jsx(n.StyledCounter,{"data-element":"badge-counter",children:D}):null})?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(a)).forEach((function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))})),i)):null;var i,a};return y?e.jsxs(n.StyledBadgeWrapper,{"data-role":"badge-wrapper",children:[y,E()]}):E()};exports.Badge=p,exports.default=p;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
declare const StyledBadgeWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
declare const StyledCounter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
interface StyledBadgeProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
customColor?: string;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
variant?: "typical" | "subtle";
|
|
7
|
+
inverse?: boolean;
|
|
8
|
+
hasChildren?: boolean;
|
|
7
9
|
}
|
|
8
10
|
declare const StyledBadge: import("styled-components").StyledComponent<"span", any, {
|
|
9
11
|
theme: object;
|
|
10
12
|
} & {
|
|
11
13
|
as: import("react").ForwardRefExoticComponent<import("../button").ButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>> | undefined;
|
|
12
14
|
} & StyledBadgeProps, "theme" | "as">;
|
|
13
|
-
|
|
14
|
-
export { StyledBadge, StyledBadgeWrapper, StyledCrossIcon, StyledCounter };
|
|
15
|
+
export { StyledBadge, StyledBadgeWrapper, StyledCounter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("styled-components"),o=require("styled-system"),t=require("../icon/icon.style.js"),r=require("../button/button.component.js"),i=require("../../style/themes/apply-base-theme.js"),s=require("../../style/utils/color.js");function l(e){return e&&e.__esModule?e:{default:e}}var n=l(e);const a=(e,o)=>"subtle"===e?`\n ${o?"#007ED9":"#0060A7"};\n `:`\n ${o?"#E13E53":"#CD384B"};\n `,c=n.default.div.withConfig({displayName:"badge.style__StyledBadgeWrapper",componentId:"sc-62fb7324-0"})([""," position:relative;display:inline-block;"],o.margin),d=n.default.div.withConfig({displayName:"badge.style__StyledCounter",componentId:"sc-62fb7324-1"})(["font-weight:500;font-size:13px;line-height:150%;"]),p=n.default.span.attrs(i.default).attrs((({onClick:e})=>({as:e?r.default:void 0}))).withConfig({displayName:"badge.style__StyledBadge",componentId:"sc-62fb7324-2"})([""," box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:999px;border:solid 2px;",""],o.margin,(({size:o,variant:r,inverse:i,hasChildren:l,customColor:n,theme:c,onClick:d})=>e.css(["",";background-color:",";border-color:",";color:",";"," "," ",""],(o=>{switch(o){case"small":return e.css(["width:12px;height:12px;"]);case"large":return e.css(["min-width:28px;height:28px;padding:0px 4px 1px;"]);default:return e.css(["min-width:24px;height:24px;padding:0px 2px 1px;"])}})(o),a(r,i),i?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)",i?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)",l&&e.css(["position:absolute;z-index:2;",";"],(o=>{switch(o){case"small":return e.css(["top:-3px;right:-2px;"]);case"large":return e.css(["top:-14px;right:-8px;"]);default:return e.css(["top:-12px;right:-8px;"])}})(o)),d&&e.css(["min-height:0;:hover,:focus{padding:0;border-color:",";background-color:",";","{margin:0;color:",";}}"],a(r,i),a(r,i),t.default,i?"var(--colorsUtilityYin100)":"var(--colorsUtilityYang100)"),n&&e.css(["background-color:var(--colorsUtilityYang100);border-color:",";color:",";",""],s.toColor(c,n),s.toColor(c,n),d&&e.css([":hover,:focus{background-color:",";border-color:",";}"],s.toColor(c,n),s.toColor(c,n))))));exports.StyledBadge=p,exports.StyledBadgeWrapper=c,exports.StyledCounter=d;
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ICONS=["accessibility_web","add","admin","airplay","alert","alert_on","analysis","app_facebook","app_instagram","app_tiktok","app_twitter","app_youtube","apps","arrow","arrow_bottom_right_circle","arrow_down","arrow_left","arrow_left_boxed","arrow_left_right_small","arrow_left_small","arrow_right","arrow_right_small","arrow_top_left_circle","arrow_up","arrows_left_right","attach","bank","bank_with_card","basket","basket_with_squares","batch","bed","bill_paid","bill_unpaid","bin","biometric","blocked","blocked_square","block_arrow_right","bold","box_arrow_left","box_arrow_right","boxed_shapes","bulk_destroy","bullet_list","bullet_list_dotted","bullet_list_numbers","business","calendar","calendar_today","call","calendar_pay_date","camera","car_lock","car_money","car_repair","card_view","card_wallet","caret_down","caret_left","caret_right","caret_up","caret_large_down","caret_large_left","caret_large_right","caret_large_up","cart","cash","chat","chart_bar","chart_line","chart_pie","chat_notes","check_all","check_none","chevron_down","chevron_left","chevron_right","chevron_up","chevron_down_thick","chevron_left_thick","chevron_right_thick","chevron_up_thick","chromecast","circle_with_dots","circles_connection","clock","close","cloud_co2","coins","collaborate","computer_clock","connect","connect_off","construction","contacts","contact_card","copy","create","credit_card","credit_card_slash","cross","cross_circle","csv","dashboard","delete","delivery","disconnect","disputed","document_right_align","document_tick","document_vertical_lines","download","drag","drag_vertical","draft","drill","dropdown","duplicate","edit","edited","email","email_switch","entry","ellipsis_horizontal","ellipsis_vertical","envelope_dollar","envelope_euro","error","error_square","euro","expand","export","factory","favourite","favourite_lined","fax","feedback","file_excel","file_generic","file_image","file_pdf","file_word","files_leaning","filter","filter_new","fit_height","fit_width","flag","folder","form_refresh","framerate","fullscreen","gift","go","graduation_hat","graph","grid","heart_pulse","help","hide","hand_cash_coins","hand_cash_note","home","image","import","in_progress","in_transit","individual","info","intranet","italic","job_seeked","key","laptop","leaf","ledger","ledger_arrow_left","ledger_arrow_right","lightbulb_off","lightbulb_on","like","like_no","link","link_cloud","link_on","list_view","locked","location","logout","lookup","marker","message","microphone","minimise","minus","minus_large","mobile","money_bag","mute","none","normalscreen","old_warning","page","palm_tree","pause","pause_circle","petrol_pump","pdf","pin","people","people_switch","percentage_boxed","person","person_info","person_tick","phone","picture_in_picture","piggy_bank","plane","play","play_circle","plus","plus_large","pound","print","progress","progressed","protect","question","question_hollow","question_mark","recruiting","refresh","refresh_clock","remove","replay","sage_coin","save","scan","search","send","services","settings","settings_old","share","shield_with_tick","shield_with_tick_outline","shop","sort_down","sort_up","spanner","speaker","split","split_container","
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ICONS=["accessibility_web","add","admin","airplay","alert","alert_on","analysis","app_facebook","app_instagram","app_tiktok","app_twitter","app_youtube","apps","arrow","arrow_bottom_right_circle","arrow_down","arrow_left","arrow_left_boxed","arrow_left_right_small","arrow_left_small","arrow_right","arrow_right_small","arrow_top_left_circle","arrow_up","arrows_left_right","attach","bank","bank_with_card","basket","basket_with_squares","batch","bed","bill_paid","bill_unpaid","bin","biometric","blocked","blocked_square","block_arrow_right","bold","box_arrow_left","box_arrow_right","boxed_shapes","bulk_destroy","bullet_list","bullet_list_dotted","bullet_list_numbers","business","calendar","calendar_today","call","calendar_pay_date","camera","car_lock","car_money","car_repair","card_view","card_wallet","caret_down","caret_left","caret_right","caret_up","caret_large_down","caret_large_left","caret_large_right","caret_large_up","cart","cash","chat","chart_bar","chart_line","chart_pie","chat_notes","check_all","check_none","chevron_down","chevron_first","chevron_last","chevron_left","chevron_right","chevron_up","chevron_down_thick","chevron_left_thick","chevron_right_thick","chevron_up_thick","chromecast","circle_with_dots","circles_connection","clock","close","cloud_co2","coins","collaborate","computer_clock","connect","connect_off","construction","contacts","contact_card","copy","create","credit_card","credit_card_slash","cross","cross_circle","csv","dashboard","delete","delivery","disconnect","disputed","document_right_align","document_tick","document_vertical_lines","download","drag","drag_hover","drag_vertical","draft","drill","dropdown","duplicate","edit","edited","email","email_switch","entry","ellipsis_horizontal","ellipsis_vertical","envelope_dollar","envelope_euro","error","error_square","euro","expand","export","factory","favourite","favourite_lined","fax","feedback","file_excel","file_generic","file_image","file_pdf","file_word","files_leaning","filter","filter_new","fit_height","fit_width","flag","folder","form_refresh","framerate","fullscreen","gift","go","graduation_hat","graph","grid","heart_pulse","help","hide","hierarchy","hand_cash_coins","hand_cash_note","home","image","import","in_progress","in_transit","individual","info","intranet","italic","job_seeked","key","laptop","leaf","ledger","ledger_arrow_left","ledger_arrow_right","lightbulb_off","lightbulb_on","like","like_no","link","link_cloud","link_on","list_view","locked","location","logout","lookup","marker","message","microphone","minimise","minus","minus_large","mobile","money_bag","mute","none","normalscreen","old_warning","page","palm_tree","pause","pause_circle","petrol_pump","pdf","pin","people","people_switch","percentage_boxed","person","person_info","person_tick","phone","picture_in_picture","piggy_bank","placeholder","plane","play","play_circle","plus","plus_large","pound","print","progress","progressed","protect","question","question_hollow","question_mark","recruiting","refresh","refresh_clock","remove","replay","sage_coin","save","scan","search","send","services","settings","settings_old","share","shield_with_tick","shield_with_tick_outline","shop","sort_down","sort_up","spanner","speaker","split","split_container","squares_nine","stacked_boxes","stacked_squares","stop","stop_circle","submitted","subtitles","support_online","sync","tag","talk","target","target_man","theatre_masks","three_boxes","tick","tick_circle","tick_thick","true_tick","u_turn_left","u_turn_right","underline","undo","unlocked","upload","uploaded","video","view","volume_high","volume_low","volume_medium","volunteering","warning","website","welfare","worldwide_location"],exports.ICON_FONT_SIZES=["small","medium","large","extra-large"],exports.ICON_SHAPES=["circle","rounded-rect","square"],exports.ICON_SIZES=["small","medium","large","extra-large"],exports.ICON_TOOLTIP_POSITIONS=["bottom","left","right","top"],exports.default={backgroundSize:{"extra-small":"16px",small:"24px",medium:"32px",large:"40px","extra-large":"56px"},backgroundShape:{square:"0%","rounded-rect":"20%",circle:"50%"},iconSize:{small:"var(--sizing250)",medium:"var(--sizing300)",large:"var(--sizing400)","extra-large":"var(--sizing600)"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type IconType = "accessibility_web" | "add" | "admin" | "airplay" | "alert" | "alert_on" | "analysis" | "app_facebook" | "app_instagram" | "app_tiktok" | "app_twitter" | "app_youtube" | "apps" | "arrow" | "arrow_bottom_right_circle" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_top_left_circle" | "arrow_up" | "arrows_left_right" | "attach" | "bank" | "bank_with_card" | "basket" | "basket_with_squares" | "batch" | "bed" | "bill_paid" | "bill_unpaid" | "bin" | "biometric" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "box_arrow_left" | "box_arrow_right" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_pay_date" | "calendar_today" | "call" | "camera" | "car_lock" | "car_money" | "car_repair" | "card_wallet" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "cash" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "check_all" | "check_none" | "chevron_down" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "chromecast" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "cloud_co2" | "coins" | "collaborate" | "computer_clock" | "connect" | "connect_off" | "construction" | "contacts" | "contact_card" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "dashboard" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_vertical" | "draft" | "drill" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "export" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "form_refresh" | "framerate" | "fullscreen" | "gift" | "go" | "graduation_hat" | "graph" | "grid" | "hand_cash_coins" | "hand_cash_note" | "heart_pulse" | "help" | "hide" | "home" | "image" | "import" | "in_progress" | "in_transit" | "individual" | "info" | "intranet" | "italic" | "job_seeked" | "key" | "laptop" | "leaf" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "like" | "like_no" | "link" | "lightbulb_off" | "lightbulb_on" | "link_cloud" | "link_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "microphone" | "minimise" | "minus" | "minus_large" | "mobile" | "money_bag" | "mute" | "none" | "normalscreen" | "old_warning" | "page" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "pin" | "people" | "people_switch" | "percentage_boxed" | "person" | "person_info" | "person_tick" | "petrol_pump" | "phone" | "picture_in_picture" | "piggy_bank" | "plane" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "protect" | "question" | "question_hollow" | "question_mark" | "recruiting" | "refresh" | "refresh_clock" | "remove" | "replay" | "sage_coin" | "save" | "scan" | "send" | "search" | "services" | "settings" | "settings_old" | "share" | "shield_with_tick" | "shield_with_tick_outline" | "shop" | "sort_down" | "sort_up" | "spanner" | "speaker" | "split" | "split_container" | "
|
|
1
|
+
export type IconType = "accessibility_web" | "add" | "admin" | "airplay" | "alert" | "alert_on" | "analysis" | "app_facebook" | "app_instagram" | "app_tiktok" | "app_twitter" | "app_youtube" | "apps" | "arrow" | "arrow_bottom_right_circle" | "arrow_down" | "arrow_left" | "arrow_left_boxed" | "arrow_left_right_small" | "arrow_left_small" | "arrow_right" | "arrow_right_small" | "arrow_top_left_circle" | "arrow_up" | "arrows_left_right" | "attach" | "bank" | "bank_with_card" | "basket" | "basket_with_squares" | "batch" | "bed" | "bill_paid" | "bill_unpaid" | "bin" | "biometric" | "blocked" | "blocked_square" | "block_arrow_right" | "bold" | "box_arrow_left" | "box_arrow_right" | "boxed_shapes" | "bulk_destroy" | "bullet_list" | "bullet_list_dotted" | "bullet_list_numbers" | "business" | "calendar" | "calendar_pay_date" | "calendar_today" | "call" | "camera" | "car_lock" | "car_money" | "car_repair" | "card_wallet" | "card_view" | "caret_down" | "caret_left" | "caret_right" | "caret_up" | "caret_large_down" | "caret_large_left" | "caret_large_right" | "caret_large_up" | "cart" | "cash" | "chat" | "chart_bar" | "chart_line" | "chart_pie" | "chat_notes" | "check_all" | "check_none" | "chevron_down" | "chevron_first" | "chevron_last" | "chevron_left" | "chevron_right" | "chevron_up" | "chevron_down_thick" | "chevron_left_thick" | "chevron_right_thick" | "chevron_up_thick" | "chromecast" | "circle_with_dots" | "circles_connection" | "clock" | "close" | "cloud_co2" | "coins" | "collaborate" | "computer_clock" | "connect" | "connect_off" | "construction" | "contacts" | "contact_card" | "copy" | "create" | "credit_card" | "credit_card_slash" | "cross" | "cross_circle" | "csv" | "dashboard" | "delete" | "delivery" | "disputed" | "disconnect" | "document_right_align" | "document_tick" | "document_vertical_lines" | "download" | "drag" | "drag_hover" | "drag_vertical" | "draft" | "drill" | "dropdown" | "duplicate" | "edit" | "edited" | "email" | "email_switch" | "entry" | "envelope_dollar" | "envelope_euro" | "ellipsis_horizontal" | "ellipsis_vertical" | "error" | "error_square" | "euro" | "expand" | "export" | "factory" | "favourite" | "favourite_lined" | "fax" | "feedback" | "file_excel" | "file_generic" | "file_image" | "file_pdf" | "file_word" | "files_leaning" | "filter" | "filter_new" | "fit_height" | "fit_width" | "flag" | "folder" | "form_refresh" | "framerate" | "fullscreen" | "gift" | "go" | "graduation_hat" | "graph" | "grid" | "hand_cash_coins" | "hand_cash_note" | "heart_pulse" | "help" | "hide" | "hierarchy" | "home" | "image" | "import" | "in_progress" | "in_transit" | "individual" | "info" | "intranet" | "italic" | "job_seeked" | "key" | "laptop" | "leaf" | "ledger" | "ledger_arrow_left" | "ledger_arrow_right" | "like" | "like_no" | "link" | "lightbulb_off" | "lightbulb_on" | "link_cloud" | "link_on" | "list_view" | "locked" | "location" | "logout" | "lookup" | "marker" | "message" | "microphone" | "minimise" | "minus" | "minus_large" | "mobile" | "money_bag" | "mute" | "none" | "normalscreen" | "old_warning" | "page" | "palm_tree" | "pause" | "pause_circle" | "pdf" | "pin" | "people" | "people_switch" | "percentage_boxed" | "person" | "person_info" | "person_tick" | "petrol_pump" | "phone" | "picture_in_picture" | "piggy_bank" | "placeholder" | "plane" | "play" | "play_circle" | "plus" | "plus_large" | "pound" | "print" | "progress" | "progressed" | "protect" | "question" | "question_hollow" | "question_mark" | "recruiting" | "refresh" | "refresh_clock" | "remove" | "replay" | "sage_coin" | "save" | "scan" | "send" | "search" | "services" | "settings" | "settings_old" | "share" | "shield_with_tick" | "shield_with_tick_outline" | "shop" | "sort_down" | "sort_up" | "spanner" | "speaker" | "split" | "split_container" | "squares_nine" | "stacked_boxes" | "stacked_squares" | "stop" | "stop_circle" | "subtitles" | "support_online" | "submitted" | "sync" | "tag" | "talk" | "target" | "target_man" | "theatre_masks" | "three_boxes" | "tick" | "tick_circle" | "tick_thick" | "true_tick" | "u_turn_left" | "u_turn_right" | "underline" | "undo" | "unlocked" | "upload" | "uploaded" | "video" | "view" | "volume_high" | "volume_low" | "volume_medium" | "volunteering" | "warning" | "website" | "welfare" | "worldwide_location";
|
|
@@ -89,7 +89,7 @@ declare namespace iconUnicodes {
|
|
|
89
89
|
export let stacked_squares: string;
|
|
90
90
|
export let expand: string;
|
|
91
91
|
export let flag: string;
|
|
92
|
-
export let
|
|
92
|
+
export let placeholder: string;
|
|
93
93
|
export let envelope_dollar: string;
|
|
94
94
|
export let envelope_euro: string;
|
|
95
95
|
export let sage_coin: string;
|
|
@@ -174,6 +174,11 @@ declare namespace iconUnicodes {
|
|
|
174
174
|
export let volume_high: string;
|
|
175
175
|
export let volume_low: string;
|
|
176
176
|
export let volume_medium: string;
|
|
177
|
+
export let hierarchy: string;
|
|
178
|
+
export let underline: string;
|
|
179
|
+
export let chevron_first: string;
|
|
180
|
+
export let chevron_last: string;
|
|
181
|
+
export let drag_hover: string;
|
|
177
182
|
export let error: string;
|
|
178
183
|
export let warning: string;
|
|
179
184
|
export let tick: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0});const r={call:"\\e93d",mobile:"\\e932",fax:"\\e925",email:"\\e922",email_switch:"\\e996",marker:"\\e93f"},t={person:"\\e93c",person_info:"\\e994",person_tick:"\\e97b",people:"\\e93b",people_switch:"\\e995",business:"\\e90d",shop:"\\e947",bank:"\\e977"},a={home:"\\e929",dashboard:"\\f007",settings:"\\e91a",search:"\\e92f",feedback:"\\e930",logout:"\\e92e",alert:"\\e90b",alert_on:"\\f001",talk:"\\e95a"},o={calendar:"\\e90e",calendar_today:"\\e970",dropdown:"\\e910",caret_up:"\\e9a8",caret_left:"\\e9a6",caret_right:"\\e9a7",caret_large_down:"\\e9a4",caret_large_up:"\\e9a5",caret_large_left:"\\e9a2",caret_large_right:"\\e9a3",plus:"\\e940",plus_large:"\\e967",minus:"\\e931",minus_large:"\\e968",edit:"\\e93a",edited:"\\e938",favourite:"\\e94f",favourite_lined:"\\e94e",credit_card:"\\e91c",credit_card_slash:"\\e966",save:"\\e926",uploaded:"\\e905",arrow_left_boxed:"\\e988",question:"\\e943",info:"\\e92a",download:"\\e900",upload:"\\e906",share:"\\e946",close:"\\e91e",cross:"\\e91d",cross_circle:"\\e992",filter:"\\e928",refresh:"\\e945",computer_clock:"\\e997",refresh_clock:"\\e986",sync:"\\e944",attach:"\\e937",camera:"\\e90f",image:"\\e93e",folder:"\\e927",help:"\\e951",connect:"\\e955",disconnect:"\\e953",split:"\\e952",filter_new:"\\e954",delivery:"\\e959",chat:"\\e914",chat_notes:"\\e956",bullet_list:"\\e95b",bullet_list_numbers:"\\e989",bullet_list_dotted:"\\e98a",view:"\\e957",hide:"\\e998",video:"\\e95e",play:"\\e95f",pause:"\\e96d",play_circle:"\\e96c",pause_circle:"\\e96b",scan:"\\e96e",lookup:"\\e96f",bold:"\\e98c",italic:"\\e98b",undo:"\\e9aa",box_arrow_left:"\\f006"},i={cart:"\\e90a",basket_with_squares:"\\e975",delete:"\\e90c",print:"\\e942",csv:"\\e94a",pdf:"\\e91f",duplicate:"\\e921",copy:"\\e91b",check_all:"\\f028",check_none:"\\f029"},l={chevron_up:"\\e918",chevron_down:"\\e915",chevron_right:"\\e917",chevron_left:"\\e916",chevron_up_thick:"\\e99d",chevron_down_thick:"\\e99c",chevron_left_thick:"\\e99f",chevron_right_thick:"\\e99e",link:"\\e92d",list_view:"\\e92c",card_view:"\\e94b",sort_down:"\\e948",sort_up:"\\e949",arrow_left:"\\e902",arrow_right:"\\e904",arrow_down:"\\e901",arrow_up:"\\e907",arrow_left_right_small:"\\e964",arrow_left_small:"\\e963",arrow_right_small:"\\e962",block_arrow_right:"\\e97e",drag_vertical:"\\e94d",drag:"\\e94c",fit_height:"\\e909",fit_width:"\\e908",ellipsis_horizontal:"\\e960",ellipsis_vertical:"\\e961",u_turn_left:"\\f004",u_turn_right:"\\f005"},c={error:"\\e923",warning:"\\e924",tick:"\\e950",tick_circle:"\\e993",tick_thick:"\\f003",draft:"\\e939",progressed:"\\e903",in_progress:"\\e920",clock:"\\e919",locked:"\\e935",unlocked:"\\e936",gift:"\\e941",blocked:"\\e933",key:"\\e92b",chart_line:"\\e912",chart_pie:"\\e913",chart_bar:"\\e911",blocked_square:"\\e934",disputed:"\\e958",lightbulb_on:"\\e95d",lightbulb_off:"\\e95c"},_={boxed_shapes:"\\e982",circles_connection:"\\e979",document_right_align:"\\e981",document_tick:"\\e980",document_vertical_lines:"\\e978",error_square:"\\e97f",factory:"\\e976",files_leaning:"\\e97a",ledger:"\\e973",ledger_arrow_left:"\\e971",ledger_arrow_right:"\\e972",money_bag:"\\e974",spanner:"\\e984",split_container:"\\e987",stacked_boxes:"\\e97c",tag:"\\e985",three_boxes:"\\e97d",circle_with_dots:"\\e965",squares_nine:"\\e969",coins:"\\e96a",file_generic:"\\e991",file_pdf:"\\e990",file_excel:"\\e98e",file_word:"\\e98f",file_image:"\\e98d",euro:"\\e9a0",pound:"\\e9a1",stacked_squares:"\\e983",expand:"\\e99b",flag:"\\e999",
|
|
1
|
+
"use strict";function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}Object.defineProperty(exports,"__esModule",{value:!0});const r={call:"\\e93d",mobile:"\\e932",fax:"\\e925",email:"\\e922",email_switch:"\\e996",marker:"\\e93f"},t={person:"\\e93c",person_info:"\\e994",person_tick:"\\e97b",people:"\\e93b",people_switch:"\\e995",business:"\\e90d",shop:"\\e947",bank:"\\e977"},a={home:"\\e929",dashboard:"\\f007",settings:"\\e91a",search:"\\e92f",feedback:"\\e930",logout:"\\e92e",alert:"\\e90b",alert_on:"\\f001",talk:"\\e95a"},o={calendar:"\\e90e",calendar_today:"\\e970",dropdown:"\\e910",caret_up:"\\e9a8",caret_left:"\\e9a6",caret_right:"\\e9a7",caret_large_down:"\\e9a4",caret_large_up:"\\e9a5",caret_large_left:"\\e9a2",caret_large_right:"\\e9a3",plus:"\\e940",plus_large:"\\e967",minus:"\\e931",minus_large:"\\e968",edit:"\\e93a",edited:"\\e938",favourite:"\\e94f",favourite_lined:"\\e94e",credit_card:"\\e91c",credit_card_slash:"\\e966",save:"\\e926",uploaded:"\\e905",arrow_left_boxed:"\\e988",question:"\\e943",info:"\\e92a",download:"\\e900",upload:"\\e906",share:"\\e946",close:"\\e91e",cross:"\\e91d",cross_circle:"\\e992",filter:"\\e928",refresh:"\\e945",computer_clock:"\\e997",refresh_clock:"\\e986",sync:"\\e944",attach:"\\e937",camera:"\\e90f",image:"\\e93e",folder:"\\e927",help:"\\e951",connect:"\\e955",disconnect:"\\e953",split:"\\e952",filter_new:"\\e954",delivery:"\\e959",chat:"\\e914",chat_notes:"\\e956",bullet_list:"\\e95b",bullet_list_numbers:"\\e989",bullet_list_dotted:"\\e98a",view:"\\e957",hide:"\\e998",video:"\\e95e",play:"\\e95f",pause:"\\e96d",play_circle:"\\e96c",pause_circle:"\\e96b",scan:"\\e96e",lookup:"\\e96f",bold:"\\e98c",italic:"\\e98b",undo:"\\e9aa",box_arrow_left:"\\f006"},i={cart:"\\e90a",basket_with_squares:"\\e975",delete:"\\e90c",print:"\\e942",csv:"\\e94a",pdf:"\\e91f",duplicate:"\\e921",copy:"\\e91b",check_all:"\\f028",check_none:"\\f029"},l={chevron_up:"\\e918",chevron_down:"\\e915",chevron_right:"\\e917",chevron_left:"\\e916",chevron_up_thick:"\\e99d",chevron_down_thick:"\\e99c",chevron_left_thick:"\\e99f",chevron_right_thick:"\\e99e",link:"\\e92d",list_view:"\\e92c",card_view:"\\e94b",sort_down:"\\e948",sort_up:"\\e949",arrow_left:"\\e902",arrow_right:"\\e904",arrow_down:"\\e901",arrow_up:"\\e907",arrow_left_right_small:"\\e964",arrow_left_small:"\\e963",arrow_right_small:"\\e962",block_arrow_right:"\\e97e",drag_vertical:"\\e94d",drag:"\\e94c",fit_height:"\\e909",fit_width:"\\e908",ellipsis_horizontal:"\\e960",ellipsis_vertical:"\\e961",u_turn_left:"\\f004",u_turn_right:"\\f005"},c={error:"\\e923",warning:"\\e924",tick:"\\e950",tick_circle:"\\e993",tick_thick:"\\f003",draft:"\\e939",progressed:"\\e903",in_progress:"\\e920",clock:"\\e919",locked:"\\e935",unlocked:"\\e936",gift:"\\e941",blocked:"\\e933",key:"\\e92b",chart_line:"\\e912",chart_pie:"\\e913",chart_bar:"\\e911",blocked_square:"\\e934",disputed:"\\e958",lightbulb_on:"\\e95d",lightbulb_off:"\\e95c"},_={boxed_shapes:"\\e982",circles_connection:"\\e979",document_right_align:"\\e981",document_tick:"\\e980",document_vertical_lines:"\\e978",error_square:"\\e97f",factory:"\\e976",files_leaning:"\\e97a",ledger:"\\e973",ledger_arrow_left:"\\e971",ledger_arrow_right:"\\e972",money_bag:"\\e974",spanner:"\\e984",split_container:"\\e987",stacked_boxes:"\\e97c",tag:"\\e985",three_boxes:"\\e97d",circle_with_dots:"\\e965",squares_nine:"\\e969",coins:"\\e96a",file_generic:"\\e991",file_pdf:"\\e990",file_excel:"\\e98e",file_word:"\\e98f",file_image:"\\e98d",euro:"\\e9a0",pound:"\\e9a1",stacked_squares:"\\e983",expand:"\\e99b",flag:"\\e999",placeholder:"\\e99a",envelope_dollar:"\\e9ab",envelope_euro:"\\e9a9",sage_coin:"\\e9ac",palm_tree:"\\f002",arrow_bottom_right_circle:"\\f014",arrow_top_left_circle:"\\f017",arrows_left_right:"\\f027",bank_with_card:"\\f019",bed:"\\f010",car_lock:"\\f021",car_money:"\\f011",car_repair:"\\f022",cash:"\\f020",construction:"\\f008",drill:"\\f015",form_refresh:"\\f018",graduation_hat:"\\f013",hand_cash_coins:"\\f009",hand_cash_note:"\\f024",laptop:"\\f012",percentage_boxed:"\\f016",petrol_pump:"\\f026",plane:"\\f025",theatre_masks:"\\f023",accessibility_web:"\\f045",app_facebook:"\\f052",app_instagram:"\\f046",app_tiktok:"\\f035",app_twitter:"\\f041",app_youtube:"\\f047",apps:"\\f040",bill_paid:"\\f049",bill_unpaid:"\\f063",box_arrow_right:"\\f057",calendar_pay_date:"\\f038",card_wallet:"\\f030",connect_off:"\\f053",heart_pulse:"\\f031",intranet:"\\f048",job_seeked:"\\f037",like:"\\f056",link_cloud:"\\f036",link_on:"\\f043",microphone:"\\f054",protect:"\\f044",recruiting:"\\f033",send:"\\f055",support_online:"\\f032",target_man:"\\f050",target:"\\f042",volunteering:"\\f039",website:"\\f051",welfare:"\\f034",contact_card:"\\f059",cloud_co2:"\\f060",leaf:"\\f061",like_no:"\\f058",minimise:"\\f062",pin:"\\f064",biometric:"\\f067",import:"\\f066",export:"\\f065",shield_with_tick:"\\f070",shield_with_tick_outline:"\\f071",stop:"\\f068",stop_circle:"\\f069",worldwide_location:"\\f072",airplay:"\\f073",batch:"\\f074",chromecast:"\\f075",framerate:"\\f076",fullscreen:"\\f077",mute:"\\f078",normalscreen:"\\f079",page:"\\f080",picture_in_picture:"\\f081",replay:"\\f082",speaker:"\\f083",subtitles:"\\f084",volume_high:"\\f087",volume_low:"\\f085",volume_medium:"\\f086",hierarchy:"\\f088",underline:"\\f089",chevron_first:"\\f090",chevron_last:"\\f091",drag_hover:"\\f092"},n=(f=function(r){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},o=Object.keys(a);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),o.forEach((function(t){e(r,t,a[t])}))}return r}({},r,t,a,o,i,l,c,_,{add:o.plus,create:o.plus,services:o.plus,admin:o.favourite,analysis:c.chart_line,graph:c.chart_line,basket:i.cart,bin:i.delete,bulk_destroy:i.delete,caret_down:o.dropdown,collaborate:o.share,contacts:t.people,entry:l.list_view,go:c.progressed,submitted:c.progressed,grid:o.split,individual:t.person,location:r.marker,message:r.email,old_warning:c.warning,phone:r.call,piggy_bank:o.save,question_hollow:o.video,question_mark:o.question,remove:o.minus,settings_old:a.settings,true_tick:c.tick,arrow:l.arrow_right,in_transit:l.arrow_left_right_small,progress:_.circle_with_dots}),s=null!=(s={none:""})?s:{},Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(s)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(s)).forEach((function(e){Object.defineProperty(f,e,Object.getOwnPropertyDescriptor(s,e))})),f);var f,s;exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./tab-title.style.js"),n=require("../../../../__internal__/utils/helpers/tags/tags.js"),i=require("../../../../__internal__/validations/validation-icon.component.js"),o=require("../../../icon/icon.component.js"),a=require("../../../../__internal__/utils/helpers/events/events.js"),l=require("../../../../__internal__/tooltip-provider/index.js"),s=require("./tab-title.context.js"),d=require("../../../typography/typography.component.js"),c=require("../../../carbon-provider/__internal__/new-validation.context.js");function u(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("./tab-title.style.js"),n=require("../../../../__internal__/utils/helpers/tags/tags.js"),i=require("../../../../__internal__/validations/validation-icon.component.js"),o=require("../../../icon/icon.component.js"),a=require("../../../../__internal__/utils/helpers/events/events.js"),l=require("../../../../__internal__/tooltip-provider/index.js"),s=require("./tab-title.context.js"),d=require("../../../typography/typography.component.js"),c=require("../../../carbon-provider/__internal__/new-validation.context.js");function u(e){return e&&e.__esModule?e:{default:e}}var b=u(t);function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const g=b.default.forwardRef(((u,p)=>{var{isTabSelected:g,dataTabId:j,"data-role":O,title:h,position:v,error:S,warning:m,info:x,size:w="default",onClick:_,titlePosition:P="before",siblings:I,errorMessage:T="",warningMessage:L="",infoMessage:k="",borders:q,alternateStyling:R=!1,noLeftBorder:B=!1,noRightBorder:M=!1,customLayout:C,isInSidebar:D,href:E,onKeyDown:V,align:z,tabIndex:K,id:F}=u,W=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(u,["isTabSelected","dataTabId","data-role","title","position","error","warning","info","size","onClick","titlePosition","siblings","errorMessage","warningMessage","infoMessage","borders","alternateStyling","noLeftBorder","noRightBorder","customLayout","isInSidebar","href","onKeyDown","align","tabIndex","id"]);const $=!!E,H=R||D,N=S||m||x,[A,G]=t.useState(!1),J=t.useRef(!1),{validationRedesignOptIn:Q}=t.useContext(c.default);let U="";S?U=T:m&&(U=L);const X=()=>{G(!0)},Y=()=>{"object"!=typeof p||(null==p?void 0:p.current)===document.activeElement||J.current||G(!1)},Z=e.jsxs(e.Fragment,{children:[e.jsxs(r.StyledTitleContent,{"data-role":"tab-title-content",error:S,warning:m,info:x,position:v,size:w,noLeftBorder:B,noRightBorder:M,borders:q,hasSiblings:!!I,isTabSelected:g,hasCustomLayout:!!C,alternateStyling:H,align:z,hasHref:!!E,validationRedesignOptIn:Q,children:[(()=>{if(C)return e.jsx(r.StyledLayoutWrapper,{hasCustomLayout:!0,children:C});if(!I)return h;const t=e.jsx(b.default.Fragment,{children:h},"title"),n=e.jsx(r.StyledLayoutWrapper,{titlePosition:P,children:I},"title-siblings");return"before"===P?[t,n]:[n,t]})(),$&&e.jsx(o.default,{type:"link"}),N&&e.jsxs(r.StyledLayoutWrapper,{position:v,hasCustomSibling:!!C,validationRedesignOptIn:Q,children:[S&&e.jsx(i.ValidationIcon,{tooltipPosition:"top",error:T}),!S&&m&&e.jsx(i.ValidationIcon,{tooltipPosition:"top",warning:L}),!m&&!S&&x&&e.jsx(i.ValidationIcon,{tooltipPosition:"top",info:k})]})]}),Q&&"left"===v&&e.jsx(r.StyledVerticalIndicator,{}),(!(N||H)||Q)&&g&&e.jsx(r.StyledSelectedIndicator,{warning:m,error:S,"data-element":"tab-selected-indicator","data-role":"tab-selected-indicator",position:v})]}),ee=y(f(y(f({"aria-selected":g,"data-element":"select-tab","data-tabid":j,"data-role":O,role:"tab",position:v,isTabSelected:g,error:S,warning:m,info:x,noRightBorder:M,noLeftBorder:B,alternateStyling:R||D,borders:q,isInSidebar:D,tabIndex:K,id:F},W,n.default("tab-header",f({id:F},W))),{onKeyDown:e=>E&&a.default.isEnterOrSpaceKey(e)?window.open(E,"_blank"):V(e),onClick:e=>{return e.preventDefault(),E?(_(e),window.open(E,"_blank")):("object"==typeof p&&(null==p||null===(t=p.current)||void 0===t||t.focus({preventScroll:!0})),_(e));var t},size:w,onMouseOver:()=>{J.current=!0,X()},onMouseLeave:()=>{J.current=!1,Y()},onFocus:X,onBlur:Y}),Q&&N&&{"aria-invalid":!0,"aria-errormessage":`${F}-message`,"aria-describedby":`${F}-message`}),{validationRedesignOptIn:Q}),te=$?e.jsx(r.StyledTabTitleLink,y(f({},ee),{ref:p,href:E,target:"_blank",children:Z})):e.jsx(r.StyledTabTitleButton,y(f({},ee),{type:"button",ref:p,children:Z}));return e.jsxs(l.TooltipProvider,{tooltipVisible:!Q&&A,children:[e.jsx(s.default.Provider,{value:{isInTab:!0},children:te}),Q&&N&&e.jsx(d.Typography,{screenReaderOnly:!0,id:`${F}-message`,children:U})]})}));g.displayName="TabTitle",exports.default=g;
|
|
Binary file
|
|
Binary file
|