@bitrise/bitkit-v2 0.3.389 → 0.3.390
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.
|
@@ -28,6 +28,10 @@ var linkStyle = {
|
|
|
28
28
|
pointerEvents: "none"
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
+
var truncateStyle = {
|
|
32
|
+
display: "block",
|
|
33
|
+
truncate: true
|
|
34
|
+
};
|
|
31
35
|
var breadcrumbSlotRecipe = defineSlotRecipe({
|
|
32
36
|
className: "breadcrumb",
|
|
33
37
|
slots: breadcrumbAnatomy.keys(),
|
|
@@ -39,10 +43,15 @@ var breadcrumbSlotRecipe = defineSlotRecipe({
|
|
|
39
43
|
color: "text/tertiary",
|
|
40
44
|
gap: "4"
|
|
41
45
|
},
|
|
42
|
-
|
|
46
|
+
item: { "&:not(:has(~ .breadcrumb__item))": { minWidth: 0 } },
|
|
47
|
+
link: {
|
|
48
|
+
...linkStyle,
|
|
49
|
+
...truncateStyle
|
|
50
|
+
},
|
|
43
51
|
currentLink: {
|
|
44
52
|
color: "text/body",
|
|
45
|
-
textStyle: "body/md/semibold"
|
|
53
|
+
textStyle: "body/md/semibold",
|
|
54
|
+
...truncateStyle
|
|
46
55
|
},
|
|
47
56
|
separator: { color: "icon/disabled" },
|
|
48
57
|
ellipsis: { ...linkStyle }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Breadcrumb.recipe.ts"],"sourcesContent":["import { breadcrumbAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe, type SystemStyleObject } from '@chakra-ui/react/styled-system';\n\nconst linkStyle: SystemStyleObject = {\n cursor: 'pointer',\n color: 'text/link',\n textStyle: 'comp/link/md',\n _hover: {\n color: 'text/link-hover',\n textStyle: 'comp/link/md-hover',\n _active: {\n color: 'text/primary',\n textStyle: 'comp/link/md-hover',\n },\n },\n _active: {\n color: 'text/primary',\n textStyle: 'comp/link/md-hover',\n },\n _focusVisible: {\n borderRadius: '2',\n background: 'background/primary',\n backgroundBlendMode: 'multiply',\n },\n _disabled: {\n color: 'text/disabled',\n outline: 'none',\n pointerEvents: 'none',\n },\n};\n\nconst breadcrumbSlotRecipe = defineSlotRecipe({\n className: 'breadcrumb',\n slots: breadcrumbAnatomy.keys(),\n base: {\n list: {\n display: 'flex',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: 'text/tertiary',\n gap: '4',\n },\n link: {\n ...linkStyle,\n },\n currentLink: {\n color: 'text/body',\n textStyle: 'body/md/semibold',\n },\n separator: {\n color: 'icon/disabled',\n },\n ellipsis: {\n ...linkStyle,\n },\n },\n});\n\nexport default breadcrumbSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,YAA+B;CACnC,QAAQ;CACR,OAAO;CACP,WAAW;CACX,QAAQ;EACN,OAAO;EACP,WAAW;EACX,SAAS;GACP,OAAO;GACP,WAAW;EACb;CACF;CACA,SAAS;EACP,OAAO;EACP,WAAW;CACb;CACA,eAAe;EACb,cAAc;EACd,YAAY;EACZ,qBAAqB;CACvB;CACA,WAAW;EACT,OAAO;EACP,SAAS;EACT,eAAe;CACjB;AACF;AAEA,IAAM,uBAAuB,iBAAiB;CAC5C,WAAW;CACX,OAAO,kBAAkB,KAAK;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,KAAK;EACP;
|
|
1
|
+
{"version":3,"file":"Breadcrumb.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/Breadcrumb.recipe.ts"],"sourcesContent":["import { breadcrumbAnatomy } from '@chakra-ui/react/anatomy';\nimport { defineSlotRecipe, type SystemStyleObject } from '@chakra-ui/react/styled-system';\n\nconst linkStyle: SystemStyleObject = {\n cursor: 'pointer',\n color: 'text/link',\n textStyle: 'comp/link/md',\n _hover: {\n color: 'text/link-hover',\n textStyle: 'comp/link/md-hover',\n _active: {\n color: 'text/primary',\n textStyle: 'comp/link/md-hover',\n },\n },\n _active: {\n color: 'text/primary',\n textStyle: 'comp/link/md-hover',\n },\n _focusVisible: {\n borderRadius: '2',\n background: 'background/primary',\n backgroundBlendMode: 'multiply',\n },\n _disabled: {\n color: 'text/disabled',\n outline: 'none',\n pointerEvents: 'none',\n },\n};\n\n// A crumb that outgrows the trail is cut off by whatever is above it, with nothing to say it was cut.\n// `truncate` is Chakra's own utility for the three properties v1 carried, but it is not enough on its\n// own here: an anchor is inline by default, where overflow does not clip at all, and bitkit builds its\n// system from `defaultBaseConfig`, which ships no component recipes -- so Chakra's own\n// `display: inline-flex` for this slot never arrives. Measured against the alternatives, the\n// shrink-to-fit displays (inline-block, inline-flex) size to the text and never give way; only block\n// takes the width its item was shrunk to.\nconst truncateStyle: SystemStyleObject = {\n display: 'block',\n truncate: true,\n};\n\nconst breadcrumbSlotRecipe = defineSlotRecipe({\n className: 'breadcrumb',\n slots: breadcrumbAnatomy.keys(),\n base: {\n list: {\n display: 'flex',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: 'text/tertiary',\n gap: '4',\n },\n // A flex item refuses to shrink below its content, so without this the trail pushes its\n // container instead of truncating. Only the last crumb gives way: the ancestors above it are\n // short and stay readable, and the deepest one is the name that actually runs long.\n //\n // \"The item with no item after it\" rather than `_last`: a separator is an `<li>` of its own, and\n // the mobile trail ends with one, so the last child there is a separator and `:last-of-type`\n // picks nothing. The slot class is the only thing that tells the two apart -- Chakra emits\n // `breadcrumb__item` from this recipe's own `className`, and no `data-part`.\n item: {\n '&:not(:has(~ .breadcrumb__item))': {\n minWidth: 0,\n },\n },\n link: {\n ...linkStyle,\n ...truncateStyle,\n },\n currentLink: {\n color: 'text/body',\n textStyle: 'body/md/semibold',\n ...truncateStyle,\n },\n separator: {\n color: 'icon/disabled',\n },\n ellipsis: {\n ...linkStyle,\n },\n },\n});\n\nexport default breadcrumbSlotRecipe;\n"],"mappings":";;;AAGA,IAAM,YAA+B;CACnC,QAAQ;CACR,OAAO;CACP,WAAW;CACX,QAAQ;EACN,OAAO;EACP,WAAW;EACX,SAAS;GACP,OAAO;GACP,WAAW;EACb;CACF;CACA,SAAS;EACP,OAAO;EACP,WAAW;CACb;CACA,eAAe;EACb,cAAc;EACd,YAAY;EACZ,qBAAqB;CACvB;CACA,WAAW;EACT,OAAO;EACP,SAAS;EACT,eAAe;CACjB;AACF;AASA,IAAM,gBAAmC;CACvC,SAAS;CACT,UAAU;AACZ;AAEA,IAAM,uBAAuB,iBAAiB;CAC5C,WAAW;CACX,OAAO,kBAAkB,KAAK;CAC9B,MAAM;EACJ,MAAM;GACJ,SAAS;GACT,YAAY;GACZ,YAAY;GACZ,OAAO;GACP,KAAK;EACP;EASA,MAAM,EACJ,oCAAoC,EAClC,UAAU,EACZ,EACF;EACA,MAAM;GACJ,GAAG;GACH,GAAG;EACL;EACA,aAAa;GACX,OAAO;GACP,WAAW;GACX,GAAG;EACL;EACA,WAAW,EACT,OAAO,gBACT;EACA,UAAU,EACR,GAAG,UACL;CACF;AACF,CAAC"}
|