@gridui/inline-editor 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 CHANGED
@@ -1,11 +1,11 @@
1
1
  # @gridui/inline-editor
2
2
 
3
- Core family. Public API: `InlineEditor`, `InlineEditorDisplay`, `InlineEditorTrigger`, `InlineEditorField`, `InlineEditorTextarea`, and `InlineEditorActions`.
3
+ Controls family. Public API: `InlineEditor`, `InlineEditorDisplay`, `InlineEditorTrigger`, `InlineEditorField`, `InlineEditorTextarea`, and `InlineEditorActions`.
4
4
 
5
5
  Import components from `@gridui/inline-editor` and load `@gridui/inline-editor/styles.css` after Theme.
6
6
  Applications own routes, labels, state persistence, and branding.
7
7
 
8
- See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/inline-editor/.changeset/history).
8
+ See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-controls/inline-editor/.changeset/history).
9
9
 
10
10
  ## Styles
11
11
 
@@ -20,8 +20,15 @@ for static HTML loading, SSR limits, and avoiding duplicate CSS.
20
20
  ## Controlled inline editing
21
21
 
22
22
  See [InlineEditor](docs/inline-editor.md) for editing state and submission ownership,
23
- and [Textarea](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/docs/textarea.md#size-and-automatic-height) for optional automatic height.
23
+ and [Textarea](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/input/docs/textarea.md#size-and-automatic-height) for optional automatic height.
24
24
 
25
- See [common inputs](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/input/docs/common-inputs.md) for multiple selection, numeric values, sliders, and editable tags.
25
+ See [common inputs](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/input/docs/common-inputs.md) for multiple selection, numeric values, sliders, and editable tags.
26
26
 
27
27
  [Component reference](docs/reference/README.md) contains focused API pages for each public component.
28
+
29
+ ## Sizing and density
30
+
31
+ InlineEditor size defaults to medium and supplies the trigger, field/textarea and save/cancel action sizes. Explicit part sizes take precedence. Display text remains application content; changing size does not change draft, validation or focus ownership.
32
+
33
+ See the [shared sizing contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/sizing.md)
34
+ for native attributes, scope precedence, tokens and target behavior.
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ import { useLayoutEffect, useRef } from "react";
15
15
  import { jsx } from "react/jsx-runtime";
16
16
  var InlineEditor = (props) => {
17
17
  const {
18
+ size = "medium",
18
19
  editing,
19
20
  onEditingChange,
20
21
  value,
@@ -67,6 +68,7 @@ var InlineEditor = (props) => {
67
68
  editorContext.Provider,
68
69
  {
69
70
  value: {
71
+ size,
70
72
  editing,
71
73
  busy,
72
74
  disabled,
@@ -98,7 +100,7 @@ var InlineEditor = (props) => {
98
100
  import { Button } from "@gridui/button";
99
101
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
100
102
  var InlineEditorActions = (props) => {
101
- const { busy, cancel, disabled, editing, submit, submitDisabled } = useEditor();
103
+ const { size, busy, cancel, disabled, editing, submit, submitDisabled } = useEditor();
102
104
  if (!editing) {
103
105
  return null;
104
106
  }
@@ -111,7 +113,7 @@ var InlineEditorActions = (props) => {
111
113
  Button,
112
114
  {
113
115
  type: "button",
114
- size: "small",
116
+ size: props.size ?? size,
115
117
  disabled: disabled || busy || submitDisabled,
116
118
  loading: busy,
117
119
  onClick: submit,
@@ -122,7 +124,7 @@ var InlineEditorActions = (props) => {
122
124
  Button,
123
125
  {
124
126
  type: "button",
125
- size: "small",
127
+ size: props.size ?? size,
126
128
  variant: "quiet",
127
129
  disabled: busy,
128
130
  onClick: cancel,
@@ -160,7 +162,7 @@ import { useId, useImperativeHandle, useRef as useRef2 } from "react";
160
162
  import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
161
163
  var InlineEditorField = (props) => {
162
164
  const { id, label, onKeyDown, ref, ...restProps } = props;
163
- const { busy, cancel, disabled, editing, input, onValueChange, submit, value } = useEditor();
165
+ const { busy, cancel, disabled, editing, input, onValueChange, submit, value, size } = useEditor();
164
166
  const generatedId = useId();
165
167
  const inputId = id ?? generatedId;
166
168
  const native = useRef2(null);
@@ -182,6 +184,7 @@ var InlineEditorField = (props) => {
182
184
  Input,
183
185
  {
184
186
  ...restProps,
187
+ size: restProps.size ?? size,
185
188
  id: inputId,
186
189
  ref: (element) => {
187
190
  input.current = element;
@@ -239,6 +242,7 @@ var InlineEditorTextarea = (props) => {
239
242
  {
240
243
  autoSize: true,
241
244
  ...restProps,
245
+ size: restProps.size ?? editor.size,
242
246
  id: inputId,
243
247
  ref: (element) => {
244
248
  native.current = element;
@@ -276,7 +280,7 @@ var InlineEditorTrigger = (props) => {
276
280
  variant: "quiet"
277
281
  } : props;
278
282
  const { ref, size, ...restProps } = appearance;
279
- const { busy, disabled, editing, start, trigger } = useEditor();
283
+ const { busy, disabled, editing, start, trigger, size: editorSize } = useEditor();
280
284
  useImperativeHandle3(ref, () => {
281
285
  return trigger.current;
282
286
  });
@@ -287,7 +291,7 @@ var InlineEditorTrigger = (props) => {
287
291
  Button2,
288
292
  {
289
293
  ...restProps,
290
- size: size ?? "small",
294
+ size: size ?? editorSize,
291
295
  ref: trigger,
292
296
  type: "button",
293
297
  disabled: disabled || busy,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/shared/editor-context.ts", "../src/inline-editor/inline-editor.tsx", "../src/inline-editor-actions/inline-editor-actions.tsx", "../src/inline-editor-display/inline-editor-display.tsx", "../src/inline-editor-field/inline-editor-field.tsx", "../src/inline-editor-textarea/inline-editor-textarea.tsx", "../src/inline-editor-trigger/inline-editor-trigger.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace Shared\n * @description Editor Context\n */\n\nimport { createContext, type RefObject, useContext } from \"react\";\n\nexport type EditorContext = {\n readonly editing: boolean;\n readonly busy: boolean;\n readonly disabled: boolean;\n readonly submitDisabled: boolean;\n readonly value: string;\n readonly input: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;\n readonly trigger: RefObject<HTMLButtonElement | null>;\n readonly onValueChange: (value: string) => void;\n readonly start: () => void;\n readonly cancel: () => void;\n readonly submit: () => void;\n};\n\nexport const editorContext = createContext<EditorContext | null>(null);\n\nexport const useEditor = (): EditorContext => {\n const editor = useContext(editorContext);\n if (!editor) {\n throw new Error(\"InlineEditor parts require an InlineEditor.\");\n }\n return editor;\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditor\n * @description Inline Editor\n */\n\nimport { editorContext } from \"../shared/editor-context\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type ComponentPropsWithRef, type FC, useLayoutEffect, useRef } from \"react\";\n\nexport type InlineEditorProps = Omit<ComponentPropsWithRef<\"div\">, \"onSubmit\" | \"onChange\"> & {\n readonly editing: boolean;\n readonly onEditingChange: (editing: boolean) => void;\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly onSubmit: (value: string) => void;\n readonly onCancel?: () => void;\n readonly busy?: boolean;\n readonly disabled?: boolean;\n readonly submitDisabled?: boolean;\n};\n\nexport const InlineEditor: FC<InlineEditorProps> = (props: InlineEditorProps) => {\n const { editing, onEditingChange, value, onValueChange, onSubmit, onCancel,\n busy = false, disabled = false, submitDisabled = false, children, className, ...restProps } = props;\n const input = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const previousEditing = useRef(false);\n const restoreFocus = useRef(false);\n useLayoutEffect(() => {\n if (editing && !previousEditing.current) {\n restoreFocus.current = false;\n input.current?.focus();\n } else if (!editing && previousEditing.current) {\n restoreFocus.current = true;\n }\n if (!editing && restoreFocus.current && !busy && !disabled) {\n trigger.current?.focus();\n restoreFocus.current = false;\n }\n previousEditing.current = editing;\n }, [\n editing,\n busy,\n disabled,\n ]);\n const cancel = () => {\n onCancel?.();\n onEditingChange(false);\n };\n const submit = () => {\n const element = input.current;\n if (busy || disabled || submitDisabled || !element || element.matches(\":disabled\")) {\n return;\n }\n if (!element.reportValidity()) {\n return;\n }\n onSubmit(value);\n };\n\n return (<editorContext.Provider\n value={{\n editing,\n busy,\n disabled,\n submitDisabled,\n value,\n input,\n trigger,\n onValueChange,\n cancel,\n submit,\n start: () => {\n onEditingChange(true);\n },\n }}\n >\n <div\n {...restProps}\n className={cn(\"gridui-inline-editor\", className)}\n aria-busy={busy || undefined}\n >\n {children}\n </div>\n </editorContext.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorActions\n * @description Inline Editor Actions\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Button } from \"@gridui/button\";\nimport type { FC, ReactNode } from \"react\";\n\nexport type InlineEditorActionsProps = {\n readonly saveLabel: ReactNode;\n readonly cancelLabel: ReactNode;\n};\n\nexport const InlineEditorActions: FC<InlineEditorActionsProps> = (props: InlineEditorActionsProps) => {\n const { busy, cancel, disabled, editing, submit, submitDisabled } = useEditor();\n if (!editing) {\n return null;\n }\n return (<div\n className=\"gridui-inline-editor-actions\"\n >\n <Button\n type=\"button\"\n size=\"small\"\n disabled={disabled || busy || submitDisabled}\n loading={busy}\n onClick={submit}\n >\n {props.saveLabel}\n </Button>\n <Button\n type=\"button\"\n size=\"small\"\n variant=\"quiet\"\n disabled={busy}\n onClick={cancel}\n >\n {props.cancelLabel}\n </Button>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorDisplay\n * @description Inline Editor Display\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type InlineEditorDisplayProps = ComponentPropsWithRef<\"div\">;\n\nexport const InlineEditorDisplay: FC<InlineEditorDisplayProps> = (props: InlineEditorDisplayProps) => {\n const { editing } = useEditor();\n const { children, className, ...restProps } = props;\n if (editing || children === undefined || children === null) {\n return null;\n }\n return (<div\n {...restProps}\n className={cn(\"gridui-inline-editor-display\", className)}\n >\n {children}\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorField\n * @description Inline Editor Field\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Input, type InputProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, useId, useImperativeHandle, useRef } from \"react\";\n\nexport type InlineEditorFieldProps = Omit<InputProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\"> & {\n readonly label: string;\n};\n\nexport const InlineEditorField: FC<InlineEditorFieldProps> = (props: InlineEditorFieldProps) => {\n const { id, label, onKeyDown, ref, ...restProps } = props;\n const { busy, cancel, disabled, editing, input, onValueChange, submit, value } = useEditor();\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const native = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => {\n return native.current!;\n });\n if (!editing) {\n return null;\n }\n return (<>\n <label\n htmlFor={inputId}\n >\n {label}\n </label>\n <Input\n {...restProps}\n id={inputId}\n ref={(element) => {\n input.current = element; native.current = element;\n }}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled || busy}\n onKeyDown={event => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || busy || disabled) {\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n cancel();\n } else if (event.key === \"Enter\") {\n event.preventDefault();\n submit();\n }\n }}\n />\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorTextarea\n * @description Inline Editor Textarea\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Textarea, type TextareaProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, useId, useImperativeHandle, useRef } from \"react\";\n\nexport type InlineEditorTextareaProps = Omit<TextareaProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\"> & {\n readonly label: string;\n};\nexport const InlineEditorTextarea: FC<InlineEditorTextareaProps> = (props: InlineEditorTextareaProps) => {\n const { id, label, onKeyDown, ref, ...restProps } = props;\n const editor = useEditor();\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const native = useRef<HTMLTextAreaElement>(null);\n useImperativeHandle(ref, () => {\n return native.current!;\n });\n if (!editor.editing) {\n return null;\n }\n return (<>\n <label\n htmlFor={inputId}\n >\n {label}\n </label>\n <Textarea\n autoSize\n {...restProps}\n id={inputId}\n ref={(element) => {\n native.current = element; editor.input.current = element;\n }}\n value={editor.value}\n onValueChange={editor.onValueChange}\n disabled={editor.disabled || editor.busy}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || editor.busy || editor.disabled) {\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault(); event.stopPropagation(); editor.cancel();\n } else if (event.key === \"Enter\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault(); editor.submit();\n }\n }}\n />\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorTrigger\n * @description Inline Editor Trigger\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Button, type ButtonProps, type ButtonVariants } from \"@gridui/button\";\nimport { type FC, useImperativeHandle } from \"react\";\n\nexport type InlineEditorTriggerProps = Omit<ButtonProps, \"disabled\" | \"loading\" | \"onClick\" | \"type\"> & ButtonVariants;\n\nexport const InlineEditorTrigger: FC<InlineEditorTriggerProps> = (props: InlineEditorTriggerProps) => {\n const appearance = props.variant === undefined || props.variant === null ? {\n ...props,\n variant: \"quiet\" as const,\n } : props;\n const { ref, size, ...restProps } = appearance;\n const { busy, disabled, editing, start, trigger } = useEditor();\n useImperativeHandle(ref, () => {\n return trigger.current!;\n });\n if (editing) {\n return null;\n }\n return (<Button\n {...restProps}\n size={size ?? \"small\"}\n ref={trigger}\n type=\"button\"\n disabled={disabled || busy}\n onClick={start}\n />);\n};\n"],
5
- "mappings": ";AAOA,SAAS,eAA+B,kBAAkB;AAgBnD,IAAM,gBAAgB,cAAoC,IAAI;AAE9D,IAAM,YAAY,MAAqB;AAC1C,QAAM,SAAS,WAAW,aAAa;AACvC,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,6CAA6C;AAAA,EACjE;AACA,SAAO;AACX;;;ACvBA,SAAS,UAAU;AACnB,SAA8C,iBAAiB,cAAc;AAsErE;AAxDD,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM;AAAA,IAAE;AAAA,IAAS;AAAA,IAAiB;AAAA,IAAO;AAAA,IAAe;AAAA,IAAU;AAAA,IAC9D,OAAO;AAAA,IAAO,WAAW;AAAA,IAAO,iBAAiB;AAAA,IAAO;AAAA,IAAU;AAAA,IAAW,GAAG;AAAA,EAAU,IAAI;AAClG,QAAM,QAAQ,OAA+C,IAAI;AACjE,QAAM,UAAU,OAA0B,IAAI;AAC9C,QAAM,kBAAkB,OAAO,KAAK;AACpC,QAAM,eAAe,OAAO,KAAK;AACjC,kBAAgB,MAAM;AAClB,QAAI,WAAW,CAAC,gBAAgB,SAAS;AACrC,mBAAa,UAAU;AACvB,YAAM,SAAS,MAAM;AAAA,IACzB,WAAW,CAAC,WAAW,gBAAgB,SAAS;AAC5C,mBAAa,UAAU;AAAA,IAC3B;AACA,QAAI,CAAC,WAAW,aAAa,WAAW,CAAC,QAAQ,CAAC,UAAU;AACxD,cAAQ,SAAS,MAAM;AACvB,mBAAa,UAAU;AAAA,IAC3B;AACA,oBAAgB,UAAU;AAAA,EAC9B,GAAG;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAC;AACD,QAAM,SAAS,MAAM;AACjB,eAA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BAAoBL,qBAAoB,MAAM,WAAW,KAAK,OAAO,QAAQ,OAAO,UAAU;AACpG;AAAA,UACJ;AACA,cAAI,MAAM,QAAQ,UAAU;AACxB,kBAAM,eAAe;AAAG,kBAAM,gBAAgB;AAAG,mBAAO,OAAO;AAAA,UACnE,WAAW,MAAM,QAAQ,YAAY,MAAM,WAAW,MAAM,UAAU;AAClE,kBAAM,eAAe;AAAG,mBAAO,OAAO;AAAA,UAC1C;AAAA,QACJ;AAAA;AAAA,IACJ;AAAA,KACJ;AACJ;;;AChDA,SAAS,UAAAO,eAAqD;AAC9D,SAAkB,uBAAAC,4BAA2B;AAiBjC,gBAAAC,YAAA;AAbL,IAAM,sBAAoD,CAAC,UAAoC;AAClG,QAAM,aAAa,MAAM,YAAY,UAAa,MAAM,YAAY,OAAO;AAAA,IACvE,GAAG;AAAA,IACH,SAAS;AAAA,EACb,IAAI;AACJ,QAAM,EAAE,KAAK,MAAM,GAAG,UAAU,IAAI;AACpC,QAAM,EAAE,MAAM,UAAU,SAAS,OAAO,QAAQ,IAAI,UAAU;AAC9D,EAAAD,qBAAoB,KAAK,MAAM;AAC3B,WAAO,QAAQ;AAAA,EACnB,CAAC;AACD,MAAI,SAAS;AACT,WAAO;AAAA,EACX;AACA,SAAQ,gBAAAC;AAAA,IAACF;AAAA,IAAA;AAAA,MACJ,GAAG;AAAA,MACJ,MAAM,QAAQ;AAAA,MACd,KAAK;AAAA,MACL,MAAK;AAAA,MACL,UAAU,YAAY;AAAA,MACtB,SAAS;AAAA;AAAA,EACb;AACJ;",
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace Shared\n * @description Editor Context\n */\n\nimport type { Size } from \"@gridui/theme\";\nimport { createContext, type RefObject, useContext } from \"react\";\n\nexport type EditorContext = {\n readonly size: Size;\n readonly editing: boolean;\n readonly busy: boolean;\n readonly disabled: boolean;\n readonly submitDisabled: boolean;\n readonly value: string;\n readonly input: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;\n readonly trigger: RefObject<HTMLButtonElement | null>;\n readonly onValueChange: (value: string) => void;\n readonly start: () => void;\n readonly cancel: () => void;\n readonly submit: () => void;\n};\n\nexport const editorContext = createContext<EditorContext | null>(null);\n\nexport const useEditor = (): EditorContext => {\n const editor = useContext(editorContext);\n if (!editor) {\n throw new Error(\"InlineEditor parts require an InlineEditor.\");\n }\n return editor;\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditor\n * @description Inline Editor\n */\n\nimport type { Size } from \"@gridui/theme\";\nimport { editorContext } from \"../shared/editor-context\";\nimport { cn } from \"@gridui/style-utils\";\nimport { type ComponentPropsWithRef, type FC, useLayoutEffect, useRef } from \"react\";\n\nexport type InlineEditorProps = Omit<ComponentPropsWithRef<\"div\">, \"onSubmit\" | \"onChange\"> & {\n readonly size?: Size;\n readonly editing: boolean;\n readonly onEditingChange: (editing: boolean) => void;\n readonly value: string;\n readonly onValueChange: (value: string) => void;\n readonly onSubmit: (value: string) => void;\n readonly onCancel?: () => void;\n readonly busy?: boolean;\n readonly disabled?: boolean;\n readonly submitDisabled?: boolean;\n};\n\nexport const InlineEditor: FC<InlineEditorProps> = (props: InlineEditorProps) => {\n const { size = \"medium\", editing, onEditingChange, value, onValueChange, onSubmit, onCancel,\n busy = false, disabled = false, submitDisabled = false, children, className, ...restProps } = props;\n const input = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n const previousEditing = useRef(false);\n const restoreFocus = useRef(false);\n useLayoutEffect(() => {\n if (editing && !previousEditing.current) {\n restoreFocus.current = false;\n input.current?.focus();\n } else if (!editing && previousEditing.current) {\n restoreFocus.current = true;\n }\n if (!editing && restoreFocus.current && !busy && !disabled) {\n trigger.current?.focus();\n restoreFocus.current = false;\n }\n previousEditing.current = editing;\n }, [\n editing,\n busy,\n disabled,\n ]);\n const cancel = () => {\n onCancel?.();\n onEditingChange(false);\n };\n const submit = () => {\n const element = input.current;\n if (busy || disabled || submitDisabled || !element || element.matches(\":disabled\")) {\n return;\n }\n if (!element.reportValidity()) {\n return;\n }\n onSubmit(value);\n };\n\n return (<editorContext.Provider\n value={{\n size,\n editing,\n busy,\n disabled,\n submitDisabled,\n value,\n input,\n trigger,\n onValueChange,\n cancel,\n submit,\n start: () => {\n onEditingChange(true);\n },\n }}\n >\n <div\n {...restProps}\n className={cn(\"gridui-inline-editor\", className)}\n aria-busy={busy || undefined}\n >\n {children}\n </div>\n </editorContext.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorActions\n * @description Inline Editor Actions\n */\n\nimport type { ActionSize } from \"@gridui/theme\";\nimport { useEditor } from \"../shared/editor-context\";\nimport { Button } from \"@gridui/button\";\nimport type { FC, ReactNode } from \"react\";\n\nexport type InlineEditorActionsProps = {\n readonly size?: ActionSize;\n readonly saveLabel: ReactNode;\n readonly cancelLabel: ReactNode;\n};\n\nexport const InlineEditorActions: FC<InlineEditorActionsProps> = (props: InlineEditorActionsProps) => {\n const { size, busy, cancel, disabled, editing, submit, submitDisabled } = useEditor();\n if (!editing) {\n return null;\n }\n return (<div\n className=\"gridui-inline-editor-actions\"\n >\n <Button\n type=\"button\"\n size={props.size ?? size}\n disabled={disabled || busy || submitDisabled}\n loading={busy}\n onClick={submit}\n >\n {props.saveLabel}\n </Button>\n <Button\n type=\"button\"\n size={props.size ?? size}\n variant=\"quiet\"\n disabled={busy}\n onClick={cancel}\n >\n {props.cancelLabel}\n </Button>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorDisplay\n * @description Inline Editor Display\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type InlineEditorDisplayProps = ComponentPropsWithRef<\"div\">;\n\nexport const InlineEditorDisplay: FC<InlineEditorDisplayProps> = (props: InlineEditorDisplayProps) => {\n const { editing } = useEditor();\n const { children, className, ...restProps } = props;\n if (editing || children === undefined || children === null) {\n return null;\n }\n return (<div\n {...restProps}\n className={cn(\"gridui-inline-editor-display\", className)}\n >\n {children}\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorField\n * @description Inline Editor Field\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Input, type InputProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, useId, useImperativeHandle, useRef } from \"react\";\n\nexport type InlineEditorFieldProps = Omit<InputProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\"> & {\n readonly label: string;\n};\n\nexport const InlineEditorField: FC<InlineEditorFieldProps> = (props: InlineEditorFieldProps) => {\n const { id, label, onKeyDown, ref, ...restProps } = props;\n const { busy, cancel, disabled, editing, input, onValueChange, submit, value, size } = useEditor();\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const native = useRef<HTMLInputElement>(null);\n useImperativeHandle(ref, () => {\n return native.current!;\n });\n if (!editing) {\n return null;\n }\n return (<>\n <label\n htmlFor={inputId}\n >\n {label}\n </label>\n <Input\n {...restProps}\n size={restProps.size ?? size}\n id={inputId}\n ref={(element) => {\n input.current = element; native.current = element;\n }}\n value={value}\n onValueChange={onValueChange}\n disabled={disabled || busy}\n onKeyDown={event => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || busy || disabled) {\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n cancel();\n } else if (event.key === \"Enter\") {\n event.preventDefault();\n submit();\n }\n }}\n />\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorTextarea\n * @description Inline Editor Textarea\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Textarea, type TextareaProps } from \"@gridui/input\";\nimport { isComposingKeyEvent } from \"@gridui/interaction\";\nimport { type FC, useId, useImperativeHandle, useRef } from \"react\";\n\nexport type InlineEditorTextareaProps = Omit<TextareaProps, \"value\" | \"defaultValue\" | \"onValueChange\" | \"disabled\"> & {\n readonly label: string;\n};\nexport const InlineEditorTextarea: FC<InlineEditorTextareaProps> = (props: InlineEditorTextareaProps) => {\n const { id, label, onKeyDown, ref, ...restProps } = props;\n const editor = useEditor();\n const generatedId = useId();\n const inputId = id ?? generatedId;\n const native = useRef<HTMLTextAreaElement>(null);\n useImperativeHandle(ref, () => {\n return native.current!;\n });\n if (!editor.editing) {\n return null;\n }\n return (<>\n <label\n htmlFor={inputId}\n >\n {label}\n </label>\n <Textarea\n autoSize\n {...restProps}\n size={restProps.size ?? editor.size}\n id={inputId}\n ref={(element) => {\n native.current = element; editor.input.current = element;\n }}\n value={editor.value}\n onValueChange={editor.onValueChange}\n disabled={editor.disabled || editor.busy}\n onKeyDown={(event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || isComposingKeyEvent(event.nativeEvent) || editor.busy || editor.disabled) {\n return;\n }\n if (event.key === \"Escape\") {\n event.preventDefault(); event.stopPropagation(); editor.cancel();\n } else if (event.key === \"Enter\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault(); editor.submit();\n }\n }}\n />\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Inline Editor\n * @namespace InlineEditorTrigger\n * @description Inline Editor Trigger\n */\n\nimport { useEditor } from \"../shared/editor-context\";\nimport { Button, type ButtonProps, type ButtonVariants } from \"@gridui/button\";\nimport { type FC, useImperativeHandle } from \"react\";\n\nexport type InlineEditorTriggerProps = Omit<ButtonProps, \"disabled\" | \"loading\" | \"onClick\" | \"type\"> & ButtonVariants;\n\nexport const InlineEditorTrigger: FC<InlineEditorTriggerProps> = (props: InlineEditorTriggerProps) => {\n const appearance = props.variant === undefined || props.variant === null ? {\n ...props,\n variant: \"quiet\" as const,\n } : props;\n const { ref, size, ...restProps } = appearance;\n const { busy, disabled, editing, start, trigger, size: editorSize } = useEditor();\n useImperativeHandle(ref, () => {\n return trigger.current!;\n });\n if (editing) {\n return null;\n }\n return (<Button\n {...restProps}\n size={size ?? editorSize}\n ref={trigger}\n type=\"button\"\n disabled={disabled || busy}\n onClick={start}\n />);\n};\n"],
5
+ "mappings": ";AAQA,SAAS,eAA+B,kBAAkB;AAiBnD,IAAM,gBAAgB,cAAoC,IAAI;AAE9D,IAAM,YAAY,MAAqB;AAC1C,QAAM,SAAS,WAAW,aAAa;AACvC,MAAI,CAAC,QAAQ;AACT,UAAM,IAAI,MAAM,6CAA6C;AAAA,EACjE;AACA,SAAO;AACX;;;ACxBA,SAAS,UAAU;AACnB,SAA8C,iBAAiB,cAAc;AAwErE;AAzDD,IAAM,eAAsC,CAAC,UAA6B;AAC7E,QAAM;AAAA,IAAE,OAAO;AAAA,IAAU;AAAA,IAAS;AAAA,IAAiB;AAAA,IAAO;AAAA,IAAe;AAAA,IAAU;AAAA,IAC/E,OAAO;AAAA,IAAO,WAAW;AAAA,IAAO,iBAAiB;AAAA,IAAO;AAAA,IAAU;AAAA,IAAW,GAAG;AAAA,EAAU,IAAI;AAClG,QAAM,QAAQ,OAA+C,IAAI;AACjE,QAAM,UAAU,OAA0B,IAAI;AAC9C,QAAM,kBAAkB,OAAO,KAAK;AACpC,QAAM,eAAe,OAAO,KAAK;AACjC,kBAAgB,MAAM;AAClB,QAAI,WAAW,CAAC,gBAAgB,SAAS;AACrC,mBAAa,UAAU;AACvB,YAAM,SAAS,MAAM;AAAA,IACzB,WAAW,CAAC,WAAW,gBAAgB,SAAS;AAC5C,mBAAa,UAAU;AAAA,IAC3B;AACA,QAAI,CAAC,WAAW,aAAa,WAAW,CAAC,QAAQ,CAAC,UAAU;AACxD,cAAQ,SAAS,MAAM;AACvB,mBAAa,UAAU;AAAA,IAC3B;AACA,oBAAgB,UAAU;AAAA,EAC9B,GAAG;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACJ,CAAC;AACD,QAAM,SAAS,MAAM;AACjB,eAAW;AACX,oBAAgB,KAAK;AAAA,EACzB;AACA,Q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AAY,OAAO;AAAA,QACpC,WAAW,CAAC,UAAU;AAClB,sBAAY,KAAK;AACjB,cAAI,MAAM,oBAAoBL,qBAAoB,MAAM,WAAW,KAAK,OAAO,QAAQ,OAAO,UAAU;AACpG;AAAA,UACJ;AACA,cAAI,MAAM,QAAQ,UAAU;AACxB,kBAAM,eAAe;AAAG,kBAAM,gBAAgB;AAAG,mBAAO,OAAO;AAAA,UACnE,WAAW,MAAM,QAAQ,YAAY,MAAM,WAAW,MAAM,UAAU;AAClE,kBAAM,eAAe;AAAG,mBAAO,OAAO;AAAA,UAC1C;AAAA,QACJ;AAAA;AAAA,IACJ;AAAA,KACJ;AACJ;;;ACjDA,SAAS,UAAAO,eAAqD;AAC9D,SAAkB,uBAAAC,4BAA2B;AAiBjC,gBAAAC,YAAA;AAbL,IAAM,sBAAoD,CAAC,UAAoC;AAClG,QAAM,aAAa,MAAM,YAAY,UAAa,MAAM,YAAY,OAAO;AAAA,IACvE,GAAG;AAAA,IACH,SAAS;AAAA,EACb,IAAI;AACJ,QAAM,EAAE,KAAK,MAAM,GAAG,UAAU,IAAI;AACpC,QAAM,EAAE,MAAM,UAAU,SAAS,OAAO,SAAS,MAAM,WAAW,IAAI,UAAU;AAChF,EAAAD,qBAAoB,KAAK,MAAM;AAC3B,WAAO,QAAQ;AAAA,EACnB,CAAC;AACD,MAAI,SAAS;AACT,WAAO;AAAA,EACX;AACA,SAAQ,gBAAAC;AAAA,IAACF;AAAA,IAAA;AAAA,MACJ,GAAG;AAAA,MACJ,MAAM,QAAQ;AAAA,MACd,KAAK;AAAA,MACL,MAAK;AAAA,MACL,UAAU,YAAY;AAAA,MACtB,SAAS;AAAA;AAAA,EACb;AACJ;",
6
6
  "names": ["jsx", "cn", "jsx", "useRef", "jsx", "jsxs", "isComposingKeyEvent", "useId", "useImperativeHandle", "useRef", "Fragment", "jsx", "jsxs", "Button", "useImperativeHandle", "jsx"]
7
7
  }
@@ -4,8 +4,10 @@
4
4
  * @namespace InlineEditor
5
5
  * @description Inline Editor
6
6
  */
7
+ import type { Size } from "@gridui/theme";
7
8
  import { type ComponentPropsWithRef, type FC } from "react";
8
9
  export type InlineEditorProps = Omit<ComponentPropsWithRef<"div">, "onSubmit" | "onChange"> & {
10
+ readonly size?: Size;
9
11
  readonly editing: boolean;
10
12
  readonly onEditingChange: (editing: boolean) => void;
11
13
  readonly value: string;
@@ -4,8 +4,10 @@
4
4
  * @namespace InlineEditorActions
5
5
  * @description Inline Editor Actions
6
6
  */
7
+ import type { ActionSize } from "@gridui/theme";
7
8
  import type { FC, ReactNode } from "react";
8
9
  export type InlineEditorActionsProps = {
10
+ readonly size?: ActionSize;
9
11
  readonly saveLabel: ReactNode;
10
12
  readonly cancelLabel: ReactNode;
11
13
  };
@@ -4,8 +4,10 @@
4
4
  * @namespace Shared
5
5
  * @description Editor Context
6
6
  */
7
+ import type { Size } from "@gridui/theme";
7
8
  import { type RefObject } from "react";
8
9
  export type EditorContext = {
10
+ readonly size: Size;
9
11
  readonly editing: boolean;
10
12
  readonly busy: boolean;
11
13
  readonly disabled: boolean;
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
- min-height: 2.75rem;
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;
@@ -403,11 +388,6 @@
403
388
  /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
404
389
  @layer properties;
405
390
  @layer theme, base, components, utilities;
406
- @layer theme {
407
- :root, :host {
408
- --spacing: 0.25rem;
409
- }
410
- }
411
391
  @layer utilities {
412
392
  .gridui-u-overlay--z-\(--gridui-z-popover\) {
413
393
  z-index: var(--gridui-z-popover);
@@ -422,9 +402,6 @@
422
402
  width: var(--gridui-space-16);
423
403
  height: var(--gridui-space-16);
424
404
  }
425
- .gridui-u-overlay--min-h-10 {
426
- min-height: calc(var(--spacing) * 10);
427
- }
428
405
  .gridui-u-overlay--min-w-0 {
429
406
  min-width: 0px;
430
407
  }
@@ -463,15 +440,9 @@
463
440
  .gridui-u-overlay--p-0 {
464
441
  padding: 0px;
465
442
  }
466
- .gridui-u-overlay--p-gridui-8 {
467
- padding: var(--gridui-space-8);
468
- }
469
443
  .gridui-u-overlay--px-gridui-8 {
470
444
  padding-inline: var(--gridui-space-8);
471
445
  }
472
- .gridui-u-overlay--py-gridui-8 {
473
- padding-block: var(--gridui-space-8);
474
- }
475
446
  .gridui-u-overlay--type-data {
476
447
  font: var(--gridui-type-data);
477
448
  font-family: var(--gridui-font-body);
@@ -578,6 +549,25 @@
578
549
  animation: none;
579
550
  }
580
551
  }
552
+ .gridui-overlay-list {
553
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
554
+ --gridui-overlay-row-padding: var(--gridui-space-8);
555
+ }
556
+ .gridui-overlay-density-compact {
557
+ --gridui-overlay-row-min: var(--gridui-control-min-height-small);
558
+ --gridui-overlay-row-padding: var(--gridui-space-4);
559
+ }
560
+ .gridui-overlay-density-comfortable {
561
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
562
+ --gridui-overlay-row-padding: var(--gridui-space-8);
563
+ }
564
+ .gridui-overlay-list-item {
565
+ min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
566
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
567
+ }
568
+ .gridui-overlay-list-label {
569
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
570
+ }
581
571
  }
582
572
  @property --tw-border-style {
583
573
  syntax: "*";
@@ -602,11 +592,14 @@
602
592
  .gridui-u-input--inline-flex {
603
593
  display: inline-flex;
604
594
  }
605
- .gridui-u-input--min-h-gridui-control {
606
- min-height: var(--gridui-control-min-height);
595
+ .gridui-u-input--min-h-gridui-control-large {
596
+ min-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
597
+ }
598
+ .gridui-u-input--min-h-gridui-control-medium {
599
+ min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
607
600
  }
608
601
  .gridui-u-input--min-h-gridui-control-small {
609
- min-height: var(--gridui-control-min-height-small);
602
+ min-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
610
603
  }
611
604
  .gridui-u-input--w-0 {
612
605
  width: 0px;
@@ -665,9 +658,15 @@
665
658
  .gridui-u-input--px-gridui-8 {
666
659
  padding-inline: var(--gridui-space-8);
667
660
  }
661
+ .gridui-u-input--px-gridui-16 {
662
+ padding-inline: var(--gridui-space-16);
663
+ }
668
664
  .gridui-u-input--py-gridui-4 {
669
665
  padding-block: var(--gridui-space-4);
670
666
  }
667
+ .gridui-u-input--py-gridui-8 {
668
+ padding-block: var(--gridui-space-8);
669
+ }
671
670
  .gridui-u-input--type-input {
672
671
  font: var(--gridui-type-input);
673
672
  font-family: var(--gridui-font-body);
@@ -681,6 +680,21 @@
681
680
  .gridui-u-input--text-foreground {
682
681
  color: var(--gridui-foreground);
683
682
  }
683
+ .gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size\)\] {
684
+ --gridui-control-icon: var(--gridui-icon-size);
685
+ }
686
+ .gridui-u-input--\[--gridui-control-icon\:var\(--gridui-icon-size-large\)\] {
687
+ --gridui-control-icon: var(--gridui-icon-size-large);
688
+ }
689
+ .gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-large\)\,var\(--gridui-target-min-size\)\)\] {
690
+ --gridui-control-size: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
691
+ }
692
+ .gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-medium\)\,var\(--gridui-target-min-size\)\)\] {
693
+ --gridui-control-size: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
694
+ }
695
+ .gridui-u-input--\[--gridui-control-size\:max\(var\(--gridui-control-min-height-small\)\,var\(--gridui-target-min-size\)\)\] {
696
+ --gridui-control-size: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
697
+ }
684
698
  .gridui-u-input--disabled\:cursor-not-allowed:disabled {
685
699
  cursor: not-allowed;
686
700
  }
@@ -690,6 +704,10 @@
690
704
  .gridui-u-input--aria-invalid\:border-status-danger-border[aria-invalid="true"] {
691
705
  border-color: var(--gridui-status-danger-border);
692
706
  }
707
+ .gridui-u-input--\[\&_svg\]\:size-\(--gridui-control-icon\) svg {
708
+ width: var(--gridui-control-icon);
709
+ height: var(--gridui-control-icon);
710
+ }
693
711
  .gridui-u-input--\[\&\>svg\]\:size-gridui-16 > svg {
694
712
  width: var(--gridui-space-16);
695
713
  height: var(--gridui-space-16);
@@ -697,7 +715,7 @@
697
715
  }
698
716
  @layer components {
699
717
  .gridui-input-group {
700
- --_gridui-input-height: var(--gridui-control-min-height);
718
+ --_gridui-input-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
701
719
  position: relative;
702
720
  display: flex;
703
721
  flex-wrap: wrap;
@@ -710,8 +728,8 @@
710
728
  border-radius: var(--gridui-control-radius);
711
729
  color: var(--gridui-foreground);
712
730
  background: var(--gridui-background);
713
- &[data-control-size="small"] {
714
- --_gridui-input-height: var(--gridui-control-min-height-small);
731
+ &[data-size="small"] {
732
+ --_gridui-input-height: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
715
733
  }
716
734
  > .gridui-control {
717
735
  flex: 1;
@@ -767,9 +785,12 @@
767
785
  .gridui-input-group-button {
768
786
  flex: none;
769
787
  }
788
+ .gridui-input-group[data-size="large"] {
789
+ --_gridui-input-height: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
790
+ }
770
791
  .gridui-textarea-frame {
771
792
  --_gridui-textarea-padding: var(--gridui-space-8);
772
- --_gridui-textarea-control-minimum: var(--gridui-control-min-height);
793
+ --_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
773
794
  --_gridui-textarea-resize-height: 0px;
774
795
  --_gridui-textarea-footer-height: 0px;
775
796
  --_gridui-textarea-border: 2px;
@@ -780,9 +801,9 @@
780
801
  flex-direction: column;
781
802
  min-height: calc(var(--_gridui-textarea-min-body) + var(--_gridui-textarea-chrome));
782
803
  padding: 0;
783
- &[data-control-size="small"] {
804
+ &[data-size="small"] {
784
805
  --_gridui-textarea-padding: var(--gridui-space-4);
785
- --_gridui-textarea-control-minimum: var(--gridui-control-min-height-small);
806
+ --_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-small), var(--gridui-target-min-size));
786
807
  }
787
808
  &[data-grouped] {
788
809
  --_gridui-textarea-border: 0px;
@@ -794,7 +815,7 @@
794
815
  --_gridui-textarea-resize-height: var(--gridui-space-32);
795
816
  }
796
817
  &:is([data-resize-handle="footer"], [data-footer]) {
797
- --_gridui-textarea-footer-height: var(--gridui-control-min-height);
818
+ --_gridui-textarea-footer-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
798
819
  }
799
820
  &[data-max-rows] {
800
821
  max-height: calc(var(--_gridui-textarea-max-rows) * 1lh + 2 * var(--_gridui-textarea-padding) + var(--_gridui-textarea-chrome));
@@ -850,7 +871,7 @@
850
871
  display: flex;
851
872
  flex: none;
852
873
  align-items: stretch;
853
- min-height: var(--gridui-control-min-height);
874
+ min-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
854
875
  border-top: 1px solid;
855
876
  border-color: inherit;
856
877
  background: var(--gridui-surface);
@@ -870,7 +891,7 @@
870
891
  flex: none;
871
892
  align-items: center;
872
893
  justify-content: center;
873
- width: var(--gridui-control-min-height);
894
+ width: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
874
895
  margin: 0;
875
896
  padding: 0;
876
897
  border: 0;
@@ -909,9 +930,12 @@
909
930
  }
910
931
  @media (pointer: coarse) {
911
932
  .gridui-textarea-frame:is([data-resize-handle="corner"], [data-resize-handle="edge"]) {
912
- --_gridui-textarea-resize-height: var(--gridui-control-min-height);
933
+ --_gridui-textarea-resize-height: max(var(--gridui-control-min-height-medium), var(--gridui-target-min-size));
913
934
  }
914
935
  }
936
+ .gridui-textarea-frame[data-size="large"] {
937
+ --_gridui-textarea-control-minimum: max(var(--gridui-control-min-height-large), var(--gridui-target-min-size));
938
+ }
915
939
  .gridui-input-group > input[type="search"]::-webkit-search-cancel-button {
916
940
  appearance: none;
917
941
  }
package/docs/catalog.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/inline-editor",
4
- "version": "2.2.0",
5
- "category": "core",
4
+ "version": "3.0.0",
5
+ "category": "controls",
6
6
  "description": "GridUI React inline editor",
7
7
  "usage": "Component reference contains focused API pages for each public component.",
8
8
  "documentation": [
@@ -87,9 +87,9 @@
87
87
  ],
88
88
  "styledImport": "@gridui/inline-editor/styled",
89
89
  "examples": [
90
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/getting-started.mdx",
91
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/multiline.mdx",
92
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/single-line.mdx",
93
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx"
90
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/getting-started.mdx",
91
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/multiline.mdx",
92
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/single-line.mdx",
93
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx"
94
94
  ]
95
95
  }
@@ -11,14 +11,20 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
20
20
  The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
21
 
22
+ ### size
23
+
24
+ ``ActionSize | undefined`` · Optional
25
+
26
+ Component size preset.
27
+
22
28
  ### saveLabel
23
29
 
24
30
  ``ReactNode`` · Required
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -25,6 +25,12 @@ The public Props type is the source of these signatures. Defaults below are expl
25
25
 
26
26
  Content rendered inside the component.
27
27
 
28
+ ### size
29
+
30
+ ``Size | undefined`` · Optional
31
+
32
+ Component size preset.
33
+
28
34
  ### onFocus
29
35
 
30
36
  ``(event: FocusEvent<HTMLInputElement, Element>): void`` · Optional
@@ -55,9 +61,9 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
55
61
 
56
62
  Called when the corresponding interaction occurs; inspect the arguments in Actions.
57
63
 
58
- ### controlSize
64
+ ### htmlSize
59
65
 
60
- ``"small" | "standard" | undefined`` · Optional
66
+ ``number | undefined`` · Optional
61
67
 
62
68
  ### label
63
69
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -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
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -33,7 +33,7 @@ Visual variant.
33
33
 
34
34
  ### size
35
35
 
36
- ``"small" | "standard" | "large" | "extra-large" | null | undefined`` · Optional
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
- ``"standard" | "large" | "extra-large" | undefined`` · Optional
84
+ ``"medium" | "large" | "extra-large" | undefined`` · Optional
85
85
 
86
86
  ### endIcon
87
87
 
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
11
11
  import "@gridui/inline-editor/styles.css";
12
12
  ```
13
13
 
14
- Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/README.md) for shared behavior and stylesheet dependencies.
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/README.md) for shared behavior and stylesheet dependencies.
15
15
 
16
- The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/inline-editor/stories/inline-editor.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
17
 
18
18
  ## API
19
19
 
@@ -43,6 +43,14 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
43
43
 
44
44
  Called when the corresponding interaction occurs; inspect the arguments in Actions.
45
45
 
46
+ ### size
47
+
48
+ ``Size | undefined`` · Optional
49
+
50
+ Default: ``"medium"``
51
+
52
+ Component size preset.
53
+
46
54
  ### editing
47
55
 
48
56
  ``boolean`` · Required
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/inline-editor",
3
- "version": "2.2.0",
3
+ "version": "3.0.0",
4
4
  "description": "GridUI React inline editor",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -32,11 +32,11 @@
32
32
  "react-dom": "^19.2.0"
33
33
  },
34
34
  "dependencies": {
35
- "@gridui/button": "^5.2.0",
36
- "@gridui/input": "^4.1.0",
35
+ "@gridui/button": "^6.0.0",
36
+ "@gridui/input": "^5.0.0",
37
37
  "@gridui/interaction": "^1.3.0",
38
- "@gridui/style-utils": "^4.0.0",
39
- "@gridui/theme": "^4.0.0"
38
+ "@gridui/style-utils": "^4.1.0",
39
+ "@gridui/theme": "^5.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@gridui-internal/configuration": "0.0.0-internal",