@giddaa-housing/ui 3.4.0 → 3.6.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 (190) hide show
  1. package/css/components.css +13 -0
  2. package/css/generated/shared.css +1 -1
  3. package/dist/accordion.js +1 -1
  4. package/dist/activity-timeline.js +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/auth-layout.js +1 -1
  7. package/dist/avatar.js +1 -1
  8. package/dist/badge.d.ts +5 -1
  9. package/dist/badge.js +20 -6
  10. package/dist/bar-chart.d.ts +1 -1
  11. package/dist/bar-chart.js +1 -1
  12. package/dist/breadcrumb.js +1 -1
  13. package/dist/bullet-chart.d.ts +1 -1
  14. package/dist/bullet-chart.js +1 -1
  15. package/dist/button-BS5KCibF.d.ts +33 -0
  16. package/dist/button-group.d.ts +1 -1
  17. package/dist/button-group.js +1 -1
  18. package/dist/button.d.ts +1 -1
  19. package/dist/button.js +50 -22
  20. package/dist/calendar.js +2 -2
  21. package/dist/call-card.js +1 -1
  22. package/dist/card.js +1 -1
  23. package/dist/carousel.d.ts +4 -2
  24. package/dist/carousel.js +13 -16
  25. package/dist/chart.d.ts +1 -1
  26. package/dist/chart.js +1 -1
  27. package/dist/chat.d.ts +1 -1
  28. package/dist/chat.js +1 -1
  29. package/dist/checkbox.d.ts +2 -2
  30. package/dist/checkbox.js +21 -7
  31. package/dist/collapsible.js +1 -1
  32. package/dist/combobox-CACVdp1R.js +430 -0
  33. package/dist/combobox.d.ts +9 -4
  34. package/dist/combobox.js +2 -309
  35. package/dist/cta.d.ts +1 -1
  36. package/dist/cta.js +1 -1
  37. package/dist/currency-selector.js +2 -2
  38. package/dist/data-table.d.ts +2 -2
  39. package/dist/data-table.js +1 -1
  40. package/dist/date-picker.d.ts +6 -5
  41. package/dist/date-picker.js +7 -17
  42. package/dist/details-card.js +1 -1
  43. package/dist/dialog.d.ts +3 -1
  44. package/dist/dialog.js +10 -6
  45. package/dist/dropdown-menu.d.ts +1 -1
  46. package/dist/dropdown-menu.js +1 -1
  47. package/dist/dropzone.js +1 -1
  48. package/dist/editorial-card.js +2 -4
  49. package/dist/empty-state.js +1 -1
  50. package/dist/field.d.ts +4 -1
  51. package/dist/field.js +29 -12
  52. package/dist/file-upload.js +1 -1
  53. package/dist/filter.js +1 -1
  54. package/dist/footer.d.ts +2 -2
  55. package/dist/footer.js +1 -1
  56. package/dist/funnel-chart.d.ts +1 -1
  57. package/dist/funnel-chart.js +1 -1
  58. package/dist/gallery-indicator.js +1 -1
  59. package/dist/heatmap-chart.d.ts +1 -1
  60. package/dist/icons-C9JXR5Xv.d.ts +111 -0
  61. package/dist/icons.d.ts +2 -93
  62. package/dist/icons.js +37 -1
  63. package/dist/image.d.ts +59 -0
  64. package/dist/image.js +53 -0
  65. package/dist/infinite-scroll.js +3 -29
  66. package/dist/infotip.js +1 -1
  67. package/dist/input-group.d.ts +6 -6
  68. package/dist/input-group.js +39 -14
  69. package/dist/input-otp.d.ts +2 -2
  70. package/dist/input-otp.js +32 -15
  71. package/dist/input-size-context-BMhves-J.d.ts +13 -0
  72. package/dist/input-size-context.d.ts +2 -2
  73. package/dist/input-size-context.js +9 -2
  74. package/dist/input.d.ts +20 -2
  75. package/dist/input.js +31 -12
  76. package/dist/item.js +1 -1
  77. package/dist/kpi-card.js +1 -1
  78. package/dist/label.js +1 -1
  79. package/dist/line-chart.d.ts +1 -1
  80. package/dist/line-chart.js +1 -1
  81. package/dist/list-item.js +1 -1
  82. package/dist/map-indicator.js +1 -1
  83. package/dist/mask-input.d.ts +1 -1
  84. package/dist/match.d.ts +5 -2
  85. package/dist/match.js +183 -27
  86. package/dist/media-gallery-hero.js +15 -10
  87. package/dist/media-player.js +5 -13
  88. package/dist/message.js +2 -12
  89. package/dist/mobile-sidebar.js +2 -1
  90. package/dist/multi-step-form.js +2 -2
  91. package/dist/number-input.d.ts +2 -2
  92. package/dist/number-input.js +3 -3
  93. package/dist/page-header.js +1 -1
  94. package/dist/pagination.d.ts +1 -1
  95. package/dist/pagination.js +1 -1
  96. package/dist/password-input.js +1 -1
  97. package/dist/phone-input.d.ts +2 -2
  98. package/dist/phone-input.js +16 -21
  99. package/dist/photo-gallery.js +6 -3
  100. package/dist/picker-BTXBrsl4.js +62 -0
  101. package/dist/picker-j3txxA5t.d.ts +14 -0
  102. package/dist/pie-chart.d.ts +1 -1
  103. package/dist/pie-chart.js +1 -1
  104. package/dist/popover-CNymD33m.d.ts +20 -0
  105. package/dist/popover.d.ts +1 -19
  106. package/dist/popover.js +1 -1
  107. package/dist/price-tag.d.ts +1 -1
  108. package/dist/price-tag.js +50 -22
  109. package/dist/progress.js +1 -1
  110. package/dist/property-listing-card.d.ts +68 -2
  111. package/dist/property-listing-card.js +115 -29
  112. package/dist/purchase-option-card.js +1 -1
  113. package/dist/radar-chart.d.ts +1 -1
  114. package/dist/radar-chart.js +1 -1
  115. package/dist/radio-group.d.ts +2 -2
  116. package/dist/radio-group.js +24 -10
  117. package/dist/review-block.js +1 -1
  118. package/dist/rich-text-editor.d.ts +1 -1
  119. package/dist/rich-text-editor.js +1 -1
  120. package/dist/scatter-chart.d.ts +1 -1
  121. package/dist/scatter-chart.js +1 -1
  122. package/dist/scroll-spy.d.ts +8 -2
  123. package/dist/scroll-spy.js +16 -16
  124. package/dist/search-input.js +1 -1
  125. package/dist/section-jumper.d.ts +31 -0
  126. package/dist/section-jumper.js +276 -0
  127. package/dist/select.d.ts +9 -4
  128. package/dist/select.js +113 -20
  129. package/dist/separator.js +1 -1
  130. package/dist/sheet.d.ts +3 -1
  131. package/dist/sheet.js +10 -6
  132. package/dist/sidebar.d.ts +2 -2
  133. package/dist/sidebar.js +4 -16
  134. package/dist/size-context-BVhHduLi.d.ts +33 -0
  135. package/dist/size-context.d.ts +2 -2
  136. package/dist/size-context.js +30 -1
  137. package/dist/skeleton.js +1 -1
  138. package/dist/slider.d.ts +5 -3
  139. package/dist/slider.js +26 -11
  140. package/dist/sonar.d.ts +1 -1
  141. package/dist/sonar.js +2 -2
  142. package/dist/sparkline.d.ts +1 -1
  143. package/dist/sparkline.js +1 -1
  144. package/dist/stepper.js +1 -1
  145. package/dist/styles.css +1622 -264
  146. package/dist/switch.d.ts +2 -2
  147. package/dist/switch.js +21 -7
  148. package/dist/table-card.js +1 -1
  149. package/dist/table.js +1 -1
  150. package/dist/tabs.d.ts +1 -1
  151. package/dist/tabs.js +1 -1
  152. package/dist/tag.d.ts +1 -1
  153. package/dist/tag.js +1 -1
  154. package/dist/testimonial-block.js +1 -1
  155. package/dist/textarea.d.ts +17 -1
  156. package/dist/textarea.js +24 -10
  157. package/dist/theme-switcher.js +1 -1
  158. package/dist/time-picker.d.ts +5 -4
  159. package/dist/time-picker.js +5 -7
  160. package/dist/toast.js +1 -1
  161. package/dist/tooltip.js +1 -1
  162. package/dist/top-navbar.js +1 -1
  163. package/dist/tree-map.d.ts +1 -1
  164. package/dist/tree-map.js +1 -1
  165. package/dist/utils/cn.d.ts +5 -0
  166. package/dist/utils/cn.js +33 -0
  167. package/dist/utils/format.d.ts +45 -0
  168. package/dist/utils/format.js +70 -0
  169. package/dist/utils/phone.d.ts +98 -0
  170. package/dist/utils/phone.js +93 -0
  171. package/dist/utils/use-intersection.d.ts +9 -0
  172. package/dist/utils/use-intersection.js +29 -0
  173. package/dist/utils/use-is-mobile.d.ts +5 -0
  174. package/dist/utils/use-is-mobile.js +16 -0
  175. package/dist/utils/use-reduced-motion.d.ts +5 -0
  176. package/dist/{use-reduced-motion-BDvOK14x.js → utils/use-reduced-motion.js} +2 -2
  177. package/dist/utils/use-uncontrolled.d.ts +11 -0
  178. package/dist/{use-uncontrolled-CLfM1XbB.js → utils/use-uncontrolled.js} +2 -2
  179. package/dist/video-player-dialog.d.ts +12 -2
  180. package/dist/video-player-dialog.js +50 -9
  181. package/dist/waterfall-chart.d.ts +1 -1
  182. package/dist/waterfall-chart.js +1 -1
  183. package/package.json +13 -1
  184. package/dist/button-DW5OijoR.d.ts +0 -17
  185. package/dist/cn-BI_4DMBf.js +0 -23
  186. package/dist/input-CfoEJ8A6.d.ts +0 -12
  187. package/dist/input-size-context-C-SFx9sx.d.ts +0 -10
  188. package/dist/picker-xSTzeYhc.js +0 -50
  189. package/dist/size-context-BX6kAdVj.d.ts +0 -11
  190. package/dist/textarea-IS_D8pXf.d.ts +0 -11
package/dist/field.js CHANGED
@@ -1,12 +1,17 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
3
- import { SizeProvider, useComponentSize } from "./size-context.js";
2
+ import { cn } from "./utils/cn.js";
3
+ import { SizeProvider, responsiveValueClasses, useComponentSizeValue } from "./size-context.js";
4
4
  import { Separator } from "./separator.js";
5
5
  import { Label } from "./label.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { cva } from "class-variance-authority";
8
8
  import { useMemo } from "react";
9
9
  //#region src/field.tsx
10
+ const fieldSizeVariants = {
11
+ sm: "gap-1",
12
+ md: "gap-1.5",
13
+ lg: "gap-2"
14
+ };
10
15
  function FieldSet({ className, ...props }) {
11
16
  return /* @__PURE__ */ jsx("fieldset", {
12
17
  "data-slot": "field-set",
@@ -36,11 +41,7 @@ const fieldVariants = cva("group/field flex w-full", {
36
41
  horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px data-[size=sm]:gap-1.5 data-[size=md]:gap-2.5 data-[size=lg]:gap-3",
37
42
  responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio],[role=switch]]:mt-px"
38
43
  },
39
- size: {
40
- sm: "gap-1",
41
- md: "gap-1.5",
42
- lg: "gap-2"
43
- }
44
+ size: fieldSizeVariants
44
45
  },
45
46
  defaultVariants: {
46
47
  orientation: "vertical",
@@ -48,22 +49,38 @@ const fieldVariants = cva("group/field flex w-full", {
48
49
  }
49
50
  });
50
51
  function Field({ className, orientation = "vertical", size, ...props }) {
51
- const resolvedSize = useComponentSize(size);
52
+ const sizeValue = useComponentSizeValue(size);
53
+ const resolvedSize = responsiveValueClasses(sizeValue, responsiveFieldSizes);
52
54
  return /* @__PURE__ */ jsx(SizeProvider, {
53
- size: resolvedSize,
55
+ size: sizeValue,
54
56
  children: /* @__PURE__ */ jsx("div", {
55
57
  role: "group",
56
58
  "data-slot": "field",
57
59
  "data-orientation": orientation,
58
- "data-size": resolvedSize,
60
+ "data-size": resolvedSize.base,
61
+ "data-size-md": resolvedSize.responsive ? resolvedSize.md : void 0,
62
+ "data-size-lg": resolvedSize.responsive ? resolvedSize.lg : void 0,
59
63
  className: cn(fieldVariants({
60
64
  orientation,
61
- size: resolvedSize
62
- }), className),
65
+ size: null
66
+ }), resolvedSize.className, className),
63
67
  ...props
64
68
  })
65
69
  });
66
70
  }
71
+ const responsiveFieldSizes = {
72
+ base: fieldSizeVariants,
73
+ md: {
74
+ sm: "md:gap-1",
75
+ md: "md:gap-1.5",
76
+ lg: "md:gap-2"
77
+ },
78
+ lg: {
79
+ sm: "lg:gap-1",
80
+ md: "lg:gap-1.5",
81
+ lg: "lg:gap-2"
82
+ }
83
+ };
67
84
  function FieldContent({ className, ...props }) {
68
85
  return /* @__PURE__ */ jsx("div", {
69
86
  "data-slot": "field-content",
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { File, X } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { CircularProgress, Progress, ProgressValue } from "./progress.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { createContext, useContext } from "react";
package/dist/filter.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Plus, X } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Button } from "./button.js";
5
5
  import { Input } from "./input.js";
6
6
  import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
package/dist/footer.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as InputSize } from "./input-CfoEJ8A6.js";
1
+ import { InputSizeValue } from "./input.js";
2
2
  import { useRender } from "@base-ui/react/use-render";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  import * as React from "react";
@@ -39,7 +39,7 @@ declare function FooterNewsletter({ className, ...props }: React.ComponentProps<
39
39
  declare function FooterNewsletterTitle({ className, ...props }: React.ComponentProps<"h3">): React.JSX.Element;
40
40
  declare function FooterNewsletterDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
41
41
  declare function FooterNewsletterControl({ className, children, size, ...props }: React.ComponentProps<"div"> & {
42
- size?: InputSize;
42
+ size?: InputSizeValue;
43
43
  }): React.JSX.Element;
44
44
  declare function FooterBottom({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
45
45
  declare function FooterLegalLinks({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
package/dist/footer.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { ChevronRight } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
4
  import { Button } from "./button.js";
5
5
  import { Input } from "./input.js";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
1
+ import { t as ComponentSize } from "./size-context-BVhHduLi.js";
2
2
  import { ChartCard, ChartValueType } from "./chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/funnel-chart.d.ts
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { useComponentSize } from "./size-context.js";
4
4
  import { ChartCard, ChartContainer, ChartDescription, ChartHeader, ChartTitle, ChartTooltip, ChartTooltipContent } from "./chart.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { t as cn } from "./cn-BI_4DMBf.js";
1
+ import { cn } from "./utils/cn.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
4
  //#region src/gallery-indicator.tsx
@@ -1,4 +1,4 @@
1
- import { t as ComponentSize } from "./size-context-BX6kAdVj.js";
1
+ import { t as ComponentSize } from "./size-context-BVhHduLi.js";
2
2
  import { ChartCard } from "./chart.js";
3
3
  import * as React from "react";
4
4
  //#region src/heatmap-chart.d.ts
@@ -0,0 +1,111 @@
1
+ import { ReactElement, ReactNode, SVGProps } from "react";
2
+ //#region src/icons.d.ts
3
+ type IconProps = Omit<SVGProps<SVGSVGElement>, "children"> & {
4
+ /** Square edge length applied to `width` and `height`. Defaults to `24`. */
5
+ size?: number | string;
6
+ };
7
+ type IconComponent = (props: IconProps) => ReactElement;
8
+ /**
9
+ * Bare SVG frame shared by every glyph. Exported so apps can draw a one-off
10
+ * icon that inherits the same sizing, stroke, and colour behaviour.
11
+ */
12
+ declare function Icon({ name, size, strokeWidth, children, ...props }: IconProps & {
13
+ name?: string;
14
+ children: ReactNode;
15
+ }): import("react").JSX.Element;
16
+ declare function AlignCenter(props: IconProps): import("react").JSX.Element;
17
+ declare function AlignJustify(props: IconProps): import("react").JSX.Element;
18
+ declare function AlignLeft(props: IconProps): import("react").JSX.Element;
19
+ declare function AlignRight(props: IconProps): import("react").JSX.Element;
20
+ declare function ArrowDown(props: IconProps): import("react").JSX.Element;
21
+ declare function ArrowRight(props: IconProps): import("react").JSX.Element;
22
+ declare function ArrowUp(props: IconProps): import("react").JSX.Element;
23
+ declare function ArrowUpRight(props: IconProps): import("react").JSX.Element;
24
+ declare function Baseline(props: IconProps): import("react").JSX.Element;
25
+ declare function Bold(props: IconProps): import("react").JSX.Element;
26
+ declare function Calendar(props: IconProps): import("react").JSX.Element;
27
+ declare function Captions(props: IconProps): import("react").JSX.Element;
28
+ declare function CaptionsOff(props: IconProps): import("react").JSX.Element;
29
+ declare function Check(props: IconProps): import("react").JSX.Element;
30
+ declare function CheckCheck(props: IconProps): import("react").JSX.Element;
31
+ declare function ChevronDown(props: IconProps): import("react").JSX.Element;
32
+ declare function ChevronLeft(props: IconProps): import("react").JSX.Element;
33
+ declare function ChevronRight(props: IconProps): import("react").JSX.Element;
34
+ declare function ChevronUp(props: IconProps): import("react").JSX.Element;
35
+ declare function ChevronsUpDown(props: IconProps): import("react").JSX.Element;
36
+ declare function Clock(props: IconProps): import("react").JSX.Element;
37
+ declare function Code2(props: IconProps): import("react").JSX.Element;
38
+ declare function Eye(props: IconProps): import("react").JSX.Element;
39
+ declare function EyeOff(props: IconProps): import("react").JSX.Element;
40
+ declare function File(props: IconProps): import("react").JSX.Element;
41
+ declare function FileText(props: IconProps): import("react").JSX.Element;
42
+ /**
43
+ * Giddaa's own filter glyph — two solid sliders — rather than Lucide's hollow
44
+ * funnel. Filled artwork on a 14×12 grid, so like {@link Share} it overrides
45
+ * the frame's viewBox and stroke-based paint while keeping its square
46
+ * viewport, sizing and colour behaviour.
47
+ */
48
+ declare function Filter(props: IconProps): import("react").JSX.Element;
49
+ declare function Fullscreen(props: IconProps): import("react").JSX.Element;
50
+ declare function Image(props: IconProps): import("react").JSX.Element;
51
+ declare function Info(props: IconProps): import("react").JSX.Element;
52
+ declare function Italic(props: IconProps): import("react").JSX.Element;
53
+ declare function Link2(props: IconProps): import("react").JSX.Element;
54
+ declare function List(props: IconProps): import("react").JSX.Element;
55
+ declare function ListOrdered(props: IconProps): import("react").JSX.Element;
56
+ declare function ListVideo(props: IconProps): import("react").JSX.Element;
57
+ declare function Loader(props: IconProps): import("react").JSX.Element;
58
+ declare function Loader2(props: IconProps): import("react").JSX.Element;
59
+ declare function Maximize(props: IconProps): import("react").JSX.Element;
60
+ declare function Maximize2(props: IconProps): import("react").JSX.Element;
61
+ declare function Menu(props: IconProps): import("react").JSX.Element;
62
+ declare function Mic(props: IconProps): import("react").JSX.Element;
63
+ declare function MicOff(props: IconProps): import("react").JSX.Element;
64
+ declare function Minimize(props: IconProps): import("react").JSX.Element;
65
+ declare function Minimize2(props: IconProps): import("react").JSX.Element;
66
+ declare function Minus(props: IconProps): import("react").JSX.Element;
67
+ declare function Monitor(props: IconProps): import("react").JSX.Element;
68
+ declare function Moon(props: IconProps): import("react").JSX.Element;
69
+ declare function MoreHorizontal(props: IconProps): import("react").JSX.Element;
70
+ declare function Pause(props: IconProps): import("react").JSX.Element;
71
+ declare function Phone(props: IconProps): import("react").JSX.Element;
72
+ declare function PictureInPicture2(props: IconProps): import("react").JSX.Element;
73
+ declare function Pin(props: IconProps): import("react").JSX.Element;
74
+ declare function Play(props: IconProps): import("react").JSX.Element;
75
+ declare function Plus(props: IconProps): import("react").JSX.Element;
76
+ declare function Quote(props: IconProps): import("react").JSX.Element;
77
+ declare function Redo2(props: IconProps): import("react").JSX.Element;
78
+ declare function RefreshCcw(props: IconProps): import("react").JSX.Element;
79
+ declare function Repeat2(props: IconProps): import("react").JSX.Element;
80
+ declare function RotateCcw(props: IconProps): import("react").JSX.Element;
81
+ declare function RotateCw(props: IconProps): import("react").JSX.Element;
82
+ declare function Search(props: IconProps): import("react").JSX.Element;
83
+ declare function SearchX(props: IconProps): import("react").JSX.Element;
84
+ declare function Send(props: IconProps): import("react").JSX.Element;
85
+ declare function Settings(props: IconProps): import("react").JSX.Element;
86
+ /**
87
+ * Giddaa's own share glyph, not Lucide's — an arrow curving out of a tray
88
+ * rather than the three-node graph `Share2` draws.
89
+ *
90
+ * It is the one solid icon in the set, and its artwork is 20×16 rather than
91
+ * square, so it overrides the frame's viewBox and its stroke-based paint. The
92
+ * square viewport every other icon gets still applies: the glyph scales to fit
93
+ * inside it and keeps its proportions, so `size-5` next to a `size-5` Lucide
94
+ * icon reads at the same weight.
95
+ */
96
+ declare function Share(props: IconProps): import("react").JSX.Element;
97
+ declare function SlidersHorizontal(props: IconProps): import("react").JSX.Element;
98
+ declare function Star(props: IconProps): import("react").JSX.Element;
99
+ declare function Sun(props: IconProps): import("react").JSX.Element;
100
+ declare function TriangleAlert(props: IconProps): import("react").JSX.Element;
101
+ declare function Underline(props: IconProps): import("react").JSX.Element;
102
+ declare function Undo2(props: IconProps): import("react").JSX.Element;
103
+ declare function UploadCloud(props: IconProps): import("react").JSX.Element;
104
+ declare function User(props: IconProps): import("react").JSX.Element;
105
+ declare function Video(props: IconProps): import("react").JSX.Element;
106
+ declare function Volume1(props: IconProps): import("react").JSX.Element;
107
+ declare function Volume2(props: IconProps): import("react").JSX.Element;
108
+ declare function VolumeX(props: IconProps): import("react").JSX.Element;
109
+ declare function X(props: IconProps): import("react").JSX.Element;
110
+ //#endregion
111
+ export { Phone as $, IconComponent as A, Loader2 as B, Eye as C, Video as Ct, Filter as D, X as Dt, FileText as E, VolumeX as Et, Link2 as F, MicOff as G, Maximize2 as H, List as I, Minus as J, Minimize as K, ListOrdered as L, Image as M, Info as N, Fullscreen as O, Italic as P, Pause as Q, ListVideo as R, Code2 as S, User as St, File as T, Volume2 as Tt, Menu as U, Maximize as V, Mic as W, Moon as X, Monitor as Y, MoreHorizontal as Z, ChevronLeft as _, Sun as _t, ArrowDown as a, Redo2 as at, ChevronsUpDown as b, Undo2 as bt, ArrowUpRight as c, RotateCcw as ct, Calendar as d, SearchX as dt, PictureInPicture2 as et, Captions as f, Send as ft, ChevronDown as g, Star as gt, CheckCheck as h, SlidersHorizontal as ht, AlignRight as i, Quote as it, IconProps as j, Icon as k, Baseline as l, RotateCw as lt, Check as m, Share as mt, AlignJustify as n, Play as nt, ArrowRight as o, RefreshCcw as ot, CaptionsOff as p, Settings as pt, Minimize2 as q, AlignLeft as r, Plus as rt, ArrowUp as s, Repeat2 as st, AlignCenter as t, Pin as tt, Bold as u, Search as ut, ChevronRight as v, TriangleAlert as vt, EyeOff as w, Volume1 as wt, Clock as x, UploadCloud as xt, ChevronUp as y, Underline as yt, Loader as z };
package/dist/icons.d.ts CHANGED
@@ -1,93 +1,2 @@
1
- import { ReactElement, ReactNode, SVGProps } from "react";
2
- //#region src/icons.d.ts
3
- type IconProps = Omit<SVGProps<SVGSVGElement>, "children"> & {
4
- /** Square edge length applied to `width` and `height`. Defaults to `24`. */
5
- size?: number | string;
6
- };
7
- type IconComponent = (props: IconProps) => ReactElement;
8
- /**
9
- * Bare SVG frame shared by every glyph. Exported so apps can draw a one-off
10
- * icon that inherits the same sizing, stroke, and colour behaviour.
11
- */
12
- declare function Icon({ name, size, strokeWidth, children, ...props }: IconProps & {
13
- name?: string;
14
- children: ReactNode;
15
- }): import("react").JSX.Element;
16
- declare function AlignCenter(props: IconProps): import("react").JSX.Element;
17
- declare function AlignJustify(props: IconProps): import("react").JSX.Element;
18
- declare function AlignLeft(props: IconProps): import("react").JSX.Element;
19
- declare function AlignRight(props: IconProps): import("react").JSX.Element;
20
- declare function ArrowDown(props: IconProps): import("react").JSX.Element;
21
- declare function ArrowRight(props: IconProps): import("react").JSX.Element;
22
- declare function ArrowUp(props: IconProps): import("react").JSX.Element;
23
- declare function ArrowUpRight(props: IconProps): import("react").JSX.Element;
24
- declare function Baseline(props: IconProps): import("react").JSX.Element;
25
- declare function Bold(props: IconProps): import("react").JSX.Element;
26
- declare function Calendar(props: IconProps): import("react").JSX.Element;
27
- declare function Captions(props: IconProps): import("react").JSX.Element;
28
- declare function CaptionsOff(props: IconProps): import("react").JSX.Element;
29
- declare function Check(props: IconProps): import("react").JSX.Element;
30
- declare function CheckCheck(props: IconProps): import("react").JSX.Element;
31
- declare function ChevronDown(props: IconProps): import("react").JSX.Element;
32
- declare function ChevronLeft(props: IconProps): import("react").JSX.Element;
33
- declare function ChevronRight(props: IconProps): import("react").JSX.Element;
34
- declare function ChevronUp(props: IconProps): import("react").JSX.Element;
35
- declare function ChevronsUpDown(props: IconProps): import("react").JSX.Element;
36
- declare function Clock(props: IconProps): import("react").JSX.Element;
37
- declare function Code2(props: IconProps): import("react").JSX.Element;
38
- declare function Eye(props: IconProps): import("react").JSX.Element;
39
- declare function EyeOff(props: IconProps): import("react").JSX.Element;
40
- declare function File(props: IconProps): import("react").JSX.Element;
41
- declare function FileText(props: IconProps): import("react").JSX.Element;
42
- declare function Fullscreen(props: IconProps): import("react").JSX.Element;
43
- declare function Image(props: IconProps): import("react").JSX.Element;
44
- declare function Info(props: IconProps): import("react").JSX.Element;
45
- declare function Italic(props: IconProps): import("react").JSX.Element;
46
- declare function Link2(props: IconProps): import("react").JSX.Element;
47
- declare function List(props: IconProps): import("react").JSX.Element;
48
- declare function ListOrdered(props: IconProps): import("react").JSX.Element;
49
- declare function ListVideo(props: IconProps): import("react").JSX.Element;
50
- declare function Loader(props: IconProps): import("react").JSX.Element;
51
- declare function Loader2(props: IconProps): import("react").JSX.Element;
52
- declare function Maximize(props: IconProps): import("react").JSX.Element;
53
- declare function Maximize2(props: IconProps): import("react").JSX.Element;
54
- declare function Menu(props: IconProps): import("react").JSX.Element;
55
- declare function Mic(props: IconProps): import("react").JSX.Element;
56
- declare function MicOff(props: IconProps): import("react").JSX.Element;
57
- declare function Minimize(props: IconProps): import("react").JSX.Element;
58
- declare function Minimize2(props: IconProps): import("react").JSX.Element;
59
- declare function Minus(props: IconProps): import("react").JSX.Element;
60
- declare function Monitor(props: IconProps): import("react").JSX.Element;
61
- declare function Moon(props: IconProps): import("react").JSX.Element;
62
- declare function MoreHorizontal(props: IconProps): import("react").JSX.Element;
63
- declare function Pause(props: IconProps): import("react").JSX.Element;
64
- declare function Phone(props: IconProps): import("react").JSX.Element;
65
- declare function PictureInPicture2(props: IconProps): import("react").JSX.Element;
66
- declare function Pin(props: IconProps): import("react").JSX.Element;
67
- declare function Play(props: IconProps): import("react").JSX.Element;
68
- declare function Plus(props: IconProps): import("react").JSX.Element;
69
- declare function Quote(props: IconProps): import("react").JSX.Element;
70
- declare function Redo2(props: IconProps): import("react").JSX.Element;
71
- declare function RefreshCcw(props: IconProps): import("react").JSX.Element;
72
- declare function Repeat2(props: IconProps): import("react").JSX.Element;
73
- declare function RotateCcw(props: IconProps): import("react").JSX.Element;
74
- declare function RotateCw(props: IconProps): import("react").JSX.Element;
75
- declare function Search(props: IconProps): import("react").JSX.Element;
76
- declare function SearchX(props: IconProps): import("react").JSX.Element;
77
- declare function Send(props: IconProps): import("react").JSX.Element;
78
- declare function Settings(props: IconProps): import("react").JSX.Element;
79
- declare function SlidersHorizontal(props: IconProps): import("react").JSX.Element;
80
- declare function Star(props: IconProps): import("react").JSX.Element;
81
- declare function Sun(props: IconProps): import("react").JSX.Element;
82
- declare function TriangleAlert(props: IconProps): import("react").JSX.Element;
83
- declare function Underline(props: IconProps): import("react").JSX.Element;
84
- declare function Undo2(props: IconProps): import("react").JSX.Element;
85
- declare function UploadCloud(props: IconProps): import("react").JSX.Element;
86
- declare function User(props: IconProps): import("react").JSX.Element;
87
- declare function Video(props: IconProps): import("react").JSX.Element;
88
- declare function Volume1(props: IconProps): import("react").JSX.Element;
89
- declare function Volume2(props: IconProps): import("react").JSX.Element;
90
- declare function VolumeX(props: IconProps): import("react").JSX.Element;
91
- declare function X(props: IconProps): import("react").JSX.Element;
92
- //#endregion
93
- export { AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDown, ArrowRight, ArrowUp, ArrowUpRight, Baseline, Bold, Calendar, Captions, CaptionsOff, Check, CheckCheck, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsUpDown, Clock, Code2, Eye, EyeOff, File, FileText, Fullscreen, Icon, type IconComponent, type IconProps, Image, Info, Italic, Link2, List, ListOrdered, ListVideo, Loader, Loader2, Maximize, Maximize2, Menu, Mic, MicOff, Minimize, Minimize2, Minus, Monitor, Moon, MoreHorizontal, Pause, Phone, PictureInPicture2, Pin, Play, Plus, Quote, Redo2, RefreshCcw, Repeat2, RotateCcw, RotateCw, Search, SearchX, Send, Settings, SlidersHorizontal, Star, Sun, TriangleAlert, Underline, Undo2, UploadCloud, User, Video, Volume1, Volume2, VolumeX, X };
1
+ import { $ as Phone, A as IconComponent, B as Loader2, C as Eye, Ct as Video, D as Filter, Dt as X, E as FileText, Et as VolumeX, F as Link2, G as MicOff, H as Maximize2, I as List, J as Minus, K as Minimize, L as ListOrdered, M as Image, N as Info, O as Fullscreen, P as Italic, Q as Pause, R as ListVideo, S as Code2, St as User, T as File, Tt as Volume2, U as Menu, V as Maximize, W as Mic, X as Moon, Y as Monitor, Z as MoreHorizontal, _ as ChevronLeft, _t as Sun, a as ArrowDown, at as Redo2, b as ChevronsUpDown, bt as Undo2, c as ArrowUpRight, ct as RotateCcw, d as Calendar, dt as SearchX, et as PictureInPicture2, f as Captions, ft as Send, g as ChevronDown, gt as Star, h as CheckCheck, ht as SlidersHorizontal, i as AlignRight, it as Quote, j as IconProps, k as Icon, l as Baseline, lt as RotateCw, m as Check, mt as Share, n as AlignJustify, nt as Play, o as ArrowRight, ot as RefreshCcw, p as CaptionsOff, pt as Settings, q as Minimize2, r as AlignLeft, rt as Plus, s as ArrowUp, st as Repeat2, t as AlignCenter, tt as Pin, u as Bold, ut as Search, v as ChevronRight, vt as TriangleAlert, w as EyeOff, wt as Volume1, x as Clock, xt as UploadCloud, y as ChevronUp, yt as Underline, z as Loader } from "./icons-C9JXR5Xv.js";
2
+ export { AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDown, ArrowRight, ArrowUp, ArrowUpRight, Baseline, Bold, Calendar, Captions, CaptionsOff, Check, CheckCheck, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsUpDown, Clock, Code2, Eye, EyeOff, File, FileText, Filter, Fullscreen, Icon, type IconComponent, type IconProps, Image, Info, Italic, Link2, List, ListOrdered, ListVideo, Loader, Loader2, Maximize, Maximize2, Menu, Mic, MicOff, Minimize, Minimize2, Minus, Monitor, Moon, MoreHorizontal, Pause, Phone, PictureInPicture2, Pin, Play, Plus, Quote, Redo2, RefreshCcw, Repeat2, RotateCcw, RotateCw, Search, SearchX, Send, Settings, Share, SlidersHorizontal, Star, Sun, TriangleAlert, Underline, Undo2, UploadCloud, User, Video, Volume1, Volume2, VolumeX, X };
package/dist/icons.js CHANGED
@@ -273,6 +273,22 @@ function FileText(props) {
273
273
  ]
274
274
  });
275
275
  }
276
+ /**
277
+ * Giddaa's own filter glyph — two solid sliders — rather than Lucide's hollow
278
+ * funnel. Filled artwork on a 14×12 grid, so like {@link Share} it overrides
279
+ * the frame's viewBox and stroke-based paint while keeping its square
280
+ * viewport, sizing and colour behaviour.
281
+ */
282
+ function Filter(props) {
283
+ return /* @__PURE__ */ jsx(Icon, {
284
+ name: "filter",
285
+ viewBox: "0 0 14 12",
286
+ fill: "currentColor",
287
+ stroke: "none",
288
+ ...props,
289
+ children: /* @__PURE__ */ jsx("path", { d: "M.778 9.75h6.3C7.388 11.025 8.633 12 10.11 12a3.155 3.155 0 0 0 3.033-2.25h.078c.467 0 .778-.3.778-.75s-.311-.75-.778-.75h-.078C12.834 6.975 11.59 6 10.111 6a3.155 3.155 0 0 0-3.033 2.25h-6.3C.31 8.25 0 8.55 0 9s.311.75.778.75ZM10.11 7.5c.856 0 1.556.675 1.556 1.5s-.7 1.5-1.556 1.5c-.855 0-1.555-.675-1.555-1.5s.7-1.5 1.555-1.5ZM.778 3.75h.078C1.166 5.025 2.41 6 3.889 6a3.155 3.155 0 0 0 3.033-2.25h6.3c.467 0 .778-.3.778-.75s-.311-.75-.778-.75h-6.3C6.612.975 5.367 0 3.89 0A3.155 3.155 0 0 0 .856 2.25H.778C.31 2.25 0 2.55 0 3s.311.75.778.75Zm3.11-2.25c.856 0 1.556.675 1.556 1.5s-.7 1.5-1.555 1.5c-.856 0-1.556-.675-1.556-1.5s.7-1.5 1.556-1.5Z" })
290
+ });
291
+ }
276
292
  function Fullscreen(props) {
277
293
  return /* @__PURE__ */ jsxs(Icon, {
278
294
  name: "fullscreen",
@@ -745,6 +761,26 @@ function Settings(props) {
745
761
  })]
746
762
  });
747
763
  }
764
+ /**
765
+ * Giddaa's own share glyph, not Lucide's — an arrow curving out of a tray
766
+ * rather than the three-node graph `Share2` draws.
767
+ *
768
+ * It is the one solid icon in the set, and its artwork is 20×16 rather than
769
+ * square, so it overrides the frame's viewBox and its stroke-based paint. The
770
+ * square viewport every other icon gets still applies: the glyph scales to fit
771
+ * inside it and keeps its proportions, so `size-5` next to a `size-5` Lucide
772
+ * icon reads at the same weight.
773
+ */
774
+ function Share(props) {
775
+ return /* @__PURE__ */ jsx(Icon, {
776
+ name: "share",
777
+ viewBox: "0 0 20 16",
778
+ fill: "currentColor",
779
+ stroke: "none",
780
+ ...props,
781
+ children: /* @__PURE__ */ jsx("path", { d: "m19.707 7.372-8-7.112a1.044 1.044 0 0 0-.512-.243 1.117 1.117 0 0 0-.578.05.984.984 0 0 0-.448.328.82.82 0 0 0-.169.494v3.15c-2.732.226-5.27 1.348-7.12 3.15-1.85 1.8-2.877 4.15-2.88 6.589v1.333c0 .185.065.365.185.515.12.15.29.264.487.324.196.06.408.066.608.014.199-.052.375-.157.504-.302a11.337 11.337 0 0 1 3.536-2.505 12.566 12.566 0 0 1 4.351-1.094c.05-.005.175-.014.33-.023v3.071a.82.82 0 0 0 .168.494c.11.146.266.26.448.327.183.068.384.085.578.05.194-.033.372-.118.512-.242l8-7.112A.842.842 0 0 0 20 8a.842.842 0 0 0-.293-.628ZM12 12.966V11.11a.842.842 0 0 0-.293-.628 1.067 1.067 0 0 0-.707-.26c-.255 0-1.296.044-1.562.075-2.695.22-5.26 1.13-7.386 2.62.241-1.96 1.288-3.773 2.939-5.09C6.64 6.51 8.78 5.78 11 5.778c.264 0 .519-.094.706-.26a.842.842 0 0 0 .293-.63V3.036L17.586 8 12 12.966Z" })
782
+ });
783
+ }
748
784
  function SlidersHorizontal(props) {
749
785
  return /* @__PURE__ */ jsxs(Icon, {
750
786
  name: "sliders-horizontal",
@@ -902,4 +938,4 @@ function X(props) {
902
938
  });
903
939
  }
904
940
  //#endregion
905
- export { AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDown, ArrowRight, ArrowUp, ArrowUpRight, Baseline, Bold, Calendar, Captions, CaptionsOff, Check, CheckCheck, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsUpDown, Clock, Code2, Eye, EyeOff, File, FileText, Fullscreen, Icon, Image, Info, Italic, Link2, List, ListOrdered, ListVideo, Loader, Loader2, Maximize, Maximize2, Menu, Mic, MicOff, Minimize, Minimize2, Minus, Monitor, Moon, MoreHorizontal, Pause, Phone, PictureInPicture2, Pin, Play, Plus, Quote, Redo2, RefreshCcw, Repeat2, RotateCcw, RotateCw, Search, SearchX, Send, Settings, SlidersHorizontal, Star, Sun, TriangleAlert, Underline, Undo2, UploadCloud, User, Video, Volume1, Volume2, VolumeX, X };
941
+ export { AlignCenter, AlignJustify, AlignLeft, AlignRight, ArrowDown, ArrowRight, ArrowUp, ArrowUpRight, Baseline, Bold, Calendar, Captions, CaptionsOff, Check, CheckCheck, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsUpDown, Clock, Code2, Eye, EyeOff, File, FileText, Filter, Fullscreen, Icon, Image, Info, Italic, Link2, List, ListOrdered, ListVideo, Loader, Loader2, Maximize, Maximize2, Menu, Mic, MicOff, Minimize, Minimize2, Minus, Monitor, Moon, MoreHorizontal, Pause, Phone, PictureInPicture2, Pin, Play, Plus, Quote, Redo2, RefreshCcw, Repeat2, RotateCcw, RotateCw, Search, SearchX, Send, Settings, Share, SlidersHorizontal, Star, Sun, TriangleAlert, Underline, Undo2, UploadCloud, User, Video, Volume1, Volume2, VolumeX, X };
@@ -0,0 +1,59 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ import * as React from "react";
3
+ //#region src/image.d.ts
4
+ /**
5
+ * What a custom image component is handed: every `<img>` prop, already merged
6
+ * — `src`, `alt`, the resolved `className`, and whatever the call site passed
7
+ * through. Typed as an `img` rather than the generic HTML attributes Base UI
8
+ * defaults to, so a render function can read `src` without a cast.
9
+ */
10
+ type ImageRenderProps = React.ComponentPropsWithRef<"img">;
11
+ /** Carried into `data-slot`, and handed to a `render` function as its state. */
12
+ type ImageState = {
13
+ slot: string;
14
+ };
15
+ type ImageProps = useRender.ComponentProps<"img", ImageState, ImageRenderProps>;
16
+ /**
17
+ * A `ReactElement` to clone, or a function returning the element to render.
18
+ * `<Image render={<NextImage fill />} />` and
19
+ * `<Image render={(props) => <NextImage {...props} fill />} />` are both it.
20
+ */
21
+ type ImageRender = ImageProps["render"];
22
+ /**
23
+ * Sets the image component for everything below it, so a Next.js or Gatsby
24
+ * app names its own `Image` once at the root rather than at every listing,
25
+ * gallery and thumbnail. A `render` passed to an individual image still wins.
26
+ *
27
+ * ```tsx
28
+ * // `NextImage` being this app's import of the framework's own component.
29
+ * <ImageProvider render={(props) => <NextImage {...props} fill sizes="100vw" />}>
30
+ * <App />
31
+ * </ImageProvider>
32
+ * ```
33
+ *
34
+ * The components that read this render photography — listings, galleries,
35
+ * posters. Ones whose `src` is made in the browser, like `FileUpload`'s
36
+ * `URL.createObjectURL` previews, stay on a plain `<img>`: an optimising
37
+ * loader has nothing to fetch from a `blob:` URL.
38
+ */
39
+ declare function ImageProvider({ render, children }: {
40
+ render?: ImageRender;
41
+ children?: React.ReactNode;
42
+ }): React.JSX.Element;
43
+ /** The render a component should use: its own if given, else the provider's. */
44
+ declare function useImageRender(render?: ImageRender): import("@base-ui/react").ComponentRenderFn<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, ImageState> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | undefined;
45
+ /**
46
+ * An `<img>` that can be swapped for someone else's image component, either
47
+ * one at a time through `render` or wholesale through `ImageProvider`.
48
+ *
49
+ * It adds nothing to a plain `<img>` otherwise — no sizing, no object-fit, no
50
+ * loading behaviour. `loading`, `fetchPriority`, `sizes`, `srcSet`, `decoding`
51
+ * and the rest pass straight through, which is the point: the call site knows
52
+ * whether a photo is above the fold and this does not.
53
+ */
54
+ declare function Image({ render, slot, ...props }: Omit<ImageProps, "slot"> & {
55
+ /** Names the element in the DOM as `data-slot`, for styling and for tests. */
56
+ slot?: string;
57
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
58
+ //#endregion
59
+ export { Image, type ImageProps, ImageProvider, type ImageRender, type ImageRenderProps, type ImageState, useImageRender };
package/dist/image.js ADDED
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import * as React from "react";
5
+ //#region src/image.tsx
6
+ const ImageRenderContext = React.createContext(void 0);
7
+ /**
8
+ * Sets the image component for everything below it, so a Next.js or Gatsby
9
+ * app names its own `Image` once at the root rather than at every listing,
10
+ * gallery and thumbnail. A `render` passed to an individual image still wins.
11
+ *
12
+ * ```tsx
13
+ * // `NextImage` being this app's import of the framework's own component.
14
+ * <ImageProvider render={(props) => <NextImage {...props} fill sizes="100vw" />}>
15
+ * <App />
16
+ * </ImageProvider>
17
+ * ```
18
+ *
19
+ * The components that read this render photography — listings, galleries,
20
+ * posters. Ones whose `src` is made in the browser, like `FileUpload`'s
21
+ * `URL.createObjectURL` previews, stay on a plain `<img>`: an optimising
22
+ * loader has nothing to fetch from a `blob:` URL.
23
+ */
24
+ function ImageProvider({ render, children }) {
25
+ return /* @__PURE__ */ jsx(ImageRenderContext.Provider, {
26
+ value: render,
27
+ children
28
+ });
29
+ }
30
+ /** The render a component should use: its own if given, else the provider's. */
31
+ function useImageRender(render) {
32
+ const inheritedRender = React.useContext(ImageRenderContext);
33
+ return render ?? inheritedRender;
34
+ }
35
+ /**
36
+ * An `<img>` that can be swapped for someone else's image component, either
37
+ * one at a time through `render` or wholesale through `ImageProvider`.
38
+ *
39
+ * It adds nothing to a plain `<img>` otherwise — no sizing, no object-fit, no
40
+ * loading behaviour. `loading`, `fetchPriority`, `sizes`, `srcSet`, `decoding`
41
+ * and the rest pass straight through, which is the point: the call site knows
42
+ * whether a photo is above the fold and this does not.
43
+ */
44
+ function Image({ render, slot = "image", ...props }) {
45
+ return useRender({
46
+ defaultTagName: "img",
47
+ render: useImageRender(render),
48
+ props,
49
+ state: { slot }
50
+ });
51
+ }
52
+ //#endregion
53
+ export { Image, ImageProvider, useImageRender };
@@ -1,35 +1,9 @@
1
1
  "use client";
2
2
  import { Loader2 } from "./icons.js";
3
- import { t as cn } from "./cn-BI_4DMBf.js";
3
+ import { cn } from "./utils/cn.js";
4
+ import { useIntersection } from "./utils/use-intersection.js";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
6
- //#region src/lib/use-intersection.ts
7
- function useIntersection(options) {
8
- const [entry, setEntry] = useState(null);
9
- const observer = useRef(null);
10
- return {
11
- ref: useCallback((element) => {
12
- if (observer.current) {
13
- observer.current.disconnect();
14
- observer.current = null;
15
- }
16
- if (element === null) {
17
- setEntry(null);
18
- return;
19
- }
20
- if (typeof IntersectionObserver === "undefined") {
21
- setEntry(null);
22
- return;
23
- }
24
- observer.current = new IntersectionObserver(([_entry]) => {
25
- setEntry(_entry ?? null);
26
- }, options);
27
- observer.current.observe(element);
28
- }, [options]),
29
- entry
30
- };
31
- }
32
- //#endregion
6
+ import { createContext, useContext, useEffect, useMemo } from "react";
33
7
  //#region src/infinite-scroll.tsx
34
8
  const InfiniteScrollContext = createContext(null);
35
9
  function useInfiniteScrollContext(consumer) {
package/dist/infotip.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as cn } from "./cn-BI_4DMBf.js";
2
+ import { cn } from "./utils/cn.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Popover } from "@base-ui/react/popover";
5
5
  //#region src/infotip.tsx
@@ -1,11 +1,11 @@
1
- import { t as Button } from "./button-DW5OijoR.js";
2
- import { n as InputSize } from "./input-CfoEJ8A6.js";
3
- import { n as TextareaSize } from "./textarea-IS_D8pXf.js";
1
+ import { n as ComponentSizeValue } from "./size-context-BVhHduLi.js";
2
+ import { t as Button } from "./button-BS5KCibF.js";
3
+ import { n as InputComponentSizeValue } from "./input-size-context-BMhves-J.js";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
  import * as React from "react";
6
6
  //#region src/input-group.d.ts
7
7
  declare function InputGroup({ className, size, ...props }: React.ComponentProps<"div"> & {
8
- size?: InputSize;
8
+ size?: InputComponentSizeValue;
9
9
  }): React.JSX.Element;
10
10
  declare const inputGroupAddonVariants: (props?: ({
11
11
  align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
@@ -19,10 +19,10 @@ declare function InputGroupButton({ className, type, variant, size, ...props }:
19
19
  }): React.JSX.Element;
20
20
  declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
21
21
  declare function InputGroupInput({ className, size, ...props }: Omit<React.ComponentProps<"input">, "size"> & {
22
- size?: InputSize;
22
+ size?: InputComponentSizeValue;
23
23
  }): React.JSX.Element;
24
24
  declare function InputGroupTextarea({ className, size, ...props }: Omit<React.ComponentProps<"textarea">, "size"> & {
25
- size?: TextareaSize;
25
+ size?: ComponentSizeValue;
26
26
  }): React.JSX.Element;
27
27
  //#endregion
28
28
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };