@gridui/composer 2.2.0 → 3.0.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 +7 -0
- package/dist/composer/composer.d.ts +2 -0
- package/dist/index.js +16 -7
- package/dist/index.js.map +2 -2
- package/dist/shared/composer-context.d.ts +2 -0
- package/dist/shared/types.d.ts +2 -0
- package/dist/styles.css +127 -86
- package/dist/styles.local.css +22 -5
- package/docs/catalog.json +1 -1
- package/docs/reference/attachment-list.md +6 -0
- package/docs/reference/composer-attachments.md +4 -0
- package/docs/reference/composer-file-picker.md +6 -0
- package/docs/reference/composer-input.md +6 -4
- package/docs/reference/composer-stop.md +2 -2
- package/docs/reference/composer-submit.md +2 -2
- package/docs/reference/composer.md +8 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -41,3 +41,10 @@ stacked/inline arrangements, attachment state, submission validation and keyboar
|
|
|
41
41
|
shortcuts remain Composer-owned. Load Input styles, including its group styles,
|
|
42
42
|
before Composer styles. Automatic height follows Textarea's Baseline 2026 browser
|
|
43
43
|
requirement and supports its maxRows or maxHeight constraints.
|
|
44
|
+
|
|
45
|
+
## Sizing and density
|
|
46
|
+
|
|
47
|
+
Composer size supplies the local field/action default and owned spacing; explicit part sizes win. AttachmentList and ComposerAttachments independently accept density for row spacing. Message text, draft/submission state and attachment lifecycle retain their owners.
|
|
48
|
+
|
|
49
|
+
See the [shared sizing contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/sizing.md)
|
|
50
|
+
for native attributes, scope precedence, tokens and target behavior.
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* @namespace Composer
|
|
5
5
|
* @description Composer
|
|
6
6
|
*/
|
|
7
|
+
import type { Size } from "@gridui/theme";
|
|
7
8
|
import type { AttachmentItem } from "../shared/types";
|
|
8
9
|
import { type ComponentPropsWithRef, type FC } from "react";
|
|
9
10
|
export type ComposerProps = Omit<ComponentPropsWithRef<"div">, "onSubmit"> & {
|
|
11
|
+
readonly size?: Size;
|
|
10
12
|
readonly value: string;
|
|
11
13
|
readonly onValueChange: (value: string) => void;
|
|
12
14
|
readonly onSubmit: (value: string) => void;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/attachment-list/style.ts
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
var attachmentListStyles = cva("gridui-u-composer--m-0 gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--list-none gridui-u-composer--flex-col gridui-u-composer--p-0 gridui-u-composer--focus:min-h-11");
|
|
4
|
-
var attachmentStyles = cva("gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--gap-gridui-8 gridui-u-composer--border-b gridui-u-composer--border-border gridui-u-composer--py-gridui-
|
|
3
|
+
var attachmentListStyles = cva("gridui-attachment-list gridui-u-composer--m-0 gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--list-none gridui-u-composer--flex-col gridui-u-composer--p-0 gridui-u-composer--focus:min-h-11");
|
|
4
|
+
var attachmentStyles = cva("gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--gap-gridui-8 gridui-u-composer--border-b gridui-u-composer--border-border gridui-u-composer--py-(--gridui-attachment-block) gridui-u-composer--data-[state=error]:text-status-danger-text");
|
|
5
5
|
var attachmentCopyStyles = cva("gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-1 gridui-u-composer--flex-col gridui-u-composer--wrap-anywhere");
|
|
6
6
|
var attachmentMetaStyles = cva("gridui-u-composer--text-muted gridui-u-composer--type-caption");
|
|
7
7
|
|
|
@@ -13,6 +13,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
var AttachmentList = (props) => {
|
|
14
14
|
const {
|
|
15
15
|
items,
|
|
16
|
+
density = "comfortable",
|
|
16
17
|
label,
|
|
17
18
|
removeLabel,
|
|
18
19
|
onRemove,
|
|
@@ -52,6 +53,7 @@ var AttachmentList = (props) => {
|
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
"aria-label": label,
|
|
56
|
+
"data-density": density,
|
|
55
57
|
tabIndex: -1,
|
|
56
58
|
className: cn(attachmentListStyles(), className),
|
|
57
59
|
children: items.map((item, index) => {
|
|
@@ -143,7 +145,7 @@ var useComposer = () => {
|
|
|
143
145
|
|
|
144
146
|
// src/composer/style.ts
|
|
145
147
|
import { cva as cva2 } from "class-variance-authority";
|
|
146
|
-
var composerStyles = cva2("gridui-u-composer--min-w-0 gridui-u-composer--gap-gridui-8 gridui-u-composer--p-gridui-8 gridui-u-composer--text-foreground", {
|
|
148
|
+
var composerStyles = cva2("gridui-composer gridui-u-composer--min-w-0 gridui-u-composer--gap-(--gridui-composer-padding,var(--gridui-space-8)) gridui-u-composer--p-(--gridui-composer-padding,var(--gridui-space-8)) gridui-u-composer--text-foreground", {
|
|
147
149
|
variants: {
|
|
148
150
|
layout: {
|
|
149
151
|
stacked: "gridui-u-composer--flex gridui-u-composer--flex-col gridui-u-composer--flex-nowrap gridui-u-composer--items-stretch",
|
|
@@ -162,6 +164,7 @@ import { useRef as useRef2 } from "react";
|
|
|
162
164
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
163
165
|
var Composer = (props) => {
|
|
164
166
|
const {
|
|
167
|
+
size = "medium",
|
|
165
168
|
value,
|
|
166
169
|
onValueChange,
|
|
167
170
|
onSubmit,
|
|
@@ -200,6 +203,7 @@ var Composer = (props) => {
|
|
|
200
203
|
composerContext.Provider,
|
|
201
204
|
{
|
|
202
205
|
value: {
|
|
206
|
+
size,
|
|
203
207
|
attachments,
|
|
204
208
|
layout,
|
|
205
209
|
value,
|
|
@@ -219,6 +223,7 @@ var Composer = (props) => {
|
|
|
219
223
|
children: /* @__PURE__ */ jsx2(
|
|
220
224
|
InputGroup,
|
|
221
225
|
{
|
|
226
|
+
size,
|
|
222
227
|
...restProps,
|
|
223
228
|
className: cn2(composerStyles({ layout }), className),
|
|
224
229
|
children
|
|
@@ -300,12 +305,13 @@ import { FilePicker } from "@gridui/file-picker";
|
|
|
300
305
|
import { useId } from "react";
|
|
301
306
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
302
307
|
var ComposerFilePicker = (props) => {
|
|
303
|
-
const { editingDisabled } = useComposer();
|
|
308
|
+
const { size, editingDisabled } = useComposer();
|
|
304
309
|
const inputId = useId();
|
|
305
310
|
return /* @__PURE__ */ jsx5(
|
|
306
311
|
FilePicker,
|
|
307
312
|
{
|
|
308
313
|
...props,
|
|
314
|
+
size: props.size ?? size,
|
|
309
315
|
inputId,
|
|
310
316
|
multiple: true,
|
|
311
317
|
disabled: editingDisabled
|
|
@@ -320,7 +326,7 @@ import { useRef as useRef3 } from "react";
|
|
|
320
326
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
321
327
|
var ComposerInput = (props) => {
|
|
322
328
|
const { ref, onKeyDown, onCompositionStart, onCompositionEnd, maxRows, maxHeight, ...restProps } = props;
|
|
323
|
-
const { input, value, onValueChange, inputDisabled, readOnly, submit, submitShortcut } = useComposer();
|
|
329
|
+
const { size, input, value, onValueChange, inputDisabled, readOnly, submit, submitShortcut } = useComposer();
|
|
324
330
|
const isComposing = useRef3(false);
|
|
325
331
|
const handleKeyDown = (event) => {
|
|
326
332
|
onKeyDown?.(event);
|
|
@@ -347,6 +353,7 @@ var ComposerInput = (props) => {
|
|
|
347
353
|
...maxHeight === void 0 ? {} : { maxHeight }
|
|
348
354
|
},
|
|
349
355
|
...restProps,
|
|
356
|
+
size: restProps.size ?? size,
|
|
350
357
|
ref: (element) => {
|
|
351
358
|
input.current = element;
|
|
352
359
|
const cleanup = typeof ref === "function" ? ref(element) : void 0;
|
|
@@ -388,7 +395,7 @@ var ComposerInput = (props) => {
|
|
|
388
395
|
import { Button as Button2 } from "@gridui/button";
|
|
389
396
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
390
397
|
var ComposerStop = (props) => {
|
|
391
|
-
const { disabled, onStop, showStop } = useComposer();
|
|
398
|
+
const { size, disabled, onStop, showStop } = useComposer();
|
|
392
399
|
if (!showStop) {
|
|
393
400
|
return null;
|
|
394
401
|
}
|
|
@@ -400,6 +407,7 @@ var ComposerStop = (props) => {
|
|
|
400
407
|
Button2,
|
|
401
408
|
{
|
|
402
409
|
...appearance,
|
|
410
|
+
size: props.size ?? size,
|
|
403
411
|
type: "button",
|
|
404
412
|
disabled: disabled || !onStop,
|
|
405
413
|
onClick: onStop
|
|
@@ -413,7 +421,7 @@ import { useImperativeHandle } from "react";
|
|
|
413
421
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
414
422
|
var ComposerSubmit = (props) => {
|
|
415
423
|
const { ref, ...restProps } = props;
|
|
416
|
-
const { canSubmit, showStop, submit, submitButton } = useComposer();
|
|
424
|
+
const { size, canSubmit, showStop, submit, submitButton } = useComposer();
|
|
417
425
|
useImperativeHandle(ref, () => {
|
|
418
426
|
return submitButton.current;
|
|
419
427
|
});
|
|
@@ -424,6 +432,7 @@ var ComposerSubmit = (props) => {
|
|
|
424
432
|
Button3,
|
|
425
433
|
{
|
|
426
434
|
...restProps,
|
|
435
|
+
size: props.size ?? size,
|
|
427
436
|
ref: submitButton,
|
|
428
437
|
type: "button",
|
|
429
438
|
disabled: !canSubmit,
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/attachment-list/style.ts", "../src/attachment-list/attachment-list.tsx", "../src/shared/composer-context.ts", "../src/composer/style.ts", "../src/composer/composer.tsx", "../src/composer-actions/style.ts", "../src/composer-actions/composer-actions.tsx", "../src/composer-attachments/style.ts", "../src/composer-attachments/composer-attachments.tsx", "../src/composer-file-picker/composer-file-picker.tsx", "../src/composer-input/composer-input.tsx", "../src/composer-stop/composer-stop.tsx", "../src/composer-submit/composer-submit.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Composer\n * @namespace AttachmentList\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const attachmentListStyles = cva(\"gridui-u-composer--m-0 gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--list-none gridui-u-composer--flex-col gridui-u-composer--p-0 gridui-u-composer--focus:min-h-11\");\n\nexport const attachmentStyles = cva(\"gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--gap-gridui-8 gridui-u-composer--border-b gridui-u-composer--border-border gridui-u-composer--py-gridui-8 gridui-u-composer--data-[state=error]:text-status-danger-text\");\n\nexport const attachmentCopyStyles = cva(\"gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-1 gridui-u-composer--flex-col gridui-u-composer--wrap-anywhere\");\n\nexport const attachmentMetaStyles = cva(\"gridui-u-composer--text-muted gridui-u-composer--type-caption\");\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace AttachmentList\n * @description Attachment List\n */\n\nimport type { AttachmentListOptions } from \"../shared/types\";\nimport { attachmentCopyStyles, attachmentListStyles, attachmentMetaStyles, attachmentStyles } from \"./style\";\nimport { Button } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type FC, useLayoutEffect, useRef } from \"react\";\n\nexport type AttachmentListProps = AttachmentListOptions;\n\nexport const AttachmentList: FC<AttachmentListProps> = (props: AttachmentListProps) => {\n const {\n items,\n label,\n removeLabel,\n onRemove,\n disabled = false,\n className,\n ref,\n ...restProps\n } = props;\n const buttons = useRef(new Map<string, HTMLButtonElement>());\n const pending = useRef<{\n id: string;\n index: number;\n element: HTMLButtonElement;\n } | null>(null);\n const list = useRef<HTMLUListElement | null>(null);\n useLayoutEffect(() => {\n const removed = pending.current;\n if (removed && !items.some(item => {\n return item.id === removed.id;\n })) {\n const document = removed.element.ownerDocument;\n const active = document.activeElement;\n if (active === removed.element || active === document.body) {\n const next = items[Math.min(removed.index, items.length - 1)];\n (next ? buttons.current.get(next.id) : list.current)?.focus();\n }\n pending.current = null;\n }\n }, [items]);\n return (<ul\n {...restProps}\n ref={element => {\n list.current = element;\n if (typeof ref === \"function\") {\n return ref(element);\n }\n if (ref) {\n ref.current = element;\n }\n }}\n aria-label={label}\n tabIndex={-1}\n className={cn(attachmentListStyles(), className)}\n >\n {items.map((item, index) => {\n return (<li\n key={item.id}\n className={attachmentStyles()}\n data-state={item.state}\n >\n <div\n className={attachmentCopyStyles()}\n >\n <span>\n {item.name}\n </span>\n <span\n className={attachmentMetaStyles()}\n >\n {item.description}\n </span>\n <span\n className={attachmentMetaStyles()}\n >\n {item.stateLabel}\n </span>\n </div>\n {onRemove && (<Button\n ref={element => {\n if (element) {\n buttons.current.set(item.id, element);\n } else {\n buttons.current.delete(item.id);\n }\n }}\n variant=\"quiet\"\n layout=\"icon\"\n aria-label={removeLabel(item)}\n title={removeLabel(item)}\n disabled={disabled}\n onBlur={event => {\n if (event.relatedTarget && pending.current?.element === event.currentTarget) {\n pending.current = null;\n }\n }}\n onClick={event => {\n pending.current = {\n id: item.id,\n index,\n element: event.currentTarget,\n };\n onRemove(item.id);\n }}\n >\n <span\n aria-hidden=\"true\"\n >\n \u00D7\n </span>\n </Button>)}\n </li>);\n })}\n </ul>);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Shared\n * @description Composer Context\n */\n\nimport type { AttachmentItem } from \"./types\";\nimport { createContext, type RefObject, useContext } from \"react\";\n\nexport type ComposerContext = {\n readonly attachments: readonly AttachmentItem[];\n readonly layout: \"stacked\" | \"inline\";\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly readOnly: boolean;\n readonly inputDisabled: boolean;\n readonly editingDisabled: boolean;\n readonly disabled: boolean;\n readonly submitShortcut: \"modifier-enter\" | \"enter\";\n readonly canSubmit: boolean;\n readonly showStop: boolean;\n readonly onStop: (() => void) | undefined;\n readonly input: RefObject<HTMLTextAreaElement | null>;\n readonly submitButton: RefObject<HTMLButtonElement | null>;\n readonly submit: () => void;\n};\n\nexport const composerContext = createContext<ComposerContext | null>(null);\n\nexport const useComposer = (): ComposerContext => {\n const composer = useContext(composerContext);\n if (!composer) {\n throw new Error(\"Composer parts require a Composer.\");\n }\n return composer;\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Composer\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerStyles = cva(\"gridui-u-composer--min-w-0 gridui-u-composer--gap-gridui-8 gridui-u-composer--p-gridui-8 gridui-u-composer--text-foreground\", {\n variants: {\n layout: {\n stacked: \"gridui-u-composer--flex gridui-u-composer--flex-col gridui-u-composer--flex-nowrap gridui-u-composer--items-stretch\",\n inline: \"gridui-u-composer--grid gridui-u-composer--grid-cols-[minmax(0,1fr)_auto] gridui-u-composer--items-end\",\n },\n },\n defaultVariants: {\n layout: \"stacked\",\n },\n});\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Composer\n * @description Composer\n */\n\nimport { composerContext } from \"../shared/composer-context\";\nimport type { AttachmentItem } from \"../shared/types\";\nimport { composerStyles } from \"./style\";\nimport { InputGroup } from \"@gridui/input\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type ComponentPropsWithRef, type FC, useRef } from \"react\";\n\nexport type ComposerProps = Omit<ComponentPropsWithRef<\"div\">, \"onSubmit\"> & {\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly onSubmit: (value: string) => void;\n readonly onStop?: () => void;\n readonly busy?: boolean;\n readonly editableWhileBusy?: boolean;\n readonly submitWhileBusy?: boolean;\n readonly submitShortcut?: \"modifier-enter\" | \"enter\";\n readonly layout?: \"stacked\" | \"inline\";\n readonly disabled?: boolean;\n readonly readOnly?: boolean;\n readonly attachments?: readonly AttachmentItem[];\n};\n\nexport const Composer: FC<ComposerProps> = (props: ComposerProps) => {\n const { value, onValueChange, onSubmit, onStop, busy = false, editableWhileBusy = false,\n submitWhileBusy = false, submitShortcut = \"modifier-enter\", layout = \"stacked\",\n disabled = false, readOnly = false, attachments = [], children, className, ...restProps } = props;\n const input = useRef<HTMLTextAreaElement>(null);\n const submitButton = useRef<HTMLButtonElement>(null);\n const inputDisabled = disabled || (busy && !editableWhileBusy);\n const editingDisabled = inputDisabled || readOnly;\n const hasContent = value.trim().length > 0 || attachments.length > 0;\n const attachmentsReady = attachments.every(item => {\n return item.state === \"ready\";\n });\n const canSubmit = !disabled && !readOnly && (!busy || submitWhileBusy) && hasContent && attachmentsReady;\n const submit = () => {\n const element = input.current;\n if (!canSubmit || !element || !submitButton.current || submitButton.current.matches(\":disabled\")) {\n return;\n }\n if (element.reportValidity()) {\n onSubmit(value);\n }\n };\n\n return (<composerContext.Provider\n value={{\n attachments,\n layout,\n value,\n onValueChange,\n readOnly,\n inputDisabled,\n editingDisabled,\n disabled,\n submitShortcut,\n canSubmit,\n showStop: busy && !submitWhileBusy,\n onStop,\n input,\n submitButton,\n submit,\n }}\n >\n <InputGroup\n {...restProps}\n className={cn(composerStyles({ layout }), className)}\n >\n {children}\n </InputGroup>\n </composerContext.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerActions\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerActionsStyles = cva(\"gridui-u-composer--flex gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--justify-end gridui-u-composer--gap-gridui-8\");\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerActions\n * @description Composer Actions\n */\n\nimport { composerActionsStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type ComposerActionsProps = ComponentPropsWithRef<\"div\">;\n\nexport const ComposerActions: FC<ComposerActionsProps> = (props: ComposerActionsProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(composerActionsStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerAttachments\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerAttachmentsStyles = cva(\"\", {\n variants: {\n layout: {\n stacked: \"\",\n inline: \"gridui-u-composer--col-span-full\",\n },\n empty: {\n true: \"\",\n false: \"\",\n },\n removable: {\n true: \"\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n layout: \"inline\",\n empty: true,\n removable: false,\n className: \"gridui-u-composer--hidden\",\n },\n ],\n});\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerAttachments\n * @description Composer Attachments\n */\n\nimport { AttachmentList } from \"../attachment-list/attachment-list\";\nimport { useComposer } from \"../shared/composer-context\";\nimport type { AttachmentListOptions } from \"../shared/types\";\nimport { composerAttachmentsStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type ComposerAttachmentsProps = Omit<AttachmentListOptions, \"items\" | \"disabled\">;\n\nexport const ComposerAttachments: FC<ComposerAttachmentsProps> = (props: ComposerAttachmentsProps) => {\n const { attachments, editingDisabled, layout } = useComposer();\n const { className, onRemove, ...restProps } = props;\n return (<AttachmentList\n {...restProps}\n {...(onRemove ? { onRemove } : {})}\n className={cn(composerAttachmentsStyles({\n layout,\n empty: attachments.length === 0,\n removable: Boolean(onRemove),\n }), className)}\n items={attachments}\n disabled={editingDisabled}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerFilePicker\n * @description Composer File Picker\n */\n\nimport { useComposer } from \"../shared/composer-context\";\nimport { FilePicker, type FilePickerProps } from \"@gridui/file-picker\";\nimport { type FC, useId } from \"react\";\n\nexport type ComposerFilePickerProps = Omit<Extract<FilePickerProps, {\n multiple: true;\n}>, \"inputId\" | \"multiple\" | \"disabled\">;\n\nexport const ComposerFilePicker: FC<ComposerFilePickerProps> = (props: ComposerFilePickerProps) => {\n const { editingDisabled } = useComposer();\n const inputId = useId();\n return (<FilePicker\n {...props}\n inputId={inputId}\n multiple\n disabled={editingDisabled}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerInput\n * @description Composer Input\n */\n\nimport { useComposer } from \"../shared/composer-context\";\nimport { Textarea, type TextareaProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, type KeyboardEvent, useRef } from \"react\";\n\nexport type ComposerInputProps = Omit<TextareaProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\" | \"readOnly\">;\n\nexport const ComposerInput: FC<ComposerInputProps> = (props: ComposerInputProps) => {\n const { ref, onKeyDown, onCompositionStart, onCompositionEnd, maxRows, maxHeight, ...restProps } = props;\n const { input, value, onValueChange, inputDisabled, readOnly, submit, submitShortcut } = useComposer();\n const isComposing = useRef(false);\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || isComposing.current) {\n return;\n }\n let isSubmitShortcut = false;\n if (submitShortcut === \"enter\") {\n isSubmitShortcut = event.key === \"Enter\" && !event.shiftKey;\n } else {\n isSubmitShortcut = event.key === \"Enter\" && (event.ctrlKey || event.metaKey);\n }\n if (isSubmitShortcut) {\n event.preventDefault();\n submit();\n }\n };\n\n return (<Textarea\n autoSize\n {...(maxRows === undefined ? { maxHeight: maxHeight ?? 240 } : {\n maxRows,\n ...(maxHeight === undefined ? {} : { maxHeight }),\n })}\n {...restProps}\n ref={element => {\n input.current = element;\n const cleanup = typeof ref === \"function\" ? ref(element) : undefined;\n if (ref && typeof ref !== \"function\") {\n ref.current = element;\n }\n if (!element) {\n return;\n }\n return () => {\n input.current = null;\n if (typeof cleanup === \"function\") {\n cleanup();\n } else if (typeof ref === \"function\") {\n ref(null);\n } else if (ref) {\n ref.current = null;\n }\n };\n }}\n value={value}\n onValueChange={onValueChange}\n disabled={inputDisabled}\n readOnly={readOnly}\n onCompositionStart={event => {\n isComposing.current = true;\n onCompositionStart?.(event);\n }}\n onCompositionEnd={event => {\n isComposing.current = false;\n onCompositionEnd?.(event);\n }}\n onKeyDown={handleKeyDown}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerStop\n * @description Composer Stop\n */\n\nimport type { ComposerActionOptions } from \"../shared/composer-action-options\";\nimport { useComposer } from \"../shared/composer-context\";\nimport { Button } from \"@gridui/button\";\nimport type { FC } from \"react\";\n\nexport type ComposerStopProps = ComposerActionOptions;\n\nexport const ComposerStop: FC<ComposerStopProps> = (props: ComposerStopProps) => {\n const { disabled, onStop, showStop } = useComposer();\n if (!showStop) {\n return null;\n }\n const appearance = props.variant === undefined || props.variant === null ? {\n ...props,\n variant: \"secondary\" as const,\n } : props;\n return (<Button\n {...appearance}\n type=\"button\"\n disabled={disabled || !onStop}\n onClick={onStop}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerSubmit\n * @description Composer Submit\n */\n\nimport type { ComposerActionOptions } from \"../shared/composer-action-options\";\nimport { useComposer } from \"../shared/composer-context\";\nimport { Button } from \"@gridui/button\";\nimport { type FC, useImperativeHandle } from \"react\";\n\nexport type ComposerSubmitProps = ComposerActionOptions;\n\nexport const ComposerSubmit: FC<ComposerSubmitProps> = (props: ComposerSubmitProps) => {\n const { ref, ...restProps } = props;\n const { canSubmit, showStop, submit, submitButton } = useComposer();\n useImperativeHandle(ref, () => {\n return submitButton.current!;\n });\n if (showStop) {\n return null;\n }\n return (<Button\n {...restProps}\n ref={submitButton}\n type=\"button\"\n disabled={!canSubmit}\n onClick={submit}\n />);\n};\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI,
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Composer\n * @namespace AttachmentList\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const attachmentListStyles = cva(\"gridui-attachment-list gridui-u-composer--m-0 gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--list-none gridui-u-composer--flex-col gridui-u-composer--p-0 gridui-u-composer--focus:min-h-11\");\n\nexport const attachmentStyles = cva(\"gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--gap-gridui-8 gridui-u-composer--border-b gridui-u-composer--border-border gridui-u-composer--py-(--gridui-attachment-block) gridui-u-composer--data-[state=error]:text-status-danger-text\");\n\nexport const attachmentCopyStyles = cva(\"gridui-u-composer--flex gridui-u-composer--min-w-0 gridui-u-composer--flex-1 gridui-u-composer--flex-col gridui-u-composer--wrap-anywhere\");\n\nexport const attachmentMetaStyles = cva(\"gridui-u-composer--text-muted gridui-u-composer--type-caption\");\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace AttachmentList\n * @description Attachment List\n */\n\nimport type { AttachmentListOptions } from \"../shared/types\";\nimport { attachmentCopyStyles, attachmentListStyles, attachmentMetaStyles, attachmentStyles } from \"./style\";\nimport { Button } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type FC, useLayoutEffect, useRef } from \"react\";\n\nexport type AttachmentListProps = AttachmentListOptions;\n\nexport const AttachmentList: FC<AttachmentListProps> = (props: AttachmentListProps) => {\n const {\n items,\n density = \"comfortable\",\n label,\n removeLabel,\n onRemove,\n disabled = false,\n className,\n ref,\n ...restProps\n } = props;\n const buttons = useRef(new Map<string, HTMLButtonElement>());\n const pending = useRef<{\n id: string;\n index: number;\n element: HTMLButtonElement;\n } | null>(null);\n const list = useRef<HTMLUListElement | null>(null);\n useLayoutEffect(() => {\n const removed = pending.current;\n if (removed && !items.some(item => {\n return item.id === removed.id;\n })) {\n const document = removed.element.ownerDocument;\n const active = document.activeElement;\n if (active === removed.element || active === document.body) {\n const next = items[Math.min(removed.index, items.length - 1)];\n (next ? buttons.current.get(next.id) : list.current)?.focus();\n }\n pending.current = null;\n }\n }, [items]);\n return (<ul\n {...restProps}\n ref={element => {\n list.current = element;\n if (typeof ref === \"function\") {\n return ref(element);\n }\n if (ref) {\n ref.current = element;\n }\n }}\n aria-label={label}\n data-density={density}\n tabIndex={-1}\n className={cn(attachmentListStyles(), className)}\n >\n {items.map((item, index) => {\n return (<li\n key={item.id}\n className={attachmentStyles()}\n data-state={item.state}\n >\n <div\n className={attachmentCopyStyles()}\n >\n <span>\n {item.name}\n </span>\n <span\n className={attachmentMetaStyles()}\n >\n {item.description}\n </span>\n <span\n className={attachmentMetaStyles()}\n >\n {item.stateLabel}\n </span>\n </div>\n {onRemove && (<Button\n ref={element => {\n if (element) {\n buttons.current.set(item.id, element);\n } else {\n buttons.current.delete(item.id);\n }\n }}\n variant=\"quiet\"\n layout=\"icon\"\n aria-label={removeLabel(item)}\n title={removeLabel(item)}\n disabled={disabled}\n onBlur={event => {\n if (event.relatedTarget && pending.current?.element === event.currentTarget) {\n pending.current = null;\n }\n }}\n onClick={event => {\n pending.current = {\n id: item.id,\n index,\n element: event.currentTarget,\n };\n onRemove(item.id);\n }}\n >\n <span\n aria-hidden=\"true\"\n >\n \u00D7\n </span>\n </Button>)}\n </li>);\n })}\n </ul>);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Shared\n * @description Composer Context\n */\n\nimport type { Size } from \"@gridui/theme\";\nimport type { AttachmentItem } from \"./types\";\nimport { createContext, type RefObject, useContext } from \"react\";\n\nexport type ComposerContext = {\n readonly size: Size;\n readonly attachments: readonly AttachmentItem[];\n readonly layout: \"stacked\" | \"inline\";\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly readOnly: boolean;\n readonly inputDisabled: boolean;\n readonly editingDisabled: boolean;\n readonly disabled: boolean;\n readonly submitShortcut: \"modifier-enter\" | \"enter\";\n readonly canSubmit: boolean;\n readonly showStop: boolean;\n readonly onStop: (() => void) | undefined;\n readonly input: RefObject<HTMLTextAreaElement | null>;\n readonly submitButton: RefObject<HTMLButtonElement | null>;\n readonly submit: () => void;\n};\n\nexport const composerContext = createContext<ComposerContext | null>(null);\n\nexport const useComposer = (): ComposerContext => {\n const composer = useContext(composerContext);\n if (!composer) {\n throw new Error(\"Composer parts require a Composer.\");\n }\n return composer;\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Composer\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerStyles = cva(\"gridui-composer gridui-u-composer--min-w-0 gridui-u-composer--gap-(--gridui-composer-padding,var(--gridui-space-8)) gridui-u-composer--p-(--gridui-composer-padding,var(--gridui-space-8)) gridui-u-composer--text-foreground\", {\n variants: {\n layout: {\n stacked: \"gridui-u-composer--flex gridui-u-composer--flex-col gridui-u-composer--flex-nowrap gridui-u-composer--items-stretch\",\n inline: \"gridui-u-composer--grid gridui-u-composer--grid-cols-[minmax(0,1fr)_auto] gridui-u-composer--items-end\",\n },\n },\n defaultVariants: {\n layout: \"stacked\",\n },\n});\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace Composer\n * @description Composer\n */\n\nimport type { Size } from \"@gridui/theme\";\nimport { composerContext } from \"../shared/composer-context\";\nimport type { AttachmentItem } from \"../shared/types\";\nimport { composerStyles } from \"./style\";\nimport { InputGroup } from \"@gridui/input\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type ComponentPropsWithRef, type FC, useRef } from \"react\";\n\nexport type ComposerProps = Omit<ComponentPropsWithRef<\"div\">, \"onSubmit\"> & {\n readonly size?: Size;\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly onSubmit: (value: string) => void;\n readonly onStop?: () => void;\n readonly busy?: boolean;\n readonly editableWhileBusy?: boolean;\n readonly submitWhileBusy?: boolean;\n readonly submitShortcut?: \"modifier-enter\" | \"enter\";\n readonly layout?: \"stacked\" | \"inline\";\n readonly disabled?: boolean;\n readonly readOnly?: boolean;\n readonly attachments?: readonly AttachmentItem[];\n};\n\nexport const Composer: FC<ComposerProps> = (props: ComposerProps) => {\n const { size = \"medium\", value, onValueChange, onSubmit, onStop, busy = false, editableWhileBusy = false,\n submitWhileBusy = false, submitShortcut = \"modifier-enter\", layout = \"stacked\",\n disabled = false, readOnly = false, attachments = [], children, className, ...restProps } = props;\n const input = useRef<HTMLTextAreaElement>(null);\n const submitButton = useRef<HTMLButtonElement>(null);\n const inputDisabled = disabled || (busy && !editableWhileBusy);\n const editingDisabled = inputDisabled || readOnly;\n const hasContent = value.trim().length > 0 || attachments.length > 0;\n const attachmentsReady = attachments.every(item => {\n return item.state === \"ready\";\n });\n const canSubmit = !disabled && !readOnly && (!busy || submitWhileBusy) && hasContent && attachmentsReady;\n const submit = () => {\n const element = input.current;\n if (!canSubmit || !element || !submitButton.current || submitButton.current.matches(\":disabled\")) {\n return;\n }\n if (element.reportValidity()) {\n onSubmit(value);\n }\n };\n\n return (<composerContext.Provider\n value={{\n size,\n attachments,\n layout,\n value,\n onValueChange,\n readOnly,\n inputDisabled,\n editingDisabled,\n disabled,\n submitShortcut,\n canSubmit,\n showStop: busy && !submitWhileBusy,\n onStop,\n input,\n submitButton,\n submit,\n }}\n >\n <InputGroup\n size={size}\n {...restProps}\n className={cn(composerStyles({ layout }), className)}\n >\n {children}\n </InputGroup>\n </composerContext.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerActions\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerActionsStyles = cva(\"gridui-u-composer--flex gridui-u-composer--flex-wrap gridui-u-composer--items-center gridui-u-composer--justify-end gridui-u-composer--gap-gridui-8\");\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerActions\n * @description Composer Actions\n */\n\nimport { composerActionsStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type ComposerActionsProps = ComponentPropsWithRef<\"div\">;\n\nexport const ComposerActions: FC<ComposerActionsProps> = (props: ComposerActionsProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(composerActionsStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerAttachments\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const composerAttachmentsStyles = cva(\"\", {\n variants: {\n layout: {\n stacked: \"\",\n inline: \"gridui-u-composer--col-span-full\",\n },\n empty: {\n true: \"\",\n false: \"\",\n },\n removable: {\n true: \"\",\n false: \"\",\n },\n },\n compoundVariants: [\n {\n layout: \"inline\",\n empty: true,\n removable: false,\n className: \"gridui-u-composer--hidden\",\n },\n ],\n});\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerAttachments\n * @description Composer Attachments\n */\n\nimport { AttachmentList } from \"../attachment-list/attachment-list\";\nimport { useComposer } from \"../shared/composer-context\";\nimport type { AttachmentListOptions } from \"../shared/types\";\nimport { composerAttachmentsStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type ComposerAttachmentsProps = Omit<AttachmentListOptions, \"items\" | \"disabled\">;\n\nexport const ComposerAttachments: FC<ComposerAttachmentsProps> = (props: ComposerAttachmentsProps) => {\n const { attachments, editingDisabled, layout } = useComposer();\n const { className, onRemove, ...restProps } = props;\n return (<AttachmentList\n {...restProps}\n {...(onRemove ? { onRemove } : {})}\n className={cn(composerAttachmentsStyles({\n layout,\n empty: attachments.length === 0,\n removable: Boolean(onRemove),\n }), className)}\n items={attachments}\n disabled={editingDisabled}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerFilePicker\n * @description Composer File Picker\n */\n\nimport { useComposer } from \"../shared/composer-context\";\nimport { FilePicker, type FilePickerProps } from \"@gridui/file-picker\";\nimport { type FC, useId } from \"react\";\n\nexport type ComposerFilePickerProps = Omit<Extract<FilePickerProps, {\n multiple: true;\n}>, \"inputId\" | \"multiple\" | \"disabled\">;\n\nexport const ComposerFilePicker: FC<ComposerFilePickerProps> = (props: ComposerFilePickerProps) => {\n const { size, editingDisabled } = useComposer();\n const inputId = useId();\n return (<FilePicker\n {...props}\n size={props.size ?? size}\n inputId={inputId}\n multiple\n disabled={editingDisabled}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerInput\n * @description Composer Input\n */\n\nimport { useComposer } from \"../shared/composer-context\";\nimport { Textarea, type TextareaProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, type KeyboardEvent, useRef } from \"react\";\n\nexport type ComposerInputProps = Omit<TextareaProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\" | \"readOnly\">;\n\nexport const ComposerInput: FC<ComposerInputProps> = (props: ComposerInputProps) => {\n const { ref, onKeyDown, onCompositionStart, onCompositionEnd, maxRows, maxHeight, ...restProps } = props;\n const { size, input, value, onValueChange, inputDisabled, readOnly, submit, submitShortcut } = useComposer();\n const isComposing = useRef(false);\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || isComposing.current) {\n return;\n }\n let isSubmitShortcut = false;\n if (submitShortcut === \"enter\") {\n isSubmitShortcut = event.key === \"Enter\" && !event.shiftKey;\n } else {\n isSubmitShortcut = event.key === \"Enter\" && (event.ctrlKey || event.metaKey);\n }\n if (isSubmitShortcut) {\n event.preventDefault();\n submit();\n }\n };\n\n return (<Textarea\n autoSize\n {...(maxRows === undefined ? { maxHeight: maxHeight ?? 240 } : {\n maxRows,\n ...(maxHeight === undefined ? {} : { maxHeight }),\n })}\n {...restProps}\n size={restProps.size ?? size}\n ref={element => {\n input.current = element;\n const cleanup = typeof ref === \"function\" ? ref(element) : undefined;\n if (ref && typeof ref !== \"function\") {\n ref.current = element;\n }\n if (!element) {\n return;\n }\n return () => {\n input.current = null;\n if (typeof cleanup === \"function\") {\n cleanup();\n } else if (typeof ref === \"function\") {\n ref(null);\n } else if (ref) {\n ref.current = null;\n }\n };\n }}\n value={value}\n onValueChange={onValueChange}\n disabled={inputDisabled}\n readOnly={readOnly}\n onCompositionStart={event => {\n isComposing.current = true;\n onCompositionStart?.(event);\n }}\n onCompositionEnd={event => {\n isComposing.current = false;\n onCompositionEnd?.(event);\n }}\n onKeyDown={handleKeyDown}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerStop\n * @description Composer Stop\n */\n\nimport type { ComposerActionOptions } from \"../shared/composer-action-options\";\nimport { useComposer } from \"../shared/composer-context\";\nimport { Button } from \"@gridui/button\";\nimport type { FC } from \"react\";\n\nexport type ComposerStopProps = ComposerActionOptions;\n\nexport const ComposerStop: FC<ComposerStopProps> = (props: ComposerStopProps) => {\n const { size, disabled, onStop, showStop } = useComposer();\n if (!showStop) {\n return null;\n }\n const appearance = props.variant === undefined || props.variant === null ? {\n ...props,\n variant: \"secondary\" as const,\n } : props;\n return (<Button\n {...appearance}\n size={props.size ?? size}\n type=\"button\"\n disabled={disabled || !onStop}\n onClick={onStop}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Composer\n * @namespace ComposerSubmit\n * @description Composer Submit\n */\n\nimport type { ComposerActionOptions } from \"../shared/composer-action-options\";\nimport { useComposer } from \"../shared/composer-context\";\nimport { Button } from \"@gridui/button\";\nimport { type FC, useImperativeHandle } from \"react\";\n\nexport type ComposerSubmitProps = ComposerActionOptions;\n\nexport const ComposerSubmit: FC<ComposerSubmitProps> = (props: ComposerSubmitProps) => {\n const { ref, ...restProps } = props;\n const { size, canSubmit, showStop, submit, submitButton } = useComposer();\n useImperativeHandle(ref, () => {\n return submitButton.current!;\n });\n if (showStop) {\n return null;\n }\n return (<Button\n {...restProps}\n size={props.size ?? size}\n ref={submitButton}\n type=\"button\"\n disabled={!canSubmit}\n onClick={submit}\n />);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,WAAW;AAEb,IAAM,uBAAuB,IAAI,oNAAoN;AAErP,IAAM,mBAAmB,IAAI,8TAA8T;AAE3V,IAAM,uBAAuB,IAAI,2IAA2I;AAE5K,IAAM,uBAAuB,IAAI,+DAA+D;;;ACNvG,SAAS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AAAA,MAC5B;AAAA,MACA,WAAW;AAAA;AAAA,EACf;AACJ;;;ACpEA,SAAS,UAAAC,eAAc;AAcX,gBAAAC,YAAA;AATL,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM,EAAE,MAAM,UAAU,QAAQ,SAAS,IAAI,YAAY;AACzD,MAAI,CAAC,UAAU;AACX,WAAO;AAAA,EACX;AACA,QAAM,aAAa,MAAM,YAAY,UAAa,MAAM,YAAY,OAAO;AAAA,IACvE,GAAG;AAAA,IACH,SAAS;AAAA,EACb,IAAI;AACJ,SAAQ,gBAAAA;AAAA,IAACD;AAAA,IAAA;AAAA,MACJ,GAAG;AAAA,MACJ,MAAM,MAAM,QAAQ;AAAA,MACpB,MAAK;AAAA,MACL,UAAU,YAAY,CAAC;AAAA,MACvB,SAAS;AAAA;AAAA,EACb;AACJ;;;ACrBA,SAAS,UAAAE,eAAc;AACvB,SAAkB,2BAA2B;AAajC,gBAAAC,YAAA;AATL,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,EAAE,KAAK,GAAG,UAAU,IAAI;AAC9B,QAAM,EAAE,MAAM,WAAW,UAAU,QAAQ,aAAa,IAAI,YAAY;AACxE,sBAAoB,KAAK,MAAM;AAC3B,WAAO,aAAa;AAAA,EACxB,CAAC;AACD,MAAI,UAAU;AACV,WAAO;AAAA,EACX;AACA,SAAQ,gBAAAA;AAAA,IAACD;AAAA,IAAA;AAAA,MACJ,GAAG;AAAA,MACJ,MAAM,MAAM,QAAQ;AAAA,MACpB,KAAK;AAAA,MACL,MAAK;AAAA,MACL,UAAU,CAAC;AAAA,MACX,SAAS;AAAA;AAAA,EACb;AACJ;",
|
|
6
6
|
"names": ["cva", "cn", "useRef", "jsx", "cva", "cn", "jsx", "cva", "cn", "jsx", "jsx", "useRef", "jsx", "Button", "jsx", "Button", "jsx"]
|
|
7
7
|
}
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* @namespace Shared
|
|
5
5
|
* @description Composer Context
|
|
6
6
|
*/
|
|
7
|
+
import type { Size } from "@gridui/theme";
|
|
7
8
|
import type { AttachmentItem } from "./types";
|
|
8
9
|
import { type RefObject } from "react";
|
|
9
10
|
export type ComposerContext = {
|
|
11
|
+
readonly size: Size;
|
|
10
12
|
readonly attachments: readonly AttachmentItem[];
|
|
11
13
|
readonly layout: "stacked" | "inline";
|
|
12
14
|
readonly value: string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @namespace Shared
|
|
5
5
|
* @description Types
|
|
6
6
|
*/
|
|
7
|
+
import type { Density } from "@gridui/theme";
|
|
7
8
|
import type { ComponentPropsWithRef } from "react";
|
|
8
9
|
export type AttachmentItem = {
|
|
9
10
|
readonly id: string;
|
|
@@ -13,6 +14,7 @@ export type AttachmentItem = {
|
|
|
13
14
|
readonly description?: string;
|
|
14
15
|
};
|
|
15
16
|
export type AttachmentListOptions = Omit<ComponentPropsWithRef<"ul">, "children"> & {
|
|
17
|
+
readonly density?: Density;
|
|
16
18
|
readonly items: readonly AttachmentItem[];
|
|
17
19
|
readonly label: string;
|
|
18
20
|
readonly removeLabel: (item: AttachmentItem) => string;
|
package/dist/styles.css
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
|
-
@layer theme {
|
|
5
|
-
:root, :host {
|
|
6
|
-
--spacing: 0.25rem;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
4
|
@layer utilities {
|
|
10
5
|
.gridui-u-button--pointer-events-none {
|
|
11
6
|
pointer-events: none;
|
|
@@ -13,24 +8,13 @@
|
|
|
13
8
|
.gridui-u-button--inline-flex {
|
|
14
9
|
display: inline-flex;
|
|
15
10
|
}
|
|
11
|
+
.gridui-u-button--size-\(--_gridui-button-min\) {
|
|
12
|
+
width: var(--_gridui-button-min);
|
|
13
|
+
height: var(--_gridui-button-min);
|
|
14
|
+
}
|
|
16
15
|
.gridui-u-button--h-full {
|
|
17
16
|
height: 100%;
|
|
18
17
|
}
|
|
19
|
-
.gridui-u-button--h-gridui-control {
|
|
20
|
-
height: var(--gridui-control-min-height);
|
|
21
|
-
}
|
|
22
|
-
.gridui-u-button--min-h-18 {
|
|
23
|
-
min-height: calc(var(--spacing) * 18);
|
|
24
|
-
}
|
|
25
|
-
.gridui-u-button--min-h-gridui-control {
|
|
26
|
-
min-height: var(--gridui-control-min-height);
|
|
27
|
-
}
|
|
28
|
-
.gridui-u-button--min-h-gridui-control-large {
|
|
29
|
-
min-height: var(--gridui-control-min-height-large);
|
|
30
|
-
}
|
|
31
|
-
.gridui-u-button--min-h-gridui-control-small {
|
|
32
|
-
min-height: var(--gridui-control-min-height-small);
|
|
33
|
-
}
|
|
34
18
|
.gridui-u-button--w-fit {
|
|
35
19
|
width: fit-content;
|
|
36
20
|
}
|
|
@@ -40,14 +24,14 @@
|
|
|
40
24
|
.gridui-u-button--w-gridui-64 {
|
|
41
25
|
width: var(--gridui-space-64);
|
|
42
26
|
}
|
|
43
|
-
.gridui-u-button--w-gridui-control {
|
|
44
|
-
width: var(--gridui-control-min-height);
|
|
45
|
-
}
|
|
46
27
|
.gridui-u-button--w-gridui-control-large {
|
|
47
|
-
width: var(--gridui-control-min-height-large);
|
|
28
|
+
width: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
29
|
+
}
|
|
30
|
+
.gridui-u-button--w-gridui-control-medium {
|
|
31
|
+
width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
48
32
|
}
|
|
49
33
|
.gridui-u-button--w-gridui-control-small {
|
|
50
|
-
width: var(--gridui-control-min-height-small);
|
|
34
|
+
width: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
51
35
|
}
|
|
52
36
|
.gridui-u-button--max-w-full {
|
|
53
37
|
max-width: 100%;
|
|
@@ -253,35 +237,10 @@
|
|
|
253
237
|
.gridui-u-button--\[\&_svg\]\:shrink-0 svg {
|
|
254
238
|
flex-shrink: 0;
|
|
255
239
|
}
|
|
256
|
-
.gridui-u-button--\[\&\.gridui-button-extra-large\]\:h-18.gridui-button-extra-large {
|
|
257
|
-
height: calc(var(--spacing) * 18);
|
|
258
|
-
}
|
|
259
|
-
.gridui-u-button--\[\&\.gridui-button-extra-large\]\:w-18.gridui-button-extra-large {
|
|
260
|
-
width: calc(var(--spacing) * 18);
|
|
261
|
-
}
|
|
262
|
-
.gridui-u-button--\[\&\.gridui-button-large\]\:h-gridui-control-large.gridui-button-large {
|
|
263
|
-
height: var(--gridui-control-min-height-large);
|
|
264
|
-
}
|
|
265
|
-
.gridui-u-button--\[\&\.gridui-button-large\]\:w-gridui-control-large.gridui-button-large {
|
|
266
|
-
width: var(--gridui-control-min-height-large);
|
|
267
|
-
}
|
|
268
|
-
.gridui-u-button--\[\&\.gridui-button-small\]\:h-gridui-control-small.gridui-button-small {
|
|
269
|
-
height: var(--gridui-control-min-height-small);
|
|
270
|
-
}
|
|
271
|
-
.gridui-u-button--\[\&\.gridui-button-small\]\:w-gridui-control-small.gridui-button-small {
|
|
272
|
-
width: var(--gridui-control-min-height-small);
|
|
273
|
-
}
|
|
274
|
-
@media (pointer: coarse) {
|
|
275
|
-
.gridui-u-button--pointer-coarse\:\[\&\.gridui-button-small\]\:h-gridui-control.gridui-button-small {
|
|
276
|
-
height: var(--gridui-control-min-height);
|
|
277
|
-
}
|
|
278
|
-
.gridui-u-button--pointer-coarse\:\[\&\.gridui-button-small\]\:w-gridui-control.gridui-button-small {
|
|
279
|
-
width: var(--gridui-control-min-height);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
240
|
}
|
|
283
241
|
@layer components {
|
|
284
242
|
.gridui-button {
|
|
243
|
+
min-height: var(--_gridui-button-min);
|
|
285
244
|
border: 1px solid transparent;
|
|
286
245
|
}
|
|
287
246
|
.gridui-button-cell {
|
|
@@ -327,8 +286,27 @@
|
|
|
327
286
|
transform: var(--gridui-motion-transform, translate(calc(-1 * var(--gridui-space-4)), calc(-1 * var(--gridui-space-4))));
|
|
328
287
|
}
|
|
329
288
|
}
|
|
289
|
+
.gridui-button-medium {
|
|
290
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
291
|
+
padding-block: var(--gridui-space-8);
|
|
292
|
+
padding-inline: var(--gridui-space-16);
|
|
293
|
+
}
|
|
294
|
+
.gridui-button-small {
|
|
295
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
296
|
+
padding-block: var(--gridui-space-4);
|
|
297
|
+
padding-inline: var(--gridui-space-8);
|
|
298
|
+
}
|
|
299
|
+
.gridui-button-large {
|
|
300
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
301
|
+
padding-block: var(--gridui-space-8);
|
|
302
|
+
padding-inline: var(--gridui-space-24);
|
|
303
|
+
}
|
|
304
|
+
.gridui-button-extra-large {
|
|
305
|
+
--_gridui-button-min: max(var(--gridui-control-min-height-extra-large), var(--gridui-target-min-size));
|
|
306
|
+
padding-block: var(--gridui-space-16);
|
|
307
|
+
padding-inline: var(--gridui-space-24);
|
|
308
|
+
}
|
|
330
309
|
.gridui-button-group {
|
|
331
|
-
--gridui-button-group-padding-block: var(--gridui-space-24);
|
|
332
310
|
container: gridui-button-group / inline-size;
|
|
333
311
|
min-width: 0;
|
|
334
312
|
}
|
|
@@ -371,12 +349,19 @@
|
|
|
371
349
|
min-width: 0;
|
|
372
350
|
}
|
|
373
351
|
.gridui-button-group-items[data-layout="cells"] > [data-gridui-button-group-item] {
|
|
374
|
-
|
|
375
|
-
padding: var(--gridui-button-group-padding-block) var(--gridui-space-24);
|
|
352
|
+
padding-block: var(--gridui-button-group-padding-block, var(--_gridui-button-group-block, var(--gridui-space-8)));
|
|
376
353
|
border: 0;
|
|
377
354
|
border-radius: 0;
|
|
378
355
|
}
|
|
379
356
|
}
|
|
357
|
+
@layer components {
|
|
358
|
+
.gridui-button-group-items > [data-size="small"] {
|
|
359
|
+
--_gridui-button-group-block: var(--gridui-space-4);
|
|
360
|
+
}
|
|
361
|
+
.gridui-button-group-items > [data-size="extra-large"] {
|
|
362
|
+
--_gridui-button-group-block: var(--gridui-space-16);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
380
365
|
@property --tw-border-style {
|
|
381
366
|
syntax: "*";
|
|
382
367
|
inherits: false;
|
|
@@ -505,11 +490,6 @@
|
|
|
505
490
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
506
491
|
@layer properties;
|
|
507
492
|
@layer theme, base, components, utilities;
|
|
508
|
-
@layer theme {
|
|
509
|
-
:root, :host {
|
|
510
|
-
--spacing: 0.25rem;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
493
|
@layer utilities {
|
|
514
494
|
.gridui-u-overlay--z-\(--gridui-z-popover\) {
|
|
515
495
|
z-index: var(--gridui-z-popover);
|
|
@@ -524,9 +504,6 @@
|
|
|
524
504
|
width: var(--gridui-space-16);
|
|
525
505
|
height: var(--gridui-space-16);
|
|
526
506
|
}
|
|
527
|
-
.gridui-u-overlay--min-h-10 {
|
|
528
|
-
min-height: calc(var(--spacing) * 10);
|
|
529
|
-
}
|
|
530
507
|
.gridui-u-overlay--min-w-0 {
|
|
531
508
|
min-width: 0px;
|
|
532
509
|
}
|
|
@@ -565,15 +542,9 @@
|
|
|
565
542
|
.gridui-u-overlay--p-0 {
|
|
566
543
|
padding: 0px;
|
|
567
544
|
}
|
|
568
|
-
.gridui-u-overlay--p-gridui-8 {
|
|
569
|
-
padding: var(--gridui-space-8);
|
|
570
|
-
}
|
|
571
545
|
.gridui-u-overlay--px-gridui-8 {
|
|
572
546
|
padding-inline: var(--gridui-space-8);
|
|
573
547
|
}
|
|
574
|
-
.gridui-u-overlay--py-gridui-8 {
|
|
575
|
-
padding-block: var(--gridui-space-8);
|
|
576
|
-
}
|
|
577
548
|
.gridui-u-overlay--type-data {
|
|
578
549
|
font: var(--gridui-type-data);
|
|
579
550
|
font-family: var(--gridui-font-body);
|
|
@@ -680,6 +651,25 @@
|
|
|
680
651
|
animation: none;
|
|
681
652
|
}
|
|
682
653
|
}
|
|
654
|
+
.gridui-overlay-list {
|
|
655
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
656
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
657
|
+
}
|
|
658
|
+
.gridui-overlay-density-compact {
|
|
659
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-small);
|
|
660
|
+
--gridui-overlay-row-padding: var(--gridui-space-4);
|
|
661
|
+
}
|
|
662
|
+
.gridui-overlay-density-comfortable {
|
|
663
|
+
--gridui-overlay-row-min: var(--gridui-control-min-height-medium);
|
|
664
|
+
--gridui-overlay-row-padding: var(--gridui-space-8);
|
|
665
|
+
}
|
|
666
|
+
.gridui-overlay-list-item {
|
|
667
|
+
min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
|
|
668
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
669
|
+
}
|
|
670
|
+
.gridui-overlay-list-label {
|
|
671
|
+
padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
|
|
672
|
+
}
|
|
683
673
|
}
|
|
684
674
|
@property --tw-border-style {
|
|
685
675
|
syntax: "*";
|
|
@@ -704,11 +694,14 @@
|
|
|
704
694
|
.gridui-u-input--inline-flex {
|
|
705
695
|
display: inline-flex;
|
|
706
696
|
}
|
|
707
|
-
.gridui-u-input--min-h-gridui-control {
|
|
708
|
-
min-height: var(--gridui-control-min-height);
|
|
697
|
+
.gridui-u-input--min-h-gridui-control-large {
|
|
698
|
+
min-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
699
|
+
}
|
|
700
|
+
.gridui-u-input--min-h-gridui-control-medium {
|
|
701
|
+
min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
709
702
|
}
|
|
710
703
|
.gridui-u-input--min-h-gridui-control-small {
|
|
711
|
-
min-height: var(--gridui-control-min-height-small);
|
|
704
|
+
min-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
712
705
|
}
|
|
713
706
|
.gridui-u-input--w-0 {
|
|
714
707
|
width: 0px;
|
|
@@ -767,9 +760,15 @@
|
|
|
767
760
|
.gridui-u-input--px-gridui-8 {
|
|
768
761
|
padding-inline: var(--gridui-space-8);
|
|
769
762
|
}
|
|
763
|
+
.gridui-u-input--px-gridui-16 {
|
|
764
|
+
padding-inline: var(--gridui-space-16);
|
|
765
|
+
}
|
|
770
766
|
.gridui-u-input--py-gridui-4 {
|
|
771
767
|
padding-block: var(--gridui-space-4);
|
|
772
768
|
}
|
|
769
|
+
.gridui-u-input--py-gridui-8 {
|
|
770
|
+
padding-block: var(--gridui-space-8);
|
|
771
|
+
}
|
|
773
772
|
.gridui-u-input--type-input {
|
|
774
773
|
font: var(--gridui-type-input);
|
|
775
774
|
font-family: var(--gridui-font-body);
|
|
@@ -783,6 +782,21 @@
|
|
|
783
782
|
.gridui-u-input--text-foreground {
|
|
784
783
|
color: var(--gridui-foreground);
|
|
785
784
|
}
|
|
785
|
+
.gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size\)\] {
|
|
786
|
+
--gridui-control-icon: var(--gridui-icon-size);
|
|
787
|
+
}
|
|
788
|
+
.gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size-large\)\] {
|
|
789
|
+
--gridui-control-icon: var(--gridui-icon-size-large);
|
|
790
|
+
}
|
|
791
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-large\)\,var\(--gridui-target-min-size\)\)\] {
|
|
792
|
+
--gridui-control-size: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
793
|
+
}
|
|
794
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-medium\)\,var\(--gridui-target-min-size\)\)\] {
|
|
795
|
+
--gridui-control-size: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
796
|
+
}
|
|
797
|
+
.gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-small\)\,var\(--gridui-target-min-size\)\)\] {
|
|
798
|
+
--gridui-control-size: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
799
|
+
}
|
|
786
800
|
.gridui-u-input--disabled\:cursor-not-allowed:disabled {
|
|
787
801
|
cursor: not-allowed;
|
|
788
802
|
}
|
|
@@ -792,6 +806,10 @@
|
|
|
792
806
|
.gridui-u-input--aria-invalid\:border-status-danger-border[aria-invalid="true"] {
|
|
793
807
|
border-color: var(--gridui-status-danger-border);
|
|
794
808
|
}
|
|
809
|
+
.gridui-u-input--\[\&_svg\]\:size-\(--gridui-control-icon\) svg {
|
|
810
|
+
width: var(--gridui-control-icon);
|
|
811
|
+
height: var(--gridui-control-icon);
|
|
812
|
+
}
|
|
795
813
|
.gridui-u-input--\[\&\>svg\]\:size-gridui-16 > svg {
|
|
796
814
|
width: var(--gridui-space-16);
|
|
797
815
|
height: var(--gridui-space-16);
|
|
@@ -799,7 +817,7 @@
|
|
|
799
817
|
}
|
|
800
818
|
@layer components {
|
|
801
819
|
.gridui-input-group {
|
|
802
|
-
--_gridui-input-height: var(--gridui-control-min-height);
|
|
820
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
803
821
|
position: relative;
|
|
804
822
|
display: flex;
|
|
805
823
|
flex-wrap: wrap;
|
|
@@ -812,8 +830,8 @@
|
|
|
812
830
|
border-radius: var(--gridui-control-radius);
|
|
813
831
|
color: var(--gridui-foreground);
|
|
814
832
|
background: var(--gridui-background);
|
|
815
|
-
&[data-
|
|
816
|
-
--_gridui-input-height: var(--gridui-control-min-height-small);
|
|
833
|
+
&[data-size="small"] {
|
|
834
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
817
835
|
}
|
|
818
836
|
> .gridui-control {
|
|
819
837
|
flex: 1;
|
|
@@ -869,9 +887,12 @@
|
|
|
869
887
|
.gridui-input-group-button {
|
|
870
888
|
flex: none;
|
|
871
889
|
}
|
|
890
|
+
.gridui-input-group[data-size="large"] {
|
|
891
|
+
--_gridui-input-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
892
|
+
}
|
|
872
893
|
.gridui-textarea-frame {
|
|
873
894
|
--_gridui-textarea-padding: var(--gridui-space-8);
|
|
874
|
-
--_gridui-textarea-control-minimum: var(--gridui-control-min-height);
|
|
895
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
875
896
|
--_gridui-textarea-resize-height: 0px;
|
|
876
897
|
--_gridui-textarea-footer-height: 0px;
|
|
877
898
|
--_gridui-textarea-border: 2px;
|
|
@@ -882,9 +903,9 @@
|
|
|
882
903
|
flex-direction: column;
|
|
883
904
|
min-height: calc(var(--_gridui-textarea-min-body) + var(--_gridui-textarea-chrome));
|
|
884
905
|
padding: 0;
|
|
885
|
-
&[data-
|
|
906
|
+
&[data-size="small"] {
|
|
886
907
|
--_gridui-textarea-padding: var(--gridui-space-4);
|
|
887
|
-
--_gridui-textarea-control-minimum: var(--gridui-control-min-height-small);
|
|
908
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
|
|
888
909
|
}
|
|
889
910
|
&[data-grouped] {
|
|
890
911
|
--_gridui-textarea-border: 0px;
|
|
@@ -896,7 +917,7 @@
|
|
|
896
917
|
--_gridui-textarea-resize-height: var(--gridui-space-32);
|
|
897
918
|
}
|
|
898
919
|
&:is([data-resize-handle="footer"], [data-footer]) {
|
|
899
|
-
--_gridui-textarea-footer-height: var(--gridui-control-min-height);
|
|
920
|
+
--_gridui-textarea-footer-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
900
921
|
}
|
|
901
922
|
&[data-max-rows] {
|
|
902
923
|
max-height: calc(var(--_gridui-textarea-max-rows) * 1lh + 2 * var(--_gridui-textarea-padding) + var(--_gridui-textarea-chrome));
|
|
@@ -952,7 +973,7 @@
|
|
|
952
973
|
display: flex;
|
|
953
974
|
flex: none;
|
|
954
975
|
align-items: stretch;
|
|
955
|
-
min-height: var(--gridui-control-min-height);
|
|
976
|
+
min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
956
977
|
border-top: 1px solid;
|
|
957
978
|
border-color: inherit;
|
|
958
979
|
background: var(--gridui-surface);
|
|
@@ -972,7 +993,7 @@
|
|
|
972
993
|
flex: none;
|
|
973
994
|
align-items: center;
|
|
974
995
|
justify-content: center;
|
|
975
|
-
width: var(--gridui-control-min-height);
|
|
996
|
+
width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
976
997
|
margin: 0;
|
|
977
998
|
padding: 0;
|
|
978
999
|
border: 0;
|
|
@@ -1011,9 +1032,12 @@
|
|
|
1011
1032
|
}
|
|
1012
1033
|
@media (pointer: coarse) {
|
|
1013
1034
|
.gridui-textarea-frame:is([data-resize-handle="corner"], [data-resize-handle="edge"]) {
|
|
1014
|
-
--_gridui-textarea-resize-height: var(--gridui-control-min-height);
|
|
1035
|
+
--_gridui-textarea-resize-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
|
|
1015
1036
|
}
|
|
1016
1037
|
}
|
|
1038
|
+
.gridui-textarea-frame[data-size="large"] {
|
|
1039
|
+
--_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
|
|
1040
|
+
}
|
|
1017
1041
|
.gridui-input-group > input[type="search"]::-webkit-search-cancel-button {
|
|
1018
1042
|
appearance: none;
|
|
1019
1043
|
}
|
|
@@ -1302,6 +1326,9 @@
|
|
|
1302
1326
|
.gridui-u-composer--justify-end {
|
|
1303
1327
|
justify-content: flex-end;
|
|
1304
1328
|
}
|
|
1329
|
+
.gridui-u-composer--gap-\(--gridui-composer-padding\,var\(--gridui-space-8\)\) {
|
|
1330
|
+
gap: var(--gridui-composer-padding,var(--gridui-space-8));
|
|
1331
|
+
}
|
|
1305
1332
|
.gridui-u-composer--gap-gridui-8 {
|
|
1306
1333
|
gap: var(--gridui-space-8);
|
|
1307
1334
|
}
|
|
@@ -1312,14 +1339,14 @@
|
|
|
1312
1339
|
.gridui-u-composer--border-border {
|
|
1313
1340
|
border-color: var(--gridui-border);
|
|
1314
1341
|
}
|
|
1342
|
+
.gridui-u-composer--p-\(--gridui-composer-padding\,var\(--gridui-space-8\)\) {
|
|
1343
|
+
padding: var(--gridui-composer-padding,var(--gridui-space-8));
|
|
1344
|
+
}
|
|
1315
1345
|
.gridui-u-composer--p-0 {
|
|
1316
1346
|
padding: 0px;
|
|
1317
1347
|
}
|
|
1318
|
-
.gridui-u-composer--
|
|
1319
|
-
padding: var(--gridui-
|
|
1320
|
-
}
|
|
1321
|
-
.gridui-u-composer--py-gridui-8 {
|
|
1322
|
-
padding-block: var(--gridui-space-8);
|
|
1348
|
+
.gridui-u-composer--py-\(--gridui-attachment-block\) {
|
|
1349
|
+
padding-block: var(--gridui-attachment-block);
|
|
1323
1350
|
}
|
|
1324
1351
|
.gridui-u-composer--type-caption {
|
|
1325
1352
|
font: var(--gridui-type-caption);
|
|
@@ -1342,6 +1369,20 @@
|
|
|
1342
1369
|
color: var(--gridui-status-danger-text);
|
|
1343
1370
|
}
|
|
1344
1371
|
}
|
|
1372
|
+
@layer components {
|
|
1373
|
+
.gridui-input-group[data-size="small"].gridui-composer {
|
|
1374
|
+
--gridui-composer-padding: var(--gridui-space-4);
|
|
1375
|
+
}
|
|
1376
|
+
.gridui-input-group[data-size="large"].gridui-composer {
|
|
1377
|
+
--gridui-composer-padding: var(--gridui-space-12);
|
|
1378
|
+
}
|
|
1379
|
+
.gridui-attachment-list {
|
|
1380
|
+
--gridui-attachment-block: var(--gridui-space-8);
|
|
1381
|
+
}
|
|
1382
|
+
.gridui-attachment-list[data-density="compact"] {
|
|
1383
|
+
--gridui-attachment-block: var(--gridui-space-4);
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1345
1386
|
@property --tw-border-style {
|
|
1346
1387
|
syntax: "*";
|
|
1347
1388
|
inherits: false;
|
package/dist/styles.local.css
CHANGED
|
@@ -55,6 +55,9 @@
|
|
|
55
55
|
.gridui-u-composer--justify-end {
|
|
56
56
|
justify-content: flex-end;
|
|
57
57
|
}
|
|
58
|
+
.gridui-u-composer--gap-\(--gridui-composer-padding\,var\(--gridui-space-8\)\) {
|
|
59
|
+
gap: var(--gridui-composer-padding,var(--gridui-space-8));
|
|
60
|
+
}
|
|
58
61
|
.gridui-u-composer--gap-gridui-8 {
|
|
59
62
|
gap: var(--gridui-space-8);
|
|
60
63
|
}
|
|
@@ -65,14 +68,14 @@
|
|
|
65
68
|
.gridui-u-composer--border-border {
|
|
66
69
|
border-color: var(--gridui-border);
|
|
67
70
|
}
|
|
71
|
+
.gridui-u-composer--p-\(--gridui-composer-padding\,var\(--gridui-space-8\)\) {
|
|
72
|
+
padding: var(--gridui-composer-padding,var(--gridui-space-8));
|
|
73
|
+
}
|
|
68
74
|
.gridui-u-composer--p-0 {
|
|
69
75
|
padding: 0px;
|
|
70
76
|
}
|
|
71
|
-
.gridui-u-composer--
|
|
72
|
-
padding: var(--gridui-
|
|
73
|
-
}
|
|
74
|
-
.gridui-u-composer--py-gridui-8 {
|
|
75
|
-
padding-block: var(--gridui-space-8);
|
|
77
|
+
.gridui-u-composer--py-\(--gridui-attachment-block\) {
|
|
78
|
+
padding-block: var(--gridui-attachment-block);
|
|
76
79
|
}
|
|
77
80
|
.gridui-u-composer--type-caption {
|
|
78
81
|
font: var(--gridui-type-caption);
|
|
@@ -95,6 +98,20 @@
|
|
|
95
98
|
color: var(--gridui-status-danger-text);
|
|
96
99
|
}
|
|
97
100
|
}
|
|
101
|
+
@layer components {
|
|
102
|
+
.gridui-input-group[data-size="small"].gridui-composer {
|
|
103
|
+
--gridui-composer-padding: var(--gridui-space-4);
|
|
104
|
+
}
|
|
105
|
+
.gridui-input-group[data-size="large"].gridui-composer {
|
|
106
|
+
--gridui-composer-padding: var(--gridui-space-12);
|
|
107
|
+
}
|
|
108
|
+
.gridui-attachment-list {
|
|
109
|
+
--gridui-attachment-block: var(--gridui-space-8);
|
|
110
|
+
}
|
|
111
|
+
.gridui-attachment-list[data-density="compact"] {
|
|
112
|
+
--gridui-attachment-block: var(--gridui-space-4);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
98
115
|
@property --tw-border-style {
|
|
99
116
|
syntax: "*";
|
|
100
117
|
inherits: false;
|
package/docs/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/composer",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"category": "dashboard",
|
|
6
6
|
"description": "GridUI React composer",
|
|
7
7
|
"usage": "Button and keyboard submission share the textarea's native constraint validation, including `required`, `minLength`, and custom validity. Invalid enabled inputs report their validation message and retain focus. Textarea and submit button refs are forwarded through their respective props. A disabled fieldset blocks both submission paths.",
|
|
@@ -47,6 +47,12 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
47
47
|
|
|
48
48
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
49
49
|
|
|
50
|
+
### density
|
|
51
|
+
|
|
52
|
+
``Density | undefined`` · Optional
|
|
53
|
+
|
|
54
|
+
Default: ``"comfortable"``
|
|
55
|
+
|
|
50
56
|
### items
|
|
51
57
|
|
|
52
58
|
``readonly AttachmentItem[]`` · Required
|
|
@@ -53,6 +53,10 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
53
53
|
|
|
54
54
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
55
55
|
|
|
56
|
+
### density
|
|
57
|
+
|
|
58
|
+
``Density | undefined`` · Optional
|
|
59
|
+
|
|
56
60
|
### removeLabel
|
|
57
61
|
|
|
58
62
|
``(item: AttachmentItem) => string`` · Required
|
|
@@ -31,6 +31,12 @@ Caller-owned footer content; footer handles share this row.
|
|
|
31
31
|
|
|
32
32
|
Content rendered inside the component.
|
|
33
33
|
|
|
34
|
+
### size
|
|
35
|
+
|
|
36
|
+
``Size | undefined`` · Optional
|
|
37
|
+
|
|
38
|
+
Component size preset.
|
|
39
|
+
|
|
34
40
|
### onFocus
|
|
35
41
|
|
|
36
42
|
``(event: FocusEvent<HTMLTextAreaElement, Element>): void`` · Optional
|
|
@@ -61,10 +67,6 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
61
67
|
|
|
62
68
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
63
69
|
|
|
64
|
-
### controlSize
|
|
65
|
-
|
|
66
|
-
``"small" | "standard" | undefined`` · Optional
|
|
67
|
-
|
|
68
70
|
### autoSize
|
|
69
71
|
|
|
70
72
|
``boolean | undefined`` · Optional
|
|
@@ -33,7 +33,7 @@ Visual variant.
|
|
|
33
33
|
|
|
34
34
|
### size
|
|
35
35
|
|
|
36
|
-
``
|
|
36
|
+
``ActionSize | undefined`` · Optional
|
|
37
37
|
|
|
38
38
|
Component size preset.
|
|
39
39
|
|
|
@@ -81,7 +81,7 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
81
81
|
|
|
82
82
|
### startIconSize
|
|
83
83
|
|
|
84
|
-
``"
|
|
84
|
+
``"medium" | "large" | "extra-large" | undefined`` · Optional
|
|
85
85
|
|
|
86
86
|
### endIcon
|
|
87
87
|
|
|
@@ -33,7 +33,7 @@ Visual variant.
|
|
|
33
33
|
|
|
34
34
|
### size
|
|
35
35
|
|
|
36
|
-
``
|
|
36
|
+
``ActionSize | undefined`` · Optional
|
|
37
37
|
|
|
38
38
|
Component size preset.
|
|
39
39
|
|
|
@@ -81,7 +81,7 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
81
81
|
|
|
82
82
|
### startIconSize
|
|
83
83
|
|
|
84
|
-
``"
|
|
84
|
+
``"medium" | "large" | "extra-large" | undefined`` · Optional
|
|
85
85
|
|
|
86
86
|
### endIcon
|
|
87
87
|
|
|
@@ -49,6 +49,14 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
49
49
|
|
|
50
50
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
51
|
|
|
52
|
+
### size
|
|
53
|
+
|
|
54
|
+
``Size | undefined`` · Optional
|
|
55
|
+
|
|
56
|
+
Default: ``"medium"``
|
|
57
|
+
|
|
58
|
+
Component size preset.
|
|
59
|
+
|
|
52
60
|
### value
|
|
53
61
|
|
|
54
62
|
``string`` · Required
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/composer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "GridUI React composer",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"react-dom": "^19.2.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@gridui/button": "^
|
|
36
|
-
"@gridui/file-picker": "^1.
|
|
37
|
-
"@gridui/input": "^
|
|
35
|
+
"@gridui/button": "^6.0.0",
|
|
36
|
+
"@gridui/file-picker": "^1.2.0",
|
|
37
|
+
"@gridui/input": "^5.0.0",
|
|
38
38
|
"@gridui/interaction": "^1.3.0",
|
|
39
|
-
"@gridui/style-utils": "^4.
|
|
40
|
-
"@gridui/theme": "^
|
|
39
|
+
"@gridui/style-utils": "^4.1.0",
|
|
40
|
+
"@gridui/theme": "^5.0.0",
|
|
41
41
|
"class-variance-authority": "0.7.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|