automoby-kit 1.0.37 → 1.0.38
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/cjs/Breadcrumb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./utils.js"),a=require("./contexts.js"),n=require("./chunks/chevron-left-Do__K6cA.js");require("./chunks/createLucideIcon-BqJVOzoK.js");const
|
|
1
|
+
"use client";"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./utils.js"),a=require("./contexts.js"),n=require("./chunks/chevron-left-Do__K6cA.js");require("./chunks/createLucideIcon-BqJVOzoK.js");const i=r.forwardRef(({items:r,className:i,isMobile:s},l)=>{const c=a.useMobile(),o=s??c;return e.jsx("nav",{ref:l,className:t("flex items-center",o?"gap-1 px-4 py-2.5":"gap-3 pr-1 pt-3 pb-4 pl-0",i),"aria-label":"Breadcrumb navigation",children:e.jsx("ol",{className:"flex items-center gap-inherit",children:r.map((a,i)=>{const s=i===r.length-1,l=!s&&(a.href||a.onClick),c=`${a.label}-${i}`;return e.jsxs("li",{className:"flex items-center gap-inherit",children:[l?e.jsx("a",{href:a.href||"#",className:t("whitespace-nowrap border-0 bg-transparent p-0 no-underline",o?"text-t":"text-s","text-neutral-main","cursor-pointer hover:text-neutral-dark transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded-sm"),onClick:e=>((e,t,a)=>{t!==r.length-1&&e.onClick&&(a.preventDefault(),e.onClick())})(a,i,e),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a.onClick&&a.onClick())},"aria-label":`Go to ${a.label}`,children:a.label}):e.jsx("span",{className:t("whitespace-nowrap",o?"text-t":"text-s","text-neutral-main","font-medium"),"aria-current":s?"page":void 0,"aria-label":s?`Current page: ${a.label}`:void 0,children:a.label}),!s&&e.jsx(n.ChevronLeft,{className:t("text-neutral-main flex-shrink-0",o?"w-2.5 h-2.5":"w-3 h-3"),"aria-hidden":"true"})]},c)})})})});i.displayName="Breadcrumb",exports.Breadcrumb=i;
|
package/dist/esm/Breadcrumb.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import t from"react";import a from"./utils.js";import{useMobile as n}from"./contexts.js";import{C as
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import t from"react";import a from"./utils.js";import{useMobile as n}from"./contexts.js";import{C as i}from"./chunks/chevron-left-4HSuTes3.js";import"./chunks/createLucideIcon-DGp0SoUT.js";const l=t.forwardRef(({items:t,className:l,isMobile:o},s)=>{const c=n(),m=o??c;return e("nav",{ref:s,className:a("flex items-center",m?"gap-1 px-4 py-2.5":"gap-3 pr-1 pt-3 pb-4 pl-0",l),"aria-label":"Breadcrumb navigation",children:e("ol",{className:"flex items-center gap-inherit",children:t.map((n,l)=>{const o=l===t.length-1,s=!o&&(n.href||n.onClick),c=`${n.label}-${l}`;return r("li",{className:"flex items-center gap-inherit",children:[s?e("a",{href:n.href||"#",className:a("whitespace-nowrap border-0 bg-transparent p-0 no-underline",m?"text-t":"text-s","text-neutral-main","cursor-pointer hover:text-neutral-dark transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded-sm"),onClick:e=>((e,r,a)=>{r!==t.length-1&&e.onClick&&(a.preventDefault(),e.onClick())})(n,l,e),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick&&n.onClick())},"aria-label":`Go to ${n.label}`,children:n.label}):e("span",{className:a("whitespace-nowrap",m?"text-t":"text-s","text-neutral-main","font-medium"),"aria-current":o?"page":void 0,"aria-label":o?`Current page: ${n.label}`:void 0,children:n.label}),!o&&e(i,{className:a("text-neutral-main flex-shrink-0",m?"w-2.5 h-2.5":"w-3 h-3"),"aria-hidden":"true"})]},c)})})})});l.displayName="Breadcrumb";export{l as Breadcrumb};
|
package/dist/types/Breadcrumb.js
CHANGED
|
@@ -19,10 +19,10 @@ const Breadcrumb = React.forwardRef(({ items, className, isMobile }, ref) => {
|
|
|
19
19
|
// If item has href, let the anchor tag handle navigation naturally
|
|
20
20
|
};
|
|
21
21
|
return (jsx("nav", { ref: ref, className: cn(
|
|
22
|
-
// Base layout -
|
|
23
|
-
'flex
|
|
22
|
+
// Base layout - rely on page RTL direction; no manual row-reverse
|
|
23
|
+
'flex items-center',
|
|
24
24
|
// Responsive gap and padding based on mobile state
|
|
25
|
-
actualIsMobile ? 'gap-1 px-4 py-2.5' : 'gap-3 pr-1 pt-3 pb-4 pl-0', className), "aria-label": "Breadcrumb navigation", children: jsx("ol", { className: "flex
|
|
25
|
+
actualIsMobile ? 'gap-1 px-4 py-2.5' : 'gap-3 pr-1 pt-3 pb-4 pl-0', className), "aria-label": "Breadcrumb navigation", children: jsx("ol", { className: "flex items-center gap-inherit", children: items.map((item, index) => {
|
|
26
26
|
const isLast = index === items.length - 1;
|
|
27
27
|
const isClickable = !isLast && (item.href || item.onClick);
|
|
28
28
|
const itemKey = `${item.label}-${index}`;
|
|
@@ -49,7 +49,7 @@ const Breadcrumb = React.forwardRef(({ items, className, isMobile }, ref) => {
|
|
|
49
49
|
// Color
|
|
50
50
|
'text-neutral-main',
|
|
51
51
|
// Different styles for current page (last item)
|
|
52
|
-
'font-medium'), "aria-current": isLast ? 'page' : undefined, "aria-label": isLast ? `Current page: ${item.label}` : undefined, children: item.label })), !isLast && (jsx(ChevronLeft, { className: cn('text-
|
|
52
|
+
'font-medium'), "aria-current": isLast ? 'page' : undefined, "aria-label": isLast ? `Current page: ${item.label}` : undefined, children: item.label })), !isLast && (jsx(ChevronLeft, { className: cn('text-neutral-main flex-shrink-0',
|
|
53
53
|
// Responsive icon size
|
|
54
54
|
actualIsMobile ? 'w-2.5 h-2.5' : 'w-3 h-3'), "aria-hidden": "true" }))] }, itemKey));
|
|
55
55
|
}) }) }));
|