@giddaa-housing/ui 1.1.0 → 2.0.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/css/generated/shared.css +1 -1
- package/css/giddaa.css +12 -2
- package/dist/badge.js +1 -1
- package/dist/bullet-chart.d.ts +8 -4
- package/dist/bullet-chart.js +10 -6
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/chart.d.ts +33 -5
- package/dist/chart.js +210 -13
- package/dist/checkbox.js +1 -1
- package/dist/data-table.d.ts +7 -3
- package/dist/data-table.js +8 -5
- package/dist/dialog-nesting.d.ts +9 -0
- package/dist/dialog-nesting.js +27 -0
- package/dist/dialog.js +9 -5
- package/dist/file-upload.d.ts +43 -0
- package/dist/file-upload.js +154 -0
- package/dist/funnel-chart.d.ts +11 -7
- package/dist/funnel-chart.js +11 -8
- package/dist/input-group.js +1 -1
- package/dist/input-otp.d.ts +23 -0
- package/dist/input-otp.js +56 -0
- package/dist/input.js +1 -1
- package/dist/line-chart.d.ts +113 -41
- package/dist/line-chart.js +217 -30
- package/dist/list-item.d.ts +22 -0
- package/dist/list-item.js +84 -0
- package/dist/number-input.js +20 -17
- package/dist/pie-chart.d.ts +83 -52
- package/dist/pie-chart.js +85 -43
- package/dist/purchase-option-card.d.ts +79 -0
- package/dist/purchase-option-card.js +176 -0
- package/dist/radio-group.js +1 -1
- package/dist/select.js +1 -1
- package/dist/sheet.d.ts +4 -2
- package/dist/sheet.js +22 -11
- package/dist/sparkline.d.ts +28 -15
- package/dist/sparkline.js +131 -37
- package/dist/styles.css +831 -119
- package/dist/switch.js +1 -1
- package/dist/table.js +6 -2
- package/dist/tabs.d.ts +21 -5
- package/dist/tabs.js +55 -12
- package/dist/textarea.js +1 -1
- package/dist/tree-map.d.ts +14 -14
- package/dist/tree-map.js +14 -15
- package/package.json +17 -1
package/dist/switch.js
CHANGED
|
@@ -5,7 +5,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
7
7
|
//#region src/switch.tsx
|
|
8
|
-
const switchVariants = cva("peer group/switch relative inline-flex shrink-0 items-center rounded-full border bg-clip-padding p-0.5 transition-[background-color,border-color,box-shadow,opacity] outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-
|
|
8
|
+
const switchVariants = cva("peer group/switch relative inline-flex shrink-0 items-center rounded-full border bg-clip-padding p-0.5 transition-[background-color,border-color,box-shadow,opacity] outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-line-danger/20 aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-danger)] data-checked:border-action-primary data-checked:bg-action-primary data-unchecked:border-line data-unchecked:bg-transparent data-[loading=true]:border-action-primary data-[loading=true]:bg-action-primary data-disabled:border-line-subtle! data-disabled:bg-transparent! data-disabled:cursor-not-allowed data-disabled:opacity-60 h-6 w-10 [--switch-spinner-size:0.75rem] [--switch-thumb-size:18px] [--switch-track-width:2.5rem] group-data-[size=sm]/field:h-5 group-data-[size=sm]/field:w-8 group-data-[size=sm]/field:[--switch-spinner-size:0.625rem] group-data-[size=sm]/field:[--switch-thumb-size:14px] group-data-[size=sm]/field:[--switch-track-width:2rem] group-data-[size=md]/field:h-6 group-data-[size=md]/field:w-10 group-data-[size=md]/field:[--switch-spinner-size:0.75rem] group-data-[size=md]/field:[--switch-thumb-size:18px] group-data-[size=md]/field:[--switch-track-width:2.5rem] group-data-[size=lg]/field:h-7 group-data-[size=lg]/field:w-12 group-data-[size=lg]/field:[--switch-spinner-size:0.875rem] group-data-[size=lg]/field:[--switch-thumb-size:22px] group-data-[size=lg]/field:[--switch-track-width:3rem]", { variants: { size: {
|
|
9
9
|
sm: "h-5 w-8 [--switch-spinner-size:0.625rem] [--switch-thumb-size:14px] [--switch-track-width:2rem]",
|
|
10
10
|
md: "h-6 w-10 [--switch-spinner-size:0.75rem] [--switch-thumb-size:18px] [--switch-track-width:2.5rem]",
|
|
11
11
|
lg: "h-7 w-12 [--switch-spinner-size:0.875rem] [--switch-thumb-size:22px] [--switch-track-width:3rem]"
|
package/dist/table.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/table.tsx
|
|
5
|
+
function getPinnedDividerClassName(pinnedSide) {
|
|
6
|
+
if (!pinnedSide) return;
|
|
7
|
+
return cn("after:pointer-events-none after:absolute after:inset-y-0 after:z-10 after:w-0.5 after:bg-line after:content-['']", pinnedSide === "left" && "after:right-0", pinnedSide === "right" && "after:left-0");
|
|
8
|
+
}
|
|
5
9
|
/**
|
|
6
10
|
* Outer card wrapper.
|
|
7
11
|
*
|
|
@@ -75,7 +79,7 @@ function TableRow({ className, ...props }) {
|
|
|
75
79
|
function TableHead({ className, pinnedSide, ...props }) {
|
|
76
80
|
return /* @__PURE__ */ jsx("th", {
|
|
77
81
|
"data-slot": "table-head",
|
|
78
|
-
className: cn("h-14 px-6 py-4 text-left align-middle bg-surface-raised", "text-gdt-sm font-semibold text-fg-secondary", "whitespace-nowrap has-[[role=checkbox]]:pr-0", pinnedSide
|
|
82
|
+
className: cn("relative h-14 px-6 py-4 text-left align-middle bg-surface-raised", "text-gdt-sm font-semibold text-fg-secondary", "whitespace-nowrap has-[[role=checkbox]]:pr-0", getPinnedDividerClassName(pinnedSide), className),
|
|
79
83
|
...props
|
|
80
84
|
});
|
|
81
85
|
}
|
|
@@ -91,7 +95,7 @@ function TableHead({ className, pinnedSide, ...props }) {
|
|
|
91
95
|
function TableCell({ className, pinned = false, pinnedSide, ...props }) {
|
|
92
96
|
return /* @__PURE__ */ jsx("td", {
|
|
93
97
|
"data-slot": "table-cell",
|
|
94
|
-
className: cn("h-14 px-6 py-4 align-middle text-gdt-sm text-fg-primary", "whitespace-nowrap", pinned && "bg-canvas transition-[background-color,filter] group-hover:bg-surface group-active:bg-surface-raised group-data-[state=selected]:bg-surface-brand-subtle group-data-[state=selected]:group-hover:bg-surface-brand-subtle group-data-[state=selected]:group-hover:brightness-95 group-data-[state=selected]:group-active:brightness-90", pinnedSide
|
|
98
|
+
className: cn("relative h-14 px-6 py-4 align-middle text-gdt-sm text-fg-primary", "whitespace-nowrap", pinned && "bg-canvas transition-[background-color,filter] group-hover:bg-surface group-active:bg-surface-raised group-data-[state=selected]:bg-surface-brand-subtle group-data-[state=selected]:group-hover:bg-surface-brand-subtle group-data-[state=selected]:group-hover:brightness-95 group-data-[state=selected]:group-active:brightness-90", getPinnedDividerClassName(pinnedSide), className),
|
|
95
99
|
...props
|
|
96
100
|
});
|
|
97
101
|
}
|
package/dist/tabs.d.ts
CHANGED
|
@@ -4,23 +4,39 @@ import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
|
4
4
|
//#region src/tabs.d.ts
|
|
5
5
|
type TabsListVariant = "default" | "line" | "secondary" | "underline";
|
|
6
6
|
declare function Tabs({ className, orientation, size, ...props }: Tabs$1.Root.Props & {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Pass `size` to `TabsList` instead — the root is
|
|
9
|
+
* orchestration-only and doesn't render the triggers it used to size.
|
|
10
|
+
* Forwarded through context for now; removed in the next major.
|
|
11
|
+
*/
|
|
7
12
|
size?: ComponentSize;
|
|
8
13
|
}): import("react").JSX.Element;
|
|
9
14
|
declare const tabsListVariants: (props?: ({
|
|
10
15
|
variant?: "secondary" | "underline" | null | undefined;
|
|
11
16
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
-
declare function TabsList({ className, variant, children, ...props }: Tabs$1.List.Props & {
|
|
17
|
+
declare function TabsList({ className, variant, size, children, ...props }: Tabs$1.List.Props & {
|
|
13
18
|
variant?: TabsListVariant;
|
|
19
|
+
size?: ComponentSize;
|
|
14
20
|
}): import("react").JSX.Element;
|
|
15
21
|
/**
|
|
16
22
|
* Trigger styling, exported so recipes (e.g. an overflow "More" button that
|
|
17
|
-
* isn't a real tab) can render the same look. Reads `variant`
|
|
18
|
-
*
|
|
19
|
-
*
|
|
23
|
+
* isn't a real tab) can render the same look. Reads both `variant` and `size`
|
|
24
|
+
* off the parent `group/tabs-list`, so it stays in sync wherever it lives
|
|
25
|
+
* inside a `Tabs` tree.
|
|
20
26
|
*/
|
|
21
27
|
declare const tabsTriggerClassName: string;
|
|
22
28
|
declare function TabsTrigger({ className, nativeButton, ...props }: Tabs$1.Tab.Props): import("react").JSX.Element;
|
|
23
|
-
|
|
29
|
+
type TabsCountProps = ComponentPropsWithoutRef<"span"> & {
|
|
30
|
+
/** Raw value to render. Takes precedence over `children` when provided. */
|
|
31
|
+
count?: number;
|
|
32
|
+
/** Shorten large values, e.g. `2200` → `2.2K`, `2_000_000` → `2M`. */
|
|
33
|
+
abbreviate?: boolean;
|
|
34
|
+
/** Cap the display, e.g. `max={99}` renders `100` as `99+`. */
|
|
35
|
+
max?: number;
|
|
36
|
+
/** Render a pulsing placeholder while the count is being fetched. */
|
|
37
|
+
loading?: boolean;
|
|
38
|
+
};
|
|
39
|
+
declare function TabsCount({ className, count, abbreviate, max, loading, children, ...props }: TabsCountProps): import("react").JSX.Element;
|
|
24
40
|
declare function TabsContent({ className, ...props }: Tabs$1.Panel.Props): import("react").JSX.Element;
|
|
25
41
|
//#endregion
|
|
26
42
|
export { Tabs, TabsContent, TabsCount, TabsList, TabsTrigger, tabsListVariants, tabsTriggerClassName };
|
package/dist/tabs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
-
import { useComponentSize } from "./size-context.js";
|
|
3
|
+
import { SizeProvider, useComponentSize } from "./size-context.js";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
@@ -13,14 +13,16 @@ function resolveTabsListVariant(variant) {
|
|
|
13
13
|
return variant === "default" ? "secondary" : variant === "line" ? "underline" : variant;
|
|
14
14
|
}
|
|
15
15
|
function Tabs({ className, orientation = "horizontal", size, ...props }) {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
16
|
+
const root = /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
18
17
|
"data-slot": "tabs",
|
|
19
18
|
"data-orientation": orientation,
|
|
20
|
-
"data-size": resolvedSize,
|
|
21
19
|
className: cn("group/tabs flex gap-3 data-[orientation=horizontal]:flex-col", className),
|
|
22
20
|
...props
|
|
23
21
|
});
|
|
22
|
+
return size ? /* @__PURE__ */ jsx(SizeProvider, {
|
|
23
|
+
size,
|
|
24
|
+
children: root
|
|
25
|
+
}) : root;
|
|
24
26
|
}
|
|
25
27
|
const tabsListVariants = cva(cn("group/tabs-list relative inline-flex w-fit shrink-0 items-center gap-1 text-fg-secondary", "group-data-[orientation=horizontal]/tabs:border-b group-data-[orientation=horizontal]/tabs:border-line-subtle", "group-data-[orientation=vertical]/tabs:flex-col group-data-[orientation=vertical]/tabs:border-l group-data-[orientation=vertical]/tabs:border-line-subtle"), {
|
|
26
28
|
variants: { variant: {
|
|
@@ -29,11 +31,13 @@ const tabsListVariants = cva(cn("group/tabs-list relative inline-flex w-fit shri
|
|
|
29
31
|
} },
|
|
30
32
|
defaultVariants: { variant: "underline" }
|
|
31
33
|
});
|
|
32
|
-
function TabsList({ className, variant = "underline", children, ...props }) {
|
|
34
|
+
function TabsList({ className, variant = "underline", size, children, ...props }) {
|
|
33
35
|
const resolvedVariant = resolveTabsListVariant(variant);
|
|
36
|
+
const resolvedSize = useComponentSize(size);
|
|
34
37
|
return /* @__PURE__ */ jsxs(Tabs$1.List, {
|
|
35
38
|
"data-slot": "tabs-list",
|
|
36
39
|
"data-variant": resolvedVariant,
|
|
40
|
+
"data-size": resolvedSize,
|
|
37
41
|
className: cn(tabsListVariants({ variant: resolvedVariant }), className),
|
|
38
42
|
...props,
|
|
39
43
|
children: [children, /* @__PURE__ */ jsx(Tabs$1.Indicator, { className: cn("pointer-events-none absolute left-0 top-0 z-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) translate-y-(--active-tab-top) transition-[transform,width,height] duration-200 ease-in-out", "group-data-[variant=secondary]/tabs-list:hidden", "group-data-[variant=underline]/tabs-list:rounded-none group-data-[variant=underline]/tabs-list:bg-line-focus group-data-[variant=underline]/tabs-list:shadow-none", "group-data-[orientation=horizontal]/tabs:group-data-[variant=underline]/tabs-list:top-auto group-data-[orientation=horizontal]/tabs:group-data-[variant=underline]/tabs-list:bottom-[-1px] group-data-[orientation=horizontal]/tabs:group-data-[variant=underline]/tabs-list:h-0.5! group-data-[orientation=horizontal]/tabs:group-data-[variant=underline]/tabs-list:translate-y-0", "group-data-[orientation=vertical]/tabs:group-data-[variant=underline]/tabs-list:left-auto group-data-[orientation=vertical]/tabs:group-data-[variant=underline]/tabs-list:right-[-1px] group-data-[orientation=vertical]/tabs:group-data-[variant=underline]/tabs-list:w-0.5! group-data-[orientation=vertical]/tabs:group-data-[variant=underline]/tabs-list:translate-x-0") })]
|
|
@@ -41,11 +45,11 @@ function TabsList({ className, variant = "underline", children, ...props }) {
|
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* Trigger styling, exported so recipes (e.g. an overflow "More" button that
|
|
44
|
-
* isn't a real tab) can render the same look. Reads `variant`
|
|
45
|
-
*
|
|
46
|
-
*
|
|
48
|
+
* isn't a real tab) can render the same look. Reads both `variant` and `size`
|
|
49
|
+
* off the parent `group/tabs-list`, so it stays in sync wherever it lives
|
|
50
|
+
* inside a `Tabs` tree.
|
|
47
51
|
*/
|
|
48
|
-
const tabsTriggerClassName = cn("group/tabs-trigger relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap border border-transparent font-semibold outline-none transition-[background-color,color,box-shadow]", "focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)]", "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50", "group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:text-current", "group-data-[size=sm]/tabs:
|
|
52
|
+
const tabsTriggerClassName = cn("group/tabs-trigger relative inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap border border-transparent font-semibold outline-none transition-[background-color,color,box-shadow]", "focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)]", "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50", "group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:text-current", "group-data-[size=sm]/tabs-list:text-gdt-xs group-data-[size=sm]/tabs-list:[&_svg:not([class*='size-'])]:size-3.5", "group-data-[size=md]/tabs-list:text-gdt-sm group-data-[size=md]/tabs-list:[&_svg:not([class*='size-'])]:size-4", "group-data-[size=lg]/tabs-list:text-gdt-md group-data-[size=lg]/tabs-list:[&_svg:not([class*='size-'])]:size-4.5", "group-data-[variant=underline]/tabs-list:group-data-[size=sm]/tabs-list:px-3 group-data-[variant=underline]/tabs-list:group-data-[size=sm]/tabs-list:py-1", "group-data-[variant=underline]/tabs-list:group-data-[size=md]/tabs-list:px-3.5 group-data-[variant=underline]/tabs-list:group-data-[size=md]/tabs-list:py-1.5", "group-data-[variant=underline]/tabs-list:group-data-[size=lg]/tabs-list:px-4 group-data-[variant=underline]/tabs-list:group-data-[size=lg]/tabs-list:py-1.5", "group-data-[variant=secondary]/tabs-list:group-data-[size=sm]/tabs-list:px-3 group-data-[variant=secondary]/tabs-list:group-data-[size=sm]/tabs-list:py-1", "group-data-[variant=secondary]/tabs-list:group-data-[size=md]/tabs-list:px-3.5 group-data-[variant=secondary]/tabs-list:group-data-[size=md]/tabs-list:py-1.5", "group-data-[variant=secondary]/tabs-list:group-data-[size=lg]/tabs-list:px-4 group-data-[variant=secondary]/tabs-list:group-data-[size=lg]/tabs-list:py-2", "group-data-[variant=underline]/tabs-list:-mb-px group-data-[variant=underline]/tabs-list:rounded-none group-data-[variant=underline]/tabs-list:text-fg-secondary group-data-[variant=underline]/tabs-list:hover:text-fg-primary group-data-[variant=underline]/tabs-list:data-active:text-fg-primary", "group-data-[variant=secondary]/tabs-list:rounded-4xl group-data-[variant=secondary]/tabs-list:bg-surface-raised group-data-[variant=secondary]/tabs-list:text-fg-secondary group-data-[variant=secondary]/tabs-list:hover:bg-surface group-data-[variant=secondary]/tabs-list:hover:text-fg-primary group-data-[variant=secondary]/tabs-list:data-active:bg-surface-brand group-data-[variant=secondary]/tabs-list:data-active:text-fg-on-brand group-data-[variant=secondary]/tabs-list:data-active:shadow-(--elevation-e1-shadow) group-data-[variant=secondary]/tabs-list:data-active:hover:bg-surface-brand group-data-[variant=secondary]/tabs-list:data-active:hover:text-fg-on-brand");
|
|
49
53
|
function TabsTrigger({ className, nativeButton = true, ...props }) {
|
|
50
54
|
return /* @__PURE__ */ jsx(Tabs$1.Tab, {
|
|
51
55
|
"data-slot": "tabs-trigger",
|
|
@@ -54,11 +58,50 @@ function TabsTrigger({ className, nativeButton = true, ...props }) {
|
|
|
54
58
|
...props
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Compact a raw number into a short chip label — 2200 → "2.2K", 2_000_000 →
|
|
63
|
+
* "2M". Keeps one decimal place and trims a trailing `.0`.
|
|
64
|
+
*/
|
|
65
|
+
function abbreviateCount(value) {
|
|
66
|
+
const abs = Math.abs(value);
|
|
67
|
+
if (abs < 1e3) return String(value);
|
|
68
|
+
const unit = [
|
|
69
|
+
{
|
|
70
|
+
value: 1e9,
|
|
71
|
+
suffix: "B"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: 1e6,
|
|
75
|
+
suffix: "M"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 1e3,
|
|
79
|
+
suffix: "K"
|
|
80
|
+
}
|
|
81
|
+
].find((candidate) => abs >= candidate.value);
|
|
82
|
+
if (!unit) return String(value);
|
|
83
|
+
return `${Math.round(value / unit.value * 10) / 10}${unit.suffix}`;
|
|
84
|
+
}
|
|
85
|
+
function formatTabsCount(value, { abbreviate, max }) {
|
|
86
|
+
if (max !== void 0 && value > max) return `${abbreviate ? abbreviateCount(max) : max}+`;
|
|
87
|
+
return abbreviate ? abbreviateCount(value) : String(value);
|
|
88
|
+
}
|
|
89
|
+
function TabsCount({ className, count, abbreviate, max, loading, children, ...props }) {
|
|
90
|
+
const content = loading ? /* @__PURE__ */ jsx("span", {
|
|
91
|
+
"aria-hidden": true,
|
|
92
|
+
className: "invisible",
|
|
93
|
+
children: "00"
|
|
94
|
+
}) : count !== void 0 ? formatTabsCount(count, {
|
|
95
|
+
abbreviate,
|
|
96
|
+
max
|
|
97
|
+
}) : children;
|
|
58
98
|
return /* @__PURE__ */ jsx("span", {
|
|
59
99
|
"data-slot": "tabs-count",
|
|
60
|
-
|
|
61
|
-
|
|
100
|
+
"data-loading": loading || void 0,
|
|
101
|
+
"aria-busy": loading || void 0,
|
|
102
|
+
className: cn("inline-flex items-center justify-center rounded-full font-semibold leading-none transition-[background-color,color]", "group-data-[size=sm]/tabs-list:h-4 group-data-[size=sm]/tabs-list:min-w-4 group-data-[size=sm]/tabs-list:px-1 group-data-[size=sm]/tabs-list:text-[10px]", "group-data-[size=md]/tabs-list:h-5 group-data-[size=md]/tabs-list:min-w-5 group-data-[size=md]/tabs-list:px-1 group-data-[size=md]/tabs-list:text-[11px]", "group-data-[size=lg]/tabs-list:h-5 group-data-[size=lg]/tabs-list:min-w-5 group-data-[size=lg]/tabs-list:px-1.5 group-data-[size=lg]/tabs-list:text-gdt-xs", "group-data-[variant=underline]/tabs-list:bg-surface-raised group-data-[variant=underline]/tabs-list:text-fg-secondary group-data-[variant=underline]/tabs-list:group-data-[active]/tabs-trigger:bg-surface-brand-subtle group-data-[variant=underline]/tabs-list:group-data-[active]/tabs-trigger:text-fg-brand", "group-data-[variant=secondary]/tabs-list:bg-surface-overlay group-data-[variant=secondary]/tabs-list:text-fg-secondary group-data-[variant=secondary]/tabs-list:group-data-[active]/tabs-trigger:bg-surface-brand-subtle group-data-[variant=secondary]/tabs-list:group-data-[active]/tabs-trigger:text-fg-brand", "data-loading:animate-pulse", className),
|
|
103
|
+
...props,
|
|
104
|
+
children: content
|
|
62
105
|
});
|
|
63
106
|
}
|
|
64
107
|
function TabsContent({ className, ...props }) {
|
package/dist/textarea.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useComponentSize } from "./size-context.js";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
//#region src/textarea.tsx
|
|
6
|
-
const textareaVariants = cva("flex field-sizing-content w-full min-w-0 resize-y rounded-xl border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none placeholder:text-fg-caption-placeholder hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder disabled:placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none", {
|
|
6
|
+
const textareaVariants = cva("flex field-sizing-content w-full min-w-0 resize-y rounded-xl border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none placeholder:text-fg-caption-placeholder hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder disabled:placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none aria-invalid:focus-visible:border-line-danger aria-invalid:focus-visible:inset-ring-line-danger", {
|
|
7
7
|
variants: { size: {
|
|
8
8
|
sm: "min-h-22 px-3 py-2 text-gdt-xs",
|
|
9
9
|
md: "min-h-26 px-3.5 py-2.5 text-gdt-sm",
|
package/dist/tree-map.d.ts
CHANGED
|
@@ -63,26 +63,26 @@ type TreeMapDatum = {
|
|
|
63
63
|
children?: TreeMapDatum[];
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
|
-
* Tile palette, ordered by share
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* Tile palette, ordered by share. A tile's area already encodes magnitude and
|
|
67
|
+
* every tile is directly labelled, so the fill carries category *identity* — the
|
|
68
|
+
* three validated categorical `chart-1`…`chart-3` tokens, then a neutral "Other"
|
|
69
|
+
* bucket for the fourth+ category (the brand has three validated categorical
|
|
70
|
+
* slots; see `styles/giddaa.css`). Each entry pairs a `fill` with the `text`
|
|
71
|
+
* colour that reads on it in both themes. Assign by order, or override per datum
|
|
72
|
+
* with `fill`.
|
|
70
73
|
*/
|
|
71
74
|
declare const TREE_MAP_PALETTE: readonly [{
|
|
72
|
-
readonly fill: "var(--color-
|
|
73
|
-
readonly text: "var(--color-forest-
|
|
75
|
+
readonly fill: "var(--color-chart-1)";
|
|
76
|
+
readonly text: "var(--color-forest-50)";
|
|
74
77
|
}, {
|
|
75
|
-
readonly fill: "var(--color-
|
|
78
|
+
readonly fill: "var(--color-chart-2)";
|
|
76
79
|
readonly text: "var(--color-brass-900)";
|
|
77
80
|
}, {
|
|
78
|
-
readonly fill: "var(--color-
|
|
79
|
-
readonly text: "var(--color-
|
|
81
|
+
readonly fill: "var(--color-chart-3)";
|
|
82
|
+
readonly text: "var(--color-clay-900)";
|
|
80
83
|
}, {
|
|
81
|
-
readonly fill: "var(--color-
|
|
82
|
-
readonly text: "var(--color-
|
|
83
|
-
}, {
|
|
84
|
-
readonly fill: "var(--color-stone-500)";
|
|
85
|
-
readonly text: "var(--color-stone-50)";
|
|
84
|
+
readonly fill: "var(--color-action-tertiary)";
|
|
85
|
+
readonly text: "var(--color-fg-primary)";
|
|
86
86
|
}];
|
|
87
87
|
type TreeMapLayout = {
|
|
88
88
|
/** Plot box height in px. Width stays fluid via the ResponsiveContainer. */
|
package/dist/tree-map.js
CHANGED
|
@@ -7,31 +7,30 @@ import { cva } from "class-variance-authority";
|
|
|
7
7
|
import { Treemap } from "recharts";
|
|
8
8
|
//#region src/tree-map.tsx
|
|
9
9
|
/**
|
|
10
|
-
* Tile palette, ordered by share
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Tile palette, ordered by share. A tile's area already encodes magnitude and
|
|
11
|
+
* every tile is directly labelled, so the fill carries category *identity* — the
|
|
12
|
+
* three validated categorical `chart-1`…`chart-3` tokens, then a neutral "Other"
|
|
13
|
+
* bucket for the fourth+ category (the brand has three validated categorical
|
|
14
|
+
* slots; see `styles/giddaa.css`). Each entry pairs a `fill` with the `text`
|
|
15
|
+
* colour that reads on it in both themes. Assign by order, or override per datum
|
|
16
|
+
* with `fill`.
|
|
14
17
|
*/
|
|
15
18
|
const TREE_MAP_PALETTE = [
|
|
16
19
|
{
|
|
17
|
-
fill: "var(--color-
|
|
18
|
-
text: "var(--color-forest-
|
|
20
|
+
fill: "var(--color-chart-1)",
|
|
21
|
+
text: "var(--color-forest-50)"
|
|
19
22
|
},
|
|
20
23
|
{
|
|
21
|
-
fill: "var(--color-
|
|
24
|
+
fill: "var(--color-chart-2)",
|
|
22
25
|
text: "var(--color-brass-900)"
|
|
23
26
|
},
|
|
24
27
|
{
|
|
25
|
-
fill: "var(--color-
|
|
26
|
-
text: "var(--color-
|
|
28
|
+
fill: "var(--color-chart-3)",
|
|
29
|
+
text: "var(--color-clay-900)"
|
|
27
30
|
},
|
|
28
31
|
{
|
|
29
|
-
fill: "var(--color-
|
|
30
|
-
text: "var(--color-
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
fill: "var(--color-stone-500)",
|
|
34
|
-
text: "var(--color-stone-50)"
|
|
32
|
+
fill: "var(--color-action-tertiary)",
|
|
33
|
+
text: "var(--color-fg-primary)"
|
|
35
34
|
}
|
|
36
35
|
];
|
|
37
36
|
const TREE_MAP_LAYOUT = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giddaa-housing/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Giddaa reusable UI component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -137,6 +137,10 @@
|
|
|
137
137
|
"types": "./dist/filter.d.ts",
|
|
138
138
|
"import": "./dist/filter.js"
|
|
139
139
|
},
|
|
140
|
+
"./file-upload": {
|
|
141
|
+
"types": "./dist/file-upload.d.ts",
|
|
142
|
+
"import": "./dist/file-upload.js"
|
|
143
|
+
},
|
|
140
144
|
"./footer": {
|
|
141
145
|
"types": "./dist/footer.d.ts",
|
|
142
146
|
"import": "./dist/footer.js"
|
|
@@ -165,6 +169,10 @@
|
|
|
165
169
|
"types": "./dist/input-group.d.ts",
|
|
166
170
|
"import": "./dist/input-group.js"
|
|
167
171
|
},
|
|
172
|
+
"./input-otp": {
|
|
173
|
+
"types": "./dist/input-otp.d.ts",
|
|
174
|
+
"import": "./dist/input-otp.js"
|
|
175
|
+
},
|
|
168
176
|
"./input-size-context": {
|
|
169
177
|
"types": "./dist/input-size-context.d.ts",
|
|
170
178
|
"import": "./dist/input-size-context.js"
|
|
@@ -185,6 +193,10 @@
|
|
|
185
193
|
"types": "./dist/line-chart.d.ts",
|
|
186
194
|
"import": "./dist/line-chart.js"
|
|
187
195
|
},
|
|
196
|
+
"./list-item": {
|
|
197
|
+
"types": "./dist/list-item.d.ts",
|
|
198
|
+
"import": "./dist/list-item.js"
|
|
199
|
+
},
|
|
188
200
|
"./match": {
|
|
189
201
|
"types": "./dist/match.d.ts",
|
|
190
202
|
"import": "./dist/match.js"
|
|
@@ -249,6 +261,10 @@
|
|
|
249
261
|
"types": "./dist/property-listing-card.d.ts",
|
|
250
262
|
"import": "./dist/property-listing-card.js"
|
|
251
263
|
},
|
|
264
|
+
"./purchase-option-card": {
|
|
265
|
+
"types": "./dist/purchase-option-card.d.ts",
|
|
266
|
+
"import": "./dist/purchase-option-card.js"
|
|
267
|
+
},
|
|
252
268
|
"./radar-chart": {
|
|
253
269
|
"types": "./dist/radar-chart.d.ts",
|
|
254
270
|
"import": "./dist/radar-chart.js"
|