carbon-react 158.3.0 → 158.3.1
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/flat-table/sort/sort.component.js +1 -1
- package/esm/components/flat-table/sort/sort.style.d.ts +5 -11
- package/esm/components/flat-table/sort/sort.style.js +1 -1
- package/lib/components/flat-table/sort/sort.component.js +1 -1
- package/lib/components/flat-table/sort/sort.style.d.ts +5 -11
- package/lib/components/flat-table/sort/sort.style.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import{useRef as o}from"react";import{useStrictFlatTableContext as n}from"../__internal__/strict-flat-table.context.js";import{Typography as a}from"../../typography/typography.component.js";import l from"../../../__internal__/utils/helpers/events/events.js";import s from"../../../__internal__/utils/helpers/guid/index.js";import i from"../../../hooks/__internal__/useLocale/useLocale.js";import c from"../../icon/icon.component.js";import m from"./sort.style.js";const p=({children:p,onClick:d,sortType:_,accessibleName:u,"data-element":h,"data-role":f})=>{const y=o(s()),j=i(),{colorTheme:b}=n();return e(r,{children:[t(a,{screenReaderOnly:!0,id:y.current,children:u||j.sort.accessibleName(p,_)}),e(m,{"aria-labelledby":y.current,colorTheme:b,"data-component":"sort","data-element":h,"data-role":f,onClick:d,onKeyDown:e=>l.isEnterOrSpaceKey(e)?(e.preventDefault(),null==d?void 0:d()):null,children:[t("span",{children:p}),_?t(c,{"data-element":"sort-icon",type:"ascending"===_?"sort_up":"sort_down"}):t("span",{"data-role":"sort-placeholder"})]})]})};export{p as Sort,p as default};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const StyledSpaceHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
-
interface StylesSortIconProps extends StyledIconProps {
|
|
8
|
-
iconColor?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const StyledSortIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../icon").IconProps & import("react").RefAttributes<HTMLSpanElement>>, any, StylesSortIconProps, never>;
|
|
11
|
-
export { StyledSort, StyledSpaceHolder, StyledSortIcon };
|
|
1
|
+
declare const StyledSortButton: import("styled-components").StyledComponent<"button", any, {
|
|
2
|
+
colorTheme?: "light" | "transparent-base" | "transparent-white" | "dark";
|
|
3
|
+
size?: "compact" | "small" | "medium" | "large" | "extraLarge";
|
|
4
|
+
}, never>;
|
|
5
|
+
export default StyledSortButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"styled-components";import
|
|
1
|
+
import o,{css as t}from"styled-components";import r from"../../../style/utils/add-focus-styling.js";const e={compact:{fontSize:"13px"},small:{fontSize:"14px"},medium:{fontSize:"14px"},large:{fontSize:"16px"},extraLarge:{fontSize:"16px"}},i=o.button.withConfig({displayName:"sort.style__StyledSortButton",componentId:"sc-93b844db-0"})(["",""],(({colorTheme:o="light",size:i="medium"})=>t(["align-items:center;background:transparent;border:none;border-radius:0;color:",";display:inline-flex;font-size:",';font-weight:500;gap:var(--spacing075);position:relative;text-align:left;word-break:keep-all;span[data-role="sort-placeholder"]{min-width:24px;:hover{border-bottom:none;}}&:hover{span:first-of-type{border-bottom:1px solid ',";}}:focus{",' border-radius:var(--borderRadius025);}span[data-component="icon"]{color:',";margin-bottom:1px;}"],"dark"===o?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)",e[i].fontSize,"dark"===o?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)",r(),"dark"===o?"var(--colorsActionMinorYang100)":"var(--colorActionMinor500)")));export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../__internal__/strict-flat-table.context.js"),s=require("../../typography/typography.component.js"),n=require("../../../__internal__/utils/helpers/events/events.js"),a=require("../../../__internal__/utils/helpers/guid/index.js"),l=require("../../../hooks/__internal__/useLocale/useLocale.js"),o=require("../../icon/icon.component.js"),i=require("./sort.style.js");const c=({children:c,onClick:u,sortType:d,accessibleName:p,"data-element":_,"data-role":j})=>{const h=r.useRef(a.default()),y=l.default(),{colorTheme:x}=t.useStrictFlatTableContext();return e.jsxs(e.Fragment,{children:[e.jsx(s.Typography,{screenReaderOnly:!0,id:h.current,children:p||y.sort.accessibleName(c,d)}),e.jsxs(i.default,{"aria-labelledby":h.current,colorTheme:x,"data-component":"sort","data-element":_,"data-role":j,onClick:u,onKeyDown:e=>n.default.isEnterOrSpaceKey(e)?(e.preventDefault(),null==u?void 0:u()):null,children:[e.jsx("span",{children:c}),d?e.jsx(o.default,{"data-element":"sort-icon",type:"ascending"===d?"sort_up":"sort_down"}):e.jsx("span",{"data-role":"sort-placeholder"})]})]})};exports.Sort=c,exports.default=c;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const StyledSpaceHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
-
interface StylesSortIconProps extends StyledIconProps {
|
|
8
|
-
iconColor?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const StyledSortIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../icon").IconProps & import("react").RefAttributes<HTMLSpanElement>>, any, StylesSortIconProps, never>;
|
|
11
|
-
export { StyledSort, StyledSpaceHolder, StyledSortIcon };
|
|
1
|
+
declare const StyledSortButton: import("styled-components").StyledComponent<"button", any, {
|
|
2
|
+
colorTheme?: "light" | "transparent-base" | "transparent-white" | "dark";
|
|
3
|
+
size?: "compact" | "small" | "medium" | "large" | "extraLarge";
|
|
4
|
+
}, never>;
|
|
5
|
+
export default StyledSortButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("styled-components"),e=require("../../../style/utils/add-focus-styling.js");function t(o){return o&&o.__esModule?o:{default:o}}const r={compact:{fontSize:"13px"},small:{fontSize:"14px"},medium:{fontSize:"14px"},large:{fontSize:"16px"},extraLarge:{fontSize:"16px"}},i=t(o).default.button.withConfig({displayName:"sort.style__StyledSortButton",componentId:"sc-93b844db-0"})(["",""],(({colorTheme:t="light",size:i="medium"})=>o.css(["align-items:center;background:transparent;border:none;border-radius:0;color:",";display:inline-flex;font-size:",';font-weight:500;gap:var(--spacing075);position:relative;text-align:left;word-break:keep-all;span[data-role="sort-placeholder"]{min-width:24px;:hover{border-bottom:none;}}&:hover{span:first-of-type{border-bottom:1px solid ',";}}:focus{",' border-radius:var(--borderRadius025);}span[data-component="icon"]{color:',";margin-bottom:1px;}"],"dark"===t?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)",r[i].fontSize,"dark"===t?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)",e.default(),"dark"===t?"var(--colorsActionMinorYang100)":"var(--colorActionMinor500)")));exports.default=i;
|