@giddaa-housing/ui 0.1.0 → 1.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/README.md +18 -6
- package/css/base.css +37 -0
- package/css/components.css +135 -0
- package/css/generated/shared.css +1 -0
- package/css/giddaa.css +402 -0
- package/css/preset.css +77 -0
- package/css/styles.css +2 -0
- package/css/theme.css +255 -0
- package/dist/accordion.js +5 -35
- package/dist/accordion.js.map +1 -1
- package/dist/activity-timeline.d.ts +33 -0
- package/dist/activity-timeline.js +212 -0
- package/dist/activity-timeline.js.map +1 -0
- package/dist/alert.js +5 -35
- package/dist/alert.js.map +1 -1
- package/dist/auth-layout.d.ts +23 -0
- package/dist/auth-layout.js +304 -0
- package/dist/auth-layout.js.map +1 -0
- package/dist/avatar.js +10 -142
- package/dist/avatar.js.map +1 -1
- package/dist/badge.d.ts +3 -2
- package/dist/badge.js +6 -114
- package/dist/badge.js.map +1 -1
- package/dist/bar-chart.d.ts +101 -77
- package/dist/bar-chart.js +142 -220
- package/dist/bar-chart.js.map +1 -1
- package/dist/breadcrumb.js +5 -35
- package/dist/breadcrumb.js.map +1 -1
- package/dist/bullet-chart.js +15 -48
- package/dist/bullet-chart.js.map +1 -1
- package/dist/button-group.js +14 -90
- package/dist/button-group.js.map +1 -1
- package/dist/button.d.ts +5 -5
- package/dist/button.js +7 -140
- package/dist/button.js.map +1 -1
- package/dist/calendar.js +12 -287
- package/dist/calendar.js.map +1 -1
- package/dist/card.js +5 -35
- package/dist/card.js.map +1 -1
- package/dist/carousel.js +12 -386
- package/dist/carousel.js.map +1 -1
- package/dist/chart.js +16 -480
- package/dist/chart.js.map +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.js +13 -48
- package/dist/checkbox.js.map +1 -1
- package/dist/chunk-322YCNVL.js +278 -0
- package/dist/chunk-322YCNVL.js.map +1 -0
- package/dist/chunk-3ACQVT7A.js +25 -0
- package/dist/chunk-3ACQVT7A.js.map +1 -0
- package/dist/chunk-3T65TLJX.js +334 -0
- package/dist/chunk-3T65TLJX.js.map +1 -0
- package/dist/chunk-6ZSGQHH2.js +192 -0
- package/dist/chunk-6ZSGQHH2.js.map +1 -0
- package/dist/chunk-7TBMLFGW.js +41 -0
- package/dist/chunk-7TBMLFGW.js.map +1 -0
- package/dist/chunk-B4H6RNDH.js +135 -0
- package/dist/chunk-B4H6RNDH.js.map +1 -0
- package/dist/chunk-BUXCGZ6X.js +219 -0
- package/dist/chunk-BUXCGZ6X.js.map +1 -0
- package/dist/chunk-CHII2QHH.js +58 -0
- package/dist/chunk-CHII2QHH.js.map +1 -0
- package/dist/chunk-DMNOXRRW.js +147 -0
- package/dist/chunk-DMNOXRRW.js.map +1 -0
- package/dist/chunk-EFSOSSIC.js +130 -0
- package/dist/chunk-EFSOSSIC.js.map +1 -0
- package/dist/chunk-FZDSVMKY.js +363 -0
- package/dist/chunk-FZDSVMKY.js.map +1 -0
- package/dist/chunk-GJOFIJS3.js +246 -0
- package/dist/chunk-GJOFIJS3.js.map +1 -0
- package/dist/chunk-HL3ZSYES.js +23 -0
- package/dist/chunk-HL3ZSYES.js.map +1 -0
- package/dist/chunk-JVLUBAPB.js +129 -0
- package/dist/chunk-JVLUBAPB.js.map +1 -0
- package/dist/chunk-KDPYSOYZ.js +64 -0
- package/dist/chunk-KDPYSOYZ.js.map +1 -0
- package/dist/chunk-KSMDANKI.js +43 -0
- package/dist/chunk-KSMDANKI.js.map +1 -0
- package/dist/chunk-MEKCCOP5.js +46 -0
- package/dist/chunk-MEKCCOP5.js.map +1 -0
- package/dist/chunk-NOFXVRWL.js +451 -0
- package/dist/chunk-NOFXVRWL.js.map +1 -0
- package/dist/chunk-PC5MHNVA.js +171 -0
- package/dist/chunk-PC5MHNVA.js.map +1 -0
- package/dist/chunk-QKAQZ2GU.js +122 -0
- package/dist/chunk-QKAQZ2GU.js.map +1 -0
- package/dist/chunk-QZHSHSVV.js +26 -0
- package/dist/chunk-QZHSHSVV.js.map +1 -0
- package/dist/chunk-RBMK26XD.js +19 -0
- package/dist/chunk-RBMK26XD.js.map +1 -0
- package/dist/chunk-SFNJGF6M.js +262 -0
- package/dist/chunk-SFNJGF6M.js.map +1 -0
- package/dist/chunk-UJJNLGTM.js +112 -0
- package/dist/chunk-UJJNLGTM.js.map +1 -0
- package/dist/chunk-VGR4ZWJ3.js +418 -0
- package/dist/chunk-VGR4ZWJ3.js.map +1 -0
- package/dist/chunk-XG47P6D4.js +99 -0
- package/dist/chunk-XG47P6D4.js.map +1 -0
- package/dist/chunk-XZZAHNVM.js +21 -0
- package/dist/chunk-XZZAHNVM.js.map +1 -0
- package/dist/chunk-Y4TTYVNE.js +36 -0
- package/dist/chunk-Y4TTYVNE.js.map +1 -0
- package/dist/chunk-YDWIHW6Q.js +69 -0
- package/dist/chunk-YDWIHW6Q.js.map +1 -0
- package/dist/collapsible.js +6 -35
- package/dist/collapsible.js.map +1 -1
- package/dist/combobox.js +26 -694
- package/dist/combobox.js.map +1 -1
- package/dist/cta.d.ts +66 -0
- package/dist/cta.js +358 -0
- package/dist/cta.js.map +1 -0
- package/dist/currency-selector.d.ts +42 -0
- package/dist/currency-selector.js +192 -0
- package/dist/currency-selector.js.map +1 -0
- package/dist/date-picker.d.ts +18 -10
- package/dist/date-picker.js +105 -430
- package/dist/date-picker.js.map +1 -1
- package/dist/details-card.d.ts +19 -0
- package/dist/details-card.js +267 -0
- package/dist/details-card.js.map +1 -0
- package/dist/dialog.js +36 -146
- package/dist/dialog.js.map +1 -1
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +20 -358
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/dropzone.js +13 -40
- package/dist/dropzone.js.map +1 -1
- package/dist/editorial-card.d.ts +29 -0
- package/dist/editorial-card.js +311 -0
- package/dist/editorial-card.js.map +1 -0
- package/dist/empty-state.js +5 -35
- package/dist/empty-state.js.map +1 -1
- package/dist/field.js +30 -135
- package/dist/field.js.map +1 -1
- package/dist/footer.d.ts +47 -0
- package/dist/footer.js +430 -0
- package/dist/footer.js.map +1 -0
- package/dist/funnel-chart.js +42 -415
- package/dist/funnel-chart.js.map +1 -1
- package/dist/gallery-indicator.d.ts +18 -0
- package/dist/gallery-indicator.js +12 -0
- package/dist/gallery-indicator.js.map +1 -0
- package/dist/heatmap-chart.d.ts +98 -0
- package/dist/heatmap-chart.js +248 -0
- package/dist/heatmap-chart.js.map +1 -0
- package/dist/infotip.d.ts +11 -0
- package/dist/infotip.js +66 -0
- package/dist/infotip.js.map +1 -0
- package/dist/input-group.d.ts +2 -1
- package/dist/input-group.js +15 -371
- package/dist/input-group.js.map +1 -1
- package/dist/input-size-context.js +5 -19
- package/dist/input-size-context.js.map +1 -1
- package/dist/input.js +6 -78
- package/dist/input.js.map +1 -1
- package/dist/item.js +5 -35
- package/dist/item.js.map +1 -1
- package/dist/kpi-card.js +12 -52
- package/dist/kpi-card.js.map +1 -1
- package/dist/label.js +5 -64
- package/dist/label.js.map +1 -1
- package/dist/line-chart.js +9 -166
- package/dist/line-chart.js.map +1 -1
- package/dist/logo.js +4 -141
- package/dist/logo.js.map +1 -1
- package/dist/map-indicator.d.ts +13 -0
- package/dist/map-indicator.js +109 -0
- package/dist/map-indicator.js.map +1 -0
- package/dist/match.d.ts +16 -0
- package/dist/match.js +113 -0
- package/dist/match.js.map +1 -0
- package/dist/media-gallery-hero.d.ts +60 -0
- package/dist/media-gallery-hero.js +362 -0
- package/dist/media-gallery-hero.js.map +1 -0
- package/dist/media-player.d.ts +60 -0
- package/dist/media-player.js +1394 -0
- package/dist/media-player.js.map +1 -0
- package/dist/number-input.js +30 -325
- package/dist/number-input.js.map +1 -1
- package/dist/page-header.js +4 -32
- package/dist/page-header.js.map +1 -1
- package/dist/pagination.d.ts +1 -0
- package/dist/pagination.js +27 -161
- package/dist/pagination.js.map +1 -1
- package/dist/password-input.d.ts +1 -0
- package/dist/password-input.js +21 -319
- package/dist/password-input.js.map +1 -1
- package/dist/phone-input.d.ts +2 -1
- package/dist/phone-input.js +148 -359
- package/dist/phone-input.js.map +1 -1
- package/dist/photo-gallery.d.ts +1 -1
- package/dist/photo-gallery.js +97 -393
- package/dist/photo-gallery.js.map +1 -1
- package/dist/pie-chart.js +17 -52
- package/dist/pie-chart.js.map +1 -1
- package/dist/popover.js +13 -158
- package/dist/popover.js.map +1 -1
- package/dist/price-tag.d.ts +35 -0
- package/dist/price-tag.js +178 -0
- package/dist/price-tag.js.map +1 -0
- package/dist/progress.d.ts +5 -2
- package/dist/progress.js +14 -303
- package/dist/progress.js.map +1 -1
- package/dist/property-listing-card.d.ts +32 -0
- package/dist/property-listing-card.js +235 -0
- package/dist/property-listing-card.js.map +1 -0
- package/dist/radar-chart.d.ts +110 -0
- package/dist/radar-chart.js +147 -0
- package/dist/radar-chart.js.map +1 -0
- package/dist/radio-group.js +15 -50
- package/dist/radio-group.js.map +1 -1
- package/dist/review-block.d.ts +20 -0
- package/dist/review-block.js +10 -0
- package/dist/review-block.js.map +1 -0
- package/dist/rich-text-editor.js +172 -433
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/scatter-chart.d.ts +142 -0
- package/dist/scatter-chart.js +252 -0
- package/dist/scatter-chart.js.map +1 -0
- package/dist/search-input.d.ts +1 -0
- package/dist/search-input.js +22 -320
- package/dist/search-input.js.map +1 -1
- package/dist/select.js +15 -292
- package/dist/select.js.map +1 -1
- package/dist/separator.js +5 -68
- package/dist/separator.js.map +1 -1
- package/dist/sheet.js +14 -271
- package/dist/sheet.js.map +1 -1
- package/dist/sidebar.d.ts +1 -1
- package/dist/sidebar.js +89 -494
- package/dist/sidebar.js.map +1 -1
- package/dist/size-context.js +5 -17
- package/dist/size-context.js.map +1 -1
- package/dist/skeleton.js +4 -44
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.d.ts +28 -0
- package/dist/slider.js +152 -0
- package/dist/slider.js.map +1 -0
- package/dist/sparkline.js +33 -341
- package/dist/sparkline.js.map +1 -1
- package/dist/stepper.js +5 -35
- package/dist/stepper.js.map +1 -1
- package/dist/styles.css +9593 -2
- package/dist/switch.js +13 -48
- package/dist/switch.js.map +1 -1
- package/dist/tab-list.js +35 -306
- package/dist/tab-list.js.map +1 -1
- package/dist/table.js +5 -32
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +10 -150
- package/dist/tabs.js.map +1 -1
- package/dist/tag.d.ts +7 -6
- package/dist/tag.js +101 -97
- package/dist/tag.js.map +1 -1
- package/dist/testimonial-block.d.ts +34 -0
- package/dist/testimonial-block.js +377 -0
- package/dist/testimonial-block.js.map +1 -0
- package/dist/textarea.js +6 -73
- package/dist/textarea.js.map +1 -1
- package/dist/time-picker.js +119 -279
- package/dist/time-picker.js.map +1 -1
- package/dist/toast.js +27 -132
- package/dist/toast.js.map +1 -1
- package/dist/tooltip.d.ts +5 -5
- package/dist/tooltip.js +7 -90
- package/dist/tooltip.js.map +1 -1
- package/dist/tree-map.js +41 -414
- package/dist/tree-map.js.map +1 -1
- package/dist/waterfall-chart.d.ts +129 -0
- package/dist/waterfall-chart.js +577 -0
- package/dist/waterfall-chart.js.map +1 -0
- package/package.json +98 -28
- package/dist/base.css +0 -32
- package/dist/files/red-hat-display-latin-300-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-300-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-300-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-300-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-400-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-400-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-400-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-400-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-500-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-500-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-500-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-500-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-600-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-600-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-600-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-600-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-700-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-700-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-700-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-700-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-800-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-800-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-800-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-800-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-900-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-900-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-900-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-900-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-300-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-300-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-300-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-300-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-400-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-400-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-400-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-400-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-500-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-500-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-500-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-500-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-600-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-600-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-600-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-600-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-700-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-700-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-700-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-700-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-800-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-800-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-800-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-800-normal.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-900-italic.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-900-italic.woff2 +0 -0
- package/dist/files/red-hat-display-latin-ext-900-normal.woff +0 -0
- package/dist/files/red-hat-display-latin-ext-900-normal.woff2 +0 -0
- package/dist/index.d.ts +0 -87
- package/dist/index.js +0 -10448
- package/dist/index.js.map +0 -1
- package/dist/red-hat-display.css +0 -2
- package/dist/theme/giddaa.css +0 -2
package/dist/combobox.js
CHANGED
|
@@ -1,697 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"gdt-subtext",
|
|
28
|
-
"gdt-capitalized"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
function cn(...inputs) {
|
|
36
|
-
return twMerge(clsx(inputs));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// src/components/ui/button.tsx
|
|
40
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
41
|
-
import { cva } from "class-variance-authority";
|
|
42
|
-
import { Loader } from "lucide-react";
|
|
43
|
-
|
|
44
|
-
// src/components/ui/size-context.tsx
|
|
45
|
-
import { createContext, useContext } from "react";
|
|
46
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
47
|
-
var SizeContext = createContext(void 0);
|
|
48
|
-
function SizeProvider({
|
|
49
|
-
children,
|
|
50
|
-
size
|
|
51
|
-
}) {
|
|
52
|
-
if (!size) {
|
|
53
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
54
|
-
}
|
|
55
|
-
return /* @__PURE__ */ jsx(SizeContext.Provider, { value: size, children });
|
|
56
|
-
}
|
|
57
|
-
function useComponentSize(size, fallback = "md") {
|
|
58
|
-
const inheritedSize = useContext(SizeContext);
|
|
59
|
-
return size ?? inheritedSize ?? fallback;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// src/components/ui/button.tsx
|
|
63
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
64
|
-
var buttonVariants = cva(
|
|
65
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-full bg-clip-padding whitespace-nowrap font-bold transition-[background-color,color,border-color,box-shadow,transform] outline-none select-none focus-visible:border-line-focus focus-visible:shadow-[0px_0px_0px_2px_var(--color-line-focus)] active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-invalid:border-line-danger aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
66
|
-
{
|
|
67
|
-
variants: {
|
|
68
|
-
variant: {
|
|
69
|
-
primary: "bg-action-primary text-fg-on-brand hover:bg-action-primary-hover active:bg-action-primary-pressed",
|
|
70
|
-
"primary-outline": "border-2 border-action-primary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
|
|
71
|
-
secondary: "bg-surface-brand-subtle text-fg-brand hover:bg-action-primary-hover hover:text-fg-on-brand active:bg-action-primary-pressed active:text-fg-on-brand data-focused:bg-action-primary-hover data-pressed:bg-action-primary-pressed data-focused:text-fg-on-brand data-pressed:text-fg-on-brand",
|
|
72
|
-
"secondary-outline": "border-2 border-action-secondary bg-transparent text-fg-brand hover:bg-surface-brand-subtle active:bg-surface-brand-subtle data-focused:bg-surface-brand-subtle data-pressed:bg-surface-brand-subtle",
|
|
73
|
-
tertiary: "bg-action-tertiary text-fg-primary hover:bg-action-tertiary-hover active:bg-action-tertiary-pressed data-focused:bg-action-tertiary-hover data-pressed:bg-action-tertiary-pressed",
|
|
74
|
-
"tertiary-outline": "border border-line-strong bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
|
|
75
|
-
ghost: "bg-transparent text-fg-primary hover:bg-surface active:bg-surface-raised data-focused:bg-surface data-pressed:bg-surface-raised",
|
|
76
|
-
danger: "bg-action-danger text-fg-on-brand hover:bg-action-danger-hover active:bg-action-danger-pressed data-focused:bg-action-danger-hover data-pressed:bg-action-danger-pressed",
|
|
77
|
-
"glass-overlay": "bg-surface-glass-overlay-button text-fg-on-brand",
|
|
78
|
-
"link-brand": "border-transparent bg-transparent px-0 text-fg-brand hover:underline active:underline active:opacity-70",
|
|
79
|
-
"link-neutral": "border-transparent bg-transparent px-0 text-fg-secondary hover:underline active:underline active:opacity-70"
|
|
80
|
-
},
|
|
81
|
-
size: {
|
|
82
|
-
sm: "h-8 gap-2 px-3.5 text-gdt-xs has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5",
|
|
83
|
-
md: "h-10 gap-2 px-4.5 text-gdt-sm has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
84
|
-
lg: "h-12.5 gap-2.5 px-5.5 text-gdt-md has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5 [&_svg:not([class*='size-'])]:size-4.5",
|
|
85
|
-
xl: "h-14 gap-3 px-6.5 text-gdt-lg has-data-[icon=inline-end]:pr-6 has-data-[icon=inline-start]:pl-6 [&_svg:not([class*='size-'])]:size-5",
|
|
86
|
-
icon: "size-10",
|
|
87
|
-
"icon-xs": "size-6 text-gdt-xs [&_svg:not([class*='size-'])]:size-3",
|
|
88
|
-
"icon-sm": "size-8 text-gdt-sm [&_svg:not([class*='size-'])]:size-3.5",
|
|
89
|
-
"icon-lg": "size-12.5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5",
|
|
90
|
-
"icon-xl": "size-14 text-gdt-lg [&_svg:not([class*='size-'])]:size-5"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
defaultVariants: {
|
|
94
|
-
variant: "primary",
|
|
95
|
-
size: "md"
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
function Button({
|
|
100
|
-
className,
|
|
101
|
-
variant = "primary",
|
|
102
|
-
size,
|
|
103
|
-
isLoading = false,
|
|
104
|
-
children,
|
|
105
|
-
disabled = false,
|
|
106
|
-
...props
|
|
107
|
-
}) {
|
|
108
|
-
const inheritedSize = useComponentSize();
|
|
109
|
-
const resolvedSize = size ?? inheritedSize;
|
|
110
|
-
const _disabled = disabled || isLoading;
|
|
111
|
-
return /* @__PURE__ */ jsxs(
|
|
112
|
-
ButtonPrimitive,
|
|
113
|
-
{
|
|
114
|
-
"data-slot": "button",
|
|
115
|
-
className: cn(buttonVariants({ variant, size: resolvedSize, className })),
|
|
116
|
-
disabled: _disabled,
|
|
117
|
-
...props,
|
|
118
|
-
children: [
|
|
119
|
-
isLoading && /* @__PURE__ */ jsx2(Loader, { className: "size-4 animate-spin" }),
|
|
120
|
-
" ",
|
|
121
|
-
children
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// src/components/ui/input-group.tsx
|
|
128
|
-
import { cva as cva3 } from "class-variance-authority";
|
|
129
|
-
|
|
130
|
-
// src/components/ui/input.tsx
|
|
131
|
-
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
132
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
133
|
-
|
|
134
|
-
// src/components/ui/input-size-context.tsx
|
|
135
|
-
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
136
|
-
import { Fragment as Fragment2, jsx as jsx3 } from "react/jsx-runtime";
|
|
137
|
-
var InputSizeContext = createContext2(
|
|
138
|
-
void 0
|
|
139
|
-
);
|
|
140
|
-
function InputSizeProvider({
|
|
141
|
-
children,
|
|
142
|
-
size
|
|
143
|
-
}) {
|
|
144
|
-
if (!size) {
|
|
145
|
-
return /* @__PURE__ */ jsx3(Fragment2, { children });
|
|
146
|
-
}
|
|
147
|
-
return /* @__PURE__ */ jsx3(InputSizeContext.Provider, { value: size, children });
|
|
148
|
-
}
|
|
149
|
-
function useInputComponentSize(size, fallback = "md") {
|
|
150
|
-
const inheritedSize = useContext2(InputSizeContext);
|
|
151
|
-
return size ?? inheritedSize ?? fallback;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// src/components/ui/input.tsx
|
|
155
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
156
|
-
var inputVariants = cva2(
|
|
157
|
-
"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-muted 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-muted disabled:placeholder:text-fg-muted aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:placeholder:text-fg-danger aria-invalid:shadow-none",
|
|
158
|
-
{
|
|
159
|
-
variants: {
|
|
160
|
-
size: {
|
|
161
|
-
sm: "h-8 px-3 text-gdt-xs font-normal file:text-gdt-xs",
|
|
162
|
-
md: "h-10 px-3.5 text-gdt-sm font-normal file:text-gdt-sm",
|
|
163
|
-
lg: "h-12 px-4 text-gdt-md font-normal file:text-gdt-md",
|
|
164
|
-
xl: "h-14 px-4.5 text-gdt-lg font-normal file:text-gdt-lg"
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
defaultVariants: {
|
|
168
|
-
size: "md"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
function Input({ className, size, type, ...props }) {
|
|
173
|
-
const resolvedSize = useInputComponentSize(size);
|
|
174
|
-
return /* @__PURE__ */ jsx4(
|
|
175
|
-
InputPrimitive,
|
|
176
|
-
{
|
|
177
|
-
type,
|
|
178
|
-
"data-slot": "input",
|
|
179
|
-
"data-size": resolvedSize,
|
|
180
|
-
className: cn(inputVariants({ size: resolvedSize }), className),
|
|
181
|
-
...props
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// src/components/ui/input-group.tsx
|
|
187
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
188
|
-
var inputGroupVariants = cva3(
|
|
189
|
-
"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-muted focus-within:border-line-focus focus-within:inset-ring-1 inset-ring-line-focus has-[[data-slot][aria-invalid=true]]:border-line-danger has-[[data-slot][aria-invalid=true]]:inset-shadow-none 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",
|
|
190
|
-
{
|
|
191
|
-
variants: {
|
|
192
|
-
size: {
|
|
193
|
-
sm: "h-8",
|
|
194
|
-
md: "h-10",
|
|
195
|
-
lg: "h-12",
|
|
196
|
-
xl: "h-14"
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
defaultVariants: {
|
|
200
|
-
size: "md"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
function InputGroup({
|
|
205
|
-
className,
|
|
206
|
-
size,
|
|
207
|
-
...props
|
|
208
|
-
}) {
|
|
209
|
-
const inheritedSize = useComponentSize();
|
|
210
|
-
const resolvedSize = size ?? inheritedSize;
|
|
211
|
-
const componentSize = resolvedSize === "xl" ? void 0 : resolvedSize;
|
|
212
|
-
return /* @__PURE__ */ jsx5(SizeProvider, { size: componentSize, children: /* @__PURE__ */ jsx5(InputSizeProvider, { size: resolvedSize, children: /* @__PURE__ */ jsx5(
|
|
213
|
-
"div",
|
|
214
|
-
{
|
|
215
|
-
"data-slot": "input-group",
|
|
216
|
-
"data-size": resolvedSize,
|
|
217
|
-
role: "group",
|
|
218
|
-
className: cn(inputGroupVariants({ size: resolvedSize }), className),
|
|
219
|
-
...props
|
|
220
|
-
}
|
|
221
|
-
) }) });
|
|
222
|
-
}
|
|
223
|
-
var inputGroupAddonVariants = cva3(
|
|
224
|
-
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-gdt-sm font-normal text-fg-secondary select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[size=lg]/input-group:[&>svg:not([class*='size-'])]:size-4.5 group-data-[size=xl]/input-group:[&>svg:not([class*='size-'])]:size-5 [&>svg:not([class*='size-'])]:size-4",
|
|
225
|
-
{
|
|
226
|
-
variants: {
|
|
227
|
-
align: {
|
|
228
|
-
"inline-start": "order-first group-data-[size=sm]/input-group:pl-3 group-data-[size=md]/input-group:pl-3.5 group-data-[size=lg]/input-group:pl-4 group-data-[size=xl]/input-group:pl-4.5 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
229
|
-
"inline-end": "order-last group-data-[size=sm]/input-group:pr-3 group-data-[size=md]/input-group:pr-3.5 group-data-[size=lg]/input-group:pr-4 group-data-[size=xl]/input-group:pr-4.5 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
230
|
-
"block-start": "order-first w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
231
|
-
"block-end": "order-last w-full justify-start px-3 group-data-[size=md]/input-group:px-3.5 group-data-[size=lg]/input-group:px-4 group-data-[size=xl]/input-group:px-4.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
defaultVariants: {
|
|
235
|
-
align: "inline-start"
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
);
|
|
239
|
-
function InputGroupAddon({
|
|
240
|
-
className,
|
|
241
|
-
align = "inline-start",
|
|
242
|
-
...props
|
|
243
|
-
}) {
|
|
244
|
-
return (
|
|
245
|
-
// biome-ignore lint/a11y/useSemanticElements: addon is a structural wrapper for grouped input affordances.
|
|
246
|
-
// biome-ignore lint/a11y/useKeyWithClickEvents: click only forwards focus to the sibling input and is not a standalone action target.
|
|
247
|
-
/* @__PURE__ */ jsx5(
|
|
248
|
-
"div",
|
|
249
|
-
{
|
|
250
|
-
role: "group",
|
|
251
|
-
"data-slot": "input-group-addon",
|
|
252
|
-
"data-align": align,
|
|
253
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
254
|
-
onClick: (e) => {
|
|
255
|
-
if (e.target.closest("button")) {
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
259
|
-
},
|
|
260
|
-
...props
|
|
261
|
-
}
|
|
262
|
-
)
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
var inputGroupButtonVariants = cva3(
|
|
266
|
-
"flex items-center gap-2 text-sm shadow-none rounded-full",
|
|
267
|
-
{
|
|
268
|
-
variants: {
|
|
269
|
-
size: {
|
|
270
|
-
xs: "h-6 gap-1 px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
271
|
-
sm: "",
|
|
272
|
-
"icon-xs": "size-6 p-0 has-[>svg]:p-0",
|
|
273
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
274
|
-
}
|
|
275
|
-
},
|
|
276
|
-
defaultVariants: {
|
|
277
|
-
size: "xs"
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
);
|
|
281
|
-
function InputGroupButton({
|
|
282
|
-
className,
|
|
283
|
-
type = "button",
|
|
284
|
-
variant = "ghost",
|
|
285
|
-
size = "xs",
|
|
286
|
-
...props
|
|
287
|
-
}) {
|
|
288
|
-
return /* @__PURE__ */ jsx5(
|
|
289
|
-
Button,
|
|
290
|
-
{
|
|
291
|
-
type,
|
|
292
|
-
"data-size": size,
|
|
293
|
-
variant,
|
|
294
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
295
|
-
...props
|
|
296
|
-
}
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
function InputGroupInput({
|
|
300
|
-
className,
|
|
301
|
-
size,
|
|
302
|
-
...props
|
|
303
|
-
}) {
|
|
304
|
-
return /* @__PURE__ */ jsx5(
|
|
305
|
-
Input,
|
|
306
|
-
{
|
|
307
|
-
"data-slot": "input-group-control",
|
|
308
|
-
size,
|
|
309
|
-
className: cn(
|
|
310
|
-
"flex-1 rounded-none border-0 bg-transparent shadow-none inset-shadow-none inset-ring-0 focus:border-transparent focus:shadow-none focus:inset-shadow-none focus-visible:border-transparent focus-visible:shadow-none focus-visible:ring-0 focus-visible:inset-ring-0 focus-visible:inset-shadow-none disabled:bg-transparent aria-invalid:ring-0 aria-invalid:inset-ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
311
|
-
className
|
|
312
|
-
),
|
|
313
|
-
...props
|
|
314
|
-
}
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// src/components/ui/combobox.tsx
|
|
319
|
-
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
320
|
-
var ComboboxSelectionContext = React.createContext({ multiple: false });
|
|
321
|
-
function Combobox({
|
|
322
|
-
multiple,
|
|
323
|
-
children,
|
|
324
|
-
size,
|
|
325
|
-
...props
|
|
326
|
-
}) {
|
|
327
|
-
return /* @__PURE__ */ jsx6(SizeProvider, { size, children: /* @__PURE__ */ jsx6(
|
|
328
|
-
ComboboxSelectionContext.Provider,
|
|
329
|
-
{
|
|
330
|
-
value: { multiple: multiple === true },
|
|
331
|
-
children: /* @__PURE__ */ jsx6(ComboboxPrimitive.Root, { multiple, ...props, children })
|
|
332
|
-
}
|
|
333
|
-
) });
|
|
334
|
-
}
|
|
335
|
-
var comboboxTriggerVariants = cva4(
|
|
336
|
-
"group/combobox-trigger flex w-fit min-w-0 items-center justify-between rounded-full border border-line bg-canvas text-left font-normal whitespace-nowrap text-fg-primary shadow-none outline-none transition-[background-color,border-color,border-radius,box-shadow,color] select-none hover:border-line-strong focus-visible:border-line-focus focus-visible:inset-ring-1 focus-visible:inset-ring-line-focus data-focused:border-line-focus data-focused:inset-ring-1 data-focused:inset-ring-line-focus data-popup-open:rounded-2xl data-popup-open:border-line-focus data-popup-open:inset-ring-1 data-popup-open:inset-ring-line-focus disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-line-subtle disabled:bg-surface disabled:text-fg-caption-placeholder data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder data-placeholder:text-fg-caption-placeholder aria-invalid:border-line-danger aria-invalid:text-fg-danger aria-invalid:shadow-none data-[invalid=true]:border-line-danger data-[invalid=true]:text-fg-danger *:data-[slot=combobox-value]:line-clamp-1 *:data-[slot=combobox-value]:flex *:data-[slot=combobox-value]:min-w-0 *:data-[slot=combobox-value]:items-center *:data-[slot=combobox-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
337
|
-
{
|
|
338
|
-
variants: {
|
|
339
|
-
size: {
|
|
340
|
-
sm: "h-8 gap-2 px-3 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5",
|
|
341
|
-
md: "h-10 gap-2 px-3.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4",
|
|
342
|
-
lg: "h-12 gap-2.5 px-4 pr-5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5"
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
defaultVariants: {
|
|
346
|
-
size: "md"
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
);
|
|
350
|
-
var comboboxInputVariants = cva4(
|
|
351
|
-
"w-auto has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus",
|
|
352
|
-
{
|
|
353
|
-
variants: {
|
|
354
|
-
size: {
|
|
355
|
-
sm: "",
|
|
356
|
-
md: "",
|
|
357
|
-
lg: ""
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
defaultVariants: {
|
|
361
|
-
size: "md"
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
var comboboxContentVariants = cva4(
|
|
366
|
-
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width))] origin-(--transform-origin) overflow-hidden border border-line-subtle bg-canvas text-fg-primary shadow-(--elevation-e1-shadow) duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:mb-1 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
367
|
-
{
|
|
368
|
-
variants: {
|
|
369
|
-
size: {
|
|
370
|
-
sm: "rounded-lg p-1",
|
|
371
|
-
md: "rounded-xl p-1.5",
|
|
372
|
-
lg: "rounded-[18px] p-2"
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
defaultVariants: {
|
|
376
|
-
size: "md"
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
);
|
|
380
|
-
var comboboxItemVariants = cva4(
|
|
381
|
-
"group/combobox-item relative flex w-full cursor-pointer items-center font-normal text-fg-primary outline-none select-none data-highlighted:bg-surface data-disabled:pointer-events-none data-disabled:text-fg-caption-placeholder [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
382
|
-
{
|
|
383
|
-
variants: {
|
|
384
|
-
size: {
|
|
385
|
-
sm: "gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs",
|
|
386
|
-
md: "gap-2 rounded-md px-4 py-2 text-gdt-sm",
|
|
387
|
-
lg: "gap-2.5 rounded-md px-4 py-2.5 text-gdt-md"
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
defaultVariants: {
|
|
391
|
-
size: "md"
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
);
|
|
395
|
-
var comboboxChipsVariants = cva4(
|
|
396
|
-
"flex flex-wrap items-center gap-1 rounded-full border border-line bg-canvas bg-clip-padding text-fg-primary transition-[background-color,border-color,box-shadow,color] focus-within:border-line-focus focus-within:inset-ring-1 focus-within:inset-ring-line-focus has-aria-invalid:border-line-danger has-aria-invalid:text-fg-danger has-aria-invalid:shadow-none has-data-[slot=combobox-chip]:px-1 has-data-popup-open:rounded-2xl has-data-popup-open:border-line-focus has-data-popup-open:inset-ring-1 has-data-popup-open:inset-ring-line-focus",
|
|
397
|
-
{
|
|
398
|
-
variants: {
|
|
399
|
-
size: {
|
|
400
|
-
sm: "min-h-8 px-2.5 py-1 text-gdt-xs",
|
|
401
|
-
md: "min-h-10 px-3 py-1.5 text-gdt-sm",
|
|
402
|
-
lg: "min-h-12 px-4 py-2 text-gdt-md"
|
|
403
|
-
}
|
|
404
|
-
},
|
|
405
|
-
defaultVariants: {
|
|
406
|
-
size: "md"
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
);
|
|
410
|
-
var comboboxChipVariants = cva4(
|
|
411
|
-
"flex w-fit items-center justify-center gap-1 rounded-sm bg-surface font-medium whitespace-nowrap text-fg-primary has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
|
|
412
|
-
{
|
|
413
|
-
variants: {
|
|
414
|
-
size: {
|
|
415
|
-
sm: "h-5 px-1.5 text-gdt-xs",
|
|
416
|
-
md: "h-[calc(--spacing(5.25))] px-1.5 text-gdt-xs",
|
|
417
|
-
lg: "h-6 px-2 text-gdt-sm"
|
|
418
|
-
}
|
|
419
|
-
},
|
|
420
|
-
defaultVariants: {
|
|
421
|
-
size: "md"
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
);
|
|
425
|
-
function ComboboxValue({ ...props }) {
|
|
426
|
-
return /* @__PURE__ */ jsx6(ComboboxPrimitive.Value, { "data-slot": "combobox-value", ...props });
|
|
427
|
-
}
|
|
428
|
-
function ComboboxTrigger({
|
|
429
|
-
className,
|
|
430
|
-
children,
|
|
431
|
-
...props
|
|
432
|
-
}) {
|
|
433
|
-
const resolvedSize = useComponentSize();
|
|
434
|
-
return /* @__PURE__ */ jsxs2(
|
|
435
|
-
ComboboxPrimitive.Trigger,
|
|
436
|
-
{
|
|
437
|
-
"data-slot": "combobox-trigger",
|
|
438
|
-
"data-size": resolvedSize,
|
|
439
|
-
className: cn(comboboxTriggerVariants({ size: resolvedSize }), className),
|
|
440
|
-
...props,
|
|
441
|
-
children: [
|
|
442
|
-
children,
|
|
443
|
-
/* @__PURE__ */ jsx6(
|
|
444
|
-
ComboboxPrimitive.Icon,
|
|
445
|
-
{
|
|
446
|
-
render: /* @__PURE__ */ jsx6(ChevronDownIcon, { className: "text-line-strong transition-transform group-data-disabled/combobox-trigger:text-fg-caption-placeholder group-data-popup-open/combobox-trigger:rotate-180" })
|
|
447
|
-
}
|
|
448
|
-
)
|
|
449
|
-
]
|
|
450
|
-
}
|
|
451
|
-
);
|
|
452
|
-
}
|
|
453
|
-
function ComboboxClear({ className, ...props }) {
|
|
454
|
-
return /* @__PURE__ */ jsx6(
|
|
455
|
-
ComboboxPrimitive.Clear,
|
|
456
|
-
{
|
|
457
|
-
"data-slot": "combobox-clear",
|
|
458
|
-
className: cn(className),
|
|
459
|
-
...props,
|
|
460
|
-
render: /* @__PURE__ */ jsx6(InputGroupButton, { variant: "ghost", size: "icon-xs", children: /* @__PURE__ */ jsx6(XIcon, { className: "pointer-events-none" }) })
|
|
461
|
-
}
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
|
-
function ComboboxInput({
|
|
465
|
-
className,
|
|
466
|
-
children,
|
|
467
|
-
disabled = false,
|
|
468
|
-
showTrigger = true,
|
|
469
|
-
showClear = false,
|
|
470
|
-
...props
|
|
471
|
-
}) {
|
|
472
|
-
const resolvedSize = useComponentSize();
|
|
473
|
-
return /* @__PURE__ */ jsxs2(
|
|
474
|
-
InputGroup,
|
|
475
|
-
{
|
|
476
|
-
className: cn(comboboxInputVariants({ size: resolvedSize }), className),
|
|
477
|
-
children: [
|
|
478
|
-
/* @__PURE__ */ jsx6(
|
|
479
|
-
ComboboxPrimitive.Input,
|
|
480
|
-
{
|
|
481
|
-
render: /* @__PURE__ */ jsx6(InputGroupInput, { disabled }),
|
|
482
|
-
...props
|
|
483
|
-
}
|
|
484
|
-
),
|
|
485
|
-
/* @__PURE__ */ jsxs2(InputGroupAddon, { align: "inline-end", children: [
|
|
486
|
-
showTrigger && /* @__PURE__ */ jsx6(
|
|
487
|
-
InputGroupButton,
|
|
488
|
-
{
|
|
489
|
-
size: "icon-xs",
|
|
490
|
-
variant: "ghost",
|
|
491
|
-
render: /* @__PURE__ */ jsx6(ComboboxTrigger, {}),
|
|
492
|
-
"data-slot": "input-group-button",
|
|
493
|
-
className: "h-6 border-0 bg-transparent p-0 shadow-none inset-ring-0 group-has-data-[slot=combobox-clear]/input-group:hidden hover:border-transparent focus-visible:border-transparent focus-visible:inset-ring-0 data-popup-open:border-transparent data-popup-open:bg-transparent data-popup-open:inset-ring-0 data-pressed:bg-transparent",
|
|
494
|
-
disabled
|
|
495
|
-
}
|
|
496
|
-
),
|
|
497
|
-
showClear && /* @__PURE__ */ jsx6(ComboboxClear, { disabled })
|
|
498
|
-
] }),
|
|
499
|
-
children
|
|
500
|
-
]
|
|
501
|
-
}
|
|
502
|
-
);
|
|
503
|
-
}
|
|
504
|
-
function ComboboxContent({
|
|
505
|
-
className,
|
|
506
|
-
side = "bottom",
|
|
507
|
-
sideOffset = 6,
|
|
508
|
-
align = "start",
|
|
509
|
-
alignOffset = 0,
|
|
510
|
-
anchor,
|
|
511
|
-
...props
|
|
512
|
-
}) {
|
|
513
|
-
const resolvedSize = useComponentSize();
|
|
514
|
-
return /* @__PURE__ */ jsx6(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx6(
|
|
515
|
-
ComboboxPrimitive.Positioner,
|
|
516
|
-
{
|
|
517
|
-
side,
|
|
518
|
-
sideOffset,
|
|
519
|
-
align,
|
|
520
|
-
alignOffset,
|
|
521
|
-
anchor,
|
|
522
|
-
className: "isolate z-50",
|
|
523
|
-
children: /* @__PURE__ */ jsx6(
|
|
524
|
-
ComboboxPrimitive.Popup,
|
|
525
|
-
{
|
|
526
|
-
"data-slot": "combobox-content",
|
|
527
|
-
"data-chips": !!anchor,
|
|
528
|
-
className: cn(
|
|
529
|
-
"group/combobox-content",
|
|
530
|
-
comboboxContentVariants({ size: resolvedSize }),
|
|
531
|
-
className
|
|
532
|
-
),
|
|
533
|
-
...props
|
|
534
|
-
}
|
|
535
|
-
)
|
|
536
|
-
}
|
|
537
|
-
) });
|
|
538
|
-
}
|
|
539
|
-
function ComboboxList({ className, ...props }) {
|
|
540
|
-
return /* @__PURE__ */ jsx6(
|
|
541
|
-
ComboboxPrimitive.List,
|
|
542
|
-
{
|
|
543
|
-
"data-slot": "combobox-list",
|
|
544
|
-
className: cn(
|
|
545
|
-
"no-scrollbar max-h-(--available-height) space-y-0.5 scroll-py-1 overflow-y-auto overscroll-contain data-empty:p-0",
|
|
546
|
-
className
|
|
547
|
-
),
|
|
548
|
-
...props
|
|
549
|
-
}
|
|
550
|
-
);
|
|
551
|
-
}
|
|
552
|
-
function ComboboxItem({
|
|
553
|
-
className,
|
|
554
|
-
children,
|
|
555
|
-
...props
|
|
556
|
-
}) {
|
|
557
|
-
const { multiple } = React.useContext(ComboboxSelectionContext);
|
|
558
|
-
const resolvedSize = useComponentSize();
|
|
559
|
-
return /* @__PURE__ */ jsxs2(
|
|
560
|
-
ComboboxPrimitive.Item,
|
|
561
|
-
{
|
|
562
|
-
"data-slot": "combobox-item",
|
|
563
|
-
className: cn(
|
|
564
|
-
comboboxItemVariants({ size: resolvedSize }),
|
|
565
|
-
!multiple && "data-selected:bg-surface-brand-subtle data-selected:font-medium data-selected:text-fg-brand",
|
|
566
|
-
className
|
|
567
|
-
),
|
|
568
|
-
...props,
|
|
569
|
-
children: [
|
|
570
|
-
multiple ? /* @__PURE__ */ jsx6(
|
|
571
|
-
ComboboxPrimitive.ItemIndicator,
|
|
572
|
-
{
|
|
573
|
-
keepMounted: true,
|
|
574
|
-
className: "flex size-5 shrink-0 items-center justify-center rounded-sm border border-line bg-canvas text-transparent transition-[background-color,border-color,color] group-data-selected/combobox-item:border-action-primary group-data-selected/combobox-item:bg-action-primary group-data-selected/combobox-item:text-fg-on-brand group-data-disabled/combobox-item:border-line-subtle group-data-disabled/combobox-item:bg-surface group-data-disabled/combobox-item:text-fg-caption-placeholder [&>svg]:size-3",
|
|
575
|
-
children: /* @__PURE__ */ jsx6(CheckIcon, {})
|
|
576
|
-
}
|
|
577
|
-
) : null,
|
|
578
|
-
/* @__PURE__ */ jsx6("span", { className: "flex min-w-0 flex-1 shrink-0 gap-2 whitespace-nowrap", children })
|
|
579
|
-
]
|
|
580
|
-
}
|
|
581
|
-
);
|
|
582
|
-
}
|
|
583
|
-
function ComboboxGroup({ className, ...props }) {
|
|
584
|
-
return /* @__PURE__ */ jsx6(
|
|
585
|
-
ComboboxPrimitive.Group,
|
|
586
|
-
{
|
|
587
|
-
"data-slot": "combobox-group",
|
|
588
|
-
className: cn("scroll-my-1 space-y-0.5", className),
|
|
589
|
-
...props
|
|
590
|
-
}
|
|
591
|
-
);
|
|
592
|
-
}
|
|
593
|
-
function ComboboxLabel({
|
|
594
|
-
className,
|
|
595
|
-
...props
|
|
596
|
-
}) {
|
|
597
|
-
return /* @__PURE__ */ jsx6(
|
|
598
|
-
ComboboxPrimitive.GroupLabel,
|
|
599
|
-
{
|
|
600
|
-
"data-slot": "combobox-label",
|
|
601
|
-
className: cn("px-3 py-1 text-gdt-xs text-fg-secondary", className),
|
|
602
|
-
...props
|
|
603
|
-
}
|
|
604
|
-
);
|
|
605
|
-
}
|
|
606
|
-
function ComboboxCollection({ ...props }) {
|
|
607
|
-
return /* @__PURE__ */ jsx6(ComboboxPrimitive.Collection, { "data-slot": "combobox-collection", ...props });
|
|
608
|
-
}
|
|
609
|
-
function ComboboxEmpty({ className, ...props }) {
|
|
610
|
-
return /* @__PURE__ */ jsx6(
|
|
611
|
-
ComboboxPrimitive.Empty,
|
|
612
|
-
{
|
|
613
|
-
"data-slot": "combobox-empty",
|
|
614
|
-
className: cn(
|
|
615
|
-
"hidden w-full justify-center py-2 text-center text-gdt-sm text-fg-secondary group-data-empty/combobox-content:flex",
|
|
616
|
-
className
|
|
617
|
-
),
|
|
618
|
-
...props
|
|
619
|
-
}
|
|
620
|
-
);
|
|
621
|
-
}
|
|
622
|
-
function ComboboxSeparator({
|
|
623
|
-
className,
|
|
624
|
-
...props
|
|
625
|
-
}) {
|
|
626
|
-
return /* @__PURE__ */ jsx6(
|
|
627
|
-
ComboboxPrimitive.Separator,
|
|
628
|
-
{
|
|
629
|
-
"data-slot": "combobox-separator",
|
|
630
|
-
className: cn("pointer-events-none my-1 h-px bg-line-subtle", className),
|
|
631
|
-
...props
|
|
632
|
-
}
|
|
633
|
-
);
|
|
634
|
-
}
|
|
635
|
-
function ComboboxChips({
|
|
636
|
-
className,
|
|
637
|
-
...props
|
|
638
|
-
}) {
|
|
639
|
-
const resolvedSize = useComponentSize();
|
|
640
|
-
return /* @__PURE__ */ jsx6(
|
|
641
|
-
ComboboxPrimitive.Chips,
|
|
642
|
-
{
|
|
643
|
-
"data-slot": "combobox-chips",
|
|
644
|
-
className: cn(comboboxChipsVariants({ size: resolvedSize }), className),
|
|
645
|
-
...props
|
|
646
|
-
}
|
|
647
|
-
);
|
|
648
|
-
}
|
|
649
|
-
function ComboboxChip({
|
|
650
|
-
className,
|
|
651
|
-
children,
|
|
652
|
-
showRemove = true,
|
|
653
|
-
...props
|
|
654
|
-
}) {
|
|
655
|
-
const resolvedSize = useComponentSize();
|
|
656
|
-
return /* @__PURE__ */ jsxs2(
|
|
657
|
-
ComboboxPrimitive.Chip,
|
|
658
|
-
{
|
|
659
|
-
"data-slot": "combobox-chip",
|
|
660
|
-
className: cn(comboboxChipVariants({ size: resolvedSize }), className),
|
|
661
|
-
...props,
|
|
662
|
-
children: [
|
|
663
|
-
children,
|
|
664
|
-
showRemove && /* @__PURE__ */ jsx6(
|
|
665
|
-
ComboboxPrimitive.ChipRemove,
|
|
666
|
-
{
|
|
667
|
-
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
668
|
-
"data-slot": "combobox-chip-remove",
|
|
669
|
-
render: /* @__PURE__ */ jsx6(Button, { variant: "ghost", size: "icon-xs", children: /* @__PURE__ */ jsx6(XIcon, { className: "pointer-events-none" }) })
|
|
670
|
-
}
|
|
671
|
-
)
|
|
672
|
-
]
|
|
673
|
-
}
|
|
674
|
-
);
|
|
675
|
-
}
|
|
676
|
-
function ComboboxChipsInput({
|
|
677
|
-
className,
|
|
678
|
-
...props
|
|
679
|
-
}) {
|
|
680
|
-
return /* @__PURE__ */ jsx6(
|
|
681
|
-
ComboboxPrimitive.Input,
|
|
682
|
-
{
|
|
683
|
-
"data-slot": "combobox-chip-input",
|
|
684
|
-
className: cn(
|
|
685
|
-
"min-w-16 flex-1 bg-transparent text-fg-primary outline-none placeholder:text-fg-muted",
|
|
686
|
-
className
|
|
687
|
-
),
|
|
688
|
-
...props
|
|
689
|
-
}
|
|
690
|
-
);
|
|
691
|
-
}
|
|
692
|
-
function useComboboxAnchor() {
|
|
693
|
-
return React.useRef(null);
|
|
694
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Combobox,
|
|
4
|
+
ComboboxChip,
|
|
5
|
+
ComboboxChips,
|
|
6
|
+
ComboboxChipsInput,
|
|
7
|
+
ComboboxCollection,
|
|
8
|
+
ComboboxContent,
|
|
9
|
+
ComboboxEmpty,
|
|
10
|
+
ComboboxGroup,
|
|
11
|
+
ComboboxInput,
|
|
12
|
+
ComboboxItem,
|
|
13
|
+
ComboboxLabel,
|
|
14
|
+
ComboboxList,
|
|
15
|
+
ComboboxSeparator,
|
|
16
|
+
ComboboxTrigger,
|
|
17
|
+
ComboboxValue,
|
|
18
|
+
useComboboxAnchor
|
|
19
|
+
} from "./chunk-VGR4ZWJ3.js";
|
|
20
|
+
import "./chunk-6ZSGQHH2.js";
|
|
21
|
+
import "./chunk-KSMDANKI.js";
|
|
22
|
+
import "./chunk-MEKCCOP5.js";
|
|
23
|
+
import "./chunk-3ACQVT7A.js";
|
|
24
|
+
import "./chunk-B4H6RNDH.js";
|
|
25
|
+
import "./chunk-HL3ZSYES.js";
|
|
26
|
+
import "./chunk-Y4TTYVNE.js";
|
|
695
27
|
export {
|
|
696
28
|
Combobox,
|
|
697
29
|
ComboboxChip,
|