@giddaa-housing/ui 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/shared.css +1 -1
- package/css/giddaa.css +12 -2
- package/dist/accordion.d.ts +9 -10
- package/dist/accordion.js +41 -87
- package/dist/activity-timeline.d.ts +12 -16
- package/dist/activity-timeline.js +83 -198
- package/dist/alert.d.ts +8 -9
- package/dist/alert.js +53 -111
- package/dist/auth-layout.d.ts +4 -4
- package/dist/auth-layout.js +143 -294
- package/dist/avatar.d.ts +6 -6
- package/dist/avatar.js +49 -19
- package/dist/badge.d.ts +12 -14
- package/dist/badge.js +71 -11
- package/dist/bar-chart.d.ts +65 -67
- package/dist/bar-chart.js +232 -207
- package/dist/breadcrumb.d.ts +5 -5
- package/dist/breadcrumb.js +56 -118
- package/dist/bullet-chart.d.ts +41 -37
- package/dist/bullet-chart.js +125 -148
- package/dist/button-BZIeyUw6.d.ts +17 -0
- package/dist/button-group.d.ts +13 -16
- package/dist/button-group.js +39 -88
- package/dist/button.d.ts +2 -19
- package/dist/button.js +94 -13
- package/dist/calendar.d.ts +6 -6
- package/dist/calendar.js +138 -17
- package/dist/card.d.ts +14 -16
- package/dist/card.js +59 -145
- package/dist/carousel.d.ts +34 -35
- package/dist/carousel.js +335 -20
- package/dist/chart.d.ts +90 -63
- package/dist/chart.js +573 -28
- package/dist/checkbox.d.ts +10 -12
- package/dist/checkbox.js +82 -47
- package/dist/cn-BI_4DMBf.js +23 -0
- package/dist/collapsible.d.ts +7 -8
- package/dist/collapsible.js +22 -47
- package/dist/combobox.d.ts +10 -10
- package/dist/combobox.js +236 -44
- package/dist/cta.d.ts +12 -14
- package/dist/cta.js +175 -341
- package/dist/currency-selector.d.ts +31 -32
- package/dist/currency-selector.js +106 -184
- package/dist/data-table.d.ts +168 -0
- package/dist/data-table.js +676 -0
- package/dist/date-picker.d.ts +22 -23
- package/dist/date-picker.js +119 -192
- package/dist/details-card.d.ts +7 -7
- package/dist/details-card.js +104 -253
- package/dist/dialog.d.ts +13 -14
- package/dist/dialog.js +116 -209
- package/dist/dropdown-menu.d.ts +13 -13
- package/dist/dropdown-menu.js +180 -37
- package/dist/dropzone.d.ts +55 -55
- package/dist/dropzone.js +327 -439
- package/dist/editorial-card.d.ts +23 -25
- package/dist/editorial-card.js +129 -296
- package/dist/empty-state.d.ts +8 -9
- package/dist/empty-state.js +48 -105
- package/dist/field.d.ts +23 -25
- package/dist/field.js +110 -221
- package/dist/filter.d.ts +118 -0
- package/dist/filter.js +775 -0
- package/dist/footer.d.ts +8 -15
- package/dist/footer.js +197 -400
- package/dist/funnel-chart.d.ts +49 -48
- package/dist/funnel-chart.js +170 -189
- package/dist/gallery-indicator.d.ts +11 -12
- package/dist/gallery-indicator.js +75 -12
- package/dist/heatmap-chart.d.ts +47 -50
- package/dist/heatmap-chart.js +186 -237
- package/dist/infotip.d.ts +8 -9
- package/dist/infotip.js +33 -59
- package/dist/input-CfoEJ8A6.d.ts +12 -0
- package/dist/input-group.d.ts +16 -20
- package/dist/input-group.js +99 -23
- package/dist/input-size-context-C-SFx9sx.d.ts +10 -0
- package/dist/input-size-context.d.ts +2 -11
- package/dist/input-size-context.js +17 -9
- package/dist/input.d.ts +2 -13
- package/dist/input.js +27 -11
- package/dist/item.d.ts +7 -8
- package/dist/item.js +22 -59
- package/dist/kpi-card.d.ts +18 -20
- package/dist/kpi-card.js +84 -192
- package/dist/label.d.ts +6 -6
- package/dist/label.js +40 -8
- package/dist/line-chart.d.ts +200 -129
- package/dist/line-chart.js +330 -105
- package/dist/list-item.d.ts +22 -0
- package/dist/list-item.js +84 -0
- package/dist/logo.d.ts +4 -4
- package/dist/logo.js +92 -9
- package/dist/map-indicator.d.ts +7 -7
- package/dist/map-indicator.js +80 -106
- package/dist/match.d.ts +10 -11
- package/dist/match.js +62 -107
- package/dist/media-gallery-hero.d.ts +40 -42
- package/dist/media-gallery-hero.js +182 -343
- package/dist/media-player.d.ts +17 -17
- package/dist/media-player.js +873 -1348
- package/dist/multi-step-form.d.ts +56 -0
- package/dist/multi-step-form.js +342 -0
- package/dist/number-input.d.ts +34 -34
- package/dist/number-input.js +64 -117
- package/dist/page-header.d.ts +10 -11
- package/dist/page-header.js +34 -79
- package/dist/pagination.d.ts +17 -21
- package/dist/pagination.js +132 -207
- package/dist/password-input.d.ts +5 -13
- package/dist/password-input.js +31 -55
- package/dist/phone-input.d.ts +19 -20
- package/dist/phone-input.js +226 -344
- package/dist/photo-gallery.d.ts +19 -19
- package/dist/photo-gallery.js +313 -449
- package/dist/picker-lzgmsNfG.js +32 -0
- package/dist/pie-chart.d.ts +121 -90
- package/dist/pie-chart.js +183 -149
- package/dist/popover.d.ts +9 -9
- package/dist/popover.js +72 -23
- package/dist/price-tag.d.ts +26 -27
- package/dist/price-tag.js +113 -173
- package/dist/progress.d.ts +16 -17
- package/dist/progress.js +169 -24
- package/dist/property-listing-card.d.ts +14 -17
- package/dist/property-listing-card.js +102 -220
- package/dist/purchase-option-card.d.ts +79 -0
- package/dist/purchase-option-card.js +176 -0
- package/dist/radar-chart.d.ts +29 -31
- package/dist/radar-chart.js +162 -137
- package/dist/radio-group.d.ts +11 -13
- package/dist/radio-group.js +46 -60
- package/dist/review-block.d.ts +14 -16
- package/dist/review-block.js +154 -10
- package/dist/rich-text-editor.d.ts +30 -14
- package/dist/rich-text-editor.js +592 -716
- package/dist/scatter-chart.d.ts +45 -47
- package/dist/scatter-chart.js +236 -240
- package/dist/search-input.d.ts +8 -16
- package/dist/search-input.js +57 -109
- package/dist/select.d.ts +8 -8
- package/dist/select.js +144 -27
- package/dist/separator.d.ts +8 -9
- package/dist/separator.js +32 -8
- package/dist/sheet.d.ts +11 -11
- package/dist/sheet.js +103 -24
- package/dist/sidebar.d.ts +32 -37
- package/dist/sidebar.js +364 -634
- package/dist/size-context-D4mYvcg8.d.ts +10 -0
- package/dist/size-context.d.ts +2 -11
- package/dist/size-context.js +17 -9
- package/dist/skeleton.d.ts +4 -5
- package/dist/skeleton.js +12 -8
- package/dist/slider.d.ts +8 -9
- package/dist/slider.js +64 -135
- package/dist/sparkline.d.ts +68 -58
- package/dist/sparkline.js +315 -251
- package/dist/stepper.d.ts +23 -24
- package/dist/stepper.js +149 -246
- package/dist/styles.css +1004 -116
- package/dist/switch.d.ts +10 -12
- package/dist/switch.js +48 -70
- package/dist/table-card.d.ts +35 -0
- package/dist/table-card.js +125 -0
- package/dist/table.d.ts +18 -14
- package/dist/table.js +117 -154
- package/dist/tabs.d.ts +33 -15
- package/dist/tabs.js +110 -18
- package/dist/tag.d.ts +21 -23
- package/dist/tag.js +103 -159
- package/dist/testimonial-block.d.ts +18 -19
- package/dist/testimonial-block.js +189 -358
- package/dist/textarea-IS_D8pXf.d.ts +11 -0
- package/dist/textarea.d.ts +2 -12
- package/dist/textarea.js +24 -11
- package/dist/time-picker.d.ts +11 -11
- package/dist/time-picker.js +245 -302
- package/dist/toast.d.ts +16 -18
- package/dist/toast.js +154 -205
- package/dist/tooltip.d.ts +8 -9
- package/dist/tooltip.js +37 -12
- package/dist/tree-map.d.ts +59 -62
- package/dist/tree-map.js +226 -269
- package/dist/use-uncontrolled-CLfM1XbB.js +21 -0
- package/dist/waterfall-chart.d.ts +94 -97
- package/dist/waterfall-chart.js +455 -552
- package/package.json +36 -9
- package/dist/accordion.js.map +0 -1
- package/dist/activity-timeline.js.map +0 -1
- package/dist/alert.js.map +0 -1
- package/dist/auth-layout.js.map +0 -1
- package/dist/avatar.js.map +0 -1
- package/dist/badge.js.map +0 -1
- package/dist/bar-chart.js.map +0 -1
- package/dist/breadcrumb.js.map +0 -1
- package/dist/bullet-chart.js.map +0 -1
- package/dist/button-group.js.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/calendar.js.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/carousel.js.map +0 -1
- package/dist/chart.js.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/chunk-322YCNVL.js +0 -278
- package/dist/chunk-322YCNVL.js.map +0 -1
- package/dist/chunk-3ACQVT7A.js +0 -25
- package/dist/chunk-3ACQVT7A.js.map +0 -1
- package/dist/chunk-3T65TLJX.js +0 -334
- package/dist/chunk-3T65TLJX.js.map +0 -1
- package/dist/chunk-6ZSGQHH2.js +0 -192
- package/dist/chunk-6ZSGQHH2.js.map +0 -1
- package/dist/chunk-7TBMLFGW.js +0 -41
- package/dist/chunk-7TBMLFGW.js.map +0 -1
- package/dist/chunk-B4H6RNDH.js +0 -135
- package/dist/chunk-B4H6RNDH.js.map +0 -1
- package/dist/chunk-BUXCGZ6X.js +0 -219
- package/dist/chunk-BUXCGZ6X.js.map +0 -1
- package/dist/chunk-CHII2QHH.js +0 -58
- package/dist/chunk-CHII2QHH.js.map +0 -1
- package/dist/chunk-DMNOXRRW.js +0 -147
- package/dist/chunk-DMNOXRRW.js.map +0 -1
- package/dist/chunk-EFSOSSIC.js +0 -130
- package/dist/chunk-EFSOSSIC.js.map +0 -1
- package/dist/chunk-FZDSVMKY.js +0 -363
- package/dist/chunk-FZDSVMKY.js.map +0 -1
- package/dist/chunk-GJOFIJS3.js +0 -246
- package/dist/chunk-GJOFIJS3.js.map +0 -1
- package/dist/chunk-HL3ZSYES.js +0 -23
- package/dist/chunk-HL3ZSYES.js.map +0 -1
- package/dist/chunk-JVLUBAPB.js +0 -129
- package/dist/chunk-JVLUBAPB.js.map +0 -1
- package/dist/chunk-KDPYSOYZ.js +0 -64
- package/dist/chunk-KDPYSOYZ.js.map +0 -1
- package/dist/chunk-KSMDANKI.js +0 -43
- package/dist/chunk-KSMDANKI.js.map +0 -1
- package/dist/chunk-MEKCCOP5.js +0 -46
- package/dist/chunk-MEKCCOP5.js.map +0 -1
- package/dist/chunk-NOFXVRWL.js +0 -451
- package/dist/chunk-NOFXVRWL.js.map +0 -1
- package/dist/chunk-PC5MHNVA.js +0 -171
- package/dist/chunk-PC5MHNVA.js.map +0 -1
- package/dist/chunk-QKAQZ2GU.js +0 -122
- package/dist/chunk-QKAQZ2GU.js.map +0 -1
- package/dist/chunk-QZHSHSVV.js +0 -26
- package/dist/chunk-QZHSHSVV.js.map +0 -1
- package/dist/chunk-RBMK26XD.js +0 -19
- package/dist/chunk-RBMK26XD.js.map +0 -1
- package/dist/chunk-SFNJGF6M.js +0 -262
- package/dist/chunk-SFNJGF6M.js.map +0 -1
- package/dist/chunk-UJJNLGTM.js +0 -112
- package/dist/chunk-UJJNLGTM.js.map +0 -1
- package/dist/chunk-VGR4ZWJ3.js +0 -418
- package/dist/chunk-VGR4ZWJ3.js.map +0 -1
- package/dist/chunk-XG47P6D4.js +0 -99
- package/dist/chunk-XG47P6D4.js.map +0 -1
- package/dist/chunk-XZZAHNVM.js +0 -21
- package/dist/chunk-XZZAHNVM.js.map +0 -1
- package/dist/chunk-Y4TTYVNE.js +0 -36
- package/dist/chunk-Y4TTYVNE.js.map +0 -1
- package/dist/chunk-YDWIHW6Q.js +0 -69
- package/dist/chunk-YDWIHW6Q.js.map +0 -1
- package/dist/collapsible.js.map +0 -1
- package/dist/combobox.js.map +0 -1
- package/dist/cta.js.map +0 -1
- package/dist/currency-selector.js.map +0 -1
- package/dist/date-picker.js.map +0 -1
- package/dist/details-card.js.map +0 -1
- package/dist/dialog.js.map +0 -1
- package/dist/dropdown-menu.js.map +0 -1
- package/dist/dropzone.js.map +0 -1
- package/dist/editorial-card.js.map +0 -1
- package/dist/empty-state.js.map +0 -1
- package/dist/field.js.map +0 -1
- package/dist/footer.js.map +0 -1
- package/dist/funnel-chart.js.map +0 -1
- package/dist/gallery-indicator.js.map +0 -1
- package/dist/heatmap-chart.js.map +0 -1
- package/dist/infotip.js.map +0 -1
- package/dist/input-group.js.map +0 -1
- package/dist/input-size-context.js.map +0 -1
- package/dist/input.js.map +0 -1
- package/dist/item.js.map +0 -1
- package/dist/kpi-card.js.map +0 -1
- package/dist/label.js.map +0 -1
- package/dist/line-chart.js.map +0 -1
- package/dist/logo.js.map +0 -1
- package/dist/map-indicator.js.map +0 -1
- package/dist/match.js.map +0 -1
- package/dist/media-gallery-hero.js.map +0 -1
- package/dist/media-player.js.map +0 -1
- package/dist/number-input.js.map +0 -1
- package/dist/page-header.js.map +0 -1
- package/dist/pagination.js.map +0 -1
- package/dist/password-input.js.map +0 -1
- package/dist/phone-input.js.map +0 -1
- package/dist/photo-gallery.js.map +0 -1
- package/dist/pie-chart.js.map +0 -1
- package/dist/popover.js.map +0 -1
- package/dist/price-tag.js.map +0 -1
- package/dist/progress.js.map +0 -1
- package/dist/property-listing-card.js.map +0 -1
- package/dist/radar-chart.js.map +0 -1
- package/dist/radio-group.js.map +0 -1
- package/dist/review-block.js.map +0 -1
- package/dist/rich-text-editor.js.map +0 -1
- package/dist/scatter-chart.js.map +0 -1
- package/dist/search-input.js.map +0 -1
- package/dist/select.js.map +0 -1
- package/dist/separator.js.map +0 -1
- package/dist/sheet.js.map +0 -1
- package/dist/sidebar.js.map +0 -1
- package/dist/size-context.js.map +0 -1
- package/dist/skeleton.js.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/sparkline.js.map +0 -1
- package/dist/stepper.js.map +0 -1
- package/dist/switch.js.map +0 -1
- package/dist/tab-list.d.ts +0 -38
- package/dist/tab-list.js +0 -123
- package/dist/tab-list.js.map +0 -1
- package/dist/table.js.map +0 -1
- package/dist/tabs.js.map +0 -1
- package/dist/tag.js.map +0 -1
- package/dist/testimonial-block.js.map +0 -1
- package/dist/textarea.js.map +0 -1
- package/dist/time-picker.js.map +0 -1
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.js.map +0 -1
- package/dist/tree-map.js.map +0 -1
- package/dist/waterfall-chart.js.map +0 -1
package/dist/checkbox.js
CHANGED
|
@@ -1,52 +1,87 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-HL3ZSYES.js";
|
|
5
|
-
import {
|
|
6
|
-
cn
|
|
7
|
-
} from "./chunk-Y4TTYVNE.js";
|
|
8
|
-
|
|
9
|
-
// src/checkbox.tsx
|
|
10
|
-
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
11
|
-
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
12
|
-
import { cva } from "class-variance-authority";
|
|
2
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
+
import { useComponentSize } from "./size-context.js";
|
|
13
4
|
import { CheckIcon } from "lucide-react";
|
|
14
5
|
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
8
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
9
|
+
//#region src/checkbox.tsx
|
|
10
|
+
const checkboxVariants = cva("peer group/checkbox relative flex shrink-0 items-center justify-center rounded-sm border bg-canvas text-transparent outline-none transition-[background-color,border-color,box-shadow,color] 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)] border-line data-unchecked:hover:border-line-focus data-unchecked:hover:bg-surface-brand-subtle data-checked:border-action-primary data-checked:bg-action-primary data-checked:text-fg-on-brand data-disabled:cursor-not-allowed data-disabled:border-line-subtle data-disabled:bg-surface data-disabled:text-fg-caption-placeholder size-5 [--checkbox-icon-size:0.75rem] group-data-[size=sm]/field:size-4 group-data-[size=sm]/field:[--checkbox-icon-size:0.625rem] group-data-[size=md]/field:size-5 group-data-[size=md]/field:[--checkbox-icon-size:0.75rem] group-data-[size=lg]/field:size-6 group-data-[size=lg]/field:[--checkbox-icon-size:0.875rem]", { variants: { size: {
|
|
11
|
+
sm: "size-4 [--checkbox-icon-size:0.625rem]",
|
|
12
|
+
md: "size-5 [--checkbox-icon-size:0.75rem]",
|
|
13
|
+
lg: "size-6 [--checkbox-icon-size:0.875rem]"
|
|
14
|
+
} } });
|
|
15
|
+
/**
|
|
16
|
+
* Compose with the shared field primitives for label and helper text.
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Field orientation="horizontal" size="sm">
|
|
20
|
+
* <Checkbox id="terms" />
|
|
21
|
+
* <FieldContent>
|
|
22
|
+
* <FieldLabel htmlFor="terms">Checkbox label</FieldLabel>
|
|
23
|
+
* <FieldDescription>Helper description text.</FieldDescription>
|
|
24
|
+
* </FieldContent>
|
|
25
|
+
* </Field>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Group multiple checkboxes with the field set primitives.
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <FieldSet>
|
|
32
|
+
* <FieldLegend variant="label">Show these items on the desktop:</FieldLegend>
|
|
33
|
+
* <FieldDescription>
|
|
34
|
+
* Select the items you want to show on the desktop.
|
|
35
|
+
* </FieldDescription>
|
|
36
|
+
* <FieldGroup className="gap-3">
|
|
37
|
+
* <Field orientation="horizontal">
|
|
38
|
+
* <Checkbox id="desktop-hard-disks" name="desktop-hard-disks" defaultChecked />
|
|
39
|
+
* <FieldLabel htmlFor="desktop-hard-disks" className="font-normal">
|
|
40
|
+
* Hard disks
|
|
41
|
+
* </FieldLabel>
|
|
42
|
+
* </Field>
|
|
43
|
+
* <Field orientation="horizontal">
|
|
44
|
+
* <Checkbox
|
|
45
|
+
* id="desktop-external-disks"
|
|
46
|
+
* name="desktop-external-disks"
|
|
47
|
+
* defaultChecked
|
|
48
|
+
* />
|
|
49
|
+
* <FieldLabel htmlFor="desktop-external-disks" className="font-normal">
|
|
50
|
+
* External disks
|
|
51
|
+
* </FieldLabel>
|
|
52
|
+
* </Field>
|
|
53
|
+
* <Field orientation="horizontal">
|
|
54
|
+
* <Checkbox id="desktop-cds-dvds-ipods" name="desktop-cds-dvds-ipods" />
|
|
55
|
+
* <FieldLabel htmlFor="desktop-cds-dvds-ipods" className="font-normal">
|
|
56
|
+
* CDs, DVDs, and iPods
|
|
57
|
+
* </FieldLabel>
|
|
58
|
+
* </Field>
|
|
59
|
+
* <Field orientation="horizontal">
|
|
60
|
+
* <Checkbox
|
|
61
|
+
* id="desktop-connected-servers"
|
|
62
|
+
* name="desktop-connected-servers"
|
|
63
|
+
* />
|
|
64
|
+
* <FieldLabel htmlFor="desktop-connected-servers" className="font-normal">
|
|
65
|
+
* Connected servers
|
|
66
|
+
* </FieldLabel>
|
|
67
|
+
* </Field>
|
|
68
|
+
* </FieldGroup>
|
|
69
|
+
* </FieldSet>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
27
72
|
function Checkbox({ className, size, ...props }) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
className: "grid place-content-center text-current transition-none [&>svg]:size-(--checkbox-icon-size)",
|
|
41
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
);
|
|
73
|
+
const resolvedSize = useComponentSize(size);
|
|
74
|
+
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
75
|
+
"data-slot": "checkbox",
|
|
76
|
+
"data-size": resolvedSize,
|
|
77
|
+
className: cn(checkboxVariants({ size: resolvedSize }), className),
|
|
78
|
+
...props,
|
|
79
|
+
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
80
|
+
"data-slot": "checkbox-indicator",
|
|
81
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-(--checkbox-icon-size)",
|
|
82
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
83
|
+
})
|
|
84
|
+
});
|
|
46
85
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
CheckboxGroup,
|
|
50
|
-
checkboxVariants
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=checkbox.js.map
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Checkbox, CheckboxGroup, checkboxVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
//#region src/lib/cn.ts
|
|
4
|
+
const twMerge = extendTailwindMerge({ extend: { classGroups: { "font-size": [{ text: [
|
|
5
|
+
"gdt-display",
|
|
6
|
+
"gdt-h1",
|
|
7
|
+
"gdt-h2",
|
|
8
|
+
"gdt-h3",
|
|
9
|
+
"gdt-h4",
|
|
10
|
+
"gdt-h5",
|
|
11
|
+
"gdt-xl",
|
|
12
|
+
"gdt-lg",
|
|
13
|
+
"gdt-md",
|
|
14
|
+
"gdt-sm",
|
|
15
|
+
"gdt-xs",
|
|
16
|
+
"gdt-subtext",
|
|
17
|
+
"gdt-capitalized"
|
|
18
|
+
] }] } } });
|
|
19
|
+
function cn(...inputs) {
|
|
20
|
+
return twMerge(clsx(inputs));
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { cn as t };
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
1
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
2
|
+
//#region src/collapsible.d.ts
|
|
3
|
+
declare function Collapsible({ className, ...props }: Collapsible$1.Root.Props): import("react").JSX.Element;
|
|
4
|
+
declare function CollapsibleTrigger({ className, ...props }: Collapsible$1.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
declare function CollapsibleContent({ className, ...props }: Collapsible$1.Panel.Props): import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
package/dist/collapsible.js
CHANGED
|
@@ -1,53 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-Y4TTYVNE.js";
|
|
5
|
-
|
|
6
|
-
// src/collapsible.tsx
|
|
7
|
-
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
2
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
8
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
5
|
+
//#region src/collapsible.tsx
|
|
9
6
|
function Collapsible({ className, ...props }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
7
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
8
|
+
"data-slot": "collapsible",
|
|
9
|
+
className: cn("group/collapsible", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
18
12
|
}
|
|
19
|
-
function CollapsibleTrigger({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "collapsible-trigger",
|
|
27
|
-
className: cn("group/collapsible-trigger", className),
|
|
28
|
-
...props
|
|
29
|
-
}
|
|
30
|
-
);
|
|
13
|
+
function CollapsibleTrigger({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
|
|
15
|
+
"data-slot": "collapsible-trigger",
|
|
16
|
+
className: cn("group/collapsible-trigger", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
31
19
|
}
|
|
32
|
-
function CollapsibleContent({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{
|
|
39
|
-
"data-slot": "collapsible-content",
|
|
40
|
-
className: cn(
|
|
41
|
-
"h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden='until-found'])]:hidden",
|
|
42
|
-
className
|
|
43
|
-
),
|
|
44
|
-
...props
|
|
45
|
-
}
|
|
46
|
-
);
|
|
20
|
+
function CollapsibleContent({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
22
|
+
"data-slot": "collapsible-content",
|
|
23
|
+
className: cn("h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-150 ease-out data-ending-style:h-0 data-starting-style:h-0 [&[hidden]:not([hidden='until-found'])]:hidden", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
47
26
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
CollapsibleContent,
|
|
51
|
-
CollapsibleTrigger
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=collapsible.js.map
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
package/dist/combobox.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as React from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { t as ComponentSize } from "./size-context-D4mYvcg8.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
4
|
+
//#region src/combobox.d.ts
|
|
5
5
|
type ComboboxSize = ComponentSize;
|
|
6
6
|
declare function Combobox<Value, Multiple extends boolean | undefined = false>({ multiple, children, size, ...props }: Combobox$1.Root.Props<Value, Multiple> & {
|
|
7
|
-
|
|
7
|
+
size?: ComboboxSize;
|
|
8
8
|
}): React.JSX.Element;
|
|
9
9
|
declare function ComboboxValue({ ...props }: Combobox$1.Value.Props): React.JSX.Element;
|
|
10
10
|
declare function ComboboxTrigger({ className, children, ...props }: Combobox$1.Trigger.Props): React.JSX.Element;
|
|
11
11
|
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: Combobox$1.Input.Props & {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
showTrigger?: boolean;
|
|
13
|
+
showClear?: boolean;
|
|
14
14
|
}): React.JSX.Element;
|
|
15
15
|
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): React.JSX.Element;
|
|
16
16
|
declare function ComboboxList({ className, ...props }: Combobox$1.List.Props): React.JSX.Element;
|
|
@@ -22,9 +22,9 @@ declare function ComboboxEmpty({ className, ...props }: Combobox$1.Empty.Props):
|
|
|
22
22
|
declare function ComboboxSeparator({ className, ...props }: Combobox$1.Separator.Props): React.JSX.Element;
|
|
23
23
|
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof Combobox$1.Chips> & Combobox$1.Chips.Props): React.JSX.Element;
|
|
24
24
|
declare function ComboboxChip({ className, children, showRemove, ...props }: Combobox$1.Chip.Props & {
|
|
25
|
-
|
|
25
|
+
showRemove?: boolean;
|
|
26
26
|
}): React.JSX.Element;
|
|
27
27
|
declare function ComboboxChipsInput({ className, ...props }: Combobox$1.Input.Props): React.JSX.Element;
|
|
28
28
|
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
29
|
-
|
|
30
|
-
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, type ComboboxSize, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
|
29
|
+
//#endregion
|
|
30
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, type ComboboxSize, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
package/dist/combobox.js
CHANGED
|
@@ -1,45 +1,237 @@
|
|
|
1
1
|
"use client";
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
2
|
+
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
|
+
import { SizeProvider, useComponentSize } from "./size-context.js";
|
|
4
|
+
import { Button } from "./button.js";
|
|
5
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
|
|
6
|
+
import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
11
|
+
//#region src/combobox.tsx
|
|
12
|
+
const ComboboxSelectionContext = React.createContext({ multiple: false });
|
|
13
|
+
function Combobox({ multiple, children, size, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(SizeProvider, {
|
|
15
|
+
size,
|
|
16
|
+
children: /* @__PURE__ */ jsx(ComboboxSelectionContext.Provider, {
|
|
17
|
+
value: { multiple: multiple === true },
|
|
18
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Root, {
|
|
19
|
+
multiple,
|
|
20
|
+
...props,
|
|
21
|
+
children
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const comboboxTriggerVariants = cva("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", {
|
|
27
|
+
variants: { size: {
|
|
28
|
+
sm: "h-8 gap-2 px-3 text-gdt-xs [&_svg:not([class*='size-'])]:size-3.5",
|
|
29
|
+
md: "h-10 gap-2 px-3.5 text-gdt-sm [&_svg:not([class*='size-'])]:size-4",
|
|
30
|
+
lg: "h-12 gap-2.5 px-4 pr-5 text-gdt-md [&_svg:not([class*='size-'])]:size-4.5"
|
|
31
|
+
} },
|
|
32
|
+
defaultVariants: { size: "md" }
|
|
33
|
+
});
|
|
34
|
+
const comboboxInputVariants = cva("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", {
|
|
35
|
+
variants: { size: {
|
|
36
|
+
sm: "",
|
|
37
|
+
md: "",
|
|
38
|
+
lg: ""
|
|
39
|
+
} },
|
|
40
|
+
defaultVariants: { size: "md" }
|
|
41
|
+
});
|
|
42
|
+
const comboboxContentVariants = cva("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", {
|
|
43
|
+
variants: { size: {
|
|
44
|
+
sm: "rounded-lg p-1",
|
|
45
|
+
md: "rounded-xl p-1.5",
|
|
46
|
+
lg: "rounded-[18px] p-2"
|
|
47
|
+
} },
|
|
48
|
+
defaultVariants: { size: "md" }
|
|
49
|
+
});
|
|
50
|
+
const comboboxItemVariants = cva("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", {
|
|
51
|
+
variants: { size: {
|
|
52
|
+
sm: "gap-1.5 rounded-md px-3 py-1.5 text-gdt-xs",
|
|
53
|
+
md: "gap-2 rounded-md px-4 py-2 text-gdt-sm",
|
|
54
|
+
lg: "gap-2.5 rounded-md px-4 py-2.5 text-gdt-md"
|
|
55
|
+
} },
|
|
56
|
+
defaultVariants: { size: "md" }
|
|
57
|
+
});
|
|
58
|
+
const comboboxChipsVariants = cva("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", {
|
|
59
|
+
variants: { size: {
|
|
60
|
+
sm: "min-h-8 px-2.5 py-1 text-gdt-xs",
|
|
61
|
+
md: "min-h-10 px-3 py-1.5 text-gdt-sm",
|
|
62
|
+
lg: "min-h-12 px-4 py-2 text-gdt-md"
|
|
63
|
+
} },
|
|
64
|
+
defaultVariants: { size: "md" }
|
|
65
|
+
});
|
|
66
|
+
const comboboxChipVariants = cva("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", {
|
|
67
|
+
variants: { size: {
|
|
68
|
+
sm: "h-5 px-1.5 text-gdt-xs",
|
|
69
|
+
md: "h-[calc(--spacing(5.25))] px-1.5 text-gdt-xs",
|
|
70
|
+
lg: "h-6 px-2 text-gdt-sm"
|
|
71
|
+
} },
|
|
72
|
+
defaultVariants: { size: "md" }
|
|
73
|
+
});
|
|
74
|
+
function ComboboxValue({ ...props }) {
|
|
75
|
+
return /* @__PURE__ */ jsx(Combobox$1.Value, {
|
|
76
|
+
"data-slot": "combobox-value",
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function ComboboxTrigger({ className, children, ...props }) {
|
|
81
|
+
const resolvedSize = useComponentSize();
|
|
82
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
|
|
83
|
+
"data-slot": "combobox-trigger",
|
|
84
|
+
"data-size": resolvedSize,
|
|
85
|
+
className: cn(comboboxTriggerVariants({ size: resolvedSize }), className),
|
|
86
|
+
...props,
|
|
87
|
+
children: [children, /* @__PURE__ */ jsx(Combobox$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-line-strong transition-transform group-data-disabled/combobox-trigger:text-fg-caption-placeholder group-data-popup-open/combobox-trigger:rotate-180" }) })]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function ComboboxClear({ className, ...props }) {
|
|
91
|
+
return /* @__PURE__ */ jsx(Combobox$1.Clear, {
|
|
92
|
+
"data-slot": "combobox-clear",
|
|
93
|
+
className: cn(className),
|
|
94
|
+
...props,
|
|
95
|
+
render: /* @__PURE__ */ jsx(InputGroupButton, {
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
size: "icon-xs",
|
|
98
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function ComboboxInput({ className, children, disabled = false, showTrigger = true, showClear = false, ...props }) {
|
|
103
|
+
const resolvedSize = useComponentSize();
|
|
104
|
+
return /* @__PURE__ */ jsxs(InputGroup, {
|
|
105
|
+
className: cn(comboboxInputVariants({ size: resolvedSize }), className),
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
108
|
+
render: /* @__PURE__ */ jsx(InputGroupInput, { disabled }),
|
|
109
|
+
...props
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
112
|
+
align: "inline-end",
|
|
113
|
+
children: [showTrigger && /* @__PURE__ */ jsx(InputGroupButton, {
|
|
114
|
+
size: "icon-xs",
|
|
115
|
+
variant: "ghost",
|
|
116
|
+
render: /* @__PURE__ */ jsx(ComboboxTrigger, {}),
|
|
117
|
+
"data-slot": "input-group-button",
|
|
118
|
+
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",
|
|
119
|
+
disabled
|
|
120
|
+
}), showClear && /* @__PURE__ */ jsx(ComboboxClear, { disabled })]
|
|
121
|
+
}),
|
|
122
|
+
children
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
127
|
+
const resolvedSize = useComponentSize();
|
|
128
|
+
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
129
|
+
side,
|
|
130
|
+
sideOffset,
|
|
131
|
+
align,
|
|
132
|
+
alignOffset,
|
|
133
|
+
anchor,
|
|
134
|
+
className: "isolate z-50",
|
|
135
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
|
|
136
|
+
"data-slot": "combobox-content",
|
|
137
|
+
"data-chips": !!anchor,
|
|
138
|
+
className: cn("group/combobox-content", comboboxContentVariants({ size: resolvedSize }), className),
|
|
139
|
+
...props
|
|
140
|
+
})
|
|
141
|
+
}) });
|
|
142
|
+
}
|
|
143
|
+
function ComboboxList({ className, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(Combobox$1.List, {
|
|
145
|
+
"data-slot": "combobox-list",
|
|
146
|
+
className: cn("no-scrollbar max-h-(--available-height) space-y-0.5 scroll-py-1 overflow-y-auto overscroll-contain data-empty:p-0", className),
|
|
147
|
+
...props
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
151
|
+
const { multiple } = React.useContext(ComboboxSelectionContext);
|
|
152
|
+
const resolvedSize = useComponentSize();
|
|
153
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
154
|
+
"data-slot": "combobox-item",
|
|
155
|
+
className: cn(comboboxItemVariants({ size: resolvedSize }), !multiple && "data-selected:bg-surface-brand-subtle data-selected:font-medium data-selected:text-fg-brand", className),
|
|
156
|
+
...props,
|
|
157
|
+
children: [multiple ? /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
|
|
158
|
+
keepMounted: true,
|
|
159
|
+
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",
|
|
160
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
161
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
162
|
+
className: "flex min-w-0 flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
163
|
+
children
|
|
164
|
+
})]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function ComboboxGroup({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ jsx(Combobox$1.Group, {
|
|
169
|
+
"data-slot": "combobox-group",
|
|
170
|
+
className: cn("scroll-my-1 space-y-0.5", className),
|
|
171
|
+
...props
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function ComboboxLabel({ className, ...props }) {
|
|
175
|
+
return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
|
|
176
|
+
"data-slot": "combobox-label",
|
|
177
|
+
className: cn("px-3 py-1 text-gdt-xs text-fg-secondary", className),
|
|
178
|
+
...props
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function ComboboxCollection({ ...props }) {
|
|
182
|
+
return /* @__PURE__ */ jsx(Combobox$1.Collection, {
|
|
183
|
+
"data-slot": "combobox-collection",
|
|
184
|
+
...props
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function ComboboxEmpty({ className, ...props }) {
|
|
188
|
+
return /* @__PURE__ */ jsx(Combobox$1.Empty, {
|
|
189
|
+
"data-slot": "combobox-empty",
|
|
190
|
+
className: cn("hidden w-full justify-center py-2 text-center text-gdt-sm text-fg-secondary group-data-empty/combobox-content:flex", className),
|
|
191
|
+
...props
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
195
|
+
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
196
|
+
"data-slot": "combobox-separator",
|
|
197
|
+
className: cn("pointer-events-none my-1 h-px bg-line-subtle", className),
|
|
198
|
+
...props
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function ComboboxChips({ className, ...props }) {
|
|
202
|
+
const resolvedSize = useComponentSize();
|
|
203
|
+
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
204
|
+
"data-slot": "combobox-chips",
|
|
205
|
+
className: cn(comboboxChipsVariants({ size: resolvedSize }), className),
|
|
206
|
+
...props
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function ComboboxChip({ className, children, showRemove = true, ...props }) {
|
|
210
|
+
const resolvedSize = useComponentSize();
|
|
211
|
+
return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
|
|
212
|
+
"data-slot": "combobox-chip",
|
|
213
|
+
className: cn(comboboxChipVariants({ size: resolvedSize }), className),
|
|
214
|
+
...props,
|
|
215
|
+
children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
|
|
216
|
+
className: "-ml-1 opacity-50 hover:opacity-100",
|
|
217
|
+
"data-slot": "combobox-chip-remove",
|
|
218
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
size: "icon-xs",
|
|
221
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
|
|
222
|
+
})
|
|
223
|
+
})]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function ComboboxChipsInput({ className, ...props }) {
|
|
227
|
+
return /* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
228
|
+
"data-slot": "combobox-chip-input",
|
|
229
|
+
className: cn("min-w-16 flex-1 bg-transparent text-fg-primary outline-none placeholder:text-fg-caption-placeholder", className),
|
|
230
|
+
...props
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function useComboboxAnchor() {
|
|
234
|
+
return React.useRef(null);
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };
|
package/dist/cta.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useRender } from
|
|
3
|
-
import { VariantProps } from
|
|
4
|
-
import * as React from
|
|
5
|
-
|
|
6
|
-
import '@base-ui/react/button';
|
|
7
|
-
|
|
1
|
+
import { n as ButtonLink, t as Button } from "./button-BZIeyUw6.js";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
//#region src/cta.d.ts
|
|
8
6
|
/**
|
|
9
7
|
* CTA is a composable marketing panel: a text column (title, description,
|
|
10
8
|
* checklist) paired with an optional grid of feature cards and an action
|
|
@@ -33,8 +31,8 @@ import '@base-ui/react/button';
|
|
|
33
31
|
* </CTA>
|
|
34
32
|
*/
|
|
35
33
|
declare const ctaVariants: (props?: ({
|
|
36
|
-
|
|
37
|
-
} &
|
|
34
|
+
variant?: "default" | "subtle" | null | undefined;
|
|
35
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
36
|
type CTAProps = useRender.ComponentProps<"section"> & VariantProps<typeof ctaVariants>;
|
|
39
37
|
declare function CTA({ className, render, variant, ...props }: CTAProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
40
38
|
declare function CTAContent({ className, render, ...props }: useRender.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -43,14 +41,14 @@ declare function CTATitle({ className, render, ...props }: useRender.ComponentPr
|
|
|
43
41
|
declare function CTADescription({ className, render, ...props }: useRender.ComponentProps<"p">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
44
42
|
declare function CTAList({ className, render, ...props }: useRender.ComponentProps<"ul">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
45
43
|
type CTAListItemProps = useRender.ComponentProps<"li"> & {
|
|
46
|
-
|
|
44
|
+
icon?: React.ReactNode;
|
|
47
45
|
};
|
|
48
46
|
declare function CTAListItem({ children, className, icon, render, ...props }: CTAListItemProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
49
47
|
declare function CTACard({ className, render, variant, ...props }: useRender.ComponentProps<"div"> & {
|
|
50
|
-
|
|
48
|
+
variant?: "default" | "brand";
|
|
51
49
|
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
52
50
|
declare function CTACardIcon({ className, render, variant, ...props }: useRender.ComponentProps<"span"> & {
|
|
53
|
-
|
|
51
|
+
variant?: "subtle-brand" | "subtle-accent" | "surface";
|
|
54
52
|
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
55
53
|
declare function CTACardTitle({ className, render, ...props }: useRender.ComponentProps<"h3">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
56
54
|
declare function CTACardDescription({ className, render, ...props }: useRender.ComponentProps<"p">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -62,5 +60,5 @@ declare function CTACardDescription({ className, render, ...props }: useRender.C
|
|
|
62
60
|
*/
|
|
63
61
|
declare function CTAButton({ className, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
64
62
|
declare function CTAButtonLink({ className, ...props }: React.ComponentProps<typeof ButtonLink>): React.JSX.Element;
|
|
65
|
-
|
|
66
|
-
export { CTA, CTAButton, CTAButtonLink, CTACard, CTACardDescription, CTACardIcon, CTACardTitle, CTAContent, CTADescription, CTAList, CTAListItem, type CTAListItemProps, type CTAProps, CTATag, CTATitle, ctaVariants };
|
|
63
|
+
//#endregion
|
|
64
|
+
export { CTA, CTAButton, CTAButtonLink, CTACard, CTACardDescription, CTACardIcon, CTACardTitle, CTAContent, CTADescription, CTAList, CTAListItem, type CTAListItemProps, type CTAProps, CTATag, CTATitle, ctaVariants };
|