@imfusion/web-ui 0.11.1-dev.42.ge966e634 → 0.11.1-dev.45.gf7b49f57
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/CHANGELOG.md +8 -0
- package/dist/{code-BXlEW54h.js → code-BX1Humcy.js} +6 -6
- package/dist/components/file-drop-zone/collect-files.d.ts +56 -0
- package/dist/components/file-drop-zone/file-drop-zone-context.d.ts +15 -0
- package/dist/components/file-drop-zone/file-drop-zone.d.ts +185 -0
- package/dist/components/file-drop-zone/file-drop-zone.meta.d.ts +2 -0
- package/dist/components/file-drop-zone/format-bytes.d.ts +5 -0
- package/dist/components/file-drop-zone/index.d.ts +4 -0
- package/dist/components/logo/logo.d.ts +1 -1
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3914 -3225
- package/dist/integrations/code-highlight.js +1 -1
- package/dist/integrations/image-display-options.js +56 -56
- package/dist/style.css +1 -1
- package/dist/{tabs-D5DTlk0d.js → tabs-CLeLjFNy.js} +126 -126
- package/package.json +1 -1
- package/src/docgen/doc.gen.json +534 -0
- package/src/llms/llms.gen.txt +5 -0
package/src/docgen/doc.gen.json
CHANGED
|
@@ -5863,6 +5863,540 @@
|
|
|
5863
5863
|
}
|
|
5864
5864
|
]
|
|
5865
5865
|
},
|
|
5866
|
+
"file-drop-zone": {
|
|
5867
|
+
"root": {
|
|
5868
|
+
"name": "FileDropZone.Root",
|
|
5869
|
+
"description": "FileDropZone.Root — a group that collects files and folders by drop or by its Triggers and reports them through\n`onFilesAdded`. The Triggers are the keyboard and screen reader path; dropping is an enhancement.",
|
|
5870
|
+
"props": [
|
|
5871
|
+
{
|
|
5872
|
+
"name": "accept",
|
|
5873
|
+
"required": false,
|
|
5874
|
+
"type": "string[]",
|
|
5875
|
+
"defaultValue": null,
|
|
5876
|
+
"description": "Accepted file types: extensions (`\".nii.gz\"`), MIME types (`\"image/png\"`) or wildcards (`\"image/*\"`). Any file when empty."
|
|
5877
|
+
},
|
|
5878
|
+
{
|
|
5879
|
+
"name": "directory",
|
|
5880
|
+
"required": false,
|
|
5881
|
+
"type": "boolean",
|
|
5882
|
+
"defaultValue": "false",
|
|
5883
|
+
"description": "Whether folders can be dropped or picked. They are scanned recursively. Needs `multiple`."
|
|
5884
|
+
},
|
|
5885
|
+
{
|
|
5886
|
+
"name": "disabled",
|
|
5887
|
+
"required": false,
|
|
5888
|
+
"type": "boolean",
|
|
5889
|
+
"defaultValue": "false",
|
|
5890
|
+
"description": "Blocks dropping and picking; the Triggers follow."
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
"name": "formatStatus",
|
|
5894
|
+
"required": false,
|
|
5895
|
+
"type": "(accepted: number, rejected: number) => string",
|
|
5896
|
+
"defaultValue": null,
|
|
5897
|
+
"description": "Words for the screen reader status after each drop or pick. Return `\"\"` to stay silent."
|
|
5898
|
+
},
|
|
5899
|
+
{
|
|
5900
|
+
"name": "invalid",
|
|
5901
|
+
"required": false,
|
|
5902
|
+
"type": "boolean",
|
|
5903
|
+
"defaultValue": "false",
|
|
5904
|
+
"description": "Marks the zone as holding a problem. The message belongs in `Field.Error` or a `Callout`."
|
|
5905
|
+
},
|
|
5906
|
+
{
|
|
5907
|
+
"name": "multiple",
|
|
5908
|
+
"required": false,
|
|
5909
|
+
"type": "boolean",
|
|
5910
|
+
"defaultValue": "true",
|
|
5911
|
+
"description": "Whether more than one file can be added at once. With `false`, only the first accepted file is kept."
|
|
5912
|
+
},
|
|
5913
|
+
{
|
|
5914
|
+
"name": "onDragStateChange",
|
|
5915
|
+
"required": false,
|
|
5916
|
+
"type": "(state: DragState) => void",
|
|
5917
|
+
"defaultValue": null,
|
|
5918
|
+
"description": "Called when a drag over the zone starts, changes or ends. `\"rejecting\"` is reported only for a dragged type the\nbrowser exposes and `accept` cannot produce; names and counts are unknown until the drop."
|
|
5919
|
+
},
|
|
5920
|
+
{
|
|
5921
|
+
"name": "onFilesAdded",
|
|
5922
|
+
"required": false,
|
|
5923
|
+
"type": "(\n accepted: FileDropZoneItem[],\n rejected: FileDropZoneItem[]\n) => void",
|
|
5924
|
+
"defaultValue": null,
|
|
5925
|
+
"description": "Called once per drop or pick with the files that match `accept` and those that do not."
|
|
5926
|
+
},
|
|
5927
|
+
{
|
|
5928
|
+
"name": "ref",
|
|
5929
|
+
"required": false,
|
|
5930
|
+
"type": "Ref<HTMLDivElement>",
|
|
5931
|
+
"defaultValue": null,
|
|
5932
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
5933
|
+
},
|
|
5934
|
+
{
|
|
5935
|
+
"name": "size",
|
|
5936
|
+
"required": false,
|
|
5937
|
+
"type": "\"sm\" | \"md\" | \"lg\" | null",
|
|
5938
|
+
"defaultValue": "md",
|
|
5939
|
+
"description": ""
|
|
5940
|
+
}
|
|
5941
|
+
]
|
|
5942
|
+
},
|
|
5943
|
+
"subComponents": [
|
|
5944
|
+
{
|
|
5945
|
+
"name": "FileDropZone.Actions",
|
|
5946
|
+
"description": "FileDropZone.Actions — the row of Triggers.",
|
|
5947
|
+
"props": [
|
|
5948
|
+
{
|
|
5949
|
+
"name": "ref",
|
|
5950
|
+
"required": false,
|
|
5951
|
+
"type": "Ref<HTMLDivElement>",
|
|
5952
|
+
"defaultValue": null,
|
|
5953
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
5954
|
+
}
|
|
5955
|
+
]
|
|
5956
|
+
},
|
|
5957
|
+
{
|
|
5958
|
+
"name": "FileDropZone.Description",
|
|
5959
|
+
"description": "FileDropZone.Description — describes the group, such as the accepted file types.",
|
|
5960
|
+
"props": [
|
|
5961
|
+
{
|
|
5962
|
+
"name": "ref",
|
|
5963
|
+
"required": false,
|
|
5964
|
+
"type": "Ref<HTMLDivElement>",
|
|
5965
|
+
"defaultValue": null,
|
|
5966
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
5967
|
+
}
|
|
5968
|
+
]
|
|
5969
|
+
},
|
|
5970
|
+
{
|
|
5971
|
+
"name": "FileDropZone.File",
|
|
5972
|
+
"description": "FileDropZone.File — the file a single-file zone holds, in place of `Title` and `Description`. It names the group,\ndescribes it with the size, and sets `data-filled` on the Root while mounted. Long names truncate in the middle so the\nextension stays readable; the full name is the `title`.",
|
|
5973
|
+
"props": [
|
|
5974
|
+
{
|
|
5975
|
+
"name": "file",
|
|
5976
|
+
"required": true,
|
|
5977
|
+
"type": "File",
|
|
5978
|
+
"defaultValue": null,
|
|
5979
|
+
"description": "The single file the zone holds. Its name shows middle-truncated, with the last 12 characters kept, and its size in mono."
|
|
5980
|
+
},
|
|
5981
|
+
{
|
|
5982
|
+
"name": "ref",
|
|
5983
|
+
"required": false,
|
|
5984
|
+
"type": "Ref<HTMLDivElement>",
|
|
5985
|
+
"defaultValue": null,
|
|
5986
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
5987
|
+
}
|
|
5988
|
+
]
|
|
5989
|
+
},
|
|
5990
|
+
{
|
|
5991
|
+
"name": "FileDropZone.Glyph",
|
|
5992
|
+
"description": "FileDropZone.Glyph — the large icon of the `lg` zone: the upload icon, or a page while a `FileDropZone.File` is mounted. It renders nothing in `sm` and `md`.",
|
|
5993
|
+
"props": [
|
|
5994
|
+
{
|
|
5995
|
+
"name": "glyph",
|
|
5996
|
+
"required": false,
|
|
5997
|
+
"type": "IconComponent",
|
|
5998
|
+
"defaultValue": null,
|
|
5999
|
+
"description": "Icon component imported from `@imfusion/web-ui/icons`. Defaults to `UploadSquare`, or `Page` while a File is mounted."
|
|
6000
|
+
},
|
|
6001
|
+
{
|
|
6002
|
+
"name": "ref",
|
|
6003
|
+
"required": false,
|
|
6004
|
+
"type": "Ref<HTMLDivElement>",
|
|
6005
|
+
"defaultValue": null,
|
|
6006
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
6007
|
+
},
|
|
6008
|
+
{
|
|
6009
|
+
"name": "size",
|
|
6010
|
+
"required": false,
|
|
6011
|
+
"type": "string | number",
|
|
6012
|
+
"defaultValue": "48",
|
|
6013
|
+
"description": "Sets both SVG dimensions unless `width` or `height` is provided."
|
|
6014
|
+
},
|
|
6015
|
+
{
|
|
6016
|
+
"name": "variant",
|
|
6017
|
+
"required": false,
|
|
6018
|
+
"type": "| \"main\"\n| \"inherit\"\n| \"primary\"\n| \"positive\"\n| \"negative\"\n| \"oncolor\"\n| \"support\"\n| \"minor\"\n| \"brand\"\n| \"warning\"\n| \"info\"\n| \"accent-1\"\n| \"accent-2\"\n| \"accent-3\"\n| null",
|
|
6019
|
+
"defaultValue": null,
|
|
6020
|
+
"description": ""
|
|
6021
|
+
}
|
|
6022
|
+
]
|
|
6023
|
+
},
|
|
6024
|
+
{
|
|
6025
|
+
"name": "FileDropZone.Remove",
|
|
6026
|
+
"description": "FileDropZone.Remove — an icon button that empties a filled zone. It carries no behavior of its own: `onClick` clears the consumer's state.",
|
|
6027
|
+
"props": [
|
|
6028
|
+
{
|
|
6029
|
+
"name": "chamfer",
|
|
6030
|
+
"required": false,
|
|
6031
|
+
"type": "boolean | null",
|
|
6032
|
+
"defaultValue": null,
|
|
6033
|
+
"description": ""
|
|
6034
|
+
},
|
|
6035
|
+
{
|
|
6036
|
+
"name": "className",
|
|
6037
|
+
"required": false,
|
|
6038
|
+
"type": "string | ((state: ButtonState) => string)",
|
|
6039
|
+
"defaultValue": null,
|
|
6040
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
6041
|
+
},
|
|
6042
|
+
{
|
|
6043
|
+
"name": "context",
|
|
6044
|
+
"required": false,
|
|
6045
|
+
"type": "\"default\" | \"oncolor\" | null",
|
|
6046
|
+
"defaultValue": null,
|
|
6047
|
+
"description": ""
|
|
6048
|
+
},
|
|
6049
|
+
{
|
|
6050
|
+
"name": "focusableWhenDisabled",
|
|
6051
|
+
"required": false,
|
|
6052
|
+
"type": "boolean",
|
|
6053
|
+
"defaultValue": "false",
|
|
6054
|
+
"description": "Whether the button should be focusable when disabled."
|
|
6055
|
+
},
|
|
6056
|
+
{
|
|
6057
|
+
"name": "iconProps",
|
|
6058
|
+
"required": false,
|
|
6059
|
+
"type": "Omit<Omit<Omit<SVGProps<SVGSVGElement>, \"ref\"> & RefAttributes<SVGSVGElement>, \"color\"> & VariantProps<(props?: (ConfigVariants<...> & ClassProp)) => string> & { ...; }, \"glyph\">",
|
|
6060
|
+
"defaultValue": null,
|
|
6061
|
+
"description": "Props for the inner Icon, such as `strokeWidth` or a `size` override."
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
"name": "label",
|
|
6065
|
+
"required": false,
|
|
6066
|
+
"type": "string",
|
|
6067
|
+
"defaultValue": "Remove file",
|
|
6068
|
+
"description": "Accessible name of the button. Defaults to \"Remove file\"."
|
|
6069
|
+
},
|
|
6070
|
+
{
|
|
6071
|
+
"name": "nativeButton",
|
|
6072
|
+
"required": false,
|
|
6073
|
+
"type": "boolean",
|
|
6074
|
+
"defaultValue": "true",
|
|
6075
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
6076
|
+
},
|
|
6077
|
+
{
|
|
6078
|
+
"name": "radius",
|
|
6079
|
+
"required": false,
|
|
6080
|
+
"type": "\"sm\" | \"md\" | \"lg\" | \"none\" | \"round\" | null",
|
|
6081
|
+
"defaultValue": null,
|
|
6082
|
+
"description": ""
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
"name": "ref",
|
|
6086
|
+
"required": false,
|
|
6087
|
+
"type": "Ref<HTMLDivElement>",
|
|
6088
|
+
"defaultValue": null,
|
|
6089
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
6090
|
+
},
|
|
6091
|
+
{
|
|
6092
|
+
"name": "render",
|
|
6093
|
+
"required": false,
|
|
6094
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ButtonState>",
|
|
6095
|
+
"defaultValue": null,
|
|
6096
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
6097
|
+
},
|
|
6098
|
+
{
|
|
6099
|
+
"name": "shortcut",
|
|
6100
|
+
"required": false,
|
|
6101
|
+
"type": "string",
|
|
6102
|
+
"defaultValue": null,
|
|
6103
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"S\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
6104
|
+
},
|
|
6105
|
+
{
|
|
6106
|
+
"name": "size",
|
|
6107
|
+
"required": false,
|
|
6108
|
+
"type": "\"sm\" | \"md\" | \"lg\" | \"hero\" | null",
|
|
6109
|
+
"defaultValue": null,
|
|
6110
|
+
"description": "Defaults to `\"md\"` in an `lg` zone and `\"sm\"` otherwise."
|
|
6111
|
+
},
|
|
6112
|
+
{
|
|
6113
|
+
"name": "style",
|
|
6114
|
+
"required": false,
|
|
6115
|
+
"type": "| CSSProperties\n| ((state: ButtonState) => CSSProperties)",
|
|
6116
|
+
"defaultValue": null,
|
|
6117
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
6118
|
+
},
|
|
6119
|
+
{
|
|
6120
|
+
"name": "variant",
|
|
6121
|
+
"required": false,
|
|
6122
|
+
"type": "| \"primary\"\n| \"secondary\"\n| \"positive\"\n| \"negative\"\n| \"outline\"\n| \"ghost\"\n| null",
|
|
6123
|
+
"defaultValue": null,
|
|
6124
|
+
"description": "Defaults to `\"ghost\"` in an `sm` zone and `\"outline\"` otherwise."
|
|
6125
|
+
}
|
|
6126
|
+
]
|
|
6127
|
+
},
|
|
6128
|
+
{
|
|
6129
|
+
"name": "FileDropZone.Title",
|
|
6130
|
+
"description": "FileDropZone.Title — names the group.",
|
|
6131
|
+
"props": [
|
|
6132
|
+
{
|
|
6133
|
+
"name": "ref",
|
|
6134
|
+
"required": false,
|
|
6135
|
+
"type": "Ref<HTMLDivElement>",
|
|
6136
|
+
"defaultValue": null,
|
|
6137
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
6138
|
+
}
|
|
6139
|
+
]
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
"name": "FileDropZone.Trigger",
|
|
6143
|
+
"description": "FileDropZone.Trigger — a Button that opens the picker.",
|
|
6144
|
+
"props": [
|
|
6145
|
+
{
|
|
6146
|
+
"name": "chamfer",
|
|
6147
|
+
"required": false,
|
|
6148
|
+
"type": "boolean | null",
|
|
6149
|
+
"defaultValue": null,
|
|
6150
|
+
"description": ""
|
|
6151
|
+
},
|
|
6152
|
+
{
|
|
6153
|
+
"name": "className",
|
|
6154
|
+
"required": false,
|
|
6155
|
+
"type": "string | ((state: ButtonState) => string)",
|
|
6156
|
+
"defaultValue": null,
|
|
6157
|
+
"description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."
|
|
6158
|
+
},
|
|
6159
|
+
{
|
|
6160
|
+
"name": "context",
|
|
6161
|
+
"required": false,
|
|
6162
|
+
"type": "\"default\" | \"oncolor\" | null",
|
|
6163
|
+
"defaultValue": null,
|
|
6164
|
+
"description": ""
|
|
6165
|
+
},
|
|
6166
|
+
{
|
|
6167
|
+
"name": "endIcon",
|
|
6168
|
+
"required": false,
|
|
6169
|
+
"type": "ReactNode",
|
|
6170
|
+
"defaultValue": null,
|
|
6171
|
+
"description": "Trailing slot, typically an icon."
|
|
6172
|
+
},
|
|
6173
|
+
{
|
|
6174
|
+
"name": "focusableWhenDisabled",
|
|
6175
|
+
"required": false,
|
|
6176
|
+
"type": "boolean",
|
|
6177
|
+
"defaultValue": "false",
|
|
6178
|
+
"description": "Whether the button should be focusable when disabled."
|
|
6179
|
+
},
|
|
6180
|
+
{
|
|
6181
|
+
"name": "justify",
|
|
6182
|
+
"required": false,
|
|
6183
|
+
"type": "\"center\" | \"spread\" | null",
|
|
6184
|
+
"defaultValue": null,
|
|
6185
|
+
"description": ""
|
|
6186
|
+
},
|
|
6187
|
+
{
|
|
6188
|
+
"name": "mode",
|
|
6189
|
+
"required": false,
|
|
6190
|
+
"type": "\"files\" | \"folder\"",
|
|
6191
|
+
"defaultValue": "files",
|
|
6192
|
+
"description": "`\"files\"` opens the file picker, `\"folder\"` the folder picker. A folder Trigger needs `directory` on the Root."
|
|
6193
|
+
},
|
|
6194
|
+
{
|
|
6195
|
+
"name": "nativeButton",
|
|
6196
|
+
"required": false,
|
|
6197
|
+
"type": "boolean",
|
|
6198
|
+
"defaultValue": "true",
|
|
6199
|
+
"description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."
|
|
6200
|
+
},
|
|
6201
|
+
{
|
|
6202
|
+
"name": "radius",
|
|
6203
|
+
"required": false,
|
|
6204
|
+
"type": "\"sm\" | \"md\" | \"lg\" | \"none\" | \"round\" | null",
|
|
6205
|
+
"defaultValue": null,
|
|
6206
|
+
"description": ""
|
|
6207
|
+
},
|
|
6208
|
+
{
|
|
6209
|
+
"name": "ref",
|
|
6210
|
+
"required": false,
|
|
6211
|
+
"type": "Ref<HTMLDivElement>",
|
|
6212
|
+
"defaultValue": null,
|
|
6213
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
6214
|
+
},
|
|
6215
|
+
{
|
|
6216
|
+
"name": "render",
|
|
6217
|
+
"required": false,
|
|
6218
|
+
"type": "| ReactElement<\n unknown,\n string | JSXElementConstructor<any>\n >\n| ComponentRenderFn<HTMLProps, ButtonState>",
|
|
6219
|
+
"defaultValue": null,
|
|
6220
|
+
"description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."
|
|
6221
|
+
},
|
|
6222
|
+
{
|
|
6223
|
+
"name": "shortcut",
|
|
6224
|
+
"required": false,
|
|
6225
|
+
"type": "string",
|
|
6226
|
+
"defaultValue": null,
|
|
6227
|
+
"description": "Key hint shown in the top corner at the end of the line, such as `\"S\"` or `\"Ctrl Z\"`. It also sets\n`aria-keyshortcuts` in its notation (`Control+Z`), which an explicit\n`aria-keyshortcuts` prop overrides. Display only: bind the key in the app, for example with `useHotkey` from TanStack Hotkeys."
|
|
6228
|
+
},
|
|
6229
|
+
{
|
|
6230
|
+
"name": "size",
|
|
6231
|
+
"required": false,
|
|
6232
|
+
"type": "\"sm\" | \"md\" | \"lg\" | \"hero\" | null",
|
|
6233
|
+
"defaultValue": null,
|
|
6234
|
+
"description": "Defaults to `\"md\"` in an `lg` zone and `\"sm\"` otherwise."
|
|
6235
|
+
},
|
|
6236
|
+
{
|
|
6237
|
+
"name": "startIcon",
|
|
6238
|
+
"required": false,
|
|
6239
|
+
"type": "ReactNode",
|
|
6240
|
+
"defaultValue": null,
|
|
6241
|
+
"description": "Leading slot, typically an icon."
|
|
6242
|
+
},
|
|
6243
|
+
{
|
|
6244
|
+
"name": "style",
|
|
6245
|
+
"required": false,
|
|
6246
|
+
"type": "| CSSProperties\n| ((state: ButtonState) => CSSProperties)",
|
|
6247
|
+
"defaultValue": null,
|
|
6248
|
+
"description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."
|
|
6249
|
+
},
|
|
6250
|
+
{
|
|
6251
|
+
"name": "variant",
|
|
6252
|
+
"required": false,
|
|
6253
|
+
"type": "| \"primary\"\n| \"secondary\"\n| \"positive\"\n| \"negative\"\n| \"outline\"\n| \"ghost\"\n| null",
|
|
6254
|
+
"defaultValue": null,
|
|
6255
|
+
"description": "Defaults to `\"ghost\"` in an `sm` zone and `\"outline\"` otherwise."
|
|
6256
|
+
}
|
|
6257
|
+
]
|
|
6258
|
+
},
|
|
6259
|
+
{
|
|
6260
|
+
"name": "FileDropZone.Upload",
|
|
6261
|
+
"description": "FileDropZone.Upload — the upload sequence in one piece: a zone, the list of collected files to check and remove, a\n`Progress` per row and overall once the upload runs, and the upload button. It is controlled and uploads nothing: the app\nkeeps `items`, performs the upload, and reports each item's `status` and `progress`. Other props go to the zone.",
|
|
6262
|
+
"props": [
|
|
6263
|
+
{
|
|
6264
|
+
"name": "accept",
|
|
6265
|
+
"required": false,
|
|
6266
|
+
"type": "string[]",
|
|
6267
|
+
"defaultValue": null,
|
|
6268
|
+
"description": "Accepted file types: extensions (`\".nii.gz\"`), MIME types (`\"image/png\"`) or wildcards (`\"image/*\"`). Any file when empty."
|
|
6269
|
+
},
|
|
6270
|
+
{
|
|
6271
|
+
"name": "description",
|
|
6272
|
+
"required": false,
|
|
6273
|
+
"type": "ReactNode",
|
|
6274
|
+
"defaultValue": null,
|
|
6275
|
+
"description": "Text under the zone title. Defaults to the accepted types, such as \"PNG, JPEG or WebP\", and a note that folders are scanned."
|
|
6276
|
+
},
|
|
6277
|
+
{
|
|
6278
|
+
"name": "disabled",
|
|
6279
|
+
"required": false,
|
|
6280
|
+
"type": "boolean",
|
|
6281
|
+
"defaultValue": "false",
|
|
6282
|
+
"description": "Blocks dropping and picking; the Triggers follow."
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
"name": "folders",
|
|
6286
|
+
"required": false,
|
|
6287
|
+
"type": "boolean",
|
|
6288
|
+
"defaultValue": "true",
|
|
6289
|
+
"description": "Whether the zone takes whole folders, with a \"Choose folder\" button. Needs `multiple`."
|
|
6290
|
+
},
|
|
6291
|
+
{
|
|
6292
|
+
"name": "formatStatus",
|
|
6293
|
+
"required": false,
|
|
6294
|
+
"type": "(accepted: number, rejected: number) => string",
|
|
6295
|
+
"defaultValue": null,
|
|
6296
|
+
"description": "Words for the screen reader status after each drop or pick. Return `\"\"` to stay silent."
|
|
6297
|
+
},
|
|
6298
|
+
{
|
|
6299
|
+
"name": "heading",
|
|
6300
|
+
"required": false,
|
|
6301
|
+
"type": "ReactNode",
|
|
6302
|
+
"defaultValue": "Upload files",
|
|
6303
|
+
"description": "Heading of the card around the zone and the list."
|
|
6304
|
+
},
|
|
6305
|
+
{
|
|
6306
|
+
"name": "invalid",
|
|
6307
|
+
"required": false,
|
|
6308
|
+
"type": "boolean",
|
|
6309
|
+
"defaultValue": null,
|
|
6310
|
+
"description": "Marks the zone as holding a problem. The message belongs in `Field.Error` or a `Callout`."
|
|
6311
|
+
},
|
|
6312
|
+
{
|
|
6313
|
+
"name": "items",
|
|
6314
|
+
"required": true,
|
|
6315
|
+
"type": "FileDropZoneUploadItem[]",
|
|
6316
|
+
"defaultValue": null,
|
|
6317
|
+
"description": "The files to list, in order. The app owns this list and each item's `status` and `progress`."
|
|
6318
|
+
},
|
|
6319
|
+
{
|
|
6320
|
+
"name": "labels",
|
|
6321
|
+
"required": false,
|
|
6322
|
+
"type": "Partial<UploadLabels>",
|
|
6323
|
+
"defaultValue": null,
|
|
6324
|
+
"description": "Replaces any of the English texts: the button texts, the drag copy, the row states, the skipped note, the finished text."
|
|
6325
|
+
},
|
|
6326
|
+
{
|
|
6327
|
+
"name": "multiple",
|
|
6328
|
+
"required": false,
|
|
6329
|
+
"type": "boolean",
|
|
6330
|
+
"defaultValue": "true",
|
|
6331
|
+
"description": "Whether more than one file can be added at once. With `false`, only the first accepted file is kept."
|
|
6332
|
+
},
|
|
6333
|
+
{
|
|
6334
|
+
"name": "onDragStateChange",
|
|
6335
|
+
"required": false,
|
|
6336
|
+
"type": "(state: DragState) => void",
|
|
6337
|
+
"defaultValue": null,
|
|
6338
|
+
"description": "Called when a drag over the zone starts, changes or ends. `\"rejecting\"` is reported only for a dragged type the\nbrowser exposes and `accept` cannot produce; names and counts are unknown until the drop."
|
|
6339
|
+
},
|
|
6340
|
+
{
|
|
6341
|
+
"name": "onFilesAdded",
|
|
6342
|
+
"required": false,
|
|
6343
|
+
"type": "(\n accepted: FileDropZoneItem[],\n rejected: FileDropZoneItem[]\n) => void",
|
|
6344
|
+
"defaultValue": null,
|
|
6345
|
+
"description": "Called once per drop or pick with the files that match `accept` and those that do not."
|
|
6346
|
+
},
|
|
6347
|
+
{
|
|
6348
|
+
"name": "onRemove",
|
|
6349
|
+
"required": true,
|
|
6350
|
+
"type": "(id: string) => void",
|
|
6351
|
+
"defaultValue": null,
|
|
6352
|
+
"description": "Called with the `id` of the row whose Remove button was pressed."
|
|
6353
|
+
},
|
|
6354
|
+
{
|
|
6355
|
+
"name": "onReset",
|
|
6356
|
+
"required": false,
|
|
6357
|
+
"type": "() => void",
|
|
6358
|
+
"defaultValue": null,
|
|
6359
|
+
"description": "Called by \"Start over\" once every item is done or failed. The button shows only when this is set."
|
|
6360
|
+
},
|
|
6361
|
+
{
|
|
6362
|
+
"name": "onRetry",
|
|
6363
|
+
"required": false,
|
|
6364
|
+
"type": "(id: string) => void",
|
|
6365
|
+
"defaultValue": null,
|
|
6366
|
+
"description": "Called with the `id` of a failed row whose Retry button was pressed. The app sends the file again and moves the row\nback to `\"uploading\"`. Failed rows show Retry only when this is set."
|
|
6367
|
+
},
|
|
6368
|
+
{
|
|
6369
|
+
"name": "onUpload",
|
|
6370
|
+
"required": true,
|
|
6371
|
+
"type": "() => void",
|
|
6372
|
+
"defaultValue": null,
|
|
6373
|
+
"description": "Called when the upload button is pressed. The app starts the upload and moves the queued items to `\"uploading\"`."
|
|
6374
|
+
},
|
|
6375
|
+
{
|
|
6376
|
+
"name": "ref",
|
|
6377
|
+
"required": false,
|
|
6378
|
+
"type": "Ref<HTMLDivElement>",
|
|
6379
|
+
"defaultValue": null,
|
|
6380
|
+
"description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null`\n(or call the ref with `null` if you passed a callback ref).\n@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}"
|
|
6381
|
+
},
|
|
6382
|
+
{
|
|
6383
|
+
"name": "size",
|
|
6384
|
+
"required": false,
|
|
6385
|
+
"type": "\"sm\" | \"md\" | \"lg\" | null",
|
|
6386
|
+
"defaultValue": "lg",
|
|
6387
|
+
"description": ""
|
|
6388
|
+
},
|
|
6389
|
+
{
|
|
6390
|
+
"name": "title",
|
|
6391
|
+
"required": false,
|
|
6392
|
+
"type": "ReactNode",
|
|
6393
|
+
"defaultValue": null,
|
|
6394
|
+
"description": "Title of the zone. Defaults to \"Drop files or a folder\", or \"Drop a file\" without `multiple`."
|
|
6395
|
+
}
|
|
6396
|
+
]
|
|
6397
|
+
}
|
|
6398
|
+
]
|
|
6399
|
+
},
|
|
5866
6400
|
"icon": {
|
|
5867
6401
|
"root": {
|
|
5868
6402
|
"name": "Icon",
|
package/src/llms/llms.gen.txt
CHANGED
|
@@ -119,6 +119,11 @@ Semantic group for related form controls with a shared legend. Also called a for
|
|
|
119
119
|
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .fieldset (jq: jq '.fieldset' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
120
120
|
- further reading (usage/anatomy, not props): https://base-ui.com/react/components/fieldset.md
|
|
121
121
|
|
|
122
|
+
## FileDropZone
|
|
123
|
+
- category: Inputs, status: experimental
|
|
124
|
+
Drop zone with picker buttons for files or whole folders, reporting accepted and rejected files. Also called a file upload area or dropzone. For a single native file control inside a form, use Input.
|
|
125
|
+
- props: node_modules/@imfusion/web-ui/src/docgen/doc.gen.json -> .file-drop-zone (jq: jq '.file-drop-zone' node_modules/@imfusion/web-ui/src/docgen/doc.gen.json)
|
|
126
|
+
|
|
122
127
|
## FrameSelection
|
|
123
128
|
- category: Inputs, status: experimental
|
|
124
129
|
Frame or slice picker bound to the focused frame of ImFusion image sets, with a focus and count readout. For a position picker not tied to the SDK, use Slider with variant="position".
|