@krizaka/ui 3.8.0 → 3.10.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 +13 -9
- package/dist/action-bar.js +2 -1
- package/dist/action-bar.js.map +1 -1
- package/dist/app-shell.d.ts +81 -3
- package/dist/app-shell.js +163 -35
- package/dist/app-shell.js.map +1 -1
- package/dist/audio-player.js +1 -1
- package/dist/badge.d.ts +36 -39
- package/dist/badge.js +11 -2
- package/dist/badge.js.map +1 -1
- package/dist/blocks.css +56 -4
- package/dist/button-BmCrLCq7.d.ts +114 -0
- package/dist/button.d.ts +48 -48
- package/dist/button.js +2 -1
- package/dist/card.d.ts +111 -111
- package/dist/card.js +10 -2
- package/dist/card.js.map +1 -1
- package/dist/chip.d.ts +24 -24
- package/dist/chip.js +10 -2
- package/dist/chip.js.map +1 -1
- package/dist/{chunk-UOMP6VOZ.js → chunk-276PTQMQ.js} +10 -4
- package/dist/chunk-276PTQMQ.js.map +1 -0
- package/dist/{chunk-Z6FUPB3Q.js → chunk-2NB27LM7.js} +11 -3
- package/dist/chunk-2NB27LM7.js.map +1 -0
- package/dist/chunk-2VNYHG4E.js +9 -0
- package/dist/chunk-2VNYHG4E.js.map +1 -0
- package/dist/{chunk-ND3L5VHT.js → chunk-5Z7FWCV2.js} +2 -2
- package/dist/{chunk-YH4LMWRU.js → chunk-7UCPGXKN.js} +11 -3
- package/dist/chunk-7UCPGXKN.js.map +1 -0
- package/dist/{chunk-AZPKXP3O.js → chunk-AFY35UCB.js} +6 -1
- package/dist/{chunk-AZPKXP3O.js.map → chunk-AFY35UCB.js.map} +1 -1
- package/dist/{chunk-LCZXS6AK.js → chunk-CKSHLSDH.js} +5 -5
- package/dist/chunk-CKSHLSDH.js.map +1 -0
- package/dist/chunk-D3T54RSL.js +11 -0
- package/dist/chunk-D3T54RSL.js.map +1 -0
- package/dist/{chunk-ZKVQGXLD.js → chunk-FKBHWS4N.js} +2 -2
- package/dist/{chunk-BRKMQ6JV.js → chunk-FZBWEDQI.js} +1 -23
- package/dist/chunk-FZBWEDQI.js.map +1 -0
- package/dist/chunk-HG65YAV4.js +379 -0
- package/dist/chunk-HG65YAV4.js.map +1 -0
- package/dist/{chunk-HCNOOPZE.js → chunk-KVDB4GXV.js} +2 -2
- package/dist/chunk-OT6HX3PN.js +85 -0
- package/dist/chunk-OT6HX3PN.js.map +1 -0
- package/dist/{chunk-RUPNPMP3.js → chunk-OWC2LZD2.js} +11 -3
- package/dist/chunk-OWC2LZD2.js.map +1 -0
- package/dist/{chunk-FDCMBWUU.js → chunk-REPTKUJ6.js} +4 -4
- package/dist/chunk-REPTKUJ6.js.map +1 -0
- package/dist/code-block.d.ts +32 -10
- package/dist/code-block.js +51 -43
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.d.ts +3 -3
- package/dist/combobox.js +4 -3
- package/dist/command.js +3 -2
- package/dist/command.js.map +1 -1
- package/dist/component-page.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +2 -1
- package/dist/confirm-button.js.map +1 -1
- package/dist/continue-prompt.js +11 -3
- package/dist/continue-prompt.js.map +1 -1
- package/dist/data-table.js +7 -6
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/dialog.js +3 -2
- package/dist/dialog.js.map +1 -1
- package/dist/file-upload.d.ts +12 -1
- package/dist/file-upload.js +73 -89
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.js +3 -2
- package/dist/image-cropper.js +1 -1
- package/dist/index.js +9 -367
- package/dist/index.js.map +1 -1
- package/dist/list.js +1 -1
- package/dist/map.js.map +1 -1
- package/dist/markdown.d.ts +38 -0
- package/dist/markdown.js +150 -0
- package/dist/markdown.js.map +1 -0
- package/dist/match-dialog.js +2 -1
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/native/markdown.d.ts +24 -0
- package/dist/native/markdown.js +200 -0
- package/dist/native/markdown.js.map +1 -0
- package/dist/native.d.ts +49 -8
- package/dist/native.js +728 -349
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +86 -3
- package/dist/nav-bar.js +88 -2
- package/dist/nav-bar.js.map +1 -1
- package/dist/recipes.d.ts +143 -0
- package/dist/recipes.js +180 -0
- package/dist/recipes.js.map +1 -0
- package/dist/search-field.js +2 -2
- package/dist/showcase.d.ts +69 -0
- package/dist/showcase.js +218 -0
- package/dist/showcase.js.map +1 -0
- package/dist/site-footer.d.ts +172 -0
- package/dist/site-footer.js +105 -0
- package/dist/site-footer.js.map +1 -0
- package/dist/sites-CgJrxejx.d.ts +32 -0
- package/dist/sites.d.ts +64 -0
- package/dist/sites.js +69 -0
- package/dist/sites.js.map +1 -0
- package/dist/swipe-deck.js +1 -1
- package/dist/tag-input.js +4 -3
- package/dist/tag-input.js.map +1 -1
- package/dist/tag-selector.js +2 -1
- package/dist/tag-selector.js.map +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/tree-view.js +1 -1
- package/dist/vertical-video.js +2 -1
- package/dist/vertical-video.js.map +1 -1
- package/dist/video-player.js +1 -1
- package/dist/video-trimmer.js +1 -1
- package/dist/virtual.js +2 -2
- package/package.json +87 -18
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +135 -12
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +2 -2
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +9 -3
- package/registry/button.json +7 -2
- package/registry/card-grid.json +1 -1
- package/registry/card.json +8 -3
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +9 -3
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +65 -21
- package/registry/combobox.json +4 -3
- package/registry/command.json +1 -1
- package/registry/component-page.json +4 -4
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +3 -3
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/app-shell/console.d.ts +4 -0
- package/registry/examples/app-shell/console.js +93 -0
- package/registry/examples/app-shell/console.tsx +103 -0
- package/registry/examples/badge/native/dot.dark.png +0 -0
- package/registry/examples/badge/native/dot.light.png +0 -0
- package/registry/examples/badge/native/scrim.dark.png +0 -0
- package/registry/examples/badge/native/scrim.light.png +0 -0
- package/registry/examples/badge/native/tones.dark.png +0 -0
- package/registry/examples/badge/native/tones.light.png +0 -0
- package/registry/examples/card/native/default.dark.png +0 -0
- package/registry/examples/card/native/default.light.png +0 -0
- package/registry/examples/card/native/elevated.light.png +0 -0
- package/registry/examples/chip/native/multiple.dark.png +0 -0
- package/registry/examples/chip/native/multiple.light.png +0 -0
- package/registry/examples/chip/native/removable.dark.png +0 -0
- package/registry/examples/chip/native/removable.light.png +0 -0
- package/registry/examples/chip/native/single.dark.png +0 -0
- package/registry/examples/chip/native/single.light.png +0 -0
- package/registry/examples/chip/native/toggle.dark.png +0 -0
- package/registry/examples/chip/native/toggle.light.png +0 -0
- package/registry/examples/code-block/annotated.d.ts +4 -0
- package/registry/examples/code-block/annotated.js +31 -0
- package/registry/examples/code-block/annotated.tsx +26 -0
- package/registry/examples/component-page/button.tsx +1 -1
- package/registry/examples/form/native/amount.dark.png +0 -0
- package/registry/examples/form/native/amount.light.png +0 -0
- package/registry/examples/markdown/ai-stream.d.ts +4 -0
- package/registry/examples/markdown/ai-stream.js +31 -0
- package/registry/examples/markdown/ai-stream.tsx +32 -0
- package/registry/examples/markdown/basic.d.ts +4 -0
- package/registry/examples/markdown/basic.js +26 -0
- package/registry/examples/markdown/basic.tsx +22 -0
- package/registry/examples/markdown/native/ai-stream.d.ts +4 -0
- package/registry/examples/markdown/native/ai-stream.dark.png +0 -0
- package/registry/examples/markdown/native/ai-stream.js +17 -0
- package/registry/examples/markdown/native/ai-stream.light.png +0 -0
- package/registry/examples/markdown/native/ai-stream.tsx +17 -0
- package/registry/examples/markdown/native/basic.d.ts +4 -0
- package/registry/examples/markdown/native/basic.dark.png +0 -0
- package/registry/examples/markdown/native/basic.js +28 -0
- package/registry/examples/markdown/native/basic.light.png +0 -0
- package/registry/examples/markdown/native/basic.tsx +27 -0
- package/registry/examples/nav-bar/family-admin.d.ts +4 -0
- package/registry/examples/nav-bar/family-admin.js +21 -0
- package/registry/examples/nav-bar/family-admin.tsx +20 -0
- package/registry/examples/nav-bar/family-java.d.ts +4 -0
- package/registry/examples/nav-bar/family-java.js +33 -0
- package/registry/examples/nav-bar/family-java.tsx +34 -0
- package/registry/examples/nav-bar/family-product.d.ts +4 -0
- package/registry/examples/nav-bar/family-product.js +35 -0
- package/registry/examples/nav-bar/family-product.tsx +39 -0
- package/registry/examples/nav-bar/family-ui.d.ts +4 -0
- package/registry/examples/nav-bar/family-ui.js +34 -0
- package/registry/examples/nav-bar/family-ui.tsx +35 -0
- package/registry/examples/nav-bar/family-www.d.ts +4 -0
- package/registry/examples/nav-bar/family-www.js +34 -0
- package/registry/examples/nav-bar/family-www.tsx +36 -0
- package/registry/examples/recipes/tone-chip.d.ts +4 -0
- package/registry/examples/recipes/tone-chip.js +46 -0
- package/registry/examples/recipes/tone-chip.tsx +32 -0
- package/registry/examples/screen/native/profile.dark.png +0 -0
- package/registry/examples/screen/native/profile.light.png +0 -0
- package/registry/examples/showcase/native/slides.d.ts +4 -0
- package/registry/examples/showcase/native/slides.dark.png +0 -0
- package/registry/examples/showcase/native/slides.js +27 -0
- package/registry/examples/showcase/native/slides.light.png +0 -0
- package/registry/examples/showcase/native/slides.tsx +28 -0
- package/registry/examples/showcase/prompt-image.d.ts +4 -0
- package/registry/examples/showcase/prompt-image.js +29 -0
- package/registry/examples/showcase/prompt-image.tsx +28 -0
- package/registry/examples/showcase/slides.d.ts +4 -0
- package/registry/examples/showcase/slides.js +29 -0
- package/registry/examples/showcase/slides.tsx +24 -0
- package/registry/examples/site-footer/company.d.ts +4 -0
- package/registry/examples/site-footer/company.js +26 -0
- package/registry/examples/site-footer/company.tsx +23 -0
- package/registry/examples/site-footer/open-source-fr.d.ts +4 -0
- package/registry/examples/site-footer/open-source-fr.js +17 -0
- package/registry/examples/site-footer/open-source-fr.tsx +17 -0
- package/registry/examples/site-footer/product.d.ts +4 -0
- package/registry/examples/site-footer/product.js +22 -0
- package/registry/examples/site-footer/product.tsx +19 -0
- package/registry/examples/sites/family.d.ts +4 -0
- package/registry/examples/sites/family.js +20 -0
- package/registry/examples/sites/family.tsx +30 -0
- package/registry/examples/sites/french.d.ts +4 -0
- package/registry/examples/sites/french.js +25 -0
- package/registry/examples/sites/french.tsx +25 -0
- package/registry/examples/tag-selector/native/interests.dark.png +0 -0
- package/registry/examples/tag-selector/native/interests.light.png +0 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +8 -3
- package/registry/filter-bar.json +1 -1
- package/registry/form.json +2 -2
- package/registry/gallery-page.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +2 -2
- package/registry/index.json +138 -20
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +2 -2
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/map.json +3 -3
- package/registry/markdown.json +266 -0
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +2 -2
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +257 -13
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/recipes.json +99 -0
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +4 -3
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/showcase.json +421 -0
- package/registry/site-footer.json +389 -0
- package/registry/sites.json +93 -0
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/swipe-deck.json +2 -2
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +2 -2
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +2 -2
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +2 -2
- package/registry/video-player.json +2 -2
- package/registry/video-trimmer.json +2 -2
- package/registry/virtual.json +2 -2
- package/dist/button-BMAO7dKF.d.ts +0 -114
- package/dist/chunk-BRKMQ6JV.js.map +0 -1
- package/dist/chunk-FDCMBWUU.js.map +0 -1
- package/dist/chunk-LCZXS6AK.js.map +0 -1
- package/dist/chunk-RUPNPMP3.js.map +0 -1
- package/dist/chunk-UOMP6VOZ.js.map +0 -1
- package/dist/chunk-YH4LMWRU.js.map +0 -1
- package/dist/chunk-Z6FUPB3Q.js.map +0 -1
- /package/dist/{chunk-ND3L5VHT.js.map → chunk-5Z7FWCV2.js.map} +0 -0
- /package/dist/{chunk-ZKVQGXLD.js.map → chunk-FKBHWS4N.js.map} +0 -0
- /package/dist/{chunk-HCNOOPZE.js.map → chunk-KVDB4GXV.js.map} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { S as SiteId, F as FamilyLabels } from './sites-CgJrxejx.js';
|
|
4
|
+
|
|
5
|
+
declare const siteFooter: tailwind_variants.TVReturnType<{
|
|
6
|
+
[key: string]: {
|
|
7
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
8
|
+
title?: tailwind_variants.ClassValue;
|
|
9
|
+
link?: tailwind_variants.ClassValue;
|
|
10
|
+
list?: tailwind_variants.ClassValue;
|
|
11
|
+
mark?: tailwind_variants.ClassValue;
|
|
12
|
+
root?: tailwind_variants.ClassValue;
|
|
13
|
+
inner?: tailwind_variants.ClassValue;
|
|
14
|
+
top?: tailwind_variants.ClassValue;
|
|
15
|
+
site?: tailwind_variants.ClassValue;
|
|
16
|
+
siteName?: tailwind_variants.ClassValue;
|
|
17
|
+
siteText?: tailwind_variants.ClassValue;
|
|
18
|
+
own?: tailwind_variants.ClassValue;
|
|
19
|
+
family?: tailwind_variants.ClassValue;
|
|
20
|
+
column?: tailwind_variants.ClassValue;
|
|
21
|
+
tag?: tailwind_variants.ClassValue;
|
|
22
|
+
bottom?: tailwind_variants.ClassValue;
|
|
23
|
+
signature?: tailwind_variants.ClassValue;
|
|
24
|
+
version?: tailwind_variants.ClassValue;
|
|
25
|
+
legal?: tailwind_variants.ClassValue;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
[x: string]: {
|
|
30
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
31
|
+
title?: tailwind_variants.ClassValue;
|
|
32
|
+
link?: tailwind_variants.ClassValue;
|
|
33
|
+
list?: tailwind_variants.ClassValue;
|
|
34
|
+
mark?: tailwind_variants.ClassValue;
|
|
35
|
+
root?: tailwind_variants.ClassValue;
|
|
36
|
+
inner?: tailwind_variants.ClassValue;
|
|
37
|
+
top?: tailwind_variants.ClassValue;
|
|
38
|
+
site?: tailwind_variants.ClassValue;
|
|
39
|
+
siteName?: tailwind_variants.ClassValue;
|
|
40
|
+
siteText?: tailwind_variants.ClassValue;
|
|
41
|
+
own?: tailwind_variants.ClassValue;
|
|
42
|
+
family?: tailwind_variants.ClassValue;
|
|
43
|
+
column?: tailwind_variants.ClassValue;
|
|
44
|
+
tag?: tailwind_variants.ClassValue;
|
|
45
|
+
bottom?: tailwind_variants.ClassValue;
|
|
46
|
+
signature?: tailwind_variants.ClassValue;
|
|
47
|
+
version?: tailwind_variants.ClassValue;
|
|
48
|
+
legal?: tailwind_variants.ClassValue;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
} | {}, {
|
|
52
|
+
root: string;
|
|
53
|
+
inner: string;
|
|
54
|
+
top: string;
|
|
55
|
+
site: string;
|
|
56
|
+
siteName: string;
|
|
57
|
+
siteText: string;
|
|
58
|
+
own: string;
|
|
59
|
+
family: string;
|
|
60
|
+
column: string;
|
|
61
|
+
title: string;
|
|
62
|
+
list: string;
|
|
63
|
+
link: string;
|
|
64
|
+
mark: string;
|
|
65
|
+
tag: string;
|
|
66
|
+
bottom: string;
|
|
67
|
+
signature: string;
|
|
68
|
+
version: string;
|
|
69
|
+
legal: string;
|
|
70
|
+
}, undefined, {
|
|
71
|
+
[key: string]: {
|
|
72
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
73
|
+
title?: tailwind_variants.ClassValue;
|
|
74
|
+
link?: tailwind_variants.ClassValue;
|
|
75
|
+
list?: tailwind_variants.ClassValue;
|
|
76
|
+
mark?: tailwind_variants.ClassValue;
|
|
77
|
+
root?: tailwind_variants.ClassValue;
|
|
78
|
+
inner?: tailwind_variants.ClassValue;
|
|
79
|
+
top?: tailwind_variants.ClassValue;
|
|
80
|
+
site?: tailwind_variants.ClassValue;
|
|
81
|
+
siteName?: tailwind_variants.ClassValue;
|
|
82
|
+
siteText?: tailwind_variants.ClassValue;
|
|
83
|
+
own?: tailwind_variants.ClassValue;
|
|
84
|
+
family?: tailwind_variants.ClassValue;
|
|
85
|
+
column?: tailwind_variants.ClassValue;
|
|
86
|
+
tag?: tailwind_variants.ClassValue;
|
|
87
|
+
bottom?: tailwind_variants.ClassValue;
|
|
88
|
+
signature?: tailwind_variants.ClassValue;
|
|
89
|
+
version?: tailwind_variants.ClassValue;
|
|
90
|
+
legal?: tailwind_variants.ClassValue;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
} | {}, {
|
|
94
|
+
root: string;
|
|
95
|
+
inner: string;
|
|
96
|
+
top: string;
|
|
97
|
+
site: string;
|
|
98
|
+
siteName: string;
|
|
99
|
+
siteText: string;
|
|
100
|
+
own: string;
|
|
101
|
+
family: string;
|
|
102
|
+
column: string;
|
|
103
|
+
title: string;
|
|
104
|
+
list: string;
|
|
105
|
+
link: string;
|
|
106
|
+
mark: string;
|
|
107
|
+
tag: string;
|
|
108
|
+
bottom: string;
|
|
109
|
+
signature: string;
|
|
110
|
+
version: string;
|
|
111
|
+
legal: string;
|
|
112
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
113
|
+
root: string;
|
|
114
|
+
inner: string;
|
|
115
|
+
top: string;
|
|
116
|
+
site: string;
|
|
117
|
+
siteName: string;
|
|
118
|
+
siteText: string;
|
|
119
|
+
own: string;
|
|
120
|
+
family: string;
|
|
121
|
+
column: string;
|
|
122
|
+
title: string;
|
|
123
|
+
list: string;
|
|
124
|
+
link: string;
|
|
125
|
+
mark: string;
|
|
126
|
+
tag: string;
|
|
127
|
+
bottom: string;
|
|
128
|
+
signature: string;
|
|
129
|
+
version: string;
|
|
130
|
+
legal: string;
|
|
131
|
+
}>>;
|
|
132
|
+
type SiteFooterProps = Omit<React.ComponentProps<"footer">, "children"> & {
|
|
133
|
+
/** The site this footer belongs to (`@krizaka/ui/sites`): its mark and line, its signature, marked in the family. */
|
|
134
|
+
current: SiteId;
|
|
135
|
+
/**
|
|
136
|
+
* The family's words, passed translated: `familyLabels.fr` from `@krizaka/ui/sites`, or your own of the same shape.
|
|
137
|
+
* @default familyLabels.en
|
|
138
|
+
*/
|
|
139
|
+
labels?: FamilyLabels;
|
|
140
|
+
/** The site's own columns (`SiteFooter.Column`), before the family. */
|
|
141
|
+
children?: React.ReactNode;
|
|
142
|
+
/** The version the site runs (`1.2.3`, shown `v1.2.3`). */
|
|
143
|
+
version?: string;
|
|
144
|
+
/** The environment, when it is not production (`DEV`). */
|
|
145
|
+
env?: string;
|
|
146
|
+
/** The end of the signature line: legal links, a language switch (`SiteFooter.Link`s or any inline content). */
|
|
147
|
+
legal?: React.ReactNode;
|
|
148
|
+
};
|
|
149
|
+
/** The footer of a Krizaka site: its own columns, the family in columns, the signature, the version, Montréal. */
|
|
150
|
+
declare function SiteFooter({ current, labels, children, version, env, legal, className, ...props }: SiteFooterProps): React.JSX.Element;
|
|
151
|
+
declare namespace SiteFooter {
|
|
152
|
+
var Column: typeof SiteFooterColumn;
|
|
153
|
+
var Link: typeof SiteFooterLink;
|
|
154
|
+
}
|
|
155
|
+
type SiteFooterColumnProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
156
|
+
/** The column's heading (“Docs”) — passed translated. */
|
|
157
|
+
title: string;
|
|
158
|
+
/** Its links (`SiteFooter.Link`). */
|
|
159
|
+
children: React.ReactNode;
|
|
160
|
+
};
|
|
161
|
+
/** One of the site's own columns: a heading and its links. */
|
|
162
|
+
declare function SiteFooterColumn({ title, children, className, ...props }: SiteFooterColumnProps): React.JSX.Element;
|
|
163
|
+
type SiteFooterLinkProps = React.ComponentProps<"a"> & {
|
|
164
|
+
/** The current page: `aria-current="page"`. */
|
|
165
|
+
active?: boolean;
|
|
166
|
+
/** Renders your router's `<Link>`. */
|
|
167
|
+
asChild?: boolean;
|
|
168
|
+
};
|
|
169
|
+
/** A link of the footer. */
|
|
170
|
+
declare function SiteFooterLink({ active, asChild, className, ...props }: SiteFooterLinkProps): React.JSX.Element;
|
|
171
|
+
|
|
172
|
+
export { SiteFooter, SiteFooterColumn, type SiteFooterColumnProps, SiteFooterLink, type SiteFooterLinkProps, type SiteFooterProps, siteFooter };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
FamilyMark,
|
|
4
|
+
familyLabels,
|
|
5
|
+
siteById,
|
|
6
|
+
sitesByGroup
|
|
7
|
+
} from "./chunk-OT6HX3PN.js";
|
|
8
|
+
import {
|
|
9
|
+
KrizakaLogo
|
|
10
|
+
} from "./chunk-HG65YAV4.js";
|
|
11
|
+
|
|
12
|
+
// src/site-footer/site-footer.tsx
|
|
13
|
+
import { Slot } from "radix-ui";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { tv } from "tailwind-variants";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var siteFooter = tv({
|
|
18
|
+
slots: {
|
|
19
|
+
root: "w-full border-t border-border-subtle bg-surface-0 text-fg",
|
|
20
|
+
inner: "mx-auto grid w-full max-w-(--kz-page-max,72rem) gap-10 px-(--kz-page-gutter,16px) py-12",
|
|
21
|
+
top: "grid gap-8 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]",
|
|
22
|
+
site: "grid content-start gap-3",
|
|
23
|
+
siteName: "inline-flex items-center gap-2 font-display text-[15px] font-bold tracking-tight text-fg",
|
|
24
|
+
siteText: "max-w-xs text-sm leading-relaxed text-fg-secondary",
|
|
25
|
+
own: "grid grid-cols-2 gap-8 sm:grid-cols-3",
|
|
26
|
+
family: "grid grid-cols-2 gap-8 border-t border-border-subtle pt-8 md:grid-cols-4",
|
|
27
|
+
column: "grid content-start gap-3",
|
|
28
|
+
title: "text-[11px] font-semibold uppercase tracking-wider text-fg-secondary",
|
|
29
|
+
list: "grid gap-2",
|
|
30
|
+
link: "inline-flex min-h-6 items-center gap-2 rounded-md text-sm text-fg-secondary no-underline transition-colors hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-fg aria-[current=true]:text-fg aria-[current=true]:font-semibold",
|
|
31
|
+
mark: "flex h-4 w-4 shrink-0 items-center justify-center text-fg",
|
|
32
|
+
tag: "rounded-full bg-surface-3 px-1.5 py-px text-[10px] font-semibold uppercase tracking-wider text-fg-secondary",
|
|
33
|
+
bottom: "flex flex-wrap items-center gap-x-5 gap-y-3 border-t border-border-subtle pt-6 text-xs text-fg-secondary",
|
|
34
|
+
signature: "inline-flex items-center gap-2 rounded-md font-medium text-fg no-underline hover:text-fg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
35
|
+
version: "rounded-full border border-border-subtle bg-surface-2 px-2 py-0.5 font-mono text-[11px] text-fg-secondary",
|
|
36
|
+
legal: "flex flex-wrap items-center gap-x-4 gap-y-2 sm:ml-auto"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
var s = siteFooter();
|
|
40
|
+
function SiteFooter({ current, labels = familyLabels.en, children, version, env, legal, className, ...props }) {
|
|
41
|
+
const id = React.useId();
|
|
42
|
+
const site = siteById(current);
|
|
43
|
+
const krizaka = siteById("krizaka");
|
|
44
|
+
const tag = [env, version && `v${version.replace(/^v/, "")}`].filter(Boolean).join(" \xB7 ");
|
|
45
|
+
return /* @__PURE__ */ jsx("footer", { className: s.root({ className }), ...props, children: /* @__PURE__ */ jsxs("div", { className: s.inner(), children: [
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: s.top(), children: [
|
|
47
|
+
/* @__PURE__ */ jsxs("div", { className: s.site(), children: [
|
|
48
|
+
/* @__PURE__ */ jsxs("a", { href: site.url, className: s.siteName(), children: [
|
|
49
|
+
/* @__PURE__ */ jsx(FamilyMark, { mark: site.mark, size: 24 }),
|
|
50
|
+
site.name
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx("p", { className: s.siteText(), children: labels.descriptions[site.id] })
|
|
53
|
+
] }),
|
|
54
|
+
children && /* @__PURE__ */ jsx("div", { className: s.own(), children })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": labels.family, className: s.family(), children: sitesByGroup().map(({ group, sites }) => /* @__PURE__ */ jsxs("div", { className: s.column(), children: [
|
|
57
|
+
/* @__PURE__ */ jsx("p", { id: `${id}-${group}`, className: s.title(), children: labels.groups[group] }),
|
|
58
|
+
/* @__PURE__ */ jsx("ul", { "aria-labelledby": `${id}-${group}`, className: s.list(), children: sites.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("a", { href: item.url, "aria-current": item.id === current ? "true" : void 0, className: s.link(), children: [
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: s.mark(), children: /* @__PURE__ */ jsx(FamilyMark, { mark: item.mark, size: 16 }) }),
|
|
60
|
+
item.name,
|
|
61
|
+
item.status !== "released" && /* @__PURE__ */ jsx("span", { className: s.tag(), children: labels.status[item.status] }),
|
|
62
|
+
item.id === current && /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
63
|
+
"(",
|
|
64
|
+
labels.current,
|
|
65
|
+
")"
|
|
66
|
+
] })
|
|
67
|
+
] }) }, item.id)) })
|
|
68
|
+
] }, group)) }),
|
|
69
|
+
/* @__PURE__ */ jsxs("div", { className: s.bottom(), children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("a", { href: krizaka.url, className: s.signature(), children: [
|
|
71
|
+
/* @__PURE__ */ jsx(KrizakaLogo, { size: 18, animated: false }),
|
|
72
|
+
labels.signature[site.kind]
|
|
73
|
+
] }),
|
|
74
|
+
tag && /* @__PURE__ */ jsxs("span", { className: s.version(), children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
76
|
+
labels.version,
|
|
77
|
+
" "
|
|
78
|
+
] }),
|
|
79
|
+
tag
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx("span", { children: labels.place }),
|
|
82
|
+
legal && /* @__PURE__ */ jsx("div", { className: s.legal(), children: legal })
|
|
83
|
+
] })
|
|
84
|
+
] }) });
|
|
85
|
+
}
|
|
86
|
+
function SiteFooterColumn({ title, children, className, ...props }) {
|
|
87
|
+
const id = React.useId();
|
|
88
|
+
return /* @__PURE__ */ jsxs("div", { className: s.column({ className }), ...props, children: [
|
|
89
|
+
/* @__PURE__ */ jsx("p", { id, className: s.title(), children: title }),
|
|
90
|
+
/* @__PURE__ */ jsx("ul", { "aria-labelledby": id, className: s.list(), children: React.Children.map(children, (child) => child ? /* @__PURE__ */ jsx("li", { children: child }) : null) })
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
function SiteFooterLink({ active, asChild, className, ...props }) {
|
|
94
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
95
|
+
return /* @__PURE__ */ jsx(Comp, { "aria-current": active ? "page" : void 0, className: s.link({ className }), ...props });
|
|
96
|
+
}
|
|
97
|
+
SiteFooter.Column = SiteFooterColumn;
|
|
98
|
+
SiteFooter.Link = SiteFooterLink;
|
|
99
|
+
export {
|
|
100
|
+
SiteFooter,
|
|
101
|
+
SiteFooterColumn,
|
|
102
|
+
SiteFooterLink,
|
|
103
|
+
siteFooter
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=site-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/site-footer/site-footer.tsx"],"sourcesContent":["// Client (the marks hold an id). The footer shared by every site of the Krizaka family: the site's own columns, then the\n// family in columns from `@krizaka/ui/sites` (the same groups as the bar's switcher), then the signature line — “A\n// Krizaka product” by the kind of the current site — the version and the place.\nimport { Slot } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { FamilyMark } from \"../family-mark\";\nimport { KrizakaLogo } from \"../marks/KrizakaLogo\";\nimport { type FamilyLabels, familyLabels, siteById, type SiteId, sitesByGroup } from \"../sites/sites\";\n\nexport const siteFooter = tv({\n slots: {\n root: \"w-full border-t border-border-subtle bg-surface-0 text-fg\",\n inner: \"mx-auto grid w-full max-w-(--kz-page-max,72rem) gap-10 px-(--kz-page-gutter,16px) py-12\",\n top: \"grid gap-8 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]\",\n site: \"grid content-start gap-3\",\n siteName: \"inline-flex items-center gap-2 font-display text-[15px] font-bold tracking-tight text-fg\",\n siteText: \"max-w-xs text-sm leading-relaxed text-fg-secondary\",\n own: \"grid grid-cols-2 gap-8 sm:grid-cols-3\",\n family: \"grid grid-cols-2 gap-8 border-t border-border-subtle pt-8 md:grid-cols-4\",\n column: \"grid content-start gap-3\",\n title: \"text-[11px] font-semibold uppercase tracking-wider text-fg-secondary\",\n list: \"grid gap-2\",\n link:\n \"inline-flex min-h-6 items-center gap-2 rounded-md text-sm text-fg-secondary no-underline transition-colors hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-fg aria-[current=true]:text-fg aria-[current=true]:font-semibold\",\n mark: \"flex h-4 w-4 shrink-0 items-center justify-center text-fg\",\n tag: \"rounded-full bg-surface-3 px-1.5 py-px text-[10px] font-semibold uppercase tracking-wider text-fg-secondary\",\n bottom: \"flex flex-wrap items-center gap-x-5 gap-y-3 border-t border-border-subtle pt-6 text-xs text-fg-secondary\",\n signature:\n \"inline-flex items-center gap-2 rounded-md font-medium text-fg no-underline hover:text-fg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n version: \"rounded-full border border-border-subtle bg-surface-2 px-2 py-0.5 font-mono text-[11px] text-fg-secondary\",\n legal: \"flex flex-wrap items-center gap-x-4 gap-y-2 sm:ml-auto\",\n },\n});\nconst s = siteFooter();\n\nexport type SiteFooterProps = Omit<React.ComponentProps<\"footer\">, \"children\"> & {\n /** The site this footer belongs to (`@krizaka/ui/sites`): its mark and line, its signature, marked in the family. */\n current: SiteId;\n /**\n * The family's words, passed translated: `familyLabels.fr` from `@krizaka/ui/sites`, or your own of the same shape.\n * @default familyLabels.en\n */\n labels?: FamilyLabels;\n /** The site's own columns (`SiteFooter.Column`), before the family. */\n children?: React.ReactNode;\n /** The version the site runs (`1.2.3`, shown `v1.2.3`). */\n version?: string;\n /** The environment, when it is not production (`DEV`). */\n env?: string;\n /** The end of the signature line: legal links, a language switch (`SiteFooter.Link`s or any inline content). */\n legal?: React.ReactNode;\n};\n\n/** The footer of a Krizaka site: its own columns, the family in columns, the signature, the version, Montréal. */\nexport function SiteFooter({ current, labels = familyLabels.en, children, version, env, legal, className, ...props }: SiteFooterProps) {\n const id = React.useId();\n const site = siteById(current);\n const krizaka = siteById(\"krizaka\");\n const tag = [env, version && `v${version.replace(/^v/, \"\")}`].filter(Boolean).join(\" · \");\n return (\n <footer className={s.root({ className })} {...props}>\n <div className={s.inner()}>\n <div className={s.top()}>\n <div className={s.site()}>\n <a href={site.url} className={s.siteName()}>\n <FamilyMark mark={site.mark} size={24} />\n {site.name}\n </a>\n <p className={s.siteText()}>{labels.descriptions[site.id]}</p>\n </div>\n {children && <div className={s.own()}>{children}</div>}\n </div>\n <nav aria-label={labels.family} className={s.family()}>\n {sitesByGroup().map(({ group, sites }) => (\n <div key={group} className={s.column()}>\n <p id={`${id}-${group}`} className={s.title()}>\n {labels.groups[group]}\n </p>\n <ul aria-labelledby={`${id}-${group}`} className={s.list()}>\n {sites.map((item) => (\n <li key={item.id}>\n <a href={item.url} aria-current={item.id === current ? \"true\" : undefined} className={s.link()}>\n <span className={s.mark()}>\n <FamilyMark mark={item.mark} size={16} />\n </span>\n {item.name}\n {item.status !== \"released\" && <span className={s.tag()}>{labels.status[item.status]}</span>}\n {item.id === current && <span className=\"sr-only\">({labels.current})</span>}\n </a>\n </li>\n ))}\n </ul>\n </div>\n ))}\n </nav>\n <div className={s.bottom()}>\n <a href={krizaka.url} className={s.signature()}>\n <KrizakaLogo size={18} animated={false} />\n {labels.signature[site.kind]}\n </a>\n {tag && (\n <span className={s.version()}>\n <span className=\"sr-only\">{labels.version} </span>\n {tag}\n </span>\n )}\n <span>{labels.place}</span>\n {legal && <div className={s.legal()}>{legal}</div>}\n </div>\n </div>\n </footer>\n );\n}\n\nexport type SiteFooterColumnProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The column's heading (“Docs”) — passed translated. */\n title: string;\n /** Its links (`SiteFooter.Link`). */\n children: React.ReactNode;\n};\n\n/** One of the site's own columns: a heading and its links. */\nexport function SiteFooterColumn({ title, children, className, ...props }: SiteFooterColumnProps) {\n const id = React.useId();\n return (\n <div className={s.column({ className })} {...props}>\n <p id={id} className={s.title()}>\n {title}\n </p>\n <ul aria-labelledby={id} className={s.list()}>\n {React.Children.map(children, (child) => (child ? <li>{child}</li> : null))}\n </ul>\n </div>\n );\n}\n\nexport type SiteFooterLinkProps = React.ComponentProps<\"a\"> & {\n /** The current page: `aria-current=\"page\"`. */\n active?: boolean;\n /** Renders your router's `<Link>`. */\n asChild?: boolean;\n};\n\n/** A link of the footer. */\nexport function SiteFooterLink({ active, asChild, className, ...props }: SiteFooterLinkProps) {\n const Comp = asChild ? Slot.Root : \"a\";\n return <Comp aria-current={active ? \"page\" : undefined} className={s.link({ className })} {...props} />;\n}\n\nSiteFooter.Column = SiteFooterColumn;\nSiteFooter.Link = SiteFooterLink;\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** A site of the family. */
|
|
2
|
+
type SiteId = "krizaka" | "orazaka" | "orochia" | "yasakia" | "yororis" | "ui" | "java" | "github";
|
|
3
|
+
/** What a site is: the company, a product, or an open-source project. It chooses the footer's signature line. */
|
|
4
|
+
type SiteKind = "company" | "product" | "open-source";
|
|
5
|
+
/**
|
|
6
|
+
* `released`: open to visit. `upcoming`: announced, not released yet (said "Coming soon"). `construction`: under
|
|
7
|
+
* construction — nothing deployed beyond its page, nothing offered.
|
|
8
|
+
*/
|
|
9
|
+
type SiteStatus = "released" | "upcoming" | "construction";
|
|
10
|
+
/** The groups of the family, in reading order: Krizaka · Products · Open source · GitHub. */
|
|
11
|
+
type SiteGroup = "krizaka" | "products" | "open-source" | "github";
|
|
12
|
+
/** The words of the family: the switcher, the footer, each site's one line. */
|
|
13
|
+
interface FamilyLabels {
|
|
14
|
+
/** The family's name: the switcher's navigation and its button, the footer's navigation (“Krizaka family”). */
|
|
15
|
+
family: string;
|
|
16
|
+
/** The heading of each group. */
|
|
17
|
+
groups: Record<SiteGroup, string>;
|
|
18
|
+
/** The badge of a site that is not released. */
|
|
19
|
+
status: Record<Exclude<SiteStatus, "released">, string>;
|
|
20
|
+
/** Says which site is the current one (“You are here”). */
|
|
21
|
+
current: string;
|
|
22
|
+
/** One line per site: what it is. */
|
|
23
|
+
descriptions: Record<SiteId, string>;
|
|
24
|
+
/** The footer's signature, by the kind of the current site (“A Krizaka product”). */
|
|
25
|
+
signature: Record<SiteKind, string>;
|
|
26
|
+
/** The footer's place line (“Made in Montréal”). */
|
|
27
|
+
place: string;
|
|
28
|
+
/** The accessible name of the version (“Version”). */
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type { FamilyLabels as F, SiteId as S };
|
package/dist/sites.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** A site of the family. */
|
|
2
|
+
type SiteId = "krizaka" | "orazaka" | "orochia" | "yasakia" | "yororis" | "ui" | "java" | "github";
|
|
3
|
+
/** What a site is: the company, a product, or an open-source project. It chooses the footer's signature line. */
|
|
4
|
+
type SiteKind = "company" | "product" | "open-source";
|
|
5
|
+
/**
|
|
6
|
+
* `released`: open to visit. `upcoming`: announced, not released yet (said "Coming soon"). `construction`: under
|
|
7
|
+
* construction — nothing deployed beyond its page, nothing offered.
|
|
8
|
+
*/
|
|
9
|
+
type SiteStatus = "released" | "upcoming" | "construction";
|
|
10
|
+
/** The groups of the family, in reading order: Krizaka · Products · Open source · GitHub. */
|
|
11
|
+
type SiteGroup = "krizaka" | "products" | "open-source" | "github";
|
|
12
|
+
/** The mark a site wears: a brand of `ProductLogo` (Krizaka UI and Krizaka Java wear Krizaka's), or GitHub's. */
|
|
13
|
+
type SiteMark = "krizaka" | "orazaka" | "orochia" | "yasakia" | "yororis" | "github";
|
|
14
|
+
interface Site {
|
|
15
|
+
readonly id: SiteId;
|
|
16
|
+
/** The name, never translated. */
|
|
17
|
+
readonly name: string;
|
|
18
|
+
/** The address of the site (its home). */
|
|
19
|
+
readonly url: string;
|
|
20
|
+
/** The address without the scheme, as people say it (`ui.krizaka.com`). */
|
|
21
|
+
readonly host: string;
|
|
22
|
+
readonly kind: SiteKind;
|
|
23
|
+
readonly group: SiteGroup;
|
|
24
|
+
readonly status: SiteStatus;
|
|
25
|
+
readonly mark: SiteMark;
|
|
26
|
+
/** The repository the site is built from. */
|
|
27
|
+
readonly repo: string;
|
|
28
|
+
}
|
|
29
|
+
/** Every site of the family, in reading order (the group order, then the order inside each group). */
|
|
30
|
+
declare const sites: readonly Site[];
|
|
31
|
+
/** The groups, in reading order. */
|
|
32
|
+
declare const siteGroups: readonly SiteGroup[];
|
|
33
|
+
/** A site by id. */
|
|
34
|
+
declare function siteById(id: SiteId): Site;
|
|
35
|
+
/** The family grouped, in reading order: `[{ group, sites }]`, empty groups left out. */
|
|
36
|
+
declare function sitesByGroup(): {
|
|
37
|
+
group: SiteGroup;
|
|
38
|
+
sites: Site[];
|
|
39
|
+
}[];
|
|
40
|
+
/** The languages the family's words are written in. */
|
|
41
|
+
type SiteLocale = "en" | "fr";
|
|
42
|
+
/** The words of the family: the switcher, the footer, each site's one line. */
|
|
43
|
+
interface FamilyLabels {
|
|
44
|
+
/** The family's name: the switcher's navigation and its button, the footer's navigation (“Krizaka family”). */
|
|
45
|
+
family: string;
|
|
46
|
+
/** The heading of each group. */
|
|
47
|
+
groups: Record<SiteGroup, string>;
|
|
48
|
+
/** The badge of a site that is not released. */
|
|
49
|
+
status: Record<Exclude<SiteStatus, "released">, string>;
|
|
50
|
+
/** Says which site is the current one (“You are here”). */
|
|
51
|
+
current: string;
|
|
52
|
+
/** One line per site: what it is. */
|
|
53
|
+
descriptions: Record<SiteId, string>;
|
|
54
|
+
/** The footer's signature, by the kind of the current site (“A Krizaka product”). */
|
|
55
|
+
signature: Record<SiteKind, string>;
|
|
56
|
+
/** The footer's place line (“Made in Montréal”). */
|
|
57
|
+
place: string;
|
|
58
|
+
/** The accessible name of the version (“Version”). */
|
|
59
|
+
version: string;
|
|
60
|
+
}
|
|
61
|
+
/** The family's words in English and French. Pass `familyLabels[locale]`, or your own translation of the same shape. */
|
|
62
|
+
declare const familyLabels: Record<SiteLocale, FamilyLabels>;
|
|
63
|
+
|
|
64
|
+
export { type FamilyLabels, type Site, type SiteGroup, type SiteId, type SiteKind, type SiteLocale, type SiteMark, type SiteStatus, familyLabels, siteById, siteGroups, sites, sitesByGroup };
|
package/dist/sites.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// src/sites/sites.ts
|
|
2
|
+
var site = (s) => ({ ...s, host: s.url.replace(/^https?:\/\//, "").replace(/\/$/, "") });
|
|
3
|
+
var sites = [
|
|
4
|
+
site({ id: "krizaka", name: "Krizaka", url: "https://www.krizaka.com", kind: "company", group: "krizaka", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-com" }),
|
|
5
|
+
site({ id: "orazaka", name: "Orazaka", url: "https://dev.orazaka.com", kind: "product", group: "products", status: "released", mark: "orazaka", repo: "https://github.com/krizaka/orazaka" }),
|
|
6
|
+
site({ id: "orochia", name: "Orochia", url: "https://dev.orochia.com", kind: "product", group: "products", status: "released", mark: "orochia", repo: "https://github.com/krizaka/orochia" }),
|
|
7
|
+
site({ id: "yasakia", name: "Yasakia", url: "https://dev.yasakia.com", kind: "product", group: "products", status: "upcoming", mark: "yasakia", repo: "https://github.com/krizaka/yasakia" }),
|
|
8
|
+
site({ id: "yororis", name: "Yororis", url: "https://dev.yororis.com", kind: "product", group: "products", status: "construction", mark: "yororis", repo: "https://github.com/krizaka/yororis" }),
|
|
9
|
+
site({ id: "ui", name: "Krizaka UI", url: "https://ui.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-ui" }),
|
|
10
|
+
site({ id: "java", name: "Krizaka Java", url: "https://java.krizaka.com", kind: "open-source", group: "open-source", status: "released", mark: "krizaka", repo: "https://github.com/krizaka/krizaka-build" }),
|
|
11
|
+
site({ id: "github", name: "GitHub", url: "https://github.com/krizaka", kind: "open-source", group: "github", status: "released", mark: "github", repo: "https://github.com/krizaka" })
|
|
12
|
+
];
|
|
13
|
+
var siteGroups = ["krizaka", "products", "open-source", "github"];
|
|
14
|
+
function siteById(id) {
|
|
15
|
+
const found = sites.find((s) => s.id === id);
|
|
16
|
+
if (!found) throw new Error(`Unknown Krizaka site "${id}".`);
|
|
17
|
+
return found;
|
|
18
|
+
}
|
|
19
|
+
function sitesByGroup() {
|
|
20
|
+
return siteGroups.map((group) => ({ group, sites: sites.filter((s) => s.group === group) })).filter((g) => g.sites.length > 0);
|
|
21
|
+
}
|
|
22
|
+
var familyLabels = {
|
|
23
|
+
en: {
|
|
24
|
+
family: "Krizaka family",
|
|
25
|
+
groups: { krizaka: "Krizaka", products: "Products", "open-source": "Open source", github: "GitHub" },
|
|
26
|
+
status: { upcoming: "Coming soon", construction: "Under construction" },
|
|
27
|
+
current: "You are here",
|
|
28
|
+
descriptions: {
|
|
29
|
+
krizaka: "The company: our products, our open source, our story.",
|
|
30
|
+
orazaka: "Sovereign AI, on your own servers.",
|
|
31
|
+
orochia: "A video platform for creators.",
|
|
32
|
+
yasakia: "The dating app where you talk first.",
|
|
33
|
+
yororis: "A listening space with a face and a voice.",
|
|
34
|
+
ui: "Components, tokens, icons and charts \u2014 web and React Native.",
|
|
35
|
+
java: "Spring Boot building blocks on Maven Central.",
|
|
36
|
+
github: "Every repository, in the open."
|
|
37
|
+
},
|
|
38
|
+
signature: { company: "A Krizaka company", product: "A Krizaka product", "open-source": "A Krizaka open-source project" },
|
|
39
|
+
place: "Made in Montr\xE9al",
|
|
40
|
+
version: "Version"
|
|
41
|
+
},
|
|
42
|
+
fr: {
|
|
43
|
+
family: "Famille Krizaka",
|
|
44
|
+
groups: { krizaka: "Krizaka", products: "Produits", "open-source": "Open source", github: "GitHub" },
|
|
45
|
+
status: { upcoming: "Bient\xF4t", construction: "En construction" },
|
|
46
|
+
current: "Vous \xEAtes ici",
|
|
47
|
+
descriptions: {
|
|
48
|
+
krizaka: "La compagnie : nos produits, notre open source, notre histoire.",
|
|
49
|
+
orazaka: "L\u2019IA souveraine, sur vos propres serveurs.",
|
|
50
|
+
orochia: "Une plateforme vid\xE9o pour les cr\xE9ateurs.",
|
|
51
|
+
yasakia: "L\u2019app de rencontre o\xF9 l\u2019on se parle d\u2019abord.",
|
|
52
|
+
yororis: "Un espace d\u2019\xE9coute avec un visage et une voix.",
|
|
53
|
+
ui: "Composants, jetons, ic\xF4nes et graphiques \u2014 web et React Native.",
|
|
54
|
+
java: "Des briques Spring Boot sur Maven Central.",
|
|
55
|
+
github: "Tous les d\xE9p\xF4ts, au grand jour."
|
|
56
|
+
},
|
|
57
|
+
signature: { company: "Une compagnie Krizaka", product: "Un produit Krizaka", "open-source": "Un projet open source de Krizaka" },
|
|
58
|
+
place: "Fait \xE0 Montr\xE9al",
|
|
59
|
+
version: "Version"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
familyLabels,
|
|
64
|
+
siteById,
|
|
65
|
+
siteGroups,
|
|
66
|
+
sites,
|
|
67
|
+
sitesByGroup
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=sites.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sites/sites.ts"],"sourcesContent":["// Server-safe: plain data. The Krizaka family — every site Krizaka runs, once. The family switcher of the bar\n// (`NavBar.Family`) and the common footer (`SiteFooter`) both read it, so adding a site is one release of this package:\n// every bar and every footer of the family follow.\n//\n// The words of the family (a site's one line, the groups, the statuses, the footer's signature) are brand data, written\n// here in English and French (`familyLabels`) — a site passes the set of its locale, or its own translation.\n\n/** A site of the family. */\nexport type SiteId = \"krizaka\" | \"orazaka\" | \"orochia\" | \"yasakia\" | \"yororis\" | \"ui\" | \"java\" | \"github\";\n\n/** What a site is: the company, a product, or an open-source project. It chooses the footer's signature line. */\nexport type SiteKind = \"company\" | \"product\" | \"open-source\";\n\n/**\n * `released`: open to visit. `upcoming`: announced, not released yet (said \"Coming soon\"). `construction`: under\n * construction — nothing deployed beyond its page, nothing offered.\n */\nexport type SiteStatus = \"released\" | \"upcoming\" | \"construction\";\n\n/** The groups of the family, in reading order: Krizaka · Products · Open source · GitHub. */\nexport type SiteGroup = \"krizaka\" | \"products\" | \"open-source\" | \"github\";\n\n/** The mark a site wears: a brand of `ProductLogo` (Krizaka UI and Krizaka Java wear Krizaka's), or GitHub's. */\nexport type SiteMark = \"krizaka\" | \"orazaka\" | \"orochia\" | \"yasakia\" | \"yororis\" | \"github\";\n\nexport interface Site {\n readonly id: SiteId;\n /** The name, never translated. */\n readonly name: string;\n /** The address of the site (its home). */\n readonly url: string;\n /** The address without the scheme, as people say it (`ui.krizaka.com`). */\n readonly host: string;\n readonly kind: SiteKind;\n readonly group: SiteGroup;\n readonly status: SiteStatus;\n readonly mark: SiteMark;\n /** The repository the site is built from. */\n readonly repo: string;\n}\n\nconst site = (s: Omit<Site, \"host\">): Site => ({ ...s, host: s.url.replace(/^https?:\\/\\//, \"\").replace(/\\/$/, \"\") });\n\n/** Every site of the family, in reading order (the group order, then the order inside each group). */\nexport const sites: readonly Site[] = [\n site({ id: \"krizaka\", name: \"Krizaka\", url: \"https://www.krizaka.com\", kind: \"company\", group: \"krizaka\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-com\" }),\n site({ id: \"orazaka\", name: \"Orazaka\", url: \"https://dev.orazaka.com\", kind: \"product\", group: \"products\", status: \"released\", mark: \"orazaka\", repo: \"https://github.com/krizaka/orazaka\" }),\n site({ id: \"orochia\", name: \"Orochia\", url: \"https://dev.orochia.com\", kind: \"product\", group: \"products\", status: \"released\", mark: \"orochia\", repo: \"https://github.com/krizaka/orochia\" }),\n site({ id: \"yasakia\", name: \"Yasakia\", url: \"https://dev.yasakia.com\", kind: \"product\", group: \"products\", status: \"upcoming\", mark: \"yasakia\", repo: \"https://github.com/krizaka/yasakia\" }),\n site({ id: \"yororis\", name: \"Yororis\", url: \"https://dev.yororis.com\", kind: \"product\", group: \"products\", status: \"construction\", mark: \"yororis\", repo: \"https://github.com/krizaka/yororis\" }),\n site({ id: \"ui\", name: \"Krizaka UI\", url: \"https://ui.krizaka.com\", kind: \"open-source\", group: \"open-source\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-ui\" }),\n site({ id: \"java\", name: \"Krizaka Java\", url: \"https://java.krizaka.com\", kind: \"open-source\", group: \"open-source\", status: \"released\", mark: \"krizaka\", repo: \"https://github.com/krizaka/krizaka-build\" }),\n site({ id: \"github\", name: \"GitHub\", url: \"https://github.com/krizaka\", kind: \"open-source\", group: \"github\", status: \"released\", mark: \"github\", repo: \"https://github.com/krizaka\" }),\n];\n\n/** The groups, in reading order. */\nexport const siteGroups: readonly SiteGroup[] = [\"krizaka\", \"products\", \"open-source\", \"github\"];\n\n/** A site by id. */\nexport function siteById(id: SiteId): Site {\n const found = sites.find((s) => s.id === id);\n if (!found) throw new Error(`Unknown Krizaka site \"${id}\".`);\n return found;\n}\n\n/** The family grouped, in reading order: `[{ group, sites }]`, empty groups left out. */\nexport function sitesByGroup(): { group: SiteGroup; sites: Site[] }[] {\n return siteGroups.map((group) => ({ group, sites: sites.filter((s) => s.group === group) })).filter((g) => g.sites.length > 0);\n}\n\n/** The languages the family's words are written in. */\nexport type SiteLocale = \"en\" | \"fr\";\n\n/** The words of the family: the switcher, the footer, each site's one line. */\nexport interface FamilyLabels {\n /** The family's name: the switcher's navigation and its button, the footer's navigation (“Krizaka family”). */\n family: string;\n /** The heading of each group. */\n groups: Record<SiteGroup, string>;\n /** The badge of a site that is not released. */\n status: Record<Exclude<SiteStatus, \"released\">, string>;\n /** Says which site is the current one (“You are here”). */\n current: string;\n /** One line per site: what it is. */\n descriptions: Record<SiteId, string>;\n /** The footer's signature, by the kind of the current site (“A Krizaka product”). */\n signature: Record<SiteKind, string>;\n /** The footer's place line (“Made in Montréal”). */\n place: string;\n /** The accessible name of the version (“Version”). */\n version: string;\n}\n\n/** The family's words in English and French. Pass `familyLabels[locale]`, or your own translation of the same shape. */\nexport const familyLabels: Record<SiteLocale, FamilyLabels> = {\n en: {\n family: \"Krizaka family\",\n groups: { krizaka: \"Krizaka\", products: \"Products\", \"open-source\": \"Open source\", github: \"GitHub\" },\n status: { upcoming: \"Coming soon\", construction: \"Under construction\" },\n current: \"You are here\",\n descriptions: {\n krizaka: \"The company: our products, our open source, our story.\",\n orazaka: \"Sovereign AI, on your own servers.\",\n orochia: \"A video platform for creators.\",\n yasakia: \"The dating app where you talk first.\",\n yororis: \"A listening space with a face and a voice.\",\n ui: \"Components, tokens, icons and charts — web and React Native.\",\n java: \"Spring Boot building blocks on Maven Central.\",\n github: \"Every repository, in the open.\",\n },\n signature: { company: \"A Krizaka company\", product: \"A Krizaka product\", \"open-source\": \"A Krizaka open-source project\" },\n place: \"Made in Montréal\",\n version: \"Version\",\n },\n fr: {\n family: \"Famille Krizaka\",\n groups: { krizaka: \"Krizaka\", products: \"Produits\", \"open-source\": \"Open source\", github: \"GitHub\" },\n status: { upcoming: \"Bientôt\", construction: \"En construction\" },\n current: \"Vous êtes ici\",\n descriptions: {\n krizaka: \"La compagnie : nos produits, notre open source, notre histoire.\",\n orazaka: \"L’IA souveraine, sur vos propres serveurs.\",\n orochia: \"Une plateforme vidéo pour les créateurs.\",\n yasakia: \"L’app de rencontre où l’on se parle d’abord.\",\n yororis: \"Un espace d’écoute avec un visage et une voix.\",\n ui: \"Composants, jetons, icônes et graphiques — web et React Native.\",\n java: \"Des briques Spring Boot sur Maven Central.\",\n github: \"Tous les dépôts, au grand jour.\",\n },\n signature: { company: \"Une compagnie Krizaka\", product: \"Un produit Krizaka\", \"open-source\": \"Un projet open source de Krizaka\" },\n place: \"Fait à Montréal\",\n version: \"Version\",\n },\n};\n"],"mappings":"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","names":[]}
|
package/dist/swipe-deck.js
CHANGED
package/dist/tag-input.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Combobox
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-CKSHLSDH.js";
|
|
5
|
+
import "./chunk-7UCPGXKN.js";
|
|
6
|
+
import "./chunk-D3T54RSL.js";
|
|
6
7
|
import "./chunk-ZIXB33X7.js";
|
|
7
8
|
import {
|
|
8
9
|
useControllable
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FZBWEDQI.js";
|
|
10
11
|
import "./chunk-CPA5CF35.js";
|
|
11
12
|
|
|
12
13
|
// src/tag-input/tag-input.tsx
|
package/dist/tag-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tag-input/tag-input.tsx"],"sourcesContent":["// Client. Free words as chips — the multiple, creatable `Combobox` on strings: Enter or a separator adds the word,\n// a paste of \"a, b, c\" adds three, Backspace on an empty input removes the last, suggestions complete as you type.\n// `normalize` cleans a word (lower case, no `#`), `validate` refuses one with a reason read aloud.\nimport * as React from \"react\";\n\nimport { Combobox, type ComboboxLabels, type ComboboxOption } from \"../combobox\";\nimport { useControllable } from \"../media\";\n\nexport type TagInputProps = {\n /** The visible label, passed translated (also the accessible name). */\n label: string;\n /** Hides the label visually, keeping it as the accessible name. */\n hideLabel?: boolean;\n /** The tags (controlled). */\n value?: readonly string[];\n /** The tags at first, uncontrolled. */\n defaultValue?: readonly string[];\n /** Called with every tag after a change. */\n onValueChange?: (tags: string[]) => void;\n /** Words offered as the person types (their own history, a curated list). */\n suggestions?: readonly string[];\n /** Cleans a word before it is added (`(t) => t.toLowerCase().replace(/^#/, \"\")`). An empty result is ignored. */\n normalize?: (tag: string) => string;\n /** Refuses a word: return the reason (passed translated), shown and read as the field's error; `null` accepts it. */\n validate?: (tag: string, tags: readonly string[]) => string | null;\n /** Most tags; the field stops offering more past it. */\n max?: number;\n /** Keys that add the word, besides Enter. Default `[\",\"]`. */\n separators?: readonly string[];\n /** The input's placeholder, passed translated. */\n placeholder?: string;\n /** A help text under the field (\"Up to 10 tags, separated by commas\"). */\n hint?: string;\n /** An error from the app (a server refusal); `validate`'s own errors show here too. */\n error?: string;\n /** Not available. */\n disabled?: boolean;\n /** The name of the hidden inputs, for a plain `<form>` post (one per tag). */\n name?: string;\n /** The words of the field, passed translated; English by default. */\n labels?: Partial<Pick<ComboboxLabels, \"create\" | \"remove\" | \"empty\" | \"results\" | \"toggle\">>;\n /** Classes merged on the root. */\n className?: string;\n};\n\nconst toOption = (tag: string): ComboboxOption => ({ value: tag, label: tag });\n\n/** Words as removable chips — tags, keywords, e-mail recipients — with suggestions, cleaning and validation. */\nexport function TagInput({\n value,\n defaultValue = [],\n onValueChange,\n suggestions = [],\n normalize = (tag) => tag.trim(),\n validate,\n max,\n separators = [\",\"],\n error,\n labels,\n ...props\n}: TagInputProps) {\n const [tags, setTags] = useControllable<readonly string[]>(value, defaultValue, onValueChange as (next: readonly string[]) => void);\n const [refusal, setRefusal] = React.useState<string | null>(null);\n\n const change = (options: ComboboxOption[]) => {\n const next: string[] = [];\n for (const option of options) {\n const tag = normalize(option.value);\n if (!tag || next.includes(tag)) continue;\n if (!tags.includes(tag)) {\n const reason = validate?.(tag, next) ?? null;\n if (reason) {\n setRefusal(reason);\n continue;\n }\n }\n next.push(tag);\n }\n if (next.length >= options.length || options.length < tags.length) setRefusal(null);\n setTags(next);\n };\n\n return (\n <Combobox\n {...props}\n multiple\n creatable\n separators={separators}\n maxSelected={max}\n value={tags.map(toOption)}\n onValueChange={change}\n options={suggestions.map(toOption)}\n error={refusal ?? error}\n labels={{ empty: \"\", results: () => \"\", ...labels }}\n />\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/tag-input/tag-input.tsx"],"sourcesContent":["// Client. Free words as chips — the multiple, creatable `Combobox` on strings: Enter or a separator adds the word,\n// a paste of \"a, b, c\" adds three, Backspace on an empty input removes the last, suggestions complete as you type.\n// `normalize` cleans a word (lower case, no `#`), `validate` refuses one with a reason read aloud.\nimport * as React from \"react\";\n\nimport { Combobox, type ComboboxLabels, type ComboboxOption } from \"../combobox\";\nimport { useControllable } from \"../media\";\n\nexport type TagInputProps = {\n /** The visible label, passed translated (also the accessible name). */\n label: string;\n /** Hides the label visually, keeping it as the accessible name. */\n hideLabel?: boolean;\n /** The tags (controlled). */\n value?: readonly string[];\n /** The tags at first, uncontrolled. */\n defaultValue?: readonly string[];\n /** Called with every tag after a change. */\n onValueChange?: (tags: string[]) => void;\n /** Words offered as the person types (their own history, a curated list). */\n suggestions?: readonly string[];\n /** Cleans a word before it is added (`(t) => t.toLowerCase().replace(/^#/, \"\")`). An empty result is ignored. */\n normalize?: (tag: string) => string;\n /** Refuses a word: return the reason (passed translated), shown and read as the field's error; `null` accepts it. */\n validate?: (tag: string, tags: readonly string[]) => string | null;\n /** Most tags; the field stops offering more past it. */\n max?: number;\n /** Keys that add the word, besides Enter. Default `[\",\"]`. */\n separators?: readonly string[];\n /** The input's placeholder, passed translated. */\n placeholder?: string;\n /** A help text under the field (\"Up to 10 tags, separated by commas\"). */\n hint?: string;\n /** An error from the app (a server refusal); `validate`'s own errors show here too. */\n error?: string;\n /** Not available. */\n disabled?: boolean;\n /** The name of the hidden inputs, for a plain `<form>` post (one per tag). */\n name?: string;\n /** The words of the field, passed translated; English by default. */\n labels?: Partial<Pick<ComboboxLabels, \"create\" | \"remove\" | \"empty\" | \"results\" | \"toggle\">>;\n /** Classes merged on the root. */\n className?: string;\n};\n\nconst toOption = (tag: string): ComboboxOption => ({ value: tag, label: tag });\n\n/** Words as removable chips — tags, keywords, e-mail recipients — with suggestions, cleaning and validation. */\nexport function TagInput({\n value,\n defaultValue = [],\n onValueChange,\n suggestions = [],\n normalize = (tag) => tag.trim(),\n validate,\n max,\n separators = [\",\"],\n error,\n labels,\n ...props\n}: TagInputProps) {\n const [tags, setTags] = useControllable<readonly string[]>(value, defaultValue, onValueChange as (next: readonly string[]) => void);\n const [refusal, setRefusal] = React.useState<string | null>(null);\n\n const change = (options: ComboboxOption[]) => {\n const next: string[] = [];\n for (const option of options) {\n const tag = normalize(option.value);\n if (!tag || next.includes(tag)) continue;\n if (!tags.includes(tag)) {\n const reason = validate?.(tag, next) ?? null;\n if (reason) {\n setRefusal(reason);\n continue;\n }\n }\n next.push(tag);\n }\n if (next.length >= options.length || options.length < tags.length) setRefusal(null);\n setTags(next);\n };\n\n return (\n <Combobox\n {...props}\n multiple\n creatable\n separators={separators}\n maxSelected={max}\n value={tags.map(toOption)}\n onValueChange={change}\n options={suggestions.map(toOption)}\n error={refusal ?? error}\n labels={{ empty: \"\", results: () => \"\", ...labels }}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,YAAY,WAAW;AAgFnB;AAtCJ,IAAM,WAAW,CAAC,SAAiC,EAAE,OAAO,KAAK,OAAO,IAAI;AAGrE,SAAS,SAAS;AAAA,EACvB;AAAA,EACA,eAAe,CAAC;AAAA,EAChB;AAAA,EACA,cAAc,CAAC;AAAA,EACf,YAAY,CAAC,QAAQ,IAAI,KAAK;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,aAAa,CAAC,GAAG;AAAA,EACjB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAkB;AAChB,QAAM,CAAC,MAAM,OAAO,IAAI,gBAAmC,OAAO,cAAc,aAAkD;AAClI,QAAM,CAAC,SAAS,UAAU,IAAU,eAAwB,IAAI;AAEhE,QAAM,SAAS,CAAC,YAA8B;AAC5C,UAAM,OAAiB,CAAC;AACxB,eAAW,UAAU,SAAS;AAC5B,YAAM,MAAM,UAAU,OAAO,KAAK;AAClC,UAAI,CAAC,OAAO,KAAK,SAAS,GAAG,EAAG;AAChC,UAAI,CAAC,KAAK,SAAS,GAAG,GAAG;AACvB,cAAM,SAAS,WAAW,KAAK,IAAI,KAAK;AACxC,YAAI,QAAQ;AACV,qBAAW,MAAM;AACjB;AAAA,QACF;AAAA,MACF;AACA,WAAK,KAAK,GAAG;AAAA,IACf;AACA,QAAI,KAAK,UAAU,QAAQ,UAAU,QAAQ,SAAS,KAAK,OAAQ,YAAW,IAAI;AAClF,YAAQ,IAAI;AAAA,EACd;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAQ;AAAA,MACR,WAAS;AAAA,MACT;AAAA,MACA,aAAa;AAAA,MACb,OAAO,KAAK,IAAI,QAAQ;AAAA,MACxB,eAAe;AAAA,MACf,SAAS,YAAY,IAAI,QAAQ;AAAA,MACjC,OAAO,WAAW;AAAA,MAClB,QAAQ,EAAE,OAAO,IAAI,SAAS,MAAM,IAAI,GAAG,OAAO;AAAA;AAAA,EACpD;AAEJ;","names":[]}
|
package/dist/tag-selector.js
CHANGED
package/dist/tag-selector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, what one is looking for: toggle chips with a limit and a count; once it is reached the\n// others rest (disabled) and the count says so.\nimport { Chip } from \"../chip\";\n\nexport type TagOption = { value: string; label: string };\n\nexport type TagSelectorProps = {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached. */\nexport function TagSelector({ label, options, value, onValueChange, max, countLabel, className }: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} className=\"flex flex-wrap gap-2\">\n {options.map((option) => {\n const on = value.includes(option.value);\n return (\n <Chip key={option.value} selected={on} disabled={!on && full} onSelectedChange={(next) => onValueChange(next ? [...value, option.value] : value.filter((v) => v !== option.value))}>\n {option.label}\n </Chip>\n );\n })}\n </div>\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/tag-selector/tag-selector.tsx"],"sourcesContent":["// Client. Interests, languages, what one is looking for: toggle chips with a limit and a count; once it is reached the\n// others rest (disabled) and the count says so.\nimport { Chip } from \"../chip\";\n\nexport type TagOption = { value: string; label: string };\n\nexport type TagSelectorProps = {\n /** The group's name (“Interests”) — passed translated. */\n label: string;\n /** The tags offered. */\n options: readonly TagOption[];\n /** The tags chosen. */\n value: readonly string[];\n /** Called with the tags chosen. */\n onValueChange: (value: string[]) => void;\n /** The most that can be chosen. */\n max?: number;\n /** The count under the tags: `(n, max) => n + \" of \" + max`. */\n countLabel?: (count: number, max: number) => string;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Toggle chips with a limit and a count — the others rest once the limit is reached. */\nexport function TagSelector({ label, options, value, onValueChange, max, countLabel, className }: TagSelectorProps) {\n const full = max !== undefined && value.length >= max;\n return (\n <div className={[\"flex flex-col gap-2\", className].filter(Boolean).join(\" \")}>\n <div role=\"group\" aria-label={label} className=\"flex flex-wrap gap-2\">\n {options.map((option) => {\n const on = value.includes(option.value);\n return (\n <Chip key={option.value} selected={on} disabled={!on && full} onSelectedChange={(next) => onValueChange(next ? [...value, option.value] : value.filter((v) => v !== option.value))}>\n {option.label}\n </Chip>\n );\n })}\n </div>\n {max !== undefined && countLabel ? (\n <p className={[\"m-0 text-xs\", full ? \"font-semibold text-fg-accent\" : \"text-fg-secondary\"].join(\" \")} aria-live=\"polite\">\n {countLabel(value.length, max)}\n </p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA2BI,SAKQ,KALR;AAHG,SAAS,YAAY,EAAE,OAAO,SAAS,OAAO,eAAe,KAAK,YAAY,UAAU,GAAqB;AAClH,QAAM,OAAO,QAAQ,UAAa,MAAM,UAAU;AAClD,SACE,qBAAC,SAAI,WAAW,CAAC,uBAAuB,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GACzE;AAAA,wBAAC,SAAI,MAAK,SAAQ,cAAY,OAAO,WAAU,wBAC5C,kBAAQ,IAAI,CAAC,WAAW;AACvB,YAAM,KAAK,MAAM,SAAS,OAAO,KAAK;AACtC,aACE,oBAAC,QAAwB,UAAU,IAAI,UAAU,CAAC,MAAM,MAAM,kBAAkB,CAAC,SAAS,cAAc,OAAO,CAAC,GAAG,OAAO,OAAO,KAAK,IAAI,MAAM,OAAO,CAAC,MAAM,MAAM,OAAO,KAAK,CAAC,GAC9K,iBAAO,SADC,OAAO,KAElB;AAAA,IAEJ,CAAC,GACH;AAAA,IACC,QAAQ,UAAa,aACpB,oBAAC,OAAE,WAAW,CAAC,eAAe,OAAO,iCAAiC,mBAAmB,EAAE,KAAK,GAAG,GAAG,aAAU,UAC7G,qBAAW,MAAM,QAAQ,GAAG,GAC/B,IACE;AAAA,KACN;AAEJ;","names":[]}
|
package/dist/theme.d.ts
CHANGED