@justanarthur/modo-ui 0.4.0 → 0.5.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.
Files changed (28) hide show
  1. package/dist/blocks/sidebar-app/index.js +3 -3
  2. package/dist/components/inputs/combobox/index.js +2 -2
  3. package/dist/components/inputs/date-time/date-picker/index.js +4 -4
  4. package/dist/components/inputs/date-time/date-range-picker/index.js +4 -4
  5. package/dist/components/inputs/date-time/duration-picker/index.js +4 -4
  6. package/dist/components/inputs/date-time/month-picker/index.js +4 -4
  7. package/dist/components/inputs/date-time/time-picker/index.js +4 -4
  8. package/dist/components/inputs/input/index.d.ts +5 -1
  9. package/dist/components/inputs/input/index.js +2 -2
  10. package/dist/components/inputs/textarea/index.d.ts +3 -1
  11. package/dist/components/inputs/textarea/index.js +2 -2
  12. package/dist/components/navigation/sidebar/index.js +2 -2
  13. package/dist/index.d.ts +10 -4
  14. package/dist/index.js +12 -12
  15. package/dist/shared/{components-tcee5k0s.js → components-473g814w.js} +1 -1
  16. package/dist/shared/{components-ye0ze0h8.js → components-5pnw8183.js} +1 -1
  17. package/dist/shared/{components-wshd8f3n.js → components-5vgpnxgy.js} +1 -1
  18. package/dist/shared/{components-nyq0rym2.js → components-6p8tfcd6.js} +1 -1
  19. package/dist/shared/{components-50m950y9.js → components-h2ajmhwn.js} +9 -15
  20. package/dist/shared/{components-rd9tbsqv.js → components-kwa6mrf9.js} +3 -3
  21. package/dist/shared/{components-mqyvvh8k.js → components-qmmjx1qw.js} +1 -1
  22. package/dist/shared/{components-3myrw7ne.js → components-raknhppb.js} +11 -4
  23. package/dist/shared/{components-qtqxgfrb.js → components-s5ngg32c.js} +2 -2
  24. package/dist/shared/{components-zwhtxm15.js → components-sn1rxx1d.js} +1 -1
  25. package/dist/shared/{components-wtbesgdp.js → components-wy9jpqny.js} +1 -1
  26. package/dist/shared/{components-nsjec21k.js → components-y9y0g8er.js} +1 -1
  27. package/dist/styles.css +1 -1
  28. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  SidebarApp2
3
- } from "../../shared/components-ye0ze0h8.js";
4
- import"../../shared/components-mqyvvh8k.js";
3
+ } from "../../shared/components-5pnw8183.js";
4
+ import"../../shared/components-qmmjx1qw.js";
5
5
  import"../../shared/components-c6s6b43g.js";
6
- import"../../shared/components-3myrw7ne.js";
6
+ import"../../shared/components-raknhppb.js";
7
7
  import"../../shared/components-rr7a6ja9.js";
8
8
  import"../../shared/components-ng72k97e.js";
9
9
  import"../../shared/components-zfnmn5d4.js";
@@ -7,10 +7,10 @@ import {
7
7
  ComboboxItem2,
8
8
  ComboboxEmpty2,
9
9
  combobox_default
10
- } from "../../../shared/components-tcee5k0s.js";
10
+ } from "../../../shared/components-473g814w.js";
11
11
  import {
12
12
  fieldVariants
13
- } from "../../../shared/components-3myrw7ne.js";
13
+ } from "../../../shared/components-raknhppb.js";
14
14
  import"../../../shared/components-5xc2j8jz.js";
15
15
  import"../../../shared/components-zrkzcayz.js";
16
16
  import"../../../shared/components-0q0sqfh4.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DatePicker2,
3
3
  date_picker_default
4
- } from "../../../../shared/components-wtbesgdp.js";
4
+ } from "../../../../shared/components-wy9jpqny.js";
5
5
  import"../../../../shared/components-mjthm1kf.js";
6
6
  import"../../../../shared/components-1z6tdadk.js";
7
- import"../../../../shared/components-qtqxgfrb.js";
8
- import"../../../../shared/components-50m950y9.js";
7
+ import"../../../../shared/components-s5ngg32c.js";
8
+ import"../../../../shared/components-h2ajmhwn.js";
9
9
  import"../../../../shared/components-gz8zf3ec.js";
10
10
  import"../../../../shared/components-c6s6b43g.js";
11
- import"../../../../shared/components-3myrw7ne.js";
11
+ import"../../../../shared/components-raknhppb.js";
12
12
  import"../../../../shared/components-rr7a6ja9.js";
13
13
  import"../../../../shared/components-zfnmn5d4.js";
14
14
  import"../../../../shared/components-3ky44908.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  DateRangePicker2,
3
3
  date_range_picker_default
4
- } from "../../../../shared/components-zwhtxm15.js";
4
+ } from "../../../../shared/components-sn1rxx1d.js";
5
5
  import"../../../../shared/components-1z6tdadk.js";
6
- import"../../../../shared/components-qtqxgfrb.js";
7
- import"../../../../shared/components-50m950y9.js";
6
+ import"../../../../shared/components-s5ngg32c.js";
7
+ import"../../../../shared/components-h2ajmhwn.js";
8
8
  import"../../../../shared/components-gz8zf3ec.js";
9
9
  import"../../../../shared/components-c6s6b43g.js";
10
- import"../../../../shared/components-3myrw7ne.js";
10
+ import"../../../../shared/components-raknhppb.js";
11
11
  import"../../../../shared/components-rr7a6ja9.js";
12
12
  import"../../../../shared/components-zfnmn5d4.js";
13
13
  import"../../../../shared/components-3ky44908.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  DurationPicker2,
3
3
  duration_picker_default
4
- } from "../../../../shared/components-nyq0rym2.js";
4
+ } from "../../../../shared/components-6p8tfcd6.js";
5
5
  import"../../../../shared/components-mjthm1kf.js";
6
- import"../../../../shared/components-qtqxgfrb.js";
7
- import"../../../../shared/components-50m950y9.js";
6
+ import"../../../../shared/components-s5ngg32c.js";
7
+ import"../../../../shared/components-h2ajmhwn.js";
8
8
  import"../../../../shared/components-gz8zf3ec.js";
9
9
  import"../../../../shared/components-c6s6b43g.js";
10
- import"../../../../shared/components-3myrw7ne.js";
10
+ import"../../../../shared/components-raknhppb.js";
11
11
  import"../../../../shared/components-rr7a6ja9.js";
12
12
  import"../../../../shared/components-zfnmn5d4.js";
13
13
  import"../../../../shared/components-3ky44908.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  MonthPicker2,
3
3
  month_picker_default
4
- } from "../../../../shared/components-nsjec21k.js";
5
- import"../../../../shared/components-qtqxgfrb.js";
6
- import"../../../../shared/components-50m950y9.js";
4
+ } from "../../../../shared/components-y9y0g8er.js";
5
+ import"../../../../shared/components-s5ngg32c.js";
6
+ import"../../../../shared/components-h2ajmhwn.js";
7
7
  import"../../../../shared/components-gz8zf3ec.js";
8
8
  import"../../../../shared/components-c6s6b43g.js";
9
- import"../../../../shared/components-3myrw7ne.js";
9
+ import"../../../../shared/components-raknhppb.js";
10
10
  import"../../../../shared/components-rr7a6ja9.js";
11
11
  import"../../../../shared/components-zfnmn5d4.js";
12
12
  import"../../../../shared/components-3ky44908.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  TimePicker2,
3
3
  time_picker_default
4
- } from "../../../../shared/components-wshd8f3n.js";
4
+ } from "../../../../shared/components-5vgpnxgy.js";
5
5
  import"../../../../shared/components-mjthm1kf.js";
6
- import"../../../../shared/components-qtqxgfrb.js";
7
- import"../../../../shared/components-50m950y9.js";
6
+ import"../../../../shared/components-s5ngg32c.js";
7
+ import"../../../../shared/components-h2ajmhwn.js";
8
8
  import"../../../../shared/components-gz8zf3ec.js";
9
9
  import"../../../../shared/components-c6s6b43g.js";
10
- import"../../../../shared/components-3myrw7ne.js";
10
+ import"../../../../shared/components-raknhppb.js";
11
11
  import"../../../../shared/components-rr7a6ja9.js";
12
12
  import"../../../../shared/components-zfnmn5d4.js";
13
13
  import"../../../../shared/components-3ky44908.js";
@@ -49,7 +49,9 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChan
49
49
  * - `InputGroup.Field` — one labelled Input in a group, wired as a Base UI
50
50
  * `Field` (label, control and error message linked for assistive tech):
51
51
  * `index` (its position, for the fluid hover), `label`, `labelHidden`,
52
- * `error` (a message below the input; marks it invalid), plus Input's props.
52
+ * `error` (a message below the input; marks it invalid), plus Input's props;
53
+ * children replace the Input with another field control, such as a
54
+ * Textarea, which joins the group's hover and takes the error.
53
55
  *
54
56
  * @example {@include ./examples.mdx}
55
57
  */
@@ -82,6 +84,8 @@ interface InputFieldProps extends Omit<InputProps, "invalid" | "size" | "classNa
82
84
  index: number;
83
85
  /** Error message shown below the input. */
84
86
  error?: string;
87
+ /** A control in place of the built-in Input, e.g. a Textarea: it joins the group's hover and takes the field's error and disabled state. Input's props then go on it, not on the field. */
88
+ children?: ReactNode2;
85
89
  className?: string;
86
90
  }
87
91
  declare const InputField: ForwardRefExoticComponent<InputFieldProps & RefAttributes<HTMLDivElement>>;
@@ -3,8 +3,8 @@ import {
3
3
  Label2,
4
4
  InputGroup2,
5
5
  input_default
6
- } from "../../../shared/components-50m950y9.js";
7
- import"../../../shared/components-3myrw7ne.js";
6
+ } from "../../../shared/components-h2ajmhwn.js";
7
+ import"../../../shared/components-raknhppb.js";
8
8
  import"../../../shared/components-59efxjd9.js";
9
9
  import"../../../shared/components-jjw69c4c.js";
10
10
  import"../../../shared/components-n7mjr357.js";
@@ -38,7 +38,9 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
38
38
  * the same size, so the two stack in a form without a seam. It is
39
39
  * uncontrolled with `defaultValue`, or controlled with `value` + `onChange`,
40
40
  * fills the width of its container, and joins a Base UI `Field` when placed
41
- * inside one. Pair it with a `Label` (see Input) through `htmlFor` / `id`.
41
+ * inside one. Pair it with a `Label` (see Input) through `htmlFor` / `id`,
42
+ * or put it in an `InputGroup.Field` to label it, join the group's hover and
43
+ * take the field's error.
42
44
  *
43
45
  * @example {@include ./examples.mdx}
44
46
  */
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Textarea2,
3
3
  textarea_default
4
- } from "../../../shared/components-rd9tbsqv.js";
5
- import"../../../shared/components-3myrw7ne.js";
4
+ } from "../../../shared/components-kwa6mrf9.js";
5
+ import"../../../shared/components-raknhppb.js";
6
6
  import"../../../shared/components-n7mjr357.js";
7
7
  import"../../../shared/components-0sn7ypjw.js";
8
8
  import"../../../shared/components-cv16mryv.js";
@@ -36,9 +36,9 @@ import {
36
36
  Sidebar2,
37
37
  SidebarContent2,
38
38
  sidebar_default
39
- } from "../../../shared/components-mqyvvh8k.js";
39
+ } from "../../../shared/components-qmmjx1qw.js";
40
40
  import"../../../shared/components-c6s6b43g.js";
41
- import"../../../shared/components-3myrw7ne.js";
41
+ import"../../../shared/components-raknhppb.js";
42
42
  import"../../../shared/components-rr7a6ja9.js";
43
43
  import"../../../shared/components-ng72k97e.js";
44
44
  import"../../../shared/components-zfnmn5d4.js";
package/dist/index.d.ts CHANGED
@@ -1441,7 +1441,9 @@ interface InputProps extends Omit<InputHTMLAttributes3<HTMLInputElement>, "onCha
1441
1441
  * - `InputGroup.Field` — one labelled Input in a group, wired as a Base UI
1442
1442
  * `Field` (label, control and error message linked for assistive tech):
1443
1443
  * `index` (its position, for the fluid hover), `label`, `labelHidden`,
1444
- * `error` (a message below the input; marks it invalid), plus Input's props.
1444
+ * `error` (a message below the input; marks it invalid), plus Input's props;
1445
+ * children replace the Input with another field control, such as a
1446
+ * Textarea, which joins the group's hover and takes the error.
1445
1447
  *
1446
1448
  * @example {@include ./examples.mdx}
1447
1449
  */
@@ -1474,6 +1476,8 @@ interface InputFieldProps extends Omit<InputProps, "invalid" | "size" | "classNa
1474
1476
  index: number;
1475
1477
  /** Error message shown below the input. */
1476
1478
  error?: string;
1479
+ /** A control in place of the built-in Input, e.g. a Textarea: it joins the group's hover and takes the field's error and disabled state. Input's props then go on it, not on the field. */
1480
+ children?: ReactNode10;
1477
1481
  className?: string;
1478
1482
  }
1479
1483
  declare const InputField: ForwardRefExoticComponent5<InputFieldProps & RefAttributes5<HTMLDivElement>>;
@@ -2011,7 +2015,9 @@ interface TextareaProps extends Omit<TextareaHTMLAttributes2<HTMLTextAreaElement
2011
2015
  * the same size, so the two stack in a form without a seam. It is
2012
2016
  * uncontrolled with `defaultValue`, or controlled with `value` + `onChange`,
2013
2017
  * fills the width of its container, and joins a Base UI `Field` when placed
2014
- * inside one. Pair it with a `Label` (see Input) through `htmlFor` / `id`.
2018
+ * inside one. Pair it with a `Label` (see Input) through `htmlFor` / `id`,
2019
+ * or put it in an `InputGroup.Field` to label it, join the group's hover and
2020
+ * take the field's error.
2015
2021
  *
2016
2022
  * @example {@include ./examples.mdx}
2017
2023
  */
@@ -2144,7 +2150,7 @@ declare const SidebarGroupActions: ForwardRefExoticComponent_tcubfn11<SidebarGro
2144
2150
  declare const SidebarGroupContent: ForwardRefExoticComponent_tcubfn11<SidebarSectionProps & RefAttributes_miuf5611<HTMLDivElement>>;
2145
2151
  import { VariantProps as VariantProps4 } from "class-variance-authority";
2146
2152
  import { AnchorHTMLAttributes, ButtonHTMLAttributes as ButtonHTMLAttributes3, HTMLAttributes as HTMLAttributes17, LiHTMLAttributes, ReactElement as ReactElement4 } from "react";
2147
- import { Context as Context_rri5bl2 } from "react";
2153
+ import { Context as Context_rri5bl3 } from "react";
2148
2154
  import { ForwardRefExoticComponent as ForwardRefExoticComponent_tcubfn12 } from "react";
2149
2155
  import { RefAttributes as RefAttributes_miuf5612 } from "react";
2150
2156
  import { ClassProp as ClassProp_wz9o0r5 } from "class-variance-authority/types";
@@ -2153,7 +2159,7 @@ interface SidebarSelectionValue {
2153
2159
  value: string | undefined;
2154
2160
  select: (value: string) => void;
2155
2161
  }
2156
- declare const SidebarSelection: Context_rri5bl2<SidebarSelectionValue | null>;
2162
+ declare const SidebarSelection: Context_rri5bl3<SidebarSelectionValue | null>;
2157
2163
  interface SidebarMenuProps extends HTMLAttributes17<HTMLUListElement> {
2158
2164
  /** Pins the menu's rows to one step of the size ladder. Omitted, they
2159
2165
  * follow the surrounding SizeProvider. */
package/dist/index.js CHANGED
@@ -54,7 +54,7 @@ import {
54
54
  } from "./shared/components-rr7a6ja9.js";
55
55
  import {
56
56
  fieldVariants
57
- } from "./shared/components-3myrw7ne.js";
57
+ } from "./shared/components-raknhppb.js";
58
58
  import"./shared/components-c6s6b43g.js";
59
59
  import {
60
60
  TooltipPortalContainer2,
@@ -98,7 +98,7 @@ import {
98
98
  SidebarMenuSubButton2,
99
99
  Sidebar2,
100
100
  SidebarContent2
101
- } from "./shared/components-mqyvvh8k.js";
101
+ } from "./shared/components-qmmjx1qw.js";
102
102
  import"./shared/components-chacnk61.js";
103
103
  import {
104
104
  FluidHoverHighlight2
@@ -129,7 +129,7 @@ import {
129
129
  } from "./shared/components-a86dytt0.js";
130
130
  import {
131
131
  SidebarApp2
132
- } from "./shared/components-ye0ze0h8.js";
132
+ } from "./shared/components-5pnw8183.js";
133
133
  import {
134
134
  FileThumbnail2,
135
135
  InputMessage2
@@ -193,7 +193,7 @@ import {
193
193
  ComboboxList2,
194
194
  ComboboxItem2,
195
195
  ComboboxEmpty2
196
- } from "./shared/components-tcee5k0s.js";
196
+ } from "./shared/components-473g814w.js";
197
197
  import"./shared/components-gz8zf3ec.js";
198
198
  import {
199
199
  Calendar2
@@ -202,24 +202,24 @@ import {
202
202
  Input2,
203
203
  Label2,
204
204
  InputGroup2
205
- } from "./shared/components-50m950y9.js";
206
- import"./shared/components-qtqxgfrb.js";
205
+ } from "./shared/components-h2ajmhwn.js";
206
+ import"./shared/components-s5ngg32c.js";
207
207
  import"./shared/components-mjthm1kf.js";
208
208
  import {
209
209
  DatePicker2
210
- } from "./shared/components-wtbesgdp.js";
210
+ } from "./shared/components-wy9jpqny.js";
211
211
  import {
212
212
  DateRangePicker2
213
- } from "./shared/components-zwhtxm15.js";
213
+ } from "./shared/components-sn1rxx1d.js";
214
214
  import {
215
215
  DurationPicker2
216
- } from "./shared/components-nyq0rym2.js";
216
+ } from "./shared/components-6p8tfcd6.js";
217
217
  import {
218
218
  MonthPicker2
219
- } from "./shared/components-nsjec21k.js";
219
+ } from "./shared/components-y9y0g8er.js";
220
220
  import {
221
221
  TimePicker2
222
- } from "./shared/components-wshd8f3n.js";
222
+ } from "./shared/components-5vgpnxgy.js";
223
223
  import {
224
224
  RadioGroup2,
225
225
  Radio2
@@ -252,7 +252,7 @@ import {
252
252
  } from "./shared/components-8snj490h.js";
253
253
  import {
254
254
  Textarea2
255
- } from "./shared/components-rd9tbsqv.js";
255
+ } from "./shared/components-kwa6mrf9.js";
256
256
  import {
257
257
  Tabs2,
258
258
  TabsList2,
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  fieldIconClasses,
13
13
  useFieldBox
14
- } from "./components-3myrw7ne.js";
14
+ } from "./components-raknhppb.js";
15
15
  import {
16
16
  opensInPlace,
17
17
  inPlaceOffset,
@@ -23,7 +23,7 @@ import {
23
23
  SidebarMenuItem2,
24
24
  SidebarMenuButton2,
25
25
  sidebar_default
26
- } from "./components-mqyvvh8k.js";
26
+ } from "./components-qmmjx1qw.js";
27
27
  import {
28
28
  MenuItem2,
29
29
  DropdownMenu2,
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  PickerShell,
15
15
  PickerInput
16
- } from "./components-qtqxgfrb.js";
16
+ } from "./components-s5ngg32c.js";
17
17
  import {
18
18
  pad,
19
19
  TimeColumns
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  PickerShell,
15
15
  PickerInput
16
- } from "./components-qtqxgfrb.js";
16
+ } from "./components-s5ngg32c.js";
17
17
  import {
18
18
  pad
19
19
  } from "./components-mjthm1kf.js";
@@ -6,9 +6,10 @@ import {
6
6
  } from "./components-ezxhrmer.js";
7
7
  import {
8
8
  fieldIconClasses,
9
+ FieldStateContext,
9
10
  useFieldBox,
10
11
  focusControlOnPress
11
- } from "./components-3myrw7ne.js";
12
+ } from "./components-raknhppb.js";
12
13
  import {
13
14
  useControllableState
14
15
  } from "./components-n7mjr357.js";
@@ -37,7 +38,6 @@ function useInputGroup() {
37
38
  throw new Error("useInputGroup must be used within an InputGroup");
38
39
  return ctx;
39
40
  }
40
- var FieldStateContext = createContext(null);
41
41
  var Input2 = forwardRef(({
42
42
  icon: Icon,
43
43
  value: valueProp,
@@ -52,14 +52,8 @@ var Input2 = forwardRef(({
52
52
  }, ref) => {
53
53
  const [value, onChange] = useControllableState(valueProp, defaultValue, onChangeProp);
54
54
  const inputRef = useRef(null);
55
- const field = useContext(FieldStateContext);
56
- const { size: sizeClasses, props: boxProps } = useFieldBox({
57
- variant,
58
- invalid,
59
- disabled,
60
- active: field?.active,
61
- size
62
- });
55
+ const box = useFieldBox({ variant, invalid, disabled, size });
56
+ const { size: sizeClasses, props: boxProps } = box;
63
57
  return /* @__PURE__ */ jsxs("div", {
64
58
  onMouseDown: focusControlOnPress(inputRef),
65
59
  ...boxProps,
@@ -82,8 +76,8 @@ var Input2 = forwardRef(({
82
76
  type: "text",
83
77
  value,
84
78
  onChange: (e) => onChange(e.target.value),
85
- disabled,
86
- "aria-invalid": invalid || undefined,
79
+ disabled: box.disabled,
80
+ "aria-invalid": box.invalid || undefined,
87
81
  className: cn2("w-full rounded-none bg-transparent text-foreground placeholder:text-muted-foreground outline-none font-[inherit]", sizeClasses.text, "weight-normal"),
88
82
  ...props
89
83
  })
@@ -140,13 +134,13 @@ var InputGroup2 = forwardRef(({ children, size, className, ...props }, ref) => {
140
134
  }) : group;
141
135
  });
142
136
  InputGroup2.displayName = "InputGroup";
143
- var InputField = forwardRef(({ label, labelHidden, index, error, disabled, className, ...props }, ref) => {
137
+ var InputField = forwardRef(({ label, labelHidden, index, error, disabled, children, className, ...props }, ref) => {
144
138
  const internalRef = useRef(null);
145
139
  const { registerItem, activeIndex } = useInputGroup();
146
140
  const sizeClasses = useSize2();
147
141
  const compact = sizeClasses.variant === "compact";
148
142
  useRegisterFluidHoverItem2(registerItem, index, internalRef);
149
- const fieldState = useMemo(() => ({ active: activeIndex === index }), [activeIndex, index]);
143
+ const fieldState = useMemo(() => ({ active: activeIndex === index, invalid: !!error, disabled: !!disabled }), [activeIndex, index, error, disabled]);
150
144
  return /* @__PURE__ */ jsxs(Field.Root, {
151
145
  ref: (node) => {
152
146
  internalRef.current = node;
@@ -168,7 +162,7 @@ var InputField = forwardRef(({ label, labelHidden, index, error, disabled, class
168
162
  }),
169
163
  /* @__PURE__ */ jsx(FieldStateContext.Provider, {
170
164
  value: fieldState,
171
- children: /* @__PURE__ */ jsx(Input2, {
165
+ children: children ?? /* @__PURE__ */ jsx(Input2, {
172
166
  invalid: !!error,
173
167
  disabled,
174
168
  ...props
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  useFieldBox,
6
6
  focusControlOnPress
7
- } from "./components-3myrw7ne.js";
7
+ } from "./components-raknhppb.js";
8
8
  import {
9
9
  useControllableState
10
10
  } from "./components-n7mjr357.js";
@@ -77,8 +77,8 @@ var Textarea2 = forwardRef(({
77
77
  }),
78
78
  value,
79
79
  onChange: (e) => onChange(e.target.value),
80
- disabled,
81
- "aria-invalid": invalid || undefined,
80
+ disabled: box.disabled,
81
+ "aria-invalid": box.invalid || undefined,
82
82
  className: cn2("block w-full resize-none rounded-none bg-transparent text-foreground placeholder:text-muted-foreground outline-none font-[inherit]", box.size.text, "weight-normal")
83
83
  })
84
84
  });
@@ -30,7 +30,7 @@ import {
30
30
  } from "./components-rr7a6ja9.js";
31
31
  import {
32
32
  fieldVariants
33
- } from "./components-3myrw7ne.js";
33
+ } from "./components-raknhppb.js";
34
34
  import {
35
35
  useIsMobile
36
36
  } from "./components-c6s6b43g.js";
@@ -10,6 +10,7 @@ import {
10
10
 
11
11
  // lib/field-classes.ts
12
12
  import { cva } from "class-variance-authority";
13
+ import { createContext, useContext } from "react";
13
14
  var fieldVariants = cva([
14
15
  "group/field ring-1 cursor-text transition-[background-color,box-shadow,opacity] duration-fast",
15
16
  "hover:bg-muted/50 hover:ring-border data-[active]:bg-muted/50 data-[active]:ring-border",
@@ -28,19 +29,25 @@ var fieldVariants = cva([
28
29
  }
29
30
  });
30
31
  var fieldIconClasses = "shrink-0 text-muted-foreground transition-[color,stroke-width] duration-fast group-hover/field:text-foreground group-hover/field:stroke-[2] group-data-[active]/field:text-foreground group-data-[active]/field:stroke-[2] group-focus-within/field:text-foreground group-focus-within/field:stroke-[2]";
32
+ var FieldStateContext = createContext(null);
31
33
  var FIELD_PX = {
32
34
  default: "px-2.5",
33
35
  compact: "px-2"
34
36
  };
35
37
  function useFieldBox({ variant, invalid, disabled, active, size }) {
38
+ const field = useContext(FieldStateContext);
36
39
  const shape = useShape();
37
40
  const sizeClasses = useSize2(size);
41
+ const isInvalid = invalid ?? field?.invalid ?? false;
42
+ const isDisabled = disabled ?? field?.disabled ?? false;
38
43
  return {
39
44
  size: sizeClasses,
45
+ invalid: isInvalid,
46
+ disabled: isDisabled,
40
47
  props: {
41
- "data-active": active || undefined,
42
- "data-invalid": invalid || undefined,
43
- "data-disabled": disabled || undefined,
48
+ "data-active": (active ?? field?.active) || undefined,
49
+ "data-invalid": isInvalid || undefined,
50
+ "data-disabled": isDisabled || undefined,
44
51
  className: cn2(fieldVariants({ variant }), shape.input, FIELD_PX[sizeClasses.variant])
45
52
  }
46
53
  };
@@ -54,4 +61,4 @@ function focusControlOnPress(control) {
54
61
  };
55
62
  }
56
63
 
57
- export { fieldVariants, fieldIconClasses, useFieldBox, focusControlOnPress };
64
+ export { fieldVariants, fieldIconClasses, FieldStateContext, useFieldBox, focusControlOnPress };
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  fieldIconClasses,
12
12
  useFieldBox
13
- } from "./components-3myrw7ne.js";
13
+ } from "./components-raknhppb.js";
14
14
  import {
15
15
  useIcon
16
16
  } from "./components-zrkzcayz.js";
@@ -46,7 +46,7 @@ import {
46
46
  } from "./components-rr7a6ja9.js";
47
47
  import {
48
48
  input_default
49
- } from "./components-50m950y9.js";
49
+ } from "./components-h2ajmhwn.js";
50
50
 
51
51
  // components/inputs/date-time/picker-shell.tsx
52
52
  import { Popover } from "@base-ui/react/popover";
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  PickerShell,
13
13
  PickerInput
14
- } from "./components-qtqxgfrb.js";
14
+ } from "./components-s5ngg32c.js";
15
15
 
16
16
  // components/inputs/date-time/date-range-picker/index.tsx
17
17
  import { endOfMonth, format } from "date-fns";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  PickerShell,
15
15
  PickerInput
16
- } from "./components-qtqxgfrb.js";
16
+ } from "./components-s5ngg32c.js";
17
17
  import {
18
18
  TimeColumns
19
19
  } from "./components-mjthm1kf.js";
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  PickerShell,
16
16
  PickerInput
17
- } from "./components-qtqxgfrb.js";
17
+ } from "./components-s5ngg32c.js";
18
18
 
19
19
  // components/inputs/date-time/month-picker/index.tsx
20
20
  import { addYears, endOfYear, format, startOfMonth, startOfYear } from "date-fns";
package/dist/styles.css CHANGED
@@ -59,7 +59,7 @@
59
59
  }
60
60
  /* layer: theme */
61
61
  @layer theme{
62
- :root, :host { --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --spacing: 0.25rem; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif; --radius-none: 0; --leading-relaxed: 1.625; --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-DEFAULT: 0.25rem; --radius-lg: 0.5rem; --radius-xl: 0.75rem; --leading-none: 1; --ease-out: cubic-bezier(0, 0, 0.2, 1); --radius-sm: 0.25rem; --leading-snug: 1.375; --leading-normal: 1.5; --radius-xs: 0.125rem; --tracking-wide: 0.025em; --radius-md: 0.375rem; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --leading-tight: 1.25; --default-font-family: var(--font-sans); --default-monoFont-family: var(--font-mono); }
62
+ :root, :host { --default-transition-timingFunction: cubic-bezier(0.4, 0, 0.2, 1); --default-transition-duration: 150ms; --spacing: 0.25rem; --ease-DEFAULT: cubic-bezier(0.4, 0, 0.2, 1); --font-sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif; --radius-md: 0.375rem; --radius-DEFAULT: 0.25rem; --radius-none: 0; --leading-relaxed: 1.625; --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-lg: 0.5rem; --radius-xl: 0.75rem; --leading-none: 1; --ease-out: cubic-bezier(0, 0, 0.2, 1); --radius-sm: 0.25rem; --leading-snug: 1.375; --leading-normal: 1.5; --radius-xs: 0.125rem; --tracking-wide: 0.025em; --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; --leading-tight: 1.25; --default-font-family: var(--font-sans); --default-monoFont-family: var(--font-mono); }
63
63
  }
64
64
  /* layer: base */
65
65
  @layer base{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@justanarthur/modo-ui",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.5.0",
5
5
  "description": "Fluid Functionalism (Base UI flavor, MIT © 2026 Micka Touillaud) ported to UnoCSS: motion springs, fluid hover, a two-step size ladder and an eight-level elevated surface system. Documented with modo.",
6
6
  "license": "MIT",
7
7
  "keywords": [