@giddaa-housing/ui 3.0.0 → 3.1.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 +162 -0
- package/css/preset.css +8 -1
- package/dist/activity-timeline.js +3 -3
- package/dist/auth-layout.js +18 -18
- package/dist/badge.js +1 -0
- package/dist/bar-chart.d.ts +1 -1
- package/dist/breadcrumb.js +1 -0
- package/dist/bullet-chart.d.ts +1 -1
- package/dist/button-group.d.ts +1 -1
- package/dist/button-group.js +1 -0
- package/dist/button.js +1 -0
- package/dist/card.js +1 -0
- package/dist/carousel.d.ts +1 -1
- package/dist/chart.d.ts +1 -1
- package/dist/combobox.d.ts +1 -1
- package/dist/cta.js +1 -0
- package/dist/details-card.js +1 -0
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/editorial-card.js +1 -0
- package/dist/footer.d.ts +4 -2
- package/dist/footer.js +39 -34
- package/dist/funnel-chart.d.ts +1 -1
- package/dist/heatmap-chart.d.ts +1 -1
- package/dist/input-group.js +4 -5
- package/dist/input-size-context.js +4 -2
- package/dist/input.js +2 -1
- package/dist/item.js +1 -0
- package/dist/kpi-card.js +1 -0
- package/dist/line-chart.d.ts +1 -1
- package/dist/mask-input.d.ts +61 -0
- package/dist/mask-input.js +0 -0
- package/dist/mobile-sidebar.d.ts +57 -0
- package/dist/mobile-sidebar.js +196 -0
- package/dist/number-input.d.ts +1 -1
- package/dist/number-input.js +1 -0
- package/dist/password-input.js +1 -0
- package/dist/phone-input.d.ts +1 -1
- package/dist/pie-chart.d.ts +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/property-listing-card.js +1 -0
- package/dist/purchase-option-card.js +1 -0
- package/dist/radar-chart.d.ts +1 -1
- package/dist/review-block.js +1 -0
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/search-input.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/{size-context-D4mYvcg8.d.ts → size-context-BX6kAdVj.d.ts} +2 -1
- package/dist/size-context.d.ts +2 -2
- package/dist/size-context.js +5 -2
- package/dist/sparkline.d.ts +1 -1
- package/dist/stepper.js +1 -0
- package/dist/styles.css +505 -111
- package/dist/table-card.js +1 -0
- package/dist/table.js +2 -2
- package/dist/tabs.d.ts +1 -1
- package/dist/tag.d.ts +1 -1
- package/dist/testimonial-block.js +1 -0
- package/dist/textarea.js +1 -0
- package/dist/top-navbar.d.ts +100 -0
- package/dist/top-navbar.js +295 -0
- package/dist/tree-map.d.ts +1 -1
- package/dist/waterfall-chart.d.ts +1 -1
- package/package.json +13 -1
package/dist/footer.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
2
|
-
import {
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import { Input } from "./input.js";
|
|
5
|
+
import { ChevronRight } from "lucide-react";
|
|
3
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
7
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
8
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -11,7 +14,7 @@ function FooterRoot({ className, containerClassName, children, ...props }) {
|
|
|
11
14
|
...props,
|
|
12
15
|
children: /* @__PURE__ */ jsx("div", {
|
|
13
16
|
"data-slot": "footer-container",
|
|
14
|
-
className: cn("
|
|
17
|
+
className: cn("flex w-full flex-col", containerClassName),
|
|
15
18
|
children
|
|
16
19
|
})
|
|
17
20
|
});
|
|
@@ -19,70 +22,70 @@ function FooterRoot({ className, containerClassName, children, ...props }) {
|
|
|
19
22
|
function FooterCta({ className, ...props }) {
|
|
20
23
|
return /* @__PURE__ */ jsx("section", {
|
|
21
24
|
"data-slot": "footer-cta",
|
|
22
|
-
className: cn("grid gap-
|
|
25
|
+
className: cn("grid gap-5 bg-surface-brand px-5 py-gdt-3xl text-fg-on-brand md:px-gdt-6xl md:py-gdt-5xl xl:grid-cols-[minmax(0,1fr)_auto] xl:items-center", className),
|
|
23
26
|
...props
|
|
24
27
|
});
|
|
25
28
|
}
|
|
26
29
|
function FooterCtaContent({ className, ...props }) {
|
|
27
30
|
return /* @__PURE__ */ jsx("div", {
|
|
28
31
|
"data-slot": "footer-cta-content",
|
|
29
|
-
className: cn("flex max-w-
|
|
32
|
+
className: cn("flex max-w-140 flex-col gap-5 xl:gap-3", className),
|
|
30
33
|
...props
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
36
|
function FooterCtaTitle({ className, ...props }) {
|
|
34
37
|
return /* @__PURE__ */ jsx("h2", {
|
|
35
38
|
"data-slot": "footer-cta-title",
|
|
36
|
-
className: cn("text-gdt-
|
|
39
|
+
className: cn("text-gdt-h3 leading-10 text-current md:leading-[3.25rem]", className),
|
|
37
40
|
...props
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
43
|
function FooterCtaDescription({ className, ...props }) {
|
|
41
44
|
return /* @__PURE__ */ jsx("p", {
|
|
42
45
|
"data-slot": "footer-cta-description",
|
|
43
|
-
className: cn("text-gdt-sm text-current", className),
|
|
46
|
+
className: cn("text-gdt-sm text-current opacity-85 md:text-gdt-md", className),
|
|
44
47
|
...props
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
function FooterCtaActions({ className, ...props }) {
|
|
48
51
|
return /* @__PURE__ */ jsx("div", {
|
|
49
52
|
"data-slot": "footer-cta-actions",
|
|
50
|
-
className: cn("flex flex-
|
|
53
|
+
className: cn("flex w-full flex-col items-stretch gap-gdt-lg [&>*]:w-full xl:w-auto xl:flex-row xl:items-center xl:[&>*]:w-auto", className),
|
|
51
54
|
...props
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
function FooterBody({ className, ...props }) {
|
|
55
58
|
return /* @__PURE__ */ jsx("div", {
|
|
56
59
|
"data-slot": "footer-body",
|
|
57
|
-
className: cn("flex flex-col gap-gdt-6xl px-
|
|
60
|
+
className: cn("flex flex-col gap-gdt-6xl px-5 py-gdt-3xl md:gap-32 md:px-gdt-6xl md:py-gdt-5xl", className),
|
|
58
61
|
...props
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
64
|
function FooterHeader({ className, ...props }) {
|
|
62
65
|
return /* @__PURE__ */ jsx("div", {
|
|
63
66
|
"data-slot": "footer-header",
|
|
64
|
-
className: cn("flex
|
|
67
|
+
className: cn("flex w-full flex-col gap-1.5 border-b border-line-subtle pb-5 md:pb-7", className),
|
|
65
68
|
...props
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
function FooterTitle({ className, ...props }) {
|
|
69
72
|
return /* @__PURE__ */ jsx("h2", {
|
|
70
73
|
"data-slot": "footer-title",
|
|
71
|
-
className: cn("text-gdt-
|
|
74
|
+
className: cn("text-gdt-h4 text-fg-primary", className),
|
|
72
75
|
...props
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
function FooterDescription({ className, ...props }) {
|
|
76
79
|
return /* @__PURE__ */ jsx("p", {
|
|
77
80
|
"data-slot": "footer-description",
|
|
78
|
-
className: cn("text-gdt-
|
|
81
|
+
className: cn("text-gdt-sm text-fg-secondary", className),
|
|
79
82
|
...props
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
function FooterNav({ className, ...props }) {
|
|
83
86
|
return /* @__PURE__ */ jsx("nav", {
|
|
84
87
|
"data-slot": "footer-nav",
|
|
85
|
-
className: cn("grid
|
|
88
|
+
className: cn("grid grid-cols-2 gap-gdt-3xl md:grid-cols-4 xl:grid-cols-7", className),
|
|
86
89
|
...props
|
|
87
90
|
});
|
|
88
91
|
}
|
|
@@ -96,21 +99,21 @@ function FooterSection({ className, ...props }) {
|
|
|
96
99
|
function FooterSectionTitle({ className, ...props }) {
|
|
97
100
|
return /* @__PURE__ */ jsx("h3", {
|
|
98
101
|
"data-slot": "footer-section-title",
|
|
99
|
-
className: cn("text-gdt-
|
|
102
|
+
className: cn("text-gdt-md font-bold text-fg-primary", className),
|
|
100
103
|
...props
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
106
|
function FooterLinkList({ className, ...props }) {
|
|
104
107
|
return /* @__PURE__ */ jsx("ul", {
|
|
105
108
|
"data-slot": "footer-link-list",
|
|
106
|
-
className: cn("flex flex-col gap-gdt-
|
|
109
|
+
className: cn("flex flex-col gap-gdt-md", className),
|
|
107
110
|
...props
|
|
108
111
|
});
|
|
109
112
|
}
|
|
110
113
|
function FooterLinkItem({ className, ...props }) {
|
|
111
114
|
return /* @__PURE__ */ jsx("li", {
|
|
112
115
|
"data-slot": "footer-link-item",
|
|
113
|
-
className: cn("text-gdt-
|
|
116
|
+
className: cn("text-gdt-sm", className),
|
|
114
117
|
...props
|
|
115
118
|
});
|
|
116
119
|
}
|
|
@@ -118,10 +121,10 @@ function FooterLink({ className, children, render, showArrow = false, ...props }
|
|
|
118
121
|
return useRender({
|
|
119
122
|
defaultTagName: "a",
|
|
120
123
|
props: mergeProps({
|
|
121
|
-
className: cn("inline-flex items-center gap-gdt-sm text-fg-secondary transition-colors hover:text-fg-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-line-focus focus-visible:ring-offset-2", className),
|
|
122
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children }), showArrow && /* @__PURE__ */ jsx(
|
|
124
|
+
className: cn("inline-flex items-center gap-gdt-sm text-fg-secondary underline-offset-4 transition-colors hover:text-fg-brand hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-line-focus focus-visible:ring-offset-2", className),
|
|
125
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children }), showArrow && /* @__PURE__ */ jsx(ChevronRight, {
|
|
123
126
|
"aria-hidden": "true",
|
|
124
|
-
|
|
127
|
+
className: "size-3.5"
|
|
125
128
|
})] })
|
|
126
129
|
}, props),
|
|
127
130
|
render,
|
|
@@ -131,21 +134,21 @@ function FooterLink({ className, children, render, showArrow = false, ...props }
|
|
|
131
134
|
function FooterContactGrid({ className, ...props }) {
|
|
132
135
|
return /* @__PURE__ */ jsx("div", {
|
|
133
136
|
"data-slot": "footer-contact-grid",
|
|
134
|
-
className: cn("grid gap-
|
|
137
|
+
className: cn("grid gap-5 lg:grid-cols-[minmax(0,1fr)_28.75rem] lg:gap-gdt-5xl", className),
|
|
135
138
|
...props
|
|
136
139
|
});
|
|
137
140
|
}
|
|
138
141
|
function FooterContact({ className, ...props }) {
|
|
139
142
|
return /* @__PURE__ */ jsx("address", {
|
|
140
143
|
"data-slot": "footer-contact",
|
|
141
|
-
className: cn("not-italic text-gdt-
|
|
144
|
+
className: cn("not-italic text-gdt-sm text-fg-secondary lg:order-first", className),
|
|
142
145
|
...props
|
|
143
146
|
});
|
|
144
147
|
}
|
|
145
148
|
function FooterContactTitle({ className, ...props }) {
|
|
146
149
|
return /* @__PURE__ */ jsx("h3", {
|
|
147
150
|
"data-slot": "footer-contact-title",
|
|
148
|
-
className: cn("mb-gdt-
|
|
151
|
+
className: cn("mb-gdt-xs text-gdt-sm font-bold text-fg-primary", className),
|
|
149
152
|
...props
|
|
150
153
|
});
|
|
151
154
|
}
|
|
@@ -166,45 +169,47 @@ function FooterSocialItem({ className, ...props }) {
|
|
|
166
169
|
function FooterSocialLink({ className, ...props }) {
|
|
167
170
|
return /* @__PURE__ */ jsx("a", {
|
|
168
171
|
"data-slot": "footer-social-link",
|
|
169
|
-
className: cn("inline-flex size-
|
|
172
|
+
className: cn("inline-flex size-10 items-center justify-center rounded-full bg-surface-raised text-fg-secondary transition-colors hover:bg-surface-brand hover:text-fg-on-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-line-focus focus-visible:ring-offset-2 [&>svg:not([class*='size-'])]:size-4.5", className),
|
|
170
173
|
...props
|
|
171
174
|
});
|
|
172
175
|
}
|
|
173
176
|
function FooterNewsletter({ className, ...props }) {
|
|
174
177
|
return /* @__PURE__ */ jsx("form", {
|
|
175
178
|
"data-slot": "footer-newsletter",
|
|
176
|
-
className: cn("flex flex-col gap-
|
|
179
|
+
className: cn("flex flex-col gap-3.5", className),
|
|
177
180
|
...props
|
|
178
181
|
});
|
|
179
182
|
}
|
|
180
183
|
function FooterNewsletterTitle({ className, ...props }) {
|
|
181
184
|
return /* @__PURE__ */ jsx("h3", {
|
|
182
185
|
"data-slot": "footer-newsletter-title",
|
|
183
|
-
className: cn("text-gdt-
|
|
186
|
+
className: cn("text-gdt-md font-semibold text-fg-primary", className),
|
|
184
187
|
...props
|
|
185
188
|
});
|
|
186
189
|
}
|
|
187
190
|
function FooterNewsletterDescription({ className, ...props }) {
|
|
188
191
|
return /* @__PURE__ */ jsx("p", {
|
|
189
192
|
"data-slot": "footer-newsletter-description",
|
|
190
|
-
className: cn("text-gdt-
|
|
193
|
+
className: cn("text-gdt-sm text-fg-secondary", className),
|
|
191
194
|
...props
|
|
192
195
|
});
|
|
193
196
|
}
|
|
194
|
-
function FooterNewsletterControl({ className, children, ...props }) {
|
|
195
|
-
return /* @__PURE__ */ jsx(
|
|
197
|
+
function FooterNewsletterControl({ className, children, size = "lg", ...props }) {
|
|
198
|
+
return /* @__PURE__ */ jsx("div", {
|
|
196
199
|
"data-slot": "footer-newsletter-control",
|
|
197
|
-
|
|
198
|
-
className: cn("max-w-md bg-canvas", className),
|
|
200
|
+
className: cn("flex w-full max-w-[28.75rem] flex-col gap-gdt-md md:flex-row", className),
|
|
199
201
|
...props,
|
|
200
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(
|
|
202
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Input, {
|
|
201
203
|
type: "email",
|
|
202
204
|
name: "email",
|
|
203
|
-
|
|
205
|
+
size,
|
|
206
|
+
placeholder: "Enter your email",
|
|
204
207
|
"aria-label": "Email address"
|
|
205
|
-
}), /* @__PURE__ */ jsx(
|
|
208
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
206
209
|
type: "submit",
|
|
207
210
|
variant: "primary",
|
|
211
|
+
size,
|
|
212
|
+
className: "w-full md:w-auto",
|
|
208
213
|
children: "Subscribe"
|
|
209
214
|
})] })
|
|
210
215
|
});
|
|
@@ -212,14 +217,14 @@ function FooterNewsletterControl({ className, children, ...props }) {
|
|
|
212
217
|
function FooterBottom({ className, ...props }) {
|
|
213
218
|
return /* @__PURE__ */ jsx("div", {
|
|
214
219
|
"data-slot": "footer-bottom",
|
|
215
|
-
className: cn("flex flex-col gap-
|
|
220
|
+
className: cn("flex flex-col gap-2.5 border-t border-line-subtle px-5 py-gdt-xl text-gdt-xs text-fg-secondary [&>[data-slot=footer-legal-links]]:order-first md:flex-row md:items-center md:justify-between md:px-gdt-6xl md:[&>[data-slot=footer-legal-links]]:order-none", className),
|
|
216
221
|
...props
|
|
217
222
|
});
|
|
218
223
|
}
|
|
219
224
|
function FooterLegalLinks({ className, ...props }) {
|
|
220
225
|
return /* @__PURE__ */ jsx("nav", {
|
|
221
226
|
"data-slot": "footer-legal-links",
|
|
222
|
-
className: cn("flex flex-wrap items-center gap-gdt-xl", className),
|
|
227
|
+
className: cn("flex flex-wrap items-center gap-5 md:gap-gdt-xl", className),
|
|
223
228
|
...props
|
|
224
229
|
});
|
|
225
230
|
}
|
package/dist/funnel-chart.d.ts
CHANGED
package/dist/heatmap-chart.d.ts
CHANGED
package/dist/input-group.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
-
import { SizeProvider
|
|
3
|
+
import { SizeProvider } from "./size-context.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
|
-
import { InputSizeProvider } from "./input-size-context.js";
|
|
5
|
+
import { InputSizeProvider, useInputComponentSize } from "./input-size-context.js";
|
|
6
6
|
import { Input } from "./input.js";
|
|
7
7
|
import { Textarea } from "./textarea.js";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { cva } from "class-variance-authority";
|
|
10
10
|
//#region src/input-group.tsx
|
|
11
|
-
const inputGroupVariants = cva("group/input-group relative flex w-full min-w-0 items-center rounded-full has-[textarea]:rounded-xl has-data-[align=block-end]:rounded-xl has-data-[align=block-start]:rounded-xl border border-line bg-canvas transition-[background-color,border-color,box-shadow,color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:border-line-subtle has-disabled:bg-surface has-disabled:text-fg-caption-placeholder focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none has-[[data-slot][aria-invalid=true]]:focus-within:border-line-danger has-[[data-slot][aria-invalid=true]]:focus-within:inset-ring-line-danger has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pl-2 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pl-2.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pl-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pl-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pr-2 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pr-2.5 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pr-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pr-3", {
|
|
11
|
+
const inputGroupVariants = cva("group/input-group relative flex w-full min-w-0 items-center overflow-hidden rounded-full has-[textarea]:rounded-xl has-data-[align=block-end]:rounded-xl has-data-[align=block-start]:rounded-xl border border-line bg-canvas transition-[background-color,border-color,box-shadow,color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:border-line-subtle has-disabled:bg-surface has-disabled:text-fg-caption-placeholder focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none has-[[data-slot][aria-invalid=true]]:focus-within:border-line-danger has-[[data-slot][aria-invalid=true]]:focus-within:inset-ring-line-danger has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pl-2 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pl-2.5 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pl-3 has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pl-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=sm]/input-group:pr-2 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=md]/input-group:pr-2.5 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=lg]/input-group:pr-3 has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:group-data-[size=xl]/input-group:pr-3", {
|
|
12
12
|
variants: { size: {
|
|
13
13
|
sm: "h-8",
|
|
14
14
|
md: "h-10",
|
|
@@ -18,8 +18,7 @@ const inputGroupVariants = cva("group/input-group relative flex w-full min-w-0 i
|
|
|
18
18
|
defaultVariants: { size: "md" }
|
|
19
19
|
});
|
|
20
20
|
function InputGroup({ className, size, ...props }) {
|
|
21
|
-
const
|
|
22
|
-
const resolvedSize = size ?? inheritedSize;
|
|
21
|
+
const resolvedSize = useInputComponentSize(size);
|
|
23
22
|
return /* @__PURE__ */ jsx(SizeProvider, {
|
|
24
23
|
size: resolvedSize === "xl" ? void 0 : resolvedSize,
|
|
25
24
|
children: /* @__PURE__ */ jsx(InputSizeProvider, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { useInheritedComponentSize } from "./size-context.js";
|
|
2
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
4
|
import { createContext, useContext } from "react";
|
|
4
5
|
//#region src/input-size-context.tsx
|
|
@@ -11,8 +12,9 @@ function InputSizeProvider({ children, size }) {
|
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
function useInputComponentSize(size, fallback = "md") {
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const inheritedInputSize = useContext(InputSizeContext);
|
|
16
|
+
const inheritedComponentSize = useInheritedComponentSize();
|
|
17
|
+
return size ?? inheritedInputSize ?? inheritedComponentSize ?? fallback;
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
|
18
20
|
export { InputSizeProvider, useInputComponentSize };
|
package/dist/input.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
2
3
|
import { useInputComponentSize } from "./input-size-context.js";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { cva } from "class-variance-authority";
|
|
5
6
|
import { Input as Input$1 } from "@base-ui/react/input";
|
|
6
7
|
//#region src/input.tsx
|
|
7
|
-
const inputVariants = cva("flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary 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", {
|
|
8
|
+
const inputVariants = cva("flex w-full min-w-0 rounded-full border border-line bg-canvas text-fg-primary transition-[background-color,border-color,box-shadow,color] outline-none file:inline-flex file:border-0 file:bg-transparent file:font-normal file:text-fg-primary 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 autofill:border-line autofill:bg-canvas autofill:[-webkit-text-fill-color:var(--color-fg-primary)] autofill:[box-shadow:0_0_0_1000px_var(--color-canvas)_inset]", {
|
|
8
9
|
variants: { size: {
|
|
9
10
|
sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
|
|
10
11
|
md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
|
package/dist/item.js
CHANGED
package/dist/kpi-card.js
CHANGED
package/dist/line-chart.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ComponentSize } from "./size-context-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
|
|
2
2
|
import { ChartConfig } from "./chart.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Area, AreaChart as AreaChart$1, CartesianGrid, Line, LineChart as LineChart$1, XAxis, YAxis } from "recharts";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as Input } from "./input-CfoEJ8A6.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/mask-input.d.ts
|
|
4
|
+
type MaskToken = {
|
|
5
|
+
pattern: RegExp;
|
|
6
|
+
transform?: (char: string) => string;
|
|
7
|
+
};
|
|
8
|
+
declare const defaultTokens: Record<string, MaskToken>;
|
|
9
|
+
declare const maskPresets: {
|
|
10
|
+
creditCard: string;
|
|
11
|
+
cvc: string;
|
|
12
|
+
date: string;
|
|
13
|
+
phoneNg: string;
|
|
14
|
+
time: string;
|
|
15
|
+
};
|
|
16
|
+
type MaskPreset = keyof typeof maskPresets;
|
|
17
|
+
type MaskInputOptions = {
|
|
18
|
+
allowNegative?: boolean;
|
|
19
|
+
currency?: string;
|
|
20
|
+
decimalScale?: number;
|
|
21
|
+
fixedDecimalScale?: boolean;
|
|
22
|
+
locale?: string;
|
|
23
|
+
mask?: string;
|
|
24
|
+
max?: number;
|
|
25
|
+
min?: number;
|
|
26
|
+
numeric?: boolean;
|
|
27
|
+
preset?: MaskPreset;
|
|
28
|
+
prefix?: string;
|
|
29
|
+
suffix?: string;
|
|
30
|
+
thousandSeparator?: boolean;
|
|
31
|
+
tokens?: Record<string, MaskToken>;
|
|
32
|
+
};
|
|
33
|
+
type MaskedValue = {
|
|
34
|
+
/** What the input displays: affixes, separators and all. */
|
|
35
|
+
masked: string;
|
|
36
|
+
/** The characters the user owns — token characters, or a plain number string. */
|
|
37
|
+
unmasked: string;
|
|
38
|
+
/** `unmasked` parsed, or `null` while it isn't a finished number. */
|
|
39
|
+
number: number | null;
|
|
40
|
+
/** Parallel to `masked`: true where the character came from `unmasked`. */
|
|
41
|
+
editable: boolean[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Format a value exactly as `MaskInput` would — useful for rendering the same
|
|
45
|
+
* amounts outside an input (table cells, summaries) without duplicating rules.
|
|
46
|
+
*/
|
|
47
|
+
declare function formatMaskValue(input: string | number, options?: MaskInputOptions): MaskedValue;
|
|
48
|
+
type MaskInputProps = Omit<React.ComponentProps<typeof Input>, "value" | "defaultValue" | "onChange" | "prefix" | "min" | "max"> & MaskInputOptions & {
|
|
49
|
+
/** Controlled value. Accepts either the masked or the unmasked form. */
|
|
50
|
+
value?: string | number;
|
|
51
|
+
/** Uncontrolled initial value. */
|
|
52
|
+
defaultValue?: string | number;
|
|
53
|
+
/** Reject a keystroke by returning `false`. Runs on every proposed change with the partial value, so allow in-progress input. */
|
|
54
|
+
validate?: (value: MaskedValue) => boolean;
|
|
55
|
+
/** Fires whenever the value changes, with the display and raw forms. */
|
|
56
|
+
onValueChange?: (value: MaskedValue) => void;
|
|
57
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
58
|
+
};
|
|
59
|
+
declare function MaskInput({ allowNegative, currency, decimalScale, defaultValue, fixedDecimalScale, inputMode, locale, mask, max, min, numeric, onBlur, onChange, onClick, onKeyDown, onValueChange, preset, prefix, ref, suffix, thousandSeparator, tokens, validate, value, ...props }: MaskInputProps): React.JSX.Element;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { MaskInput, type MaskInputOptions, type MaskInputProps, type MaskPreset, type MaskToken, type MaskedValue, formatMaskValue, defaultTokens as maskInputTokens, maskPresets };
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./collapsible.js";
|
|
2
|
+
import { Sheet, SheetBody, SheetClose, SheetContent, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
//#region src/mobile-sidebar.d.ts
|
|
6
|
+
type MobileSidebarRootProps = React.ComponentProps<typeof Sheet>;
|
|
7
|
+
declare function MobileSidebarRoot(props: MobileSidebarRootProps): React.JSX.Element;
|
|
8
|
+
declare function MobileSidebarTrigger({ className, children, ...props }: React.ComponentProps<typeof SheetTrigger>): React.JSX.Element;
|
|
9
|
+
type MobileSidebarContentProps = Omit<Extract<React.ComponentProps<typeof SheetContent>, {
|
|
10
|
+
side?: "left" | "right";
|
|
11
|
+
}>, "side" | "size">;
|
|
12
|
+
declare function MobileSidebarContent({ className, showCloseButton, ...props }: MobileSidebarContentProps): React.JSX.Element;
|
|
13
|
+
declare function MobileSidebarHeader({ className, ...props }: React.ComponentProps<typeof SheetHeader>): React.JSX.Element;
|
|
14
|
+
declare function MobileSidebarTitle({ className, ...props }: React.ComponentProps<typeof SheetTitle>): React.JSX.Element;
|
|
15
|
+
declare function MobileSidebarClose({ className, children, ...props }: React.ComponentProps<typeof SheetClose>): React.JSX.Element;
|
|
16
|
+
declare function MobileSidebarBody({ className, ...props }: React.ComponentProps<typeof SheetBody>): React.JSX.Element;
|
|
17
|
+
declare function MobileSidebarFooter({ className, ...props }: React.ComponentProps<typeof SheetFooter>): React.JSX.Element;
|
|
18
|
+
declare function MobileSidebarNav({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
19
|
+
declare function MobileSidebarList({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
20
|
+
declare function MobileSidebarItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
21
|
+
type MobileSidebarLinkProps = useRender.ComponentProps<"a"> & {
|
|
22
|
+
active?: boolean;
|
|
23
|
+
icon?: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
declare function MobileSidebarLink({ active, icon, className, children, render, ...props }: MobileSidebarLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
26
|
+
declare function MobileSidebarGroup({ className, ...props }: React.ComponentProps<typeof Collapsible>): React.JSX.Element;
|
|
27
|
+
type MobileSidebarGroupTriggerProps = React.ComponentProps<typeof CollapsibleTrigger> & {
|
|
28
|
+
active?: boolean;
|
|
29
|
+
icon?: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
declare function MobileSidebarGroupTrigger({ active, icon, className, children, ...props }: MobileSidebarGroupTriggerProps): React.JSX.Element;
|
|
32
|
+
declare function MobileSidebarGroupPanel({ className, ...props }: React.ComponentProps<typeof CollapsibleContent>): React.JSX.Element;
|
|
33
|
+
declare function MobileSidebarSubList({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
34
|
+
declare function MobileSidebarSubheading({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
35
|
+
declare function MobileSidebarSubLink({ className, render, ...props }: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
36
|
+
declare const MobileSidebar: {
|
|
37
|
+
Root: typeof MobileSidebarRoot;
|
|
38
|
+
Trigger: typeof MobileSidebarTrigger;
|
|
39
|
+
Content: typeof MobileSidebarContent;
|
|
40
|
+
Header: typeof MobileSidebarHeader;
|
|
41
|
+
Title: typeof MobileSidebarTitle;
|
|
42
|
+
Close: typeof MobileSidebarClose;
|
|
43
|
+
Body: typeof MobileSidebarBody;
|
|
44
|
+
Footer: typeof MobileSidebarFooter;
|
|
45
|
+
Nav: typeof MobileSidebarNav;
|
|
46
|
+
List: typeof MobileSidebarList;
|
|
47
|
+
Item: typeof MobileSidebarItem;
|
|
48
|
+
Link: typeof MobileSidebarLink;
|
|
49
|
+
Group: typeof MobileSidebarGroup;
|
|
50
|
+
GroupTrigger: typeof MobileSidebarGroupTrigger;
|
|
51
|
+
GroupPanel: typeof MobileSidebarGroupPanel;
|
|
52
|
+
SubList: typeof MobileSidebarSubList;
|
|
53
|
+
Subheading: typeof MobileSidebarSubheading;
|
|
54
|
+
SubLink: typeof MobileSidebarSubLink;
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { MobileSidebar, MobileSidebarBody, MobileSidebarClose, MobileSidebarContent, type MobileSidebarContentProps, MobileSidebarFooter, MobileSidebarGroup, MobileSidebarGroupPanel, MobileSidebarGroupTrigger, type MobileSidebarGroupTriggerProps, MobileSidebarHeader, MobileSidebarItem, MobileSidebarLink, type MobileSidebarLinkProps, MobileSidebarList, MobileSidebarNav, MobileSidebarRoot, type MobileSidebarRootProps, MobileSidebarSubLink, MobileSidebarSubList, MobileSidebarSubheading, MobileSidebarTitle, MobileSidebarTrigger };
|