@cloudgrid-io/ui 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +109 -0
- package/dist/blocks/agent-prompt.d.ts +37 -0
- package/dist/blocks/agent-prompt.d.ts.map +1 -0
- package/dist/blocks/agent-prompt.js +53 -0
- package/dist/blocks/agent-prompt.js.map +1 -0
- package/dist/blocks/card-grid.d.ts +38 -0
- package/dist/blocks/card-grid.d.ts.map +1 -0
- package/dist/blocks/card-grid.js +32 -0
- package/dist/blocks/card-grid.js.map +1 -0
- package/dist/blocks/compare-table.d.ts +13 -0
- package/dist/blocks/compare-table.d.ts.map +1 -0
- package/dist/blocks/compare-table.js +55 -0
- package/dist/blocks/compare-table.js.map +1 -0
- package/dist/blocks/creation-tile.d.ts +57 -0
- package/dist/blocks/creation-tile.d.ts.map +1 -0
- package/dist/blocks/creation-tile.js +32 -0
- package/dist/blocks/creation-tile.js.map +1 -0
- package/dist/blocks/cta-banner.d.ts +31 -0
- package/dist/blocks/cta-banner.d.ts.map +1 -0
- package/dist/blocks/cta-banner.js +31 -0
- package/dist/blocks/cta-banner.js.map +1 -0
- package/dist/blocks/drop-zone.d.ts +54 -0
- package/dist/blocks/drop-zone.d.ts.map +1 -0
- package/dist/blocks/drop-zone.js +121 -0
- package/dist/blocks/drop-zone.js.map +1 -0
- package/dist/blocks/feature-cells.d.ts +46 -0
- package/dist/blocks/feature-cells.d.ts.map +1 -0
- package/dist/blocks/feature-cells.js +46 -0
- package/dist/blocks/feature-cells.js.map +1 -0
- package/dist/blocks/hub-index.d.ts +55 -0
- package/dist/blocks/hub-index.d.ts.map +1 -0
- package/dist/blocks/hub-index.js +22 -0
- package/dist/blocks/hub-index.js.map +1 -0
- package/dist/blocks/logo.d.ts +24 -0
- package/dist/blocks/logo.d.ts.map +1 -0
- package/dist/blocks/logo.js +34 -0
- package/dist/blocks/logo.js.map +1 -0
- package/dist/blocks/option-card.d.ts +31 -0
- package/dist/blocks/option-card.d.ts.map +1 -0
- package/dist/blocks/option-card.js +32 -0
- package/dist/blocks/option-card.js.map +1 -0
- package/dist/blocks/page-heading.d.ts +33 -0
- package/dist/blocks/page-heading.d.ts.map +1 -0
- package/dist/blocks/page-heading.js +30 -0
- package/dist/blocks/page-heading.js.map +1 -0
- package/dist/blocks/plug-method.d.ts +76 -0
- package/dist/blocks/plug-method.d.ts.map +1 -0
- package/dist/blocks/plug-method.js +30 -0
- package/dist/blocks/plug-method.js.map +1 -0
- package/dist/blocks/pricing-tier-cards.d.ts +47 -0
- package/dist/blocks/pricing-tier-cards.d.ts.map +1 -0
- package/dist/blocks/pricing-tier-cards.js +12 -0
- package/dist/blocks/pricing-tier-cards.js.map +1 -0
- package/dist/blocks/pricing-tiers.d.ts +29 -0
- package/dist/blocks/pricing-tiers.d.ts.map +1 -0
- package/dist/blocks/pricing-tiers.js +30 -0
- package/dist/blocks/pricing-tiers.js.map +1 -0
- package/dist/blocks/quote.d.ts +27 -0
- package/dist/blocks/quote.d.ts.map +1 -0
- package/dist/blocks/quote.js +28 -0
- package/dist/blocks/quote.js.map +1 -0
- package/dist/blocks/rich-text.d.ts +38 -0
- package/dist/blocks/rich-text.d.ts.map +1 -0
- package/dist/blocks/rich-text.js +39 -0
- package/dist/blocks/rich-text.js.map +1 -0
- package/dist/blocks/stage-panel.d.ts +5 -0
- package/dist/blocks/stage-panel.d.ts.map +1 -0
- package/dist/blocks/stage-panel.js +30 -0
- package/dist/blocks/stage-panel.js.map +1 -0
- package/dist/blocks/step-item.d.ts +24 -0
- package/dist/blocks/step-item.d.ts.map +1 -0
- package/dist/blocks/step-item.js +34 -0
- package/dist/blocks/step-item.js.map +1 -0
- package/dist/blocks/tool-logo.d.ts +15 -0
- package/dist/blocks/tool-logo.d.ts.map +1 -0
- package/dist/blocks/tool-logo.js +59 -0
- package/dist/blocks/tool-logo.js.map +1 -0
- package/dist/blocks/tool-marks.d.ts +120 -0
- package/dist/blocks/tool-marks.d.ts.map +1 -0
- package/dist/blocks/tool-marks.js +94 -0
- package/dist/blocks/tool-marks.js.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/cloudgrid-cn.d.ts +65 -0
- package/dist/lib/cloudgrid-cn.d.ts.map +1 -0
- package/dist/lib/cloudgrid-cn.js +90 -0
- package/dist/lib/cloudgrid-cn.js.map +1 -0
- package/dist/tokens/base.json +57 -38
- package/dist/tokens.css +38 -19
- package/dist/ui/accordion.d.ts +7 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +19 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/badge.d.ts +8 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +34 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +9 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +35 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +12 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +26 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +37 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +34 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/checkbox.d.ts +4 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +10 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/code-block.d.ts +9 -0
- package/dist/ui/code-block.d.ts.map +1 -0
- package/dist/ui/code-block.js +57 -0
- package/dist/ui/code-block.js.map +1 -0
- package/dist/ui/combobox.d.ts +25 -0
- package/dist/ui/combobox.d.ts.map +1 -0
- package/dist/ui/combobox.js +59 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/dialog.d.ts +18 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +39 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +30 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +53 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/input-group.d.ts +19 -0
- package/dist/ui/input-group.d.ts.map +1 -0
- package/dist/ui/input-group.js +59 -0
- package/dist/ui/input-group.js.map +1 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +9 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/number-field.d.ts +10 -0
- package/dist/ui/number-field.d.ts.map +1 -0
- package/dist/ui/number-field.js +39 -0
- package/dist/ui/number-field.js.map +1 -0
- package/dist/ui/panel.d.ts +36 -0
- package/dist/ui/panel.d.ts.map +1 -0
- package/dist/ui/panel.js +39 -0
- package/dist/ui/panel.js.map +1 -0
- package/dist/ui/select.d.ts +16 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +36 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +4 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +9 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/sonner.d.ts +4 -0
- package/dist/ui/sonner.d.ts.map +1 -0
- package/dist/ui/sonner.js +36 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/switch.d.ts +6 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +9 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +30 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +11 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +38 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +4 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +8 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +37 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/package.json +42 -8
package/dist/tokens/base.json
CHANGED
|
@@ -101,64 +101,71 @@
|
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
"lavender-50": {
|
|
104
|
-
"$value": "#f2f1f7
|
|
104
|
+
"$value": "#f2f1f7",
|
|
105
|
+
"$type": "color",
|
|
106
|
+
"$description": "SOURCE: alternate page wash",
|
|
105
107
|
"$extensions": {
|
|
106
108
|
"io.cloudgrid": {
|
|
107
|
-
"raw": true,
|
|
108
109
|
"css": "--cg-lavender-50"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
},
|
|
112
113
|
"neutral-100": {
|
|
113
|
-
"$value": "#f1f1f1
|
|
114
|
+
"$value": "#f1f1f1",
|
|
115
|
+
"$type": "color",
|
|
116
|
+
"$description": "SOURCE: hairline / card border",
|
|
114
117
|
"$extensions": {
|
|
115
118
|
"io.cloudgrid": {
|
|
116
|
-
"raw": true,
|
|
117
119
|
"css": "--cg-neutral-100"
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
122
|
},
|
|
121
123
|
"neutral-200": {
|
|
122
|
-
"$value": "#e3e3e3
|
|
124
|
+
"$value": "#e3e3e3",
|
|
125
|
+
"$type": "color",
|
|
126
|
+
"$description": "SOURCE: control border, inactive pill fill",
|
|
123
127
|
"$extensions": {
|
|
124
128
|
"io.cloudgrid": {
|
|
125
|
-
"raw": true,
|
|
126
129
|
"css": "--cg-neutral-200"
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
},
|
|
130
133
|
"neutral-400": {
|
|
131
|
-
"$value": "#acacac
|
|
134
|
+
"$value": "#acacac",
|
|
135
|
+
"$type": "color",
|
|
136
|
+
"$description": "SOURCE: placeholder",
|
|
132
137
|
"$extensions": {
|
|
133
138
|
"io.cloudgrid": {
|
|
134
|
-
"raw": true,
|
|
135
139
|
"css": "--cg-neutral-400"
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
},
|
|
139
143
|
"neutral-500": {
|
|
140
|
-
"$value": "#8e8e8e
|
|
144
|
+
"$value": "#8e8e8e",
|
|
145
|
+
"$type": "color",
|
|
146
|
+
"$description": "SOURCE: footer text",
|
|
141
147
|
"$extensions": {
|
|
142
148
|
"io.cloudgrid": {
|
|
143
|
-
"raw": true,
|
|
144
149
|
"css": "--cg-neutral-500"
|
|
145
150
|
}
|
|
146
151
|
}
|
|
147
152
|
},
|
|
148
153
|
"neutral-700": {
|
|
149
|
-
"$value": "#595959
|
|
154
|
+
"$value": "#595959",
|
|
155
|
+
"$type": "color",
|
|
156
|
+
"$description": "SOURCE: legal / secondary text",
|
|
150
157
|
"$extensions": {
|
|
151
158
|
"io.cloudgrid": {
|
|
152
|
-
"raw": true,
|
|
153
159
|
"css": "--cg-neutral-700"
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
},
|
|
157
163
|
"neutral-900": {
|
|
158
|
-
"$value": "#222222
|
|
164
|
+
"$value": "#222222",
|
|
165
|
+
"$type": "color",
|
|
166
|
+
"$description": "SOURCE: ink",
|
|
159
167
|
"$extensions": {
|
|
160
168
|
"io.cloudgrid": {
|
|
161
|
-
"raw": true,
|
|
162
169
|
"css": "--cg-neutral-900"
|
|
163
170
|
}
|
|
164
171
|
}
|
|
@@ -448,10 +455,11 @@
|
|
|
448
455
|
}
|
|
449
456
|
},
|
|
450
457
|
"display-md": {
|
|
451
|
-
"$value": "38px
|
|
458
|
+
"$value": "38px",
|
|
459
|
+
"$type": "dimension",
|
|
460
|
+
"$description": "SOURCE: onboarding H1 (was 42px)",
|
|
452
461
|
"$extensions": {
|
|
453
462
|
"io.cloudgrid": {
|
|
454
|
-
"raw": true,
|
|
455
463
|
"css": "--cg-display-md"
|
|
456
464
|
}
|
|
457
465
|
}
|
|
@@ -495,19 +503,21 @@
|
|
|
495
503
|
}
|
|
496
504
|
},
|
|
497
505
|
"heading-md": {
|
|
498
|
-
"$value": "20px
|
|
506
|
+
"$value": "20px",
|
|
507
|
+
"$type": "dimension",
|
|
508
|
+
"$description": "SOURCE: card title",
|
|
499
509
|
"$extensions": {
|
|
500
510
|
"io.cloudgrid": {
|
|
501
|
-
"raw": true,
|
|
502
511
|
"css": "--cg-heading-md"
|
|
503
512
|
}
|
|
504
513
|
}
|
|
505
514
|
},
|
|
506
515
|
"heading-sm": {
|
|
507
|
-
"$value": "17px
|
|
516
|
+
"$value": "17px",
|
|
517
|
+
"$type": "dimension",
|
|
518
|
+
"$description": "SOURCE: step title",
|
|
508
519
|
"$extensions": {
|
|
509
520
|
"io.cloudgrid": {
|
|
510
|
-
"raw": true,
|
|
511
521
|
"css": "--cg-heading-sm"
|
|
512
522
|
}
|
|
513
523
|
}
|
|
@@ -522,37 +532,41 @@
|
|
|
522
532
|
}
|
|
523
533
|
},
|
|
524
534
|
"body-lg": {
|
|
525
|
-
"$value": "19px
|
|
535
|
+
"$value": "19px",
|
|
536
|
+
"$type": "dimension",
|
|
537
|
+
"$description": "SOURCE: H1 subline",
|
|
526
538
|
"$extensions": {
|
|
527
539
|
"io.cloudgrid": {
|
|
528
|
-
"raw": true,
|
|
529
540
|
"css": "--cg-body-lg"
|
|
530
541
|
}
|
|
531
542
|
}
|
|
532
543
|
},
|
|
533
544
|
"body-md": {
|
|
534
|
-
"$value": "16px
|
|
545
|
+
"$value": "16px",
|
|
546
|
+
"$type": "dimension",
|
|
547
|
+
"$description": "SOURCE: default UI text",
|
|
535
548
|
"$extensions": {
|
|
536
549
|
"io.cloudgrid": {
|
|
537
|
-
"raw": true,
|
|
538
550
|
"css": "--cg-body-md"
|
|
539
551
|
}
|
|
540
552
|
}
|
|
541
553
|
},
|
|
542
554
|
"body-sm": {
|
|
543
|
-
"$value": "15px
|
|
555
|
+
"$value": "15px",
|
|
556
|
+
"$type": "dimension",
|
|
557
|
+
"$description": "SOURCE: card body, legal",
|
|
544
558
|
"$extensions": {
|
|
545
559
|
"io.cloudgrid": {
|
|
546
|
-
"raw": true,
|
|
547
560
|
"css": "--cg-body-sm"
|
|
548
561
|
}
|
|
549
562
|
}
|
|
550
563
|
},
|
|
551
564
|
"caption": {
|
|
552
|
-
"$value": "13px
|
|
565
|
+
"$value": "13px",
|
|
566
|
+
"$type": "dimension",
|
|
567
|
+
"$description": "SOURCE: footer, helper",
|
|
553
568
|
"$extensions": {
|
|
554
569
|
"io.cloudgrid": {
|
|
555
|
-
"raw": true,
|
|
556
570
|
"css": "--cg-caption"
|
|
557
571
|
}
|
|
558
572
|
}
|
|
@@ -734,10 +748,11 @@
|
|
|
734
748
|
}
|
|
735
749
|
},
|
|
736
750
|
"column-wide": {
|
|
737
|
-
"$value": "920px
|
|
751
|
+
"$value": "920px",
|
|
752
|
+
"$type": "dimension",
|
|
753
|
+
"$description": "SOURCE 844px; widened 2026-08-06 with the container",
|
|
738
754
|
"$extensions": {
|
|
739
755
|
"io.cloudgrid": {
|
|
740
|
-
"raw": true,
|
|
741
756
|
"css": "--cg-column-wide"
|
|
742
757
|
}
|
|
743
758
|
}
|
|
@@ -845,37 +860,41 @@
|
|
|
845
860
|
}
|
|
846
861
|
},
|
|
847
862
|
"radius-md": {
|
|
848
|
-
"$value": "12px
|
|
863
|
+
"$value": "12px",
|
|
864
|
+
"$type": "dimension",
|
|
865
|
+
"$description": "SOURCE: code block, OTP cell",
|
|
849
866
|
"$extensions": {
|
|
850
867
|
"io.cloudgrid": {
|
|
851
|
-
"raw": true,
|
|
852
868
|
"css": "--cg-radius-md"
|
|
853
869
|
}
|
|
854
870
|
}
|
|
855
871
|
},
|
|
856
872
|
"radius-lg": {
|
|
857
|
-
"$value": "14px
|
|
873
|
+
"$value": "14px",
|
|
874
|
+
"$type": "dimension",
|
|
875
|
+
"$description": "SOURCE: provider button, input, tool card",
|
|
858
876
|
"$extensions": {
|
|
859
877
|
"io.cloudgrid": {
|
|
860
|
-
"raw": true,
|
|
861
878
|
"css": "--cg-radius-lg"
|
|
862
879
|
}
|
|
863
880
|
}
|
|
864
881
|
},
|
|
865
882
|
"radius-xl": {
|
|
866
|
-
"$value": "16px
|
|
883
|
+
"$value": "16px",
|
|
884
|
+
"$type": "dimension",
|
|
885
|
+
"$description": "SOURCE: option card",
|
|
867
886
|
"$extensions": {
|
|
868
887
|
"io.cloudgrid": {
|
|
869
|
-
"raw": true,
|
|
870
888
|
"css": "--cg-radius-xl"
|
|
871
889
|
}
|
|
872
890
|
}
|
|
873
891
|
},
|
|
874
892
|
"radius-2xl": {
|
|
875
|
-
"$value": "24px
|
|
893
|
+
"$value": "24px",
|
|
894
|
+
"$type": "dimension",
|
|
895
|
+
"$description": "SOURCE: full-bleed purple panel",
|
|
876
896
|
"$extensions": {
|
|
877
897
|
"io.cloudgrid": {
|
|
878
|
-
"raw": true,
|
|
879
898
|
"css": "--cg-radius-2xl"
|
|
880
899
|
}
|
|
881
900
|
}
|
package/dist/tokens.css
CHANGED
|
@@ -82,13 +82,20 @@
|
|
|
82
82
|
|
|
83
83
|
/* ---- neutrals ---- */
|
|
84
84
|
--cg-neutral-0: #ffffff;
|
|
85
|
-
|
|
86
|
-
--cg-
|
|
87
|
-
|
|
88
|
-
--cg-neutral-
|
|
89
|
-
|
|
90
|
-
--cg-neutral-
|
|
91
|
-
|
|
85
|
+
/* SOURCE: alternate page wash */
|
|
86
|
+
--cg-lavender-50: #f2f1f7;
|
|
87
|
+
/* SOURCE: hairline / card border */
|
|
88
|
+
--cg-neutral-100: #f1f1f1;
|
|
89
|
+
/* SOURCE: control border, inactive pill fill */
|
|
90
|
+
--cg-neutral-200: #e3e3e3;
|
|
91
|
+
/* SOURCE: placeholder */
|
|
92
|
+
--cg-neutral-400: #acacac;
|
|
93
|
+
/* SOURCE: footer text */
|
|
94
|
+
--cg-neutral-500: #8e8e8e;
|
|
95
|
+
/* SOURCE: legal / secondary text */
|
|
96
|
+
--cg-neutral-700: #595959;
|
|
97
|
+
/* SOURCE: ink */
|
|
98
|
+
--cg-neutral-900: #222222;
|
|
92
99
|
|
|
93
100
|
/* ---- semantic-surfaces ---- */
|
|
94
101
|
--cg-surface-page: var(--cg-neutral-0);
|
|
@@ -144,20 +151,27 @@
|
|
|
144
151
|
dominant). The SOURCE values were xl 64 / lg 48 / md 42 / sm 32. */
|
|
145
152
|
--cg-display-xl: 56px;
|
|
146
153
|
--cg-display-lg: 44px;
|
|
147
|
-
|
|
154
|
+
/* SOURCE: onboarding H1 (was 42px) */
|
|
155
|
+
--cg-display-md: 38px;
|
|
148
156
|
--cg-display-sm: 30px;
|
|
149
157
|
--cg-display-line: 1.06;
|
|
150
158
|
--cg-display-tracking: 0.012em;
|
|
151
159
|
|
|
152
160
|
/* ---- manrope-ramp ---- */
|
|
153
161
|
--cg-heading-lg: 24px;
|
|
154
|
-
|
|
155
|
-
--cg-heading-
|
|
162
|
+
/* SOURCE: card title */
|
|
163
|
+
--cg-heading-md: 20px;
|
|
164
|
+
/* SOURCE: step title */
|
|
165
|
+
--cg-heading-sm: 17px;
|
|
156
166
|
--cg-heading-line: 1.3;
|
|
157
|
-
|
|
158
|
-
--cg-body-
|
|
159
|
-
|
|
160
|
-
--cg-
|
|
167
|
+
/* SOURCE: H1 subline */
|
|
168
|
+
--cg-body-lg: 19px;
|
|
169
|
+
/* SOURCE: default UI text */
|
|
170
|
+
--cg-body-md: 16px;
|
|
171
|
+
/* SOURCE: card body, legal */
|
|
172
|
+
--cg-body-sm: 15px;
|
|
173
|
+
/* SOURCE: footer, helper */
|
|
174
|
+
--cg-caption: 13px;
|
|
161
175
|
--cg-body-line: 1.5;
|
|
162
176
|
--cg-body-tracking: 0em;
|
|
163
177
|
--cg-mono-size: 14px;
|
|
@@ -183,7 +197,8 @@
|
|
|
183
197
|
/* ---- layout ----
|
|
184
198
|
layout (SOURCE measurements from the 1440px frames) */
|
|
185
199
|
--cg-column-form: 414px;
|
|
186
|
-
|
|
200
|
+
/* SOURCE 844px; widened 2026-08-06 with the container */
|
|
201
|
+
--cg-column-wide: 920px;
|
|
187
202
|
--cg-page-pad: 32px;
|
|
188
203
|
--cg-header-height: 90px;
|
|
189
204
|
--cg-footer-height: 64px;
|
|
@@ -201,10 +216,14 @@
|
|
|
201
216
|
/* ---- corners ---- */
|
|
202
217
|
--cg-radius-xs: 8px;
|
|
203
218
|
--cg-radius-sm: 10px;
|
|
204
|
-
|
|
205
|
-
--cg-radius-
|
|
206
|
-
|
|
207
|
-
--cg-radius-
|
|
219
|
+
/* SOURCE: code block, OTP cell */
|
|
220
|
+
--cg-radius-md: 12px;
|
|
221
|
+
/* SOURCE: provider button, input, tool card */
|
|
222
|
+
--cg-radius-lg: 14px;
|
|
223
|
+
/* SOURCE: option card */
|
|
224
|
+
--cg-radius-xl: 16px;
|
|
225
|
+
/* SOURCE: full-bleed purple panel */
|
|
226
|
+
--cg-radius-2xl: 24px;
|
|
208
227
|
--cg-radius-pill: 999px;
|
|
209
228
|
--cg-border-width: 1px;
|
|
210
229
|
--cg-border-width-strong: 1.5px;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
2
|
+
declare function Accordion({ className, ...props }: AccordionPrimitive.Root.Props): import("react").JSX.Element;
|
|
3
|
+
declare function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props): import("react").JSX.Element;
|
|
4
|
+
declare function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
5
|
+
declare function AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props): import("react").JSX.Element;
|
|
6
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
7
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAK1E,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQ5E;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,+BAiBlC;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,+BAiBhC;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
function Accordion({ className, ...props }) {
|
|
7
|
+
return (_jsx(AccordionPrimitive.Root, { "data-slot": "accordion", className: cn("flex w-full flex-col", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("not-last:border-b", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-body-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", className), ...props, children: [children, _jsx(ChevronDownIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" }), _jsx(ChevronUpIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" })] }) }));
|
|
14
|
+
}
|
|
15
|
+
function AccordionContent({ className, children, ...props }) {
|
|
16
|
+
return (_jsx(AccordionPrimitive.Panel, { "data-slot": "accordion-content", className: "overflow-hidden text-body-sm data-open:animate-accordion-down data-closed:animate-accordion-up", ...props, children: _jsx("div", { className: cn("h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), children: children }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
19
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/ui/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE1E,O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AA;AACH,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
export { Badge, badgeVariants };
|
|
8
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAqBlB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,MAAM,EACN,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,8FAevE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-caption font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
9
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
10
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
11
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
12
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
13
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
function Badge({ className, variant = "default", render, ...props }) {
|
|
21
|
+
return useRender({
|
|
22
|
+
defaultTagName: "span",
|
|
23
|
+
props: mergeProps({
|
|
24
|
+
className: cn(badgeVariants({ variant }), className),
|
|
25
|
+
}, props),
|
|
26
|
+
render,
|
|
27
|
+
state: {
|
|
28
|
+
slot: "badge",
|
|
29
|
+
variant,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export { Badge, badgeVariants };
|
|
34
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AAE3C,MAAM,aAAa,GAAG,GAAG,CACvB,8eAA8e,EAC9e;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,SAAS,EACP,kEAAkE;YACpE,WAAW,EACT,gKAAgK;YAClK,OAAO,EACL,kFAAkF;YACpF,KAAK,EACH,mEAAmE;YACrE,IAAI,EAAE,iDAAiD;SACxD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,MAAM,EACN,GAAG,KAAK,EAC8D;IACtE,OAAO,SAAS,CAAC;QACf,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,UAAU,CACf;YACE,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC;SACrD,EACD,KAAK,CACN;QACD,MAAM;QACN,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,OAAO;SACR;KACF,CAAC,CAAA;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
8
|
+
export { Button, buttonVariants };
|
|
9
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EAmCnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,+BAQ7D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-body-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
9
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
10
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
11
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
12
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
13
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
17
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-caption in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
18
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-caption in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
19
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
icon: "size-8",
|
|
21
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
22
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
23
|
+
"icon-lg": "size-9",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default",
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
function Button({ className, variant = "default", size = "default", ...props }) {
|
|
32
|
+
return (_jsx(ButtonPrimitive, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Button, buttonVariants };
|
|
35
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AAE3C,MAAM,cAAc,GAAG,GAAG,CACxB,8lBAA8lB,EAC9lB;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,OAAO,EACL,iLAAiL;YACnL,SAAS,EACP,gLAAgL;YAClL,KAAK,EACH,kHAAkH;YACpH,WAAW,EACT,6NAA6N;YAC/N,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EACL,sFAAsF;YACxF,EAAE,EAAE,oNAAoN;YACxN,EAAE,EAAE,wNAAwN;YAC5N,EAAE,EAAE,sFAAsF;YAC1F,IAAI,EAAE,QAAQ;YACd,SAAS,EACP,yHAAyH;YAC3H,SAAS,EACP,oFAAoF;YACtF,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAED,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EACoD;IAC5D,OAAO,CACL,KAAC,eAAe,iBACJ,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
3
|
+
size?: "default" | "sm";
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
6
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
12
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE,qBAY3D;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
4
|
+
function Card({ className, size = "default", ...props }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "card", "data-size": size, className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-body-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function CardHeader({ className, ...props }) {
|
|
8
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CardTitle({ className, ...props }) {
|
|
11
|
+
return (_jsx("div", { "data-slot": "card-title", className: cn("font-heading text-body-md leading-snug font-medium group-data-[size=sm]/card:text-body-sm", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function CardDescription({ className, ...props }) {
|
|
14
|
+
return (_jsx("div", { "data-slot": "card-description", className: cn("text-body-sm text-muted-foreground", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function CardAction({ className, ...props }) {
|
|
17
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function CardContent({ className, ...props }) {
|
|
20
|
+
return (_jsx("div", { "data-slot": "card-content", className: cn("px-(--card-spacing)", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function CardFooter({ className, ...props }) {
|
|
23
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
26
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/ui/card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AAE3C,SAAS,IA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AE,CACX,wEAAwE,EACxE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A scroll-snapped image strip with dot navigation. Ported from v0's
|
|
4
|
+
* `core/Carousel`, and the thing to preserve is its posture rather than its CSS.
|
|
5
|
+
*
|
|
6
|
+
* ## It works with JavaScript off, and that is deliberate
|
|
7
|
+
*
|
|
8
|
+
* The strip is natively scroll-snapped and the dots are **real anchors to real
|
|
9
|
+
* slide ids**, so navigation is browser behaviour, not script. The effect below
|
|
10
|
+
* only mirrors scroll position onto `aria-current`. It never creates the ability
|
|
11
|
+
* to move between slides, so nothing breaks when it does not run.
|
|
12
|
+
*
|
|
13
|
+
* If you change one thing here, do not make the dots buttons that call a handler.
|
|
14
|
+
* That would look equivalent and would silently make the component depend on
|
|
15
|
+
* hydration.
|
|
16
|
+
*
|
|
17
|
+
* `IntersectionObserver` is absent in jsdom and in any non-browser host, so its
|
|
18
|
+
* absence is checked rather than assumed: the component stays usable there, just
|
|
19
|
+
* without the scroll sync.
|
|
20
|
+
*
|
|
21
|
+
* v0's `band` and `container` wrappers are dropped, as everywhere else.
|
|
22
|
+
*/
|
|
23
|
+
type CarouselSlide = {
|
|
24
|
+
image: string;
|
|
25
|
+
alt: string;
|
|
26
|
+
caption?: string;
|
|
27
|
+
link?: string;
|
|
28
|
+
};
|
|
29
|
+
declare function Carousel({ title, slides, id, className, ...props }: Omit<React.ComponentProps<"section">, "ref" | "id"> & {
|
|
30
|
+
title?: string;
|
|
31
|
+
slides: CarouselSlide[];
|
|
32
|
+
/** Prefix for the per-slide anchor ids. Defaults to a generated unique one. */
|
|
33
|
+
id?: string;
|
|
34
|
+
}): React.JSX.Element;
|
|
35
|
+
export { Carousel };
|
|
36
|
+
export type { CarouselSlide };
|
|
37
|
+
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/ui/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,MAAM,EACN,EAAE,EACF,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,qBAkFA;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA;AACnB,YAAY,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/cloudgrid-cn.js";
|
|
5
|
+
function Carousel({ title, slides, id, className, ...props }) {
|
|
6
|
+
// Colons are stripped because useId emits them and they are not valid in a
|
|
7
|
+
// fragment identifier, which is what these ids are for.
|
|
8
|
+
const autoId = React.useId().replace(/:/g, "");
|
|
9
|
+
const prefix = id ?? `slide-${autoId}`;
|
|
10
|
+
const trackRef = React.useRef(null);
|
|
11
|
+
const [active, setActive] = React.useState(0);
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
const track = trackRef.current;
|
|
14
|
+
if (!track || typeof IntersectionObserver === "undefined")
|
|
15
|
+
return;
|
|
16
|
+
const figures = [...track.children];
|
|
17
|
+
const observer = new IntersectionObserver((entries) => {
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
if (entry.isIntersecting)
|
|
20
|
+
setActive(figures.indexOf(entry.target));
|
|
21
|
+
}
|
|
22
|
+
}, { root: track, threshold: 0.6 });
|
|
23
|
+
figures.forEach((figure) => observer.observe(figure));
|
|
24
|
+
return () => observer.disconnect();
|
|
25
|
+
}, [slides]);
|
|
26
|
+
return (_jsxs("section", { "data-slot": "carousel", className: cn("flex flex-col gap-4", className), ...props, children: [title ? _jsx("h2", { className: "text-heading-lg font-medium text-ink", children: title }) : null, _jsx("div", { ref: trackRef, className: "flex snap-x snap-mandatory gap-4 overflow-x-auto scroll-smooth [-webkit-overflow-scrolling:touch]", children: slides.map((slide, i) => (_jsxs("figure", { id: `${prefix}-${i}`, className: "m-0 shrink-0 snap-start basis-[min(100%,32rem)]", children: [_jsx("img", { src: slide.image, alt: slide.alt, loading: "lazy", decoding: "async", className: "w-full rounded-xl" }), slide.caption ? (_jsx("figcaption", { className: "mt-2 text-body-sm text-body", children: slide.link ? (_jsx("a", { href: slide.link, className: "underline-offset-4 hover:underline", children: slide.caption })) : (slide.caption) })) : null] }, slide.image))) }), _jsx("div", { role: "group", "aria-label": title ?? "Carousel", className: "flex gap-2", children: slides.map((slide, i) => (
|
|
27
|
+
// An anchor rather than a button, and empty rather than labelled inline:
|
|
28
|
+
// the accessible name comes from aria-label, and it names the slide
|
|
29
|
+
// rather than the position alone, because "slide 3 of 7" tells a screen
|
|
30
|
+
// reader nothing about what is there.
|
|
31
|
+
_jsx("a", { href: `#${prefix}-${i}`, "aria-current": i === active ? "true" : "false", "aria-label": `Go to slide ${i + 1}: ${slide.alt}`, className: cn("size-2.5 rounded-pill border border-line transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", i === active ? "border-ink bg-ink" : "hover:border-line-strong") }, slide.image))) })] }));
|
|
32
|
+
}
|
|
33
|
+
export { Carousel };
|
|
34
|
+
//# sourceMappingURL=carousel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../src/ui/carousel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AA8B3C,SAAS,QAAQ,CAAC,EAChB,KAAK,EACL,MAAM,EACN,EAAE,EACF,SAAS,EACT,GAAG,KAAK,EAMT;IACC,2EAA2E;IAC3E,wDAAwD;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IAC9C,MAAM,MAAM,GAAG,EAAE,IAAI,SAAS,MAAM,EAAE,CAAA;IACtC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAA;IACnD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAE7C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAA;QAC9B,IAAI,CAAC,KAAK,IAAI,OAAO,oBAAoB,KAAK,WAAW;YAAE,OAAM;QAEjE,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAkB,CAAA;QACpD,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,CAAC,OAAO,EAAE,EAAE;YACV,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,IAAI,KAAK,CAAC,cAAc;oBAAE,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,K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