@bolttech/ob-atoms-breadcrumbs 1.0.0 → 1.0.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/index.cjs.js CHANGED
@@ -1,9 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
3
  var react = require('react');
5
4
  var uiUtils = require('@bolttech/ui-utils');
6
5
  var obAtomsIcon = require('@bolttech/ob-atoms-icon');
6
+ var jsxDevRuntime = require('react/jsx-dev-runtime');
7
+
8
+ function _objectWithoutPropertiesLoose(r, e) {
9
+ if (null == r) return {};
10
+ var t = {};
11
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
12
+ if (-1 !== e.indexOf(n)) continue;
13
+ t[n] = r[n];
14
+ }
15
+ return t;
16
+ }
7
17
 
8
18
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
19
 
@@ -19,7 +29,7 @@ var fails$b = fails$c;
19
29
 
20
30
  var functionBindNative = !fails$b(function () {
21
31
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
22
- var test = (function () { /* empty */ }).bind();
32
+ var test = function () { /* empty */ }.bind();
23
33
  // eslint-disable-next-line no-prototype-builtins -- safe
24
34
  return typeof test != 'function' || test.hasOwnProperty('prototype');
25
35
  });
@@ -125,10 +135,10 @@ var SHARED = '__core-js_shared__';
125
135
  var store$3 = sharedStore.exports = globalThis$d[SHARED] || defineGlobalProperty$2(SHARED, {});
126
136
 
127
137
  (store$3.versions || (store$3.versions = [])).push({
128
- version: '3.48.0',
138
+ version: '3.49.0',
129
139
  mode: 'global',
130
140
  copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
131
- license: 'https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE',
141
+ license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE',
132
142
  source: 'https://github.com/zloirock/core-js'
133
143
  });
134
144
 
@@ -913,7 +923,7 @@ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
913
923
 
914
924
  var EXISTS = hasOwn$5(FunctionPrototype, 'name');
915
925
  // additional protection from minified / mangled / dropped function names
916
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
926
+ var PROPER = EXISTS && function something() { /* empty */ }.name === 'something';
917
927
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype, 'name').configurable));
918
928
 
919
929
  var functionName = {
@@ -1666,11 +1676,13 @@ var createIteratorProxyPrototype = function (IS_ITERATOR) {
1666
1676
  'return': function () {
1667
1677
  var state = getInternalState(this);
1668
1678
  var iterator = state.iterator;
1679
+ var done = state.done;
1669
1680
  state.done = true;
1670
1681
  if (IS_ITERATOR) {
1671
1682
  var returnMethod = getMethod(iterator, 'return');
1672
1683
  return returnMethod ? call$2(returnMethod, iterator) : createIterResultObject(undefined, true);
1673
1684
  }
1685
+ if (done) return createIterResultObject(undefined, true);
1674
1686
  if (state.inner) try {
1675
1687
  iteratorClose$2(state.inner.iterator, NORMAL);
1676
1688
  } catch (error) {
@@ -1679,7 +1691,8 @@ var createIteratorProxyPrototype = function (IS_ITERATOR) {
1679
1691
  if (state.openIters) try {
1680
1692
  iteratorCloseAll(state.openIters, NORMAL);
1681
1693
  } catch (error) {
1682
- return iteratorClose$2(iterator, THROW, error);
1694
+ if (iterator) return iteratorClose$2(iterator, THROW, error);
1695
+ throw error;
1683
1696
  }
1684
1697
  if (iterator) iteratorClose$2(iterator, NORMAL);
1685
1698
  return createIterResultObject(undefined, true);
@@ -1950,48 +1963,16 @@ for (var COLLECTION_NAME in DOMIterables) {
1950
1963
 
1951
1964
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1952
1965
 
1953
- /******************************************************************************
1954
- Copyright (c) Microsoft Corporation.
1955
-
1956
- Permission to use, copy, modify, and/or distribute this software for any
1957
- purpose with or without fee is hereby granted.
1958
-
1959
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1960
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1961
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1962
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1963
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1964
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1965
- PERFORMANCE OF THIS SOFTWARE.
1966
- ***************************************************************************** */
1967
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1968
-
1969
-
1970
- function __rest(s, e) {
1971
- var t = {};
1972
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1973
- t[p] = s[p];
1974
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1975
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1976
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1977
- t[p[i]] = s[p[i]];
1978
- }
1979
- return t;
1980
- }
1981
-
1982
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1983
- var e = new Error(message);
1984
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1985
- };
1986
-
1987
- const Breadcrumbs = /*#__PURE__*/react.forwardRef((_a, ref) => {
1988
- var {
1966
+ const _excluded = ["id", "dataTestId", "items", "ariaLabel"];
1967
+ var _jsxFileName = "/home/silas-silva/Documents/projects/bgs-frontend-ui/libs/ob/atoms/breadcrumbs/src/lib/breadcrumbs.tsx";
1968
+ const Breadcrumbs = /*#__PURE__*/react.forwardRef((_ref, ref) => {
1969
+ let {
1989
1970
  id = 'breadcrumbs-id',
1990
1971
  dataTestId = 'breadcrumbs-data-testid',
1991
1972
  items,
1992
1973
  ariaLabel = 'Show complete navigation.'
1993
- } = _a,
1994
- props = __rest(_a, ["id", "dataTestId", "items", "ariaLabel"]);
1974
+ } = _ref,
1975
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
1995
1976
  const [expanded, setExpanded] = react.useState(false);
1996
1977
  const shouldShrink = items.length > 5;
1997
1978
  const filteredItems = react.useMemo(() => {
@@ -2006,34 +1987,54 @@ const Breadcrumbs = /*#__PURE__*/react.forwardRef((_a, ref) => {
2006
1987
  return filteredItems.map((item, index) => {
2007
1988
  // Last item
2008
1989
  if (index === items.length - 1 || shouldShrink && index === filteredItems.length - 1) {
2009
- return jsxRuntime.jsx("li", {
1990
+ return /*#__PURE__*/jsxDevRuntime.jsxDEV("li", {
2010
1991
  className: "flex items-center",
2011
1992
  "aria-current": "page",
2012
1993
  children: item.label
2013
- }, index);
1994
+ }, index, false, {
1995
+ fileName: _jsxFileName,
1996
+ lineNumber: 39,
1997
+ columnNumber: 13
1998
+ }, undefined);
2014
1999
  }
2015
2000
  if (shouldShrink && index === 1) {
2016
- return [jsxRuntime.jsx("li", {
2001
+ return [/*#__PURE__*/jsxDevRuntime.jsxDEV("li", {
2017
2002
  className: "flex items-center",
2018
- children: jsxRuntime.jsx("button", {
2003
+ children: /*#__PURE__*/jsxDevRuntime.jsxDEV("button", {
2019
2004
  type: "button",
2020
2005
  className: "cursor-pointer",
2021
2006
  onClick: item.onClick,
2022
2007
  "aria-expanded": "false",
2023
2008
  "aria-label": ariaLabel,
2024
2009
  children: item.label
2025
- })
2026
- }, index), jsxRuntime.jsx("li", {
2010
+ }, void 0, false, {
2011
+ fileName: _jsxFileName,
2012
+ lineNumber: 48,
2013
+ columnNumber: 15
2014
+ }, undefined)
2015
+ }, index, false, {
2016
+ fileName: _jsxFileName,
2017
+ lineNumber: 47,
2018
+ columnNumber: 13
2019
+ }, undefined), /*#__PURE__*/jsxDevRuntime.jsxDEV("li", {
2027
2020
  className: "flex items-center",
2028
2021
  "aria-hidden": true,
2029
- children: jsxRuntime.jsx(obAtomsIcon.Icon, {
2022
+ children: /*#__PURE__*/jsxDevRuntime.jsxDEV(obAtomsIcon.Icon, {
2030
2023
  icon: "chevron_right"
2031
- })
2032
- }, `divider-${index}`)];
2024
+ }, void 0, false, {
2025
+ fileName: _jsxFileName,
2026
+ lineNumber: 63,
2027
+ columnNumber: 15
2028
+ }, undefined)
2029
+ }, `divider-${index}`, false, {
2030
+ fileName: _jsxFileName,
2031
+ lineNumber: 58,
2032
+ columnNumber: 13
2033
+ }, undefined)];
2033
2034
  }
2034
- return [jsxRuntime.jsx("li", {
2035
+ return [/*#__PURE__*/jsxDevRuntime.jsxDEV("li", {
2035
2036
  className: "flex items-center",
2036
- children: jsxRuntime.jsx("a", {
2037
+ children: /*#__PURE__*/jsxDevRuntime.jsxDEV("a", {
2037
2038
  href: item.href,
2038
2039
  onClick: event => {
2039
2040
  if (item && item.onClick) {
@@ -2043,28 +2044,52 @@ const Breadcrumbs = /*#__PURE__*/react.forwardRef((_a, ref) => {
2043
2044
  },
2044
2045
  "aria-current": "page",
2045
2046
  children: item.label
2046
- })
2047
- }, index), jsxRuntime.jsx("li", {
2047
+ }, void 0, false, {
2048
+ fileName: _jsxFileName,
2049
+ lineNumber: 70,
2050
+ columnNumber: 13
2051
+ }, undefined)
2052
+ }, index, false, {
2053
+ fileName: _jsxFileName,
2054
+ lineNumber: 69,
2055
+ columnNumber: 11
2056
+ }, undefined), /*#__PURE__*/jsxDevRuntime.jsxDEV("li", {
2048
2057
  className: "flex items-center",
2049
2058
  "aria-hidden": true,
2050
- children: jsxRuntime.jsx(obAtomsIcon.Icon, {
2059
+ children: /*#__PURE__*/jsxDevRuntime.jsxDEV(obAtomsIcon.Icon, {
2051
2060
  icon: "chevron_right"
2052
- })
2053
- }, `divider-${index}`)];
2061
+ }, void 0, false, {
2062
+ fileName: _jsxFileName,
2063
+ lineNumber: 88,
2064
+ columnNumber: 13
2065
+ }, undefined)
2066
+ }, `divider-${index}`, false, {
2067
+ fileName: _jsxFileName,
2068
+ lineNumber: 83,
2069
+ columnNumber: 11
2070
+ }, undefined)];
2054
2071
  });
2055
2072
  }, [ariaLabel, filteredItems, items.length, shouldShrink]);
2056
- return jsxRuntime.jsx("nav", Object.assign({
2073
+ return /*#__PURE__*/jsxDevRuntime.jsxDEV("nav", Object.assign({
2057
2074
  ref: ref,
2058
2075
  "aria-label": "Breadcrumb",
2059
2076
  id: id,
2060
2077
  className: "breadcrumb-container",
2061
2078
  "data-testid": dataTestId
2062
2079
  }, uiUtils.applyDataAttributes(props), {
2063
- children: jsxRuntime.jsx("ol", {
2080
+ children: /*#__PURE__*/jsxDevRuntime.jsxDEV("ol", {
2064
2081
  className: "flex flex-row items-center min-w-max gap-(--breadcrumb-cotent-gap)",
2065
2082
  children: renderLinks()
2066
- })
2067
- }));
2083
+ }, void 0, false, {
2084
+ fileName: _jsxFileName,
2085
+ lineNumber: 103,
2086
+ columnNumber: 9
2087
+ }, undefined)
2088
+ }), void 0, false, {
2089
+ fileName: _jsxFileName,
2090
+ lineNumber: 95,
2091
+ columnNumber: 7
2092
+ }, undefined);
2068
2093
  });
2069
2094
 
2070
2095
  exports.Breadcrumbs = Breadcrumbs;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@bolttech/ob-atoms-breadcrumbs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "dependencies": {
5
- "@bolttech/ui-utils": "0.6.5",
6
- "react": "19.1.1",
7
- "@bolttech/ob-atoms-icon": "1.0.0"
5
+ "@bolttech/ui-utils": "0.6.7",
6
+ "react": "19.1.2",
7
+ "@bolttech/ob-atoms-icon": "1.0.1"
8
8
  },
9
9
  "main": "./index.cjs.js",
10
10
  "type": "commonjs",
package/src/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/breadcrumbs';
@@ -1,3 +0,0 @@
1
- import { IBreadcrumbProps } from './breadcrumbs.interface';
2
- import './breadcrumbs.css';
3
- export declare const Breadcrumbs: import("react").ForwardRefExoticComponent<IBreadcrumbProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,25 +0,0 @@
1
- import { DefaultProps } from '@bolttech/ui-utils';
2
- /**
3
- * @type {BreadcrumbItem}
4
- * @property {string} label Label that should be displayed on the Breadcrumb Item
5
- * @property {string} href Url of each Breadcrumb Item
6
- * @property {Function} onClick (Optional) On Click event for each Breadcrumb Item
7
- */
8
- export type BreadcrumbItem = {
9
- label: string;
10
- href?: string;
11
- onClick?: () => void;
12
- };
13
- /**
14
- * @interface IBreadcrumbProps
15
- * @member {string} id A unique identifier for the Breadcrumb component, used for identifying specific instances.
16
- * @member {string} dataTestId A data-testid attribute for testing purposes, making the component easy to target in tests.
17
- * @member {Array<BreadcrumbItem>} items A required array of breadcrumb items. Each item should be an object containing label and href properties.
18
- * @member {string} ariaLabel Optional parameter for accessibility purposes. This should be used for the expand item, providing a description for this action.
19
- */
20
- export interface IBreadcrumbProps extends DefaultProps {
21
- id?: string;
22
- dataTestId?: string;
23
- items: BreadcrumbItem[];
24
- ariaLabel?: string;
25
- }
@@ -1,24 +0,0 @@
1
- import { type StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: import("react").ForwardRefExoticComponent<import("./breadcrumbs.interface").IBreadcrumbProps & import("react").RefAttributes<HTMLDivElement>>;
5
- argTypes: {
6
- id: {
7
- type: "string";
8
- description: string;
9
- };
10
- dataTestId: {
11
- type: "string";
12
- description: string;
13
- };
14
- items: {
15
- description: string;
16
- };
17
- ariaLabel: {
18
- description: string;
19
- };
20
- };
21
- };
22
- export default meta;
23
- type Story = StoryObj<typeof meta>;
24
- export declare const Default: Story;