@elliemae/ds-tab-button 3.60.0-next.20

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.
Files changed (49) hide show
  1. package/dist/cjs/DSTabButton.js +106 -0
  2. package/dist/cjs/DSTabButton.js.map +7 -0
  3. package/dist/cjs/config/useTabButton.js +60 -0
  4. package/dist/cjs/config/useTabButton.js.map +7 -0
  5. package/dist/cjs/config/useValidateProps.js +40 -0
  6. package/dist/cjs/config/useValidateProps.js.map +7 -0
  7. package/dist/cjs/constants/index.js +56 -0
  8. package/dist/cjs/constants/index.js.map +7 -0
  9. package/dist/cjs/index.js +40 -0
  10. package/dist/cjs/index.js.map +7 -0
  11. package/dist/cjs/package.json +10 -0
  12. package/dist/cjs/react-desc-prop-types.js +57 -0
  13. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  14. package/dist/cjs/styles.js +186 -0
  15. package/dist/cjs/styles.js.map +7 -0
  16. package/dist/cjs/typescript-testing/DSTabButtonNamespace.js +122 -0
  17. package/dist/cjs/typescript-testing/DSTabButtonNamespace.js.map +7 -0
  18. package/dist/esm/DSTabButton.js +82 -0
  19. package/dist/esm/DSTabButton.js.map +7 -0
  20. package/dist/esm/config/useTabButton.js +30 -0
  21. package/dist/esm/config/useTabButton.js.map +7 -0
  22. package/dist/esm/config/useValidateProps.js +10 -0
  23. package/dist/esm/config/useValidateProps.js.map +7 -0
  24. package/dist/esm/constants/index.js +26 -0
  25. package/dist/esm/constants/index.js.map +7 -0
  26. package/dist/esm/index.js +10 -0
  27. package/dist/esm/index.js.map +7 -0
  28. package/dist/esm/package.json +10 -0
  29. package/dist/esm/react-desc-prop-types.js +32 -0
  30. package/dist/esm/react-desc-prop-types.js.map +7 -0
  31. package/dist/esm/styles.js +156 -0
  32. package/dist/esm/styles.js.map +7 -0
  33. package/dist/esm/typescript-testing/DSTabButtonNamespace.js +99 -0
  34. package/dist/esm/typescript-testing/DSTabButtonNamespace.js.map +7 -0
  35. package/dist/types/DSTabButton.d.ts +5 -0
  36. package/dist/types/config/useTabButton.d.ts +12 -0
  37. package/dist/types/config/useValidateProps.d.ts +3 -0
  38. package/dist/types/constants/index.d.ts +19 -0
  39. package/dist/types/index.d.ts +3 -0
  40. package/dist/types/react-desc-prop-types.d.ts +26 -0
  41. package/dist/types/styles.d.ts +19 -0
  42. package/dist/types/tests/DSTabButton.API.test.d.ts +1 -0
  43. package/dist/types/tests/DSTabButton.data-testid.test.d.ts +1 -0
  44. package/dist/types/tests/DSTabButton.exports.test.d.ts +1 -0
  45. package/dist/types/tests/DSTabButton.keyboard.test.d.ts +1 -0
  46. package/dist/types/tests/DSTabButton.test.d.ts +1 -0
  47. package/dist/types/tests/axe.test.d.ts +1 -0
  48. package/dist/types/typescript-testing/DSTabButtonNamespace.d.ts +1 -0
  49. package/package.json +73 -0
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var DSTabButton_exports = {};
30
+ __export(DSTabButton_exports, {
31
+ DSTabButton: () => DSTabButton,
32
+ DSTabButtonWithSchema: () => DSTabButtonWithSchema
33
+ });
34
+ module.exports = __toCommonJS(DSTabButton_exports);
35
+ var React = __toESM(require("react"));
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_react_desc_prop_types = require("./react-desc-prop-types.js");
39
+ var import_useTabButton = require("./config/useTabButton.js");
40
+ var import_constants = require("./constants/index.js");
41
+ var import_styles = require("./styles.js");
42
+ const DSTabButton = (props) => {
43
+ const { propsWithDefault, xstyledProps } = (0, import_useTabButton.useTabButton)(props);
44
+ const {
45
+ onClick,
46
+ onKeyDown,
47
+ disabled = false,
48
+ children,
49
+ isSelected,
50
+ variant,
51
+ label,
52
+ notificationBadge,
53
+ required,
54
+ applyAriaDisabled,
55
+ ...rest
56
+ } = propsWithDefault;
57
+ const hasChildren = !!children;
58
+ const isDisabled = disabled || applyAriaDisabled;
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
60
+ import_styles.StyledTabButton,
61
+ {
62
+ ...rest,
63
+ type: "button",
64
+ "aria-disabled": isDisabled,
65
+ tabType: variant,
66
+ disabled,
67
+ onClick: !isDisabled ? onClick : void 0,
68
+ onKeyDown: isDisabled ? (e) => {
69
+ if (e.key === "Enter" || e.key === " ") return;
70
+ onKeyDown?.(e);
71
+ } : onKeyDown,
72
+ ...xstyledProps,
73
+ getOwnerProps: () => propsWithDefault,
74
+ getOwnerPropsArguments: () => ({}),
75
+ children: [
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ import_styles.StyledTypography,
78
+ {
79
+ $isSelected: isSelected,
80
+ $isDisabled: isDisabled,
81
+ $tabType: variant,
82
+ variant: "b2",
83
+ component: "span",
84
+ getOwnerProps: () => propsWithDefault,
85
+ getOwnerPropsArguments: () => ({}),
86
+ children: label
87
+ }
88
+ ),
89
+ notificationBadge || required ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledChildrenWrapper, { getOwnerProps: () => propsWithDefault, getOwnerPropsArguments: () => ({}), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ import_styles.StyledNotificationBadge,
91
+ {
92
+ "aria-hidden": "true",
93
+ getOwnerProps: () => propsWithDefault,
94
+ getOwnerPropsArguments: () => ({})
95
+ }
96
+ ) }) : null,
97
+ required ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.ScreenReaderOnly, { getOwnerProps: () => propsWithDefault, getOwnerPropsArguments: () => ({}), children: "Required" }) : null,
98
+ hasChildren && !notificationBadge ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledChildrenWrapper, { getOwnerProps: () => propsWithDefault, getOwnerPropsArguments: () => ({}), children }) : null
99
+ ]
100
+ }
101
+ );
102
+ };
103
+ DSTabButton.displayName = import_constants.DSTabButtonName;
104
+ const DSTabButtonWithSchema = (0, import_ds_props_helpers.describe)(DSTabButton);
105
+ DSTabButtonWithSchema.propTypes = import_react_desc_prop_types.DSTabButtonPropTypesSchema;
106
+ //# sourceMappingURL=DSTabButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/DSTabButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { type DSTabButtonT, DSTabButtonPropTypesSchema } from './react-desc-prop-types.js';\nimport { useTabButton } from './config/useTabButton.js';\nimport { DSTabButtonName } from './constants/index.js';\nimport {\n StyledChildrenWrapper,\n StyledNotificationBadge,\n StyledTabButton,\n StyledTypography,\n ScreenReaderOnly,\n} from './styles.js';\n\nconst DSTabButton: React.ComponentType<DSTabButtonT.Props> = (props) => {\n const { propsWithDefault, xstyledProps } = useTabButton(props);\n\n const {\n onClick,\n onKeyDown,\n disabled = false,\n children,\n isSelected,\n variant,\n label,\n notificationBadge,\n required,\n applyAriaDisabled,\n ...rest\n } = propsWithDefault;\n const hasChildren = !!children;\n const isDisabled = disabled || applyAriaDisabled;\n\n return (\n <StyledTabButton\n {...rest}\n type=\"button\"\n aria-disabled={isDisabled}\n tabType={variant}\n disabled={disabled}\n onClick={!isDisabled ? onClick : undefined}\n onKeyDown={\n isDisabled\n ? (e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === 'Enter' || e.key === ' ') return;\n onKeyDown?.(e);\n }\n : onKeyDown\n }\n {...xstyledProps}\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n <StyledTypography\n $isSelected={isSelected}\n $isDisabled={isDisabled}\n $tabType={variant}\n variant=\"b2\"\n component=\"span\"\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n >\n {label}\n </StyledTypography>\n {notificationBadge || required ? (\n <StyledChildrenWrapper getOwnerProps={() => propsWithDefault} getOwnerPropsArguments={() => ({})}>\n <StyledNotificationBadge\n aria-hidden=\"true\"\n getOwnerProps={() => propsWithDefault}\n getOwnerPropsArguments={() => ({})}\n />\n </StyledChildrenWrapper>\n ) : null}\n {required ? (\n <ScreenReaderOnly getOwnerProps={() => propsWithDefault} getOwnerPropsArguments={() => ({})}>\n Required\n </ScreenReaderOnly>\n ) : null}\n {hasChildren && !notificationBadge ? (\n <StyledChildrenWrapper getOwnerProps={() => propsWithDefault} getOwnerPropsArguments={() => ({})}>\n {children}\n </StyledChildrenWrapper>\n ) : null}\n </StyledTabButton>\n );\n};\n\nDSTabButton.displayName = DSTabButtonName;\nconst DSTabButtonWithSchema = describe(DSTabButton);\nDSTabButtonWithSchema.propTypes = DSTabButtonPropTypesSchema;\n\nexport { DSTabButton, DSTabButtonWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiCnB;AAhCJ,8BAAyB;AACzB,mCAA8D;AAC9D,0BAA6B;AAC7B,uBAAgC;AAChC,oBAMO;AAEP,MAAM,cAAuD,CAAC,UAAU;AACtE,QAAM,EAAE,kBAAkB,aAAa,QAAI,kCAAa,KAAK;AAE7D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAc,CAAC,CAAC;AACtB,QAAM,aAAa,YAAY;AAE/B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,SAAS;AAAA,MACT;AAAA,MACA,SAAS,CAAC,aAAa,UAAU;AAAA,MACjC,WACE,aACI,CAAC,MAAwC;AACvC,YAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,IAAK;AACxC,oBAAY,CAAC;AAAA,MACf,IACA;AAAA,MAEL,GAAG;AAAA,MACJ,eAAe,MAAM;AAAA,MACrB,wBAAwB,OAAO,CAAC;AAAA,MAEhC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,aAAa;AAAA,YACb,aAAa;AAAA,YACb,UAAU;AAAA,YACV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,eAAe,MAAM;AAAA,YACrB,wBAAwB,OAAO,CAAC;AAAA,YAE/B;AAAA;AAAA,QACH;AAAA,QACC,qBAAqB,WACpB,4CAAC,uCAAsB,eAAe,MAAM,kBAAkB,wBAAwB,OAAO,CAAC,IAC5F;AAAA,UAAC;AAAA;AAAA,YACC,eAAY;AAAA,YACZ,eAAe,MAAM;AAAA,YACrB,wBAAwB,OAAO,CAAC;AAAA;AAAA,QAClC,GACF,IACE;AAAA,QACH,WACC,4CAAC,kCAAiB,eAAe,MAAM,kBAAkB,wBAAwB,OAAO,CAAC,IAAI,sBAE7F,IACE;AAAA,QACH,eAAe,CAAC,oBACf,4CAAC,uCAAsB,eAAe,MAAM,kBAAkB,wBAAwB,OAAO,CAAC,IAC3F,UACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AAEA,YAAY,cAAc;AAC1B,MAAM,4BAAwB,kCAAS,WAAW;AAClD,sBAAsB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useTabButton_exports = {};
30
+ __export(useTabButton_exports, {
31
+ useTabButton: () => useTabButton
32
+ });
33
+ module.exports = __toCommonJS(useTabButton_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_react = __toESM(require("react"));
36
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
37
+ var import_uid = require("uid");
38
+ var import_react_desc_prop_types = require("../react-desc-prop-types.js");
39
+ var import_useValidateProps = require("./useValidateProps.js");
40
+ const useTabButton = (propsFromUser) => {
41
+ const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(propsFromUser, import_react_desc_prop_types.defaultProps);
42
+ (0, import_useValidateProps.useValidateProps)(propsWithDefault, import_react_desc_prop_types.DSTabButtonPropTypes);
43
+ const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)(propsWithDefault);
44
+ const instanceUid = import_react.default.useMemo(() => `ds-tab-button-${(0, import_uid.uid)(5)}`, []);
45
+ return import_react.default.useMemo(
46
+ () => ({
47
+ propsWithDefault,
48
+ xstyledProps,
49
+ instanceUid
50
+ // ...eventHandlers,
51
+ }),
52
+ [
53
+ propsWithDefault,
54
+ xstyledProps,
55
+ instanceUid
56
+ // eventHandlers,
57
+ ]
58
+ );
59
+ };
60
+ //# sourceMappingURL=useTabButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/useTabButton.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import React from 'react';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { type DSTabButtonT, DSTabButtonPropTypes, defaultProps } from '../react-desc-prop-types.js';\nimport { useValidateProps } from './useValidateProps.js';\n\nexport interface TabButtonCTX {\n propsWithDefault: DSTabButtonT.InternalProps;\n xstyledProps: ReturnType<typeof useGetXstyledProps>;\n instanceUid: string;\n}\n\nexport const useTabButton = (propsFromUser: DSTabButtonT.Props) => {\n // =============================================================================\n // MERGE WITH DEFAULT AND VALIDATE PROPS\n // =============================================================================\n const propsWithDefault = useMemoMergePropsWithDefault<DSTabButtonT.InternalProps>(propsFromUser, defaultProps);\n useValidateProps(propsWithDefault, DSTabButtonPropTypes);\n // =============================================================================\n // XSTYLED PROPS\n // =============================================================================\n const xstyledProps = useGetXstyledProps(propsWithDefault);\n // =============================================================================\n // AD HOC PER COMPONENT LOGIC\n // =============================================================================\n // custom code goes here, this is an example\n const instanceUid = React.useMemo(() => `ds-tab-button-${uid(5)}`, []);\n // =============================================================================\n // HELPERS HOOKS CONFIGS\n // =============================================================================\n // const eventHandlers = useEventHandlers({ propsWithDefault, instanceUid }); // <-- complex logic should be made atomics this way\n\n return React.useMemo(\n () => ({\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // ...eventHandlers,\n }),\n [\n propsWithDefault,\n xstyledProps,\n instanceUid,\n // eventHandlers,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,8BAAiE;AACjE,iBAAoB;AACpB,mCAAsE;AACtE,8BAAiC;AAQ1B,MAAM,eAAe,CAAC,kBAAsC;AAIjE,QAAM,uBAAmB,sDAAyD,eAAe,yCAAY;AAC7G,gDAAiB,kBAAkB,iDAAoB;AAIvD,QAAM,mBAAe,4CAAmB,gBAAgB;AAKxD,QAAM,cAAc,aAAAA,QAAM,QAAQ,MAAM,qBAAiB,gBAAI,CAAC,CAAC,IAAI,CAAC,CAAC;AAMrE,SAAO,aAAAA,QAAM;AAAA,IACX,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEF;AAAA,EACF;AACF;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var useValidateProps_exports = {};
30
+ __export(useValidateProps_exports, {
31
+ useValidateProps: () => useValidateProps
32
+ });
33
+ module.exports = __toCommonJS(useValidateProps_exports);
34
+ var React = __toESM(require("react"));
35
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
+ var import_constants = require("../constants/index.js");
37
+ const useValidateProps = (props, propTypes) => {
38
+ (0, import_ds_props_helpers.useValidateTypescriptPropTypes)(props, propTypes, import_constants.DSTabButtonName);
39
+ };
40
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/config/useValidateProps.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport type { ValidationMap } from '@elliemae/ds-props-helpers';\nimport { type DSTabButtonT } from '../react-desc-prop-types.js';\nimport { DSTabButtonName } from '../constants/index.js';\n\nexport const useValidateProps = (props: DSTabButtonT.InternalProps, propTypes: ValidationMap<unknown>): void => {\n // we validate the \"required if\" via 'isRequiredIf from our custom PropTypes\n useValidateTypescriptPropTypes(props, propTypes, DSTabButtonName);\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA+C;AAG/C,uBAAgC;AAEzB,MAAM,mBAAmB,CAAC,OAAmC,cAA4C;AAE9G,8DAA+B,OAAO,WAAW,gCAAe;AAClE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var constants_exports = {};
30
+ __export(constants_exports, {
31
+ DSTabButtonName: () => DSTabButtonName,
32
+ TAB_BUTTON_DATA_TESTID: () => TAB_BUTTON_DATA_TESTID,
33
+ TAB_BUTTON_SLOTS: () => TAB_BUTTON_SLOTS,
34
+ TAB_TYPES: () => TAB_TYPES,
35
+ TAB_TYPES_VALUES_AS_ARRAY: () => TAB_TYPES_VALUES_AS_ARRAY
36
+ });
37
+ module.exports = __toCommonJS(constants_exports);
38
+ var React = __toESM(require("react"));
39
+ var import_ds_system = require("@elliemae/ds-system");
40
+ const DSTabButtonName = "DSTabbutton";
41
+ const TAB_TYPES = {
42
+ PRIMARY: "primary",
43
+ PRIMARY_SMALL: "primary-small",
44
+ SECONDARY: "secondary"
45
+ };
46
+ const TAB_TYPES_VALUES_AS_ARRAY = Object.values(TAB_TYPES);
47
+ const TAB_BUTTON_SLOTS = {
48
+ ROOT: "root",
49
+ LABEL: "label",
50
+ REQUIRED_MARK: "required-mark",
51
+ CHILDREN_WRAPPER: "children-wrapper"
52
+ };
53
+ const TAB_BUTTON_DATA_TESTID = {
54
+ ...(0, import_ds_system.slotObjectToDataTestIds)(DSTabButtonName, TAB_BUTTON_SLOTS)
55
+ };
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/index.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSTabButtonName = 'DSTabbutton';\n\nexport const TAB_TYPES = {\n PRIMARY: 'primary',\n PRIMARY_SMALL: 'primary-small',\n SECONDARY: 'secondary',\n} as const;\n\nexport const TAB_TYPES_VALUES_AS_ARRAY = Object.values(TAB_TYPES);\n\nexport const TAB_BUTTON_SLOTS = {\n ROOT: 'root',\n LABEL: 'label',\n REQUIRED_MARK: 'required-mark',\n CHILDREN_WRAPPER: 'children-wrapper',\n} as const;\n\nexport const TAB_BUTTON_DATA_TESTID = {\n ...slotObjectToDataTestIds(DSTabButtonName, TAB_BUTTON_SLOTS),\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,kBAAkB;AAExB,MAAM,YAAY;AAAA,EACvB,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AACb;AAEO,MAAM,4BAA4B,OAAO,OAAO,SAAS;AAEzD,MAAM,mBAAmB;AAAA,EAC9B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,eAAe;AAAA,EACf,kBAAkB;AACpB;AAEO,MAAM,yBAAyB;AAAA,EACpC,OAAG,0CAAwB,iBAAiB,gBAAgB;AAC9D;",
6
+ "names": []
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var index_exports = {};
30
+ __export(index_exports, {
31
+ DSTabButton: () => import_DSTabButton.DSTabButton,
32
+ DSTabButtonWithSchema: () => import_DSTabButton.DSTabButtonWithSchema,
33
+ TAB_BUTTON_DATA_TESTID: () => import_constants.TAB_BUTTON_DATA_TESTID,
34
+ TAB_BUTTON_SLOTS: () => import_constants.TAB_BUTTON_SLOTS
35
+ });
36
+ module.exports = __toCommonJS(index_exports);
37
+ var React = __toESM(require("react"));
38
+ var import_DSTabButton = require("./DSTabButton.js");
39
+ var import_constants = require("./constants/index.js");
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["// this is a workaround to typescript error TS2742\n// https://github.com/microsoft/TypeScript/issues/47663\nimport type {} from '@xstyled/system';\nexport { DSTabButton, DSTabButtonWithSchema } from './DSTabButton.js';\nexport { type DSTabButtonT } from './react-desc-prop-types.js';\nexport { TAB_BUTTON_SLOTS, TAB_BUTTON_DATA_TESTID } from './constants/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,yBAAmD;AAEnD,uBAAyD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ],
7
+ "publishConfig": {
8
+ "access": "public"
9
+ }
10
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var react_desc_prop_types_exports = {};
30
+ __export(react_desc_prop_types_exports, {
31
+ DSTabButtonPropTypes: () => DSTabButtonPropTypes,
32
+ DSTabButtonPropTypesSchema: () => DSTabButtonPropTypesSchema,
33
+ defaultProps: () => defaultProps
34
+ });
35
+ module.exports = __toCommonJS(react_desc_prop_types_exports);
36
+ var React = __toESM(require("react"));
37
+ var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
38
+ var import_constants = require("./constants/index.js");
39
+ const defaultProps = {
40
+ variant: import_constants.TAB_TYPES.PRIMARY,
41
+ isSelected: false,
42
+ notificationBadge: false,
43
+ required: false
44
+ };
45
+ const DSTabButtonPropTypes = {
46
+ ...(0, import_ds_props_helpers.getPropsPerSlotPropTypes)(import_constants.DSTabButtonName, import_constants.TAB_BUTTON_SLOTS),
47
+ ...import_ds_props_helpers.globalAttributesPropTypes,
48
+ ...import_ds_props_helpers.xstyledPropTypes,
49
+ label: import_ds_props_helpers.PropTypes.string.description("The label of the tab button."),
50
+ variant: import_ds_props_helpers.PropTypes.oneOf(["primary", "secondary", "primary-small"]).description("The variant of the tab button.").defaultValue("primary"),
51
+ isSelected: import_ds_props_helpers.PropTypes.bool.description("Indicates if the tab button is currently selected.").defaultValue(false),
52
+ notificationBadge: import_ds_props_helpers.PropTypes.bool.description("Indicates if the tab button has a notification badge.").defaultValue(false),
53
+ required: import_ds_props_helpers.PropTypes.bool.description("Indicates if the tab button is required.").defaultValue(false),
54
+ applyAriaDisabled: import_ds_props_helpers.PropTypes.bool.description("Indicates if the tab button should apply aria-disabled.").defaultValue(false)
55
+ };
56
+ const DSTabButtonPropTypesSchema = DSTabButtonPropTypes;
57
+ //# sourceMappingURL=react-desc-prop-types.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport { DSTabButtonName, TAB_BUTTON_SLOTS, TAB_TYPES } from './constants/index.js';\n\nexport declare namespace DSTabButtonT {\n export type TabButtonVariant = (typeof TAB_TYPES)[keyof typeof TAB_TYPES];\n export interface RequiredProps {\n label: string;\n }\n\n export interface DefaultProps {\n variant: TabButtonVariant;\n isSelected: boolean;\n notificationBadge?: boolean;\n required?: boolean;\n applyAriaDisabled?: boolean;\n }\n\n export interface OptionalProps\n extends TypescriptHelpersT.PropsForGlobalOnSlots<typeof DSTabButtonName, typeof TAB_BUTTON_SLOTS> {\n className?: string;\n }\n\n export interface Props\n extends Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps | keyof RequiredProps>,\n XstyledProps,\n RequiredProps {}\n}\n\nexport const defaultProps: DSTabButtonT.DefaultProps = {\n variant: TAB_TYPES.PRIMARY,\n isSelected: false,\n notificationBadge: false,\n required: false,\n};\n\nexport const DSTabButtonPropTypes: DSPropTypesSchema<DSTabButtonT.Props> = {\n ...getPropsPerSlotPropTypes(DSTabButtonName, TAB_BUTTON_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n label: PropTypes.string.description('The label of the tab button.'),\n variant: PropTypes.oneOf(['primary', 'secondary', 'primary-small'])\n .description('The variant of the tab button.')\n .defaultValue('primary'),\n isSelected: PropTypes.bool.description('Indicates if the tab button is currently selected.').defaultValue(false),\n notificationBadge: PropTypes.bool\n .description('Indicates if the tab button has a notification badge.')\n .defaultValue(false),\n required: PropTypes.bool.description('Indicates if the tab button is required.').defaultValue(false),\n applyAriaDisabled: PropTypes.bool\n .description('Indicates if the tab button should apply aria-disabled.')\n .defaultValue(false),\n};\n\nexport const DSTabButtonPropTypesSchema = DSTabButtonPropTypes as unknown as ValidationMap<DSTabButtonT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,8BAKO;AAEP,uBAA6D;AAoCtD,MAAM,eAA0C;AAAA,EACrD,SAAS,2BAAU;AAAA,EACnB,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,UAAU;AACZ;AAEO,MAAM,uBAA8D;AAAA,EACzE,OAAG,kDAAyB,kCAAiB,iCAAgB;AAAA,EAC7D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,OAAO,YAAY,8BAA8B;AAAA,EAClE,SAAS,kCAAU,MAAM,CAAC,WAAW,aAAa,eAAe,CAAC,EAC/D,YAAY,gCAAgC,EAC5C,aAAa,SAAS;AAAA,EACzB,YAAY,kCAAU,KAAK,YAAY,oDAAoD,EAAE,aAAa,KAAK;AAAA,EAC/G,mBAAmB,kCAAU,KAC1B,YAAY,uDAAuD,EACnE,aAAa,KAAK;AAAA,EACrB,UAAU,kCAAU,KAAK,YAAY,0CAA0C,EAAE,aAAa,KAAK;AAAA,EACnG,mBAAmB,kCAAU,KAC1B,YAAY,yDAAyD,EACrE,aAAa,KAAK;AACvB;AAEO,MAAM,6BAA6B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var styles_exports = {};
30
+ __export(styles_exports, {
31
+ ScreenReaderOnly: () => ScreenReaderOnly,
32
+ StyledChildrenWrapper: () => StyledChildrenWrapper,
33
+ StyledNotificationBadge: () => StyledNotificationBadge,
34
+ StyledTabButton: () => StyledTabButton,
35
+ StyledTypography: () => StyledTypography
36
+ });
37
+ module.exports = __toCommonJS(styles_exports);
38
+ var React = __toESM(require("react"));
39
+ var import_ds_system = require("@elliemae/ds-system");
40
+ var import_ds_typography = require("@elliemae/ds-typography");
41
+ var import_constants = require("./constants/index.js");
42
+ const borderAroundFocus = import_ds_system.css`
43
+ &:after {
44
+ pointer-events: none;
45
+ display: block;
46
+ position: absolute;
47
+ content: '';
48
+ top: 0;
49
+ left: 0;
50
+ width: 100%;
51
+ height: 100%;
52
+ z-index: 3;
53
+ border-radius: 2px;
54
+ border: 2px solid ${({ theme }) => theme.colors.brand[700]};
55
+ }
56
+ `;
57
+ const borderAroundFocusUnderline = import_ds_system.css`
58
+ &:before {
59
+ position: absolute;
60
+ content: '';
61
+ left: -16px;
62
+ right: 0;
63
+ top: calc(100% - 2px);
64
+ transform: none;
65
+ width: calc(100% + 32px);
66
+ height: 2px;
67
+ z-index: 10;
68
+ background: linear-gradient(
69
+ to right,
70
+ transparent 0px,
71
+ transparent 12px,
72
+ white 12px,
73
+ white 16px,
74
+ transparent 16px,
75
+ transparent calc(100% - 16px),
76
+ white calc(100% - 16px),
77
+ white calc(100% - 12px),
78
+ transparent calc(100% - 12px),
79
+ transparent 100%
80
+ );
81
+ }
82
+ `;
83
+ const unlineLabelSelected = import_ds_system.css`
84
+ &:before {
85
+ pointer-events: none;
86
+ display: block;
87
+ content: '';
88
+ position: absolute;
89
+ height: 3px;
90
+ width: calc(100% + var(--border-width) * 2);
91
+ left: calc(var(--border-width) * -1);
92
+ bottom: 0;
93
+ top: initial;
94
+ z-index: 6;
95
+ background: ${({ theme }) => theme.colors.brand[700]};
96
+ border-left: var(--border-width) solid ${({ theme }) => theme.colors.neutral["000"]};
97
+ border-right: var(--border-width) solid ${({ theme }) => theme.colors.neutral["000"]};
98
+ }
99
+ `;
100
+ const baseButtonStyles = import_ds_system.css`
101
+ --border-width: 2px;
102
+ --height-padding: ${({ tabType }) => tabType === import_constants.TAB_TYPES.PRIMARY_SMALL || tabType === import_constants.TAB_TYPES.SECONDARY ? "2px" : "7px"};
103
+ --width-padding: 16px;
104
+ --width-padding-calc: calc(var(--width-padding) * 2);
105
+
106
+ position: relative;
107
+ background-color: transparent;
108
+ border: none;
109
+ cursor: pointer;
110
+ padding: 0 var(--width-padding);
111
+ margin: 0;
112
+ transition: 100ms cubic-bezier(0, 0, 0.42, 1);
113
+ text-transform: ${({ tabType }) => {
114
+ if (tabType === import_constants.TAB_TYPES.SECONDARY) return "capitalize";
115
+ return "uppercase";
116
+ }};
117
+ width: fit-content;
118
+ display: flex;
119
+ gap: ${({ notificationBadge }) => notificationBadge ? "2px" : "8px"};
120
+ white-space: nowrap;
121
+ color: ${({ theme }) => theme.colors.neutral[700]};
122
+ ${({ tabType }) => tabType === import_constants.TAB_TYPES.PRIMARY ? `min-height: 32px;` : `min-height: 22px;`}
123
+
124
+ &[aria-disabled='true'] {
125
+ color: ${({ theme }) => theme.colors.neutral[500]};
126
+ cursor: not-allowed;
127
+ }
128
+
129
+ &:hover:not(disabled) {
130
+ color: ${({ theme }) => theme.colors.brand[600]};
131
+ }
132
+
133
+ &:focus {
134
+ outline: none;
135
+ ${borderAroundFocus}
136
+ ${({ isActive, tabType }) => tabType !== import_constants.TAB_TYPES.SECONDARY && isActive ? borderAroundFocusUnderline : ``}
137
+ }
138
+ `;
139
+ const StyledNotificationBadge = (0, import_ds_system.styled)("span", {
140
+ name: import_constants.DSTabButtonName,
141
+ slot: import_constants.TAB_BUTTON_SLOTS.REQUIRED_MARK
142
+ })`
143
+ width: 0.46rem;
144
+ height: 0.46rem;
145
+ background-color: ${({ theme }) => theme.colors.danger[900]};
146
+ border-radius: 50%;
147
+ display: inline-block;
148
+ position: absolute;
149
+ top: 0;
150
+ right: 0;
151
+ `;
152
+ const StyledTabButton = (0, import_ds_system.styled)("button", {
153
+ name: import_constants.DSTabButtonName,
154
+ slot: import_constants.TAB_BUTTON_SLOTS.ROOT
155
+ })`
156
+ ${baseButtonStyles}
157
+ `;
158
+ const StyledTypography = (0, import_ds_system.styled)(import_ds_typography.DSTypography, {
159
+ name: import_constants.DSTabButtonName,
160
+ slot: import_constants.TAB_BUTTON_SLOTS.LABEL
161
+ })`
162
+ padding: var(--height-padding) 0;
163
+ position: relative;
164
+ z-index: 4;
165
+ white-space: nowrap;
166
+ ${({ $isSelected, $tabType }) => $isSelected && $tabType !== import_constants.TAB_TYPES.SECONDARY && unlineLabelSelected}
167
+ ${({ $isSelected }) => $isSelected && `font-weight: 600;`}
168
+ ${({ $isDisabled, theme }) => $isDisabled && `color: ${theme.colors.neutral[600]};`}
169
+ `;
170
+ const StyledChildrenWrapper = (0, import_ds_system.styled)("span", {
171
+ name: import_constants.DSTabButtonName,
172
+ slot: import_constants.TAB_BUTTON_SLOTS.CHILDREN_WRAPPER
173
+ })`
174
+ margin: var(--height-padding) 0;
175
+ position: relative;
176
+ `;
177
+ const ScreenReaderOnly = import_ds_system.styled.span`
178
+ clip: rect(0 0 0 0);
179
+ clip-path: inset(50%);
180
+ height: 1px;
181
+ overflow: hidden;
182
+ position: absolute;
183
+ white-space: nowrap;
184
+ width: 1px;
185
+ `;
186
+ //# sourceMappingURL=styles.js.map