@veeqo/ui 14.1.1 → 14.3.0-beta-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/dist/components/Accordion/styled.cjs +19 -9
- package/dist/components/Accordion/styled.cjs.map +1 -1
- package/dist/components/Accordion/styled.d.ts +9 -23
- package/dist/components/Accordion/styled.js +19 -9
- package/dist/components/Accordion/styled.js.map +1 -1
- package/dist/components/Action/Action.cjs +19 -10
- package/dist/components/Action/Action.cjs.map +1 -1
- package/dist/components/Action/Action.d.ts +66 -19
- package/dist/components/Action/Action.js +19 -11
- package/dist/components/Action/Action.js.map +1 -1
- package/dist/components/Action/styles/button.module.scss.cjs +2 -2
- package/dist/components/Action/styles/button.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/button.module.scss.js +2 -2
- package/dist/components/Action/styles/button.module.scss.js.map +1 -1
- package/dist/components/Action/styles/link.module.scss.cjs +2 -2
- package/dist/components/Action/styles/link.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/link.module.scss.js +2 -2
- package/dist/components/Action/styles/link.module.scss.js.map +1 -1
- package/dist/components/Action/types.d.ts +17 -1
- package/dist/components/Action/utils.cjs +4 -2
- package/dist/components/Action/utils.cjs.map +1 -1
- package/dist/components/Action/utils.d.ts +3 -2
- package/dist/components/Action/utils.js +4 -2
- package/dist/components/Action/utils.js.map +1 -1
- package/dist/components/AnimatedDropdown/components/styled.d.ts +2 -1
- package/dist/components/AnimatedDropdown/styled.d.ts +2 -2
- package/dist/components/Badge/styled.cjs +27 -4
- package/dist/components/Badge/styled.cjs.map +1 -1
- package/dist/components/Badge/styled.d.ts +4 -3
- package/dist/components/Badge/styled.js +27 -4
- package/dist/components/Badge/styled.js.map +1 -1
- package/dist/components/Banner/styled.cjs +27 -8
- package/dist/components/Banner/styled.cjs.map +1 -1
- package/dist/components/Banner/styled.d.ts +7 -7
- package/dist/components/Banner/styled.js +27 -8
- package/dist/components/Banner/styled.js.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.cjs +7 -3
- package/dist/components/BaseContainer/BaseContainer.cjs.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.d.ts +2 -1
- package/dist/components/BaseContainer/BaseContainer.js +6 -2
- package/dist/components/BaseContainer/BaseContainer.js.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.module.scss.cjs +9 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.cjs.map +1 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.js +7 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.js.map +1 -0
- package/dist/components/DataTable/components/ColumnHeader.d.ts +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.cjs +8 -8
- package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.d.ts +8 -8
- package/dist/components/DimensionsInput/DimensionsInput.js +1 -1
- package/dist/components/FilterTag/styled.d.ts +4 -4
- package/dist/components/Grid/index.cjs +7 -1
- package/dist/components/Grid/index.cjs.map +1 -1
- package/dist/components/Grid/index.d.ts +2 -1
- package/dist/components/Grid/index.js +7 -1
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/InputAffix/InputAffix.cjs +3 -4
- package/dist/components/InputAffix/InputAffix.cjs.map +1 -1
- package/dist/components/InputAffix/InputAffix.js +1 -2
- package/dist/components/InputAffix/InputAffix.js.map +1 -1
- package/dist/components/InputGroup/InputGroup.cjs +21 -0
- package/dist/components/InputGroup/InputGroup.cjs.map +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +2 -0
- package/dist/components/InputGroup/InputGroup.js +15 -0
- package/dist/components/InputGroup/InputGroup.js.map +1 -0
- package/dist/components/InputGroup/InputGroup.module.scss.cjs +9 -0
- package/dist/components/InputGroup/InputGroup.module.scss.cjs.map +1 -0
- package/dist/components/InputGroup/InputGroup.module.scss.js +7 -0
- package/dist/components/InputGroup/InputGroup.module.scss.js.map +1 -0
- package/dist/components/InputGroup/index.d.ts +2 -4
- package/dist/components/InputGroup/types.d.ts +3 -0
- package/dist/components/LegacyDataTable/SpecificState/styled.d.ts +4 -4
- package/dist/components/Pagination/styled.d.ts +8 -8
- package/dist/components/PhoneInput/index.d.ts +8 -8
- package/dist/components/PriceInput/PriceInput.cjs +4 -4
- package/dist/components/PriceInput/PriceInput.cjs.map +1 -1
- package/dist/components/PriceInput/PriceInput.js +1 -1
- package/dist/components/Search/Search.d.ts +8 -8
- package/dist/components/Search/styled.cjs +12 -2
- package/dist/components/Search/styled.cjs.map +1 -1
- package/dist/components/Search/styled.d.ts +9 -9
- package/dist/components/Search/styled.js +12 -2
- package/dist/components/Search/styled.js.map +1 -1
- package/dist/components/SegmentedControl/styled.d.ts +2 -1
- package/dist/components/Stack/Stack.cjs +26 -45
- package/dist/components/Stack/Stack.cjs.map +1 -1
- package/dist/components/Stack/Stack.d.ts +9 -2
- package/dist/components/Stack/Stack.js +25 -44
- package/dist/components/Stack/Stack.js.map +1 -1
- package/dist/components/Stack/Stack.module.scss.cjs +9 -0
- package/dist/components/Stack/Stack.module.scss.cjs.map +1 -0
- package/dist/components/Stack/Stack.module.scss.js +7 -0
- package/dist/components/Stack/Stack.module.scss.js.map +1 -0
- package/dist/components/Stack/types.d.ts +6 -6
- package/dist/components/Stepper/styled.cjs +16 -3
- package/dist/components/Stepper/styled.cjs.map +1 -1
- package/dist/components/Stepper/styled.d.ts +9 -1
- package/dist/components/Stepper/styled.js +16 -3
- package/dist/components/Stepper/styled.js.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -8
- package/dist/components/TextField/index.d.ts +8 -8
- package/dist/components/ToastsLayout/components/styled.cjs +37 -4
- package/dist/components/ToastsLayout/components/styled.cjs.map +1 -1
- package/dist/components/ToastsLayout/components/styled.d.ts +26 -5
- package/dist/components/ToastsLayout/components/styled.js +37 -4
- package/dist/components/ToastsLayout/components/styled.js.map +1 -1
- package/dist/components/Toggle/styled.d.ts +2 -1
- package/dist/components/VideoModal/components/styled.d.ts +4 -3
- package/dist/components/View/styled.d.ts +4 -4
- package/dist/components/ViewTab/ViewTab.d.ts +1 -1
- package/dist/components/WeightInput/WeightInput.cjs +8 -8
- package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
- package/dist/components/WeightInput/WeightInput.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/hoc/withClassNames/withClassNames.d.ts +1 -1
- package/dist/hoc/withLabels/styled.d.ts +9 -1
- package/dist/index.cjs +10 -10
- package/dist/index.js +1 -1
- package/dist/utils/forms/inputStyles.cjs +1 -2
- package/dist/utils/forms/inputStyles.cjs.map +1 -1
- package/dist/utils/forms/inputStyles.js +1 -2
- package/dist/utils/forms/inputStyles.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/InputGroup/index.cjs +0 -13
- package/dist/components/InputGroup/index.cjs.map +0 -1
- package/dist/components/InputGroup/index.js +0 -7
- package/dist/components/InputGroup/index.js.map +0 -1
- package/dist/components/Stack/Alignments.cjs +0 -12
- package/dist/components/Stack/Alignments.cjs.map +0 -1
- package/dist/components/Stack/Alignments.js +0 -12
- package/dist/components/Stack/Alignments.js.map +0 -1
|
@@ -12,19 +12,29 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
13
13
|
|
|
14
14
|
const TapBarChild = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--TapBarChild", componentId: "vui--3ngcs3" }) `display:flex;flex-direction:row;align-items:center;`;
|
|
15
|
-
const Left = styled__default.default(TapBarChild).withConfig({
|
|
16
|
-
|
|
15
|
+
const Left = styled__default.default(TapBarChild).withConfig({
|
|
16
|
+
shouldForwardProp: (prop) => !['glyphColor'].includes(prop),
|
|
17
|
+
}) `
|
|
18
|
+
svg {
|
|
19
|
+
margin-right: 12px;
|
|
20
|
+
height: ${sizes.sizes.base};
|
|
21
|
+
width: ${sizes.sizes.base};
|
|
22
|
+
|
|
23
|
+
color: ${({ glyphColor }) => glyphColor};
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const Right = styled__default.default(TapBarChild).withConfig({ displayName: "vui--Right", componentId: "vui--1az9xn4" }) `justify-content:flex-end;flex-grow:2;`;
|
|
17
27
|
/**
|
|
18
28
|
* Due to unique behaviour observed in Safari, we override the outline property when
|
|
19
29
|
* the accordion is focussed.
|
|
20
30
|
*/
|
|
21
|
-
const AccordionSummary = styled__default.default.summary.withConfig({ displayName: "vui--AccordionSummary", componentId: "vui--
|
|
22
|
-
const Top = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Top", componentId: "vui--
|
|
23
|
-
const Description = styled__default.default(Text.Text).withConfig({ displayName: "vui--Description", componentId: "vui--
|
|
24
|
-
const AccordionContent = styled__default.default(framerMotion.motion(BaseContainer.BaseContainer)).withConfig({ displayName: "vui--AccordionContent", componentId: "vui--
|
|
25
|
-
const AccordionDetails = styled__default.default.details.withConfig({ displayName: "vui--AccordionDetails", componentId: "vui--
|
|
26
|
-
const UnstyledAccordionContent = styled__default.default(framerMotion.motion(BaseContainer.BaseContainer)).withConfig({ displayName: "vui--UnstyledAccordionContent", componentId: "vui--
|
|
27
|
-
const UnstyledAccordionSummary = styled__default.default.summary.withConfig({ displayName: "vui--UnstyledAccordionSummary", componentId: "vui--
|
|
31
|
+
const AccordionSummary = styled__default.default.summary.withConfig({ displayName: "vui--AccordionSummary", componentId: "vui--1cj5wqc" }) `display:flex;flex-direction:column;padding:12px;border-radius:4px;user-select:none;cursor:pointer;border:1px solid ${index.theme.colors.neutral.grey.dark};:focus{outline:none;box-shadow:0 0 0 2px ${index.theme.colors.secondary.blue.light};}:active{box-shadow:0 0 0 2px ${index.theme.colors.secondary.blue.light};}`;
|
|
32
|
+
const Top = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Top", componentId: "vui--mks526" }) `display:flex;flex-direction:row;align-items:center;height:16px;`;
|
|
33
|
+
const Description = styled__default.default(Text.Text).withConfig({ displayName: "vui--Description", componentId: "vui--z9vlxj" }) `margin-top:8px;`;
|
|
34
|
+
const AccordionContent = styled__default.default(framerMotion.motion(BaseContainer.BaseContainer)).withConfig({ displayName: "vui--AccordionContent", componentId: "vui--a80u9i" }) `margin-top:4px;background:rgba(217, 235, 248, 0.5);padding:10px 26px;`;
|
|
35
|
+
const AccordionDetails = styled__default.default.details.withConfig({ displayName: "vui--AccordionDetails", componentId: "vui--pwcrkp" }) `summary{list-style-type:none;::-webkit-details-marker{display:none;}}`;
|
|
36
|
+
const UnstyledAccordionContent = styled__default.default(framerMotion.motion(BaseContainer.BaseContainer)).withConfig({ displayName: "vui--UnstyledAccordionContent", componentId: "vui--qyx6g0" }) ``;
|
|
37
|
+
const UnstyledAccordionSummary = styled__default.default.summary.withConfig({ displayName: "vui--UnstyledAccordionSummary", componentId: "vui--mkwb1n" }) `&:focus{outline:none;box-shadow:0 0 0 2px ${index.theme.colors.secondary.blue.light};}`;
|
|
28
38
|
|
|
29
39
|
exports.Text = Text.Text;
|
|
30
40
|
exports.AccordionContent = AccordionContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../src/components/Accordion/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { motion } from 'framer-motion';\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\nimport { theme } from '../../theme';\nimport { sizes } from '../../theme/modules/sizes';\n\nconst TapBarChild = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst Left = styled(TapBarChild)<{ glyphColor: string }>`\n svg {\n margin-right: 12px;\n height: ${sizes.base};\n width: ${sizes.base};\n\n color: ${({ glyphColor }) => glyphColor};\n }\n`;\n\nconst Right = styled(TapBarChild as any)`\n justify-content: flex-end;\n flex-grow: 2;\n`;\n\n/**\n * Due to unique behaviour observed in Safari, we override the outline property when\n * the accordion is focussed.\n */\nconst AccordionSummary = styled.summary`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 4px;\n user-select: none;\n cursor: pointer;\n\n border: 1px solid ${theme.colors.neutral.grey.dark};\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n\n :active {\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nconst Top = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n`;\n\nconst Description = styled(Text)`\n margin-top: 8px;\n`;\n\nconst AccordionContent = styled(motion(BaseContainer))`\n margin-top: 4px;\n background: rgba(217, 235, 248, 0.5);\n padding: 10px 26px;\n`;\n\nconst AccordionDetails = styled.details`\n summary {\n list-style-type: none;\n ::-webkit-details-marker {\n display: none;\n }\n }\n`;\n\nconst UnstyledAccordionContent = styled(motion(BaseContainer))``;\n\nconst UnstyledAccordionSummary = styled.summary`\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nexport {\n AccordionSummary,\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n UnstyledAccordionContent,\n UnstyledAccordionSummary,\n};\n"],"names":["styled","BaseContainer","sizes","theme","Text","motion"],"mappings":";;;;;;;;;;;;;AAQA,MAAM,WAAW,GAAGA,uBAAM,CAACC,2BAAa,CAAC,kIAIxC;AAED,MAAM,IAAI,GAAGD,uBAAM,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../src/components/Accordion/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { motion } from 'framer-motion';\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\nimport { theme } from '../../theme';\nimport { sizes } from '../../theme/modules/sizes';\n\nconst TapBarChild = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst Left = styled(TapBarChild).withConfig({\n shouldForwardProp: (prop) => !['glyphColor'].includes(prop),\n})<{ glyphColor: string }>`\n svg {\n margin-right: 12px;\n height: ${sizes.base};\n width: ${sizes.base};\n\n color: ${({ glyphColor }) => glyphColor};\n }\n`;\n\nconst Right = styled(TapBarChild as any)`\n justify-content: flex-end;\n flex-grow: 2;\n`;\n\n/**\n * Due to unique behaviour observed in Safari, we override the outline property when\n * the accordion is focussed.\n */\nconst AccordionSummary = styled.summary`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 4px;\n user-select: none;\n cursor: pointer;\n\n border: 1px solid ${theme.colors.neutral.grey.dark};\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n\n :active {\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nconst Top = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n`;\n\nconst Description = styled(Text)`\n margin-top: 8px;\n`;\n\nconst AccordionContent = styled(motion(BaseContainer))`\n margin-top: 4px;\n background: rgba(217, 235, 248, 0.5);\n padding: 10px 26px;\n`;\n\nconst AccordionDetails = styled.details`\n summary {\n list-style-type: none;\n ::-webkit-details-marker {\n display: none;\n }\n }\n`;\n\nconst UnstyledAccordionContent = styled(motion(BaseContainer))``;\n\nconst UnstyledAccordionSummary = styled.summary`\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nexport {\n AccordionSummary,\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n UnstyledAccordionContent,\n UnstyledAccordionSummary,\n};\n"],"names":["styled","BaseContainer","sizes","theme","Text","motion"],"mappings":";;;;;;;;;;;;;AAQA,MAAM,WAAW,GAAGA,uBAAM,CAACC,2BAAa,CAAC,kIAIxC;AAED,MAAM,IAAI,GAAGD,uBAAM,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC;AAC1C,IAAA,iBAAiB,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC5D,CAAA,CAAC,CAAwB;;;AAGZ,YAAA,EAAAE,WAAK,CAAC,IAAI,CAAA;AACX,WAAA,EAAAA,WAAK,CAAC,IAAI,CAAA;;AAEV,WAAA,EAAA,CAAC,EAAE,UAAU,EAAE,KAAK,UAAU,CAAA;;;AAI3C,MAAM,KAAK,GAAGF,uBAAM,CAAC,WAAkB,CAAC;AAKxC;;;AAGG;AACH,MAAM,gBAAgB,GAAGA,uBAAM,CAAC,OAAO,yMAQjBG,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,6CAIxBA,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,kCAIjCA,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK;AAI7D,MAAM,GAAG,GAAGH,uBAAM,CAACC,2BAAa,CAAC;AAOjC,MAAM,WAAW,GAAGD,uBAAM,CAACI,SAAI,CAAC;AAIhC,MAAM,gBAAgB,GAAGJ,uBAAM,CAACK,mBAAM,CAACJ,2BAAa,CAAC,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,qEAAA;AAMtD,MAAM,gBAAgB,GAAGD,uBAAM,CAAC,OAAO;AASvC,MAAM,wBAAwB,GAAGA,uBAAM,CAACK,mBAAM,CAACJ,2BAAa,CAAC,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,+BAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA;AAE9D,MAAM,wBAAwB,GAAGD,uBAAM,CAAC,OAAO,uIAGnBG,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Text } from '../Text';
|
|
3
|
-
declare const Left: import("styled-components").StyledComponent<"
|
|
3
|
+
declare const Left: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {
|
|
4
4
|
glyphColor: string;
|
|
5
5
|
}, never>;
|
|
6
6
|
declare const Right: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
|
|
@@ -9,32 +9,18 @@ declare const Right: import("styled-components").StyledComponent<any, any, objec
|
|
|
9
9
|
* the accordion is focussed.
|
|
10
10
|
*/
|
|
11
11
|
declare const AccordionSummary: import("styled-components").StyledComponent<"summary", any, {}, never>;
|
|
12
|
-
declare const Top: import("styled-components").StyledComponent<"
|
|
12
|
+
declare const Top: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
13
13
|
declare const Description: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
14
|
+
/**
|
|
15
|
+
* Due to unique behaviour observed in Safari, we override the outline property when
|
|
16
|
+
* the accordion is focussed.
|
|
17
|
+
*/
|
|
14
18
|
as?: import("../Text").ValidTextTag | undefined;
|
|
15
19
|
muted?: boolean | undefined;
|
|
16
|
-
variant?: "
|
|
20
|
+
variant?: "placeholder" | "link" | "body" | "button" | "headingXXL" | "headingXL" | "headingLarge" | "headingMedium" | "headingSmall" | "headingTable" | "subheadingLarge" | "subheadingMedium" | "subheadingSmall" | "subheadingSmallBold" | "bodySmall" | "bodyBold" | "bodyBoldDark" | "bodySmallBold" | "inputLabel" | "inputLabelSmall" | "hintText" | "placeholderSmall" | "placeholderCode" | "placeholderCodeSmall" | "error" | "errorSmall" | "successSmall" | "buttonSmall" | "linkLarge" | "linkMedium" | "linkSmall" | undefined;
|
|
17
21
|
} & import("react").HTMLAttributes<HTMLElement> & import("react").LabelHTMLAttributes<HTMLLabelElement> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
|
|
18
|
-
declare const AccordionContent: import("styled-components").StyledComponent<import("framer-motion").CustomDomComponent<{
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
[x: number]: any;
|
|
21
|
-
[x: symbol]: any;
|
|
22
|
-
} & {
|
|
23
|
-
theme?: any;
|
|
24
|
-
} & {
|
|
25
|
-
as?: string | import("react").ComponentType<any> | undefined;
|
|
26
|
-
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
27
|
-
}>, any, {}, never>;
|
|
22
|
+
declare const AccordionContent: import("styled-components").StyledComponent<import("framer-motion").CustomDomComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
28
23
|
declare const AccordionDetails: import("styled-components").StyledComponent<"details", any, {}, never>;
|
|
29
|
-
declare const UnstyledAccordionContent: import("styled-components").StyledComponent<import("framer-motion").CustomDomComponent<{
|
|
30
|
-
[x: string]: any;
|
|
31
|
-
[x: number]: any;
|
|
32
|
-
[x: symbol]: any;
|
|
33
|
-
} & {
|
|
34
|
-
theme?: any;
|
|
35
|
-
} & {
|
|
36
|
-
as?: string | import("react").ComponentType<any> | undefined;
|
|
37
|
-
forwardedAs?: string | import("react").ComponentType<any> | undefined;
|
|
38
|
-
}>, any, {}, never>;
|
|
24
|
+
declare const UnstyledAccordionContent: import("styled-components").StyledComponent<import("framer-motion").CustomDomComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
39
25
|
declare const UnstyledAccordionSummary: import("styled-components").StyledComponent<"summary", any, {}, never>;
|
|
40
26
|
export { AccordionSummary, Top, Text, Left, Right, Description, AccordionDetails, AccordionContent, UnstyledAccordionContent, UnstyledAccordionSummary, };
|
|
@@ -6,19 +6,29 @@ import { theme } from '../../theme/index.js';
|
|
|
6
6
|
import { sizes } from '../../theme/modules/sizes.js';
|
|
7
7
|
|
|
8
8
|
const TapBarChild = styled(BaseContainer).withConfig({ displayName: "vui--TapBarChild", componentId: "vui--3ngcs3" }) `display:flex;flex-direction:row;align-items:center;`;
|
|
9
|
-
const Left = styled(TapBarChild).withConfig({
|
|
10
|
-
|
|
9
|
+
const Left = styled(TapBarChild).withConfig({
|
|
10
|
+
shouldForwardProp: (prop) => !['glyphColor'].includes(prop),
|
|
11
|
+
}) `
|
|
12
|
+
svg {
|
|
13
|
+
margin-right: 12px;
|
|
14
|
+
height: ${sizes.base};
|
|
15
|
+
width: ${sizes.base};
|
|
16
|
+
|
|
17
|
+
color: ${({ glyphColor }) => glyphColor};
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const Right = styled(TapBarChild).withConfig({ displayName: "vui--Right", componentId: "vui--1az9xn4" }) `justify-content:flex-end;flex-grow:2;`;
|
|
11
21
|
/**
|
|
12
22
|
* Due to unique behaviour observed in Safari, we override the outline property when
|
|
13
23
|
* the accordion is focussed.
|
|
14
24
|
*/
|
|
15
|
-
const AccordionSummary = styled.summary.withConfig({ displayName: "vui--AccordionSummary", componentId: "vui--
|
|
16
|
-
const Top = styled(BaseContainer).withConfig({ displayName: "vui--Top", componentId: "vui--
|
|
17
|
-
const Description = styled(Text).withConfig({ displayName: "vui--Description", componentId: "vui--
|
|
18
|
-
const AccordionContent = styled(motion(BaseContainer)).withConfig({ displayName: "vui--AccordionContent", componentId: "vui--
|
|
19
|
-
const AccordionDetails = styled.details.withConfig({ displayName: "vui--AccordionDetails", componentId: "vui--
|
|
20
|
-
const UnstyledAccordionContent = styled(motion(BaseContainer)).withConfig({ displayName: "vui--UnstyledAccordionContent", componentId: "vui--
|
|
21
|
-
const UnstyledAccordionSummary = styled.summary.withConfig({ displayName: "vui--UnstyledAccordionSummary", componentId: "vui--
|
|
25
|
+
const AccordionSummary = styled.summary.withConfig({ displayName: "vui--AccordionSummary", componentId: "vui--1cj5wqc" }) `display:flex;flex-direction:column;padding:12px;border-radius:4px;user-select:none;cursor:pointer;border:1px solid ${theme.colors.neutral.grey.dark};:focus{outline:none;box-shadow:0 0 0 2px ${theme.colors.secondary.blue.light};}:active{box-shadow:0 0 0 2px ${theme.colors.secondary.blue.light};}`;
|
|
26
|
+
const Top = styled(BaseContainer).withConfig({ displayName: "vui--Top", componentId: "vui--mks526" }) `display:flex;flex-direction:row;align-items:center;height:16px;`;
|
|
27
|
+
const Description = styled(Text).withConfig({ displayName: "vui--Description", componentId: "vui--z9vlxj" }) `margin-top:8px;`;
|
|
28
|
+
const AccordionContent = styled(motion(BaseContainer)).withConfig({ displayName: "vui--AccordionContent", componentId: "vui--a80u9i" }) `margin-top:4px;background:rgba(217, 235, 248, 0.5);padding:10px 26px;`;
|
|
29
|
+
const AccordionDetails = styled.details.withConfig({ displayName: "vui--AccordionDetails", componentId: "vui--pwcrkp" }) `summary{list-style-type:none;::-webkit-details-marker{display:none;}}`;
|
|
30
|
+
const UnstyledAccordionContent = styled(motion(BaseContainer)).withConfig({ displayName: "vui--UnstyledAccordionContent", componentId: "vui--qyx6g0" }) ``;
|
|
31
|
+
const UnstyledAccordionSummary = styled.summary.withConfig({ displayName: "vui--UnstyledAccordionSummary", componentId: "vui--mkwb1n" }) `&:focus{outline:none;box-shadow:0 0 0 2px ${theme.colors.secondary.blue.light};}`;
|
|
22
32
|
|
|
23
33
|
export { AccordionContent, AccordionDetails, AccordionSummary, Description, Left, Right, Text, Top, UnstyledAccordionContent, UnstyledAccordionSummary };
|
|
24
34
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/Accordion/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { motion } from 'framer-motion';\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\nimport { theme } from '../../theme';\nimport { sizes } from '../../theme/modules/sizes';\n\nconst TapBarChild = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst Left = styled(TapBarChild)<{ glyphColor: string }>`\n svg {\n margin-right: 12px;\n height: ${sizes.base};\n width: ${sizes.base};\n\n color: ${({ glyphColor }) => glyphColor};\n }\n`;\n\nconst Right = styled(TapBarChild as any)`\n justify-content: flex-end;\n flex-grow: 2;\n`;\n\n/**\n * Due to unique behaviour observed in Safari, we override the outline property when\n * the accordion is focussed.\n */\nconst AccordionSummary = styled.summary`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 4px;\n user-select: none;\n cursor: pointer;\n\n border: 1px solid ${theme.colors.neutral.grey.dark};\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n\n :active {\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nconst Top = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n`;\n\nconst Description = styled(Text)`\n margin-top: 8px;\n`;\n\nconst AccordionContent = styled(motion(BaseContainer))`\n margin-top: 4px;\n background: rgba(217, 235, 248, 0.5);\n padding: 10px 26px;\n`;\n\nconst AccordionDetails = styled.details`\n summary {\n list-style-type: none;\n ::-webkit-details-marker {\n display: none;\n }\n }\n`;\n\nconst UnstyledAccordionContent = styled(motion(BaseContainer))``;\n\nconst UnstyledAccordionSummary = styled.summary`\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nexport {\n AccordionSummary,\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n UnstyledAccordionContent,\n UnstyledAccordionSummary,\n};\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,kIAIxC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/Accordion/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { motion } from 'framer-motion';\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\nimport { theme } from '../../theme';\nimport { sizes } from '../../theme/modules/sizes';\n\nconst TapBarChild = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n`;\n\nconst Left = styled(TapBarChild).withConfig({\n shouldForwardProp: (prop) => !['glyphColor'].includes(prop),\n})<{ glyphColor: string }>`\n svg {\n margin-right: 12px;\n height: ${sizes.base};\n width: ${sizes.base};\n\n color: ${({ glyphColor }) => glyphColor};\n }\n`;\n\nconst Right = styled(TapBarChild as any)`\n justify-content: flex-end;\n flex-grow: 2;\n`;\n\n/**\n * Due to unique behaviour observed in Safari, we override the outline property when\n * the accordion is focussed.\n */\nconst AccordionSummary = styled.summary`\n display: flex;\n flex-direction: column;\n padding: 12px;\n border-radius: 4px;\n user-select: none;\n cursor: pointer;\n\n border: 1px solid ${theme.colors.neutral.grey.dark};\n\n :focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n\n :active {\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nconst Top = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 16px;\n`;\n\nconst Description = styled(Text)`\n margin-top: 8px;\n`;\n\nconst AccordionContent = styled(motion(BaseContainer))`\n margin-top: 4px;\n background: rgba(217, 235, 248, 0.5);\n padding: 10px 26px;\n`;\n\nconst AccordionDetails = styled.details`\n summary {\n list-style-type: none;\n ::-webkit-details-marker {\n display: none;\n }\n }\n`;\n\nconst UnstyledAccordionContent = styled(motion(BaseContainer))``;\n\nconst UnstyledAccordionSummary = styled.summary`\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ${theme.colors.secondary.blue.light};\n }\n`;\n\nexport {\n AccordionSummary,\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n UnstyledAccordionContent,\n UnstyledAccordionSummary,\n};\n"],"names":[],"mappings":";;;;;;;AAQA,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,kIAIxC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC;AAC1C,IAAA,iBAAiB,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC5D,CAAA,CAAC,CAAwB;;;AAGZ,YAAA,EAAA,KAAK,CAAC,IAAI,CAAA;AACX,WAAA,EAAA,KAAK,CAAC,IAAI,CAAA;;AAEV,WAAA,EAAA,CAAC,EAAE,UAAU,EAAE,KAAK,UAAU,CAAA;;;AAI3C,MAAM,KAAK,GAAG,MAAM,CAAC,WAAkB,CAAC;AAKxC;;;AAGG;AACH,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,yMAQjB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,6CAIxB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,kCAIjC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK;AAI7D,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAOjC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;AAIhC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,qEAAA;AAMtD,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO;AASvC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,+BAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA;AAE9D,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,uIAGnB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK;;;;"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var withTokens = require('../../hoc/withTokens/withTokens.cjs');
|
|
5
|
+
var LaunchIcon = require('../../icons/design-system/components/LaunchIcon.cjs');
|
|
6
|
+
var DropdownIcon = require('../../icons/custom/components/DropdownIcon.cjs');
|
|
4
7
|
var getContextAwareLink = require('../../utils/getContextAwareLink.cjs');
|
|
5
8
|
var Loader = require('../Loader/Loader.cjs');
|
|
6
|
-
var LaunchIcon = require('../../icons/design-system/components/LaunchIcon.cjs');
|
|
7
9
|
var utils = require('./utils.cjs');
|
|
8
|
-
var button_module = require('./styles/button.module.scss.cjs');
|
|
9
10
|
var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
|
|
11
|
+
var button_module = require('./styles/button.module.scss.cjs');
|
|
10
12
|
|
|
11
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
14
|
|
|
@@ -15,7 +17,8 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
15
17
|
/**
|
|
16
18
|
* Action component for rendering buttons or links with various styles and behaviors.
|
|
17
19
|
*/
|
|
18
|
-
const
|
|
20
|
+
const ActionBase = React.forwardRef(({ appearance, as, href, target, rel, allowedHostnames, className, variant, disabled, dropdown, iconSlot, children, hideExternalLinkIcon, loading, size: sizeProp, type = 'button', ...otherProps }, ref) => {
|
|
21
|
+
const size = sizeProp;
|
|
19
22
|
const isSemanticLink = !!href;
|
|
20
23
|
const defaultAppearance = isSemanticLink ? 'link' : 'button';
|
|
21
24
|
const visualAppearance = appearance || defaultAppearance;
|
|
@@ -23,10 +26,11 @@ const Action = React.forwardRef(({ appearance, as, href, target, rel, allowedHos
|
|
|
23
26
|
className,
|
|
24
27
|
variant,
|
|
25
28
|
disabled,
|
|
26
|
-
|
|
29
|
+
size,
|
|
30
|
+
dropdown,
|
|
27
31
|
iconSlot,
|
|
28
32
|
children,
|
|
29
|
-
}), [visualAppearance, className, variant, disabled,
|
|
33
|
+
}), [visualAppearance, className, variant, disabled, size, dropdown, iconSlot, children]);
|
|
30
34
|
const { linkProps, showExternalIcon } = getContextAwareLink.getContextAwareLink({
|
|
31
35
|
href,
|
|
32
36
|
target,
|
|
@@ -39,14 +43,15 @@ const Action = React.forwardRef(({ appearance, as, href, target, rel, allowedHos
|
|
|
39
43
|
const Component = as || (isSemanticLink ? 'a' : 'button');
|
|
40
44
|
// If a custom component is specified via `as`, render that component
|
|
41
45
|
if (as) {
|
|
42
|
-
return (React__default.default.createElement(Component, { ...otherProps, ref: ref, className: classNames, disabled: disabled, loading: loading, type: type, ...linkProps },
|
|
46
|
+
return (React__default.default.createElement(Component, { ...otherProps, ref: ref, className: classNames, disabled: disabled, loading: loading, type: type, "aria-disabled": loading, ...linkProps },
|
|
43
47
|
iconSlot,
|
|
44
48
|
children,
|
|
45
|
-
shouldShowExternalIcon && React__default.default.createElement(LaunchIcon.ReactComponent, null)
|
|
49
|
+
shouldShowExternalIcon && React__default.default.createElement(LaunchIcon.ReactComponent, null),
|
|
50
|
+
visualAppearance === 'button' && dropdown && React__default.default.createElement(DropdownIcon.DropdownIcon, null)));
|
|
46
51
|
}
|
|
47
52
|
// Render as an Anchor if type is a navigate action
|
|
48
53
|
if (isSemanticLink) {
|
|
49
|
-
return (React__default.default.createElement("a", { ...otherProps, ref: ref, className: classNames, ...linkProps },
|
|
54
|
+
return (React__default.default.createElement("a", { ...otherProps, ref: ref, className: classNames, "aria-disabled": loading, ...linkProps },
|
|
50
55
|
iconSlot,
|
|
51
56
|
children,
|
|
52
57
|
shouldShowExternalIcon && React__default.default.createElement(LaunchIcon.ReactComponent, null)));
|
|
@@ -58,10 +63,14 @@ const Action = React.forwardRef(({ appearance, as, href, target, rel, allowedHos
|
|
|
58
63
|
React__default.default.createElement(FlexRow.FlexRow, { gap: "sm", flexWrap: "nowrap", className: loading ? button_module.hideContent : undefined },
|
|
59
64
|
iconSlot,
|
|
60
65
|
children,
|
|
61
|
-
shouldShowExternalIcon && React__default.default.createElement(LaunchIcon.ReactComponent, null)
|
|
66
|
+
shouldShowExternalIcon && React__default.default.createElement(LaunchIcon.ReactComponent, null),
|
|
67
|
+
visualAppearance === 'button' && dropdown && React__default.default.createElement(DropdownIcon.DropdownIcon, null)),
|
|
62
68
|
loading && (React__default.default.createElement("div", { className: button_module.loadingWrapper, "aria-label": "Loading" },
|
|
63
|
-
React__default.default.createElement(Loader.Loader,
|
|
69
|
+
React__default.default.createElement(Loader.Loader, { className: button_module.loader })))));
|
|
64
70
|
});
|
|
71
|
+
ActionBase.displayName = 'Action';
|
|
72
|
+
const Action = withTokens.withTokens(ActionBase);
|
|
65
73
|
|
|
66
74
|
exports.Action = Action;
|
|
75
|
+
exports.ActionBase = ActionBase;
|
|
67
76
|
//# sourceMappingURL=Action.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.cjs","sources":["../../../src/components/Action/Action.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"Action.cjs","sources":["../../../src/components/Action/Action.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { withTokens } from '../../hoc/withTokens';\nimport { DropdownIcon, LaunchIcon } from '../../icons';\nimport { getContextAwareLink } from '../../utils/getContextAwareLink';\nimport { Loader } from '../Loader';\nimport { ActionProps } from './types';\nimport { getAppearanceClasses } from './utils';\n\nimport { FlexRow } from '../Flex/FlexRow';\nimport buttonStyles from './styles/button.module.scss';\n\n/**\n * Action component for rendering buttons or links with various styles and behaviors.\n */\nexport const ActionBase = forwardRef(\n <C extends React.ElementType>(\n {\n appearance,\n as,\n href,\n target,\n rel,\n allowedHostnames,\n className,\n variant,\n disabled,\n dropdown,\n iconSlot,\n children,\n hideExternalLinkIcon,\n loading,\n size: sizeProp,\n type = 'button',\n ...otherProps\n }: ActionProps<C>,\n ref: React.Ref<HTMLElement>,\n ) => {\n const size = sizeProp;\n const isSemanticLink = !!href;\n const defaultAppearance = isSemanticLink ? 'link' : 'button';\n const visualAppearance = appearance || defaultAppearance;\n\n const classNames = useMemo(\n () =>\n getAppearanceClasses(visualAppearance, {\n className,\n variant,\n disabled,\n size,\n dropdown,\n iconSlot,\n children,\n }),\n [visualAppearance, className, variant, disabled, size, dropdown, iconSlot, children],\n );\n\n const { linkProps, showExternalIcon } = getContextAwareLink({\n href,\n target,\n rel,\n allowedHostnames,\n });\n\n const shouldShowExternalIcon = showExternalIcon && !hideExternalLinkIcon;\n\n // This assignment is needed to allow TypeScript to infer the correct type for `as`\n // and to ensure we can pass the correct props to the component without a type error.\n const Component = as || (isSemanticLink ? 'a' : 'button');\n\n // If a custom component is specified via `as`, render that component\n if (as) {\n return (\n <Component\n {...otherProps}\n ref={ref}\n className={classNames}\n disabled={disabled}\n loading={loading}\n type={type}\n aria-disabled={loading}\n {...linkProps}\n >\n {iconSlot}\n {children}\n {shouldShowExternalIcon && <LaunchIcon />}\n {visualAppearance === 'button' && dropdown && <DropdownIcon />}\n </Component>\n );\n }\n\n // Render as an Anchor if type is a navigate action\n if (isSemanticLink) {\n return (\n <a\n {...otherProps}\n ref={ref as React.Ref<HTMLAnchorElement>}\n className={classNames}\n aria-disabled={loading}\n {...linkProps}\n >\n {iconSlot}\n {children}\n {shouldShowExternalIcon && <LaunchIcon />}\n </a>\n );\n }\n\n // Otherwise, render as a Button\n return (\n <button\n {...otherProps}\n ref={ref as React.Ref<HTMLButtonElement>}\n // eslint-disable-next-line react/button-has-type\n type={type || 'button'}\n className={classNames}\n disabled={disabled}\n aria-busy={loading}\n >\n <FlexRow\n gap=\"sm\"\n flexWrap=\"nowrap\"\n className={loading ? buttonStyles.hideContent : undefined}\n >\n {iconSlot}\n {children}\n {shouldShowExternalIcon && <LaunchIcon />}\n {visualAppearance === 'button' && dropdown && <DropdownIcon />}\n </FlexRow>\n {loading && (\n <div className={buttonStyles.loadingWrapper} aria-label=\"Loading\">\n <Loader className={buttonStyles.loader} />\n </div>\n )}\n </button>\n );\n },\n);\n\nActionBase.displayName = 'Action';\n\nexport const Action = withTokens(ActionBase);\n"],"names":["forwardRef","useMemo","getAppearanceClasses","getContextAwareLink","React","LaunchIcon","DropdownIcon","FlexRow","buttonStyles","Loader","withTokens"],"mappings":";;;;;;;;;;;;;;;;AAWA;;AAEG;MACU,UAAU,GAAGA,gBAAU,CAClC,CACE,EACE,UAAU,EACV,EAAE,EACF,IAAI,EACJ,MAAM,EACN,GAAG,EACH,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,oBAAoB,EACpB,OAAO,EACP,IAAI,EAAE,QAAQ,EACd,IAAI,GAAG,QAAQ,EACf,GAAG,UAAU,EACE,EACjB,GAA2B,KACzB;IACF,MAAM,IAAI,GAAG,QAAQ;AACrB,IAAA,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI;IAC7B,MAAM,iBAAiB,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ;AAC5D,IAAA,MAAM,gBAAgB,GAAG,UAAU,IAAI,iBAAiB;IAExD,MAAM,UAAU,GAAGC,aAAO,CACxB,MACEC,0BAAoB,CAAC,gBAAgB,EAAE;QACrC,SAAS;QACT,OAAO;QACP,QAAQ;QACR,IAAI;QACJ,QAAQ;QACR,QAAQ;QACR,QAAQ;AACT,KAAA,CAAC,EACJ,CAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CACrF;AAED,IAAA,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAGC,uCAAmB,CAAC;QAC1D,IAAI;QACJ,MAAM;QACN,GAAG;QACH,gBAAgB;AACjB,KAAA,CAAC;AAEF,IAAA,MAAM,sBAAsB,GAAG,gBAAgB,IAAI,CAAC,oBAAoB;;;AAIxE,IAAA,MAAM,SAAS,GAAG,EAAE,KAAK,cAAc,GAAG,GAAG,GAAG,QAAQ,CAAC;;AAGzD,IAAA,IAAI,EAAE,EAAE;AACN,QAAA,QACEC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GACJ,UAAU,EACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EAAA,eAAA,EACK,OAAO,EAAA,GAClB,SAAS,EAAA;YAEZ,QAAQ;YACR,QAAQ;YACR,sBAAsB,IAAIA,sBAAA,CAAA,aAAA,CAACC,yBAAU,EAAA,IAAA,CAAG;YACxC,gBAAgB,KAAK,QAAQ,IAAI,QAAQ,IAAID,qCAACE,yBAAY,EAAA,IAAA,CAAG,CACpD;AAEf,IAAA;;AAGD,IAAA,IAAI,cAAc,EAAE;AAClB,QAAA,QACEF,sBAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAA,GACM,UAAU,EACd,GAAG,EAAE,GAAmC,EACxC,SAAS,EAAE,UAAU,EAAA,eAAA,EACN,OAAO,KAClB,SAAS,EAAA;YAEZ,QAAQ;YACR,QAAQ;AACR,YAAA,sBAAsB,IAAIA,sBAAA,CAAA,aAAA,CAACC,yBAAU,EAAA,IAAA,CAAG,CACvC;AAEP,IAAA;;AAGD,IAAA,QACED,sBAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAA,GACM,UAAU,EACd,GAAG,EAAE,GAAmC;;AAExC,QAAA,IAAI,EAAE,IAAI,IAAI,QAAQ,EACtB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,QAAQ,eACP,OAAO,EAAA;QAElBA,sBAAA,CAAA,aAAA,CAACG,eAAO,IACN,GAAG,EAAC,IAAI,EACR,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAE,OAAO,GAAGC,aAAY,CAAC,WAAW,GAAG,SAAS,EAAA;YAExD,QAAQ;YACR,QAAQ;YACR,sBAAsB,IAAIJ,sBAAA,CAAA,aAAA,CAACC,yBAAU,EAAA,IAAA,CAAG;YACxC,gBAAgB,KAAK,QAAQ,IAAI,QAAQ,IAAID,sBAAA,CAAA,aAAA,CAACE,yBAAY,OAAG,CACtD;QACT,OAAO,KACNF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEI,aAAY,CAAC,cAAc,EAAA,YAAA,EAAa,SAAS,EAAA;AAC/D,YAAAJ,sBAAA,CAAA,aAAA,CAACK,aAAM,EAAA,EAAC,SAAS,EAAED,aAAY,CAAC,MAAM,EAAA,CAAI,CACtC,CACP,CACM;AAEb,CAAC;AAGH,UAAU,CAAC,WAAW,GAAG,QAAQ;MAEpB,MAAM,GAAGE,qBAAU,CAAC,UAAU;;;;;"}
|
|
@@ -2,32 +2,28 @@ import React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Action component for rendering buttons or links with various styles and behaviors.
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const ActionBase: React.ForwardRefExoticComponent<(Omit<{
|
|
6
6
|
appearance?: import("./types").ActionAppearance | undefined;
|
|
7
7
|
as?: React.ElementType<any> | undefined;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
className?: string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Action component for rendering buttons or links with various styles and behaviors.
|
|
12
|
-
*/
|
|
13
|
-
compact?: boolean | undefined;
|
|
14
10
|
disabled?: boolean | undefined;
|
|
11
|
+
dropdown?: boolean | undefined;
|
|
15
12
|
iconSlot?: React.ReactNode;
|
|
16
13
|
loading?: boolean | undefined;
|
|
14
|
+
size?: import("./types").ActionSize | undefined;
|
|
17
15
|
type?: "button" | "submit" | "reset" | undefined;
|
|
18
16
|
variant?: import("./types").ActionVariant | undefined;
|
|
19
|
-
} & Omit<Omit<any, "ref">, "
|
|
17
|
+
} & Omit<Omit<any, "ref">, "href" | "rel" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
|
|
20
18
|
appearance?: import("./types").ActionAppearance | undefined;
|
|
21
19
|
as?: C | undefined;
|
|
22
20
|
children?: React.ReactNode;
|
|
23
21
|
className?: string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Action component for rendering buttons or links with various styles and behaviors.
|
|
26
|
-
*/
|
|
27
|
-
compact?: boolean | undefined;
|
|
28
22
|
disabled?: boolean | undefined;
|
|
23
|
+
dropdown?: boolean | undefined;
|
|
29
24
|
iconSlot?: React.ReactNode;
|
|
30
25
|
loading?: boolean | undefined;
|
|
26
|
+
size?: import("./types").ActionSize | undefined;
|
|
31
27
|
type?: "button" | "submit" | "reset" | undefined;
|
|
32
28
|
variant?: import("./types").ActionVariant | undefined;
|
|
33
29
|
}> & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
@@ -39,29 +35,80 @@ export declare const Action: React.ForwardRefExoticComponent<(Omit<{
|
|
|
39
35
|
as?: React.ElementType<any> | undefined;
|
|
40
36
|
children?: React.ReactNode;
|
|
41
37
|
className?: string | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* Action component for rendering buttons or links with various styles and behaviors.
|
|
44
|
-
*/
|
|
45
|
-
compact?: boolean | undefined;
|
|
46
38
|
disabled?: boolean | undefined;
|
|
39
|
+
dropdown?: boolean | undefined;
|
|
47
40
|
iconSlot?: React.ReactNode;
|
|
48
41
|
loading?: boolean | undefined;
|
|
42
|
+
size?: import("./types").ActionSize | undefined;
|
|
49
43
|
type?: "button" | "submit" | "reset" | undefined;
|
|
50
44
|
variant?: import("./types").ActionVariant | undefined;
|
|
51
|
-
} & Omit<Omit<any, "ref">, "
|
|
45
|
+
} & Omit<Omit<any, "ref">, "href" | "rel" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
|
|
52
46
|
appearance?: import("./types").ActionAppearance | undefined;
|
|
53
47
|
as?: C | undefined;
|
|
54
48
|
children?: React.ReactNode;
|
|
55
49
|
className?: string | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Action component for rendering buttons or links with various styles and behaviors.
|
|
58
|
-
*/
|
|
59
|
-
compact?: boolean | undefined;
|
|
60
50
|
disabled?: boolean | undefined;
|
|
51
|
+
dropdown?: boolean | undefined;
|
|
61
52
|
iconSlot?: React.ReactNode;
|
|
62
53
|
loading?: boolean | undefined;
|
|
54
|
+
size?: import("./types").ActionSize | undefined;
|
|
63
55
|
type?: "button" | "submit" | "reset" | undefined;
|
|
64
56
|
variant?: import("./types").ActionVariant | undefined;
|
|
65
57
|
}> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
66
58
|
href?: undefined;
|
|
67
59
|
}, "ref">) & React.RefAttributes<HTMLElement>>;
|
|
60
|
+
export declare const Action: React.ForwardRefExoticComponent<(Omit<Omit<Omit<{
|
|
61
|
+
appearance?: import("./types").ActionAppearance | undefined;
|
|
62
|
+
as?: React.ElementType<any> | undefined;
|
|
63
|
+
children?: React.ReactNode;
|
|
64
|
+
className?: string | undefined;
|
|
65
|
+
disabled?: boolean | undefined;
|
|
66
|
+
dropdown?: boolean | undefined;
|
|
67
|
+
iconSlot?: React.ReactNode;
|
|
68
|
+
loading?: boolean | undefined;
|
|
69
|
+
size?: import("./types").ActionSize | undefined;
|
|
70
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
71
|
+
variant?: import("./types").ActionVariant | undefined;
|
|
72
|
+
} & Omit<Omit<any, "ref">, "href" | "rel" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
|
|
73
|
+
appearance?: import("./types").ActionAppearance | undefined;
|
|
74
|
+
as?: C | undefined;
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
className?: string | undefined;
|
|
77
|
+
disabled?: boolean | undefined;
|
|
78
|
+
dropdown?: boolean | undefined;
|
|
79
|
+
iconSlot?: React.ReactNode;
|
|
80
|
+
loading?: boolean | undefined;
|
|
81
|
+
size?: import("./types").ActionSize | undefined;
|
|
82
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
83
|
+
variant?: import("./types").ActionVariant | undefined;
|
|
84
|
+
}> & React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
85
|
+
href: string;
|
|
86
|
+
allowedHostnames?: string[] | undefined;
|
|
87
|
+
hideExternalLinkIcon?: boolean | undefined;
|
|
88
|
+
}, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & import("../../hoc/withTokens").WithTokensProps, "ref"> | Omit<Omit<Omit<{
|
|
89
|
+
appearance?: import("./types").ActionAppearance | undefined;
|
|
90
|
+
as?: React.ElementType<any> | undefined;
|
|
91
|
+
children?: React.ReactNode;
|
|
92
|
+
className?: string | undefined;
|
|
93
|
+
disabled?: boolean | undefined;
|
|
94
|
+
dropdown?: boolean | undefined;
|
|
95
|
+
iconSlot?: React.ReactNode;
|
|
96
|
+
loading?: boolean | undefined;
|
|
97
|
+
size?: import("./types").ActionSize | undefined;
|
|
98
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
99
|
+
variant?: import("./types").ActionVariant | undefined;
|
|
100
|
+
} & Omit<Omit<any, "ref">, "href" | "rel" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof {
|
|
101
|
+
appearance?: import("./types").ActionAppearance | undefined;
|
|
102
|
+
as?: C | undefined;
|
|
103
|
+
children?: React.ReactNode;
|
|
104
|
+
className?: string | undefined;
|
|
105
|
+
disabled?: boolean | undefined;
|
|
106
|
+
dropdown?: boolean | undefined;
|
|
107
|
+
iconSlot?: React.ReactNode;
|
|
108
|
+
loading?: boolean | undefined;
|
|
109
|
+
size?: import("./types").ActionSize | undefined;
|
|
110
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
111
|
+
variant?: import("./types").ActionVariant | undefined;
|
|
112
|
+
}> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
113
|
+
href?: undefined;
|
|
114
|
+
}, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & import("../../hoc/withTokens").WithTokensProps, "ref">) & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React__default, { forwardRef, useMemo } from 'react';
|
|
2
|
+
import { withTokens } from '../../hoc/withTokens/withTokens.js';
|
|
3
|
+
import { ReactComponent as LaunchIcon } from '../../icons/design-system/components/LaunchIcon.js';
|
|
4
|
+
import { DropdownIcon } from '../../icons/custom/components/DropdownIcon.js';
|
|
2
5
|
import { getContextAwareLink } from '../../utils/getContextAwareLink.js';
|
|
3
6
|
import { Loader } from '../Loader/Loader.js';
|
|
4
|
-
import { ReactComponent as LaunchIcon } from '../../icons/design-system/components/LaunchIcon.js';
|
|
5
7
|
import { getAppearanceClasses } from './utils.js';
|
|
6
|
-
import buttonStyles from './styles/button.module.scss.js';
|
|
7
8
|
import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
|
|
9
|
+
import buttonStyles from './styles/button.module.scss.js';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Action component for rendering buttons or links with various styles and behaviors.
|
|
11
13
|
*/
|
|
12
|
-
const
|
|
14
|
+
const ActionBase = forwardRef(({ appearance, as, href, target, rel, allowedHostnames, className, variant, disabled, dropdown, iconSlot, children, hideExternalLinkIcon, loading, size: sizeProp, type = 'button', ...otherProps }, ref) => {
|
|
15
|
+
const size = sizeProp;
|
|
13
16
|
const isSemanticLink = !!href;
|
|
14
17
|
const defaultAppearance = isSemanticLink ? 'link' : 'button';
|
|
15
18
|
const visualAppearance = appearance || defaultAppearance;
|
|
@@ -17,10 +20,11 @@ const Action = forwardRef(({ appearance, as, href, target, rel, allowedHostnames
|
|
|
17
20
|
className,
|
|
18
21
|
variant,
|
|
19
22
|
disabled,
|
|
20
|
-
|
|
23
|
+
size,
|
|
24
|
+
dropdown,
|
|
21
25
|
iconSlot,
|
|
22
26
|
children,
|
|
23
|
-
}), [visualAppearance, className, variant, disabled,
|
|
27
|
+
}), [visualAppearance, className, variant, disabled, size, dropdown, iconSlot, children]);
|
|
24
28
|
const { linkProps, showExternalIcon } = getContextAwareLink({
|
|
25
29
|
href,
|
|
26
30
|
target,
|
|
@@ -33,14 +37,15 @@ const Action = forwardRef(({ appearance, as, href, target, rel, allowedHostnames
|
|
|
33
37
|
const Component = as || (isSemanticLink ? 'a' : 'button');
|
|
34
38
|
// If a custom component is specified via `as`, render that component
|
|
35
39
|
if (as) {
|
|
36
|
-
return (React__default.createElement(Component, { ...otherProps, ref: ref, className: classNames, disabled: disabled, loading: loading, type: type, ...linkProps },
|
|
40
|
+
return (React__default.createElement(Component, { ...otherProps, ref: ref, className: classNames, disabled: disabled, loading: loading, type: type, "aria-disabled": loading, ...linkProps },
|
|
37
41
|
iconSlot,
|
|
38
42
|
children,
|
|
39
|
-
shouldShowExternalIcon && React__default.createElement(LaunchIcon, null)
|
|
43
|
+
shouldShowExternalIcon && React__default.createElement(LaunchIcon, null),
|
|
44
|
+
visualAppearance === 'button' && dropdown && React__default.createElement(DropdownIcon, null)));
|
|
40
45
|
}
|
|
41
46
|
// Render as an Anchor if type is a navigate action
|
|
42
47
|
if (isSemanticLink) {
|
|
43
|
-
return (React__default.createElement("a", { ...otherProps, ref: ref, className: classNames, ...linkProps },
|
|
48
|
+
return (React__default.createElement("a", { ...otherProps, ref: ref, className: classNames, "aria-disabled": loading, ...linkProps },
|
|
44
49
|
iconSlot,
|
|
45
50
|
children,
|
|
46
51
|
shouldShowExternalIcon && React__default.createElement(LaunchIcon, null)));
|
|
@@ -52,10 +57,13 @@ const Action = forwardRef(({ appearance, as, href, target, rel, allowedHostnames
|
|
|
52
57
|
React__default.createElement(FlexRow, { gap: "sm", flexWrap: "nowrap", className: loading ? buttonStyles.hideContent : undefined },
|
|
53
58
|
iconSlot,
|
|
54
59
|
children,
|
|
55
|
-
shouldShowExternalIcon && React__default.createElement(LaunchIcon, null)
|
|
60
|
+
shouldShowExternalIcon && React__default.createElement(LaunchIcon, null),
|
|
61
|
+
visualAppearance === 'button' && dropdown && React__default.createElement(DropdownIcon, null)),
|
|
56
62
|
loading && (React__default.createElement("div", { className: buttonStyles.loadingWrapper, "aria-label": "Loading" },
|
|
57
|
-
React__default.createElement(Loader,
|
|
63
|
+
React__default.createElement(Loader, { className: buttonStyles.loader })))));
|
|
58
64
|
});
|
|
65
|
+
ActionBase.displayName = 'Action';
|
|
66
|
+
const Action = withTokens(ActionBase);
|
|
59
67
|
|
|
60
|
-
export { Action };
|
|
68
|
+
export { Action, ActionBase };
|
|
61
69
|
//# sourceMappingURL=Action.js.map
|