@yuva-devlab/ui 2.1.0 → 2.2.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.
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @file legal-footer.css
3
+ * @description Scoped styles for the LegalFooter component.
4
+ * Governed by semantic design tokens and W3C Cascade Layers.
5
+ */
6
+
7
+ .dl-legal-footer {
8
+ box-sizing: border-box;
9
+ color: var(--muted-foreground);
10
+ font-family: inherit;
11
+ }
12
+
13
+ .dl-legal-footer--login {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ justify-content: center;
18
+ gap: 0.375rem;
19
+ width: 100%;
20
+ padding-top: 1rem;
21
+ padding-bottom: 1rem;
22
+ text-align: center;
23
+ font-size: 0.75rem;
24
+ line-height: 1rem;
25
+ }
26
+
27
+ .dl-legal-footer__links {
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ flex-wrap: wrap;
32
+ gap: 0.75rem;
33
+ font-size: 0.75rem;
34
+ color: var(--muted-foreground);
35
+ }
36
+
37
+ .dl-legal-footer__app-name {
38
+ font-weight: 500;
39
+ color: var(--foreground);
40
+ }
41
+
42
+ .dl-legal-footer__divider {
43
+ opacity: 0.4;
44
+ user-select: none;
45
+ }
46
+
47
+ .dl-legal-footer__link {
48
+ color: var(--muted-foreground);
49
+ text-decoration: none;
50
+ transition: color 0.15s ease-in-out;
51
+ }
52
+
53
+ .dl-legal-footer__link:hover {
54
+ color: var(--foreground);
55
+ }
56
+
57
+ .dl-legal-footer__copyright {
58
+ margin: 0;
59
+ font-size: 0.6875rem;
60
+ opacity: 0.75;
61
+ }
62
+
63
+ .dl-legal-footer--sidebar {
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: space-between;
67
+ width: 100%;
68
+ padding: 0.5rem 0.75rem;
69
+ font-size: 0.6875rem;
70
+ border-top: 1px solid color-mix(in oklab, var(--border) 40%, transparent);
71
+ color: var(--muted-foreground);
72
+ opacity: 0.8;
73
+ }
74
+
75
+ .dl-legal-footer--settings {
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: 0.25rem;
79
+ width: 100%;
80
+ font-size: 0.75rem;
81
+ }
82
+
83
+ .dl-legal-footer__meta-row {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: space-between;
87
+ font-weight: 500;
88
+ color: var(--foreground);
89
+ }
90
+
91
+ .dl-legal-footer__version-badge {
92
+ font-family: monospace;
93
+ font-size: 0.6875rem;
94
+ color: var(--muted-foreground);
95
+ background-color: color-mix(in oklab, var(--muted) 50%, transparent);
96
+ padding: 0.125rem 0.375rem;
97
+ border-radius: var(--radius-sm, 0.25rem);
98
+ }
@@ -0,0 +1,38 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as LegalFooterStories from "./legal-footer.stories";
3
+
4
+ <Meta of={LegalFooterStories} />
5
+
6
+ <Title />
7
+
8
+ # Legal Footer
9
+
10
+ Universal enterprise legal, copyright, and compliance footer. Dynamically adopts host application themes, OKLCH tokens, and dark mode palettes.
11
+
12
+ ## Login Screen Variant
13
+
14
+ Standard centered legal footer for authentication, single sign-on (SSO), and public landing views.
15
+
16
+ <Canvas of={LegalFooterStories.DefaultLogin} />
17
+
18
+ ## FinAI Branded Login
19
+
20
+ Shows host application name prefixing the legal navigation links.
21
+
22
+ <Canvas of={LegalFooterStories.FinAILogin} />
23
+
24
+ ## Sidebar Navigation Variant
25
+
26
+ Compact single-row footer designed for docking at the base of primary left-hand navigation rails.
27
+
28
+ <Canvas of={LegalFooterStories.SidebarVariant} />
29
+
30
+ ## Settings / About Platform Variant
31
+
32
+ Summary block suitable for Settings dialogs, About modals, and system telemetry drawers.
33
+
34
+ <Canvas of={LegalFooterStories.SettingsVariant} />
35
+
36
+ ## Component Properties
37
+
38
+ <Controls />
@@ -2570,6 +2570,106 @@
2570
2570
  margin-inline-start: 0.25rem;
2571
2571
  }
2572
2572
 
2573
+ /* ── legal-footer/legal-footer.css ── */
2574
+ /**
2575
+ * @file legal-footer.css
2576
+ * @description Scoped styles for the LegalFooter component.
2577
+ * Governed by semantic design tokens and W3C Cascade Layers.
2578
+ */
2579
+
2580
+ .dl-legal-footer {
2581
+ box-sizing: border-box;
2582
+ color: var(--muted-foreground);
2583
+ font-family: inherit;
2584
+ }
2585
+
2586
+ .dl-legal-footer--login {
2587
+ display: flex;
2588
+ flex-direction: column;
2589
+ align-items: center;
2590
+ justify-content: center;
2591
+ gap: 0.375rem;
2592
+ width: 100%;
2593
+ padding-top: 1rem;
2594
+ padding-bottom: 1rem;
2595
+ text-align: center;
2596
+ font-size: 0.75rem;
2597
+ line-height: 1rem;
2598
+ }
2599
+
2600
+ .dl-legal-footer__links {
2601
+ display: flex;
2602
+ align-items: center;
2603
+ justify-content: center;
2604
+ flex-wrap: wrap;
2605
+ gap: 0.75rem;
2606
+ font-size: 0.75rem;
2607
+ color: var(--muted-foreground);
2608
+ }
2609
+
2610
+ .dl-legal-footer__app-name {
2611
+ font-weight: 500;
2612
+ color: var(--foreground);
2613
+ }
2614
+
2615
+ .dl-legal-footer__divider {
2616
+ opacity: 0.4;
2617
+ user-select: none;
2618
+ }
2619
+
2620
+ .dl-legal-footer__link {
2621
+ color: var(--muted-foreground);
2622
+ text-decoration: none;
2623
+ transition: color 0.15s ease-in-out;
2624
+ }
2625
+
2626
+ .dl-legal-footer__link:hover {
2627
+ color: var(--foreground);
2628
+ }
2629
+
2630
+ .dl-legal-footer__copyright {
2631
+ margin: 0;
2632
+ font-size: 0.6875rem;
2633
+ opacity: 0.75;
2634
+ }
2635
+
2636
+ .dl-legal-footer--sidebar {
2637
+ display: flex;
2638
+ align-items: center;
2639
+ justify-content: space-between;
2640
+ width: 100%;
2641
+ padding: 0.5rem 0.75rem;
2642
+ font-size: 0.6875rem;
2643
+ border-top: 1px solid color-mix(in oklab, var(--border) 40%, transparent);
2644
+ color: var(--muted-foreground);
2645
+ opacity: 0.8;
2646
+ }
2647
+
2648
+ .dl-legal-footer--settings {
2649
+ display: flex;
2650
+ flex-direction: column;
2651
+ gap: 0.25rem;
2652
+ width: 100%;
2653
+ font-size: 0.75rem;
2654
+ }
2655
+
2656
+ .dl-legal-footer__meta-row {
2657
+ display: flex;
2658
+ align-items: center;
2659
+ justify-content: space-between;
2660
+ font-weight: 500;
2661
+ color: var(--foreground);
2662
+ }
2663
+
2664
+ .dl-legal-footer__version-badge {
2665
+ font-family: monospace;
2666
+ font-size: 0.6875rem;
2667
+ color: var(--muted-foreground);
2668
+ background-color: color-mix(in oklab, var(--muted) 50%, transparent);
2669
+ padding: 0.125rem 0.375rem;
2670
+ border-radius: var(--radius-sm, 0.25rem);
2671
+ }
2672
+
2573
2673
  /* ── loading-state/loading-state.css ── */
2574
2674
  .dl-loading {
2575
2675
  display: flex;
package/dist/index.cjs CHANGED
@@ -197,6 +197,7 @@ __export(index_exports, {
197
197
  Kbd: () => Kbd,
198
198
  KbdGroup: () => KbdGroup,
199
199
  Label: () => Label3,
200
+ LegalFooter: () => LegalFooter,
200
201
  LoadingState: () => LoadingState,
201
202
  Menubar: () => Menubar,
202
203
  MenubarCheckboxItem: () => MenubarCheckboxItem,
@@ -6894,6 +6895,95 @@ var Container = React94.forwardRef(
6894
6895
  }
6895
6896
  );
6896
6897
  Container.displayName = "Container";
6898
+
6899
+ // src/components/legal-footer/legal-footer.tsx
6900
+ var React95 = __toESM(require("react"), 1);
6901
+ var import_jsx_runtime101 = require("react/jsx-runtime");
6902
+ var LegalFooter = React95.forwardRef(
6903
+ ({
6904
+ appName,
6905
+ version,
6906
+ companyName = "Yuva Devlab",
6907
+ variant = "login",
6908
+ showLinks = true,
6909
+ termsHref = "#",
6910
+ privacyHref = "#",
6911
+ securityHref = "#",
6912
+ className,
6913
+ ...props
6914
+ }, ref) => {
6915
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6916
+ if (variant === "sidebar") {
6917
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6918
+ "div",
6919
+ {
6920
+ ref,
6921
+ className: cn("dl-legal-footer dl-legal-footer--sidebar", className),
6922
+ ...props,
6923
+ children: [
6924
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { children: appName ? `${appName} ${version ?? ""}`.trim() : version ?? "v1.0.0" }),
6925
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("span", { children: [
6926
+ "\xA9 ",
6927
+ currentYear,
6928
+ " ",
6929
+ companyName
6930
+ ] })
6931
+ ]
6932
+ }
6933
+ );
6934
+ }
6935
+ if (variant === "settings") {
6936
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6937
+ "div",
6938
+ {
6939
+ ref,
6940
+ className: cn("dl-legal-footer dl-legal-footer--settings", className),
6941
+ ...props,
6942
+ children: [
6943
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "dl-legal-footer__meta-row", children: [
6944
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { children: appName ?? companyName }),
6945
+ version && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "dl-legal-footer__version-badge", children: version })
6946
+ ] }),
6947
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("p", { className: "dl-legal-footer__copyright", children: [
6948
+ "\xA9 ",
6949
+ currentYear,
6950
+ " ",
6951
+ companyName,
6952
+ ". All rights reserved."
6953
+ ] })
6954
+ ]
6955
+ }
6956
+ );
6957
+ }
6958
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
6959
+ "footer",
6960
+ {
6961
+ ref,
6962
+ className: cn("dl-legal-footer dl-legal-footer--login", className),
6963
+ ...props,
6964
+ children: [
6965
+ showLinks && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("nav", { "aria-label": "Legal navigation", className: "dl-legal-footer__links", children: [
6966
+ appName && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "dl-legal-footer__app-name", children: appName }),
6967
+ appName && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "dl-legal-footer__divider", "aria-hidden": "true", children: "\u2022" }),
6968
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("a", { href: privacyHref, className: "dl-legal-footer__link", children: "Privacy" }),
6969
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "dl-legal-footer__divider", "aria-hidden": "true", children: "\u2022" }),
6970
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("a", { href: termsHref, className: "dl-legal-footer__link", children: "Terms" }),
6971
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "dl-legal-footer__divider", "aria-hidden": "true", children: "\u2022" }),
6972
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("a", { href: securityHref, className: "dl-legal-footer__link", children: "Security" })
6973
+ ] }),
6974
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("p", { className: "dl-legal-footer__copyright", children: [
6975
+ "\xA9 ",
6976
+ currentYear,
6977
+ " ",
6978
+ companyName,
6979
+ ". All rights reserved."
6980
+ ] })
6981
+ ]
6982
+ }
6983
+ );
6984
+ }
6985
+ );
6986
+ LegalFooter.displayName = "LegalFooter";
6897
6987
  // Annotate the CommonJS export names for ESM import in node:
6898
6988
  0 && (module.exports = {
6899
6989
  Accordion,
@@ -7062,6 +7152,7 @@ Container.displayName = "Container";
7062
7152
  Kbd,
7063
7153
  KbdGroup,
7064
7154
  Label,
7155
+ LegalFooter,
7065
7156
  LoadingState,
7066
7157
  Menubar,
7067
7158
  MenubarCheckboxItem,