@semcore/breadcrumbs 17.0.0-prerelease.30 → 17.0.0-prerelease.31
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/CHANGELOG.md +1 -1
- package/lib/cjs/Breadcrumbs.js +2 -4
- package/lib/cjs/Breadcrumbs.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/Breadcrumbs.js +2 -4
- package/lib/es6/Breadcrumbs.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/esm/Breadcrumbs.mjs +2 -4
- package/lib/types/index.d.ts +2 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/lib/cjs/Breadcrumbs.js
CHANGED
|
@@ -73,8 +73,7 @@ function Item(props) {
|
|
|
73
73
|
href,
|
|
74
74
|
tabIndex,
|
|
75
75
|
tag,
|
|
76
|
-
ellipsis = true
|
|
77
|
-
hintProps
|
|
76
|
+
ellipsis = true
|
|
78
77
|
} = props;
|
|
79
78
|
const SSeparator = 'div';
|
|
80
79
|
const SListItem = 'li';
|
|
@@ -84,8 +83,7 @@ function Item(props) {
|
|
|
84
83
|
"use:href": !active && !disabled ? href : undefined,
|
|
85
84
|
"aria-current": active ? 'page' : undefined,
|
|
86
85
|
"use:tag": active ? 'span' : tag,
|
|
87
|
-
"ellipsis": ellipsis
|
|
88
|
-
"hintProps": hintProps
|
|
86
|
+
"ellipsis": ellipsis
|
|
89
87
|
}, _ref2)
|
|
90
88
|
}))), /*#__PURE__*/_react.default.createElement(SSeparator, _ref4.cn("SSeparator", {
|
|
91
89
|
"aria-hidden": 'true'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","names":["_core","require","_baseComponents","_i18nEnhance","_interopRequireDefault","_m","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","Breadcrumbs","Component","getItemProps","separator","locale","asProps","render","_ref","_ref3","SBreadcrumbs","Box","SListContainer","styles","getI18nText","Children","default","createElement","cn","assignProps","_defineProperty2","i18nEnhance","localizedMessages","tag","i18n","Item","props","_ref2","arguments[0]","_ref4","SBreadcrumbsItem","Text","active","disabled","href","tabIndex","ellipsis","
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","names":["_core","require","_baseComponents","_i18nEnhance","_interopRequireDefault","_m","_typography","_react","_intergalacticDynamicLocales","style","sstyled","insert","Breadcrumbs","Component","getItemProps","separator","locale","asProps","render","_ref","_ref3","SBreadcrumbs","Box","SListContainer","styles","getI18nText","Children","default","createElement","cn","assignProps","_defineProperty2","i18nEnhance","localizedMessages","tag","i18n","Item","props","_ref2","arguments[0]","_ref4","SBreadcrumbsItem","Text","active","disabled","href","tabIndex","ellipsis","SSeparator","SListItem","Fragment","undefined","defaultProps","_default","exports","createComponent"],"sources":["../../src/Breadcrumbs.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport SSeparator from '@semcore/icon/ChevronRight/m';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/breadcrumbs.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass Breadcrumbs extends Component {\n static displayName = 'Breadcrumbs';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n separator: <SSeparator />,\n tag: 'nav',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n getItemProps() {\n const { separator, locale } = this.asProps;\n return {\n separator,\n locale,\n };\n }\n\n render() {\n const SBreadcrumbs = Root;\n const SListContainer = 'ol';\n const { styles, getI18nText, Children } = this.asProps;\n return sstyled(styles)(\n <SBreadcrumbs render={Box} aria-label={getI18nText('breadcrumbs')}>\n <SListContainer>\n <Children />\n </SListContainer>\n </SBreadcrumbs>,\n );\n }\n}\n\nfunction Item(props) {\n const SBreadcrumbsItem = Root;\n const { styles, separator, active, disabled, href, tabIndex, tag, ellipsis = true } = props;\n const SSeparator = 'div';\n const SListItem = 'li';\n\n return sstyled(styles)(\n <>\n <SListItem>\n <SBreadcrumbsItem\n render={Text}\n use:tabIndex={active || disabled ? -1 : tabIndex}\n use:href={!active && !disabled ? href : undefined}\n aria-current={active ? 'page' : undefined}\n use:tag={active ? 'span' : tag}\n ellipsis={ellipsis}\n />\n </SListItem>\n <SSeparator aria-hidden='true'>{separator}</SSeparator>\n </>,\n );\n}\nItem.defaultProps = {\n tag: 'a',\n locale: 'en',\n tabIndex: 0,\n};\n\nexport default createComponent(Breadcrumbs, {\n Item,\n});\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,EAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAH,sBAAA,CAAAH,OAAA;AAGA,IAAAO,4BAAA,GAAAP,OAAA;AAAmF;AAAA,MAAAQ,KAAA,8BAAAT,KAAA,CAAAU,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEnF,MAAMC,WAAW,SAASC,eAAS,CAAC;EAWlCC,YAAYA,CAAA,EAAG;IACb,MAAM;MAAEC,SAAS;MAAEC;IAAO,CAAC,GAAG,IAAI,CAACC,OAAO;IAC1C,OAAO;MACLF,SAAS;MACTC;IACF,CAAC;EACH;EAEAE,MAAMA,CAAA,EAAG;IAAA,IAAAC,IAAA,QAAAF,OAAA;MAAAG,KAAA;IACP,MAAMC,YAAY,GAIMC,mBAAG;IAH3B,MAAMC,cAAc,GAAG,IAAI;IAC3B,MAAM;MAAEC,MAAM;MAAEC,WAAW;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACT,OAAO;IACtD,OAAAG,KAAA,GAAO,IAAAV,aAAO,EA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O,EAACc,MAAM,CAAC,eACpBjB,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAAArB,MAAA,CAAAoB,OAAA,CAAAuB,QAAA,qBACE3C,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACqB,SAAS,EAAAT,KAAA,CAAAX,EAAA,gCACRtB,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACa,gBAAgB,EAAAD,KAAA,CAAAX,EAAA;IAAA,OAAA7B,KAAA,CAAA8B,WAAA;MAAA,gBAEDa,MAAM,IAAIC,QAAQ,GAAG,CAAC,CAAC,GAAGE,QAAQ;MAAA,YACtC,CAACH,MAAM,IAAI,CAACC,QAAQ,GAAGC,IAAI,GAAGM,SAAS;MAAA,gBACnCR,MAAM,GAAG,MAAM,GAAGQ,SAAS;MAAA,WAChCR,MAAM,GAAG,MAAM,GAAGT,GAAG;MAAA,YACpBa;IAAQ,GAAAT,KAAA;EAAA,EACnB,CACQ,CAAC,eACZ/B,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACoB,UAAU,EAAAR,KAAA,CAAAX,EAAA;IAAA,eAAa;EAAM,IAAEd,SAAsB,CACtD,CAAC;AAEP;AACAqB,IAAI,CAACgB,YAAY,GAAG;EAClBlB,GAAG,EAAE,GAAG;EACRlB,MAAM,EAAE,IAAI;EACZ8B,QAAQ,EAAE;AACZ,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAEa,IAAA4B,qBAAe,EAAC3C,WAAW,EAAE;EAC1CwB;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { EllipsisSettings, SimpleHintPopperProps, BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\nexport type BreadcrumbsProps = BoxProps & {\n /**\n * Links divider\n * */\n separator?: React.ReactNode;\n /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type BreadcrumbsItemProps = BoxProps & {\n /** The property is responsible for the activity of the element */\n active?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Ellipsis settings. You shouldn't use `cropPosition: middle` for breadcrumbs.\n * If you're sure you need `cropPosition: middle`, set `w` to Breadcrumbs.Item manually, for correct Ellipsis calculations.\n * @default false\n */\n
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { EllipsisSettings, SimpleHintPopperProps, BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { TextEllipsisProps, TextHintProps } from '@semcore/typography';\n\nexport type BreadcrumbsProps = BoxProps & {\n /**\n * Links divider\n * */\n separator?: React.ReactNode;\n /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type BreadcrumbsItemProps = BoxProps & {\n /** The property is responsible for the activity of the element */\n active?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Ellipsis settings. You shouldn't use `cropPosition: middle` for breadcrumbs.\n * If you're sure you need `cropPosition: middle`, set `w` to Breadcrumbs.Item manually, for correct Ellipsis calculations.\n * @default false\n */\n} & TextHintProps & TextEllipsisProps;\n\nexport type BreadcrumbsContext = BreadcrumbsProps & {\n getItemProps: PropGetterFn;\n};\n\ndeclare const Breadcrumbs: Intergalactic.Component<'div', BreadcrumbsProps, BreadcrumbsContext> & {\n Item: Intergalactic.Component<'a', BreadcrumbsItemProps>;\n};\n\nexport default Breadcrumbs;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/Breadcrumbs.js
CHANGED
|
@@ -69,8 +69,7 @@ function Item(props) {
|
|
|
69
69
|
href,
|
|
70
70
|
tabIndex,
|
|
71
71
|
tag,
|
|
72
|
-
ellipsis = true
|
|
73
|
-
hintProps
|
|
72
|
+
ellipsis = true
|
|
74
73
|
} = props;
|
|
75
74
|
const SSeparator = 'div';
|
|
76
75
|
const SListItem = 'li';
|
|
@@ -80,8 +79,7 @@ function Item(props) {
|
|
|
80
79
|
"use:href": !active && !disabled ? href : undefined,
|
|
81
80
|
"aria-current": active ? 'page' : undefined,
|
|
82
81
|
"use:tag": active ? 'span' : tag,
|
|
83
|
-
"ellipsis": ellipsis
|
|
84
|
-
"hintProps": hintProps
|
|
82
|
+
"ellipsis": ellipsis
|
|
85
83
|
}, _ref2)
|
|
86
84
|
}))), /*#__PURE__*/React.createElement(SSeparator, _ref4.cn("SSeparator", {
|
|
87
85
|
"aria-hidden": 'true'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","names":["Box","createComponent","Component","sstyled","Root","i18nEnhance","SSeparator","Text","React","style","_sstyled","insert","localizedMessages","Breadcrumbs","getItemProps","separator","locale","asProps","render","_ref","_ref3","SBreadcrumbs","SListContainer","styles","getI18nText","Children","createElement","cn","_assignProps","_defineProperty","tag","i18n","Item","props","_ref2","arguments[0]","_ref4","SBreadcrumbsItem","active","disabled","href","tabIndex","ellipsis","
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","names":["Box","createComponent","Component","sstyled","Root","i18nEnhance","SSeparator","Text","React","style","_sstyled","insert","localizedMessages","Breadcrumbs","getItemProps","separator","locale","asProps","render","_ref","_ref3","SBreadcrumbs","SListContainer","styles","getI18nText","Children","createElement","cn","_assignProps","_defineProperty","tag","i18n","Item","props","_ref2","arguments[0]","_ref4","SBreadcrumbsItem","active","disabled","href","tabIndex","ellipsis","SListItem","Fragment","_assignProps2","undefined","defaultProps"],"sources":["../../src/Breadcrumbs.jsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport SSeparator from '@semcore/icon/ChevronRight/m';\nimport { Text } from '@semcore/typography';\nimport React from 'react';\n\nimport style from './style/breadcrumbs.shadow.css';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\n\nclass Breadcrumbs extends Component {\n static displayName = 'Breadcrumbs';\n static style = style;\n static enhance = [i18nEnhance(localizedMessages)];\n static defaultProps = {\n separator: <SSeparator />,\n tag: 'nav',\n i18n: localizedMessages,\n locale: 'en',\n };\n\n getItemProps() {\n const { separator, locale } = this.asProps;\n return {\n separator,\n locale,\n };\n }\n\n render() {\n const SBreadcrumbs = Root;\n const SListContainer = 'ol';\n const { styles, getI18nText, Children } = this.asProps;\n return sstyled(styles)(\n <SBreadcrumbs render={Box} aria-label={getI18nText('breadcrumbs')}>\n <SListContainer>\n <Children />\n </SListContainer>\n </SBreadcrumbs>,\n );\n }\n}\n\nfunction Item(props) {\n const SBreadcrumbsItem = Root;\n const { styles, separator, active, disabled, href, tabIndex, tag, ellipsis = true } = props;\n const SSeparator = 'div';\n const SListItem = 'li';\n\n return sstyled(styles)(\n <>\n <SListItem>\n <SBreadcrumbsItem\n render={Text}\n use:tabIndex={active || disabled ? -1 : tabIndex}\n use:href={!active && !disabled ? href : undefined}\n aria-current={active ? 'page' : undefined}\n use:tag={active ? 'span' : tag}\n ellipsis={ellipsis}\n />\n </SListItem>\n <SSeparator aria-hidden='true'>{separator}</SSeparator>\n </>,\n );\n}\nItem.defaultProps = {\n tag: 'a',\n locale: 'en',\n tabIndex: 0,\n};\n\nexport default createComponent(Breadcrumbs, {\n Item,\n});\n"],"mappings":";;;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,UAAU,MAAM,8BAA8B;AACrD,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAG1B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sourcesContent":["import type { EllipsisSettings, SimpleHintPopperProps, BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\nexport type BreadcrumbsProps = BoxProps & {\n /**\n * Links divider\n * */\n separator?: React.ReactNode;\n /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type BreadcrumbsItemProps = BoxProps & {\n /** The property is responsible for the activity of the element */\n active?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Ellipsis settings. You shouldn't use `cropPosition: middle` for breadcrumbs.\n * If you're sure you need `cropPosition: middle`, set `w` to Breadcrumbs.Item manually, for correct Ellipsis calculations.\n * @default false\n */\n
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { EllipsisSettings, SimpleHintPopperProps, BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type { TextEllipsisProps, TextHintProps } from '@semcore/typography';\n\nexport type BreadcrumbsProps = BoxProps & {\n /**\n * Links divider\n * */\n separator?: React.ReactNode;\n /** Specifies the locale for i18n support */\n locale?: string;\n};\n\nexport type BreadcrumbsItemProps = BoxProps & {\n /** The property is responsible for the activity of the element */\n active?: boolean;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Ellipsis settings. You shouldn't use `cropPosition: middle` for breadcrumbs.\n * If you're sure you need `cropPosition: middle`, set `w` to Breadcrumbs.Item manually, for correct Ellipsis calculations.\n * @default false\n */\n} & TextHintProps & TextEllipsisProps;\n\nexport type BreadcrumbsContext = BreadcrumbsProps & {\n getItemProps: PropGetterFn;\n};\n\ndeclare const Breadcrumbs: Intergalactic.Component<'div', BreadcrumbsProps, BreadcrumbsContext> & {\n Item: Intergalactic.Component<'a', BreadcrumbsItemProps>;\n};\n\nexport default Breadcrumbs;\n"],"mappings":"","ignoreList":[]}
|
package/lib/esm/Breadcrumbs.mjs
CHANGED
|
@@ -71,8 +71,7 @@ function Item(props) {
|
|
|
71
71
|
href,
|
|
72
72
|
tabIndex,
|
|
73
73
|
tag,
|
|
74
|
-
ellipsis = true
|
|
75
|
-
hintProps
|
|
74
|
+
ellipsis = true
|
|
76
75
|
} = props;
|
|
77
76
|
const SSeparator2 = "div";
|
|
78
77
|
const SListItem = "li";
|
|
@@ -82,8 +81,7 @@ function Item(props) {
|
|
|
82
81
|
"use:href": !active && !disabled ? href : void 0,
|
|
83
82
|
"aria-current": active ? "page" : void 0,
|
|
84
83
|
"use:tag": active ? "span" : tag,
|
|
85
|
-
"ellipsis": ellipsis
|
|
86
|
-
"hintProps": hintProps
|
|
84
|
+
"ellipsis": ellipsis
|
|
87
85
|
}, _ref2)
|
|
88
86
|
}))), /* @__PURE__ */ React.createElement(SSeparator2, _ref4.cn("SSeparator", {
|
|
89
87
|
"aria-hidden": "true"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { EllipsisSettings, SimpleHintPopperProps, BoxProps } from '@semcore/base-components';
|
|
2
2
|
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
3
|
+
import type { TextEllipsisProps, TextHintProps } from '@semcore/typography';
|
|
3
4
|
|
|
4
5
|
export type BreadcrumbsProps = BoxProps & {
|
|
5
6
|
/**
|
|
@@ -20,9 +21,7 @@ export type BreadcrumbsItemProps = BoxProps & {
|
|
|
20
21
|
* If you're sure you need `cropPosition: middle`, set `w` to Breadcrumbs.Item manually, for correct Ellipsis calculations.
|
|
21
22
|
* @default false
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
-
hintProps?: SimpleHintPopperProps;
|
|
25
|
-
};
|
|
24
|
+
} & TextHintProps & TextEllipsisProps;
|
|
26
25
|
|
|
27
26
|
export type BreadcrumbsContext = BreadcrumbsProps & {
|
|
28
27
|
getItemProps: PropGetterFn;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/breadcrumbs",
|
|
3
3
|
"description": "Semrush Breadcrumbs Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.31",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/typography": "^17.0.0-prerelease.
|
|
17
|
+
"@semcore/typography": "^17.0.0-prerelease.31"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@semcore/base-components": "^17.0.0 || ^17.0.0-0",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"directory": "semcore/breadcrumbs"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@semcore/core": "17.0.0-prerelease.
|
|
30
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
29
|
+
"@semcore/core": "17.0.0-prerelease.31",
|
|
30
|
+
"@semcore/base-components": "17.0.0-prerelease.31",
|
|
31
31
|
"@semcore/testing-utils": "1.0.0",
|
|
32
|
-
"@semcore/typography": "17.0.0-prerelease.
|
|
33
|
-
"@semcore/icon": "16.7.2-prerelease.
|
|
32
|
+
"@semcore/typography": "17.0.0-prerelease.31",
|
|
33
|
+
"@semcore/icon": "16.7.2-prerelease.31"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|