@sakaniui/react 0.12.0 → 0.13.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/AGENTS.md +7 -0
- package/CHANGELOG.md +73 -0
- package/dist/{TopBar-DRGud3JP.js → TopBar-BcXAB1mf.js} +549 -523
- package/dist/TopBar-DeBSl4rq.cjs +1 -0
- package/dist/blocks.cjs +2 -2
- package/dist/blocks.mjs +2053 -2053
- package/dist/building-warehouse-BUtjAEPH.cjs +1 -0
- package/dist/{file-text-CuRYymVv.js → building-warehouse-_n8EvYUt.js} +15 -21
- package/dist/components/CommandMenu/CommandMenu.d.ts +175 -0
- package/dist/components/CommandMenu/index.d.ts +2 -0
- package/dist/emoji-index.json +1 -1
- package/dist/{help-circle-BufsknPE.js → help-circle-qEEVeIea.js} +15 -9
- package/dist/help-circle-rtL4juBJ.cjs +1 -0
- package/dist/icon-index.json +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.mjs +3932 -3932
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +2624 -1688
- package/dist/lib/SakaniLogo.d.ts +2 -0
- package/dist/{logout-Mc5-u8cG.js → logout-BLSXL3qV.js} +4 -4
- package/dist/logout-pQUABnfO.cjs +1 -0
- package/dist/manifest.json +591 -21
- package/dist/style.css +1 -1
- package/dist/tokens.css +2 -0
- package/package.json +1 -1
- package/dist/TopBar-Dd_xHXBv.cjs +0 -1
- package/dist/file-text-B2rmiOJD.cjs +0 -1
- package/dist/help-circle-C1LENUMu.cjs +0 -1
- package/dist/logout-g8G9uxDa.cjs +0 -1
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 6,
|
|
3
3
|
"name": "@sakaniui/react",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"description": "Machine-readable contract of the SakaniUI React library, generated from its TypeScript source.",
|
|
6
6
|
"docs": "https://www.sakaniui.com",
|
|
7
7
|
"guide": "https://www.sakaniui.com/llms-full.txt",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@sakaniui/react/emoji": "Fluent Emoji (full colour): EmojiName, one module each (1594 emoji, 311 with skin tones)."
|
|
25
25
|
},
|
|
26
26
|
"conventions": {
|
|
27
|
-
"version": "This manifest describes @sakaniui/react@0.
|
|
27
|
+
"version": "This manifest describes @sakaniui/react@0.13.0. Each component has `since`, the first release that contained it; a prop added later has its own `since`, and a value added later is listed in the prop's `valuesSince`. If the project has an older version installed, anything newer than that does not exist there.",
|
|
28
28
|
"acceptsNativeProps": "Components forward native HTML attributes (className, style, aria-*, event handlers) to their root element unless a prop says otherwise; only the props that are specific to SakaniUI are listed here.",
|
|
29
29
|
"accessibleName": "When `contract.requiresAccessibleName` is true, a required prop (aria-label, aria-labelledby or an alt text) is the only thing that names the control or image. Do not omit it.",
|
|
30
30
|
"tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them); do not hard-code colours.",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"wrap"
|
|
196
196
|
],
|
|
197
197
|
"tokens": {
|
|
198
|
-
"count":
|
|
198
|
+
"count": 233,
|
|
199
199
|
"groups": {
|
|
200
200
|
"bp": {
|
|
201
201
|
"--bp-sm": "640px",
|
|
@@ -341,7 +341,9 @@
|
|
|
341
341
|
"--space-16": "16px",
|
|
342
342
|
"--space-20": "20px",
|
|
343
343
|
"--space-24": "24px",
|
|
344
|
+
"--space-28": "28px",
|
|
344
345
|
"--space-32": "32px",
|
|
346
|
+
"--space-36": "36px",
|
|
345
347
|
"--space-40": "40px",
|
|
346
348
|
"--space-48": "48px",
|
|
347
349
|
"--space-64": "64px",
|
|
@@ -459,7 +461,7 @@
|
|
|
459
461
|
}
|
|
460
462
|
},
|
|
461
463
|
"counts": {
|
|
462
|
-
"components":
|
|
464
|
+
"components": 142,
|
|
463
465
|
"blocks": 42,
|
|
464
466
|
"utilities": 10
|
|
465
467
|
},
|
|
@@ -2220,7 +2222,6 @@
|
|
|
2220
2222
|
"done",
|
|
2221
2223
|
"working"
|
|
2222
2224
|
],
|
|
2223
|
-
"default": "done",
|
|
2224
2225
|
"description": "Adds the working line under the steps: \"working\" (sparkle, shimmer) or \"done\" (\"Worked for 11.2s\")."
|
|
2225
2226
|
},
|
|
2226
2227
|
{
|
|
@@ -2324,7 +2325,8 @@
|
|
|
2324
2325
|
"name": "accent",
|
|
2325
2326
|
"type": "string",
|
|
2326
2327
|
"required": false,
|
|
2327
|
-
"description": "Colour of the spark that runs into the step while it is active. Defaults to the icon's brand colour when it is a logo from `sourceLogo()`."
|
|
2328
|
+
"description": "Colour of the spark that runs into the step while it is active. Defaults to the icon's brand colour when it is a logo from `sourceLogo()`.",
|
|
2329
|
+
"since": "0.13.0"
|
|
2328
2330
|
},
|
|
2329
2331
|
{
|
|
2330
2332
|
"name": "sources",
|
|
@@ -2750,6 +2752,572 @@
|
|
|
2750
2752
|
"tag input"
|
|
2751
2753
|
]
|
|
2752
2754
|
},
|
|
2755
|
+
{
|
|
2756
|
+
"name": "CommandMenu",
|
|
2757
|
+
"kind": "component",
|
|
2758
|
+
"category": "Composite",
|
|
2759
|
+
"import": "@sakaniui/react",
|
|
2760
|
+
"summary": "A ⌘K search and command palette: a field, scope tabs, grouped results (the matched letters in the strong weight), a footer of key hints, and loading, no-results and error states. Pass `groups` of `items` and handle `onSelect`; it filters as you type unless `filter={false}`. ⌘K opens it, ↑ ↓ move, ↵ chooses, ⌘↵ asks AI (with `onAskAI`), Tab switches scope, esc clears then closes. `variant=\"simple\"` is just the field, one group and the key hints.",
|
|
2761
|
+
"props": [
|
|
2762
|
+
{
|
|
2763
|
+
"name": "open",
|
|
2764
|
+
"type": "boolean",
|
|
2765
|
+
"required": false,
|
|
2766
|
+
"description": "Controlled open state."
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
"name": "defaultOpen",
|
|
2770
|
+
"type": "boolean",
|
|
2771
|
+
"required": false,
|
|
2772
|
+
"default": false,
|
|
2773
|
+
"description": "Initial open state when uncontrolled."
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
"name": "onOpenChange",
|
|
2777
|
+
"type": "((open: boolean) => void)",
|
|
2778
|
+
"required": false
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
"name": "hotkey",
|
|
2782
|
+
"type": "string | false",
|
|
2783
|
+
"required": false,
|
|
2784
|
+
"default": "k",
|
|
2785
|
+
"description": "The key that opens it with ⌘ / Ctrl. `false` turns the shortcut off. Defaults to \"k\"."
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
"name": "variant",
|
|
2789
|
+
"type": "\"default\" | \"simple\"",
|
|
2790
|
+
"required": false,
|
|
2791
|
+
"values": [
|
|
2792
|
+
"default",
|
|
2793
|
+
"simple"
|
|
2794
|
+
],
|
|
2795
|
+
"default": "default",
|
|
2796
|
+
"description": "\"default\" has scopes and a workspace footer; \"simple\" is just the field, the rows and the key hints."
|
|
2797
|
+
},
|
|
2798
|
+
{
|
|
2799
|
+
"name": "query",
|
|
2800
|
+
"type": "string",
|
|
2801
|
+
"required": false,
|
|
2802
|
+
"description": "The field's text (controlled)."
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
"name": "defaultQuery",
|
|
2806
|
+
"type": "string",
|
|
2807
|
+
"required": false,
|
|
2808
|
+
"default": ""
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
"name": "onQueryChange",
|
|
2812
|
+
"type": "((query: string) => void)",
|
|
2813
|
+
"required": false
|
|
2814
|
+
},
|
|
2815
|
+
{
|
|
2816
|
+
"name": "placeholder",
|
|
2817
|
+
"type": "string",
|
|
2818
|
+
"required": false,
|
|
2819
|
+
"default": "Search or ask anything…"
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
"name": "groups",
|
|
2823
|
+
"type": "CommandMenuGroup[]",
|
|
2824
|
+
"required": true,
|
|
2825
|
+
"description": "Results, in groups.",
|
|
2826
|
+
"shape": {
|
|
2827
|
+
"type": "CommandMenuGroup",
|
|
2828
|
+
"collection": "array",
|
|
2829
|
+
"fields": [
|
|
2830
|
+
{
|
|
2831
|
+
"name": "id",
|
|
2832
|
+
"type": "string",
|
|
2833
|
+
"required": true
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"name": "label",
|
|
2837
|
+
"type": "string",
|
|
2838
|
+
"required": false,
|
|
2839
|
+
"description": "The small heading above the items."
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
"name": "action",
|
|
2843
|
+
"type": "{ label: string; onClick: () => void; }",
|
|
2844
|
+
"required": false,
|
|
2845
|
+
"description": "A link on the right of the heading, e.g. \"See all\"."
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
"name": "items",
|
|
2849
|
+
"type": "CommandMenuItem[]",
|
|
2850
|
+
"required": true
|
|
2851
|
+
}
|
|
2852
|
+
]
|
|
2853
|
+
}
|
|
2854
|
+
},
|
|
2855
|
+
{
|
|
2856
|
+
"name": "filter",
|
|
2857
|
+
"type": "boolean | ((item: CommandMenuItem, query: string) => boolean)",
|
|
2858
|
+
"required": false,
|
|
2859
|
+
"default": true,
|
|
2860
|
+
"description": "Filter the groups by the query, scope and tokens here. Pass a function to match your own way, or `false` to show `groups` as given. Defaults to true."
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
"name": "highlightMatches",
|
|
2864
|
+
"type": "boolean",
|
|
2865
|
+
"required": false,
|
|
2866
|
+
"default": true,
|
|
2867
|
+
"description": "Wrap the matched letters of each label in the strong weight. Defaults to true."
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"name": "state",
|
|
2871
|
+
"type": "\"loading\" | \"ready\" | \"error\"",
|
|
2872
|
+
"required": false,
|
|
2873
|
+
"values": [
|
|
2874
|
+
"loading",
|
|
2875
|
+
"ready",
|
|
2876
|
+
"error"
|
|
2877
|
+
],
|
|
2878
|
+
"default": "ready",
|
|
2879
|
+
"description": "\"loading\" shows skeleton rows, \"error\" the error message."
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
"name": "onSelect",
|
|
2883
|
+
"type": "((item: CommandMenuItem) => void)",
|
|
2884
|
+
"required": false,
|
|
2885
|
+
"description": "Called when an item is chosen (click or ↵)."
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"name": "closeOnSelect",
|
|
2889
|
+
"type": "boolean",
|
|
2890
|
+
"required": false,
|
|
2891
|
+
"default": true,
|
|
2892
|
+
"description": "Close the menu when an item is chosen. Defaults to true."
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
"name": "scopes",
|
|
2896
|
+
"type": "CommandMenuScope[]",
|
|
2897
|
+
"required": false,
|
|
2898
|
+
"description": "Scope tabs under the field (not shown in the simple variant).",
|
|
2899
|
+
"shape": {
|
|
2900
|
+
"type": "CommandMenuScope",
|
|
2901
|
+
"collection": "array",
|
|
2902
|
+
"fields": [
|
|
2903
|
+
{
|
|
2904
|
+
"name": "value",
|
|
2905
|
+
"type": "string",
|
|
2906
|
+
"required": true,
|
|
2907
|
+
"description": "\"all\" is the unfiltered scope."
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
"name": "label",
|
|
2911
|
+
"type": "string",
|
|
2912
|
+
"required": true
|
|
2913
|
+
},
|
|
2914
|
+
{
|
|
2915
|
+
"name": "count",
|
|
2916
|
+
"type": "number | null",
|
|
2917
|
+
"required": false,
|
|
2918
|
+
"description": "The count shown on the tab. Computed from the items when you leave it out (and `filter` is on); `null` shows no count."
|
|
2919
|
+
}
|
|
2920
|
+
]
|
|
2921
|
+
}
|
|
2922
|
+
},
|
|
2923
|
+
{
|
|
2924
|
+
"name": "scope",
|
|
2925
|
+
"type": "string",
|
|
2926
|
+
"required": false
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
"name": "defaultScope",
|
|
2930
|
+
"type": "string",
|
|
2931
|
+
"required": false
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "onScopeChange",
|
|
2935
|
+
"type": "((scope: string) => void)",
|
|
2936
|
+
"required": false
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
"name": "filters",
|
|
2940
|
+
"type": "CommandMenuFilter[]",
|
|
2941
|
+
"required": false,
|
|
2942
|
+
"description": "Filter tokens shown in the field.",
|
|
2943
|
+
"shape": {
|
|
2944
|
+
"type": "CommandMenuFilter",
|
|
2945
|
+
"collection": "array",
|
|
2946
|
+
"fields": [
|
|
2947
|
+
{
|
|
2948
|
+
"name": "id",
|
|
2949
|
+
"type": "string",
|
|
2950
|
+
"required": true
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
"name": "label",
|
|
2954
|
+
"type": "string",
|
|
2955
|
+
"required": true,
|
|
2956
|
+
"description": "Shown in the token, e.g. \"People\" or \"team: Design\"."
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"name": "value",
|
|
2960
|
+
"type": "string",
|
|
2961
|
+
"required": false,
|
|
2962
|
+
"description": "What `tags` are matched against. Defaults to the label."
|
|
2963
|
+
},
|
|
2964
|
+
{
|
|
2965
|
+
"name": "icon",
|
|
2966
|
+
"type": "IconComponent",
|
|
2967
|
+
"required": false
|
|
2968
|
+
}
|
|
2969
|
+
]
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
"name": "onFiltersChange",
|
|
2974
|
+
"type": "((filters: CommandMenuFilter[]) => void)",
|
|
2975
|
+
"required": false
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
"name": "filterKeys",
|
|
2979
|
+
"type": "string[]",
|
|
2980
|
+
"required": false,
|
|
2981
|
+
"description": "Typing `key:value` and a space turns it into a token for these keys, e.g. [\"team\", \"status\"]."
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
"name": "onAskAI",
|
|
2985
|
+
"type": "((query: string) => void)",
|
|
2986
|
+
"required": false,
|
|
2987
|
+
"description": "Adds ⌘↵ and the \"Ask AI\" hint; called with the current query."
|
|
2988
|
+
},
|
|
2989
|
+
{
|
|
2990
|
+
"name": "answer",
|
|
2991
|
+
"type": "ReactNode",
|
|
2992
|
+
"required": false,
|
|
2993
|
+
"description": "Shown above the results (an answer card, a Chain of Thought)."
|
|
2994
|
+
},
|
|
2995
|
+
{
|
|
2996
|
+
"name": "renderPreview",
|
|
2997
|
+
"type": "((item: CommandMenuItem) => ReactNode)",
|
|
2998
|
+
"required": false,
|
|
2999
|
+
"description": "Shows a preview pane beside the list for the active item. Return null for no pane."
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"name": "previewActions",
|
|
3003
|
+
"type": "ReactNode | ((item: CommandMenuItem) => ReactNode)",
|
|
3004
|
+
"required": false,
|
|
3005
|
+
"description": "Buttons or links pinned to the bottom of the detail pane. They stay put while the content above changes from row to row (only `renderPreview`'s content cross-fades); pass a function to read the previewed row. Hidden when a row has no preview."
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
"name": "previewEmpty",
|
|
3009
|
+
"type": "ReactNode",
|
|
3010
|
+
"required": false,
|
|
3011
|
+
"default": "Nothing to preview for this result",
|
|
3012
|
+
"description": "Shown in the detail pane when the active row has nothing to preview (`renderPreview` returned nothing)."
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
"name": "emptyTitle",
|
|
3016
|
+
"type": "ReactNode",
|
|
3017
|
+
"required": false,
|
|
3018
|
+
"description": "The \"No results\" message."
|
|
3019
|
+
},
|
|
3020
|
+
{
|
|
3021
|
+
"name": "emptyDescription",
|
|
3022
|
+
"type": "ReactNode",
|
|
3023
|
+
"required": false
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
"name": "suggestions",
|
|
3027
|
+
"type": "CommandMenuSuggestion[]",
|
|
3028
|
+
"required": false,
|
|
3029
|
+
"description": "Quick fixes under the empty message, e.g. \"Did you mean invoice?\".",
|
|
3030
|
+
"shape": {
|
|
3031
|
+
"type": "CommandMenuSuggestion",
|
|
3032
|
+
"collection": "array",
|
|
3033
|
+
"fields": [
|
|
3034
|
+
{
|
|
3035
|
+
"name": "label",
|
|
3036
|
+
"type": "string",
|
|
3037
|
+
"required": true
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
"name": "icon",
|
|
3041
|
+
"type": "IconComponent",
|
|
3042
|
+
"required": false
|
|
3043
|
+
},
|
|
3044
|
+
{
|
|
3045
|
+
"name": "iconPosition",
|
|
3046
|
+
"type": "\"start\" | \"end\"",
|
|
3047
|
+
"required": false,
|
|
3048
|
+
"description": "Where the icon sits: before the label (default) or after it (e.g. the × on \"Remove the Files filter\")."
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"name": "emphasis",
|
|
3052
|
+
"type": "string",
|
|
3053
|
+
"required": false,
|
|
3054
|
+
"description": "A word inside `label` to set in the strong weight (\"invoice\" in \"Did you mean invoice?\")."
|
|
3055
|
+
},
|
|
3056
|
+
{
|
|
3057
|
+
"name": "onSelect",
|
|
3058
|
+
"type": "() => void",
|
|
3059
|
+
"required": true
|
|
3060
|
+
}
|
|
3061
|
+
]
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
{
|
|
3065
|
+
"name": "fallbackGroups",
|
|
3066
|
+
"type": "CommandMenuGroup[]",
|
|
3067
|
+
"required": false,
|
|
3068
|
+
"description": "Shown under the empty or error message, and navigable like any group (e.g. \"Try instead\").",
|
|
3069
|
+
"shape": {
|
|
3070
|
+
"type": "CommandMenuGroup",
|
|
3071
|
+
"collection": "array",
|
|
3072
|
+
"fields": [
|
|
3073
|
+
{
|
|
3074
|
+
"name": "id",
|
|
3075
|
+
"type": "string",
|
|
3076
|
+
"required": true
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
"name": "label",
|
|
3080
|
+
"type": "string",
|
|
3081
|
+
"required": false,
|
|
3082
|
+
"description": "The small heading above the items."
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
"name": "action",
|
|
3086
|
+
"type": "{ label: string; onClick: () => void; }",
|
|
3087
|
+
"required": false,
|
|
3088
|
+
"description": "A link on the right of the heading, e.g. \"See all\"."
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"name": "items",
|
|
3092
|
+
"type": "CommandMenuItem[]",
|
|
3093
|
+
"required": true
|
|
3094
|
+
}
|
|
3095
|
+
]
|
|
3096
|
+
}
|
|
3097
|
+
},
|
|
3098
|
+
{
|
|
3099
|
+
"name": "errorTitle",
|
|
3100
|
+
"type": "ReactNode",
|
|
3101
|
+
"required": false,
|
|
3102
|
+
"default": "Search is unavailable"
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"name": "errorDescription",
|
|
3106
|
+
"type": "ReactNode",
|
|
3107
|
+
"required": false
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
"name": "onRetry",
|
|
3111
|
+
"type": "(() => void)",
|
|
3112
|
+
"required": false
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
"name": "onReport",
|
|
3116
|
+
"type": "(() => void)",
|
|
3117
|
+
"required": false,
|
|
3118
|
+
"description": "A second, quieter action beside \"Try again\" in the error state (\"Report\")."
|
|
3119
|
+
},
|
|
3120
|
+
{
|
|
3121
|
+
"name": "retryLabel",
|
|
3122
|
+
"type": "ReactNode",
|
|
3123
|
+
"required": false,
|
|
3124
|
+
"default": "Try again"
|
|
3125
|
+
},
|
|
3126
|
+
{
|
|
3127
|
+
"name": "reportLabel",
|
|
3128
|
+
"type": "ReactNode",
|
|
3129
|
+
"required": false,
|
|
3130
|
+
"default": "Report"
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"name": "workspace",
|
|
3134
|
+
"type": "ReactNode",
|
|
3135
|
+
"required": false,
|
|
3136
|
+
"description": "The workspace switcher in the footer (default variant)."
|
|
3137
|
+
},
|
|
3138
|
+
{
|
|
3139
|
+
"name": "hideFooter",
|
|
3140
|
+
"type": "boolean",
|
|
3141
|
+
"required": false,
|
|
3142
|
+
"default": false,
|
|
3143
|
+
"description": "Hide the footer of key hints."
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "aria-label",
|
|
3147
|
+
"type": "string",
|
|
3148
|
+
"required": false,
|
|
3149
|
+
"default": "Command menu",
|
|
3150
|
+
"description": "Accessible name of the dialog. Defaults to \"Command menu\"."
|
|
3151
|
+
},
|
|
3152
|
+
{
|
|
3153
|
+
"name": "className",
|
|
3154
|
+
"type": "string",
|
|
3155
|
+
"required": false
|
|
3156
|
+
}
|
|
3157
|
+
],
|
|
3158
|
+
"contract": {
|
|
3159
|
+
"requiredProps": [
|
|
3160
|
+
"groups"
|
|
3161
|
+
],
|
|
3162
|
+
"requiresAccessibleName": false
|
|
3163
|
+
},
|
|
3164
|
+
"since": "0.13.0",
|
|
3165
|
+
"example": "import { CommandMenu } from '@sakaniui/react';\n\n<CommandMenu groups={[{ id: \"item-1\", items: [{ id: \"item-1\", label: \"Label\" }] }]} />",
|
|
3166
|
+
"recipes": [
|
|
3167
|
+
{
|
|
3168
|
+
"title": "A ⌘K search over your pages, people and actions",
|
|
3169
|
+
"description": "CommandMenu is controlled by you for what it shows and what happens: pass `groups` of `items`, handle `onSelect`, and give the menu `scopes` for the tabs. It opens on ⌘K by itself (`open` / `onOpenChange` to control it) and filters as you type. For results from a server pass `filter={false}`, set `state=\"loading\"` while you wait, and render the groups you got back. Put a `CommandMenuTrigger` in your top bar. Give every item a `label`; add `shortcut` for key hints and `description` or `meta` for context.",
|
|
3170
|
+
"code": "import React from 'react';\nimport { CommandMenu, CommandMenuTrigger } from '@sakaniui/react';\nimport { IconSettings, IconPlus } from '@sakaniui/react/icons';\n\nconst GROUPS = [\n {\n id: 'pages', label: 'Pages',\n items: [{ id: 'settings', type: 'page' as const, label: 'Settings', description: 'Workspace', icon: IconSettings }],\n },\n {\n id: 'actions', label: 'Actions',\n items: [{ id: 'new', type: 'action' as const, label: 'Create project', icon: IconPlus, shortcut: ['⌘', 'N'] }],\n },\n];\n\nexport const Example = () => {\n const [open, setOpen] = React.useState(false);\n return (\n <>\n <CommandMenuTrigger onClick={() => setOpen(true)} />\n <CommandMenu\n open={open}\n onOpenChange={setOpen}\n groups={GROUPS}\n scopes={[{ value: 'all', label: 'All' }, { value: 'pages', label: 'Pages' }, { value: 'actions', label: 'Actions' }]}\n onSelect={(item) => console.log(item.id)}\n />\n </>\n );\n};"
|
|
3171
|
+
}
|
|
3172
|
+
],
|
|
3173
|
+
"aliases": [
|
|
3174
|
+
"command palette",
|
|
3175
|
+
"command bar",
|
|
3176
|
+
"cmd k",
|
|
3177
|
+
"cmdk",
|
|
3178
|
+
"search modal",
|
|
3179
|
+
"global search",
|
|
3180
|
+
"spotlight",
|
|
3181
|
+
"quick actions",
|
|
3182
|
+
"omnibar",
|
|
3183
|
+
"search palette",
|
|
3184
|
+
"advanced search",
|
|
3185
|
+
"quick switcher",
|
|
3186
|
+
"command k"
|
|
3187
|
+
]
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "CommandMenuAnswer",
|
|
3191
|
+
"kind": "component",
|
|
3192
|
+
"category": "Composite",
|
|
3193
|
+
"import": "@sakaniui/react",
|
|
3194
|
+
"summary": "An answer card for the CommandMenu's Ask AI state: the answer text, its sources as chips, and a follow-up. Pass it as the menu's `answer`.",
|
|
3195
|
+
"props": [
|
|
3196
|
+
{
|
|
3197
|
+
"name": "title",
|
|
3198
|
+
"type": "string",
|
|
3199
|
+
"required": false,
|
|
3200
|
+
"default": "SakaniUI AI"
|
|
3201
|
+
},
|
|
3202
|
+
{
|
|
3203
|
+
"name": "status",
|
|
3204
|
+
"type": "string",
|
|
3205
|
+
"required": false,
|
|
3206
|
+
"description": "e.g. \"Thought for 2.4s\". With `stream` it appears once the text has been written."
|
|
3207
|
+
},
|
|
3208
|
+
{
|
|
3209
|
+
"name": "children",
|
|
3210
|
+
"type": "ReactNode",
|
|
3211
|
+
"required": true,
|
|
3212
|
+
"description": "The answer text."
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
"name": "stream",
|
|
3216
|
+
"type": "boolean",
|
|
3217
|
+
"required": false,
|
|
3218
|
+
"description": "Writes the answer in word by word, the way a chat reply arrives, and brings in the sources and the follow-up once it is written. Needs `children` to be a plain string; reduced motion shows it at once."
|
|
3219
|
+
},
|
|
3220
|
+
{
|
|
3221
|
+
"name": "onStreamEnd",
|
|
3222
|
+
"type": "(() => void)",
|
|
3223
|
+
"required": false,
|
|
3224
|
+
"description": "Called once when the text has been written (or at once when it is not streamed)."
|
|
3225
|
+
},
|
|
3226
|
+
{
|
|
3227
|
+
"name": "sources",
|
|
3228
|
+
"type": "{ label: string; icon?: IconComponent; }[]",
|
|
3229
|
+
"required": false,
|
|
3230
|
+
"description": "Sources as chips under the answer.",
|
|
3231
|
+
"shape": {
|
|
3232
|
+
"type": "{ label: string; icon?: IconComponent | undefined; }",
|
|
3233
|
+
"collection": "array",
|
|
3234
|
+
"fields": [
|
|
3235
|
+
{
|
|
3236
|
+
"name": "label",
|
|
3237
|
+
"type": "string",
|
|
3238
|
+
"required": true
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
"name": "icon",
|
|
3242
|
+
"type": "IconComponent",
|
|
3243
|
+
"required": false
|
|
3244
|
+
}
|
|
3245
|
+
]
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"name": "onFollowUp",
|
|
3250
|
+
"type": "(() => void)",
|
|
3251
|
+
"required": false,
|
|
3252
|
+
"description": "Adds an \"Ask a follow-up\" button."
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"name": "onOpenInChat",
|
|
3256
|
+
"type": "(() => void)",
|
|
3257
|
+
"required": false,
|
|
3258
|
+
"description": "Adds an \"Open in chat\" hint with ⌘↵."
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"name": "onCopy",
|
|
3262
|
+
"type": "(() => void)",
|
|
3263
|
+
"required": false
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"name": "className",
|
|
3267
|
+
"type": "string",
|
|
3268
|
+
"required": false
|
|
3269
|
+
}
|
|
3270
|
+
],
|
|
3271
|
+
"contract": {
|
|
3272
|
+
"requiredProps": [
|
|
3273
|
+
"children"
|
|
3274
|
+
],
|
|
3275
|
+
"requiresAccessibleName": false
|
|
3276
|
+
},
|
|
3277
|
+
"since": "0.13.0",
|
|
3278
|
+
"example": "import { CommandMenuAnswer } from '@sakaniui/react';\n\n<CommandMenuAnswer>Label</CommandMenuAnswer>",
|
|
3279
|
+
"aliases": [
|
|
3280
|
+
"ai answer",
|
|
3281
|
+
"answer card",
|
|
3282
|
+
"search answer"
|
|
3283
|
+
]
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
"name": "CommandMenuTrigger",
|
|
3287
|
+
"kind": "component",
|
|
3288
|
+
"category": "Composite",
|
|
3289
|
+
"import": "@sakaniui/react",
|
|
3290
|
+
"summary": "The ⌘K pill that opens a CommandMenu, for a top bar or sidebar. A button: give it `onClick`.",
|
|
3291
|
+
"props": [
|
|
3292
|
+
{
|
|
3293
|
+
"name": "placeholder",
|
|
3294
|
+
"type": "string",
|
|
3295
|
+
"required": false,
|
|
3296
|
+
"default": "Search or ask anything…",
|
|
3297
|
+
"description": "The text in the pill. Defaults to \"Search or jump to…\"."
|
|
3298
|
+
},
|
|
3299
|
+
{
|
|
3300
|
+
"name": "shortcut",
|
|
3301
|
+
"type": "string[]",
|
|
3302
|
+
"required": false,
|
|
3303
|
+
"default": "['⌘', 'K']",
|
|
3304
|
+
"description": "The key caps on the right. Defaults to [\"⌘\", \"K\"]."
|
|
3305
|
+
}
|
|
3306
|
+
],
|
|
3307
|
+
"contract": {
|
|
3308
|
+
"requiredProps": [],
|
|
3309
|
+
"requiresAccessibleName": false
|
|
3310
|
+
},
|
|
3311
|
+
"since": "0.13.0",
|
|
3312
|
+
"example": "import { CommandMenuTrigger } from '@sakaniui/react';\n\n<CommandMenuTrigger />",
|
|
3313
|
+
"aliases": [
|
|
3314
|
+
"search button",
|
|
3315
|
+
"cmd k trigger",
|
|
3316
|
+
"search pill",
|
|
3317
|
+
"search trigger",
|
|
3318
|
+
"command trigger"
|
|
3319
|
+
]
|
|
3320
|
+
},
|
|
2753
3321
|
{
|
|
2754
3322
|
"name": "ConversationItem",
|
|
2755
3323
|
"kind": "component",
|
|
@@ -2943,12 +3511,12 @@
|
|
|
2943
3511
|
"props": [
|
|
2944
3512
|
{
|
|
2945
3513
|
"name": "type",
|
|
2946
|
-
"type": "\"
|
|
3514
|
+
"type": "\"error\" | \"no-data\" | \"no-results\"",
|
|
2947
3515
|
"required": false,
|
|
2948
3516
|
"values": [
|
|
3517
|
+
"error",
|
|
2949
3518
|
"no-data",
|
|
2950
|
-
"no-results"
|
|
2951
|
-
"error"
|
|
3519
|
+
"no-results"
|
|
2952
3520
|
],
|
|
2953
3521
|
"default": "no-data"
|
|
2954
3522
|
},
|
|
@@ -4434,13 +5002,13 @@
|
|
|
4434
5002
|
"description": "Returns the item located at the specified index."
|
|
4435
5003
|
},
|
|
4436
5004
|
{
|
|
4437
|
-
"name": "__@iterator@
|
|
5005
|
+
"name": "__@iterator@15607",
|
|
4438
5006
|
"type": "() => ArrayIterator<number>",
|
|
4439
5007
|
"required": true,
|
|
4440
5008
|
"description": "Iterator"
|
|
4441
5009
|
},
|
|
4442
5010
|
{
|
|
4443
|
-
"name": "__@unscopables@
|
|
5011
|
+
"name": "__@unscopables@15637",
|
|
4444
5012
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
4445
5013
|
"required": true,
|
|
4446
5014
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -5016,13 +5584,13 @@
|
|
|
5016
5584
|
"description": "Returns the item located at the specified index."
|
|
5017
5585
|
},
|
|
5018
5586
|
{
|
|
5019
|
-
"name": "__@iterator@
|
|
5587
|
+
"name": "__@iterator@15607",
|
|
5020
5588
|
"type": "() => ArrayIterator<number>",
|
|
5021
5589
|
"required": true,
|
|
5022
5590
|
"description": "Iterator"
|
|
5023
5591
|
},
|
|
5024
5592
|
{
|
|
5025
|
-
"name": "__@unscopables@
|
|
5593
|
+
"name": "__@unscopables@15637",
|
|
5026
5594
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
5027
5595
|
"required": true,
|
|
5028
5596
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -5406,13 +5974,13 @@
|
|
|
5406
5974
|
"description": "Returns the item located at the specified index."
|
|
5407
5975
|
},
|
|
5408
5976
|
{
|
|
5409
|
-
"name": "__@iterator@
|
|
5977
|
+
"name": "__@iterator@15607",
|
|
5410
5978
|
"type": "() => ArrayIterator<number>",
|
|
5411
5979
|
"required": true,
|
|
5412
5980
|
"description": "Iterator"
|
|
5413
5981
|
},
|
|
5414
5982
|
{
|
|
5415
|
-
"name": "__@unscopables@
|
|
5983
|
+
"name": "__@unscopables@15637",
|
|
5416
5984
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
5417
5985
|
"required": true,
|
|
5418
5986
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -5713,13 +6281,13 @@
|
|
|
5713
6281
|
"description": "Returns the item located at the specified index."
|
|
5714
6282
|
},
|
|
5715
6283
|
{
|
|
5716
|
-
"name": "__@iterator@
|
|
6284
|
+
"name": "__@iterator@15607",
|
|
5717
6285
|
"type": "() => ArrayIterator<number>",
|
|
5718
6286
|
"required": true,
|
|
5719
6287
|
"description": "Iterator"
|
|
5720
6288
|
},
|
|
5721
6289
|
{
|
|
5722
|
-
"name": "__@unscopables@
|
|
6290
|
+
"name": "__@unscopables@15637",
|
|
5723
6291
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
5724
6292
|
"required": true,
|
|
5725
6293
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -8293,7 +8861,7 @@
|
|
|
8293
8861
|
],
|
|
8294
8862
|
"requiresAccessibleName": false
|
|
8295
8863
|
},
|
|
8296
|
-
"since": "0.
|
|
8864
|
+
"since": "0.13.0",
|
|
8297
8865
|
"example": "import { SourceLogo } from '@sakaniui/react';\n\n<SourceLogo name=\"x\" />",
|
|
8298
8866
|
"aliases": [
|
|
8299
8867
|
"brand logo",
|
|
@@ -10034,7 +10602,7 @@
|
|
|
10034
10602
|
"done",
|
|
10035
10603
|
"working"
|
|
10036
10604
|
],
|
|
10037
|
-
"default": "
|
|
10605
|
+
"default": "working",
|
|
10038
10606
|
"description": "\"working\" shows a sparkle and a shimmering label; \"done\" shows a check. Defaults to \"working\"."
|
|
10039
10607
|
},
|
|
10040
10608
|
{
|
|
@@ -13156,12 +13724,14 @@
|
|
|
13156
13724
|
{
|
|
13157
13725
|
"name": "sourceLogo",
|
|
13158
13726
|
"kind": "helper",
|
|
13159
|
-
"import": "@sakaniui/react"
|
|
13727
|
+
"import": "@sakaniui/react",
|
|
13728
|
+
"since": "0.13.0"
|
|
13160
13729
|
},
|
|
13161
13730
|
{
|
|
13162
13731
|
"name": "sourceLogoNames",
|
|
13163
13732
|
"kind": "helper",
|
|
13164
|
-
"import": "@sakaniui/react"
|
|
13733
|
+
"import": "@sakaniui/react",
|
|
13734
|
+
"since": "0.13.0"
|
|
13165
13735
|
},
|
|
13166
13736
|
{
|
|
13167
13737
|
"name": "syncLiquidBackdrop",
|