neatkit 0.8.0 → 0.9.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 (82) hide show
  1. package/dist/Boundary.cjs +1 -1
  2. package/dist/Boundary.js +29 -29
  3. package/dist/Button-BV5OUXpc.js +101 -0
  4. package/dist/Button-DU4j_IED.cjs +1 -0
  5. package/dist/Button.cjs +1 -1
  6. package/dist/Button.js +1 -1
  7. package/dist/Checkbox.cjs +1 -1
  8. package/dist/Checkbox.js +1 -1
  9. package/dist/{Code-JDb4VFl7.cjs → Code-B7s_rN0G.cjs} +1 -1
  10. package/dist/{Code-ClkozPlv.js → Code-Bp2X1k-g.js} +1 -4
  11. package/dist/Code.cjs +1 -1
  12. package/dist/Code.js +1 -1
  13. package/dist/Divider-C7XGlr26.cjs +1 -0
  14. package/dist/{Divider-BE15WVDI.js → Divider-DZgpYpr-.js} +1 -1
  15. package/dist/Divider.cjs +1 -1
  16. package/dist/Divider.js +1 -1
  17. package/dist/Icon-BIBzgznI.cjs +1 -0
  18. package/dist/{Icon-BoEUoOk7.js → Icon-CxK1wlGk.js} +98 -52
  19. package/dist/Icon.cjs +1 -1
  20. package/dist/Icon.js +1 -1
  21. package/dist/Input.cjs +1 -1
  22. package/dist/Input.js +1 -1
  23. package/dist/Markdown.cjs +1 -1
  24. package/dist/Markdown.js +108 -104
  25. package/dist/Modal.cjs +1 -1
  26. package/dist/Modal.js +1 -1
  27. package/dist/Popover.cjs +1 -1
  28. package/dist/Popover.js +147 -141
  29. package/dist/Select.cjs +1 -1
  30. package/dist/Select.js +2 -2
  31. package/dist/Sidebar.cjs +1 -1
  32. package/dist/Sidebar.js +310 -295
  33. package/dist/Table-CADupJEU.js +423 -0
  34. package/dist/Table-qetwZpTC.cjs +1 -0
  35. package/dist/Table.cjs +1 -1
  36. package/dist/Table.js +1 -1
  37. package/dist/{Tooltip-B4bajPtk.cjs → Tooltip-B2d5ss7S.cjs} +1 -1
  38. package/dist/{Tooltip-BVqdnKK_.js → Tooltip-BK64rkxV.js} +1 -1
  39. package/dist/Tooltip.cjs +1 -1
  40. package/dist/Tooltip.js +1 -1
  41. package/dist/albert-sans-cb3e34c4.woff2 +0 -0
  42. package/dist/components/Icon/icons/GearIcon.d.ts +11 -0
  43. package/dist/components/Icon/icons/ImageIcon.d.ts +11 -0
  44. package/dist/components/Icon/utils/registry.d.ts +2 -0
  45. package/dist/components/Sidebar/Sidebar.d.ts +6 -1
  46. package/dist/components/Sidebar/components/SidebarFooter.d.ts +5 -0
  47. package/dist/components/Sidebar/components/SidebarGroup.d.ts +5 -16
  48. package/dist/components/Sidebar/components/SidebarHeader.d.ts +29 -0
  49. package/dist/components/Sidebar/components/SidebarItem.d.ts +3 -0
  50. package/dist/components/Sidebar/components/SidebarPanel.d.ts +2 -2
  51. package/dist/components/Sidebar/hooks/usePresentation.d.ts +2 -2
  52. package/dist/components/Sidebar/index.d.ts +1 -1
  53. package/dist/components/Sidebar/utils/presentation.d.ts +12 -0
  54. package/dist/components/Sidebar/utils/state.d.ts +2 -2
  55. package/dist/components/Table/Table.d.ts +21 -209
  56. package/dist/components/Table/components/TableAction.d.ts +18 -0
  57. package/dist/components/Table/components/TableActionCell.d.ts +15 -0
  58. package/dist/components/Table/components/TableActionHeaderCell.d.ts +13 -0
  59. package/dist/components/Table/components/TableBody.d.ts +27 -0
  60. package/dist/components/Table/components/TableCell.d.ts +42 -0
  61. package/dist/components/Table/components/TableFoot.d.ts +19 -0
  62. package/dist/components/Table/components/TableHead.d.ts +19 -0
  63. package/dist/components/Table/components/TableHeaderCell.d.ts +23 -0
  64. package/dist/components/Table/components/TableRow.d.ts +67 -0
  65. package/dist/components/Table/hooks/useHorizontalOverflow.d.ts +25 -0
  66. package/dist/components/Table/utils/cell.d.ts +25 -0
  67. package/dist/components/Table/utils/children.d.ts +18 -0
  68. package/dist/components/Table/utils/trigger.d.ts +54 -0
  69. package/dist/floating-position-DIjh2wnP.cjs +1 -0
  70. package/dist/floating-position-DvR6e334.js +50 -0
  71. package/dist/style.css +1 -1
  72. package/dist/{useFloatingPosition-CMirP2-2.js → useFloatingPosition-B3ZC-v3v.js} +1 -1
  73. package/dist/{useFloatingPosition-BBEUHPqy.cjs → useFloatingPosition-GzkP9dCc.cjs} +1 -1
  74. package/package.json +2 -1
  75. package/dist/Button-Chv4O66e.js +0 -99
  76. package/dist/Button-DCKtFvSo.cjs +0 -1
  77. package/dist/Divider-CJYbFcSX.cjs +0 -1
  78. package/dist/Icon-DJ4BigRz.cjs +0 -1
  79. package/dist/Table-B30TBckZ.js +0 -402
  80. package/dist/Table-DceR12X9.cjs +0 -1
  81. package/dist/floating-position-5wJ5G5IT.js +0 -48
  82. package/dist/floating-position-Cy9xxdH4.cjs +0 -1
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * Determines whether Table body children contain explicit content.
4
+ *
5
+ * Empty Fragments are inspected recursively. Components are considered
6
+ * content because their eventual render output cannot be known by the parent.
7
+ *
8
+ * @param content - The Table body children inspected for content.
9
+ *
10
+ * @returns Whether the children contain a non-empty explicit child.
11
+ */
12
+ export declare function hasTableBodyContent(content: ReactNode): boolean;
13
+ /**
14
+ * Warns when a sticky Table header is placed outside its supported edge.
15
+ *
16
+ * @param content - The cells rendered inside one Table row.
17
+ */
18
+ export declare function warnAboutInvalidStickyHeaders(content: ReactNode): void;
@@ -0,0 +1,54 @@
1
+ import { type HTMLAttributeAnchorTarget, type MouseEventHandler, type ReactNode } from "react";
2
+ /** The navigation properties describing a link-backed Table row. */
3
+ export type TableRowLinkProperties = {
4
+ /** Whether the linked resource should be downloaded. */
5
+ download?: boolean | string;
6
+ /** The destination opened by whole-row activation. */
7
+ href: string;
8
+ /** The language of the linked resource. */
9
+ hrefLang?: string;
10
+ /** The callback invoked when the row's link is activated. */
11
+ onNavigate?: MouseEventHandler<HTMLAnchorElement>;
12
+ /** The relationship between the table and linked resource. */
13
+ rel?: string;
14
+ /** The browsing context used to open the linked resource. */
15
+ target?: HTMLAttributeAnchorTarget;
16
+ };
17
+ /** A type representing the primary control injected into a Table row. */
18
+ export type TableRowTrigger = {
19
+ /** The accessible name describing the row activation. */
20
+ ariaLabel: string;
21
+ /** Whether the primary control uses link or button semantics. */
22
+ kind: "button" | "link";
23
+ /** Assigns the rendered primary control to its owning row. */
24
+ reference: (element: HTMLAnchorElement | HTMLButtonElement | null) => void;
25
+ /** The link-backed row properties, when navigation is configured. */
26
+ linkProperties?: TableRowLinkProperties;
27
+ /** The button activation callback, when an action is configured. */
28
+ onClick?: MouseEventHandler<HTMLButtonElement>;
29
+ };
30
+ /** A type representing the outcome of injecting a row's primary control. */
31
+ export type TableRowTriggerAttachment = {
32
+ /** Whether a data cell was available to receive the control. */
33
+ attached: boolean;
34
+ /** The row content containing the injected control, when one was found. */
35
+ content: ReactNode;
36
+ };
37
+ /**
38
+ * Determines whether a click originated from a nested interactive descendant.
39
+ *
40
+ * @param target - The deepest element receiving the click.
41
+ * @param row - The row limiting ancestor inspection.
42
+ *
43
+ * @returns Whether a nested native or ARIA widget owns the interaction.
44
+ */
45
+ export declare function isInteractiveRowDescendant(target: Element, row: HTMLTableRowElement): boolean;
46
+ /**
47
+ * Injects a row's semantic trigger into its first explicit data cell.
48
+ *
49
+ * @param content - The row cells inspected recursively.
50
+ * @param trigger - The link or button representing whole-row activation.
51
+ *
52
+ * @returns The row content containing one primary control.
53
+ */
54
+ export declare function attachRowTrigger(content: ReactNode, trigger: TableRowTrigger): TableRowTriggerAttachment;
@@ -0,0 +1 @@
1
+ "use strict";const T={bottom:"top",left:"right",right:"left",top:"bottom"};function x(h,i){const t=Math.min(12,i/2);return Math.min(Math.max(t,h),i-t)}function E(h){return T[h]}function _(h,i){return i==="left"||i==="right"?h.width:h.height}function A(h,i,t){const e=Math.max(h.left,0),o=Math.max(h.top,0),l=Math.min(h.right,i),M=Math.min(h.bottom,t);return l<=e||M<=o?h:{bottom:M,left:e,right:l,top:o}}function F(h,i,t,e,o){const l={bottom:o.bottom-t.bottom-i*2,left:t.left-o.left-i*2,right:o.right-t.right-i*2,top:t.top-o.top-i*2},M=E(h),P=_(e,h),f=l[h]<P&&l[M]>l[h]?M:h;let m=t.left+(t.width-e.width)/2,c=t.top+(t.height-e.height)/2;f==="top"?c=t.top-e.height-i:f==="bottom"?c=t.bottom+i:f==="left"?m=t.left-e.width-i:m=t.right+i;const w=o.left+i,O=o.top+i;m=Math.min(Math.max(w,m),Math.max(w,o.right-i-e.width)),c=Math.min(Math.max(O,c),Math.max(O,o.bottom-i-e.height));let a;return f==="top"||f==="bottom"?a=x(t.left+t.width/2-m,e.width):a=x(t.top+t.height/2-c,e.height),{arrowOffset:a,left:m,placement:f,top:c}}exports.calculateFloatingPosition=F;exports.getVisibleBounds=A;
@@ -0,0 +1,50 @@
1
+ const E = {
2
+ bottom: "top",
3
+ left: "right",
4
+ right: "left",
5
+ top: "bottom"
6
+ };
7
+ function x(i, h) {
8
+ const t = Math.min(12, h / 2);
9
+ return Math.min(Math.max(t, i), h - t);
10
+ }
11
+ function P(i) {
12
+ return E[i];
13
+ }
14
+ function _(i, h) {
15
+ return h === "left" || h === "right" ? i.width : i.height;
16
+ }
17
+ function p(i, h, t) {
18
+ const e = Math.max(i.left, 0), f = Math.max(i.top, 0), o = Math.min(i.right, h), M = Math.min(i.bottom, t);
19
+ return o <= e || M <= f ? i : { bottom: M, left: e, right: o, top: f };
20
+ }
21
+ function F(i, h, t, e, f) {
22
+ const o = {
23
+ bottom: f.bottom - t.bottom - h * 2,
24
+ left: t.left - f.left - h * 2,
25
+ right: f.right - t.right - h * 2,
26
+ top: t.top - f.top - h * 2
27
+ }, M = P(i), T = _(e, i), m = o[i] < T && o[M] > o[i] ? M : i;
28
+ let l = t.left + (t.width - e.width) / 2, c = t.top + (t.height - e.height) / 2;
29
+ m === "top" ? c = t.top - e.height - h : m === "bottom" ? c = t.bottom + h : m === "left" ? l = t.left - e.width - h : l = t.right + h;
30
+ const O = f.left + h, a = f.top + h;
31
+ l = Math.min(
32
+ Math.max(O, l),
33
+ Math.max(O, f.right - h - e.width)
34
+ ), c = Math.min(
35
+ Math.max(a, c),
36
+ Math.max(a, f.bottom - h - e.height)
37
+ );
38
+ let w;
39
+ return m === "top" || m === "bottom" ? w = x(
40
+ t.left + t.width / 2 - l,
41
+ e.width
42
+ ) : w = x(
43
+ t.top + t.height / 2 - c,
44
+ e.height
45
+ ), { arrowOffset: w, left: l, placement: m, top: c };
46
+ }
47
+ export {
48
+ F as c,
49
+ p as g
50
+ };