@kirana-ui/react 0.1.0 → 0.2.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/llms.txt +3216 -0
- package/package.json +124 -2
- package/skills/kirana-ui-primitives/SKILL.md +142 -0
- package/src/accordion.d.ts +26 -15
- package/src/accordion.js +12 -11
- package/src/accordion.js.map +1 -1
- package/src/agent.d.ts +1 -0
- package/src/agent.js +1 -0
- package/src/alert-dialog.d.ts +3 -2
- package/src/autocomplete.d.ts +3 -0
- package/src/autocomplete.js +1 -0
- package/src/autosize.d.ts +12 -0
- package/src/autosize.js +12 -0
- package/src/autosize.js.map +1 -0
- package/src/avatar.d.ts +12 -8
- package/src/avatar.js +19 -10
- package/src/avatar.js.map +1 -1
- package/src/button.d.ts +4 -2
- package/src/button.js +3 -3
- package/src/button.js.map +1 -1
- package/src/calendar.d.ts +65 -0
- package/src/calendar.js +89 -0
- package/src/calendar.js.map +1 -0
- package/src/carousel.d.ts +36 -0
- package/src/carousel.js +52 -0
- package/src/carousel.js.map +1 -0
- package/src/checkbox.d.ts +10 -7
- package/src/checkbox.js +19 -12
- package/src/checkbox.js.map +1 -1
- package/src/collapsible.d.ts +12 -8
- package/src/collapsible.js +8 -7
- package/src/collapsible.js.map +1 -1
- package/src/combobox.d.ts +119 -0
- package/src/combobox.js +177 -0
- package/src/combobox.js.map +1 -0
- package/src/command.d.ts +53 -0
- package/src/command.js +95 -0
- package/src/command.js.map +1 -0
- package/src/context-menu.d.ts +3 -0
- package/src/context-menu.js +1 -0
- package/src/date-field.d.ts +37 -0
- package/src/date-field.js +64 -0
- package/src/date-field.js.map +1 -0
- package/src/date-picker.d.ts +44 -0
- package/src/date-picker.js +62 -0
- package/src/date-picker.js.map +1 -0
- package/src/dialog.d.ts +54 -27
- package/src/dialog.js +23 -6
- package/src/dialog.js.map +1 -1
- package/src/direction.d.ts +1 -0
- package/src/direction.js +1 -1
- package/src/direction.js.map +1 -1
- package/src/drawer.d.ts +3 -0
- package/src/drawer.js +1 -0
- package/src/element.d.ts +12 -0
- package/src/element.js +20 -0
- package/src/element.js.map +1 -0
- package/src/field.d.ts +24 -16
- package/src/field.js +11 -9
- package/src/field.js.map +1 -1
- package/src/fieldset.d.ts +10 -5
- package/src/fieldset.js +4 -5
- package/src/fieldset.js.map +1 -1
- package/src/form.d.ts +5 -2
- package/src/form.js +6 -6
- package/src/form.js.map +1 -1
- package/src/hover-card.d.ts +16 -10
- package/src/hover-card.js +1 -1
- package/src/hover-card.js.map +1 -1
- package/src/hover-popup.d.ts +26 -12
- package/src/hover-popup.js +12 -12
- package/src/hover-popup.js.map +1 -1
- package/src/index.d.ts +37 -3
- package/src/index.js +26 -2
- package/src/input.d.ts +12 -0
- package/src/input.js +21 -0
- package/src/input.js.map +1 -0
- package/src/label.d.ts +8 -0
- package/src/label.js +14 -0
- package/src/label.js.map +1 -0
- package/src/listbox.d.ts +36 -0
- package/src/listbox.js +88 -0
- package/src/listbox.js.map +1 -0
- package/src/menu.d.ts +107 -0
- package/src/menu.js +206 -0
- package/src/menu.js.map +1 -0
- package/src/menubar-context.d.ts +4 -0
- package/src/menubar-context.js +7 -0
- package/src/menubar-context.js.map +1 -0
- package/src/menubar.d.ts +11 -0
- package/src/menubar.js +25 -0
- package/src/menubar.js.map +1 -0
- package/src/message-scroller.d.ts +24 -0
- package/src/message-scroller.js +35 -0
- package/src/message-scroller.js.map +1 -0
- package/src/meter.d.ts +18 -9
- package/src/meter.js +1 -1
- package/src/meter.js.map +1 -1
- package/src/navigation-menu.d.ts +58 -0
- package/src/navigation-menu.js +106 -0
- package/src/navigation-menu.js.map +1 -0
- package/src/number-field.d.ts +28 -0
- package/src/number-field.js +58 -0
- package/src/number-field.js.map +1 -0
- package/src/otp.d.ts +35 -0
- package/src/otp.js +64 -0
- package/src/otp.js.map +1 -0
- package/src/pagination.d.ts +37 -0
- package/src/pagination.js +50 -0
- package/src/pagination.js.map +1 -0
- package/src/popover.d.ts +32 -22
- package/src/popover.js +10 -14
- package/src/popover.js.map +1 -1
- package/src/progress.d.ts +18 -9
- package/src/progress.js +1 -1
- package/src/progress.js.map +1 -1
- package/src/qr-code.d.ts +21 -0
- package/src/qr-code.js +32 -0
- package/src/qr-code.js.map +1 -0
- package/src/radio-group.d.ts +17 -11
- package/src/radio-group.js +20 -22
- package/src/radio-group.js.map +1 -1
- package/src/resizable.d.ts +24 -0
- package/src/resizable.js +51 -0
- package/src/resizable.js.map +1 -0
- package/src/runtime.d.ts +114 -13
- package/src/runtime.js +205 -24
- package/src/runtime.js.map +1 -1
- package/src/scroll-area.d.ts +36 -0
- package/src/scroll-area.js +64 -0
- package/src/scroll-area.js.map +1 -0
- package/src/select.d.ts +79 -31
- package/src/select.js +86 -23
- package/src/select.js.map +1 -1
- package/src/separator.d.ts +4 -2
- package/src/separator.js +3 -3
- package/src/separator.js.map +1 -1
- package/src/slider.d.ts +35 -20
- package/src/slider.js +20 -19
- package/src/slider.js.map +1 -1
- package/src/switch.d.ts +10 -6
- package/src/switch.js +12 -9
- package/src/switch.js.map +1 -1
- package/src/tabs.d.ts +22 -14
- package/src/tabs.js +7 -8
- package/src/tabs.js.map +1 -1
- package/src/testing.d.ts +1 -0
- package/src/testing.js +1 -0
- package/src/toast.d.ts +68 -0
- package/src/toast.js +107 -0
- package/src/toast.js.map +1 -0
- package/src/toggle-group.d.ts +10 -0
- package/src/toggle-group.js +32 -0
- package/src/toggle-group.js.map +1 -0
- package/src/toggle.d.ts +5 -2
- package/src/toggle.js +15 -5
- package/src/toggle.js.map +1 -1
- package/src/toolbar-context.d.ts +7 -0
- package/src/toolbar-context.js +9 -0
- package/src/toolbar-context.js.map +1 -0
- package/src/toolbar.d.ts +35 -0
- package/src/toolbar.js +63 -0
- package/src/toolbar.js.map +1 -0
- package/src/tooltip.d.ts +16 -10
- package/src/tooltip.js +1 -1
- package/src/tooltip.js.map +1 -1
- package/src/use-render.d.ts +38 -0
- package/src/use-render.js +50 -0
- package/src/use-render.js.map +1 -0
- package/src/value-bar.d.ts +19 -11
- package/src/value-bar.js +8 -5
- package/src/value-bar.js.map +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { InputProps, SegmentProps, SegmentsProps } from "./date-field.js";
|
|
2
|
+
import { PopupProps, PositionerProps, TriggerProps } from "./popover.js";
|
|
3
|
+
import { PartComponentProps, PortalProps } from "./runtime.js";
|
|
4
|
+
import { CellProps, DayProps, GridProps, HeadCellProps, HeadingProps, NextProps, PreviousProps, WeekdaysProps, WeeksProps } from "./calendar.js";
|
|
5
|
+
import { StateOf } from "@kirana-ui/core";
|
|
6
|
+
import { DatePickerProps } from "@kirana-ui/core/date-picker";
|
|
7
|
+
import { ReactElement, ReactNode } from "react";
|
|
8
|
+
import { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
9
|
+
type Parts = Vocabulary["datePicker"];
|
|
10
|
+
export type RootProps = Omit<DatePickerProps, "id"> & {
|
|
11
|
+
id?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/** A date field, and a calendar in a popover, with one value between them. It draws nothing. */
|
|
15
|
+
declare function Root({ children, ...props }: RootProps): ReactElement;
|
|
16
|
+
export type FieldProps = PartComponentProps<"div", StateOf<Parts["field"]>>;
|
|
17
|
+
export type CalendarProps = PartComponentProps<"div", StateOf<Parts["calendar"]>>;
|
|
18
|
+
/** The typed date: what holds its segments and its hidden input. */
|
|
19
|
+
declare const Field: (props: FieldProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
20
|
+
/** The calendar: what holds its heading, its buttons and its grid. */
|
|
21
|
+
declare const CalendarRoot: (props: CalendarProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
22
|
+
export declare const DatePicker: {
|
|
23
|
+
readonly Root: typeof Root;
|
|
24
|
+
readonly Field: typeof Field;
|
|
25
|
+
readonly Segments: ({ children }: SegmentsProps) => import("react").JSX.Element;
|
|
26
|
+
readonly Segment: ({ segment, ...props }: SegmentProps) => ReactElement;
|
|
27
|
+
readonly Input: (props: InputProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
28
|
+
readonly Trigger: (props: TriggerProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
29
|
+
readonly Portal: ({ children }: PortalProps) => ReactElement | null;
|
|
30
|
+
readonly Positioner: (props: PositionerProps) => ReactElement;
|
|
31
|
+
readonly Popup: (props: PopupProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
32
|
+
readonly Calendar: typeof CalendarRoot;
|
|
33
|
+
readonly Heading: ({ children, ...props }: HeadingProps) => ReactElement;
|
|
34
|
+
readonly Previous: (props: PreviousProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
35
|
+
readonly Next: (props: NextProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
36
|
+
readonly Grid: (props: GridProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
37
|
+
readonly Weekdays: ({ children }: WeekdaysProps) => import("react").JSX.Element;
|
|
38
|
+
readonly HeadCell: ({ weekday, ...props }: HeadCellProps) => ReactElement;
|
|
39
|
+
readonly Weeks: ({ children }: WeeksProps) => import("react").JSX.Element;
|
|
40
|
+
readonly Cell: ({ date, ...props }: CellProps) => ReactElement;
|
|
41
|
+
readonly Day: ({ date, ...props }: DayProps) => ReactElement;
|
|
42
|
+
};
|
|
43
|
+
export type { CellProps, DayProps, GridProps, HeadCellProps, HeadingProps, InputProps, NextProps, PopupProps, PortalProps, PositionerProps, PreviousProps, SegmentProps, SegmentsProps, TriggerProps, WeekdaysProps, WeeksProps };
|
|
44
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Calendar, CalendarContext as Context$1 } from "./calendar.js";
|
|
2
|
+
import { DateField, DateFieldContext as Context$2 } from "./date-field.js";
|
|
3
|
+
import { DirectionContext } from "./direction-context.js";
|
|
4
|
+
import { Popover, PopoverContext as Context$3 } from "./popover.js";
|
|
5
|
+
import { parts, useController, usePart } from "./runtime.js";
|
|
6
|
+
import { within } from "@kirana-ui/core";
|
|
7
|
+
import { createDatePicker } from "@kirana-ui/core/date-picker";
|
|
8
|
+
import { createContext, useContext } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
// src/date-picker.tsx
|
|
11
|
+
const Context = createContext(null);
|
|
12
|
+
function useDatePicker(part) {
|
|
13
|
+
const controller = useContext(Context);
|
|
14
|
+
if (!controller) throw new Error(`<DatePicker.${part}> must be inside <DatePicker.Root>`);
|
|
15
|
+
return controller;
|
|
16
|
+
}
|
|
17
|
+
/** A date field, and a calendar in a popover, with one value between them. It draws nothing. */
|
|
18
|
+
function Root({ children, ...props }) {
|
|
19
|
+
const direction = useContext(DirectionContext) ?? void 0;
|
|
20
|
+
const controller = useController(within(createDatePicker, { direction }), props);
|
|
21
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
22
|
+
value: controller,
|
|
23
|
+
children: /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
24
|
+
value: controller.field,
|
|
25
|
+
children: /* @__PURE__ */ jsx(Context$3.Provider, {
|
|
26
|
+
value: controller.popover,
|
|
27
|
+
children: /* @__PURE__ */ jsx(Context$1.Provider, {
|
|
28
|
+
value: controller.calendar,
|
|
29
|
+
children
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** The typed date: what holds its segments and its hidden input. */
|
|
36
|
+
const Field = (props) => usePart(useDatePicker("Field").field.root, "div", props);
|
|
37
|
+
/** The calendar: what holds its heading, its buttons and its grid. */
|
|
38
|
+
const CalendarRoot = (props) => usePart(useDatePicker("Calendar").calendar.root, "div", props);
|
|
39
|
+
const DatePicker = /* @__PURE__ */ parts("DatePicker", {
|
|
40
|
+
Root,
|
|
41
|
+
Field,
|
|
42
|
+
Segments: DateField.Segments,
|
|
43
|
+
Segment: DateField.Segment,
|
|
44
|
+
Input: DateField.Input,
|
|
45
|
+
Trigger: Popover.Trigger,
|
|
46
|
+
Portal: Popover.Portal,
|
|
47
|
+
Positioner: Popover.Positioner,
|
|
48
|
+
Popup: Popover.Popup,
|
|
49
|
+
Calendar: CalendarRoot,
|
|
50
|
+
Heading: Calendar.Heading,
|
|
51
|
+
Previous: Calendar.Previous,
|
|
52
|
+
Next: Calendar.Next,
|
|
53
|
+
Grid: Calendar.Grid,
|
|
54
|
+
Weekdays: Calendar.Weekdays,
|
|
55
|
+
HeadCell: Calendar.HeadCell,
|
|
56
|
+
Weeks: Calendar.Weeks,
|
|
57
|
+
Cell: Calendar.Cell,
|
|
58
|
+
Day: Calendar.Day
|
|
59
|
+
});
|
|
60
|
+
export { DatePicker };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=date-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.js","names":["DateFieldContext","PopoverContext","CalendarContext"],"sources":["../../../../packages/react/src/date-picker.tsx"],"sourcesContent":["import { within } from \"@kirana-ui/core\"\nimport type { StateOf } from \"@kirana-ui/core\"\nimport { createDatePicker } from \"@kirana-ui/core/date-picker\"\nimport type { DatePicker as Controller, DatePickerProps } from \"@kirana-ui/core/date-picker\"\nimport type { Vocabulary } from \"@kirana-ui/core/vocabulary\"\nimport { createContext, useContext } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { Calendar, CalendarContext } from \"./calendar.tsx\"\nimport { DateField, DateFieldContext } from \"./date-field.tsx\"\nimport { DirectionContext } from \"./direction-context.ts\"\nimport { Popover, PopoverContext } from \"./popover.tsx\"\nimport { parts, useController, usePart } from \"./runtime.tsx\"\nimport type { PartComponentProps } from \"./runtime.tsx\"\n\nexport type {\n CellProps,\n DayProps,\n GridProps,\n HeadCellProps,\n HeadingProps,\n NextProps,\n PreviousProps,\n WeekdaysProps,\n WeeksProps,\n} from \"./calendar.tsx\"\nexport type { InputProps, SegmentProps, SegmentsProps } from \"./date-field.tsx\"\nexport type { PopupProps, PortalProps, PositionerProps, TriggerProps } from \"./popover.tsx\"\n\ntype Parts = Vocabulary[\"datePicker\"]\n\nconst Context = createContext<Controller | null>(null)\n\nfunction useDatePicker(part: string): Controller {\n const controller = useContext(Context)\n if (!controller) throw new Error(`<DatePicker.${part}> must be inside <DatePicker.Root>`)\n return controller\n}\n\nexport type RootProps = Omit<DatePickerProps, \"id\"> & { id?: string; children?: ReactNode }\n\n/** A date field, and a calendar in a popover, with one value between them. It draws nothing. */\nfunction Root({ children, ...props }: RootProps): ReactElement {\n const direction = useContext(DirectionContext) ?? undefined\n const controller = useController<DatePickerProps, Controller>(\n within(createDatePicker, { direction }),\n props\n )\n return (\n <Context.Provider value={controller}>\n <DateFieldContext.Provider value={controller.field}>\n <PopoverContext.Provider value={controller.popover}>\n <CalendarContext.Provider value={controller.calendar}>\n {children}\n </CalendarContext.Provider>\n </PopoverContext.Provider>\n </DateFieldContext.Provider>\n </Context.Provider>\n )\n}\n\nexport type FieldProps = PartComponentProps<\"div\", StateOf<Parts[\"field\"]>>\nexport type CalendarProps = PartComponentProps<\"div\", StateOf<Parts[\"calendar\"]>>\n\n/** The typed date: what holds its segments and its hidden input. */\nconst Field = (props: FieldProps) => usePart(useDatePicker(\"Field\").field.root, \"div\", props)\n/** The calendar: what holds its heading, its buttons and its grid. */\nconst CalendarRoot = (props: CalendarProps) =>\n usePart(useDatePicker(\"Calendar\").calendar.root, \"div\", props)\n\nexport const DatePicker = /* @__PURE__ */ parts(\"DatePicker\", {\n Root,\n Field,\n Segments: DateField.Segments,\n Segment: DateField.Segment,\n Input: DateField.Input,\n Trigger: Popover.Trigger,\n Portal: Popover.Portal,\n Positioner: Popover.Positioner,\n Popup: Popover.Popup,\n Calendar: CalendarRoot,\n Heading: Calendar.Heading,\n Previous: Calendar.Previous,\n Next: Calendar.Next,\n Grid: Calendar.Grid,\n Weekdays: Calendar.Weekdays,\n HeadCell: Calendar.HeadCell,\n Weeks: Calendar.Weeks,\n Cell: Calendar.Cell,\n Day: Calendar.Day,\n})\n"],"mappings":";;;;;;;;;;AA+BA,MAAM,UAAU,cAAiC,IAAI;AAErD,SAAS,cAAc,MAA0B;CAC/C,MAAM,aAAa,WAAW,OAAO;CACrC,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM,eAAe,KAAK,mCAAmC;CACxF,OAAO;AACT;;AAKA,SAAS,KAAK,EAAE,UAAU,GAAG,SAAkC;CAC7D,MAAM,YAAY,WAAW,gBAAgB,KAAK,KAAA;CAClD,MAAM,aAAa,cACjB,OAAO,kBAAkB,EAAE,UAAU,CAAC,GACtC,KACF;CACA,OACE,oBAAC,QAAQ,UAAT;EAAkB,OAAO;EACvB,UAAA,oBAACA,UAAiB,UAAlB;GAA2B,OAAO,WAAW;GAC3C,UAAA,oBAACC,UAAe,UAAhB;IAAyB,OAAO,WAAW;IACzC,UAAA,oBAACC,UAAgB,UAAjB;KAA0B,OAAO,WAAW;KACzC;IACuB,CAAA;GACH,CAAA;EACA,CAAA;CACX,CAAA;AAEtB;;AAMA,MAAM,SAAS,UAAsB,QAAQ,cAAc,OAAO,CAAC,CAAC,MAAM,MAAM,OAAO,KAAK;;AAE5F,MAAM,gBAAgB,UACpB,QAAQ,cAAc,UAAU,CAAC,CAAC,SAAS,MAAM,OAAO,KAAK;AAE/D,MAAa,aAA6B,sBAAM,cAAc;CAC5D;CACA;CACA,UAAU,UAAU;CACpB,SAAS,UAAU;CACnB,OAAO,UAAU;CACjB,SAAS,QAAQ;CACjB,QAAQ,QAAQ;CAChB,YAAY,QAAQ;CACpB,OAAO,QAAQ;CACf,UAAU;CACV,SAAS,SAAS;CAClB,UAAU,SAAS;CACnB,MAAM,SAAS;CACf,MAAM,SAAS;CACf,UAAU,SAAS;CACnB,UAAU,SAAS;CACnB,OAAO,SAAS;CAChB,MAAM,SAAS;CACf,KAAK,SAAS;AAChB,CAAC"}
|
package/src/dialog.d.ts
CHANGED
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import { PartComponentProps } from "./runtime.js";
|
|
1
|
+
import { PartComponentProps, PortalProps } from "./runtime.js";
|
|
2
|
+
import { StateOf } from "@kirana-ui/core";
|
|
2
3
|
import { ReactElement, ReactNode } from "react";
|
|
3
4
|
import { AlertDialogProps } from "@kirana-ui/core/alert-dialog";
|
|
4
5
|
import { DialogProps } from "@kirana-ui/core/dialog";
|
|
6
|
+
import { DrawerProps } from "@kirana-ui/core/drawer";
|
|
7
|
+
import { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
8
|
+
type Parts = Vocabulary["dialog"];
|
|
5
9
|
export type RootProps = Omit<DialogProps, "id"> & {
|
|
6
10
|
id?: string;
|
|
7
11
|
children?: ReactNode;
|
|
8
12
|
};
|
|
9
13
|
declare function Root({ children, ...props }: RootProps): ReactElement;
|
|
10
|
-
declare function Portal({ children }:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
declare const
|
|
18
|
-
declare const
|
|
14
|
+
declare function Portal({ children }: PortalProps): ReactElement | null;
|
|
15
|
+
export type TriggerProps = PartComponentProps<"button", StateOf<Parts["trigger"]>>;
|
|
16
|
+
export type BackdropProps = PartComponentProps<"div", StateOf<Parts["backdrop"]>>;
|
|
17
|
+
export type PopupProps = PartComponentProps<"div", StateOf<Parts["popup"]>>;
|
|
18
|
+
export type TitleProps = PartComponentProps<"h2", StateOf<Parts["title"]>>;
|
|
19
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
20
|
+
export type CloseProps = PartComponentProps<"button", StateOf<Parts["close"]>>;
|
|
21
|
+
declare const Trigger: (props: TriggerProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
22
|
+
declare const Backdrop: (props: BackdropProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
23
|
+
declare const Popup: (props: PopupProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
24
|
+
declare const Title: (props: TitleProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
25
|
+
declare const Description: (props: DescriptionProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
26
|
+
declare const Close: (props: CloseProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
19
27
|
export declare const Dialog: {
|
|
20
|
-
Root: typeof Root;
|
|
21
|
-
Trigger: typeof Trigger;
|
|
22
|
-
Portal: typeof Portal;
|
|
23
|
-
Backdrop: typeof Backdrop;
|
|
24
|
-
Popup: typeof Popup;
|
|
25
|
-
Title: typeof Title;
|
|
26
|
-
Description: typeof Description;
|
|
27
|
-
Close: typeof Close;
|
|
28
|
+
readonly Root: typeof Root;
|
|
29
|
+
readonly Trigger: typeof Trigger;
|
|
30
|
+
readonly Portal: typeof Portal;
|
|
31
|
+
readonly Backdrop: typeof Backdrop;
|
|
32
|
+
readonly Popup: typeof Popup;
|
|
33
|
+
readonly Title: typeof Title;
|
|
34
|
+
readonly Description: typeof Description;
|
|
35
|
+
readonly Close: typeof Close;
|
|
28
36
|
};
|
|
29
37
|
export type AlertRootProps = Omit<AlertDialogProps, "id"> & {
|
|
30
38
|
id?: string;
|
|
@@ -33,14 +41,33 @@ export type AlertRootProps = Omit<AlertDialogProps, "id"> & {
|
|
|
33
41
|
declare function AlertRoot({ children, ...props }: AlertRootProps): ReactElement;
|
|
34
42
|
/** A dialog that asks for an answer: a press outside it does not close it. Its parts are a dialog's. */
|
|
35
43
|
export declare const AlertDialog: {
|
|
36
|
-
Trigger: typeof Trigger;
|
|
37
|
-
Portal: typeof Portal;
|
|
38
|
-
Backdrop: typeof Backdrop;
|
|
39
|
-
Popup: typeof Popup;
|
|
40
|
-
Title: typeof Title;
|
|
41
|
-
Description: typeof Description;
|
|
42
|
-
Close: typeof Close;
|
|
43
|
-
Root: typeof AlertRoot;
|
|
44
|
+
readonly Trigger: typeof Trigger;
|
|
45
|
+
readonly Portal: typeof Portal;
|
|
46
|
+
readonly Backdrop: typeof Backdrop;
|
|
47
|
+
readonly Popup: typeof Popup;
|
|
48
|
+
readonly Title: typeof Title;
|
|
49
|
+
readonly Description: typeof Description;
|
|
50
|
+
readonly Close: typeof Close;
|
|
51
|
+
readonly Root: typeof AlertRoot;
|
|
52
|
+
};
|
|
53
|
+
export type DrawerRootProps = Omit<DrawerProps, "id"> & {
|
|
54
|
+
id?: string;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
};
|
|
57
|
+
declare function DrawerRoot({ children, ...props }: DrawerRootProps): ReactElement;
|
|
58
|
+
type DrawerParts = Vocabulary["drawer"];
|
|
59
|
+
export type DrawerBackdropProps = PartComponentProps<"div", StateOf<DrawerParts["backdrop"]>>;
|
|
60
|
+
export type DrawerPopupProps = PartComponentProps<"div", StateOf<DrawerParts["popup"]>>;
|
|
61
|
+
/** A dialog that comes from an edge and is dragged back to it. Its parts are a dialog's. */
|
|
62
|
+
export declare const Drawer: {
|
|
63
|
+
readonly Trigger: typeof Trigger;
|
|
64
|
+
readonly Portal: typeof Portal;
|
|
65
|
+
readonly Title: typeof Title;
|
|
66
|
+
readonly Description: typeof Description;
|
|
67
|
+
readonly Close: typeof Close;
|
|
68
|
+
readonly Root: typeof DrawerRoot;
|
|
69
|
+
readonly Backdrop: (props: DrawerBackdropProps) => ReactElement;
|
|
70
|
+
readonly Popup: (props: DrawerPopupProps) => ReactElement;
|
|
44
71
|
};
|
|
45
|
-
export {};
|
|
72
|
+
export type { PortalProps };
|
|
46
73
|
//# sourceMappingURL=dialog.d.ts.map
|
package/src/dialog.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Portal as Portal$1, useController, usePart, useSignal } from "./runtime.js";
|
|
1
|
+
import { Portal as Portal$1, parts, useController, usePart, useSignal } from "./runtime.js";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createAlertDialog } from "@kirana-ui/core/alert-dialog";
|
|
5
5
|
import { createDialog } from "@kirana-ui/core/dialog";
|
|
6
|
+
import { createDrawer } from "@kirana-ui/core/drawer";
|
|
6
7
|
// src/dialog.tsx
|
|
7
8
|
const Context = createContext(null);
|
|
8
9
|
function useDialog(part) {
|
|
@@ -26,7 +27,7 @@ const Popup = (props) => usePart(useDialog("Popup").popup, "div", props);
|
|
|
26
27
|
const Title = (props) => usePart(useDialog("Title").title, "h2", props);
|
|
27
28
|
const Description = (props) => usePart(useDialog("Description").description, "p", props);
|
|
28
29
|
const Close = (props) => usePart(useDialog("Close").close, "button", props);
|
|
29
|
-
const Dialog = {
|
|
30
|
+
const Dialog = /* @__PURE__ */ parts("Dialog", {
|
|
30
31
|
Root,
|
|
31
32
|
Trigger,
|
|
32
33
|
Portal,
|
|
@@ -35,7 +36,7 @@ const Dialog = {
|
|
|
35
36
|
Title,
|
|
36
37
|
Description,
|
|
37
38
|
Close
|
|
38
|
-
};
|
|
39
|
+
});
|
|
39
40
|
function AlertRoot({ children, ...props }) {
|
|
40
41
|
const controller = useController(createAlertDialog, props);
|
|
41
42
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
@@ -44,10 +45,26 @@ function AlertRoot({ children, ...props }) {
|
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
47
|
/** A dialog that asks for an answer: a press outside it does not close it. Its parts are a dialog's. */
|
|
47
|
-
const AlertDialog = {
|
|
48
|
+
const AlertDialog = /* @__PURE__ */ parts("AlertDialog", {
|
|
48
49
|
...Dialog,
|
|
49
50
|
Root: AlertRoot
|
|
50
|
-
};
|
|
51
|
-
|
|
51
|
+
});
|
|
52
|
+
function DrawerRoot({ children, ...props }) {
|
|
53
|
+
const controller = useController(createDrawer, props);
|
|
54
|
+
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
55
|
+
value: controller,
|
|
56
|
+
children
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
const DrawerBackdrop = Dialog.Backdrop;
|
|
60
|
+
const DrawerPopup = Dialog.Popup;
|
|
61
|
+
/** A dialog that comes from an edge and is dragged back to it. Its parts are a dialog's. */
|
|
62
|
+
const Drawer = /* @__PURE__ */ parts("Drawer", {
|
|
63
|
+
...Dialog,
|
|
64
|
+
Root: DrawerRoot,
|
|
65
|
+
Backdrop: DrawerBackdrop,
|
|
66
|
+
Popup: DrawerPopup
|
|
67
|
+
});
|
|
68
|
+
export { AlertDialog, Dialog, Drawer };
|
|
52
69
|
|
|
53
70
|
//# sourceMappingURL=dialog.js.map
|
package/src/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","names":["BodyPortal"],"sources":["../../../../packages/react/src/dialog.tsx"],"sourcesContent":["import { createAlertDialog } from \"@kirana-ui/core/alert-dialog\"\nimport type { AlertDialogProps } from \"@kirana-ui/core/alert-dialog\"\nimport { createDialog } from \"@kirana-ui/core/dialog\"\nimport type { Dialog as Controller, DialogProps } from \"@kirana-ui/core/dialog\"\nimport { createContext, useContext } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { Portal as BodyPortal, useController, usePart, useSignal } from \"./runtime.tsx\"\nimport type { PartComponentProps } from \"./runtime.tsx\"\n\nconst Context = createContext<Controller | null>(null)\n\nfunction useDialog(part: string): Controller {\n const controller = useContext(Context)\n if (!controller) throw new Error(`<Dialog.${part}> must be inside <Dialog.Root>`)\n return controller\n}\n\nexport type RootProps = Omit<DialogProps, \"id\"> & { id?: string; children?: ReactNode }\n\nfunction Root({ children, ...props }: RootProps): ReactElement {\n const controller = useController(createDialog, props)\n return <Context.Provider value={controller}>{children}</Context.Provider>\n}\n\nfunction Portal({ children }:
|
|
1
|
+
{"version":3,"file":"dialog.js","names":["BodyPortal"],"sources":["../../../../packages/react/src/dialog.tsx"],"sourcesContent":["import type { StateOf } from \"@kirana-ui/core\"\nimport { createAlertDialog } from \"@kirana-ui/core/alert-dialog\"\nimport type { AlertDialogProps } from \"@kirana-ui/core/alert-dialog\"\nimport { createDialog } from \"@kirana-ui/core/dialog\"\nimport { createDrawer } from \"@kirana-ui/core/drawer\"\nimport type { DrawerProps } from \"@kirana-ui/core/drawer\"\nimport type { Dialog as Controller, DialogProps } from \"@kirana-ui/core/dialog\"\nimport type { Vocabulary } from \"@kirana-ui/core/vocabulary\"\nimport { createContext, useContext } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { Portal as BodyPortal, parts, useController, usePart, useSignal } from \"./runtime.tsx\"\nimport type { PartComponentProps, PortalProps } from \"./runtime.tsx\"\n\nexport type { PortalProps }\n\ntype Parts = Vocabulary[\"dialog\"]\n\nconst Context = createContext<Controller | null>(null)\n\nfunction useDialog(part: string): Controller {\n const controller = useContext(Context)\n if (!controller) throw new Error(`<Dialog.${part}> must be inside <Dialog.Root>`)\n return controller\n}\n\nexport type RootProps = Omit<DialogProps, \"id\"> & { id?: string; children?: ReactNode }\n\nfunction Root({ children, ...props }: RootProps): ReactElement {\n const controller = useController(createDialog, props)\n return <Context.Provider value={controller}>{children}</Context.Provider>\n}\n\nfunction Portal({ children }: PortalProps): ReactElement | null {\n const mounted = useSignal(useDialog(\"Portal\").mounted)\n return mounted ? <BodyPortal>{children}</BodyPortal> : null\n}\n\nexport type TriggerProps = PartComponentProps<\"button\", StateOf<Parts[\"trigger\"]>>\nexport type BackdropProps = PartComponentProps<\"div\", StateOf<Parts[\"backdrop\"]>>\nexport type PopupProps = PartComponentProps<\"div\", StateOf<Parts[\"popup\"]>>\nexport type TitleProps = PartComponentProps<\"h2\", StateOf<Parts[\"title\"]>>\nexport type DescriptionProps = PartComponentProps<\"p\", StateOf<Parts[\"description\"]>>\nexport type CloseProps = PartComponentProps<\"button\", StateOf<Parts[\"close\"]>>\n\nconst Trigger = (props: TriggerProps) => usePart(useDialog(\"Trigger\").trigger, \"button\", props)\nconst Backdrop = (props: BackdropProps) => usePart(useDialog(\"Backdrop\").backdrop, \"div\", props)\nconst Popup = (props: PopupProps) => usePart(useDialog(\"Popup\").popup, \"div\", props)\nconst Title = (props: TitleProps) => usePart(useDialog(\"Title\").title, \"h2\", props)\nconst Description = (props: DescriptionProps) =>\n usePart(useDialog(\"Description\").description, \"p\", props)\nconst Close = (props: CloseProps) => usePart(useDialog(\"Close\").close, \"button\", props)\n\nexport const Dialog = /* @__PURE__ */ parts(\"Dialog\", {\n Root,\n Trigger,\n Portal,\n Backdrop,\n Popup,\n Title,\n Description,\n Close,\n})\n\nexport type AlertRootProps = Omit<AlertDialogProps, \"id\"> & { id?: string; children?: ReactNode }\n\nfunction AlertRoot({ children, ...props }: AlertRootProps): ReactElement {\n const controller = useController(createAlertDialog, props)\n return <Context.Provider value={controller}>{children}</Context.Provider>\n}\n\n/** A dialog that asks for an answer: a press outside it does not close it. Its parts are a dialog's. */\nexport const AlertDialog = /* @__PURE__ */ parts(\"AlertDialog\", { ...Dialog, Root: AlertRoot })\n\nexport type DrawerRootProps = Omit<DrawerProps, \"id\"> & { id?: string; children?: ReactNode }\n\nfunction DrawerRoot({ children, ...props }: DrawerRootProps): ReactElement {\n const controller = useController(createDrawer, props)\n return <Context.Provider value={controller}>{children}</Context.Provider>\n}\n\ntype DrawerParts = Vocabulary[\"drawer\"]\n\nexport type DrawerBackdropProps = PartComponentProps<\"div\", StateOf<DrawerParts[\"backdrop\"]>>\nexport type DrawerPopupProps = PartComponentProps<\"div\", StateOf<DrawerParts[\"popup\"]>>\n\n// A dialog's, which a drawer's controller gives more to say: how far it has been dragged.\nconst DrawerBackdrop: (props: DrawerBackdropProps) => ReactElement = Dialog.Backdrop\nconst DrawerPopup: (props: DrawerPopupProps) => ReactElement = Dialog.Popup\n\n/** A dialog that comes from an edge and is dragged back to it. Its parts are a dialog's. */\nexport const Drawer = /* @__PURE__ */ parts(\"Drawer\", {\n ...Dialog,\n Root: DrawerRoot,\n Backdrop: DrawerBackdrop,\n Popup: DrawerPopup,\n})\n"],"mappings":";;;;;;;AAkBA,MAAM,UAAU,cAAiC,IAAI;AAErD,SAAS,UAAU,MAA0B;CAC3C,MAAM,aAAa,WAAW,OAAO;CACrC,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM,WAAW,KAAK,+BAA+B;CAChF,OAAO;AACT;AAIA,SAAS,KAAK,EAAE,UAAU,GAAG,SAAkC;CAC7D,MAAM,aAAa,cAAc,cAAc,KAAK;CACpD,OAAO,oBAAC,QAAQ,UAAT;EAAkB,OAAO;EAAa;CAA2B,CAAA;AAC1E;AAEA,SAAS,OAAO,EAAE,YAA8C;CAE9D,OADgB,UAAU,UAAU,QAAQ,CAAC,CAAC,OACjC,IAAI,oBAACA,UAAD,EAAa,SAAqB,CAAA,IAAI;AACzD;AASA,MAAM,WAAW,UAAwB,QAAQ,UAAU,SAAS,CAAC,CAAC,SAAS,UAAU,KAAK;AAC9F,MAAM,YAAY,UAAyB,QAAQ,UAAU,UAAU,CAAC,CAAC,UAAU,OAAO,KAAK;AAC/F,MAAM,SAAS,UAAsB,QAAQ,UAAU,OAAO,CAAC,CAAC,OAAO,OAAO,KAAK;AACnF,MAAM,SAAS,UAAsB,QAAQ,UAAU,OAAO,CAAC,CAAC,OAAO,MAAM,KAAK;AAClF,MAAM,eAAe,UACnB,QAAQ,UAAU,aAAa,CAAC,CAAC,aAAa,KAAK,KAAK;AAC1D,MAAM,SAAS,UAAsB,QAAQ,UAAU,OAAO,CAAC,CAAC,OAAO,UAAU,KAAK;AAEtF,MAAa,SAAyB,sBAAM,UAAU;CACpD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAID,SAAS,UAAU,EAAE,UAAU,GAAG,SAAuC;CACvE,MAAM,aAAa,cAAc,mBAAmB,KAAK;CACzD,OAAO,oBAAC,QAAQ,UAAT;EAAkB,OAAO;EAAa;CAA2B,CAAA;AAC1E;;AAGA,MAAa,cAA8B,sBAAM,eAAe;CAAE,GAAG;CAAQ,MAAM;AAAU,CAAC;AAI9F,SAAS,WAAW,EAAE,UAAU,GAAG,SAAwC;CACzE,MAAM,aAAa,cAAc,cAAc,KAAK;CACpD,OAAO,oBAAC,QAAQ,UAAT;EAAkB,OAAO;EAAa;CAA2B,CAAA;AAC1E;AAQA,MAAM,iBAA+D,OAAO;AAC5E,MAAM,cAAyD,OAAO;;AAGtE,MAAa,SAAyB,sBAAM,UAAU;CACpD,GAAG;CACH,MAAM;CACN,UAAU;CACV,OAAO;AACT,CAAC"}
|
package/src/direction.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Direction } from "@kirana-ui/core";
|
|
2
2
|
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
/** What `DirectionProvider` takes. */
|
|
3
4
|
export interface DirectionProviderProps {
|
|
4
5
|
/** The reading direction of what is inside. `ltr` when left out. */
|
|
5
6
|
direction?: Direction;
|
package/src/direction.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DirectionContext } from "./direction-context.js";
|
|
2
2
|
import { useController, useSignal } from "./runtime.js";
|
|
3
3
|
import { signal } from "@kirana-ui/core";
|
|
4
|
-
import { createDirection } from "@kirana-ui/core/direction";
|
|
5
4
|
import { useContext, useState } from "react";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { createDirection } from "@kirana-ui/core/direction";
|
|
7
7
|
// src/direction.tsx
|
|
8
8
|
/**
|
|
9
9
|
* States the reading direction for the components inside. It draws nothing: set the page's own
|
package/src/direction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direction.js","names":[],"sources":["../../../../packages/react/src/direction.tsx"],"sourcesContent":["import { signal } from \"@kirana-ui/core\"\nimport type { Direction } from \"@kirana-ui/core\"\nimport { createDirection } from \"@kirana-ui/core/direction\"\nimport { useContext, useState } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { DirectionContext } from \"./direction-context.ts\"\nimport { useController, useSignal } from \"./runtime.tsx\"\n\nexport interface DirectionProviderProps {\n /** The reading direction of what is inside. `ltr` when left out. */\n direction?: Direction\n children?: ReactNode\n}\n\n/**\n * States the reading direction for the components inside. It draws nothing: set the page's own\n * `dir` attribute with it.\n */\nexport function DirectionProvider({ direction, children }: DirectionProviderProps): ReactElement {\n const controller = useController(createDirection, { direction })\n return (\n <DirectionContext.Provider value={controller.direction}>{children}</DirectionContext.Provider>\n )\n}\n\n/** The direction the nearest provider states; `ltr` outside one. */\nexport function useDirection(): Direction {\n const given = useContext(DirectionContext)\n const [fallback] = useState(() => signal<Direction>(\"ltr\"))\n return useSignal(given ?? fallback)\n}\n"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"direction.js","names":[],"sources":["../../../../packages/react/src/direction.tsx"],"sourcesContent":["import { signal } from \"@kirana-ui/core\"\nimport type { Direction } from \"@kirana-ui/core\"\nimport { createDirection } from \"@kirana-ui/core/direction\"\nimport { useContext, useState } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { DirectionContext } from \"./direction-context.ts\"\nimport { useController, useSignal } from \"./runtime.tsx\"\n\n/** What `DirectionProvider` takes. */\nexport interface DirectionProviderProps {\n /** The reading direction of what is inside. `ltr` when left out. */\n direction?: Direction\n children?: ReactNode\n}\n\n/**\n * States the reading direction for the components inside. It draws nothing: set the page's own\n * `dir` attribute with it.\n */\nexport function DirectionProvider({ direction, children }: DirectionProviderProps): ReactElement {\n const controller = useController(createDirection, { direction })\n return (\n <DirectionContext.Provider value={controller.direction}>{children}</DirectionContext.Provider>\n )\n}\n\n/** The direction the nearest provider states; `ltr` outside one. */\nexport function useDirection(): Direction {\n const given = useContext(DirectionContext)\n const [fallback] = useState(() => signal<Direction>(\"ltr\"))\n return useSignal(given ?? fallback)\n}\n"],"mappings":";;;;;;;;;;;AAoBA,SAAgB,kBAAkB,EAAE,WAAW,YAAkD;CAC/F,MAAM,aAAa,cAAc,iBAAiB,EAAE,UAAU,CAAC;CAC/D,OACE,oBAAC,iBAAiB,UAAlB;EAA2B,OAAO,WAAW;EAAY;CAAoC,CAAA;AAEjG;;AAGA,SAAgB,eAA0B;CACxC,MAAM,QAAQ,WAAW,gBAAgB;CACzC,MAAM,CAAC,YAAY,eAAe,OAAkB,KAAK,CAAC;CAC1D,OAAO,UAAU,SAAS,QAAQ;AACpC"}
|
package/src/drawer.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PortalProps } from "./runtime.js";
|
|
2
|
+
import { CloseProps, DescriptionProps, Drawer, DrawerBackdropProps, DrawerPopupProps, DrawerRootProps, TitleProps, TriggerProps } from "./dialog.js";
|
|
3
|
+
export { type DrawerBackdropProps as BackdropProps, type CloseProps, type DescriptionProps, Drawer, type DrawerPopupProps as PopupProps, type PortalProps, type DrawerRootProps as RootProps, type TitleProps, type TriggerProps };
|
package/src/drawer.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Drawer } from "./dialog.js";
|
package/src/element.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement, Ref } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* React 19 keeps a ref among the props, an element's and a component's alike. Before, an
|
|
4
|
+
* element's ref was on the element (reading it there now warns), and a component was given
|
|
5
|
+
* its own only through `forwardRef`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const REF_IS_A_PROP: boolean;
|
|
8
|
+
/** The ref a caller put on an element it handed over as `render`. */
|
|
9
|
+
export declare function refOf(element: ReactElement): Ref<HTMLElement> | undefined;
|
|
10
|
+
/** Hands an element to a ref, whichever kind it is. */
|
|
11
|
+
export declare function give(ref: Ref<HTMLElement> | undefined, element: HTMLElement | null): void;
|
|
12
|
+
//# sourceMappingURL=element.d.ts.map
|
package/src/element.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { version } from "react";
|
|
2
|
+
// src/element.ts
|
|
3
|
+
/**
|
|
4
|
+
* React 19 keeps a ref among the props, an element's and a component's alike. Before, an
|
|
5
|
+
* element's ref was on the element (reading it there now warns), and a component was given
|
|
6
|
+
* its own only through `forwardRef`.
|
|
7
|
+
*/
|
|
8
|
+
const REF_IS_A_PROP = Number.parseInt(version, 10) >= 19;
|
|
9
|
+
/** The ref a caller put on an element it handed over as `render`. */
|
|
10
|
+
function refOf(element) {
|
|
11
|
+
return REF_IS_A_PROP ? element.props.ref : element.ref;
|
|
12
|
+
}
|
|
13
|
+
/** Hands an element to a ref, whichever kind it is. */
|
|
14
|
+
function give(ref, element) {
|
|
15
|
+
if (typeof ref === "function") ref(element);
|
|
16
|
+
else if (ref) ref.current = element;
|
|
17
|
+
}
|
|
18
|
+
export { REF_IS_A_PROP, give, refOf };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element.js","names":[],"sources":["../../../../packages/react/src/element.ts"],"sourcesContent":["import { version } from \"react\"\nimport type { ReactElement, Ref } from \"react\"\n\n/**\n * React 19 keeps a ref among the props, an element's and a component's alike. Before, an\n * element's ref was on the element (reading it there now warns), and a component was given\n * its own only through `forwardRef`.\n */\nexport const REF_IS_A_PROP = Number.parseInt(version, 10) >= 19\n\n/** The ref a caller put on an element it handed over as `render`. */\nexport function refOf(element: ReactElement): Ref<HTMLElement> | undefined {\n return REF_IS_A_PROP\n ? (element.props as { ref?: Ref<HTMLElement> }).ref\n : (element as { ref?: Ref<HTMLElement> }).ref\n}\n\n/** Hands an element to a ref, whichever kind it is. */\nexport function give(ref: Ref<HTMLElement> | undefined, element: HTMLElement | null): void {\n if (typeof ref === \"function\") ref(element)\n else if (ref) (ref as { current: HTMLElement | null }).current = element\n}\n"],"mappings":";;;;;;;AAQA,MAAa,gBAAgB,OAAO,SAAS,SAAS,EAAE,KAAK;;AAG7D,SAAgB,MAAM,SAAqD;CACzE,OAAO,gBACF,QAAQ,MAAqC,MAC7C,QAAuC;AAC9C;;AAGA,SAAgB,KAAK,KAAmC,SAAmC;CACzF,IAAI,OAAO,QAAQ,YAAY,IAAI,OAAO;MACrC,IAAI,KAAK,IAAyC,UAAU;AACnE"}
|
package/src/field.d.ts
CHANGED
|
@@ -1,31 +1,39 @@
|
|
|
1
1
|
import { PartComponentProps } from "./runtime.js";
|
|
2
|
+
import { StateOf } from "@kirana-ui/core";
|
|
2
3
|
import { ReactElement, ReactNode } from "react";
|
|
3
4
|
import { FieldProps, FieldValidity, ValidityKey } from "@kirana-ui/core/field";
|
|
4
|
-
|
|
5
|
+
import { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
6
|
+
type Parts = Vocabulary["field"];
|
|
7
|
+
export type RootProps = PartComponentProps<"div", StateOf<Parts["root"]>, Omit<FieldProps, "id"> & {
|
|
5
8
|
id?: string;
|
|
6
|
-
}
|
|
9
|
+
}>;
|
|
7
10
|
declare function Root({ name, disabled, invalid, validate, validationMode, validationDebounceTime, id, ...rest }: RootProps): ReactElement;
|
|
8
|
-
|
|
11
|
+
export type LabelProps = PartComponentProps<"label", StateOf<Parts["label"]>>;
|
|
12
|
+
export type ControlProps = PartComponentProps<"input", StateOf<Parts["control"]>>;
|
|
13
|
+
export type DescriptionProps = PartComponentProps<"p", StateOf<Parts["description"]>>;
|
|
14
|
+
declare const Label: (props: LabelProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
9
15
|
/** An `<input>`; a `<textarea>` or a `<select>` through `render`. */
|
|
10
|
-
declare const Control: (props:
|
|
11
|
-
declare const Description: (props:
|
|
12
|
-
export
|
|
16
|
+
declare const Control: (props: ControlProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
17
|
+
declare const Description: (props: DescriptionProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
18
|
+
export type ErrorProps = PartComponentProps<"div", StateOf<Parts["error"]>, {
|
|
13
19
|
/** One of the browser's findings (`"valueMissing"`) to show for only that; `true` to show always. */
|
|
14
20
|
match?: ValidityKey | boolean;
|
|
15
|
-
}
|
|
21
|
+
}>;
|
|
16
22
|
/** What is wrong, or `children` in its place. In the page while it applies. */
|
|
17
23
|
declare function FieldError({ match, children, ...rest }: ErrorProps): ReactElement | null;
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
export interface ValidityProps {
|
|
25
|
+
/** Draws from the field's validity: whether it is valid, what was found wrong, the messages. */
|
|
20
26
|
children: (validity: FieldValidity) => ReactNode;
|
|
21
|
-
}
|
|
27
|
+
}
|
|
28
|
+
/** Draws nothing itself: `children` is given the field's validity. */
|
|
29
|
+
declare function Validity({ children }: ValidityProps): ReactNode;
|
|
22
30
|
export declare const Field: {
|
|
23
|
-
Root: typeof Root;
|
|
24
|
-
Label: typeof Label;
|
|
25
|
-
Control: typeof Control;
|
|
26
|
-
Description: typeof Description;
|
|
27
|
-
Error: typeof FieldError;
|
|
28
|
-
Validity: typeof Validity;
|
|
31
|
+
readonly Root: typeof Root;
|
|
32
|
+
readonly Label: typeof Label;
|
|
33
|
+
readonly Control: typeof Control;
|
|
34
|
+
readonly Description: typeof Description;
|
|
35
|
+
readonly Error: typeof FieldError;
|
|
36
|
+
readonly Validity: typeof Validity;
|
|
29
37
|
};
|
|
30
38
|
export {};
|
|
31
39
|
//# sourceMappingURL=field.d.ts.map
|
package/src/field.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FieldContext } from "./field-context.js";
|
|
2
2
|
import { FieldsetContext } from "./fieldset.js";
|
|
3
3
|
import { FormContext } from "./form.js";
|
|
4
|
-
import { useController, useOptions, usePart, useSignal } from "./runtime.js";
|
|
5
|
-
import { useContext,
|
|
4
|
+
import { PartElement, parts, useController, useMount, useOptions, usePart, useSignal } from "./runtime.js";
|
|
5
|
+
import { useContext, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { createField } from "@kirana-ui/core/field";
|
|
8
8
|
// src/field.tsx
|
|
@@ -29,26 +29,28 @@ function Root({ name, disabled, invalid, validate, validationMode, validationDeb
|
|
|
29
29
|
});
|
|
30
30
|
return /* @__PURE__ */ jsx(FieldContext.Provider, {
|
|
31
31
|
value: controller,
|
|
32
|
-
children: /* @__PURE__ */ jsx(
|
|
32
|
+
children: /* @__PURE__ */ jsx(PartElement, {
|
|
33
|
+
of: controller.root,
|
|
34
|
+
tag: "div",
|
|
35
|
+
...rest
|
|
36
|
+
})
|
|
33
37
|
});
|
|
34
38
|
}
|
|
35
|
-
const RootElement = (props) => usePart(useField("Root").root, "div", props);
|
|
36
39
|
const Label = (props) => usePart(useField("Label").label, "label", props);
|
|
37
40
|
/** An `<input>`; a `<textarea>` or a `<select>` through `render`. */
|
|
38
41
|
const Control = (props) => usePart(useField("Control").control, "input", props);
|
|
39
42
|
const Description = (props) => usePart(useField("Description").description, "p", props);
|
|
40
|
-
const PartElement = ({ part, tag, ...props }) => usePart(part, tag, props);
|
|
41
43
|
/** What is wrong, or `children` in its place. In the page while it applies. */
|
|
42
44
|
function FieldError({ match, children, ...rest }) {
|
|
43
45
|
const controller = useField("Error");
|
|
44
46
|
const options = useOptions({ match });
|
|
45
47
|
const error = useMemo(() => controller.error(() => options.get().match), [controller, options]);
|
|
46
|
-
|
|
48
|
+
useMount(error);
|
|
47
49
|
const mounted = useSignal(error.mounted);
|
|
48
50
|
const text = useSignal(error.text);
|
|
49
51
|
if (!mounted) return null;
|
|
50
52
|
return /* @__PURE__ */ jsx(PartElement, {
|
|
51
|
-
|
|
53
|
+
of: error.part,
|
|
52
54
|
tag: "div",
|
|
53
55
|
...rest,
|
|
54
56
|
children: children ?? text
|
|
@@ -58,14 +60,14 @@ function FieldError({ match, children, ...rest }) {
|
|
|
58
60
|
function Validity({ children }) {
|
|
59
61
|
return children(useSignal(useField("Validity").validity));
|
|
60
62
|
}
|
|
61
|
-
const Field = {
|
|
63
|
+
const Field = /* @__PURE__ */ parts("Field", {
|
|
62
64
|
Root,
|
|
63
65
|
Label,
|
|
64
66
|
Control,
|
|
65
67
|
Description,
|
|
66
68
|
Error: FieldError,
|
|
67
69
|
Validity
|
|
68
|
-
};
|
|
70
|
+
});
|
|
69
71
|
export { Field };
|
|
70
72
|
|
|
71
73
|
//# sourceMappingURL=field.js.map
|
package/src/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","names":[],"sources":["../../../../packages/react/src/field.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"field.js","names":[],"sources":["../../../../packages/react/src/field.tsx"],"sourcesContent":["import type { ReadonlySignal, StateOf } from \"@kirana-ui/core\"\nimport { createField } from \"@kirana-ui/core/field\"\nimport type {\n Field as Controller,\n FieldProps,\n FieldValidity,\n ValidityKey,\n} from \"@kirana-ui/core/field\"\nimport type { Vocabulary } from \"@kirana-ui/core/vocabulary\"\nimport { useContext, useMemo } from \"react\"\nimport type { ReactElement, ReactNode } from \"react\"\n\nimport { FieldContext } from \"./field-context.ts\"\nimport { FieldsetContext } from \"./fieldset.tsx\"\nimport { FormContext } from \"./form.tsx\"\nimport {\n PartElement,\n parts,\n useController,\n useMount,\n useOptions,\n usePart,\n useSignal,\n} from \"./runtime.tsx\"\nimport type { PartComponentProps } from \"./runtime.tsx\"\n\ntype Parts = Vocabulary[\"field\"]\n\nfunction useField(part: string): Controller {\n const controller = useContext(FieldContext)\n if (!controller) throw new Error(`<Field.${part}> must be inside <Field.Root>`)\n return controller\n}\n\nexport type RootProps = PartComponentProps<\n \"div\",\n StateOf<Parts[\"root\"]>,\n Omit<FieldProps, \"id\"> & { id?: string }\n>\n\nfunction Root({\n name,\n disabled,\n invalid,\n validate,\n validationMode,\n validationDebounceTime,\n id,\n ...rest\n}: RootProps): ReactElement {\n const form = useContext(FormContext) ?? undefined\n const fieldset = useContext(FieldsetContext) ?? undefined\n const create = useMemo(\n () => (props: ReadonlySignal<FieldProps>) => createField(props, { form, fieldset }),\n [form, fieldset]\n )\n const controller = useController(create, {\n name,\n disabled,\n invalid,\n validate,\n validationMode,\n validationDebounceTime,\n id,\n })\n return (\n <FieldContext.Provider value={controller}>\n <PartElement of={controller.root} tag=\"div\" {...rest} />\n </FieldContext.Provider>\n )\n}\n\nexport type LabelProps = PartComponentProps<\"label\", StateOf<Parts[\"label\"]>>\nexport type ControlProps = PartComponentProps<\"input\", StateOf<Parts[\"control\"]>>\nexport type DescriptionProps = PartComponentProps<\"p\", StateOf<Parts[\"description\"]>>\n\nconst Label = (props: LabelProps) => usePart(useField(\"Label\").label, \"label\", props)\n/** An `<input>`; a `<textarea>` or a `<select>` through `render`. */\nconst Control = (props: ControlProps) => usePart(useField(\"Control\").control, \"input\", props)\nconst Description = (props: DescriptionProps) =>\n usePart(useField(\"Description\").description, \"p\", props)\n\nexport type ErrorProps = PartComponentProps<\n \"div\",\n StateOf<Parts[\"error\"]>,\n {\n /** One of the browser's findings (`\"valueMissing\"`) to show for only that; `true` to show always. */\n match?: ValidityKey | boolean\n }\n>\n\n/** What is wrong, or `children` in its place. In the page while it applies. */\nfunction FieldError({ match, children, ...rest }: ErrorProps): ReactElement | null {\n const controller = useField(\"Error\")\n const options = useOptions({ match })\n const error = useMemo(() => controller.error(() => options.get().match), [controller, options])\n useMount(error)\n const mounted = useSignal(error.mounted)\n const text = useSignal(error.text)\n if (!mounted) return null\n return (\n <PartElement of={error.part} tag=\"div\" {...rest}>\n {children ?? text}\n </PartElement>\n )\n}\n\nexport interface ValidityProps {\n /** Draws from the field's validity: whether it is valid, what was found wrong, the messages. */\n children: (validity: FieldValidity) => ReactNode\n}\n\n/** Draws nothing itself: `children` is given the field's validity. */\nfunction Validity({ children }: ValidityProps): ReactNode {\n return children(useSignal(useField(\"Validity\").validity))\n}\n\nexport const Field = /* @__PURE__ */ parts(\"Field\", {\n Root,\n Label,\n Control,\n Description,\n Error: FieldError,\n Validity,\n})\n"],"mappings":";;;;;;;;AA4BA,SAAS,SAAS,MAA0B;CAC1C,MAAM,aAAa,WAAW,YAAY;CAC1C,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM,UAAU,KAAK,8BAA8B;CAC9E,OAAO;AACT;AAQA,SAAS,KAAK,EACZ,MACA,UACA,SACA,UACA,gBACA,wBACA,IACA,GAAG,QACuB;CAC1B,MAAM,OAAO,WAAW,WAAW,KAAK,KAAA;CACxC,MAAM,WAAW,WAAW,eAAe,KAAK,KAAA;CAChD,MAAM,SAAS,eACN,UAAsC,YAAY,OAAO;EAAE;EAAM;CAAS,CAAC,GAClF,CAAC,MAAM,QAAQ,CACjB;CACA,MAAM,aAAa,cAAc,QAAQ;EACvC;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO;EAC5B,UAAA,oBAAC,aAAD;GAAa,IAAI,WAAW;GAAM,KAAI;GAAM,GAAI;EAAO,CAAA;CAClC,CAAA;AAE3B;AAMA,MAAM,SAAS,UAAsB,QAAQ,SAAS,OAAO,CAAC,CAAC,OAAO,SAAS,KAAK;;AAEpF,MAAM,WAAW,UAAwB,QAAQ,SAAS,SAAS,CAAC,CAAC,SAAS,SAAS,KAAK;AAC5F,MAAM,eAAe,UACnB,QAAQ,SAAS,aAAa,CAAC,CAAC,aAAa,KAAK,KAAK;;AAYzD,SAAS,WAAW,EAAE,OAAO,UAAU,GAAG,QAAyC;CACjF,MAAM,aAAa,SAAS,OAAO;CACnC,MAAM,UAAU,WAAW,EAAE,MAAM,CAAC;CACpC,MAAM,QAAQ,cAAc,WAAW,YAAY,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,YAAY,OAAO,CAAC;CAC9F,SAAS,KAAK;CACd,MAAM,UAAU,UAAU,MAAM,OAAO;CACvC,MAAM,OAAO,UAAU,MAAM,IAAI;CACjC,IAAI,CAAC,SAAS,OAAO;CACrB,OACE,oBAAC,aAAD;EAAa,IAAI,MAAM;EAAM,KAAI;EAAM,GAAI;EACxC,UAAA,YAAY;CACF,CAAA;AAEjB;;AAQA,SAAS,SAAS,EAAE,YAAsC;CACxD,OAAO,SAAS,UAAU,SAAS,UAAU,CAAC,CAAC,QAAQ,CAAC;AAC1D;AAEA,MAAa,QAAwB,sBAAM,SAAS;CAClD;CACA;CACA;CACA;CACA,OAAO;CACP;AACF,CAAC"}
|
package/src/fieldset.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { PartComponentProps } from "./runtime.js";
|
|
2
|
+
import { StateOf } from "@kirana-ui/core";
|
|
2
3
|
import { ReactElement } from "react";
|
|
3
4
|
import { Fieldset as Fieldset$1, FieldsetProps } from "@kirana-ui/core/fieldset";
|
|
5
|
+
import { Vocabulary } from "@kirana-ui/core/vocabulary";
|
|
6
|
+
type Parts = Vocabulary["fieldset"];
|
|
4
7
|
/** The fieldset a field is in, if it is in one. */
|
|
5
8
|
export declare const FieldsetContext: import("react").Context<Fieldset$1 | null>;
|
|
6
|
-
|
|
9
|
+
export type RootProps = PartComponentProps<"fieldset", StateOf<Parts["root"]>, Omit<FieldsetProps, "id"> & {
|
|
7
10
|
id?: string;
|
|
8
|
-
}
|
|
9
|
-
declare
|
|
11
|
+
}>;
|
|
12
|
+
declare function Root({ disabled, id, ...rest }: RootProps): ReactElement;
|
|
13
|
+
export type LegendProps = PartComponentProps<"div", StateOf<Parts["legend"]>>;
|
|
14
|
+
declare const Legend: (props: LegendProps) => ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
15
|
export declare const Fieldset: {
|
|
11
|
-
Root: typeof Root;
|
|
12
|
-
Legend: typeof Legend;
|
|
16
|
+
readonly Root: typeof Root;
|
|
17
|
+
readonly Legend: typeof Legend;
|
|
13
18
|
};
|
|
14
19
|
export {};
|
|
15
20
|
//# sourceMappingURL=fieldset.d.ts.map
|
package/src/fieldset.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useController, usePart } from "./runtime.js";
|
|
1
|
+
import { parts, useController, usePart } from "./runtime.js";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createFieldset } from "@kirana-ui/core/fieldset";
|
|
@@ -17,15 +17,14 @@ function Root({ disabled, id, ...rest }) {
|
|
|
17
17
|
});
|
|
18
18
|
return /* @__PURE__ */ jsx(FieldsetContext.Provider, {
|
|
19
19
|
value: controller,
|
|
20
|
-
children:
|
|
20
|
+
children: usePart(controller.root, "fieldset", rest)
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const RootElement = (props) => usePart(useFieldset("Root").root, "fieldset", props);
|
|
24
23
|
const Legend = (props) => usePart(useFieldset("Legend").legend, "div", props);
|
|
25
|
-
const Fieldset = {
|
|
24
|
+
const Fieldset = /* @__PURE__ */ parts("Fieldset", {
|
|
26
25
|
Root,
|
|
27
26
|
Legend
|
|
28
|
-
};
|
|
27
|
+
});
|
|
29
28
|
export { Fieldset, FieldsetContext };
|
|
30
29
|
|
|
31
30
|
//# sourceMappingURL=fieldset.js.map
|
package/src/fieldset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset.js","names":[],"sources":["../../../../packages/react/src/fieldset.tsx"],"sourcesContent":["import { createFieldset } from \"@kirana-ui/core/fieldset\"\nimport type { Fieldset as Controller, FieldsetProps } from \"@kirana-ui/core/fieldset\"\nimport { createContext, useContext } from \"react\"\nimport type { ReactElement } from \"react\"\n\nimport { useController, usePart } from \"./runtime.tsx\"\nimport type { PartComponentProps } from \"./runtime.tsx\"\n\n/** The fieldset a field is in, if it is in one. */\nexport const FieldsetContext = createContext<Controller | null>(null)\n\nfunction useFieldset(part: string): Controller {\n const controller = useContext(FieldsetContext)\n if (!controller) throw new Error(`<Fieldset.${part}> must be inside <Fieldset.Root>`)\n return controller\n}\n\
|
|
1
|
+
{"version":3,"file":"fieldset.js","names":[],"sources":["../../../../packages/react/src/fieldset.tsx"],"sourcesContent":["import type { StateOf } from \"@kirana-ui/core\"\nimport { createFieldset } from \"@kirana-ui/core/fieldset\"\nimport type { Fieldset as Controller, FieldsetProps } from \"@kirana-ui/core/fieldset\"\nimport type { Vocabulary } from \"@kirana-ui/core/vocabulary\"\nimport { createContext, useContext } from \"react\"\nimport type { ReactElement } from \"react\"\n\nimport { parts, useController, usePart } from \"./runtime.tsx\"\nimport type { PartComponentProps } from \"./runtime.tsx\"\n\ntype Parts = Vocabulary[\"fieldset\"]\n\n/** The fieldset a field is in, if it is in one. */\nexport const FieldsetContext = createContext<Controller | null>(null)\n\nfunction useFieldset(part: string): Controller {\n const controller = useContext(FieldsetContext)\n if (!controller) throw new Error(`<Fieldset.${part}> must be inside <Fieldset.Root>`)\n return controller\n}\n\nexport type RootProps = PartComponentProps<\n \"fieldset\",\n StateOf<Parts[\"root\"]>,\n Omit<FieldsetProps, \"id\"> & { id?: string }\n>\n\nfunction Root({ disabled, id, ...rest }: RootProps): ReactElement {\n const controller = useController(createFieldset, { disabled, id })\n return (\n <FieldsetContext.Provider value={controller}>\n {usePart(controller.root, \"fieldset\", rest)}\n </FieldsetContext.Provider>\n )\n}\n\nexport type LegendProps = PartComponentProps<\"div\", StateOf<Parts[\"legend\"]>>\n\nconst Legend = (props: LegendProps) => usePart(useFieldset(\"Legend\").legend, \"div\", props)\n\nexport const Fieldset = /* @__PURE__ */ parts(\"Fieldset\", { Root, Legend })\n"],"mappings":";;;;;;AAaA,MAAa,kBAAkB,cAAiC,IAAI;AAEpE,SAAS,YAAY,MAA0B;CAC7C,MAAM,aAAa,WAAW,eAAe;CAC7C,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM,aAAa,KAAK,iCAAiC;CACpF,OAAO;AACT;AAQA,SAAS,KAAK,EAAE,UAAU,IAAI,GAAG,QAAiC;CAChE,MAAM,aAAa,cAAc,gBAAgB;EAAE;EAAU;CAAG,CAAC;CACjE,OACE,oBAAC,gBAAgB,UAAjB;EAA0B,OAAO;EAC9B,UAAA,QAAQ,WAAW,MAAM,YAAY,IAAI;CAClB,CAAA;AAE9B;AAIA,MAAM,UAAU,UAAuB,QAAQ,YAAY,QAAQ,CAAC,CAAC,QAAQ,OAAO,KAAK;AAEzF,MAAa,WAA2B,sBAAM,YAAY;CAAE;CAAM;AAAO,CAAC"}
|