@lablup/ui-common 0.1.0-alpha.0
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/LICENSE +202 -0
- package/NOTICE +10 -0
- package/README.md +145 -0
- package/dist/assets/components/Badge/Badge.css +1 -0
- package/dist/assets/components/BaseCard/BaseCard.css +1 -0
- package/dist/assets/components/Button/Button.css +1 -0
- package/dist/assets/components/DataTable/DataTable.css +1 -0
- package/dist/assets/components/Drawer/Drawer.css +1 -0
- package/dist/assets/components/EmptyState/EmptyState.css +1 -0
- package/dist/assets/components/ErrorState/ErrorState.css +1 -0
- package/dist/assets/components/PageHeader/PageHeader.css +1 -0
- package/dist/assets/components/PageLayout/PageLayout.css +1 -0
- package/dist/assets/components/ProgressBar/ProgressBar.css +1 -0
- package/dist/assets/components/Skeleton/Skeleton.css +1 -0
- package/dist/assets/components/Skeleton/SkeletonCard.css +1 -0
- package/dist/assets/components/Skeleton/SkeletonChart.css +1 -0
- package/dist/assets/components/Skeleton/SkeletonRow.css +1 -0
- package/dist/assets/components/Skeleton/SkeletonText.css +1 -0
- package/dist/assets/components/SmoothHeight/SmoothHeight.css +1 -0
- package/dist/assets/components/StatCard/StatCard.css +1 -0
- package/dist/assets/components/StatusTag/StatusTag.css +1 -0
- package/dist/assets/components/Tabs/Tabs.css +1 -0
- package/dist/assets/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/Badge/Badge2.js +19 -0
- package/dist/components/Badge/Badge2.js.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +2 -0
- package/dist/components/BaseCard/BaseCard.d.ts +57 -0
- package/dist/components/BaseCard/BaseCard2.js +36 -0
- package/dist/components/BaseCard/BaseCard2.js.map +1 -0
- package/dist/components/BaseCard/index.d.ts +2 -0
- package/dist/components/BaseCard/index.js +2 -0
- package/dist/components/Button/Button.d.ts +54 -0
- package/dist/components/Button/Button2.js +74 -0
- package/dist/components/Button/Button2.js.map +1 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/DataTable/DataTable.d.ts +133 -0
- package/dist/components/DataTable/DataTable2.js +276 -0
- package/dist/components/DataTable/DataTable2.js.map +1 -0
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +2 -0
- package/dist/components/Drawer/Drawer.d.ts +25 -0
- package/dist/components/Drawer/Drawer2.js +106 -0
- package/dist/components/Drawer/Drawer2.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +2 -0
- package/dist/components/EmptyState/EmptyState.d.ts +45 -0
- package/dist/components/EmptyState/EmptyState.example.d.ts +8 -0
- package/dist/components/EmptyState/EmptyState2.js +78 -0
- package/dist/components/EmptyState/EmptyState2.js.map +1 -0
- package/dist/components/EmptyState/illustrations.d.ts +51 -0
- package/dist/components/EmptyState/illustrations.js +571 -0
- package/dist/components/EmptyState/illustrations.js.map +1 -0
- package/dist/components/EmptyState/index.d.ts +5 -0
- package/dist/components/EmptyState/index.js +2 -0
- package/dist/components/ErrorState/ErrorState.d.ts +25 -0
- package/dist/components/ErrorState/ErrorState.example.d.ts +46 -0
- package/dist/components/ErrorState/ErrorState2.js +58 -0
- package/dist/components/ErrorState/ErrorState2.js.map +1 -0
- package/dist/components/ErrorState/index.d.ts +5 -0
- package/dist/components/ErrorState/index.js +2 -0
- package/dist/components/PageHeader/PageHeader.d.ts +18 -0
- package/dist/components/PageHeader/PageHeader2.js +42 -0
- package/dist/components/PageHeader/PageHeader2.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PageHeader/index.js +2 -0
- package/dist/components/PageLayout/PageLayout.d.ts +11 -0
- package/dist/components/PageLayout/PageLayout2.js +19 -0
- package/dist/components/PageLayout/PageLayout2.js.map +1 -0
- package/dist/components/PageLayout/index.d.ts +2 -0
- package/dist/components/PageLayout/index.js +2 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +22 -0
- package/dist/components/ProgressBar/ProgressBar2.js +36 -0
- package/dist/components/ProgressBar/ProgressBar2.js.map +1 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/ProgressBar/index.js +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +25 -0
- package/dist/components/Skeleton/Skeleton2.js +26 -0
- package/dist/components/Skeleton/Skeleton2.js.map +1 -0
- package/dist/components/Skeleton/SkeletonCard.d.ts +18 -0
- package/dist/components/Skeleton/SkeletonCard2.js +73 -0
- package/dist/components/Skeleton/SkeletonCard2.js.map +1 -0
- package/dist/components/Skeleton/SkeletonChart.d.ts +23 -0
- package/dist/components/Skeleton/SkeletonChart2.js +66 -0
- package/dist/components/Skeleton/SkeletonChart2.js.map +1 -0
- package/dist/components/Skeleton/SkeletonRow.d.ts +22 -0
- package/dist/components/Skeleton/SkeletonRow2.js +47 -0
- package/dist/components/Skeleton/SkeletonRow2.js.map +1 -0
- package/dist/components/Skeleton/SkeletonText.d.ts +20 -0
- package/dist/components/Skeleton/SkeletonText2.js +26 -0
- package/dist/components/Skeleton/SkeletonText2.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +15 -0
- package/dist/components/Skeleton/index.js +6 -0
- package/dist/components/SmoothHeight/SmoothHeight.d.ts +9 -0
- package/dist/components/SmoothHeight/SmoothHeight2.js +38 -0
- package/dist/components/SmoothHeight/SmoothHeight2.js.map +1 -0
- package/dist/components/SmoothHeight/index.d.ts +2 -0
- package/dist/components/SmoothHeight/index.js +2 -0
- package/dist/components/StatCard/StatCard.d.ts +59 -0
- package/dist/components/StatCard/StatCard2.js +111 -0
- package/dist/components/StatCard/StatCard2.js.map +1 -0
- package/dist/components/StatCard/formatters.d.ts +12 -0
- package/dist/components/StatCard/formatters.js +8 -0
- package/dist/components/StatCard/formatters.js.map +1 -0
- package/dist/components/StatCard/index.d.ts +3 -0
- package/dist/components/StatCard/index.js +3 -0
- package/dist/components/StatusTag/StatusTag.d.ts +38 -0
- package/dist/components/StatusTag/StatusTag2.js +44 -0
- package/dist/components/StatusTag/StatusTag2.js.map +1 -0
- package/dist/components/StatusTag/index.d.ts +2 -0
- package/dist/components/StatusTag/index.js +2 -0
- package/dist/components/Tabs/Tabs.d.ts +107 -0
- package/dist/components/Tabs/Tabs2.js +430 -0
- package/dist/components/Tabs/Tabs2.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +3 -0
- package/dist/components/Tabs/tabTags.d.ts +9 -0
- package/dist/components/Tabs/tabTags.js +11 -0
- package/dist/components/Tabs/tabTags.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +16 -0
- package/dist/components/Tooltip/Tooltip2.js +67 -0
- package/dist/components/Tooltip/Tooltip2.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +2 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/usePrefersReducedMotion.d.ts +12 -0
- package/dist/hooks/usePrefersReducedMotion.js +22 -0
- package/dist/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/icons/AlertCircleIcon.d.ts +11 -0
- package/dist/icons/AlertCircleIcon.js +26 -0
- package/dist/icons/AlertCircleIcon.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +24 -0
- package/dist/styles/base.css +169 -0
- package/dist/styles/themes/bliss-dark.css +123 -0
- package/dist/styles/themes/bliss-light.css +123 -0
- package/dist/styles/themes/glass-dark.css +124 -0
- package/dist/styles/themes/glass-light.css +125 -0
- package/dist/styles/themes/orange-dark.css +70 -0
- package/dist/styles/themes/orange-light.css +70 -0
- package/dist/styles/themes/reverie-dark.css +104 -0
- package/dist/styles/themes/reverie-light.css +104 -0
- package/dist/styles/themes/stained-dark.css +80 -0
- package/dist/styles/themes/stained-light.css +80 -0
- package/package.json +87 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"illustrations.js","names":[],"sources":["../../../src/components/EmptyState/illustrations.tsx"],"sourcesContent":["/**\n * EmptyState Illustrations\n *\n * SVG illustration components for different empty state contexts.\n * All illustrations are inline React components for optimal performance.\n * Each component is memoized to prevent unnecessary re-renders.\n */\n\nimport { memo } from \"react\";\n\ninterface IllustrationProps {\n className?: string;\n}\n\n/**\n * Chat illustration - Speech bubbles with sparkles\n */\nexport const ChatIllustration = memo(function ChatIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Chat bubble */}\n <g className=\"illustration-bubble\">\n <rect\n x=\"20\"\n y=\"30\"\n width=\"70\"\n height=\"50\"\n rx=\"12\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n />\n <path\n d=\"M40 80 L50 70 L90 70\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n {/* Message lines */}\n <line\n x1=\"35\"\n y1=\"45\"\n x2=\"75\"\n y2=\"45\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"35\"\n y1=\"55\"\n x2=\"65\"\n y2=\"55\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n </g>\n {/* Sparkles */}\n <g className=\"illustration-sparkle\">\n <path\n d=\"M95 25 L97 32 L104 34 L97 36 L95 43 L93 36 L86 34 L93 32 Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M25 15 L26 19 L30 20 L26 21 L25 25 L24 21 L20 20 L24 19 Z\"\n fill=\"currentColor\"\n />\n </g>\n </svg>\n );\n});\n\n/**\n * Models illustration - Package/download box\n */\nexport const ModelsIllustration = memo(function ModelsIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* 3D box representing model package */}\n <g className=\"illustration-box\">\n <path\n d=\"M60 20 L95 40 L95 80 L60 100 L25 80 L25 40 Z\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M60 20 L60 100\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <path\n d=\"M25 40 L60 60 L95 40\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n {/* Download arrow */}\n <g className=\"illustration-arrow\">\n <path\n d=\"M60 45 L60 75\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <path\n d=\"M52 67 L60 75 L68 67\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </g>\n </svg>\n );\n});\n\n/**\n * Creations illustration - Gallery frame\n */\nexport const CreationsIllustration = memo(function CreationsIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Gallery frame */}\n <rect\n x=\"20\"\n y=\"25\"\n width=\"80\"\n height=\"70\"\n rx=\"8\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n />\n {/* Image placeholder with mountain and sun */}\n <g className=\"illustration-image\">\n <circle cx=\"45\" cy=\"45\" r=\"8\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path\n d=\"M20 80 L40 60 L60 75 L85 50 L100 65 L100 95 L20 95 Z\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinejoin=\"round\"\n fill=\"none\"\n />\n </g>\n </svg>\n );\n});\n\n/**\n * Benchmark illustration - Speedometer\n */\nexport const BenchmarkIllustration = memo(function BenchmarkIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 512 512\"\n fill=\"currentColor\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Speedometer body */}\n <path d=\"M92.231,401.523l-24.69,12.044C49.475,381.325,40,345.338,40,308.499c0-26.991,4.977-52.842,14.06-76.683l28.291,13.57c2.79,1.338,5.735,1.972,8.636,1.972c7.453,0,14.608-4.185,18.047-11.355c4.776-9.959,0.576-21.906-9.384-26.683l-27.932-13.398c34.717-56.62,94.784-96.095,164.283-102.505v30.081c0,11.046,8.954,20,20,20c11.046,0,20-8.954,20-20V93.402c23.828,2.169,46.884,8.237,68.771,18.117c10.065,4.545,21.912,0.066,26.457-9.999c4.545-10.068,0.068-21.913-10-26.458C328.063,60.091,292.659,52.499,256,52.499c-68.38,0-132.667,26.628-181.02,74.98C26.629,175.832,0,240.119,0,308.499c0,50.53,14.998,99.674,43.373,142.115c3.822,5.715,10.141,8.886,16.639,8.886c2.954,0,5.946-0.655,8.757-2.026l41-20c9.928-4.843,14.05-16.816,9.207-26.744C114.133,400.803,102.159,396.682,92.231,401.523z\" />\n <path d=\"M489.436,203.271c-4.544-10.067-16.387-14.547-26.458-10c-10.067,4.545-14.544,16.39-9.999,26.457C465.601,247.686,472,277.553,472,308.499c0,36.894-9.506,72.939-27.625,105.218l-25.777-12.275c-9.971-4.748-21.906-0.515-26.656,9.459c-4.749,9.972-0.514,21.907,9.459,26.656l42,20c2.763,1.315,5.692,1.944,8.588,1.944c6.5,0,12.82-3.175,16.637-8.886C497.002,408.173,512,359.029,512,308.499C512,271.84,504.408,236.436,489.436,203.271z\" />\n {/* Speedometer needle - animated */}\n <g className=\"illustration-needle\">\n <path d=\"M435.143,129.356c-6.796-6.795-17.463-7.797-25.407-2.384c-29.926,20.398-180.03,122.969-196.162,139.1c-23.394,23.395-23.394,61.459,0,84.854c11.697,11.696,27.063,17.545,42.427,17.545c15.364,0,30.729-5.849,42.427-17.545c16.131-16.132,118.701-166.236,139.1-196.162C442.939,146.821,441.938,136.153,435.143,129.356z M270.142,322.641c-7.797,7.799-20.486,7.799-28.283,0c-7.798-7.797-7.799-20.482-0.004-28.28c6.268-6.194,48.885-36.588,101.319-73.035C306.728,273.76,276.334,316.375,270.142,322.641z\" />\n </g>\n </svg>\n );\n});\n\n/**\n * Logs illustration - Document stack\n */\nexport const LogsIllustration = memo(function LogsIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Stacked documents */}\n <g className=\"illustration-docs\">\n {/* Back document */}\n <rect\n x=\"35\"\n y=\"20\"\n width=\"60\"\n height=\"75\"\n rx=\"4\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n fill=\"none\"\n opacity=\"0.4\"\n />\n {/* Middle document */}\n <rect\n x=\"30\"\n y=\"25\"\n width=\"60\"\n height=\"75\"\n rx=\"4\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n fill=\"none\"\n opacity=\"0.6\"\n />\n {/* Front document */}\n <rect\n x=\"25\"\n y=\"30\"\n width=\"60\"\n height=\"75\"\n rx=\"4\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n />\n {/* Text lines */}\n <line\n x1=\"35\"\n y1=\"45\"\n x2=\"70\"\n y2=\"45\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"35\"\n y1=\"55\"\n x2=\"75\"\n y2=\"55\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"35\"\n y1=\"65\"\n x2=\"65\"\n y2=\"65\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"35\"\n y1=\"75\"\n x2=\"70\"\n y2=\"75\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </g>\n </svg>\n );\n});\n\n/**\n * Statistics illustration - Chart placeholder\n */\nexport const StatisticsIllustration = memo(function StatisticsIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Chart axes */}\n <g className=\"illustration-axes\">\n <line\n x1=\"25\"\n y1=\"20\"\n x2=\"25\"\n y2=\"90\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"25\"\n y1=\"90\"\n x2=\"95\"\n y2=\"90\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n </g>\n {/* Bar chart */}\n <g className=\"illustration-bars\">\n <rect\n x=\"35\"\n y=\"60\"\n width=\"10\"\n height=\"25\"\n rx=\"2\"\n fill=\"currentColor\"\n opacity=\"0.6\"\n />\n <rect\n x=\"50\"\n y=\"45\"\n width=\"10\"\n height=\"40\"\n rx=\"2\"\n fill=\"currentColor\"\n opacity=\"0.8\"\n />\n <rect\n x=\"65\"\n y=\"55\"\n width=\"10\"\n height=\"30\"\n rx=\"2\"\n fill=\"currentColor\"\n opacity=\"0.7\"\n />\n <rect x=\"80\" y=\"35\" width=\"10\" height=\"50\" rx=\"2\" fill=\"currentColor\" />\n </g>\n </svg>\n );\n});\n\n/**\n * Error illustration - Warning/error state\n */\nexport const ErrorIllustration = memo(function ErrorIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Triangle warning */}\n <g className=\"illustration-warning\">\n <path\n d=\"M60 25 L100 95 L20 95 Z\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n strokeLinejoin=\"round\"\n />\n {/* Exclamation mark */}\n <line\n x1=\"60\"\n y1=\"50\"\n x2=\"60\"\n y2=\"70\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n />\n <circle cx=\"60\" cy=\"80\" r=\"2.5\" fill=\"currentColor\" />\n </g>\n </svg>\n );\n});\n\n/**\n * Text illustration - Document with bookmark\n */\nexport const TextIllustration = memo(function TextIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Document */}\n <g className=\"illustration-docs\">\n <rect\n x=\"25\"\n y=\"15\"\n width=\"60\"\n height=\"80\"\n rx=\"6\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n />\n {/* Text lines */}\n <line\n x1=\"37\"\n y1=\"35\"\n x2=\"73\"\n y2=\"35\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"37\"\n y1=\"47\"\n x2=\"68\"\n y2=\"47\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"37\"\n y1=\"59\"\n x2=\"73\"\n y2=\"59\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"37\"\n y1=\"71\"\n x2=\"58\"\n y2=\"71\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n </g>\n {/* Bookmark */}\n <g className=\"illustration-sparkle\">\n <path\n d=\"M78 10 L78 38 L90 30 L102 38 L102 10 Z\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n fill=\"none\"\n strokeLinejoin=\"round\"\n />\n </g>\n </svg>\n );\n});\n\n/**\n * Schedule illustration - Calendar with clock\n */\nexport const ScheduleIllustration = memo(function ScheduleIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Calendar body */}\n <g className=\"illustration-docs\">\n <rect\n x=\"20\"\n y=\"30\"\n width=\"65\"\n height=\"65\"\n rx=\"8\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n />\n {/* Calendar header bar */}\n <line x1=\"20\" y1=\"48\" x2=\"85\" y2=\"48\" stroke=\"currentColor\" strokeWidth=\"2.5\" />\n {/* Calendar pins */}\n <line\n x1=\"38\"\n y1=\"25\"\n x2=\"38\"\n y2=\"35\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"67\"\n y1=\"25\"\n x2=\"67\"\n y2=\"35\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n />\n {/* Calendar grid dots */}\n <circle cx=\"35\" cy=\"58\" r=\"2.5\" fill=\"currentColor\" opacity=\"0.5\" />\n <circle cx=\"52\" cy=\"58\" r=\"2.5\" fill=\"currentColor\" opacity=\"0.5\" />\n <circle cx=\"35\" cy=\"72\" r=\"2.5\" fill=\"currentColor\" opacity=\"0.5\" />\n <circle cx=\"52\" cy=\"72\" r=\"2.5\" fill=\"currentColor\" opacity=\"0.5\" />\n <circle cx=\"35\" cy=\"86\" r=\"2.5\" fill=\"currentColor\" opacity=\"0.5\" />\n </g>\n {/* Clock overlay */}\n <g className=\"illustration-sparkle\">\n <circle\n cx=\"82\"\n cy=\"80\"\n r=\"20\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n fill=\"var(--token-colorBgContainer, #fff)\"\n />\n <line\n x1=\"82\"\n y1=\"80\"\n x2=\"82\"\n y2=\"70\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"82\"\n y1=\"80\"\n x2=\"92\"\n y2=\"80\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n />\n <circle cx=\"82\" cy=\"80\" r=\"2\" fill=\"currentColor\" />\n </g>\n </svg>\n );\n});\n\n/**\n * Generic illustration - Placeholder icon\n */\nexport const GenericIllustration = memo(function GenericIllustration({\n className,\n}: IllustrationProps) {\n return (\n <svg\n width=\"120\"\n height=\"120\"\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className={className}\n aria-hidden=\"true\"\n >\n {/* Simple folder/file icon */}\n <g className=\"illustration-folder\">\n <path\n d=\"M25 35 L25 85 C25 90 28 92 33 92 L87 92 C92 92 95 90 95 85 L95 45 C95 40 92 38 87 38 L60 38 L52 28 L33 28 C28 28 25 30 25 35 Z\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n fill=\"none\"\n strokeLinejoin=\"round\"\n />\n </g>\n </svg>\n );\n});\n"],"mappings":";;;AAiBA,IAAa,IAAmB,EAAK,SAA0B,EAC7D,gBACoB;CACpB,OACE,kBAAC,OAAD;EACE,OAAM;EACN,QAAO;EACP,SAAQ;EACR,MAAK;EACL,OAAM;EACK;EACX,eAAY;EAPd,UAAA,CAUE,kBAAC,KAAD;GAAG,WAAU;GAAb,UAAA;IACE,kBAAC,QAAD;KACE,GAAE;KACF,GAAE;KACF,OAAM;KACN,QAAO;KACP,IAAG;KACH,QAAO;KACP,aAAY;KACZ,MAAK;IACN,CAAA;IACD,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AK;KAAe,SAAQ;IAAO,CAAA;IACnE,kBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAM,MAAK;KAAe,SAAQ;IAAO,CAAA;IACnE,kBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAM,MAAK;KAAe,SAAQ;IAAO,CAAA;IACnE,kBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAM,MAAK;KAAe,SAAQ;IAAO,CAAA;GAClE;EAEH,CAAA,GAAA,kBAAC,KAAD;GAAG,WAAU;GAAb,UAAA;IACE,kBAAC,UAAD;KACE,IAAG;KACH,IAAG;KACH,GAAE;KACF,QAAO;KACP,aAAY;KACZ,MAAK;IACN,CAAA;IACD,kBAAC,QAAD;KACE,IAAG;KACH,IAAG;KACH,IAAG;KACH,IAAG;KACH,QAAO;KACP,aAAY;KACZ,eAAc;IACf,CAAA;IACD,kBAAC,QAAD;KACE,IAAG;KACH,IAAG;KACH,IAAG;KACH,IAAG;KACH,QAAO;KACP,aAAY;KACZ,eAAc;IACf,CAAA;IACD,kBAAC,UAAD;KAAQ,IAAG;KAAK,IAAG;KAAK,GAAE;KAAI,MAAK;IAAgB,CAAA;GAClD;EACA,CAAA,CAAA;;AAET,CAAC,GAKY,IAAsB,EAAK,SAA6B,EACnE,gBACoB;CACpB,OACE,kBAAC,OAAD;EACE,OAAM;EACN,QAAO;EACP,SAAQ;EACR,MAAK;EACL,OAAM;EACK;EACX,eAAY;EAGZ,UAAA,kBAAC,KAAD;GAAG,WAAU;GACX,UAAA,kBAAC,QAAD;IACE,GAAE;IACF,QAAO;IACP,aAAY;IACZ,MAAK;IACL,gBAAe;GAChB,CAAA;EACA,CAAA;CACA,CAAA;AAET,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ErrorType = "network" | "configuration" | "model" | "permission" | "generic";
|
|
2
|
+
export interface ErrorAction {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ErrorStateProps {
|
|
7
|
+
/** Error type determines icon and default styling */
|
|
8
|
+
type?: ErrorType;
|
|
9
|
+
/** Error title - main heading */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Detailed error message */
|
|
12
|
+
message: string;
|
|
13
|
+
/** Primary action button (e.g., Retry, Go to Settings) */
|
|
14
|
+
primaryAction?: ErrorAction;
|
|
15
|
+
/** Secondary action button (e.g., View Logs, Report Issue) */
|
|
16
|
+
secondaryAction?: ErrorAction;
|
|
17
|
+
/** Additional CSS classes */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Whether to show error icon */
|
|
20
|
+
showIcon?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* ErrorState Component
|
|
24
|
+
*/
|
|
25
|
+
export declare function ErrorState({ type, title, message, primaryAction, secondaryAction, className, showIcon, }: ErrorStateProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorState Component Examples
|
|
3
|
+
*
|
|
4
|
+
* Demonstrates all error type variants and usage patterns.
|
|
5
|
+
* This file is for documentation purposes and shows how to use the component.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Example: Network Error
|
|
9
|
+
* Used when connection to server fails
|
|
10
|
+
*/
|
|
11
|
+
export declare function NetworkErrorExample(): import("react").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Example: Configuration Error
|
|
14
|
+
* Used when there are configuration/settings issues
|
|
15
|
+
*/
|
|
16
|
+
export declare function ConfigurationErrorExample(): import("react").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Example: Model Error
|
|
19
|
+
* Used when model loading or access fails
|
|
20
|
+
*/
|
|
21
|
+
export declare function ModelErrorExample(): import("react").JSX.Element;
|
|
22
|
+
/**
|
|
23
|
+
* Example: Permission Error
|
|
24
|
+
* Used when access is denied
|
|
25
|
+
*/
|
|
26
|
+
export declare function PermissionErrorExample(): import("react").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Example: Generic Error
|
|
29
|
+
* Used as fallback for unknown errors
|
|
30
|
+
*/
|
|
31
|
+
export declare function GenericErrorExample(): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Example: Minimal Error (no actions)
|
|
34
|
+
* Used when no user actions are available
|
|
35
|
+
*/
|
|
36
|
+
export declare function MinimalErrorExample(): import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Example: Error without icon
|
|
39
|
+
* Used in compact layouts where space is limited
|
|
40
|
+
*/
|
|
41
|
+
export declare function CompactErrorExample(): import("react").JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Example: Custom styled error
|
|
44
|
+
* Shows how to add custom styling
|
|
45
|
+
*/
|
|
46
|
+
export declare function CustomStyledErrorExample(): import("react").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Button as e } from "../Button/Button2.js";
|
|
2
|
+
import { AlertCircleIcon as t } from "../../icons/AlertCircleIcon.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useCallback as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/ErrorState/ErrorState.tsx
|
|
7
|
+
function a(e) {
|
|
8
|
+
return /* @__PURE__ */ r(t, { size: 48 });
|
|
9
|
+
}
|
|
10
|
+
function o({ type: t = "generic", title: o, message: s, primaryAction: c, secondaryAction: l, className: u = "", showIcon: d = !0 }) {
|
|
11
|
+
let f = n(() => {
|
|
12
|
+
c?.onClick();
|
|
13
|
+
}, [c]), p = n(() => {
|
|
14
|
+
l?.onClick();
|
|
15
|
+
}, [l]), m = [
|
|
16
|
+
"error-state",
|
|
17
|
+
`error-state--${t}`,
|
|
18
|
+
u
|
|
19
|
+
].filter(Boolean).join(" ");
|
|
20
|
+
return /* @__PURE__ */ i("div", {
|
|
21
|
+
className: m,
|
|
22
|
+
role: "alert",
|
|
23
|
+
"aria-live": "polite",
|
|
24
|
+
children: [
|
|
25
|
+
d && /* @__PURE__ */ r("div", {
|
|
26
|
+
className: "error-state__icon",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
children: a(t)
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ r("h2", {
|
|
31
|
+
className: "error-state__title",
|
|
32
|
+
children: o
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ r("p", {
|
|
35
|
+
className: "error-state__message",
|
|
36
|
+
children: s
|
|
37
|
+
}),
|
|
38
|
+
(c || l) && /* @__PURE__ */ i("div", {
|
|
39
|
+
className: "error-state__actions",
|
|
40
|
+
children: [c && /* @__PURE__ */ r(e, {
|
|
41
|
+
variant: "primary",
|
|
42
|
+
onClick: f,
|
|
43
|
+
className: "error-state__action-btn error-state__action-btn--primary",
|
|
44
|
+
children: c.label
|
|
45
|
+
}), l && /* @__PURE__ */ r(e, {
|
|
46
|
+
variant: "secondary",
|
|
47
|
+
onClick: p,
|
|
48
|
+
className: "error-state__action-btn error-state__action-btn--secondary",
|
|
49
|
+
children: l.label
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { o as ErrorState };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=ErrorState2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorState2.js","names":[],"sources":["../../../src/components/ErrorState/ErrorState.tsx"],"sourcesContent":["/**\n * ErrorState Component\n *\n * Unified error state component with recovery actions.\n * Provides consistent error presentation across all pages with actionable buttons.\n *\n * Features:\n * - Error type variants (network, configuration, model, permission, generic)\n * - Primary and secondary action buttons\n * - Accessible (ARIA attributes, focus management)\n * - Dark/light theme support\n */\n\nimport { useCallback } from \"react\";\nimport { AlertCircleIcon } from \"../../icons/AlertCircleIcon\";\nimport { Button } from \"../Button\";\nimport \"./ErrorState.css\";\n\nexport type ErrorType =\n \"network\" | \"configuration\" | \"model\" | \"permission\" | \"generic\";\n\nexport interface ErrorAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ErrorStateProps {\n /** Error type determines icon and default styling */\n type?: ErrorType;\n /** Error title - main heading */\n title: string;\n /** Detailed error message */\n message: string;\n /** Primary action button (e.g., Retry, Go to Settings) */\n primaryAction?: ErrorAction;\n /** Secondary action button (e.g., View Logs, Report Issue) */\n secondaryAction?: ErrorAction;\n /** Additional CSS classes */\n className?: string;\n /** Whether to show error icon */\n showIcon?: boolean;\n}\n\n/**\n * Get icon for error type\n */\nfunction getErrorIcon(_type: ErrorType): React.ReactNode {\n // All error types use the same AlertCircleIcon for now\n // Can be extended with different icons per type in the future\n return <AlertCircleIcon size={48} />;\n}\n\n/**\n * ErrorState Component\n */\nexport function ErrorState({\n type = \"generic\",\n title,\n message,\n primaryAction,\n secondaryAction,\n className = \"\",\n showIcon = true,\n}: ErrorStateProps) {\n const handlePrimaryAction = useCallback(() => {\n primaryAction?.onClick();\n }, [primaryAction]);\n\n const handleSecondaryAction = useCallback(() => {\n secondaryAction?.onClick();\n }, [secondaryAction]);\n\n const containerClass = [\"error-state\", `error-state--${type}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={containerClass} role=\"alert\" aria-live=\"polite\">\n {showIcon && (\n <div className=\"error-state__icon\" aria-hidden=\"true\">\n {getErrorIcon(type)}\n </div>\n )}\n\n <h2 className=\"error-state__title\">{title}</h2>\n\n <p className=\"error-state__message\">{message}</p>\n\n {(primaryAction || secondaryAction) && (\n <div className=\"error-state__actions\">\n {primaryAction && (\n <Button\n variant=\"primary\"\n onClick={handlePrimaryAction}\n className=\"error-state__action-btn error-state__action-btn--primary\"\n >\n {primaryAction.label}\n </Button>\n )}\n\n {secondaryAction && (\n <Button\n variant=\"secondary\"\n onClick={handleSecondaryAction}\n className=\"error-state__action-btn error-state__action-btn--secondary\"\n >\n {secondaryAction.label}\n </Button>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AA8CA,SAAS,EAAa,GAAmC;CAGvD,OAAO,kBAAC,GAAD,EAAiB,MAAM,GAAK,CAAA;AACrC;AAKA,SAAgB,EAAW,EACzB,UAAO,WACP,UACA,YACA,kBACA,oBACA,eAAY,IACZ,cAAW,MACO;CAClB,IAAM,IAAsB,QAAkB;EAC5C,GAAe,QAAQ;CACzB,GAAG,CAAC,CAAa,CAAC,GAEZ,IAAwB,QAAkB;EAC9C,GAAiB,QAAQ;CAC3B,GAAG,CAAC,CAAe,CAAC,GAEd,IAAiB;EAAC;EAAe,gBAAgB;EAAQ;CAAS,CAAC,CACtE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAgB,MAAK;EAAQ,aAAU;EAAvD,UAAA;GACG,KACC,kBAAC,OAAD;IAAK,WAAU;IAAoB,eAAY;IAC5C,UAAA,EAAa,CAAI;GACf,CAAA;GAGP,kBAAC,MAAD;IAAI,WAAU;IAAsB,UAAA;GAAU,CAAA;GAE9C,kBAAC,KAAD;IAAG,WAAU;IAAwB,UAAA;GAAW,CAAA;IAE9C,KAAiB,MACjB,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACG,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,SAAS;KACT,WAAU;KAET,UAAA,EAAc;IACT,CAAA,GAGT,KACC,kBAAC,GAAD;KACE,SAAQ;KACR,SAAS;KACT,WAAU;KAET,UAAA,EAAgB;IACX,CAAA,CAEP;;EAEJ;;AAET"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PageHeaderProps {
|
|
3
|
+
/** Page title - displayed as h1 */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Page description - displayed below title */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Optional action buttons or elements on the right side */
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
/** Error message to display below the header */
|
|
10
|
+
error?: string | null;
|
|
11
|
+
/** Callback when error is dismissed */
|
|
12
|
+
onErrorDismiss?: () => void;
|
|
13
|
+
/** Additional CSS class names */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Accessible label for the error-dismiss button. Default: "Dismiss error" */
|
|
16
|
+
dismissErrorLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function PageHeader({ title, description, actions, error, onErrorDismiss, className, dismissErrorLabel, }: PageHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/PageHeader/PageHeader.tsx
|
|
4
|
+
function n({ title: n, description: r, actions: i, error: a, onErrorDismiss: o, className: s = "", dismissErrorLabel: c = "Dismiss error" }) {
|
|
5
|
+
let l = ["page-header", s].filter(Boolean).join(" ");
|
|
6
|
+
return /* @__PURE__ */ t("header", {
|
|
7
|
+
className: l,
|
|
8
|
+
children: [/* @__PURE__ */ t("div", {
|
|
9
|
+
className: "page-header__content",
|
|
10
|
+
children: [/* @__PURE__ */ t("div", {
|
|
11
|
+
className: "page-header__text",
|
|
12
|
+
children: [/* @__PURE__ */ e("h1", {
|
|
13
|
+
className: "page-header__title",
|
|
14
|
+
children: n
|
|
15
|
+
}), r && /* @__PURE__ */ e("p", {
|
|
16
|
+
className: "page-header__description",
|
|
17
|
+
children: r
|
|
18
|
+
})]
|
|
19
|
+
}), i && /* @__PURE__ */ e("div", {
|
|
20
|
+
className: "page-header__actions",
|
|
21
|
+
children: i
|
|
22
|
+
})]
|
|
23
|
+
}), a && /* @__PURE__ */ t("div", {
|
|
24
|
+
className: "page-header__error",
|
|
25
|
+
role: "alert",
|
|
26
|
+
children: [/* @__PURE__ */ e("span", {
|
|
27
|
+
className: "page-header__error-text",
|
|
28
|
+
children: a
|
|
29
|
+
}), o && /* @__PURE__ */ e("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
className: "page-header__error-dismiss",
|
|
32
|
+
onClick: o,
|
|
33
|
+
"aria-label": c,
|
|
34
|
+
children: "×"
|
|
35
|
+
})]
|
|
36
|
+
})]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { n as PageHeader };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=PageHeader2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader2.js","names":[],"sources":["../../../src/components/PageHeader/PageHeader.tsx"],"sourcesContent":["/**\n * PageHeader Component\n *\n * Standardized page header with title, description, and optional action buttons.\n * Provides consistent styling and layout across all pages.\n *\n * @example\n * // Basic usage\n * <PageHeader\n * title=\"Models\"\n * description=\"Manage and browse your local models\"\n * />\n *\n * @example\n * // With action buttons\n * <PageHeader\n * title=\"Settings\"\n * description=\"Configure application settings\"\n * actions={\n * <>\n * <Button variant=\"secondary\">Import</Button>\n * <Button variant=\"primary\">Save</Button>\n * </>\n * }\n * />\n *\n * @example\n * // With error display\n * <PageHeader\n * title=\"Engines\"\n * description=\"Manage runtime engines\"\n * error={error}\n * onErrorDismiss={() => clearError()}\n * />\n */\n\nimport type { ReactNode } from \"react\";\nimport \"./PageHeader.css\";\n\nexport interface PageHeaderProps {\n /** Page title - displayed as h1 */\n title: string;\n /** Page description - displayed below title */\n description?: string;\n /** Optional action buttons or elements on the right side */\n actions?: ReactNode;\n /** Error message to display below the header */\n error?: string | null;\n /** Callback when error is dismissed */\n onErrorDismiss?: () => void;\n /** Additional CSS class names */\n className?: string;\n /** Accessible label for the error-dismiss button. Default: \"Dismiss error\" */\n dismissErrorLabel?: string;\n}\n\nexport function PageHeader({\n title,\n description,\n actions,\n error,\n onErrorDismiss,\n className = \"\",\n dismissErrorLabel = \"Dismiss error\",\n}: PageHeaderProps) {\n const classes = [\"page-header\", className].filter(Boolean).join(\" \");\n\n return (\n <header className={classes}>\n <div className=\"page-header__content\">\n <div className=\"page-header__text\">\n <h1 className=\"page-header__title\">{title}</h1>\n {description && <p className=\"page-header__description\">{description}</p>}\n </div>\n {actions && <div className=\"page-header__actions\">{actions}</div>}\n </div>\n {error && (\n <div className=\"page-header__error\" role=\"alert\">\n <span className=\"page-header__error-text\">{error}</span>\n {onErrorDismiss && (\n <button\n type=\"button\"\n className=\"page-header__error-dismiss\"\n onClick={onErrorDismiss}\n aria-label={dismissErrorLabel}\n >\n ×\n </button>\n )}\n </div>\n )}\n </header>\n );\n}\n"],"mappings":";;;AAwDA,SAAgB,EAAW,EACzB,UACA,gBACA,YACA,UACA,mBACA,eAAY,IACZ,uBAAoB,mBACF;CAClB,IAAM,IAAU,CAAC,eAAe,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAEnE,OACE,kBAAC,UAAD;EAAQ,WAAW;EAAnB,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;KAAsB,UAAA;IAAU,CAAA,GAC7C,KAAe,kBAAC,KAAD;KAAG,WAAU;KAA4B,UAAA;IAAe,CAAA,CACrE;GACJ,CAAA,GAAA,KAAW,kBAAC,OAAD;IAAK,WAAU;IAAwB,UAAA;GAAa,CAAA,CAC7D;EACJ,CAAA,GAAA,KACC,kBAAC,OAAD;GAAK,WAAU;GAAqB,MAAK;GAAzC,UAAA,CACE,kBAAC,QAAD;IAAM,WAAU;IAA2B,UAAA;GAAY,CAAA,GACtD,KACC,kBAAC,UAAD;IACE,MAAK;IACL,WAAU;IACV,SAAS;IACT,cAAY;IACb,UAAA;GAEO,CAAA,CAEP;EAED,CAAA,CAAA;;AAEZ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type PageLayoutVariant = "standard" | "wide" | "full";
|
|
3
|
+
export interface PageLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Page content */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Layout width variant: "standard" (900px), "wide" (1400px), or "full" (no max-width) */
|
|
7
|
+
variant?: PageLayoutVariant;
|
|
8
|
+
/** Additional CSS class names */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function PageLayout({ children, variant, className, ...props }: PageLayoutProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/PageLayout/PageLayout.tsx
|
|
4
|
+
function t({ children: t, variant: n = "standard", className: r = "", ...i }) {
|
|
5
|
+
let a = [
|
|
6
|
+
"page-layout",
|
|
7
|
+
`page-layout--${n}`,
|
|
8
|
+
r
|
|
9
|
+
].filter(Boolean).join(" ");
|
|
10
|
+
return /* @__PURE__ */ e("div", {
|
|
11
|
+
className: a,
|
|
12
|
+
...i,
|
|
13
|
+
children: t
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as PageLayout };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=PageLayout2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout2.js","names":[],"sources":["../../../src/components/PageLayout/PageLayout.tsx"],"sourcesContent":["/**\n * PageLayout Component\n *\n * Standardized layout wrapper for all pages in the application.\n * Provides consistent max-width, centering, and spacing.\n *\n * @example\n * // Standard page (900px max-width)\n * <PageLayout>\n * <PageHeader title=\"Models\" description=\"Manage your models\" />\n * <Content />\n * </PageLayout>\n *\n * @example\n * // Wide page (1400px max-width)\n * <PageLayout variant=\"wide\">\n * <PageHeader title=\"Dashboard\" description=\"Overview\" />\n * <Content />\n * </PageLayout>\n *\n * @example\n * // Full-width page (no max-width clamp). Useful for pages that own their\n * // own internal layout chrome (e.g. a left sidebar) and need to span the\n * // entire available viewport width without centering or right-side gutter.\n * // Note: the mobile padding fallback is also disabled on `--full` so the\n * // page's own internal padding controls horizontal spacing.\n * <PageLayout variant=\"full\">\n * <Content />\n * </PageLayout>\n */\n\nimport type { ReactNode, HTMLAttributes } from \"react\";\nimport \"./PageLayout.css\";\n\nexport type PageLayoutVariant = \"standard\" | \"wide\" | \"full\";\n\nexport interface PageLayoutProps extends HTMLAttributes<HTMLDivElement> {\n /** Page content */\n children: ReactNode;\n /** Layout width variant: \"standard\" (900px), \"wide\" (1400px), or \"full\" (no max-width) */\n variant?: PageLayoutVariant;\n /** Additional CSS class names */\n className?: string;\n}\n\nexport function PageLayout({\n children,\n variant = \"standard\",\n className = \"\",\n ...props\n}: PageLayoutProps) {\n const classes = [\"page-layout\", `page-layout--${variant}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={classes} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;AA6CA,SAAgB,EAAW,EACzB,aACA,aAAU,YACV,eAAY,IACZ,GAAG,KACe;CAClB,IAAM,IAAU;EAAC;EAAe,gBAAgB;EAAW;CAAS,CAAC,CAClE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAS,GAAI;EAC1B;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ProgressBarVariant = "primary" | "success" | "error" | "warning";
|
|
2
|
+
export type ProgressBarSize = "sm" | "md" | "lg";
|
|
3
|
+
export interface ProgressBarProps {
|
|
4
|
+
/** Progress value (0-100). Pass null for indeterminate state. */
|
|
5
|
+
value: number | null;
|
|
6
|
+
/** Color variant */
|
|
7
|
+
variant?: ProgressBarVariant;
|
|
8
|
+
/** Size of the progress bar */
|
|
9
|
+
size?: ProgressBarSize;
|
|
10
|
+
/** Whether to show percentage label */
|
|
11
|
+
showLabel?: boolean;
|
|
12
|
+
/** Custom label text (overrides percentage) */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Additional CSS class names */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Whether to animate the progress fill transition */
|
|
17
|
+
animated?: boolean;
|
|
18
|
+
/** Aria label for accessibility */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function ProgressBar({ value, variant, size, showLabel, label, className, animated, ariaLabel, }: ProgressBarProps): import("react").JSX.Element;
|
|
22
|
+
export default ProgressBar;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
4
|
+
function n({ value: n, variant: r = "primary", size: i = "md", showLabel: a = !1, label: o, className: s = "", animated: c = !0, ariaLabel: l }) {
|
|
5
|
+
let u = n === null, d = n === null ? 0 : Math.max(0, Math.min(100, n)), f = [
|
|
6
|
+
"progress-bar",
|
|
7
|
+
`progress-bar--${r}`,
|
|
8
|
+
`progress-bar--${i}`,
|
|
9
|
+
u ? "progress-bar--indeterminate" : "",
|
|
10
|
+
c ? "progress-bar--animated" : "",
|
|
11
|
+
s
|
|
12
|
+
].filter(Boolean).join(" "), p = o ?? (a && !u ? `${d.toFixed(0)}%` : null);
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
className: "progress-bar-wrapper",
|
|
15
|
+
children: [/* @__PURE__ */ e("div", {
|
|
16
|
+
className: f,
|
|
17
|
+
role: "progressbar",
|
|
18
|
+
"aria-valuenow": u ? void 0 : d,
|
|
19
|
+
"aria-valuemin": 0,
|
|
20
|
+
"aria-valuemax": 100,
|
|
21
|
+
"aria-label": l,
|
|
22
|
+
"aria-busy": u,
|
|
23
|
+
children: /* @__PURE__ */ e("div", {
|
|
24
|
+
className: "progress-bar__fill",
|
|
25
|
+
style: u ? void 0 : { width: `${String(d)}%` }
|
|
26
|
+
})
|
|
27
|
+
}), p && /* @__PURE__ */ e("span", {
|
|
28
|
+
className: "progress-bar__label",
|
|
29
|
+
children: p
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { n as ProgressBar, n as default };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ProgressBar2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar2.js","names":[],"sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["/**\n * ProgressBar Component\n *\n * A reusable progress bar component that supports both determinate and\n * indeterminate states, with multiple color variants and sizes.\n *\n * @example\n * ```tsx\n * // Determinate progress\n * <ProgressBar value={75} />\n *\n * // Indeterminate (loading state)\n * <ProgressBar value={null} />\n *\n * // With variant and label\n * <ProgressBar value={100} variant=\"success\" showLabel />\n * ```\n */\n\nimport \"./ProgressBar.css\";\n\nexport type ProgressBarVariant = \"primary\" | \"success\" | \"error\" | \"warning\";\nexport type ProgressBarSize = \"sm\" | \"md\" | \"lg\";\n\nexport interface ProgressBarProps {\n /** Progress value (0-100). Pass null for indeterminate state. */\n value: number | null;\n /** Color variant */\n variant?: ProgressBarVariant;\n /** Size of the progress bar */\n size?: ProgressBarSize;\n /** Whether to show percentage label */\n showLabel?: boolean;\n /** Custom label text (overrides percentage) */\n label?: string;\n /** Additional CSS class names */\n className?: string;\n /** Whether to animate the progress fill transition */\n animated?: boolean;\n /** Aria label for accessibility */\n ariaLabel?: string;\n}\n\nexport function ProgressBar({\n value,\n variant = \"primary\",\n size = \"md\",\n showLabel = false,\n label,\n className = \"\",\n animated = true,\n ariaLabel,\n}: ProgressBarProps) {\n const isIndeterminate = value === null;\n const clampedValue = value === null ? 0 : Math.max(0, Math.min(100, value));\n\n const containerClasses = [\n \"progress-bar\",\n `progress-bar--${variant}`,\n `progress-bar--${size}`,\n isIndeterminate ? \"progress-bar--indeterminate\" : \"\",\n animated ? \"progress-bar--animated\" : \"\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n const displayLabel =\n label ?? (showLabel && !isIndeterminate ? `${clampedValue.toFixed(0)}%` : null);\n\n return (\n <div className=\"progress-bar-wrapper\">\n <div\n className={containerClasses}\n role=\"progressbar\"\n aria-valuenow={isIndeterminate ? undefined : clampedValue}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={ariaLabel}\n aria-busy={isIndeterminate}\n >\n <div\n className=\"progress-bar__fill\"\n style={isIndeterminate ? undefined : { width: `${String(clampedValue)}%` }}\n />\n </div>\n {displayLabel && <span className=\"progress-bar__label\">{displayLabel}</span>}\n </div>\n );\n}\n\nexport default ProgressBar;\n"],"mappings":";;;AA2CA,SAAgB,EAAY,EAC1B,UACA,aAAU,WACV,UAAO,MACP,eAAY,IACZ,UACA,eAAY,IACZ,cAAW,IACX,gBACmB;CACnB,IAAM,IAAkB,MAAU,MAC5B,IAAe,MAAU,OAAO,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,CAAK,CAAC,GAEpE,IAAmB;EACvB;EACA,iBAAiB;EACjB,iBAAiB;EACjB,IAAkB,gCAAgC;EAClD,IAAW,2BAA2B;EACtC;CACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,GAEL,IACJ,MAAU,KAAa,CAAC,IAAkB,GAAG,EAAa,QAAQ,CAAC,EAAE,KAAK;CAE5E,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GACE,WAAW;GACX,MAAK;GACL,iBAAe,IAAkB,KAAA,IAAY;GAC7C,iBAAe;GACf,iBAAe;GACf,cAAY;GACZ,aAAW;GAEX,UAAA,kBAAC,OAAD;IACE,WAAU;IACV,OAAO,IAAkB,KAAA,IAAY,EAAE,OAAO,GAAG,OAAO,CAAY,EAAE,GAAG;GAC1E,CAAA;EACE,CAAA,GACJ,KAAgB,kBAAC,QAAD;GAAM,WAAU;GAAuB,UAAA;EAAmB,CAAA,CACxE;;AAET"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SkeletonProps {
|
|
2
|
+
/** Width of the skeleton (CSS value) */
|
|
3
|
+
width?: string;
|
|
4
|
+
/** Height of the skeleton (CSS value) */
|
|
5
|
+
height?: string;
|
|
6
|
+
/** Visual variant */
|
|
7
|
+
variant?: "rect" | "circle" | "text";
|
|
8
|
+
/** Additional CSS class names */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Test ID for testing */
|
|
11
|
+
testId?: string;
|
|
12
|
+
/** Accessible label announced while the skeleton is visible. Default: "Loading" */
|
|
13
|
+
loadingLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Skeleton provides a loading placeholder with shimmer animation.
|
|
17
|
+
*
|
|
18
|
+
* Features:
|
|
19
|
+
* - Shimmer effect using CSS animation
|
|
20
|
+
* - Reduced motion preference support
|
|
21
|
+
* - Multiple shape variants
|
|
22
|
+
* - Accessible via aria-busy and aria-label
|
|
23
|
+
*/
|
|
24
|
+
export declare function Skeleton({ width, height, variant, className, testId, loadingLabel, }: SkeletonProps): import("react").JSX.Element;
|
|
25
|
+
export default Skeleton;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Skeleton/Skeleton.tsx
|
|
4
|
+
function t({ width: t = "100%", height: n = "20px", variant: r = "rect", className: i = "", testId: a, loadingLabel: o = "Loading" }) {
|
|
5
|
+
let s = [
|
|
6
|
+
"skeleton",
|
|
7
|
+
`skeleton--${r}`,
|
|
8
|
+
i
|
|
9
|
+
].filter(Boolean).join(" ");
|
|
10
|
+
return /* @__PURE__ */ e("div", {
|
|
11
|
+
className: s,
|
|
12
|
+
style: {
|
|
13
|
+
width: t,
|
|
14
|
+
height: n
|
|
15
|
+
},
|
|
16
|
+
role: "status",
|
|
17
|
+
"aria-busy": "true",
|
|
18
|
+
"aria-label": o,
|
|
19
|
+
"data-testid": a,
|
|
20
|
+
children: /* @__PURE__ */ e("span", { className: "skeleton__shimmer" })
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { t as Skeleton, t as default };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Skeleton2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton2.js","names":[],"sources":["../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["/**\n * Skeleton Component\n *\n * Base skeleton component for loading states.\n * Provides a shimmer animation effect that respects prefers-reduced-motion.\n *\n * @example\n * // Basic usage\n * <Skeleton width=\"100%\" height=\"20px\" />\n *\n * @example\n * // Circle skeleton\n * <Skeleton width=\"40px\" height=\"40px\" variant=\"circle\" />\n */\n\nimport \"./Skeleton.css\";\n\nexport interface SkeletonProps {\n /** Width of the skeleton (CSS value) */\n width?: string;\n /** Height of the skeleton (CSS value) */\n height?: string;\n /** Visual variant */\n variant?: \"rect\" | \"circle\" | \"text\";\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n /** Accessible label announced while the skeleton is visible. Default: \"Loading\" */\n loadingLabel?: string;\n}\n\n/**\n * Skeleton provides a loading placeholder with shimmer animation.\n *\n * Features:\n * - Shimmer effect using CSS animation\n * - Reduced motion preference support\n * - Multiple shape variants\n * - Accessible via aria-busy and aria-label\n */\nexport function Skeleton({\n width = \"100%\",\n height = \"20px\",\n variant = \"rect\",\n className = \"\",\n testId,\n loadingLabel = \"Loading\",\n}: SkeletonProps) {\n const classNames = [\"skeleton\", `skeleton--${variant}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div\n className={classNames}\n style={{ width, height }}\n role=\"status\"\n aria-busy=\"true\"\n aria-label={loadingLabel}\n data-testid={testId}\n >\n <span className=\"skeleton__shimmer\" />\n </div>\n );\n}\n\nexport default Skeleton;\n"],"mappings":";;;AAyCA,SAAgB,EAAS,EACvB,WAAQ,QACR,YAAS,QACT,aAAU,QACV,eAAY,IACZ,WACA,kBAAe,aACC;CAChB,IAAM,IAAa;EAAC;EAAY,aAAa;EAAW;CAAS,CAAC,CAC/D,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EACE,WAAW;EACX,OAAO;GAAE;GAAO;EAAO;EACvB,MAAK;EACL,aAAU;EACV,cAAY;EACZ,eAAa;EAEb,UAAA,kBAAC,QAAD,EAAM,WAAU,oBAAqB,CAAA;CAClC,CAAA;AAET"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SkeletonCardProps {
|
|
2
|
+
/** Card size variant */
|
|
3
|
+
variant?: "default" | "compact" | "stat";
|
|
4
|
+
/** Additional CSS class names */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Test ID for testing */
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SkeletonCard provides a loading placeholder for card components.
|
|
11
|
+
*
|
|
12
|
+
* Variants:
|
|
13
|
+
* - default: Full card with header, content, and footer
|
|
14
|
+
* - compact: Smaller card with reduced padding
|
|
15
|
+
* - stat: Statistics card layout
|
|
16
|
+
*/
|
|
17
|
+
export declare function SkeletonCard({ variant, className, testId, }: SkeletonCardProps): import("react").JSX.Element;
|
|
18
|
+
export default SkeletonCard;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Skeleton as e } from "./Skeleton2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Skeleton/SkeletonCard.tsx
|
|
5
|
+
function i({ variant: i = "default", className: a = "", testId: o }) {
|
|
6
|
+
let s = [
|
|
7
|
+
"skeleton-card",
|
|
8
|
+
`skeleton-card--${i}`,
|
|
9
|
+
a
|
|
10
|
+
].filter(Boolean).join(" ");
|
|
11
|
+
return /* @__PURE__ */ n("div", {
|
|
12
|
+
className: s,
|
|
13
|
+
"data-testid": o,
|
|
14
|
+
role: "status",
|
|
15
|
+
"aria-busy": "true",
|
|
16
|
+
children: i === "stat" ? /* @__PURE__ */ n(t, { children: /* @__PURE__ */ r("div", {
|
|
17
|
+
className: "skeleton-card__header",
|
|
18
|
+
children: [/* @__PURE__ */ n(e, {
|
|
19
|
+
width: "48px",
|
|
20
|
+
height: "48px",
|
|
21
|
+
variant: "circle"
|
|
22
|
+
}), /* @__PURE__ */ r("div", {
|
|
23
|
+
className: "skeleton-card__header-text",
|
|
24
|
+
children: [/* @__PURE__ */ n(e, {
|
|
25
|
+
width: "60%",
|
|
26
|
+
height: "16px"
|
|
27
|
+
}), /* @__PURE__ */ n(e, {
|
|
28
|
+
width: "40%",
|
|
29
|
+
height: "24px"
|
|
30
|
+
})]
|
|
31
|
+
})]
|
|
32
|
+
}) }) : /* @__PURE__ */ r(t, { children: [
|
|
33
|
+
/* @__PURE__ */ n("div", {
|
|
34
|
+
className: "skeleton-card__header",
|
|
35
|
+
children: /* @__PURE__ */ n(e, {
|
|
36
|
+
width: "70%",
|
|
37
|
+
height: "20px"
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ r("div", {
|
|
41
|
+
className: "skeleton-card__content",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ n(e, {
|
|
44
|
+
width: "100%",
|
|
45
|
+
height: "16px"
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ n(e, {
|
|
48
|
+
width: "90%",
|
|
49
|
+
height: "16px"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ n(e, {
|
|
52
|
+
width: "80%",
|
|
53
|
+
height: "16px"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
i !== "compact" && /* @__PURE__ */ r("div", {
|
|
58
|
+
className: "skeleton-card__footer",
|
|
59
|
+
children: [/* @__PURE__ */ n(e, {
|
|
60
|
+
width: "80px",
|
|
61
|
+
height: "32px"
|
|
62
|
+
}), /* @__PURE__ */ n(e, {
|
|
63
|
+
width: "80px",
|
|
64
|
+
height: "32px"
|
|
65
|
+
})]
|
|
66
|
+
})
|
|
67
|
+
] })
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { i as SkeletonCard, i as default };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=SkeletonCard2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonCard2.js","names":[],"sources":["../../../src/components/Skeleton/SkeletonCard.tsx"],"sourcesContent":["/**\n * SkeletonCard Component\n *\n * Skeleton placeholder for card components (model cards, stat cards, etc.).\n * Mimics the structure of a typical card with header, content, and footer areas.\n *\n * @example\n * // Basic usage\n * <SkeletonCard />\n *\n * @example\n * // Compact variant\n * <SkeletonCard variant=\"compact\" />\n */\n\nimport { Skeleton } from \"./Skeleton\";\nimport \"./SkeletonCard.css\";\n\nexport interface SkeletonCardProps {\n /** Card size variant */\n variant?: \"default\" | \"compact\" | \"stat\";\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n}\n\n/**\n * SkeletonCard provides a loading placeholder for card components.\n *\n * Variants:\n * - default: Full card with header, content, and footer\n * - compact: Smaller card with reduced padding\n * - stat: Statistics card layout\n */\nexport function SkeletonCard({\n variant = \"default\",\n className = \"\",\n testId,\n}: SkeletonCardProps) {\n const classNames = [\"skeleton-card\", `skeleton-card--${variant}`, className]\n .filter(Boolean)\n .join(\" \");\n\n return (\n <div className={classNames} data-testid={testId} role=\"status\" aria-busy=\"true\">\n {variant === \"stat\" ? (\n <>\n <div className=\"skeleton-card__header\">\n <Skeleton width=\"48px\" height=\"48px\" variant=\"circle\" />\n <div className=\"skeleton-card__header-text\">\n <Skeleton width=\"60%\" height=\"16px\" />\n <Skeleton width=\"40%\" height=\"24px\" />\n </div>\n </div>\n </>\n ) : (\n <>\n <div className=\"skeleton-card__header\">\n <Skeleton width=\"70%\" height=\"20px\" />\n </div>\n <div className=\"skeleton-card__content\">\n <Skeleton width=\"100%\" height=\"16px\" />\n <Skeleton width=\"90%\" height=\"16px\" />\n <Skeleton width=\"80%\" height=\"16px\" />\n </div>\n {variant !== \"compact\" && (\n <div className=\"skeleton-card__footer\">\n <Skeleton width=\"80px\" height=\"32px\" />\n <Skeleton width=\"80px\" height=\"32px\" />\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n\nexport default SkeletonCard;\n"],"mappings":";;;;AAmCA,SAAgB,EAAa,EAC3B,aAAU,WACV,eAAY,IACZ,aACoB;CACpB,IAAM,IAAa;EAAC;EAAiB,kBAAkB;EAAW;CAAS,CAAC,CACzE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;CAEX,OACE,kBAAC,OAAD;EAAK,WAAW;EAAY,eAAa;EAAQ,MAAK;EAAS,aAAU;EACtE,UAAA,MAAY,SACX,kBAAA,GAAA,EAAA,UACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,GAAD;IAAU,OAAM;IAAO,QAAO;IAAO,SAAQ;GAAU,CAAA,GACvD,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,GAAD;KAAU,OAAM;KAAM,QAAO;IAAQ,CAAA,GACrC,kBAAC,GAAD;KAAU,OAAM;KAAM,QAAO;IAAQ,CAAA,CAClC;GACF,CAAA,CAAA;EACL,CAAA,EAAA,CAAA,IAEF,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,GAAD;KAAU,OAAM;KAAM,QAAO;IAAQ,CAAA;GAClC,CAAA;GACL,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,kBAAC,GAAD;MAAU,OAAM;MAAO,QAAO;KAAQ,CAAA;KACtC,kBAAC,GAAD;MAAU,OAAM;MAAM,QAAO;KAAQ,CAAA;KACrC,kBAAC,GAAD;MAAU,OAAM;MAAM,QAAO;KAAQ,CAAA;IAClC;;GACJ,MAAY,aACX,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,GAAD;KAAU,OAAM;KAAO,QAAO;IAAQ,CAAA,GACtC,kBAAC,GAAD;KAAU,OAAM;KAAO,QAAO;IAAQ,CAAA,CACnC;;EAEP,EAAA,CAAA;CAED,CAAA;AAET"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface SkeletonChartProps {
|
|
2
|
+
/** Chart type variant */
|
|
3
|
+
variant?: "bar" | "line" | "pie" | "area";
|
|
4
|
+
/** Chart height */
|
|
5
|
+
height?: string;
|
|
6
|
+
/** Additional CSS class names */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Test ID for testing */
|
|
9
|
+
testId?: string;
|
|
10
|
+
/** Accessible label announced while the chart is loading. Default: "Loading chart" */
|
|
11
|
+
loadingLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* SkeletonChart provides a loading placeholder for chart components.
|
|
15
|
+
*
|
|
16
|
+
* Variants:
|
|
17
|
+
* - bar: Vertical bars of varying heights
|
|
18
|
+
* - line: Line graph placeholder
|
|
19
|
+
* - pie: Circular chart placeholder
|
|
20
|
+
* - area: Area chart placeholder
|
|
21
|
+
*/
|
|
22
|
+
export declare function SkeletonChart({ variant, height, className, testId, loadingLabel, }: SkeletonChartProps): import("react").JSX.Element;
|
|
23
|
+
export default SkeletonChart;
|