@optimum-intelligence/opti-ui 0.9.2 → 1.0.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 (100) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +5 -1
  3. package/dist/components/app-shell/AppShell.d.ts +30 -1
  4. package/dist/components/app-shell/AppShell.js +387 -236
  5. package/dist/components/app-shell/AppShell.js.map +1 -1
  6. package/dist/components/avatar/Avatar.d.ts +1 -1
  7. package/dist/components/avatar/Avatar.js +64 -52
  8. package/dist/components/avatar/Avatar.js.map +1 -1
  9. package/dist/components/calendar/Calendar.js +6 -4
  10. package/dist/components/calendar/Calendar.js.map +1 -1
  11. package/dist/components/calendar/date-utils.js +1 -1
  12. package/dist/components/calendar/date-utils.js.map +1 -1
  13. package/dist/components/card/Card.d.ts +24 -5
  14. package/dist/components/card/Card.js +36 -23
  15. package/dist/components/card/Card.js.map +1 -1
  16. package/dist/components/collapsible/Collapsible.d.ts +8 -1
  17. package/dist/components/collapsible/Collapsible.js +32 -25
  18. package/dist/components/collapsible/Collapsible.js.map +1 -1
  19. package/dist/components/data-table/DataTable.d.ts +21 -4
  20. package/dist/components/data-table/DataTable.js +310 -100
  21. package/dist/components/data-table/DataTable.js.map +1 -1
  22. package/dist/components/data-table/DataTableContent.d.ts +1 -7
  23. package/dist/components/data-table/DataTableContent.js +209 -243
  24. package/dist/components/data-table/DataTableContent.js.map +1 -1
  25. package/dist/components/data-table/DataTableFilters.js +47 -57
  26. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  27. package/dist/components/data-table/DataTableRow.js +105 -90
  28. package/dist/components/data-table/DataTableRow.js.map +1 -1
  29. package/dist/components/data-table/layout.d.ts +0 -5
  30. package/dist/components/data-table/layout.js +1 -23
  31. package/dist/components/data-table/layout.js.map +1 -1
  32. package/dist/components/data-table/types.d.ts +5 -2
  33. package/dist/components/data-table/useDataTable.js +249 -221
  34. package/dist/components/data-table/useDataTable.js.map +1 -1
  35. package/dist/components/date-picker/DateRangePicker.js +1 -0
  36. package/dist/components/date-picker/DateRangePicker.js.map +1 -1
  37. package/dist/components/date-picker/PickerField.js +98 -101
  38. package/dist/components/date-picker/PickerField.js.map +1 -1
  39. package/dist/components/description-list/DescriptionList.d.ts +3 -1
  40. package/dist/components/description-list/DescriptionList.js +3 -1
  41. package/dist/components/description-list/DescriptionList.js.map +1 -1
  42. package/dist/components/drawer/Drawer.d.ts +1 -1
  43. package/dist/components/drawer/Drawer.js +173 -87
  44. package/dist/components/drawer/Drawer.js.map +1 -1
  45. package/dist/components/file-upload/FileUpload.js +7 -0
  46. package/dist/components/file-upload/FileUpload.js.map +1 -1
  47. package/dist/components/link/Link.d.ts +1 -1
  48. package/dist/components/link/Link.js +57 -74
  49. package/dist/components/link/Link.js.map +1 -1
  50. package/dist/components/map/Map.d.ts +14 -2
  51. package/dist/components/map/Map.js +194 -153
  52. package/dist/components/map/Map.js.map +1 -1
  53. package/dist/components/pagination/Pagination.js +2 -0
  54. package/dist/components/pagination/Pagination.js.map +1 -1
  55. package/dist/components/scroll-area/ScrollArea.d.ts +18 -2
  56. package/dist/components/scroll-area/ScrollArea.js +89 -61
  57. package/dist/components/scroll-area/ScrollArea.js.map +1 -1
  58. package/dist/components/spinner/Spinner.js +34 -26
  59. package/dist/components/spinner/Spinner.js.map +1 -1
  60. package/dist/components/stat-card/StatCard.js +36 -22
  61. package/dist/components/stat-card/StatCard.js.map +1 -1
  62. package/dist/components/table/Table.d.ts +9 -2
  63. package/dist/components/table/Table.js +87 -63
  64. package/dist/components/table/Table.js.map +1 -1
  65. package/dist/components/tag/Tag.js +79 -103
  66. package/dist/components/tag/Tag.js.map +1 -1
  67. package/dist/components/toolbar/Toolbar.d.ts +2 -1
  68. package/dist/components/toolbar/Toolbar.js +23 -15
  69. package/dist/components/toolbar/Toolbar.js.map +1 -1
  70. package/dist/components/typography/Typography.d.ts +7 -1
  71. package/dist/components/typography/Typography.js +21 -18
  72. package/dist/components/typography/Typography.js.map +1 -1
  73. package/dist/components.json +134 -26
  74. package/dist/fonts/Montserrat-OFL.txt +93 -0
  75. package/dist/fonts/Poppins-OFL.txt +93 -0
  76. package/dist/fonts/montserrat-latin-ext.woff2 +0 -0
  77. package/dist/fonts/montserrat-latin.woff2 +0 -0
  78. package/dist/fonts/poppins-latin-400.woff2 +0 -0
  79. package/dist/fonts/poppins-latin-500.woff2 +0 -0
  80. package/dist/fonts/poppins-latin-600.woff2 +0 -0
  81. package/dist/fonts/poppins-latin-700.woff2 +0 -0
  82. package/dist/fonts/poppins-latin-ext-400.woff2 +0 -0
  83. package/dist/fonts/poppins-latin-ext-500.woff2 +0 -0
  84. package/dist/fonts/poppins-latin-ext-600.woff2 +0 -0
  85. package/dist/fonts/poppins-latin-ext-700.woff2 +0 -0
  86. package/dist/fonts.css +104 -4
  87. package/dist/index.js +2 -2
  88. package/dist/labels/Labels.d.ts +12 -0
  89. package/dist/labels/Labels.js +6 -0
  90. package/dist/labels/Labels.js.map +1 -1
  91. package/dist/labels/hu.js +9 -3
  92. package/dist/labels/hu.js.map +1 -1
  93. package/dist/llms-full.txt +103 -20
  94. package/dist/llms.txt +15 -10
  95. package/dist/opti-ui.css +566 -197
  96. package/dist/reset.css +33 -0
  97. package/dist/utils/focus.d.ts +8 -0
  98. package/dist/utils/focus.js +39 -0
  99. package/dist/utils/focus.js.map +1 -0
  100. package/package.json +2 -1
@@ -13,6 +13,7 @@ import { useRender } from "@base-ui/react/use-render";
13
13
  import { mergeProps } from "@base-ui/react/merge-props";
14
14
  //#region src/components/app-shell/AppShell.tsx
15
15
  var NavbarCollapsedContext = React.createContext(false);
16
+ var NavbarExpandContext = React.createContext(null);
16
17
  var NavbarDrawerContext = React.createContext(false);
17
18
  var NavbarNestedContext = React.createContext(false);
18
19
  var PinnedRegistryContext = React.createContext(null);
@@ -21,7 +22,7 @@ var PinnedRegistryContext = React.createContext(null);
21
22
  * `NavbarSection` (`NavbarSectionLabel`, `NavbarItem`) and `NavbarFooter`.
22
23
  */
23
24
  function Navbar(t0) {
24
- const $ = c(29);
25
+ const $ = c(35);
25
26
  const { variant: t1, collapsible: t2, collapsed: collapsedProp, defaultCollapsed: t3, onCollapsedChange, expandOnHover: t4, collapseLabel: collapseLabelProp, expandLabel: expandLabelProp, render, children, ref, ...props } = t0;
26
27
  const variant = t1 === void 0 ? "inverse" : t1;
27
28
  const collapsible = t2 === void 0 ? true : t2;
@@ -78,31 +79,43 @@ function Navbar(t0) {
78
79
  } else t8 = $[7];
79
80
  const toggle = t8;
80
81
  let t9;
81
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
82
- t9 = (event) => {
82
+ if ($[8] !== collapsedProp || $[9] !== onCollapsedChange) {
83
+ t9 = () => {
84
+ endHover();
85
+ if (collapsedProp === void 0) setInternal(false);
86
+ onCollapsedChange?.(false);
87
+ };
88
+ $[8] = collapsedProp;
89
+ $[9] = onCollapsedChange;
90
+ $[10] = t9;
91
+ } else t9 = $[10];
92
+ const expand = t9;
93
+ let t10;
94
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
95
+ t10 = (event) => {
83
96
  if (event.pointerType === "mouse") setPointerInside(true);
84
97
  };
85
- $[8] = t9;
86
- } else t9 = $[8];
87
- const onPointerEnter = t9;
88
- const t10 = collapsed && !peek;
89
- let t11;
90
- if ($[9] !== peek || $[10] !== t10 || $[11] !== variant) {
91
- t11 = {
98
+ $[11] = t10;
99
+ } else t10 = $[11];
100
+ const onPointerEnter = t10;
101
+ const t11 = collapsed && !peek;
102
+ let t12;
103
+ if ($[12] !== peek || $[13] !== t11 || $[14] !== variant) {
104
+ t12 = {
92
105
  variant,
93
- collapsed: t10,
106
+ collapsed: t11,
94
107
  peek
95
108
  };
96
- $[9] = peek;
97
- $[10] = t10;
98
- $[11] = variant;
99
- $[12] = t11;
100
- } else t11 = $[12];
101
- const state = t11;
102
- const t12 = "nav";
103
- let t13;
104
- if ($[13] !== canCollapse || $[14] !== collapsed || $[15] !== label || $[16] !== toggle) {
105
- t13 = canCollapse && /* @__PURE__ */ jsx("button", {
109
+ $[12] = peek;
110
+ $[13] = t11;
111
+ $[14] = variant;
112
+ $[15] = t12;
113
+ } else t12 = $[15];
114
+ const state = t12;
115
+ const t13 = "nav";
116
+ let t14;
117
+ if ($[16] !== canCollapse || $[17] !== collapsed || $[18] !== label || $[19] !== toggle) {
118
+ t14 = canCollapse && /* @__PURE__ */ jsx("button", {
106
119
  type: "button",
107
120
  className: "oui-navbar__toggle",
108
121
  "aria-label": label,
@@ -111,53 +124,64 @@ function Navbar(t0) {
111
124
  onClick: toggle,
112
125
  children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
113
126
  });
114
- $[13] = canCollapse;
115
- $[14] = collapsed;
116
- $[15] = label;
117
- $[16] = toggle;
118
- $[17] = t13;
119
- } else t13 = $[17];
120
- let t14;
121
- if ($[18] !== children || $[19] !== t13) {
122
- t14 = /* @__PURE__ */ jsxs(Fragment, { children: [t13, children] });
123
- $[18] = children;
124
- $[19] = t13;
127
+ $[16] = canCollapse;
128
+ $[17] = collapsed;
129
+ $[18] = label;
130
+ $[19] = toggle;
125
131
  $[20] = t14;
126
132
  } else t14 = $[20];
127
- const t15 = mergeProps({
133
+ let t15;
134
+ if ($[21] !== children || $[22] !== t14) {
135
+ t15 = /* @__PURE__ */ jsxs(Fragment, { children: [t14, children] });
136
+ $[21] = children;
137
+ $[22] = t14;
138
+ $[23] = t15;
139
+ } else t15 = $[23];
140
+ const t16 = mergeProps({
128
141
  className: "oui-navbar",
142
+ "aria-label": text.mainNavigation,
129
143
  onPointerEnter: collapsed && expandOnHover ? onPointerEnter : void 0,
130
144
  onPointerLeave: collapsed && expandOnHover ? endHover : void 0,
131
- children: t14
145
+ children: t15
132
146
  }, props);
133
- let t16;
134
- if ($[21] !== ref || $[22] !== render || $[23] !== state || $[24] !== t15) {
135
- t16 = {
136
- defaultTagName: t12,
147
+ let t17;
148
+ if ($[24] !== ref || $[25] !== render || $[26] !== state || $[27] !== t16) {
149
+ t17 = {
150
+ defaultTagName: t13,
137
151
  render,
138
152
  ref,
139
153
  state,
140
- props: t15
154
+ props: t16
141
155
  };
142
- $[21] = ref;
143
- $[22] = render;
144
- $[23] = state;
145
- $[24] = t15;
146
- $[25] = t16;
147
- } else t16 = $[25];
148
- const element = useRender(t16);
149
- const t17 = collapsed && !peek;
150
- let t18;
151
- if ($[26] !== element || $[27] !== t17) {
152
- t18 = /* @__PURE__ */ jsx(NavbarCollapsedContext, {
153
- value: t17,
156
+ $[24] = ref;
157
+ $[25] = render;
158
+ $[26] = state;
159
+ $[27] = t16;
160
+ $[28] = t17;
161
+ } else t17 = $[28];
162
+ const element = useRender(t17);
163
+ const t18 = collapsed && !peek;
164
+ let t19;
165
+ if ($[29] !== element || $[30] !== expand) {
166
+ t19 = /* @__PURE__ */ jsx(NavbarExpandContext, {
167
+ value: expand,
154
168
  children: element
155
169
  });
156
- $[26] = element;
157
- $[27] = t17;
158
- $[28] = t18;
159
- } else t18 = $[28];
160
- return t18;
170
+ $[29] = element;
171
+ $[30] = expand;
172
+ $[31] = t19;
173
+ } else t19 = $[31];
174
+ let t20;
175
+ if ($[32] !== t18 || $[33] !== t19) {
176
+ t20 = /* @__PURE__ */ jsx(NavbarCollapsedContext, {
177
+ value: t18,
178
+ children: t19
179
+ });
180
+ $[32] = t18;
181
+ $[33] = t19;
182
+ $[34] = t20;
183
+ } else t20 = $[34];
184
+ return t20;
161
185
  }
162
186
  var NavbarHeader = createPrimitive("div", "oui-navbar__header", "NavbarHeader");
163
187
  var NavbarFooter = createPrimitive("div", "oui-navbar__footer", "NavbarFooter");
@@ -437,7 +461,8 @@ function hasActiveItem(children) {
437
461
  /**
438
462
  * Expandable parent row in a `Navbar` with nested `NavbarItem` sub-links. Place it in a `NavbarSection`
439
463
  * next to other items. On a collapsed rail the sub-links are hidden and the parent shows as active when
440
- * one of them is; the hover peek shows the full tree.
464
+ * one of them is; the hover peek shows the full tree, and pressing the parent expands the navbar with the
465
+ * group open, so keyboard users reach the sub-links too.
441
466
  *
442
467
  * @example
443
468
  * <NavbarSection>
@@ -448,7 +473,7 @@ function hasActiveItem(children) {
448
473
  * </NavbarSection>
449
474
  */
450
475
  function NavbarGroup(t0) {
451
- const $ = c(43);
476
+ const $ = c(51);
452
477
  let badge;
453
478
  let children;
454
479
  let className;
@@ -485,6 +510,7 @@ function NavbarGroup(t0) {
485
510
  ref = $[10];
486
511
  }
487
512
  const collapsed = React.useContext(NavbarCollapsedContext);
513
+ const expandNavbar = React.useContext(NavbarExpandContext);
488
514
  let t1;
489
515
  if ($[11] !== children) {
490
516
  t1 = hasActiveItem(children);
@@ -511,73 +537,95 @@ function NavbarGroup(t0) {
511
537
  } else t2 = $[15];
512
538
  const setOpen = t2;
513
539
  let t3;
514
- if ($[16] !== className) {
515
- t3 = cx("oui-navbar__group", className);
516
- $[16] = className;
517
- $[17] = t3;
518
- } else t3 = $[17];
519
- const t4 = open ? "" : void 0;
540
+ if ($[16] !== collapsed || $[17] !== expandNavbar || $[18] !== open || $[19] !== setOpen) {
541
+ t3 = (next_0) => {
542
+ if (!collapsed || !expandNavbar) return setOpen(next_0);
543
+ expandNavbar();
544
+ if (!open) setOpen(true);
545
+ };
546
+ $[16] = collapsed;
547
+ $[17] = expandNavbar;
548
+ $[18] = open;
549
+ $[19] = setOpen;
550
+ $[20] = t3;
551
+ } else t3 = $[20];
552
+ const onTriggerOpenChange = t3;
553
+ let t4;
554
+ if ($[21] !== className) {
555
+ t4 = cx("oui-navbar__group", className);
556
+ $[21] = className;
557
+ $[22] = t4;
558
+ } else t4 = $[22];
520
559
  const t5 = open ? "" : void 0;
521
- const t6 = hasActive && (collapsed || !open) ? "" : void 0;
522
- const t7 = collapsed && typeof label === "string" ? label : void 0;
523
- let t8;
524
- if ($[18] !== icon) {
525
- t8 = icon && /* @__PURE__ */ jsx("span", {
560
+ const t6 = open ? "" : void 0;
561
+ const t7 = hasActive && (collapsed || !open) ? "" : void 0;
562
+ const t8 = collapsed && typeof label === "string" ? label : void 0;
563
+ let t9;
564
+ if ($[23] !== collapsed) {
565
+ t9 = collapsed && { "aria-expanded": false };
566
+ $[23] = collapsed;
567
+ $[24] = t9;
568
+ } else t9 = $[24];
569
+ let t10;
570
+ if ($[25] !== icon) {
571
+ t10 = icon && /* @__PURE__ */ jsx("span", {
526
572
  className: "oui-navbar__item-icon",
527
573
  children: icon
528
574
  });
529
- $[18] = icon;
530
- $[19] = t8;
531
- } else t8 = $[19];
532
- let t9;
533
- if ($[20] !== label) {
534
- t9 = /* @__PURE__ */ jsx("span", {
575
+ $[25] = icon;
576
+ $[26] = t10;
577
+ } else t10 = $[26];
578
+ let t11;
579
+ if ($[27] !== label) {
580
+ t11 = /* @__PURE__ */ jsx("span", {
535
581
  className: "oui-navbar__item-label",
536
582
  children: label
537
583
  });
538
- $[20] = label;
539
- $[21] = t9;
540
- } else t9 = $[21];
541
- let t10;
542
- if ($[22] !== badge) {
543
- t10 = badge != null && /* @__PURE__ */ jsx("span", {
584
+ $[27] = label;
585
+ $[28] = t11;
586
+ } else t11 = $[28];
587
+ let t12;
588
+ if ($[29] !== badge) {
589
+ t12 = badge != null && /* @__PURE__ */ jsx("span", {
544
590
  className: "oui-navbar__item-badge",
545
591
  children: badge
546
592
  });
547
- $[22] = badge;
548
- $[23] = t10;
549
- } else t10 = $[23];
550
- let t11;
551
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
552
- t11 = /* @__PURE__ */ jsx(ChevronRightIcon, { className: "oui-navbar__item-chevron" });
553
- $[24] = t11;
554
- } else t11 = $[24];
555
- let t12;
556
- if ($[25] !== t10 || $[26] !== t5 || $[27] !== t6 || $[28] !== t7 || $[29] !== t8 || $[30] !== t9) {
557
- t12 = /* @__PURE__ */ jsxs(Collapsible.Trigger, {
593
+ $[29] = badge;
594
+ $[30] = t12;
595
+ } else t12 = $[30];
596
+ let t13;
597
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
598
+ t13 = /* @__PURE__ */ jsx(ChevronRightIcon, { className: "oui-navbar__item-chevron" });
599
+ $[31] = t13;
600
+ } else t13 = $[31];
601
+ let t14;
602
+ if ($[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t6 || $[36] !== t7 || $[37] !== t8 || $[38] !== t9) {
603
+ t14 = /* @__PURE__ */ jsxs(Collapsible.Trigger, {
558
604
  className: "oui-navbar__item",
559
605
  "data-has-children": "",
560
- "data-open": t5,
561
- "data-active": t6,
562
- title: t7,
606
+ "data-open": t6,
607
+ "data-active": t7,
608
+ title: t8,
609
+ ...t9,
563
610
  children: [
564
- t8,
565
- t9,
566
611
  t10,
567
- t11
612
+ t11,
613
+ t12,
614
+ t13
568
615
  ]
569
616
  });
570
- $[25] = t10;
571
- $[26] = t5;
572
- $[27] = t6;
573
- $[28] = t7;
574
- $[29] = t8;
575
- $[30] = t9;
576
- $[31] = t12;
577
- } else t12 = $[31];
578
- let t13;
579
- if ($[32] !== children) {
580
- t13 = /* @__PURE__ */ jsx(Collapsible.Panel, {
617
+ $[32] = t10;
618
+ $[33] = t11;
619
+ $[34] = t12;
620
+ $[35] = t6;
621
+ $[36] = t7;
622
+ $[37] = t8;
623
+ $[38] = t9;
624
+ $[39] = t14;
625
+ } else t14 = $[39];
626
+ let t15;
627
+ if ($[40] !== children) {
628
+ t15 = /* @__PURE__ */ jsx(Collapsible.Panel, {
581
629
  className: "oui-navbar__group-panel",
582
630
  keepMounted: true,
583
631
  children: /* @__PURE__ */ jsx("div", {
@@ -588,31 +636,31 @@ function NavbarGroup(t0) {
588
636
  })
589
637
  })
590
638
  });
591
- $[32] = children;
592
- $[33] = t13;
593
- } else t13 = $[33];
594
- let t14;
595
- if ($[34] !== open || $[35] !== props || $[36] !== ref || $[37] !== setOpen || $[38] !== t12 || $[39] !== t13 || $[40] !== t3 || $[41] !== t4) {
596
- t14 = /* @__PURE__ */ jsxs(Collapsible.Root, {
639
+ $[40] = children;
640
+ $[41] = t15;
641
+ } else t15 = $[41];
642
+ let t16;
643
+ if ($[42] !== onTriggerOpenChange || $[43] !== open || $[44] !== props || $[45] !== ref || $[46] !== t14 || $[47] !== t15 || $[48] !== t4 || $[49] !== t5) {
644
+ t16 = /* @__PURE__ */ jsxs(Collapsible.Root, {
597
645
  ref,
598
- className: t3,
646
+ className: t4,
599
647
  open,
600
- onOpenChange: setOpen,
601
- "data-open": t4,
648
+ onOpenChange: onTriggerOpenChange,
649
+ "data-open": t5,
602
650
  ...props,
603
- children: [t12, t13]
651
+ children: [t14, t15]
604
652
  });
605
- $[34] = open;
606
- $[35] = props;
607
- $[36] = ref;
608
- $[37] = setOpen;
609
- $[38] = t12;
610
- $[39] = t13;
611
- $[40] = t3;
612
- $[41] = t4;
613
- $[42] = t14;
614
- } else t14 = $[42];
615
- return t14;
653
+ $[42] = onTriggerOpenChange;
654
+ $[43] = open;
655
+ $[44] = props;
656
+ $[45] = ref;
657
+ $[46] = t14;
658
+ $[47] = t15;
659
+ $[48] = t4;
660
+ $[49] = t5;
661
+ $[50] = t16;
662
+ } else t16 = $[50];
663
+ return t16;
616
664
  }
617
665
  var MAX_PINNED = 4;
618
666
  function byDocumentOrder(a, b) {
@@ -707,7 +755,7 @@ function PinnedTab(t0) {
707
755
  * </AppShell>
708
756
  */
709
757
  function AppShell(t0) {
710
- const $ = c(90);
758
+ const $ = c(98);
711
759
  let children;
712
760
  let className;
713
761
  let mainProps;
@@ -757,6 +805,8 @@ function AppShell(t0) {
757
805
  const [open, setOpen] = React.useState(false);
758
806
  const [drawer] = React.useState(_temp);
759
807
  const container = usePortalContainer();
808
+ const generatedId = React.useId();
809
+ const mainId = mainProps?.id ?? generatedId;
760
810
  let t3;
761
811
  if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
762
812
  t3 = /* @__PURE__ */ new Map();
@@ -885,22 +935,45 @@ function AppShell(t0) {
885
935
  $[45] = className;
886
936
  $[46] = t13;
887
937
  } else t13 = $[46];
888
- let t14;
889
- if ($[47] !== navbar || $[48] !== register) {
890
- t14 = /* @__PURE__ */ jsx("div", {
938
+ const t14 = `#${mainId}`;
939
+ let t15;
940
+ if ($[47] !== mainId) {
941
+ t15 = (event_0) => {
942
+ event_0.preventDefault();
943
+ document.getElementById(mainId)?.focus();
944
+ };
945
+ $[47] = mainId;
946
+ $[48] = t15;
947
+ } else t15 = $[48];
948
+ let t16;
949
+ if ($[49] !== t14 || $[50] !== t15 || $[51] !== text.skipToContent) {
950
+ t16 = /* @__PURE__ */ jsx("a", {
951
+ className: "oui-app-shell__skip",
952
+ href: t14,
953
+ onClick: t15,
954
+ children: text.skipToContent
955
+ });
956
+ $[49] = t14;
957
+ $[50] = t15;
958
+ $[51] = text.skipToContent;
959
+ $[52] = t16;
960
+ } else t16 = $[52];
961
+ let t17;
962
+ if ($[53] !== navbar || $[54] !== register) {
963
+ t17 = /* @__PURE__ */ jsx("div", {
891
964
  className: "oui-app-shell__navbar",
892
965
  children: /* @__PURE__ */ jsx(PinnedRegistryContext, {
893
966
  value: register,
894
967
  children: navbar
895
968
  })
896
969
  });
897
- $[47] = navbar;
898
- $[48] = register;
899
- $[49] = t14;
900
- } else t14 = $[49];
901
- let t15;
902
- if ($[50] !== drawer || $[51] !== hasTabs || $[52] !== menuLabel || $[53] !== mobileActions || $[54] !== mobileBrand || $[55] !== showTopBar) {
903
- t15 = showTopBar && /* @__PURE__ */ jsxs("header", {
970
+ $[53] = navbar;
971
+ $[54] = register;
972
+ $[55] = t17;
973
+ } else t17 = $[55];
974
+ let t18;
975
+ if ($[56] !== drawer || $[57] !== hasTabs || $[58] !== menuLabel || $[59] !== mobileActions || $[60] !== mobileBrand || $[61] !== showTopBar) {
976
+ t18 = showTopBar && /* @__PURE__ */ jsxs("header", {
904
977
  className: "oui-app-shell__mobile-bar",
905
978
  children: [
906
979
  !hasTabs && /* @__PURE__ */ jsx(Dialog.Trigger, {
@@ -916,127 +989,132 @@ function AppShell(t0) {
916
989
  mobileActions
917
990
  ]
918
991
  });
919
- $[50] = drawer;
920
- $[51] = hasTabs;
921
- $[52] = menuLabel;
922
- $[53] = mobileActions;
923
- $[54] = mobileBrand;
924
- $[55] = showTopBar;
925
- $[56] = t15;
926
- } else t15 = $[56];
927
- const t16 = hasTabs && mobileNavPosition === "top" && tabbar;
928
- const t17 = mainProps?.className;
929
- let t18;
930
- if ($[57] !== t17) {
931
- t18 = cx("oui-app-shell__main", t17);
932
- $[57] = t17;
933
- $[58] = t18;
934
- } else t18 = $[58];
935
- let t19;
936
- if ($[59] !== children || $[60] !== mainProps || $[61] !== t18) {
937
- t19 = /* @__PURE__ */ jsx("main", {
992
+ $[56] = drawer;
993
+ $[57] = hasTabs;
994
+ $[58] = menuLabel;
995
+ $[59] = mobileActions;
996
+ $[60] = mobileBrand;
997
+ $[61] = showTopBar;
998
+ $[62] = t18;
999
+ } else t18 = $[62];
1000
+ const t19 = hasTabs && mobileNavPosition === "top" && tabbar;
1001
+ const t20 = mainProps?.className;
1002
+ let t21;
1003
+ if ($[63] !== t20) {
1004
+ t21 = cx("oui-app-shell__main", t20);
1005
+ $[63] = t20;
1006
+ $[64] = t21;
1007
+ } else t21 = $[64];
1008
+ let t22;
1009
+ if ($[65] !== children || $[66] !== mainId || $[67] !== mainProps || $[68] !== t21) {
1010
+ t22 = /* @__PURE__ */ jsx("main", {
1011
+ tabIndex: -1,
938
1012
  ...mainProps,
939
- className: t18,
1013
+ id: mainId,
1014
+ className: t21,
940
1015
  children
941
1016
  });
942
- $[59] = children;
943
- $[60] = mainProps;
944
- $[61] = t18;
945
- $[62] = t19;
946
- } else t19 = $[62];
947
- const t20 = hasTabs && mobileNavPosition === "bottom" && tabbar;
948
- let t21;
949
- if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
950
- t21 = /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "oui-dialog__backdrop" });
951
- $[63] = t21;
952
- } else t21 = $[63];
953
- let t22;
954
- if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
955
- t22 = /* @__PURE__ */ jsx(XIcon, {});
956
- $[64] = t22;
957
- } else t22 = $[64];
958
- let t23;
959
- if ($[65] !== text.closeNavigation) {
960
- t23 = /* @__PURE__ */ jsx(Dialog.Close, {
1017
+ $[65] = children;
1018
+ $[66] = mainId;
1019
+ $[67] = mainProps;
1020
+ $[68] = t21;
1021
+ $[69] = t22;
1022
+ } else t22 = $[69];
1023
+ const t23 = hasTabs && mobileNavPosition === "bottom" && tabbar;
1024
+ let t24;
1025
+ if ($[70] === Symbol.for("react.memo_cache_sentinel")) {
1026
+ t24 = /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "oui-dialog__backdrop" });
1027
+ $[70] = t24;
1028
+ } else t24 = $[70];
1029
+ let t25;
1030
+ if ($[71] === Symbol.for("react.memo_cache_sentinel")) {
1031
+ t25 = /* @__PURE__ */ jsx(XIcon, {});
1032
+ $[71] = t25;
1033
+ } else t25 = $[71];
1034
+ let t26;
1035
+ if ($[72] !== text.closeNavigation) {
1036
+ t26 = /* @__PURE__ */ jsx(Dialog.Close, {
961
1037
  className: "oui-app-shell__drawer-close",
962
1038
  "aria-label": text.closeNavigation,
963
- children: t22
1039
+ children: t25
964
1040
  });
965
- $[65] = text.closeNavigation;
966
- $[66] = t23;
967
- } else t23 = $[66];
968
- let t24;
969
- if ($[67] !== navbar) {
970
- t24 = /* @__PURE__ */ jsx(NavbarDrawerContext, {
1041
+ $[72] = text.closeNavigation;
1042
+ $[73] = t26;
1043
+ } else t26 = $[73];
1044
+ let t27;
1045
+ if ($[74] !== navbar) {
1046
+ t27 = /* @__PURE__ */ jsx(NavbarDrawerContext, {
971
1047
  value: true,
972
1048
  children: navbar
973
1049
  });
974
- $[67] = navbar;
975
- $[68] = t24;
976
- } else t24 = $[68];
977
- let t25;
978
- if ($[69] !== t23 || $[70] !== t24 || $[71] !== text.navigation) {
979
- t25 = /* @__PURE__ */ jsxs(Dialog.Popup, {
1050
+ $[74] = navbar;
1051
+ $[75] = t27;
1052
+ } else t27 = $[75];
1053
+ let t28;
1054
+ if ($[76] !== t26 || $[77] !== t27 || $[78] !== text.navigation) {
1055
+ t28 = /* @__PURE__ */ jsxs(Dialog.Popup, {
980
1056
  className: "oui-app-shell__drawer",
981
1057
  "aria-label": text.navigation,
982
1058
  onClick: closeOnNavigate,
983
- children: [t23, t24]
1059
+ children: [t26, t27]
984
1060
  });
985
- $[69] = t23;
986
- $[70] = t24;
987
- $[71] = text.navigation;
988
- $[72] = t25;
989
- } else t25 = $[72];
990
- let t26;
991
- if ($[73] !== container || $[74] !== t25) {
992
- t26 = /* @__PURE__ */ jsxs(Dialog.Portal, {
1061
+ $[76] = t26;
1062
+ $[77] = t27;
1063
+ $[78] = text.navigation;
1064
+ $[79] = t28;
1065
+ } else t28 = $[79];
1066
+ let t29;
1067
+ if ($[80] !== container || $[81] !== t28) {
1068
+ t29 = /* @__PURE__ */ jsxs(Dialog.Portal, {
993
1069
  container,
994
- children: [t21, t25]
1070
+ children: [t24, t28]
995
1071
  });
996
- $[73] = container;
997
- $[74] = t25;
998
- $[75] = t26;
999
- } else t26 = $[75];
1000
- let t27;
1001
- if ($[76] !== drawer || $[77] !== open || $[78] !== t26) {
1002
- t27 = /* @__PURE__ */ jsx(Dialog.Root, {
1072
+ $[80] = container;
1073
+ $[81] = t28;
1074
+ $[82] = t29;
1075
+ } else t29 = $[82];
1076
+ let t30;
1077
+ if ($[83] !== drawer || $[84] !== open || $[85] !== t29) {
1078
+ t30 = /* @__PURE__ */ jsx(Dialog.Root, {
1003
1079
  handle: drawer,
1004
1080
  open,
1005
1081
  onOpenChange: setOpen,
1006
- children: t26
1082
+ children: t29
1007
1083
  });
1008
- $[76] = drawer;
1009
- $[77] = open;
1010
- $[78] = t26;
1011
- $[79] = t27;
1012
- } else t27 = $[79];
1013
- let t28;
1014
- if ($[80] !== props || $[81] !== ref || $[82] !== t13 || $[83] !== t14 || $[84] !== t15 || $[85] !== t16 || $[86] !== t19 || $[87] !== t20 || $[88] !== t27) {
1015
- t28 = /* @__PURE__ */ jsxs("div", {
1084
+ $[83] = drawer;
1085
+ $[84] = open;
1086
+ $[85] = t29;
1087
+ $[86] = t30;
1088
+ } else t30 = $[86];
1089
+ let t31;
1090
+ if ($[87] !== props || $[88] !== ref || $[89] !== t13 || $[90] !== t16 || $[91] !== t17 || $[92] !== t18 || $[93] !== t19 || $[94] !== t22 || $[95] !== t23 || $[96] !== t30) {
1091
+ t31 = /* @__PURE__ */ jsxs("div", {
1016
1092
  ref,
1017
1093
  className: t13,
1018
1094
  ...props,
1019
1095
  children: [
1020
- t14,
1021
- t15,
1022
1096
  t16,
1097
+ t17,
1098
+ t18,
1023
1099
  t19,
1024
- t20,
1025
- t27
1100
+ t22,
1101
+ t23,
1102
+ t30
1026
1103
  ]
1027
1104
  });
1028
- $[80] = props;
1029
- $[81] = ref;
1030
- $[82] = t13;
1031
- $[83] = t14;
1032
- $[84] = t15;
1033
- $[85] = t16;
1034
- $[86] = t19;
1035
- $[87] = t20;
1036
- $[88] = t27;
1037
- $[89] = t28;
1038
- } else t28 = $[89];
1039
- return t28;
1105
+ $[87] = props;
1106
+ $[88] = ref;
1107
+ $[89] = t13;
1108
+ $[90] = t16;
1109
+ $[91] = t17;
1110
+ $[92] = t18;
1111
+ $[93] = t19;
1112
+ $[94] = t22;
1113
+ $[95] = t23;
1114
+ $[96] = t30;
1115
+ $[97] = t31;
1116
+ } else t31 = $[97];
1117
+ return t31;
1040
1118
  }
1041
1119
  function _temp3(t0) {
1042
1120
  const [id_0, entry_0] = t0;
@@ -1050,6 +1128,79 @@ function _temp2(t0, t1) {
1050
1128
  function _temp() {
1051
1129
  return Dialog.createHandle();
1052
1130
  }
1131
+ /**
1132
+ * Content column of a page inside `AppShell`: gutters, a maximum width and the gap between sections, all
1133
+ * smaller on phones. Customize with `--oui-page-max-width` (80rem), `--oui-page-padding` and `--oui-page-gap`.
1134
+ *
1135
+ * @example
1136
+ * <AppShell navbar={<Navbar>…</Navbar>}>
1137
+ * <Page fill>
1138
+ * <PageHeader title="Sessions" />
1139
+ * <Card fill>
1140
+ * <CardContent>
1141
+ * <DataTable fill columns={columns} data={sessions} getRowId={(row) => row.id} />
1142
+ * </CardContent>
1143
+ * </Card>
1144
+ * </Page>
1145
+ * </AppShell>
1146
+ */
1147
+ function Page(t0) {
1148
+ const $ = c(15);
1149
+ let t1;
1150
+ let t2;
1151
+ let t3;
1152
+ let t4;
1153
+ let t5;
1154
+ let t6;
1155
+ if ($[0] !== t0) {
1156
+ const { fill: t7, render, ref, ...props } = t0;
1157
+ const fill = t7 === void 0 ? false : t7;
1158
+ let t8;
1159
+ if ($[7] !== fill) {
1160
+ t8 = { fill };
1161
+ $[7] = fill;
1162
+ $[8] = t8;
1163
+ } else t8 = $[8];
1164
+ const state = t8;
1165
+ t6 = useRender;
1166
+ t1 = "div";
1167
+ t2 = render;
1168
+ t3 = ref;
1169
+ t4 = state;
1170
+ t5 = mergeProps({ className: "oui-page" }, props);
1171
+ $[0] = t0;
1172
+ $[1] = t1;
1173
+ $[2] = t2;
1174
+ $[3] = t3;
1175
+ $[4] = t4;
1176
+ $[5] = t5;
1177
+ $[6] = t6;
1178
+ } else {
1179
+ t1 = $[1];
1180
+ t2 = $[2];
1181
+ t3 = $[3];
1182
+ t4 = $[4];
1183
+ t5 = $[5];
1184
+ t6 = $[6];
1185
+ }
1186
+ let t7;
1187
+ if ($[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
1188
+ t7 = {
1189
+ defaultTagName: t1,
1190
+ render: t2,
1191
+ ref: t3,
1192
+ state: t4,
1193
+ props: t5
1194
+ };
1195
+ $[9] = t1;
1196
+ $[10] = t2;
1197
+ $[11] = t3;
1198
+ $[12] = t4;
1199
+ $[13] = t5;
1200
+ $[14] = t7;
1201
+ } else t7 = $[14];
1202
+ return t6(t7);
1203
+ }
1053
1204
  /** Page title block with optional breadcrumbs, eyebrow, description and actions. */
1054
1205
  function PageHeader(t0) {
1055
1206
  const $ = c(34);
@@ -1243,6 +1394,6 @@ function Grid(t0) {
1243
1394
  return t5;
1244
1395
  }
1245
1396
  //#endregion
1246
- export { AppShell, Grid, Navbar, NavbarBrand, NavbarFooter, NavbarGroup, NavbarHeader, NavbarItem, NavbarSection, NavbarSectionLabel, PageHeader };
1397
+ export { AppShell, Grid, Navbar, NavbarBrand, NavbarFooter, NavbarGroup, NavbarHeader, NavbarItem, NavbarSection, NavbarSectionLabel, Page, PageHeader };
1247
1398
 
1248
1399
  //# sourceMappingURL=AppShell.js.map