@giddaa-housing/ui 2.1.0 → 3.0.1

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 (70) hide show
  1. package/css/generated/shared.css +1 -1
  2. package/css/theme.css +24 -0
  3. package/dist/accordion.js +1 -1
  4. package/dist/badge.js +1 -0
  5. package/dist/breadcrumb.js +1 -0
  6. package/dist/{button-BZIeyUw6.d.ts → button-DW5OijoR.d.ts} +1 -1
  7. package/dist/button-group.d.ts +1 -1
  8. package/dist/button-group.js +3 -2
  9. package/dist/button.d.ts +1 -1
  10. package/dist/button.js +5 -3
  11. package/dist/call-card.d.ts +131 -0
  12. package/dist/call-card.js +300 -0
  13. package/dist/card.js +1 -0
  14. package/dist/carousel.js +12 -9
  15. package/dist/chat.d.ts +208 -0
  16. package/dist/chat.js +528 -0
  17. package/dist/checkbox.js +1 -1
  18. package/dist/combobox.js +1 -1
  19. package/dist/cta.d.ts +1 -1
  20. package/dist/cta.js +1 -0
  21. package/dist/data-table.d.ts +1 -1
  22. package/dist/details-card.js +1 -0
  23. package/dist/dialog.js +2 -2
  24. package/dist/dropdown-menu.js +1 -1
  25. package/dist/editorial-card.js +1 -0
  26. package/dist/file-upload.js +3 -3
  27. package/dist/footer.js +1 -0
  28. package/dist/infinite-scroll.js +1 -1
  29. package/dist/infotip.js +1 -1
  30. package/dist/input-group.d.ts +1 -1
  31. package/dist/input.js +1 -0
  32. package/dist/item.js +1 -0
  33. package/dist/kpi-card.js +1 -0
  34. package/dist/media-player.js +15 -8
  35. package/dist/message.d.ts +263 -0
  36. package/dist/message.js +524 -0
  37. package/dist/multi-step-form.js +10 -6
  38. package/dist/number-input.js +1 -0
  39. package/dist/page-header.d.ts +6 -6
  40. package/dist/page-header.js +21 -7
  41. package/dist/pagination.d.ts +1 -1
  42. package/dist/password-input.js +1 -0
  43. package/dist/popover.js +1 -1
  44. package/dist/price-tag.js +1 -1
  45. package/dist/property-listing-card.d.ts +1 -1
  46. package/dist/property-listing-card.js +1 -0
  47. package/dist/purchase-option-card.js +1 -0
  48. package/dist/radio-group.js +1 -1
  49. package/dist/review-block.js +1 -0
  50. package/dist/rich-text-editor.js +3 -3
  51. package/dist/search-input.js +1 -0
  52. package/dist/select.js +1 -1
  53. package/dist/sheet.js +1 -1
  54. package/dist/sidebar.d.ts +1 -1
  55. package/dist/sidebar.js +5 -5
  56. package/dist/skeleton.js +1 -1
  57. package/dist/slider.js +3 -2
  58. package/dist/stepper.js +1 -0
  59. package/dist/styles.css +1870 -162
  60. package/dist/switch.js +3 -3
  61. package/dist/table-card.js +1 -0
  62. package/dist/tabs.js +2 -2
  63. package/dist/testimonial-block.js +1 -0
  64. package/dist/textarea.js +1 -0
  65. package/dist/time-picker.js +85 -7
  66. package/dist/toast.js +1 -1
  67. package/dist/tooltip.d.ts +2 -1
  68. package/dist/tooltip.js +9 -2
  69. package/dist/use-reduced-motion-BDvOK14x.js +17 -0
  70. package/package.json +13 -1
package/dist/chat.d.ts ADDED
@@ -0,0 +1,208 @@
1
+ import { t as Button } from "./button-DW5OijoR.js";
2
+ import { InputGroupAddon, InputGroupButton, InputGroupInput } from "./input-group.js";
3
+ import * as React from "react";
4
+ //#region src/chat.d.ts
5
+ type ChatProps = React.ComponentProps<"section">;
6
+ /**
7
+ * The chat shell — a column of header, body and footer.
8
+ *
9
+ * **It sets no height on purpose.** The consumer decides: `h-[708px]`, `h-full`,
10
+ * `h-dvh`. Note that `ChatBody` can only scroll inside a bounded height — give
11
+ * this element one, or the body grows with its content and the page scrolls
12
+ * instead.
13
+ *
14
+ * Header and footer sit outside the scrolling region, so they never move and
15
+ * never need measuring. Anything that should pin *within* the scroll — tabs, a
16
+ * filter row — belongs in `ChatBodyBar`.
17
+ */
18
+ declare function Chat({ className, ...props }: ChatProps): React.JSX.Element;
19
+ type ChatHeaderProps = React.ComponentProps<"header">;
20
+ /**
21
+ * The fixed header. Composes anything — avatar, title, actions, a sentiment bar.
22
+ *
23
+ * Its own height is free: it can wrap, gain a row, or lose one, and nothing
24
+ * downstream cares. Only the body scrolls.
25
+ */
26
+ declare function ChatHeader({ className, ...props }: ChatHeaderProps): React.JSX.Element;
27
+ type ChatHeaderTitleProps = React.ComponentProps<"h2">;
28
+ /** The header's primary line — who the conversation is with. */
29
+ declare function ChatHeaderTitle({ className, ...props }: ChatHeaderTitleProps): React.JSX.Element;
30
+ type ChatHeaderDescriptionProps = React.ComponentProps<"p">;
31
+ /** The header's secondary line — timezone, status, last seen. */
32
+ declare function ChatHeaderDescription({ className, ...props }: ChatHeaderDescriptionProps): React.JSX.Element;
33
+ type ChatHeaderIdentityProps = React.ComponentProps<"div">;
34
+ /** Avatar and contact copy. Fills the space between navigation and actions. */
35
+ declare function ChatHeaderIdentity({ className, ...props }: ChatHeaderIdentityProps): React.JSX.Element;
36
+ type ChatHeaderTextProps = React.ComponentProps<"div">;
37
+ /** Stacks the contact name and presence line at the Figma one-pixel gap. */
38
+ declare function ChatHeaderText({ className, ...props }: ChatHeaderTextProps): React.JSX.Element;
39
+ type ChatHeaderActionsProps = React.ComponentProps<"div">;
40
+ /** Trailing icon actions such as video and voice calling. */
41
+ declare function ChatHeaderActions({ className, ...props }: ChatHeaderActionsProps): React.JSX.Element;
42
+ interface ChatHeaderActionProps extends React.ComponentProps<typeof Button> {
43
+ "aria-label": string;
44
+ }
45
+ /** A 24px header affordance. The caller supplies the icon and behaviour. */
46
+ declare function ChatHeaderAction({ className, size, variant, ...props }: ChatHeaderActionProps): React.JSX.Element;
47
+ type ChatFooterProps = React.ComponentProps<"footer">;
48
+ /**
49
+ * The fixed footer. Wraps `ChatInput`, and owns only the chrome around it —
50
+ * the rule and the surface. The composer owns its internal bar padding.
51
+ */
52
+ declare function ChatFooter({ className, ...props }: ChatFooterProps): React.JSX.Element;
53
+ type ChatBodyContextValue = {
54
+ /** True while the view is following new content at the bottom. */
55
+ isPinned: boolean;
56
+ scrollToBottom: (behavior?: ScrollBehavior) => void;
57
+ };
58
+ /**
59
+ * Read the body's scroll state — for a "jump to bottom" or "N new messages"
60
+ * affordance. Must be called inside `<ChatBody>`.
61
+ */
62
+ declare function useChatBody(): ChatBodyContextValue;
63
+ type ChatBodyProps = React.ComponentProps<"div">;
64
+ /**
65
+ * The scrolling region of a chat. Composes anything — messages, a table, an
66
+ * empty state. It owns scrolling and nothing else.
67
+ *
68
+ * Two behaviours, and they are the whole point:
69
+ *
70
+ * **Following.** New content keeps the bottom in view — but only while the
71
+ * reader is already there. Any deliberate scroll upward hands control over
72
+ * immediately; returning to the bottom hands it back. It never yanks.
73
+ *
74
+ * **Prepend.** When older messages load in above, the row you were reading
75
+ * stays exactly where it was. This works by remembering an element and its
76
+ * offset from the viewport, then putting it back after the layout changes —
77
+ * which holds no matter where the content grew.
78
+ *
79
+ * Both are driven by one `ResizeObserver` on the content, so they also cover an
80
+ * image finishing its load or a bubble reflowing — things a dependency on a
81
+ * message array cannot see. It fires once on observe, which is what opens the
82
+ * view at the latest message.
83
+ *
84
+ * Children may use `sticky top-0` (see `ChatBodyBar`) — this is their scroll
85
+ * container.
86
+ */
87
+ declare function ChatBody({ className, children, onScroll, ref, ...props }: ChatBodyProps): React.JSX.Element;
88
+ type ChatBodyBarProps = React.ComponentProps<"div">;
89
+ /**
90
+ * A bar pinned to the top of the scrolling region — tabs, a filter row, a date
91
+ * header. Content scrolls behind it.
92
+ *
93
+ * It needs an opaque background to hide what passes under it; `bg-canvas`
94
+ * matches the panel surface and can be overridden.
95
+ */
96
+ declare function ChatBodyBar({ className, ...props }: ChatBodyBarProps): React.JSX.Element;
97
+ type ChatDateDividerProps = React.ComponentProps<"time">;
98
+ type ChatDateSectionProps = React.ComponentProps<"section">;
99
+ /**
100
+ * Bounds one dated group so its sticky divider is pushed away by the next
101
+ * section instead of stacking with it.
102
+ */
103
+ declare function ChatDateSection({ className, ...props }: ChatDateSectionProps): React.JSX.Element;
104
+ /** Sticky date pill for the messages in its containing `ChatDateSection`. */
105
+ declare function ChatDateDivider({ className, ...props }: ChatDateDividerProps): React.JSX.Element;
106
+ /** The built-in attachment kinds. Custom items may use any string. */
107
+ type ChatInputAttachKind = "file" | "video" | "image";
108
+ interface ChatInputAttachItem {
109
+ /** Stable identifier handed back to `onAttach`, and the React key. */
110
+ kind: string;
111
+ /** Menu label. */
112
+ label: string;
113
+ /** Menu icon. */
114
+ icon?: React.ReactNode;
115
+ /**
116
+ * File types this item picks, e.g. `"image/*"` or `".pdf,.doc"`. Choosing the
117
+ * item opens a filtered picker and fires `onAttach`. Omit for a non-file
118
+ * action and pair with `onSelect`.
119
+ */
120
+ accept?: string;
121
+ /**
122
+ * Runs when the item is chosen, instead of opening a file picker — for
123
+ * non-file actions like "Share location" or "Send contact". Takes precedence
124
+ * over `accept`.
125
+ */
126
+ onSelect?: () => void;
127
+ }
128
+ /**
129
+ * The default menu — File, Video, Image. Spread it to *extend* rather than
130
+ * replace: `items={[...defaultChatInputAttachItems, { kind: "document", … }]}`.
131
+ */
132
+ declare const defaultChatInputAttachItems: ChatInputAttachItem[];
133
+ interface ChatInputProps extends Omit<React.ComponentProps<"form">, "onSubmit" | "defaultValue"> {
134
+ /** Controlled value. Omit for uncontrolled. */
135
+ value?: string;
136
+ /** Initial value when uncontrolled. */
137
+ defaultValue?: string;
138
+ /** Fires on every keystroke, controlled or not. */
139
+ onValueChange?: (value: string) => void;
140
+ /**
141
+ * Fires on submit — Enter, or the send button. Receives the trimmed text.
142
+ * Return `false` to keep an uncontrolled field's current value.
143
+ */
144
+ onSend?: (value: string) => unknown;
145
+ /** Clear an uncontrolled field after `onSend` accepts the value. @default true */
146
+ clearOnSend?: boolean;
147
+ /** Blocks typing, sending and attaching. */
148
+ disabled?: boolean;
149
+ }
150
+ /**
151
+ * The chat composer. A real `<form>`, so Enter and the send button are one
152
+ * submit path rather than two.
153
+ *
154
+ * Compose the parts inside it — the layout is yours, the behaviour is ours.
155
+ */
156
+ declare function ChatInput({ value, defaultValue, onValueChange, onSend, clearOnSend, disabled, className, children, ...props }: ChatInputProps): React.JSX.Element;
157
+ interface ChatInputAttachProps extends Omit<React.ComponentProps<typeof Button>, "disabled" | "onSelect" | "type"> {
158
+ /**
159
+ * Fires with the picked files and the kind that was asked for.
160
+ *
161
+ * This component selects; it does not upload. The send payload takes a URL,
162
+ * so the file has to be uploaded first — and that is domain work, not a
163
+ * shared primitive's job.
164
+ */
165
+ onAttach?: (files: File[], kind: string) => void;
166
+ /**
167
+ * The menu items. Defaults to File / Video / Image. Provide your own to add
168
+ * kinds (documents, location, a contact card, …) or reorder — spread
169
+ * {@link defaultChatInputAttachItems} to extend rather than replace. Items
170
+ * with `accept` open a filtered picker; items with `onSelect` run a custom
171
+ * action instead.
172
+ */
173
+ items?: ChatInputAttachItem[];
174
+ /** Styles the attachment dropdown rather than the trigger button. */
175
+ contentClassName?: string;
176
+ /** Disables the attachment picker in addition to the root disabled state. */
177
+ disabled?: boolean;
178
+ }
179
+ /** The `+` button. Opens a dropdown of file kinds, each opening a filtered picker. */
180
+ declare function ChatInputAttach({ onAttach, items, className, contentClassName, disabled: disabledProp, "aria-label": ariaLabel, children, size, variant, ...props }: ChatInputAttachProps): React.JSX.Element;
181
+ type ChatInputFieldProps = Omit<React.ComponentProps<typeof InputGroupInput>, "onChange" | "value">;
182
+ /**
183
+ * The single-line message field.
184
+ *
185
+ * Enter sends. The `isComposing` guard stops Enter from sending while an IME
186
+ * candidate is being confirmed.
187
+ */
188
+ declare function ChatInputField({ className, children, disabled: disabledProp, onKeyDown, type, ...props }: ChatInputFieldProps): React.JSX.Element;
189
+ interface ChatInputActionProps extends Omit<React.ComponentProps<typeof InputGroupButton>, "type"> {
190
+ /** Which side of the text field owns the action. @default "inline-start" */
191
+ align?: React.ComponentProps<typeof InputGroupAddon>["align"];
192
+ /** Styles the addon wrapper around the button. */
193
+ addonClassName?: string;
194
+ /** Required because this control is icon-only by default. */
195
+ "aria-label": string;
196
+ }
197
+ /**
198
+ * An accessible button inside the field — emoji, mic, whatever. The caller
199
+ * owns the action, while the component owns the input-group placement.
200
+ */
201
+ declare function ChatInputAction({ align, addonClassName, className, disabled: disabledProp, size, ...props }: ChatInputActionProps): React.JSX.Element;
202
+ type ChatInputSendProps = Omit<React.ComponentProps<typeof Button>, "disabled" | "type"> & {
203
+ disabled?: boolean;
204
+ };
205
+ /** Submit button. Disabled while empty — there is nothing to send. */
206
+ declare function ChatInputSend({ className, disabled: disabledProp, "aria-label": ariaLabel, size, variant, ...props }: ChatInputSendProps): React.JSX.Element;
207
+ //#endregion
208
+ export { Chat, ChatBody, ChatBodyBar, type ChatBodyBarProps, type ChatBodyProps, ChatDateDivider, type ChatDateDividerProps, ChatDateSection, type ChatDateSectionProps, ChatFooter, type ChatFooterProps, ChatHeader, ChatHeaderAction, type ChatHeaderActionProps, ChatHeaderActions, type ChatHeaderActionsProps, ChatHeaderDescription, type ChatHeaderDescriptionProps, ChatHeaderIdentity, type ChatHeaderIdentityProps, type ChatHeaderProps, ChatHeaderText, type ChatHeaderTextProps, ChatHeaderTitle, type ChatHeaderTitleProps, ChatInput, ChatInputAction, type ChatInputActionProps, ChatInputAttach, type ChatInputAttachItem, type ChatInputAttachKind, type ChatInputAttachProps, ChatInputField, type ChatInputFieldProps, type ChatInputProps, ChatInputSend, type ChatInputSendProps, type ChatProps, defaultChatInputAttachItems, useChatBody };