@fpkit/acss 0.5.13 → 0.6.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/libs/{chunk-PQ2K3BM6.cjs → chunk-2NRIP6RB.cjs} +3 -3
- package/libs/chunk-33PNJ4LO.cjs +15 -0
- package/libs/chunk-33PNJ4LO.cjs.map +1 -0
- package/libs/chunk-4BZKFPEC.cjs +17 -0
- package/libs/chunk-4BZKFPEC.cjs.map +1 -0
- package/libs/{chunk-772NRB75.js → chunk-5QD3DWFI.js} +2 -2
- package/libs/chunk-6SAHIYCZ.js +7 -0
- package/libs/chunk-6SAHIYCZ.js.map +1 -0
- package/libs/{chunk-3MKLDCKQ.cjs → chunk-6WTC4JXH.cjs} +3 -3
- package/libs/chunk-75QHTLFO.js +7 -0
- package/libs/chunk-75QHTLFO.js.map +1 -0
- package/libs/{chunk-ZANSFMTD.js → chunk-7XPFW7CB.js} +3 -3
- package/libs/chunk-BFK62VX5.js +5 -0
- package/libs/chunk-BFK62VX5.js.map +1 -0
- package/libs/{chunk-ROZI23GS.cjs → chunk-DKTHCQ5P.cjs} +4 -4
- package/libs/chunk-E2AJURUW.cjs +13 -0
- package/libs/chunk-E2AJURUW.cjs.map +1 -0
- package/libs/{chunk-L75OQKEI.cjs → chunk-ENTCUJ3A.cjs} +3 -3
- package/libs/chunk-ENTCUJ3A.cjs.map +1 -0
- package/libs/chunk-F5EYMVQM.js +10 -0
- package/libs/chunk-F5EYMVQM.js.map +1 -0
- package/libs/chunk-FVROL3V5.js +9 -0
- package/libs/chunk-FVROL3V5.js.map +1 -0
- package/libs/chunk-GT77BX4L.cjs +17 -0
- package/libs/chunk-GT77BX4L.cjs.map +1 -0
- package/libs/chunk-GUJSMQ3V.cjs +16 -0
- package/libs/chunk-GUJSMQ3V.cjs.map +1 -0
- package/libs/chunk-HHLNOC5T.js +7 -0
- package/libs/chunk-HHLNOC5T.js.map +1 -0
- package/libs/chunk-HRRHPLER.js +8 -0
- package/libs/chunk-HRRHPLER.js.map +1 -0
- package/libs/chunk-IEB64SWY.js +8 -0
- package/libs/chunk-IEB64SWY.js.map +1 -0
- package/libs/{chunk-NGTJDDFO.js → chunk-IQ76HGVP.js} +2 -2
- package/libs/chunk-IRLFZ3OL.js +9 -0
- package/libs/chunk-IRLFZ3OL.js.map +1 -0
- package/libs/{chunk-JJ43O4Y5.js → chunk-KK47SYZI.js} +2 -2
- package/libs/chunk-O3JIHC5M.cjs +15 -0
- package/libs/chunk-O3JIHC5M.cjs.map +1 -0
- package/libs/chunk-O5XAJ7BY.cjs +18 -0
- package/libs/chunk-O5XAJ7BY.cjs.map +1 -0
- package/libs/chunk-OVWLQYMK.js +10 -0
- package/libs/chunk-OVWLQYMK.js.map +1 -0
- package/libs/chunk-PNWIRCG3.cjs +7 -0
- package/libs/chunk-PNWIRCG3.cjs.map +1 -0
- package/libs/{chunk-D4YLRWAO.cjs → chunk-QVW6W76L.cjs} +6 -6
- package/libs/chunk-T4T6GWYQ.cjs +17 -0
- package/libs/chunk-T4T6GWYQ.cjs.map +1 -0
- package/libs/chunk-TON2YGMD.cjs +9 -0
- package/libs/chunk-TON2YGMD.cjs.map +1 -0
- package/libs/chunk-UEPAWMDF.js +8 -0
- package/libs/chunk-UEPAWMDF.js.map +1 -0
- package/libs/{chunk-LT5KZ2QW.cjs → chunk-US2I5GI7.cjs} +3 -3
- package/libs/{chunk-B7F5FS6D.cjs → chunk-W2UIN7EV.cjs} +3 -3
- package/libs/{chunk-P2DC76ZZ.cjs → chunk-W5TKWBFC.cjs} +3 -3
- package/libs/chunk-WXBFBWYF.cjs +16 -0
- package/libs/chunk-WXBFBWYF.cjs.map +1 -0
- package/libs/{chunk-VUH3FXGJ.js → chunk-X3JCTEPD.js} +5 -5
- package/libs/chunk-X5LGFCWG.js +9 -0
- package/libs/chunk-X5LGFCWG.js.map +1 -0
- package/libs/{chunk-5M57K4SW.js → chunk-Y2PFDELK.js} +2 -2
- package/libs/{chunk-ETFLFC2S.js → chunk-ZFJ4U45S.js} +2 -2
- package/libs/{component-props-a8a2f97e.d.ts → component-props-67d978a2.d.ts} +4 -4
- package/libs/components/alert/alert.css +1 -1
- package/libs/components/alert/alert.css.map +1 -1
- package/libs/components/alert/alert.min.css +2 -2
- package/libs/components/breadcrumbs/breadcrumb.cjs +6 -6
- package/libs/components/breadcrumbs/breadcrumb.d.cts +11 -11
- package/libs/components/breadcrumbs/breadcrumb.d.ts +11 -11
- package/libs/components/breadcrumbs/breadcrumb.js +3 -3
- package/libs/components/button.cjs +6 -4
- package/libs/components/button.d.cts +97 -4
- package/libs/components/button.d.ts +97 -4
- package/libs/components/button.js +4 -2
- package/libs/components/card.cjs +7 -7
- package/libs/components/card.d.cts +14 -14
- package/libs/components/card.d.ts +14 -14
- package/libs/components/card.js +2 -2
- package/libs/components/dialog/dialog.cjs +9 -7
- package/libs/components/dialog/dialog.d.cts +3 -3
- package/libs/components/dialog/dialog.d.ts +3 -3
- package/libs/components/dialog/dialog.js +7 -5
- package/libs/components/form/fields.cjs +4 -4
- package/libs/components/form/fields.d.cts +16 -7
- package/libs/components/form/fields.d.ts +16 -7
- package/libs/components/form/fields.js +2 -2
- package/libs/components/form/inputs.cjs +6 -4
- package/libs/components/form/inputs.d.cts +50 -2
- package/libs/components/form/inputs.d.ts +50 -2
- package/libs/components/form/inputs.js +4 -2
- package/libs/components/form/textarea.cjs +5 -4
- package/libs/components/form/textarea.d.cts +32 -23
- package/libs/components/form/textarea.d.ts +32 -23
- package/libs/components/form/textarea.js +3 -2
- package/libs/components/heading/heading.cjs +3 -3
- package/libs/components/heading/heading.d.cts +2 -2
- package/libs/components/heading/heading.d.ts +2 -2
- package/libs/components/heading/heading.js +2 -2
- package/libs/components/icons/icon.cjs +4 -4
- package/libs/components/icons/icon.d.cts +38 -38
- package/libs/components/icons/icon.d.ts +38 -38
- package/libs/components/icons/icon.js +2 -2
- package/libs/components/link/link.cjs +4 -4
- package/libs/components/link/link.css +1 -1
- package/libs/components/link/link.css.map +1 -1
- package/libs/components/link/link.d.cts +3 -19
- package/libs/components/link/link.d.ts +3 -19
- package/libs/components/link/link.js +2 -2
- package/libs/components/link/link.min.css +2 -2
- package/libs/components/list/list.cjs +5 -5
- package/libs/components/list/list.css +1 -0
- package/libs/components/list/list.css.map +1 -0
- package/libs/components/list/list.d.cts +120 -33
- package/libs/components/list/list.d.ts +120 -33
- package/libs/components/list/list.js +2 -2
- package/libs/components/list/list.min.css +3 -0
- package/libs/components/modal.cjs +6 -4
- package/libs/components/modal.d.cts +8 -8
- package/libs/components/modal.d.ts +8 -8
- package/libs/components/modal.js +5 -3
- package/libs/components/nav/nav.cjs +7 -7
- package/libs/components/nav/nav.css +1 -1
- package/libs/components/nav/nav.css.map +1 -1
- package/libs/components/nav/nav.d.cts +550 -34
- package/libs/components/nav/nav.d.ts +550 -34
- package/libs/components/nav/nav.js +3 -3
- package/libs/components/nav/nav.min.css +2 -2
- package/libs/components/popover/popover.d.cts +5 -5
- package/libs/components/popover/popover.d.ts +5 -5
- package/libs/components/tables/table.cjs +5 -5
- package/libs/components/tables/table.d.cts +8 -8
- package/libs/components/tables/table.d.ts +8 -8
- package/libs/components/tables/table.js +2 -2
- package/libs/components/tag/tag.css +1 -1
- package/libs/components/tag/tag.css.map +1 -1
- package/libs/components/tag/tag.min.css +2 -2
- package/libs/components/text/text.cjs +5 -5
- package/libs/components/text/text.d.cts +5 -5
- package/libs/components/text/text.d.ts +5 -5
- package/libs/components/text/text.js +2 -2
- package/libs/form.types-d25ebfac.d.ts +233 -0
- package/libs/{heading-3648c538.d.ts → heading-7446cb46.d.ts} +8 -8
- package/libs/hooks.cjs +9 -4
- package/libs/hooks.d.cts +137 -3
- package/libs/hooks.d.ts +137 -3
- package/libs/hooks.js +4 -3
- package/libs/icons.cjs +3 -3
- package/libs/icons.d.cts +2 -2
- package/libs/icons.d.ts +2 -2
- package/libs/icons.js +2 -2
- package/libs/index.cjs +53 -51
- package/libs/index.cjs.map +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +338 -49
- package/libs/index.d.ts +338 -49
- package/libs/index.js +24 -22
- package/libs/index.js.map +1 -1
- package/libs/link-5192f411.d.ts +323 -0
- package/libs/list.types-d26de310.d.ts +245 -0
- package/libs/{ui-645f95b5.d.ts → ui-d01b50d4.d.ts} +16 -12
- package/package.json +4 -6
- package/src/components/alert/alert.scss +1 -4
- package/src/components/breadcrumbs/breadcrumb.tsx +4 -1
- package/src/components/buttons/README.mdx +102 -1
- package/src/components/buttons/button.stories.tsx +106 -0
- package/src/components/buttons/button.tsx +82 -52
- package/src/components/dialog/dialog-a11y-review.md +653 -0
- package/src/components/form/README.mdx +725 -43
- package/src/components/form/WCAG-REVIEW.md +654 -0
- package/src/components/form/fields.tsx +10 -1
- package/src/components/form/form.stories.tsx +604 -23
- package/src/components/form/form.tsx +204 -63
- package/src/components/form/form.types.ts +378 -0
- package/src/components/form/input.stories.tsx +71 -3
- package/src/components/form/inputs.tsx +159 -67
- package/src/components/form/select.tsx +122 -66
- package/src/components/form/textarea.tsx +120 -73
- package/src/components/fp.tsx +86 -11
- package/src/components/link/README.mdx +923 -0
- package/src/components/link/link.scss +79 -26
- package/src/components/link/link.stories.tsx +383 -30
- package/src/components/link/link.test.tsx +677 -0
- package/src/components/link/link.tsx +163 -57
- package/src/components/link/link.types.ts +261 -0
- package/src/components/list/README.mdx +764 -0
- package/src/components/list/list.scss +285 -0
- package/src/components/list/list.stories.tsx +514 -27
- package/src/components/list/list.test.tsx +554 -0
- package/src/components/list/list.tsx +153 -51
- package/src/components/list/list.types.ts +255 -0
- package/src/components/nav/ACCESSIBILITY.md +649 -0
- package/src/components/nav/README.mdx +782 -0
- package/src/components/nav/nav.scss +37 -4
- package/src/components/nav/nav.stories.tsx +44 -6
- package/src/components/nav/nav.tsx +302 -51
- package/src/components/nav/nav.types.ts +308 -0
- package/src/components/tag/README.mdx +426 -0
- package/src/components/tag/tag.scss +101 -27
- package/src/components/tag/tag.stories.tsx +384 -10
- package/src/components/tag/tag.test.tsx +210 -0
- package/src/components/tag/tag.tsx +106 -9
- package/src/components/tag/tag.types.ts +107 -0
- package/src/components/ui.tsx +8 -3
- package/src/hooks/use-disabled-state.test.tsx +536 -0
- package/src/hooks/use-disabled-state.ts +246 -0
- package/src/hooks/useDisabledState.md +393 -0
- package/src/hooks.ts +6 -0
- package/src/index.scss +2 -0
- package/src/index.ts +2 -1
- package/src/sass/_globals.scss +2 -7
- package/src/styles/alert/alert.css +1 -3
- package/src/styles/alert/alert.css.map +1 -1
- package/src/styles/index.css +461 -81
- package/src/styles/index.css.map +1 -1
- package/src/styles/link/link.css +45 -28
- package/src/styles/link/link.css.map +1 -1
- package/src/styles/list/list.css +214 -0
- package/src/styles/list/list.css.map +1 -0
- package/src/styles/nav/nav.css +32 -6
- package/src/styles/nav/nav.css.map +1 -1
- package/src/styles/tag/tag.css +113 -35
- package/src/styles/tag/tag.css.map +1 -1
- package/src/styles/utilities/_disabled.scss +58 -0
- package/src/types/shared.ts +43 -6
- package/src/utils/accessibility.ts +109 -0
- package/libs/chunk-2LTJ7HHX.cjs +0 -18
- package/libs/chunk-2LTJ7HHX.cjs.map +0 -1
- package/libs/chunk-2Y7W75TT.js +0 -9
- package/libs/chunk-2Y7W75TT.js.map +0 -1
- package/libs/chunk-5S4ORA4C.cjs +0 -15
- package/libs/chunk-5S4ORA4C.cjs.map +0 -1
- package/libs/chunk-AHDJGCG5.cjs +0 -15
- package/libs/chunk-AHDJGCG5.cjs.map +0 -1
- package/libs/chunk-BHRQBJRY.js +0 -8
- package/libs/chunk-BHRQBJRY.js.map +0 -1
- package/libs/chunk-GZ4QFPRY.js +0 -9
- package/libs/chunk-GZ4QFPRY.js.map +0 -1
- package/libs/chunk-IYUN2EW3.cjs +0 -15
- package/libs/chunk-IYUN2EW3.cjs.map +0 -1
- package/libs/chunk-J32EZPYD.cjs +0 -15
- package/libs/chunk-J32EZPYD.cjs.map +0 -1
- package/libs/chunk-KUKIVRC2.js +0 -7
- package/libs/chunk-KUKIVRC2.js.map +0 -1
- package/libs/chunk-L75OQKEI.cjs.map +0 -1
- package/libs/chunk-M5RRNTVX.cjs +0 -15
- package/libs/chunk-M5RRNTVX.cjs.map +0 -1
- package/libs/chunk-OK5QEIMD.cjs +0 -17
- package/libs/chunk-OK5QEIMD.cjs.map +0 -1
- package/libs/chunk-P7TTEYCD.js +0 -7
- package/libs/chunk-P7TTEYCD.js.map +0 -1
- package/libs/chunk-QLZWHAMK.js +0 -8
- package/libs/chunk-QLZWHAMK.js.map +0 -1
- package/libs/chunk-RIVUMPOG.js +0 -8
- package/libs/chunk-RIVUMPOG.js.map +0 -1
- package/libs/chunk-S7BABR7Z.cjs +0 -13
- package/libs/chunk-S7BABR7Z.cjs.map +0 -1
- package/libs/chunk-SMYRLO3E.js +0 -8
- package/libs/chunk-SMYRLO3E.js.map +0 -1
- package/libs/chunk-TYRCEX2L.js +0 -8
- package/libs/chunk-TYRCEX2L.js.map +0 -1
- package/libs/chunk-XBA562WW.js +0 -8
- package/libs/chunk-XBA562WW.js.map +0 -1
- package/libs/chunk-XTQKWY7W.cjs +0 -32
- package/libs/chunk-XTQKWY7W.cjs.map +0 -1
- package/libs/inputs-f3a216db.d.ts +0 -45
- /package/libs/{chunk-PQ2K3BM6.cjs.map → chunk-2NRIP6RB.cjs.map} +0 -0
- /package/libs/{chunk-772NRB75.js.map → chunk-5QD3DWFI.js.map} +0 -0
- /package/libs/{chunk-3MKLDCKQ.cjs.map → chunk-6WTC4JXH.cjs.map} +0 -0
- /package/libs/{chunk-ZANSFMTD.js.map → chunk-7XPFW7CB.js.map} +0 -0
- /package/libs/{chunk-ROZI23GS.cjs.map → chunk-DKTHCQ5P.cjs.map} +0 -0
- /package/libs/{chunk-NGTJDDFO.js.map → chunk-IQ76HGVP.js.map} +0 -0
- /package/libs/{chunk-JJ43O4Y5.js.map → chunk-KK47SYZI.js.map} +0 -0
- /package/libs/{chunk-D4YLRWAO.cjs.map → chunk-QVW6W76L.cjs.map} +0 -0
- /package/libs/{chunk-LT5KZ2QW.cjs.map → chunk-US2I5GI7.cjs.map} +0 -0
- /package/libs/{chunk-B7F5FS6D.cjs.map → chunk-W2UIN7EV.cjs.map} +0 -0
- /package/libs/{chunk-P2DC76ZZ.cjs.map → chunk-W5TKWBFC.cjs.map} +0 -0
- /package/libs/{chunk-VUH3FXGJ.js.map → chunk-X3JCTEPD.js.map} +0 -0
- /package/libs/{chunk-5M57K4SW.js.map → chunk-Y2PFDELK.js.map} +0 -0
- /package/libs/{chunk-ETFLFC2S.js.map → chunk-ZFJ4U45S.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/breadcrumbs/breadcrumb.tsx","../src/libs/content.ts"],"names":["React","Truncate","str","length","BreadcrumbItem","children","id","styles","classes","props","BreadcrumbList","ui_default","BreadcrumbNav","useBreadcrumbSegments","currentRoute","routes","segments","segment","getRouteMetadata","pathSegment","route","r","processedSegments","index","Breadcrumb","startRoute","startRouteUrl","spacer","ariaLabel","truncateLength","linkProps","hasSegments","uuid","link_default","name","url","path","isLast","decodedName","truncatedName","needsAriaLabel","previousPath","breadcrumb_default"],"mappings":"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","sourcesContent":["// Code: Breadcrumb component\nimport React from \"react\";\nimport UI from \"#components/ui\";\nimport { Truncate } from \"#libs/content\";\nimport Link from \"#components/link/link\";\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\n/**\n * Represents a route segment in the breadcrumb navigation.\n *\n * @remarks\n * Each route can customize its display name and URL independently from its path.\n * This allows for URL aliasing and custom route naming.\n *\n * @example\n * ```tsx\n * const route: CustomRoute = {\n * path: \"prod\",\n * name: \"Products\",\n * url: \"/products\"\n * };\n * ```\n */\nexport type CustomRoute = {\n /** The path segment as it appears in the URL */\n path?: string;\n /** The display name shown to users */\n name: string;\n /** The URL for navigation (defaults to path if not provided) */\n url?: string;\n};\n\n/**\n * Props for the Breadcrumb component.\n *\n * @remarks\n * The component can operate in two modes:\n * 1. Automatic mode: Derives path from `currentRoute` prop\n * 2. Controlled mode: Uses provided `routes` array for complete control over route naming\n *\n * @example\n * ```tsx\n * // Simple automatic mode\n * <Breadcrumb currentRoute=\"/products/shirts\" />\n *\n * // Controlled mode with custom route names\n * <Breadcrumb\n * currentRoute=\"/prod/shirts\"\n * routes={[\n * { path: \"prod\", name: \"Products\", url: \"/products\" },\n * { path: \"shirts\", name: \"All Shirts\", url: \"/products/shirts\" }\n * ]}\n * />\n * ```\n */\nexport type BreadcrumbProps = {\n /** Array of custom route objects for controlled breadcrumb generation */\n routes?: CustomRoute[];\n /** Starting route node (typically \"Home\") */\n startRoute?: React.ReactNode;\n /** Starting route URL (typically \"/\") */\n startRouteUrl?: string;\n /** Separator element between breadcrumb items */\n spacer?: React.ReactNode;\n /** Current route path (required for breadcrumb generation) */\n currentRoute?: string;\n /** ARIA label for the breadcrumb navigation */\n ariaLabel?: string;\n /** Maximum character length before truncating breadcrumb text */\n truncateLength?: number;\n /** Props to spread onto breadcrumb Link components */\n linkProps?: Omit<React.ComponentProps<typeof Link>, \"href\" | \"children\">;\n} & Omit<React.ComponentProps<typeof UI>, \"as\" | \"aria-label\">;\n\n// ============================================================================\n// SUB-COMPONENTS\n// ============================================================================\n\n/**\n * BreadcrumbItem - Individual list item wrapper for breadcrumb segments.\n *\n * @remarks\n * This is a presentational component that wraps each breadcrumb segment.\n * Memoized to prevent unnecessary re-renders when parent updates.\n */\nconst BreadcrumbItem = React.memo(\n ({\n children,\n id,\n styles,\n classes,\n ...props\n }: React.ComponentProps<typeof UI>) => {\n return (\n <li\n id={id}\n style={styles}\n className={classes}\n data-list=\"unstyled inline\"\n {...props}\n >\n {children}\n </li>\n );\n }\n);\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\n/**\n * BreadcrumbList - Ordered list container for breadcrumb items.\n *\n * @remarks\n * Uses semantic `<ol>` element as recommended by WCAG for breadcrumb navigation.\n * Memoized to prevent unnecessary re-renders.\n */\nconst BreadcrumbList = React.memo(\n ({ children, ...props }: React.ComponentProps<typeof UI>) => {\n return (\n <UI as=\"ol\" data-list=\"unstyled inline\" {...props}>\n {children}\n </UI>\n );\n }\n);\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\n/**\n * BreadcrumbNav - Navigation wrapper for breadcrumb structure.\n *\n * @remarks\n * Provides semantic `<nav>` element with proper ARIA labeling for screen readers.\n * Automatically wraps children in BreadcrumbList.\n */\nconst BreadcrumbNav = React.memo(\n ({\n styles,\n id,\n classes,\n children,\n ...props\n }: React.ComponentProps<typeof UI>) => {\n return (\n <UI as=\"nav\" id={id} styles={styles} className={classes} {...props}>\n <BreadcrumbList>{children}</BreadcrumbList>\n </UI>\n );\n }\n);\nBreadcrumbNav.displayName = \"BreadcrumbNav\";\n\n// ============================================================================\n// HOOKS\n// ============================================================================\n\n/**\n * Custom hook to process breadcrumb segments from a path string.\n *\n * @param currentRoute - The current route path to process\n * @param routes - Optional custom route mappings for customizing segment names and URLs\n * @returns Object containing processed breadcrumb segments with metadata and hasSegments flag\n *\n * @remarks\n * This hook encapsulates the business logic for breadcrumb generation:\n * - **Path parsing and segmentation** - Splits path into individual segments\n * - **Route name resolution** - Maps segments to custom routes or uses segment as-is\n * - **URL construction** - Builds navigation URLs for each segment\n * - **Performance** - Memoized to prevent unnecessary recalculations on each render\n *\n * The hook is exported for advanced use cases where you need breadcrumb logic\n * without the UI, such as:\n * - Custom breadcrumb components\n * - Site navigation generation\n * - Analytics tracking\n * - Dynamic route builders\n *\n * @example\n * ```tsx\n * // Basic usage\n * function MyCustomNav() {\n * const { segments, hasSegments } = useBreadcrumbSegments(\n * window.location.pathname\n * );\n *\n * if (!hasSegments) return null;\n *\n * return (\n * <nav>\n * {segments.map(seg => (\n * <a key={seg.path} href={seg.url}>{seg.name}</a>\n * ))}\n * </nav>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With custom routes\n * function SiteMap() {\n * const customRoutes = [\n * { path: \"products\", name: \"All Products\", url: \"/products\" },\n * { path: \"shirts\", name: \"Shirts & Tops\", url: \"/products/shirts\" }\n * ];\n *\n * const { segments } = useBreadcrumbSegments(\n * \"/products/shirts/item-123\",\n * customRoutes\n * );\n *\n * return (\n * <ul>\n * {segments.map(seg => (\n * <li key={seg.path}>\n * {seg.isLast ? seg.name : <a href={seg.url}>{seg.name}</a>}\n * </li>\n * ))}\n * </ul>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // For analytics tracking\n * function TrackBreadcrumb() {\n * const { segments } = useBreadcrumbSegments(location.pathname);\n *\n * useEffect(() => {\n * analytics.track('breadcrumb_view', {\n * path: segments.map(s => s.name).join(' > '),\n * depth: segments.length\n * });\n * }, [segments]);\n *\n * return <Breadcrumb currentRoute={location.pathname} />;\n * }\n * ```\n */\nexport function useBreadcrumbSegments(\n currentRoute: string | undefined,\n routes?: CustomRoute[]\n) {\n const segments = React.useMemo(() => {\n if (!currentRoute) return [];\n return currentRoute.split(\"/\").filter((segment) => segment);\n }, [currentRoute]);\n\n const getRouteMetadata = React.useCallback(\n (pathSegment: string): CustomRoute => {\n const route = routes?.find((r) => r.path === pathSegment);\n\n return {\n path: route?.path || pathSegment,\n name: route?.name || pathSegment,\n url: route?.url || pathSegment,\n };\n },\n [routes]\n );\n\n const processedSegments = React.useMemo(() => {\n return segments.map((segment, index) => ({\n ...getRouteMetadata(segment),\n isLast: index === segments.length - 1,\n index,\n }));\n }, [segments, getRouteMetadata]);\n\n return {\n segments: processedSegments,\n hasSegments: processedSegments.length > 0,\n };\n}\n\n// ============================================================================\n// MAIN COMPONENT\n// ============================================================================\n\n/**\n * Breadcrumb - Navigation component displaying hierarchical page location.\n *\n * @remarks\n * A WCAG 2.1 AA compliant breadcrumb navigation component that helps users\n * understand their current location within a site hierarchy and navigate back\n * to parent pages.\n *\n * ## Features\n * - Automatic path parsing from `currentRoute` prop\n * - Custom route naming via `routes` array\n * - Text truncation for long route names\n * - Full accessibility support with ARIA attributes\n * - Performance optimized with memoization\n *\n * ## Accessibility\n * - Uses semantic `<nav>` and `<ol>` elements\n * - Proper `aria-label` for screen reader context\n * - Current page marked with `aria-current=\"page\"`\n * - Decorative separators hidden from screen readers with `aria-hidden=\"true\"`\n * - Truncated text includes full text in `aria-label`\n *\n * ## Migration from v0.5.x\n *\n * The component was refactored in v0.5.11+ with breaking changes for better\n * performance, accessibility, and maintainability.\n *\n * ### Breaking Changes\n *\n * #### 1. Prop Rename: `ariaLabelPrefix` → `ariaLabel`\n * ```tsx\n * // Before (v0.5.x)\n * <Breadcrumb ariaLabelPrefix=\"Navigation\" />\n *\n * // After (v0.5.11+)\n * <Breadcrumb ariaLabel=\"Navigation\" />\n * ```\n *\n * #### 2. Type Rename: `customRoute` → `CustomRoute`\n * ```tsx\n * // Before (v0.5.x)\n * import { customRoute } from '@fpkit/acss';\n *\n * // After (v0.5.11+)\n * import { CustomRoute } from '@fpkit/acss';\n * ```\n *\n * #### 3. Removed Automatic `window.location.pathname` Fallback\n * The component now requires an explicit `currentRoute` prop for better testability\n * and predictable behavior.\n *\n * ```tsx\n * // Before (v0.5.x) - used window.location automatically\n * <Breadcrumb />\n *\n * // After (v0.5.11+) - explicit prop required\n * <Breadcrumb currentRoute={window.location.pathname} />\n * ```\n *\n * #### 4. Empty Route Behavior\n * Component now returns `null` instead of empty fragment when `currentRoute` is empty.\n *\n * ```tsx\n * // Before (v0.5.x)\n * <Breadcrumb currentRoute=\"\" /> // Rendered: <></>\n *\n * // After (v0.5.11+)\n * <Breadcrumb currentRoute=\"\" /> // Rendered: null\n * ```\n *\n * ### What Stayed the Same\n * - All other prop names and behaviors\n * - Sub-component exports (`Breadcrumb.Nav`, `Breadcrumb.List`, `Breadcrumb.Item`)\n * - Custom routes functionality\n * - Truncation behavior\n * - Link props spreading\n *\n * ### New Features in v0.5.11+\n * - ✨ Exported `useBreadcrumbSegments` hook for custom implementations\n * - ⚡ 60% performance improvement with React.memo and useMemo\n * - ♿ Full WCAG 2.1 AA compliance (removed `<a href=\"#\">` anti-pattern)\n * - 🧪 95%+ test coverage with comprehensive test suite\n * - 📚 Enhanced TypeScript types and JSDoc documentation\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Breadcrumb currentRoute=\"/products/shirts/blue-shirt\" />\n * // Renders: Home / products / shirts / blue-shirt\n *\n * // With custom route names\n * <Breadcrumb\n * currentRoute=\"/products/shirts/item-123\"\n * routes={[\n * { path: \"products\", name: \"All Products\", url: \"/products\" },\n * { path: \"shirts\", name: \"Shirts & Tops\", url: \"/products/shirts\" },\n * { path: \"item-123\", name: \"Blue Cotton Shirt\", url: \"/products/shirts/item-123\" }\n * ]}\n * />\n * // Renders: Home / All Products / Shirts & Tops / Blue Cotton Shirt\n *\n * // With custom starting point and styling\n * <Breadcrumb\n * currentRoute=\"/about/team\"\n * startRoute=\"Dashboard\"\n * startRouteUrl=\"/dashboard\"\n * spacer={<span> → </span>}\n * ariaLabel=\"Page navigation\"\n * truncateLength={20}\n * />\n * ```\n *\n * @param props - Component props\n * @returns Breadcrumb navigation element or null if no valid route\n */\nexport const Breadcrumb = ({\n startRoute = \"Home\",\n startRouteUrl = \"/\",\n currentRoute,\n spacer = <>/</>,\n routes,\n styles,\n id,\n classes,\n ariaLabel = \"Breadcrumb\",\n truncateLength = 15,\n linkProps,\n ...props\n}: BreadcrumbProps): React.JSX.Element | null => {\n const { segments, hasSegments } = useBreadcrumbSegments(currentRoute, routes);\n const uuid = React.useId();\n\n // Early return if no valid path\n if (!currentRoute?.length || !hasSegments) {\n return null;\n }\n\n return (\n <BreadcrumbNav\n id={id}\n styles={styles}\n className={classes}\n aria-label={ariaLabel}\n {...props}\n >\n {/* Home/Start Route */}\n <BreadcrumbItem key={`start-${uuid}`}>\n <Link href={startRouteUrl} {...linkProps}>\n {startRoute}\n </Link>\n </BreadcrumbItem>\n\n {/* Path Segments */}\n {segments.map(({ name, url, path, isLast, index }) => {\n const decodedName = decodeURIComponent(name);\n const truncatedName = Truncate(decodedName, truncateLength);\n const needsAriaLabel = decodedName.length > truncateLength;\n\n // Current page (last segment)\n if (isLast) {\n // Skip if segment is too short or duplicate of previous\n const previousPath = index > 0 ? segments[index - 1].path : null;\n if (!path || path.length <= 3 || path === previousPath) {\n return null;\n }\n\n return (\n <BreadcrumbItem key={`${path}-${uuid}`}>\n <span aria-hidden=\"true\">{spacer}</span>\n <span\n aria-current=\"page\"\n aria-label={needsAriaLabel ? decodedName : undefined}\n >\n {truncatedName}\n </span>\n </BreadcrumbItem>\n );\n }\n\n // Intermediate segments (links)\n return (\n <BreadcrumbItem key={`${path}-${uuid}`}>\n <span aria-hidden=\"true\">{spacer}</span>\n <Link\n href={url}\n aria-label={needsAriaLabel ? decodedName : undefined}\n {...linkProps}\n >\n {truncatedName}\n </Link>\n </BreadcrumbItem>\n );\n })}\n </BreadcrumbNav>\n );\n};\n\n// ============================================================================\n// EXPORTS\n// ============================================================================\n\nexport default Breadcrumb;\n\nBreadcrumb.displayName = \"Breadcrumb\";\nBreadcrumb.Nav = BreadcrumbNav;\nBreadcrumb.List = BreadcrumbList;\nBreadcrumb.Item = BreadcrumbItem;\n","/**\n * Converts a string to a slug by:\n * - Converting to lowercase\n * - Trimming whitespace\n * - Removing non-word and non-hyphen characters\n * - Replacing sequences of whitespace and hyphens with a single hyphen\n * - Removing leading and trailing hyphens\n *\n * @param str - The string to slugify\n * @returns The slugified string\n */\nexport const Slugify = (str: string) => {\n return str\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/[\\s_-]+/g, '-')\n .replace(/^-+|-+$/g, '')\n}\n\n/**\n * Truncates a string to a maximum length.\n *\n * @param str - The string to truncate.\n * @param length - The maximum length of the truncated string. Defaults to 15.\n * @returns The truncated string, with ellipses appended if truncated.\n */\nexport const Truncate = (str: string, length: number = 15) => {\n return str.length > length ? `${str.slice(0, length)}...` : str\n}\n"]}
|
package/libs/chunk-P7TTEYCD.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import e from 'react';
|
|
2
|
-
|
|
3
|
-
var y=e.forwardRef(({as:o,styles:t,classes:p,children:r,defaultStyles:n,...s},P)=>{let m=o||"div",C={...n,...t};return e.createElement(m,{ref:P,style:C,className:p,...s},r)}),a=y;
|
|
4
|
-
|
|
5
|
-
export { a };
|
|
6
|
-
//# sourceMappingURL=out.js.map
|
|
7
|
-
//# sourceMappingURL=chunk-P7TTEYCD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/fp.tsx"],"names":["React","FP","as","styles","classes","children","defaultStyles","props","ref","Component","styleObj","fp_default"],"mappings":"AAAA,OAAOA,MAAW,QAyDlB,IAAMC,EAAkBD,EAAM,WAC5B,CACE,CAAE,GAAAE,EAAI,OAAAC,EAAQ,QAAAC,EAAS,SAAAC,EAAU,cAAAC,EAAe,GAAGC,CAAM,EACzDC,IACG,CACH,IAAMC,EAAYP,GAAM,MAElBQ,EAAW,CAAE,GAAGJ,EAAe,GAAGH,CAAO,EAE/C,OACEH,EAAA,cAACS,EAAA,CAAU,IAAKD,EAAK,MAAOE,EAAU,UAAWN,EAAU,GAAGG,GAC3DF,CACH,CAEJ,CACF,EAKOM,EAAQV","sourcesContent":["import React from 'react'\nimport { ComponentProps } from '../types'\n\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref']\n\ntype AsProp<C extends React.ElementType> = {\n as?: C\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P)\n\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = {},\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>\n\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = {},\n> = PolymorphicComponentProp<C, Props> & {\n ref?: PolymorphicRef<C>\n}\n\ntype FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<\n C,\n {\n renderStyles?: boolean\n styles?: React.CSSProperties\n classes?: string\n }\n>\n\n/*\n * FPComponent type definition\n *\n * Defines the component function signature for the FP component.\n *\n * @typeParam C - The HTML element type to render\n * @param props - The component props\n * @returns React component\n */\ntype FPComponent = <C extends React.ElementType = 'span'>(\n props: FPProps<C>,\n) => React.ReactElement | any\n\n/**\n * FP component is a polymorphic component that renders an HTML element with optional styles.\n * @param {Object} props - Component props\n * @param {React.ElementType} props.as - The HTML element to render. Defaults to 'div'.\n * @param {boolean} props.renderStyles - Whether to render styles or not. Defaults to true.\n * @param {Object} props.styles - The styles to apply to the component.\n * @param {Object} props.defaultStyles - The default styles to apply to the component.\n * @param {React.ReactNode} props.children - The children to render inside the component.\n * @returns {React.ReactElement} - A React component that renders an HTML element with optional styles.\n */\nconst FP: FPComponent = React.forwardRef(\n <C extends React.ElementType>(\n { as, styles, classes, children, defaultStyles, ...props }: FPProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div'\n\n const styleObj = { ...defaultStyles, ...styles } as React.CSSProperties\n\n return (\n <Component ref={ref} style={styleObj} className={classes} {...props}>\n {children}\n </Component>\n )\n },\n)\nexport interface BoxProps extends ComponentProps {\n renderStyles: true\n}\n\nexport default FP\n"]}
|
package/libs/chunk-QLZWHAMK.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-KUKIVRC2.js';
|
|
2
|
-
import v from 'react';
|
|
3
|
-
|
|
4
|
-
var r=({type:a$1="button",children:i,styles:l,disabled:e,classes:u,onPointerDown:P,onPointerOver:c,onPointerLeave:p,onClick:s,...m})=>{let n=t=>{e||P?.(t);};return v.createElement(a,{as:"button",type:a$1,onPointerOver:t=>{e||c?.(t);},onPointerDown:n,onPointerLeave:t=>{e||p?.(t);},onKeyDown:n,style:l,className:u,"aria-disabled":e,onClick:t=>{e||s?.(t);},...m},i)},L=r;r.displayName="Button";
|
|
5
|
-
|
|
6
|
-
export { r as a, L as b };
|
|
7
|
-
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-QLZWHAMK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/buttons/button.tsx"],"names":["React","Button","type","children","styles","disabled","classes","onPointerDown","onPointerOver","onPointerLeave","onClick","props","handlePointerDown","e","ui_default","button_default"],"mappings":"wCACA,OAAOA,MAAW,QAUX,IAAMC,EAAS,CAAC,CACrB,KAAAC,EAAO,SACP,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,QAAAC,EACA,cAAAC,EACA,cAAAC,EACA,eAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAAmB,CAMjB,IAAMC,EAAqBC,GAA6C,CACjER,GACHE,IAAgBM,CAAC,CAErB,EAqCA,OACEb,EAAA,cAACc,EAAA,CACC,GAAG,SACH,KAAMZ,EACN,cAlCuBW,GAA6C,CACjER,GACHG,IAAgBK,CAAC,CAErB,EA+BI,cAAeD,EACf,eAzBwBC,GAA6C,CAClER,GACHI,IAAiBI,CAAC,CAEtB,EAsBI,UAAWD,EACX,MAAOR,EACP,UAAWE,EACX,gBAAeD,EACf,QAnBmBQ,GAA2C,CAC3DR,GACFK,IAAUG,CAAC,CAEhB,EAgBK,GAAGF,GAEHR,CACH,CAGJ,EAEOY,EAAQd,EACfA,EAAO,YAAc","sourcesContent":["import UI from '../ui'\nimport React from 'react'\n\nexport type ButtonProps = Partial<React.ComponentProps<typeof UI>> & {\n /**\n * The button type\n * Required - 'button' | 'submit' | 'reset'\n */\n type: 'button' | 'submit' | 'reset'\n }\n\nexport const Button = ({\n type = 'button',\n children,\n styles,\n disabled,\n classes,\n onPointerDown,\n onPointerOver,\n onPointerLeave,\n onClick,\n ...props\n}: ButtonProps) => {\n /**\n * Handles the pointer down event on the button.\n * Only triggers the onPointerDown callback if the button is not disabled.\n * @param e The pointer event object from the button element\n */\n const handlePointerDown = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n onPointerDown?.(e)\n }\n }\n\n /**\n * Handles the pointer over event on the button.\n * Only triggers the onPointerOver callback if the button is not disabled.\n * @param e The pointer event object from the button element\n */\n const handlePointerOver = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n onPointerOver?.(e)\n }\n }\n\n /**\n * Handles the pointer leave event on the button.\n * Only triggers the onPointerLeave callback if the button is not disabled.\n * @param e The pointer event object from the button element\n */\n const handlePointerLeave = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n onPointerLeave?.(e)\n }\n }\n\n /**\n * Handles the click event on the button.\n * Only triggers the onClick callback if the button is not disabled.\n * @param e The mouse event object from the button element\n */\n const handleOnClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n if (!disabled) {\n onClick?.(e)\n }\n }\n\n\n /* Returning a button element. */\n return (\n <UI\n as=\"button\"\n type={type}\n onPointerOver={handlePointerOver}\n onPointerDown={handlePointerDown}\n onPointerLeave={handlePointerLeave}\n onKeyDown={handlePointerDown}\n style={styles}\n className={classes}\n aria-disabled={disabled}\n onClick={handleOnClick}\n {...props}\n >\n {children}\n </UI>\n )\n //\n}\n\nexport default Button\nButton.displayName = 'Button'\n"]}
|
package/libs/chunk-RIVUMPOG.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-KUKIVRC2.js';
|
|
2
|
-
import t from 'react';
|
|
3
|
-
|
|
4
|
-
var l=({label:o,labelFor:a$1,id:r,styles:p,classes:d,children:s,...i})=>t.createElement(a,{as:"div",id:r,styles:p,className:d,"data-style":"fields",...i},t.createElement("label",{htmlFor:a$1},o),s),n=l;l.displayName="Field";
|
|
5
|
-
|
|
6
|
-
export { l as a, n as b };
|
|
7
|
-
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-RIVUMPOG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/fields.tsx"],"names":["React","Field","label","labelFor","id","styles","classes","children","props","ui_default","fields_default"],"mappings":"wCAAA,OAAOA,MAAW,QAmBX,IAAMC,EAAQ,CAAC,CACpB,MAAAC,EACA,SAAAC,EACA,GAAAC,EACA,OAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAEIR,EAAA,cAACS,EAAA,CACC,GAAG,MACH,GAAIL,EACJ,OAAQC,EACR,UAAWC,EACX,aAAW,SACV,GAAGE,GAEJR,EAAA,cAAC,SAAM,QAASG,GAAWD,CAAM,EAChCK,CACH,EAIGG,EAAQT,EACfA,EAAM,YAAc","sourcesContent":["import React from 'react'\nimport UI from '../ui'\n\nexport type FieldProps = {\n /**\n * The label content\n */\n label: React.ReactNode\n children: React.ReactNode\n} & React.ComponentProps<'label'> &\n Partial<React.ComponentProps<typeof UI>>\n/**\n * Field component that renders a label and children wrapped in a div element.\n * @param labelFor Defines the for attribute of the label element\n * @param styles Custom styles to be applied to the component\n * @param label The label content\n * @param children The children to be rendered inside the component\n * @param props Additional props to be spread to the component\n */\nexport const Field = ({\n label,\n labelFor,\n id,\n styles,\n classes,\n children,\n ...props\n}: FieldProps) => {\n return (\n <UI\n as=\"div\"\n id={id}\n styles={styles}\n className={classes}\n data-style=\"fields\"\n {...props}\n >\n <label htmlFor={labelFor}>{label}</label>\n {children}\n </UI>\n )\n}\n\nexport default Field\nField.displayName = 'Field'\n"]}
|
package/libs/chunk-S7BABR7Z.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var e = require('react');
|
|
4
|
-
|
|
5
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
-
|
|
7
|
-
var e__default = /*#__PURE__*/_interopDefault(e);
|
|
8
|
-
|
|
9
|
-
var y=e__default.default.forwardRef(({as:o,styles:t,classes:p,children:r,defaultStyles:n,...s},P)=>{let m=o||"div",C={...n,...t};return e__default.default.createElement(m,{ref:P,style:C,className:p,...s},r)}),a=y;
|
|
10
|
-
|
|
11
|
-
exports.a = a;
|
|
12
|
-
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=chunk-S7BABR7Z.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/fp.tsx"],"names":["React","FP","as","styles","classes","children","defaultStyles","props","ref","Component","styleObj","fp_default"],"mappings":"AAAA,OAAOA,MAAW,QAyDlB,IAAMC,EAAkBD,EAAM,WAC5B,CACE,CAAE,GAAAE,EAAI,OAAAC,EAAQ,QAAAC,EAAS,SAAAC,EAAU,cAAAC,EAAe,GAAGC,CAAM,EACzDC,IACG,CACH,IAAMC,EAAYP,GAAM,MAElBQ,EAAW,CAAE,GAAGJ,EAAe,GAAGH,CAAO,EAE/C,OACEH,EAAA,cAACS,EAAA,CAAU,IAAKD,EAAK,MAAOE,EAAU,UAAWN,EAAU,GAAGG,GAC3DF,CACH,CAEJ,CACF,EAKOM,EAAQV","sourcesContent":["import React from 'react'\nimport { ComponentProps } from '../types'\n\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref']\n\ntype AsProp<C extends React.ElementType> = {\n as?: C\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P)\n\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = {},\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>\n\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = {},\n> = PolymorphicComponentProp<C, Props> & {\n ref?: PolymorphicRef<C>\n}\n\ntype FPProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<\n C,\n {\n renderStyles?: boolean\n styles?: React.CSSProperties\n classes?: string\n }\n>\n\n/*\n * FPComponent type definition\n *\n * Defines the component function signature for the FP component.\n *\n * @typeParam C - The HTML element type to render\n * @param props - The component props\n * @returns React component\n */\ntype FPComponent = <C extends React.ElementType = 'span'>(\n props: FPProps<C>,\n) => React.ReactElement | any\n\n/**\n * FP component is a polymorphic component that renders an HTML element with optional styles.\n * @param {Object} props - Component props\n * @param {React.ElementType} props.as - The HTML element to render. Defaults to 'div'.\n * @param {boolean} props.renderStyles - Whether to render styles or not. Defaults to true.\n * @param {Object} props.styles - The styles to apply to the component.\n * @param {Object} props.defaultStyles - The default styles to apply to the component.\n * @param {React.ReactNode} props.children - The children to render inside the component.\n * @returns {React.ReactElement} - A React component that renders an HTML element with optional styles.\n */\nconst FP: FPComponent = React.forwardRef(\n <C extends React.ElementType>(\n { as, styles, classes, children, defaultStyles, ...props }: FPProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div'\n\n const styleObj = { ...defaultStyles, ...styles } as React.CSSProperties\n\n return (\n <Component ref={ref} style={styleObj} className={classes} {...props}>\n {children}\n </Component>\n )\n },\n)\nexport interface BoxProps extends ComponentProps {\n renderStyles: true\n}\n\nexport default FP\n"]}
|
package/libs/chunk-SMYRLO3E.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-KUKIVRC2.js';
|
|
2
|
-
import * as i from 'react';
|
|
3
|
-
|
|
4
|
-
var n=({type:t="li",id:e,styles:s,children:o,classes:r,...p})=>i.createElement(a,{id:e,as:t,className:r,...p,style:s},o),l=({children:t,classes:e,type:s="ul",variant:o,styles:r,role:p,...m})=>i.createElement(a,{as:s,"data-variant":o,className:e,style:r,role:p,...m},t),I=l;l.displayName="List";l.ListItem=n;
|
|
5
|
-
|
|
6
|
-
export { n as a, l as b, I as c };
|
|
7
|
-
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-SMYRLO3E.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/list/list.tsx"],"names":["React","ListItem","type","id","styles","children","classes","props","ui_default","List","variant","role","list_default"],"mappings":"mCAAA,UAAYA,MAAW,QAuBhB,IAAMC,EAAW,CAAC,CACvB,KAAAC,EAAO,KACP,GAAAC,EACA,OAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAEI,gBAACC,EAAA,CAAG,GAAIL,EAAI,GAAID,EAAM,UAAWI,EAAU,GAAGC,EAAO,MAAOH,GACzDC,CACH,EAcSI,EAAO,CAAC,CACnB,SAAAJ,EACA,QAAAC,EACA,KAAAJ,EAAO,KACP,QAAAQ,EACA,OAAAN,EACA,KAAAO,EACA,GAAGJ,CACL,IAEI,gBAACC,EAAA,CACC,GAAIN,EACJ,eAAcQ,EACd,UAAWJ,EACX,MAAOF,EACP,KAAMO,EACL,GAAGJ,GAEHF,CACH,EAIGO,EAAQH,EACfA,EAAK,YAAc,OACnBA,EAAK,SAAWR","sourcesContent":["import * as React from 'react'\nimport UI from '../ui'\n\ntype ListProps = {\n /** Type of list to render (default: 'ul') */\n type?: 'ul' | 'ol' | 'dl'\n /** variant of list to render (default: 'none') */\n variant?: string\n} & React.ComponentProps<typeof UI>\n\nexport type ListItemProps = {\n /** Type of list item to render (default: 'li') */\n type?: 'li' | 'dt' | 'dd'\n} & React.ComponentProps<typeof UI>\n\n/**\n * ListItem component\n * @param type - HTML tag type for the list item (default: 'li')\n * @param styles - CSS styles object\n * @param children - Child elements to be rendered inside the list item\n * @param props - Additional props to be passed to the underlying HTML element\n * @returns A React component that renders a list item\n */\nexport const ListItem = ({\n type = 'li',\n id,\n styles,\n children,\n classes,\n ...props\n}: ListItemProps) => {\n return (\n <UI id={id} as={type} className={classes} {...props} style={styles}>\n {children}\n </UI>\n )\n}\n\n/**\n * List component renders a list element with provided props\n * @param children - Child elements to render inside the list\n * @param classes - CSS classes to apply\n * @param type - Type of list element (default: 'ul')\n * @param variant - Variant for styling purposes\n * @param styles - Inline styles object\n * @param role - ARIA role\n * @param props - Additional props to pass to underlying element\n */\nexport const List = ({\n children,\n classes,\n type = 'ul',\n variant,\n styles,\n role,\n ...props\n}: ListProps) => {\n return (\n <UI\n as={type}\n data-variant={variant}\n className={classes}\n style={styles}\n role={role}\n {...props}\n >\n {children}\n </UI>\n )\n}\n\nexport default List\nList.displayName = 'List'\nList.ListItem = ListItem\n"]}
|
package/libs/chunk-TYRCEX2L.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-KUKIVRC2.js';
|
|
2
|
-
import m from 'react';
|
|
3
|
-
|
|
4
|
-
var a=({href:i,target:e,rel:p,children:l,styles:s,prefetch:t,btnStyle:c,onPointerDown:n,...f})=>{let r=p;return e==="_blank"&&(r=`noopener noreferrer ${t?"prefetch":""}`),m.createElement(a$1,{as:"a",href:i,target:e,styles:s,rel:r,onPointerDown:h=>{n&&n?.(h);},"data-btn":c,prefetch:t,...f},l)},y=a;a.displayName="Link";
|
|
5
|
-
|
|
6
|
-
export { a, y as b };
|
|
7
|
-
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-TYRCEX2L.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/link/link.tsx"],"names":["React","Link","href","target","rel","children","styles","prefetch","btnStyle","onPointerDown","props","relValue","ui_default","e","link_default"],"mappings":"wCACA,OAAOA,MAAW,QAqBX,IAAMC,EAAO,CAAC,CACnB,KAAAC,EACA,OAAAC,EACA,IAAAC,EACA,SAAAC,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,cAAAC,EACA,GAAGC,CACL,IAAiB,CACf,IAAIC,EAAWP,EAEf,OAAID,IAAW,WACbQ,EAAW,uBAAuBJ,EAAW,WAAa,EAAE,IAO5DP,EAAA,cAACY,EAAA,CACC,GAAG,IACH,KAAMV,EACN,OAAQC,EACR,OAAQG,EACR,IAAKK,EACL,cAXyBE,GAA6C,CACpEJ,GAAeA,IAAgBI,CAAC,CACtC,EAUI,WAAUL,EACV,SAAUD,EACT,GAAGG,GAEHL,CACH,CAEJ,EAEOS,EAAQb,EACfA,EAAK,YAAc","sourcesContent":["import UI from \"../ui\";\nimport React from \"react\";\n\nexport type LinkProps = {\n href?: string;\n\n target?: string;\n\n rel?: string;\n\n children: React.ReactNode;\n\n styles?: React.CSSProperties;\n\n prefetch?: boolean;\n\n btnStyle?: string;\n\n onPointerDown?: (event: React.PointerEvent<HTMLAnchorElement>) => void;\n} & React.ComponentProps<typeof UI> &\n React.ComponentProps<\"a\">;\n\nexport const Link = ({\n href,\n target,\n rel,\n children,\n styles,\n prefetch,\n btnStyle,\n onPointerDown,\n ...props\n}: LinkProps) => {\n let relValue = rel;\n\n if (target === \"_blank\")\n relValue = `noopener noreferrer ${prefetch ? \"prefetch\" : \"\"}`;\n\n const handleOnpointerDown = (e: React.PointerEvent<HTMLAnchorElement>) => {\n if (onPointerDown) onPointerDown?.(e);\n };\n\n return (\n <UI\n as=\"a\"\n href={href}\n target={target}\n styles={styles}\n rel={relValue}\n onPointerDown={handleOnpointerDown}\n data-btn={btnStyle}\n prefetch={prefetch}\n {...props}\n >\n {children}\n </UI>\n );\n};\n\nexport default Link;\nLink.displayName = \"Link\";\n"]}
|
package/libs/chunk-XBA562WW.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { a } from './chunk-KUKIVRC2.js';
|
|
2
|
-
import y from 'react';
|
|
3
|
-
|
|
4
|
-
var s=({id:p,classes:c,value:x,rows:m=5,cols:h=25,name:T,required:a$1,disabled:t,readOnly:i,onBlur:r,onPointerDown:n,onChange:o,ref:d,styles:f,placeholder:P,...u})=>y.createElement(a,{as:"textarea",id:p,name:T,rows:m,cols:h,styles:f,className:c,"data-style":"textarea",required:a$1,value:x,"aria-disabled":t,readOnly:i,onChange:e=>{o&&!t&&o?.(e);},onBlur:e=>{r&&!t&&r?.(e);},onPointerDown:e=>{n&&!t&&n?.(e);},ref:d,placeholder:P||`${a$1?"*":""} Message`,...u}),M=s;s.displayName="Textarea";
|
|
5
|
-
|
|
6
|
-
export { s as a, M as b };
|
|
7
|
-
//# sourceMappingURL=out.js.map
|
|
8
|
-
//# sourceMappingURL=chunk-XBA562WW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/textarea.tsx"],"names":["React","Textarea","id","classes","value","rows","cols","name","required","disabled","readOnly","onBlur","onPointerDown","onChange","ref","styles","placeholder","props","ui_default","textarea_default"],"mappings":"wCAAA,OAAOA,MAAW,QAyBX,IAAMC,EAAW,CAAC,CACvB,GAAAC,EACA,QAAAC,EACA,MAAAC,EACA,KAAAC,EAAO,EACP,KAAAC,EAAO,GACP,KAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,OAAAC,EACA,cAAAC,EACA,SAAAC,EACA,IAAAC,EACA,OAAAC,EACA,YAAAC,EACA,GAAGC,CACL,IAoBIjB,EAAA,cAACkB,EAAA,CACC,GAAG,WACH,GAAIhB,EACJ,KAAMK,EACN,KAAMF,EACN,KAAMC,EACN,OAAQS,EACR,UAAWZ,EACX,aAAW,WACX,SAAUK,EACV,MAAOJ,EACP,gBAAeK,EACf,SAAUC,EACV,SAhCkB,GAA8C,CAC9DG,GAAY,CAACJ,GACfI,IAAW,CAAC,CAEhB,EA6BI,OA3BgB,GAA6C,CAC3DF,GAAU,CAACF,GACbE,IAAS,CAAC,CAEd,EAwBI,cAtBuB,GAA+C,CACpEC,GAAiB,CAACH,GACpBG,IAAgB,CAAC,CAErB,EAmBI,IAAKE,EACL,YAAaE,GAAe,GAAGR,EAAW,IAAM,EAAE,WACjD,GAAGS,EACN,EAIGE,EAAQlB,EACfA,EAAS,YAAc","sourcesContent":["import React from 'react'\nimport UI from '../ui'\n\nexport type TextareaProps = React.ComponentProps<'textarea'> &\n React.ComponentProps<typeof UI>\n\n/**\n * Textarea component.\n *\n * @param value - The value of the textarea.\n * @param rows - The number of rows.\n * @param cols - The number of columns.\n * @param id - The id of the textarea.\n * @param name - The name of the textarea.\n * @param required - Whether the textarea is required.\n * @param disabled - Whether the textarea is disabled.\n * @param readOnly - Whether the textarea is read only.\n * @param onBlur - Blur event handler.\n * @param onPointerDown - Pointer down event handler.\n * @param onChange - Change event handler.\n * @param ref - Ref for the textarea.\n * @param styles - Styles object for the textarea.\n * @param textareaRef - Ref specifically for the textarea element.\n * @param props - Other props.\n */\nexport const Textarea = ({\n id,\n classes,\n value,\n rows = 5,\n cols = 25,\n name,\n required,\n disabled,\n readOnly,\n onBlur,\n onPointerDown,\n onChange,\n ref,\n styles,\n placeholder,\n ...props\n}: TextareaProps) => {\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (onChange && !disabled) {\n onChange?.(e)\n }\n }\n\n const handleBlur = (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (onBlur && !disabled) {\n onBlur?.(e)\n }\n }\n\n const handlePointerDown = (e: React.PointerEvent<HTMLTextAreaElement>) => {\n if (onPointerDown && !disabled) {\n onPointerDown?.(e)\n }\n }\n\n return (\n <UI\n as=\"textarea\"\n id={id}\n name={name}\n rows={rows}\n cols={cols}\n styles={styles}\n className={classes}\n data-style=\"textarea\"\n required={required}\n value={value}\n aria-disabled={disabled}\n readOnly={readOnly}\n onChange={handleChange}\n onBlur={handleBlur}\n onPointerDown={handlePointerDown}\n ref={ref}\n placeholder={placeholder || `${required ? '*' : ''} Message`}\n {...props}\n />\n )\n}\n\nexport default Textarea\nTextarea.displayName = 'Textarea'\n"]}
|
package/libs/chunk-XTQKWY7W.cjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkL75OQKEI_cjs = require('./chunk-L75OQKEI.cjs');
|
|
4
|
-
var i = require('react');
|
|
5
|
-
|
|
6
|
-
function _interopNamespace(e) {
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var i__namespace = /*#__PURE__*/_interopNamespace(i);
|
|
25
|
-
|
|
26
|
-
var n=({type:t="li",id:e,styles:s,children:o,classes:r,...p})=>i__namespace.createElement(chunkL75OQKEI_cjs.a,{id:e,as:t,className:r,...p,style:s},o),l=({children:t,classes:e,type:s="ul",variant:o,styles:r,role:p,...m})=>i__namespace.createElement(chunkL75OQKEI_cjs.a,{as:s,"data-variant":o,className:e,style:r,role:p,...m},t),I=l;l.displayName="List";l.ListItem=n;
|
|
27
|
-
|
|
28
|
-
exports.a = n;
|
|
29
|
-
exports.b = l;
|
|
30
|
-
exports.c = I;
|
|
31
|
-
//# sourceMappingURL=out.js.map
|
|
32
|
-
//# sourceMappingURL=chunk-XTQKWY7W.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/list/list.tsx"],"names":["React","ListItem","type","id","styles","children","classes","props","ui_default","List","variant","role","list_default"],"mappings":"oCAAA,UAAYA,MAAW,QAuBhB,IAAMC,EAAW,CAAC,CACvB,KAAAC,EAAO,KACP,GAAAC,EACA,OAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAGC,CACL,IAEI,gBAACC,EAAA,CAAG,GAAIL,EAAI,GAAID,EAAM,UAAWI,EAAU,GAAGC,EAAO,MAAOH,GACzDC,CACH,EAcSI,EAAO,CAAC,CACnB,SAAAJ,EACA,QAAAC,EACA,KAAAJ,EAAO,KACP,QAAAQ,EACA,OAAAN,EACA,KAAAO,EACA,GAAGJ,CACL,IAEI,gBAACC,EAAA,CACC,GAAIN,EACJ,eAAcQ,EACd,UAAWJ,EACX,MAAOF,EACP,KAAMO,EACL,GAAGJ,GAEHF,CACH,EAIGO,EAAQH,EACfA,EAAK,YAAc,OACnBA,EAAK,SAAWR","sourcesContent":["import * as React from 'react'\nimport UI from '../ui'\n\ntype ListProps = {\n /** Type of list to render (default: 'ul') */\n type?: 'ul' | 'ol' | 'dl'\n /** variant of list to render (default: 'none') */\n variant?: string\n} & React.ComponentProps<typeof UI>\n\nexport type ListItemProps = {\n /** Type of list item to render (default: 'li') */\n type?: 'li' | 'dt' | 'dd'\n} & React.ComponentProps<typeof UI>\n\n/**\n * ListItem component\n * @param type - HTML tag type for the list item (default: 'li')\n * @param styles - CSS styles object\n * @param children - Child elements to be rendered inside the list item\n * @param props - Additional props to be passed to the underlying HTML element\n * @returns A React component that renders a list item\n */\nexport const ListItem = ({\n type = 'li',\n id,\n styles,\n children,\n classes,\n ...props\n}: ListItemProps) => {\n return (\n <UI id={id} as={type} className={classes} {...props} style={styles}>\n {children}\n </UI>\n )\n}\n\n/**\n * List component renders a list element with provided props\n * @param children - Child elements to render inside the list\n * @param classes - CSS classes to apply\n * @param type - Type of list element (default: 'ul')\n * @param variant - Variant for styling purposes\n * @param styles - Inline styles object\n * @param role - ARIA role\n * @param props - Additional props to pass to underlying element\n */\nexport const List = ({\n children,\n classes,\n type = 'ul',\n variant,\n styles,\n role,\n ...props\n}: ListProps) => {\n return (\n <UI\n as={type}\n data-variant={variant}\n className={classes}\n style={styles}\n role={role}\n {...props}\n >\n {children}\n </UI>\n )\n}\n\nexport default List\nList.displayName = 'List'\nList.ListItem = ListItem\n"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
type PolymorphicRef<C extends React__default.ElementType> = React__default.ComponentPropsWithRef<C>['ref'];
|
|
4
|
-
type AsProp<C extends React__default.ElementType> = {
|
|
5
|
-
as?: C;
|
|
6
|
-
};
|
|
7
|
-
type PropsToOmit<C extends React__default.ElementType, P> = keyof (AsProp<C> & P);
|
|
8
|
-
type PolymorphicComponentProp<C extends React__default.ElementType, Props = {}> = React__default.PropsWithChildren<Props & AsProp<C>> & Omit<React__default.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
9
|
-
type PolymorphicComponentPropWithRef<C extends React__default.ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
|
|
10
|
-
ref?: PolymorphicRef<C>;
|
|
11
|
-
};
|
|
12
|
-
type FPProps<C extends React__default.ElementType> = PolymorphicComponentPropWithRef<C, {
|
|
13
|
-
renderStyles?: boolean;
|
|
14
|
-
styles?: React__default.CSSProperties;
|
|
15
|
-
classes?: string;
|
|
16
|
-
}>;
|
|
17
|
-
type FPComponent = <C extends React__default.ElementType = 'span'>(props: FPProps<C>) => React__default.ReactElement | any;
|
|
18
|
-
/**
|
|
19
|
-
* FP component is a polymorphic component that renders an HTML element with optional styles.
|
|
20
|
-
* @param {Object} props - Component props
|
|
21
|
-
* @param {React.ElementType} props.as - The HTML element to render. Defaults to 'div'.
|
|
22
|
-
* @param {boolean} props.renderStyles - Whether to render styles or not. Defaults to true.
|
|
23
|
-
* @param {Object} props.styles - The styles to apply to the component.
|
|
24
|
-
* @param {Object} props.defaultStyles - The default styles to apply to the component.
|
|
25
|
-
* @param {React.ReactNode} props.children - The children to render inside the component.
|
|
26
|
-
* @returns {React.ReactElement} - A React component that renders an HTML element with optional styles.
|
|
27
|
-
*/
|
|
28
|
-
declare const FP: FPComponent;
|
|
29
|
-
|
|
30
|
-
type InputProps = {
|
|
31
|
-
/**
|
|
32
|
-
* The type of the input.
|
|
33
|
-
*/
|
|
34
|
-
type?: "text" | "password" | "email" | "number" | "tel" | "url" | "search";
|
|
35
|
-
/**
|
|
36
|
-
* Set the element as disabled
|
|
37
|
-
*/
|
|
38
|
-
isDisabled?: boolean;
|
|
39
|
-
} & React__default.ComponentProps<typeof FP>;
|
|
40
|
-
declare const Input: {
|
|
41
|
-
({ type, name, value, placeholder, id, styles, classes, isDisabled, disabled, readonly, required, ref, onChange, onBlur, onPointerDown, ...props }: InputProps): JSX.Element;
|
|
42
|
-
displayName: string;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { FP as F, Input as I, InputProps as a };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|