@bitrise/bitkit-v2 0.3.502-beta.3240 → 0.3.502-beta.3244
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/AGENTS.md +3 -7
- package/dist/components/BitkitButton/BitkitButton.d.ts +0 -7
- package/dist/components/BitkitButton/BitkitButton.js +3 -12
- package/dist/components/BitkitButton/BitkitButton.js.map +1 -1
- package/dist/components/BitkitCalendar/components/CalendarMonth.js +1 -1
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.d.ts +16 -0
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.js +21 -0
- package/dist/components/BitkitContentWrapper/BitkitContentWrapper.js.map +1 -0
- package/dist/components/BitkitFilter/BitkitFilter.d.ts +4 -9
- package/dist/components/BitkitFilter/BitkitFilter.js +4 -6
- package/dist/components/BitkitFilter/BitkitFilter.js.map +1 -1
- package/dist/components/BitkitFilter/BitkitFilterAdd.js +1 -1
- package/dist/components/BitkitIconButton/BitkitIconButton.d.ts +0 -8
- package/dist/components/BitkitIconButton/BitkitIconButton.js +4 -7
- package/dist/components/BitkitIconButton/BitkitIconButton.js.map +1 -1
- package/dist/components/BitkitPageHeader/BitkitPageHeader.d.ts +6 -28
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js +5 -3
- package/dist/components/BitkitPageHeader/BitkitPageHeader.js.map +1 -1
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.d.ts +18 -0
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.js +61 -0
- package/dist/components/BitkitPageSubheader/BitkitPageSubheader.js.map +1 -0
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.d.ts +2 -0
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.js +2 -1
- package/dist/components/BitkitSectionHeading/BitkitSectionHeading.js.map +1 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.d.ts +2 -0
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js +2 -1
- package/dist/components/BitkitStepsCard/BitkitStepsCard.js.map +1 -1
- package/dist/components/BitkitTooltip/BitkitTooltip.d.ts +3 -3
- package/dist/components/BitkitTooltip/BitkitTooltip.js.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/main.js +4 -2
- package/dist/theme/common/ContentWidth.common.d.ts +20 -0
- package/dist/theme/common/ContentWidth.common.js +15 -0
- package/dist/theme/common/ContentWidth.common.js.map +1 -0
- package/dist/theme/recipes/ContentWrapper.recipe.d.ts +18 -0
- package/dist/theme/recipes/ContentWrapper.recipe.js +29 -0
- package/dist/theme/recipes/ContentWrapper.recipe.js.map +1 -0
- package/dist/theme/recipes/Separator.recipe.d.ts +8 -0
- package/dist/theme/recipes/Separator.recipe.js +5 -1
- package/dist/theme/recipes/Separator.recipe.js.map +1 -1
- package/dist/theme/recipes/index.js +2 -0
- package/dist/theme/recipes/index.js.map +1 -1
- package/dist/theme/slot-recipes/Filter.recipe.d.ts +0 -8
- package/dist/theme/slot-recipes/Filter.recipe.js +22 -28
- package/dist/theme/slot-recipes/Filter.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/PageHeader.recipe.d.ts +10 -27
- package/dist/theme/slot-recipes/PageHeader.recipe.js +18 -22
- package/dist/theme/slot-recipes/PageHeader.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/PageSubheader.recipe.d.ts +28 -0
- package/dist/theme/slot-recipes/PageSubheader.recipe.js +139 -0
- package/dist/theme/slot-recipes/PageSubheader.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/StepCard.recipe.js +1 -1
- package/dist/theme/slot-recipes/StepCard.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/index.d.ts +43 -19
- package/dist/theme/slot-recipes/index.js +2 -0
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/utilities/focusableDisabledProps.d.ts +0 -22
- package/dist/utilities/focusableDisabledProps.js +0 -28
- package/dist/utilities/focusableDisabledProps.js.map +0 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import contentWidthStyles from "../common/ContentWidth.common.js";
|
|
3
|
+
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
4
|
+
//#region lib/theme/slot-recipes/PageSubheader.recipe.ts
|
|
5
|
+
var pageSubheaderSlotRecipe = defineSlotRecipe({
|
|
6
|
+
className: "page-subheader",
|
|
7
|
+
slots: [
|
|
8
|
+
"root",
|
|
9
|
+
"contentBlock",
|
|
10
|
+
"headerBlock",
|
|
11
|
+
"textBlock",
|
|
12
|
+
"title",
|
|
13
|
+
"secondaryText",
|
|
14
|
+
"actionBlock",
|
|
15
|
+
"tabs"
|
|
16
|
+
],
|
|
17
|
+
base: {
|
|
18
|
+
root: {
|
|
19
|
+
background: "background/primary",
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
width: "100%"
|
|
23
|
+
},
|
|
24
|
+
contentBlock: {
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
marginInline: "auto",
|
|
28
|
+
width: "100%"
|
|
29
|
+
},
|
|
30
|
+
headerBlock: {
|
|
31
|
+
alignItems: {
|
|
32
|
+
base: "stretch",
|
|
33
|
+
tablet: "flex-end"
|
|
34
|
+
},
|
|
35
|
+
display: "flex",
|
|
36
|
+
flexDirection: {
|
|
37
|
+
base: "column",
|
|
38
|
+
tablet: "row"
|
|
39
|
+
},
|
|
40
|
+
gap: {
|
|
41
|
+
base: "16",
|
|
42
|
+
tablet: "32"
|
|
43
|
+
},
|
|
44
|
+
paddingBlockEnd: {
|
|
45
|
+
base: "16",
|
|
46
|
+
tablet: "0"
|
|
47
|
+
},
|
|
48
|
+
paddingBlockStart: {
|
|
49
|
+
base: "16",
|
|
50
|
+
tablet: "32"
|
|
51
|
+
},
|
|
52
|
+
paddingInline: {
|
|
53
|
+
base: "16",
|
|
54
|
+
tablet: "32"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
textBlock: {
|
|
58
|
+
display: "flex",
|
|
59
|
+
flex: {
|
|
60
|
+
base: "none",
|
|
61
|
+
tablet: "1 0 0"
|
|
62
|
+
},
|
|
63
|
+
flexDirection: "column",
|
|
64
|
+
gap: {
|
|
65
|
+
base: "4",
|
|
66
|
+
tablet: "0"
|
|
67
|
+
},
|
|
68
|
+
minWidth: 0
|
|
69
|
+
},
|
|
70
|
+
title: {
|
|
71
|
+
color: "text/primary",
|
|
72
|
+
paddingBlockEnd: {
|
|
73
|
+
base: "0",
|
|
74
|
+
tablet: "4"
|
|
75
|
+
},
|
|
76
|
+
textStyle: {
|
|
77
|
+
base: "heading/mobile/h1",
|
|
78
|
+
tablet: "heading/h2"
|
|
79
|
+
},
|
|
80
|
+
truncate: true
|
|
81
|
+
},
|
|
82
|
+
secondaryText: {
|
|
83
|
+
color: "text/secondary",
|
|
84
|
+
textStyle: "body/md/regular"
|
|
85
|
+
},
|
|
86
|
+
actionBlock: {
|
|
87
|
+
display: "flex",
|
|
88
|
+
flexShrink: 0,
|
|
89
|
+
flexDirection: {
|
|
90
|
+
base: "row-reverse",
|
|
91
|
+
tablet: "row"
|
|
92
|
+
},
|
|
93
|
+
flexWrap: {
|
|
94
|
+
base: "wrap-reverse",
|
|
95
|
+
tablet: "wrap"
|
|
96
|
+
},
|
|
97
|
+
gap: "12",
|
|
98
|
+
"& > *": { flex: {
|
|
99
|
+
base: "1 1 auto",
|
|
100
|
+
tablet: "none"
|
|
101
|
+
} }
|
|
102
|
+
},
|
|
103
|
+
tabs: {
|
|
104
|
+
marginBlockEnd: rem(-1),
|
|
105
|
+
paddingInlineEnd: "32",
|
|
106
|
+
paddingInlineStart: "16"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
variants: {
|
|
110
|
+
contentWidth: Object.fromEntries(Object.entries(contentWidthStyles).map(([key, styles]) => [key, key === "full" ? { contentBlock: styles } : {
|
|
111
|
+
contentBlock: styles,
|
|
112
|
+
tabs: { paddingInlineStart: {
|
|
113
|
+
base: "16",
|
|
114
|
+
tablet: "32"
|
|
115
|
+
} }
|
|
116
|
+
}])),
|
|
117
|
+
hasTabs: {
|
|
118
|
+
true: {
|
|
119
|
+
root: {
|
|
120
|
+
borderBlockEnd: "1px solid",
|
|
121
|
+
borderColor: "border/regular"
|
|
122
|
+
},
|
|
123
|
+
headerBlock: { paddingBlockEnd: {
|
|
124
|
+
base: "16",
|
|
125
|
+
tablet: "24"
|
|
126
|
+
} }
|
|
127
|
+
},
|
|
128
|
+
false: {}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
defaultVariants: {
|
|
132
|
+
contentWidth: "full",
|
|
133
|
+
hasTabs: false
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
export { pageSubheaderSlotRecipe as default };
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=PageSubheader.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSubheader.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/PageSubheader.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport contentWidthStyles from '../common/ContentWidth.common';\nimport { rem } from '../themeUtils';\n\nconst pageSubheaderSlotRecipe = defineSlotRecipe({\n className: 'page-subheader',\n slots: ['root', 'contentBlock', 'headerBlock', 'textBlock', 'title', 'secondaryText', 'actionBlock', 'tabs'] as const,\n base: {\n root: {\n background: 'background/primary',\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n },\n contentBlock: {\n display: 'flex',\n flexDirection: 'column',\n marginInline: 'auto',\n width: '100%',\n },\n headerBlock: {\n alignItems: { base: 'stretch', tablet: 'flex-end' },\n display: 'flex',\n flexDirection: { base: 'column', tablet: 'row' },\n gap: { base: '16', tablet: '32' },\n paddingBlockEnd: { base: '16', tablet: '0' },\n paddingBlockStart: { base: '16', tablet: '32' },\n paddingInline: { base: '16', tablet: '32' },\n },\n textBlock: {\n display: 'flex',\n flex: { base: 'none', tablet: '1 0 0' },\n flexDirection: 'column',\n gap: { base: '4', tablet: '0' },\n minWidth: 0,\n },\n title: {\n color: 'text/primary',\n // Desktop keeps the design's 4px under the title with or without the secondary text; mobile has a gap instead.\n paddingBlockEnd: { base: '0', tablet: '4' },\n textStyle: { base: 'heading/mobile/h1', tablet: 'heading/h2' },\n truncate: true,\n },\n secondaryText: {\n color: 'text/secondary',\n textStyle: 'body/md/regular',\n },\n actionBlock: {\n display: 'flex',\n flexShrink: 0,\n // Mobile puts the primary action first, so the row (and its lines, once they wrap) reverses the DOM order.\n flexDirection: { base: 'row-reverse', tablet: 'row' },\n flexWrap: { base: 'wrap-reverse', tablet: 'wrap' },\n gap: '12',\n '& > *': { flex: { base: '1 1 auto', tablet: 'none' } },\n },\n tabs: {\n // Lands the tab list's own bottom line on the root's border, so the subheader keeps one edge.\n marginBlockEnd: rem(-1),\n paddingInlineEnd: '32',\n paddingInlineStart: '16',\n },\n },\n variants: {\n contentWidth: Object.fromEntries(\n Object.entries(contentWidthStyles).map(([key, styles]) => [\n key,\n // The capped design insets the tabs by 32, the full-width one by 16 (pending a design answer on which is right).\n key === 'full'\n ? { contentBlock: styles }\n : { contentBlock: styles, tabs: { paddingInlineStart: { base: '16', tablet: '32' } } },\n ]),\n ) as {\n [K in keyof typeof contentWidthStyles]: {\n contentBlock: (typeof contentWidthStyles)[K];\n tabs?: { paddingInlineStart: { base: string; tablet: string } };\n };\n },\n hasTabs: {\n true: {\n root: {\n borderBlockEnd: '1px solid',\n borderColor: 'border/regular',\n },\n headerBlock: {\n paddingBlockEnd: { base: '16', tablet: '24' },\n },\n },\n false: {},\n },\n },\n defaultVariants: {\n contentWidth: 'full',\n hasTabs: false,\n },\n});\n\nexport default pageSubheaderSlotRecipe;\n"],"mappings":";;;;AAKA,IAAM,0BAA0B,iBAAiB;CAC/C,WAAW;CACX,OAAO;EAAC;EAAQ;EAAgB;EAAe;EAAa;EAAS;EAAiB;EAAe;CAAM;CAC3G,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,eAAe;GACf,OAAO;EACT;EACA,cAAc;GACZ,SAAS;GACT,eAAe;GACf,cAAc;GACd,OAAO;EACT;EACA,aAAa;GACX,YAAY;IAAE,MAAM;IAAW,QAAQ;GAAW;GAClD,SAAS;GACT,eAAe;IAAE,MAAM;IAAU,QAAQ;GAAM;GAC/C,KAAK;IAAE,MAAM;IAAM,QAAQ;GAAK;GAChC,iBAAiB;IAAE,MAAM;IAAM,QAAQ;GAAI;GAC3C,mBAAmB;IAAE,MAAM;IAAM,QAAQ;GAAK;GAC9C,eAAe;IAAE,MAAM;IAAM,QAAQ;GAAK;EAC5C;EACA,WAAW;GACT,SAAS;GACT,MAAM;IAAE,MAAM;IAAQ,QAAQ;GAAQ;GACtC,eAAe;GACf,KAAK;IAAE,MAAM;IAAK,QAAQ;GAAI;GAC9B,UAAU;EACZ;EACA,OAAO;GACL,OAAO;GAEP,iBAAiB;IAAE,MAAM;IAAK,QAAQ;GAAI;GAC1C,WAAW;IAAE,MAAM;IAAqB,QAAQ;GAAa;GAC7D,UAAU;EACZ;EACA,eAAe;GACb,OAAO;GACP,WAAW;EACb;EACA,aAAa;GACX,SAAS;GACT,YAAY;GAEZ,eAAe;IAAE,MAAM;IAAe,QAAQ;GAAM;GACpD,UAAU;IAAE,MAAM;IAAgB,QAAQ;GAAO;GACjD,KAAK;GACL,SAAS,EAAE,MAAM;IAAE,MAAM;IAAY,QAAQ;GAAO,EAAE;EACxD;EACA,MAAM;GAEJ,gBAAgB,IAAI,EAAE;GACtB,kBAAkB;GAClB,oBAAoB;EACtB;CACF;CACA,UAAU;EACR,cAAc,OAAO,YACnB,OAAO,QAAQ,kBAAkB,CAAC,CAAC,KAAK,CAAC,KAAK,YAAY,CACxD,KAEA,QAAQ,SACJ,EAAE,cAAc,OAAO,IACvB;GAAE,cAAc;GAAQ,MAAM,EAAE,oBAAoB;IAAE,MAAM;IAAM,QAAQ;GAAK,EAAE;EAAE,CACzF,CAAC,CACH;EAMA,SAAS;GACP,MAAM;IACJ,MAAM;KACJ,gBAAgB;KAChB,aAAa;IACf;IACA,aAAa,EACX,iBAAiB;KAAE,MAAM;KAAM,QAAQ;IAAK,EAC9C;GACF;GACA,OAAO,CAAC;EACV;CACF;CACA,iBAAiB;EACf,cAAc;EACd,SAAS;CACX;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepCard.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/StepCard.recipe.ts"],"sourcesContent":["import { cardAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst stepsCardAnatomy = cardAnatomy.extendWith('titleGroup');\n\nconst stepCardSlotRecipe = defineSlotRecipe({\n className: 'steps-card',\n slots: stepsCardAnatomy.keys(),\n base: {\n root: {\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/minimal',\n borderRadius: '8',\n boxShadow: 'elevation/
|
|
1
|
+
{"version":3,"file":"StepCard.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/StepCard.recipe.ts"],"sourcesContent":["import { cardAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nconst stepsCardAnatomy = cardAnatomy.extendWith('titleGroup');\n\nconst stepCardSlotRecipe = defineSlotRecipe({\n className: 'steps-card',\n slots: stepsCardAnatomy.keys(),\n base: {\n root: {\n backgroundColor: 'background/primary',\n border: '1px solid',\n borderColor: 'border/minimal',\n borderRadius: '8',\n boxShadow: 'elevation/sm',\n overflow: 'hidden',\n },\n header: {\n paddingBlockStart: '32',\n paddingInline: { base: '24', tablet: '32' },\n },\n body: {\n display: 'flex',\n flexDirection: 'column',\n gap: '24',\n paddingBlockEnd: '48',\n paddingBlockStart: '32',\n paddingInline: { base: '24', tablet: '32' },\n },\n titleGroup: {\n display: 'flex',\n flexDirection: 'column',\n gap: '4',\n },\n title: {\n color: 'text/primary',\n textStyle: 'heading/h3',\n },\n description: {\n color: 'text/secondary',\n textStyle: 'body/md/regular',\n },\n footer: {\n alignItems: 'center',\n borderBlockStart: '1px solid',\n borderColor: 'border/minimal',\n display: 'flex',\n gap: '16',\n justifyContent: 'flex-end',\n padding: { base: '24', tablet: '32' },\n },\n },\n});\n\nexport default stepCardSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,mBAAmB,YAAY,WAAW,YAAY;AAE5D,IAAM,qBAAqB,iBAAiB;CAC1C,WAAW;CACX,OAAO,iBAAiB,KAAK;CAC7B,MAAM;EACJ,MAAM;GACJ,iBAAiB;GACjB,QAAQ;GACR,aAAa;GACb,cAAc;GACd,WAAW;GACX,UAAU;EACZ;EACA,QAAQ;GACN,mBAAmB;GACnB,eAAe;IAAE,MAAM;IAAM,QAAQ;GAAK;EAC5C;EACA,MAAM;GACJ,SAAS;GACT,eAAe;GACf,KAAK;GACL,iBAAiB;GACjB,mBAAmB;GACnB,eAAe;IAAE,MAAM;IAAM,QAAQ;GAAK;EAC5C;EACA,YAAY;GACV,SAAS;GACT,eAAe;GACf,KAAK;EACP;EACA,OAAO;GACL,OAAO;GACP,WAAW;EACb;EACA,aAAa;GACX,OAAO;GACP,WAAW;EACb;EACA,QAAQ;GACN,YAAY;GACZ,kBAAkB;GAClB,aAAa;GACb,SAAS;GACT,KAAK;GACL,gBAAgB;GAChB,SAAS;IAAE,MAAM;IAAM,QAAQ;GAAK;EACtC;CACF;AACF,CAAC"}
|
|
@@ -1217,14 +1217,6 @@ declare const slotRecipes: {
|
|
|
1217
1217
|
};
|
|
1218
1218
|
};
|
|
1219
1219
|
};
|
|
1220
|
-
contentAlign: {
|
|
1221
|
-
center: {};
|
|
1222
|
-
start: {
|
|
1223
|
-
root: {
|
|
1224
|
-
justifyContent: "flex-start";
|
|
1225
|
-
};
|
|
1226
|
-
};
|
|
1227
|
-
};
|
|
1228
1220
|
}>;
|
|
1229
1221
|
imageCropper: import('@chakra-ui/react').SlotRecipeDefinition<"grid" | "image" | "root" | "handle" | "viewport" | "selection", import('@chakra-ui/react').SlotRecipeVariantRecord<"grid" | "image" | "root" | "handle" | "viewport" | "selection">>;
|
|
1230
1222
|
inlineLoading: import('@chakra-ui/react').SlotRecipeDefinition<"label" | "root", {
|
|
@@ -1931,24 +1923,16 @@ declare const slotRecipes: {
|
|
|
1931
1923
|
alignsToContent: {
|
|
1932
1924
|
true: {
|
|
1933
1925
|
headerBlock: {
|
|
1926
|
+
marginInline: "auto";
|
|
1934
1927
|
tablet: {
|
|
1935
1928
|
paddingInlineStart: "32";
|
|
1936
1929
|
};
|
|
1937
1930
|
};
|
|
1938
|
-
|
|
1939
|
-
false: {};
|
|
1940
|
-
};
|
|
1941
|
-
contentAlign: {
|
|
1942
|
-
center: {
|
|
1943
|
-
headerBlock: {
|
|
1931
|
+
tabs: {
|
|
1944
1932
|
marginInline: "auto";
|
|
1945
1933
|
};
|
|
1946
1934
|
};
|
|
1947
|
-
|
|
1948
|
-
headerBlock: {
|
|
1949
|
-
marginInlineEnd: "auto";
|
|
1950
|
-
};
|
|
1951
|
-
};
|
|
1935
|
+
false: {};
|
|
1952
1936
|
};
|
|
1953
1937
|
}>;
|
|
1954
1938
|
pageSidebar: import('@chakra-ui/react').SlotRecipeDefinition<"body" | "footer" | "title" | "root" | "item" | "suffixIcon" | "titleText" | "titleBlock" | "itemLabel" | "itemIcon" | "contentBlock" | "drawerHeader" | "divider" | "drawerBackdrop" | "drawerCloseButton" | "drawerContent" | "drawerHeaderAvatar" | "drawerHeaderSecondaryText" | "drawerHeaderTextBlock" | "drawerHeaderTitle" | "progressBlocker" | "progressConnector" | "progressContentBlock" | "progressIcon" | "progressLabel" | "progressRow" | "progressSecondaryText" | "progressTextBlock" | "project" | "projectLabel" | "projectValue" | "projectValueWrapper" | "selectionMarker", {
|
|
@@ -2116,6 +2100,46 @@ declare const slotRecipes: {
|
|
|
2116
2100
|
false: {};
|
|
2117
2101
|
};
|
|
2118
2102
|
}>;
|
|
2103
|
+
pageSubheader: import('@chakra-ui/react').SlotRecipeDefinition<"title" | "tabs" | "root" | "secondaryText" | "headerBlock" | "contentBlock" | "textBlock" | "actionBlock", {
|
|
2104
|
+
contentWidth: { [K in "full" | "640" | "960" | "1280" | "1616"]: {
|
|
2105
|
+
contentBlock: {
|
|
2106
|
+
readonly '640': {
|
|
2107
|
+
readonly maxWidth: "layout/maxWidth/640";
|
|
2108
|
+
};
|
|
2109
|
+
readonly '960': {
|
|
2110
|
+
readonly maxWidth: "layout/maxWidth/960";
|
|
2111
|
+
};
|
|
2112
|
+
readonly '1280': {
|
|
2113
|
+
readonly maxWidth: "layout/maxWidth/1280";
|
|
2114
|
+
};
|
|
2115
|
+
readonly '1616': {
|
|
2116
|
+
readonly maxWidth: "layout/maxWidth/1616";
|
|
2117
|
+
};
|
|
2118
|
+
readonly full: {};
|
|
2119
|
+
}[K];
|
|
2120
|
+
tabs?: {
|
|
2121
|
+
paddingInlineStart: {
|
|
2122
|
+
base: string;
|
|
2123
|
+
tablet: string;
|
|
2124
|
+
};
|
|
2125
|
+
};
|
|
2126
|
+
}; };
|
|
2127
|
+
hasTabs: {
|
|
2128
|
+
true: {
|
|
2129
|
+
root: {
|
|
2130
|
+
borderBlockEnd: "1px solid";
|
|
2131
|
+
borderColor: "border/regular";
|
|
2132
|
+
};
|
|
2133
|
+
headerBlock: {
|
|
2134
|
+
paddingBlockEnd: {
|
|
2135
|
+
base: "16";
|
|
2136
|
+
tablet: "24";
|
|
2137
|
+
};
|
|
2138
|
+
};
|
|
2139
|
+
};
|
|
2140
|
+
false: {};
|
|
2141
|
+
};
|
|
2142
|
+
}>;
|
|
2119
2143
|
pagination: import('@chakra-ui/react').SlotRecipeDefinition<"text" | "root" | "itemsBlock" | "itemsSelect" | "pageBlock" | "pageSelect", {
|
|
2120
2144
|
variant: {
|
|
2121
2145
|
card: {
|
|
@@ -40,6 +40,7 @@ import overflowContentSlotRecipe from "./OverflowContent.recipe.js";
|
|
|
40
40
|
import pageFooterSlotRecipe from "./PageFooter.recipe.js";
|
|
41
41
|
import pageHeaderSlotRecipe from "./PageHeader.recipe.js";
|
|
42
42
|
import pageSidebarSlotRecipe from "./PageSidebar.recipe.js";
|
|
43
|
+
import pageSubheaderSlotRecipe from "./PageSubheader.recipe.js";
|
|
43
44
|
import paginationSlotRecipe from "./Pagination.recipe.js";
|
|
44
45
|
import paginationLoadMoreRecipe from "./PaginationLoadMore.recipe.js";
|
|
45
46
|
import popoverSlotRecipe from "./Popover.recipe.js";
|
|
@@ -106,6 +107,7 @@ var slotRecipes = {
|
|
|
106
107
|
pageFooter: pageFooterSlotRecipe,
|
|
107
108
|
pageHeader: pageHeaderSlotRecipe,
|
|
108
109
|
pageSidebar: pageSidebarSlotRecipe,
|
|
110
|
+
pageSubheader: pageSubheaderSlotRecipe,
|
|
109
111
|
pagination: paginationSlotRecipe,
|
|
110
112
|
paginationLoadMore: paginationLoadMoreRecipe,
|
|
111
113
|
popover: popoverSlotRecipe,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport filterSlotRecipe from './Filter.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport listboxSlotRecipe from './Listbox.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiHeaderSlotRecipe from './UIHeader.recipe';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n filter: filterSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n listbox: listboxSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiHeader: uiHeaderSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport filterSlotRecipe from './Filter.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport listboxSlotRecipe from './Listbox.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport pageSubheaderSlotRecipe from './PageSubheader.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiHeaderSlotRecipe from './UIHeader.recipe';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n filter: filterSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n listbox: listboxSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pageSubheader: pageSubheaderSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiHeader: uiHeaderSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,IAAM,cAAc;CAClB,WAAW;CACX,WAAW;CACX,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,aAAa;CACb,aAAa;CACb,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,QAAQ;CACR,eAAe;CACf,QAAQ;CACR,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAcA;CACd,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,cAAc;CACd,eAAeC;CACf,MAAM;CACN,SAAS;CACT,UAAU;CACV,cAAc;CACd,MAAM;CACN,aAAa;CACb,UAAU;CACV,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,eAAe;CACf,YAAY;CACZ,oBAAoBC;CACpB,SAAS;CACT,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,gBAAgBC;CAChB,aAAa;CACb,cAAc;CACd,QAAQ;CACR,cAAc;CACd,aAAa;CACb,MAAM;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACX,MAAM;CACN,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,UAAU;CACV,WAAW;AACb"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit-v2",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.502-beta.
|
|
4
|
+
"version": "0.3.502-beta.3244",
|
|
5
5
|
"description": "Bitrise Design System Components built with Chakra UI V3",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"react": "^18.3.1",
|
|
90
90
|
"react-dom": "^18.3.1",
|
|
91
91
|
"release-it": "^21.1.1",
|
|
92
|
+
"remark-gfm": "^4.0.1",
|
|
92
93
|
"storybook": "10.6.2",
|
|
93
94
|
"svgo": "~3.3.4",
|
|
94
95
|
"tsx": "^4.23.15",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MouseEvent } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Disables a button without the native `disabled` attribute, for a button whose tooltip explains
|
|
4
|
-
* why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could
|
|
5
|
-
* never open. It stays focusable and is announced as unavailable via `aria-disabled`.
|
|
6
|
-
*
|
|
7
|
-
* Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,
|
|
8
|
-
* Space and a form's implicit submission all go through, so nothing activates the button; it also
|
|
9
|
-
* replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops
|
|
10
|
-
* propagation too: a natively disabled button fires no click at all, so a clickable row or card
|
|
11
|
-
* around it must not get one either.
|
|
12
|
-
* `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be
|
|
13
|
-
* exactly `""`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `""`
|
|
14
|
-
* as disabled.
|
|
15
|
-
*/
|
|
16
|
-
declare const focusableDisabledProps: {
|
|
17
|
-
readonly 'aria-disabled': true;
|
|
18
|
-
readonly 'data-disabled': "";
|
|
19
|
-
readonly onClick: (event: MouseEvent) => void;
|
|
20
|
-
readonly onKeyDown: undefined;
|
|
21
|
-
};
|
|
22
|
-
export default focusableDisabledProps;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//#region lib/utilities/focusableDisabledProps.ts
|
|
2
|
-
/**
|
|
3
|
-
* Disables a button without the native `disabled` attribute, for a button whose tooltip explains
|
|
4
|
-
* why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could
|
|
5
|
-
* never open. It stays focusable and is announced as unavailable via `aria-disabled`.
|
|
6
|
-
*
|
|
7
|
-
* Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,
|
|
8
|
-
* Space and a form's implicit submission all go through, so nothing activates the button; it also
|
|
9
|
-
* replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops
|
|
10
|
-
* propagation too: a natively disabled button fires no click at all, so a clickable row or card
|
|
11
|
-
* around it must not get one either.
|
|
12
|
-
* `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be
|
|
13
|
-
* exactly `""`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `""`
|
|
14
|
-
* as disabled.
|
|
15
|
-
*/
|
|
16
|
-
var focusableDisabledProps = {
|
|
17
|
-
"aria-disabled": true,
|
|
18
|
-
"data-disabled": "",
|
|
19
|
-
onClick: (event) => {
|
|
20
|
-
event.preventDefault();
|
|
21
|
-
event.stopPropagation();
|
|
22
|
-
},
|
|
23
|
-
onKeyDown: void 0
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { focusableDisabledProps as default };
|
|
27
|
-
|
|
28
|
-
//# sourceMappingURL=focusableDisabledProps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focusableDisabledProps.js","names":[],"sources":["../../lib/utilities/focusableDisabledProps.ts"],"sourcesContent":["import { type MouseEvent } from 'react';\n\n/**\n * Disables a button without the native `disabled` attribute, for a button whose tooltip explains\n * why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could\n * never open. It stays focusable and is announced as unavailable via `aria-disabled`.\n *\n * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,\n * Space and a form's implicit submission all go through, so nothing activates the button; it also\n * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops\n * propagation too: a natively disabled button fires no click at all, so a clickable row or card\n * around it must not get one either.\n * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be\n * exactly `\"\"`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `\"\"`\n * as disabled.\n */\nconst focusableDisabledProps = {\n 'aria-disabled': true,\n 'data-disabled': '',\n onClick: (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n },\n onKeyDown: undefined,\n} as const;\n\nexport default focusableDisabledProps;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAM,yBAAyB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,UAAU,UAAsB;EAC9B,MAAM,eAAe;EACrB,MAAM,gBAAgB;CACxB;CACA,WAAW,KAAA;AACb"}
|