@k3-tech/react-kit 0.0.75 → 0.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export * from './kit/components/timepicker';
28
28
  export * from './kit/components/data-table-headers';
29
29
  export * from './kit/components/data-display';
30
30
  export * from './kit/components/tree';
31
+ export * from './kit/components/page-header';
31
32
  export { default as AdminLayout } from './kit/layouts/admin/components/AdminLayout';
32
33
  export { default as ThemeToggle } from './kit/layouts/admin/components/ThemeToggle';
33
34
  export * from './kit/layouts/admin/hooks/menu';
package/dist/index.js CHANGED
@@ -52481,6 +52481,61 @@ const TreeLeaf = React.forwardRef(function TreeLeaf2({ tone = "none", className,
52481
52481
  }
52482
52482
  );
52483
52483
  });
52484
+ const TITLE_SIZE = {
52485
+ default: "text-[26px] font-bold",
52486
+ lg: "text-[30px] font-extrabold",
52487
+ sm: "text-2xl font-bold",
52488
+ doc: "font-mono text-[30px] font-extrabold"
52489
+ };
52490
+ function PageHeader({
52491
+ title,
52492
+ size: size2 = "default",
52493
+ onBack,
52494
+ backTitle = "Back",
52495
+ meta,
52496
+ description,
52497
+ actions,
52498
+ className
52499
+ }) {
52500
+ const indent = onBack ? "pl-[42px]" : "";
52501
+ return /* @__PURE__ */ jsxs(
52502
+ "div",
52503
+ {
52504
+ "data-page-header": "",
52505
+ className: cn$1("flex flex-wrap items-start justify-between gap-x-6 gap-y-4", className),
52506
+ children: [
52507
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
52508
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center gap-2", children: [
52509
+ onBack && /* @__PURE__ */ jsx(
52510
+ "button",
52511
+ {
52512
+ type: "button",
52513
+ onClick: onBack,
52514
+ "aria-label": backTitle,
52515
+ title: backTitle,
52516
+ className: "inline-flex size-[34px] shrink-0 cursor-pointer items-center justify-center rounded-lg text-foreground transition-colors hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
52517
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-5" })
52518
+ }
52519
+ ),
52520
+ /* @__PURE__ */ jsx(
52521
+ "h1",
52522
+ {
52523
+ className: cn$1(
52524
+ "m-0 min-w-0 break-words leading-[1.2] tracking-[-0.01em] text-foreground",
52525
+ TITLE_SIZE[size2]
52526
+ ),
52527
+ children: title
52528
+ }
52529
+ )
52530
+ ] }),
52531
+ meta && /* @__PURE__ */ jsx("div", { className: cn$1("mt-[5px] flex flex-wrap items-center gap-2.5", indent), children: meta }),
52532
+ description && /* @__PURE__ */ jsx("div", { className: cn$1("mt-1.5 max-w-[720px] text-sm leading-normal text-muted-foreground", indent), children: description })
52533
+ ] }),
52534
+ actions && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center justify-end gap-2.5", children: actions })
52535
+ ]
52536
+ }
52537
+ );
52538
+ }
52484
52539
  const MOBILE_BREAKPOINT = 768;
52485
52540
  function useIsMobile() {
52486
52541
  const [isMobile, setIsMobile] = React.useState(
@@ -71294,6 +71349,7 @@ export {
71294
71349
  NavigationMenuViewport,
71295
71350
  Numpad,
71296
71351
  Page,
71352
+ PageHeader,
71297
71353
  PageLoader,
71298
71354
  Pagination,
71299
71355
  PaginationContent,
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ export interface PageHeaderProps {
3
+ title: React.ReactNode;
4
+ /** default 26px · lg 30px · sm 24px · doc 30px mono (document numbers). */
5
+ size?: 'default' | 'lg' | 'sm' | 'doc';
6
+ /** Shows the back chevron when set. */
7
+ onBack?: () => void;
8
+ backTitle?: string;
9
+ /** Row under the title, e.g. a StatusText. */
10
+ meta?: React.ReactNode;
11
+ description?: React.ReactNode;
12
+ /** Right-aligned actions. */
13
+ actions?: React.ReactNode;
14
+ className?: string;
15
+ }
16
+ export declare function PageHeader({ title, size, onBack, backTitle, meta, description, actions, className, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './PageHeader';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -148,6 +148,7 @@
148
148
  --font-weight-medium: 500;
149
149
  --font-weight-semibold: 600;
150
150
  --font-weight-bold: 700;
151
+ --font-weight-extrabold: 800;
151
152
  --tracking-tight: -.025em;
152
153
  --tracking-normal: 0em;
153
154
  --tracking-wide: .025em;
@@ -811,6 +812,10 @@
811
812
  margin-top: calc(var(--spacing) * 6);
812
813
  }
813
814
 
815
+ .mt-\[5px\] {
816
+ margin-top: 5px;
817
+ }
818
+
814
819
  .mt-auto {
815
820
  margin-top: auto;
816
821
  }
@@ -985,6 +990,11 @@
985
990
  height: calc(var(--spacing) * 4);
986
991
  }
987
992
 
993
+ .size-5 {
994
+ width: calc(var(--spacing) * 5);
995
+ height: calc(var(--spacing) * 5);
996
+ }
997
+
988
998
  .size-6 {
989
999
  width: calc(var(--spacing) * 6);
990
1000
  height: calc(var(--spacing) * 6);
@@ -1196,6 +1206,10 @@
1196
1206
  min-height: calc(var(--spacing) * 9);
1197
1207
  }
1198
1208
 
1209
+ .min-h-10 {
1210
+ min-height: calc(var(--spacing) * 10);
1211
+ }
1212
+
1199
1213
  .min-h-11 {
1200
1214
  min-height: calc(var(--spacing) * 11);
1201
1215
  }
@@ -1488,6 +1502,10 @@
1488
1502
  max-width: 630px;
1489
1503
  }
1490
1504
 
1505
+ .max-w-\[720px\] {
1506
+ max-width: 720px;
1507
+ }
1508
+
1491
1509
  .max-w-\[calc\(100\%-2rem\)\] {
1492
1510
  max-width: calc(100% - 2rem);
1493
1511
  }
@@ -3015,6 +3033,10 @@
3015
3033
  padding-left: calc(var(--spacing) * 8);
3016
3034
  }
3017
3035
 
3036
+ .pl-\[42px\] {
3037
+ padding-left: 42px;
3038
+ }
3039
+
3018
3040
  .text-center {
3019
3041
  text-align: center;
3020
3042
  }
@@ -3118,6 +3140,10 @@
3118
3140
  font-size: 26px;
3119
3141
  }
3120
3142
 
3143
+ .text-\[30px\] {
3144
+ font-size: 30px;
3145
+ }
3146
+
3121
3147
  .leading-5 {
3122
3148
  --tw-leading: calc(var(--spacing) * 5);
3123
3149
  line-height: calc(var(--spacing) * 5);
@@ -3128,6 +3154,11 @@
3128
3154
  line-height: calc(var(--spacing) * 6);
3129
3155
  }
3130
3156
 
3157
+ .leading-\[1\.2\] {
3158
+ --tw-leading: 1.2;
3159
+ line-height: 1.2;
3160
+ }
3161
+
3131
3162
  .leading-\[1\.15\] {
3132
3163
  --tw-leading: 1.15;
3133
3164
  line-height: 1.15;
@@ -3158,6 +3189,11 @@
3158
3189
  font-weight: var(--font-weight-bold);
3159
3190
  }
3160
3191
 
3192
+ .font-extrabold {
3193
+ --tw-font-weight: var(--font-weight-extrabold);
3194
+ font-weight: var(--font-weight-extrabold);
3195
+ }
3196
+
3161
3197
  .font-medium {
3162
3198
  --tw-font-weight: var(--font-weight-medium);
3163
3199
  font-weight: var(--font-weight-medium);
@@ -4456,6 +4492,11 @@
4456
4492
  outline-color: var(--ring);
4457
4493
  }
4458
4494
 
4495
+ .focus-visible\:outline-none:focus-visible {
4496
+ --tw-outline-style: none;
4497
+ outline-style: none;
4498
+ }
4499
+
4459
4500
  .active\:bg-sidebar-accent:active {
4460
4501
  background-color: var(--sidebar-accent);
4461
4502
  }
@@ -148,6 +148,7 @@
148
148
  --font-weight-medium: 500;
149
149
  --font-weight-semibold: 600;
150
150
  --font-weight-bold: 700;
151
+ --font-weight-extrabold: 800;
151
152
  --tracking-normal: var(--tracking-normal);
152
153
  --leading-tight: 1.25;
153
154
  --leading-snug: 1.375;
@@ -826,6 +827,10 @@
826
827
  margin-top: calc(var(--spacing) * 6);
827
828
  }
828
829
 
830
+ .mt-\[5px\] {
831
+ margin-top: 5px;
832
+ }
833
+
829
834
  .mt-auto {
830
835
  margin-top: auto;
831
836
  }
@@ -1000,6 +1005,11 @@
1000
1005
  height: calc(var(--spacing) * 4);
1001
1006
  }
1002
1007
 
1008
+ .size-5 {
1009
+ width: calc(var(--spacing) * 5);
1010
+ height: calc(var(--spacing) * 5);
1011
+ }
1012
+
1003
1013
  .size-6 {
1004
1014
  width: calc(var(--spacing) * 6);
1005
1015
  height: calc(var(--spacing) * 6);
@@ -1211,6 +1221,10 @@
1211
1221
  min-height: calc(var(--spacing) * 9);
1212
1222
  }
1213
1223
 
1224
+ .min-h-10 {
1225
+ min-height: calc(var(--spacing) * 10);
1226
+ }
1227
+
1214
1228
  .min-h-11 {
1215
1229
  min-height: calc(var(--spacing) * 11);
1216
1230
  }
@@ -1503,6 +1517,10 @@
1503
1517
  max-width: 630px;
1504
1518
  }
1505
1519
 
1520
+ .max-w-\[720px\] {
1521
+ max-width: 720px;
1522
+ }
1523
+
1506
1524
  .max-w-\[calc\(100\%-2rem\)\] {
1507
1525
  max-width: calc(100% - 2rem);
1508
1526
  }
@@ -3122,6 +3140,10 @@
3122
3140
  padding-left: calc(var(--spacing) * 8);
3123
3141
  }
3124
3142
 
3143
+ .pl-\[42px\] {
3144
+ padding-left: 42px;
3145
+ }
3146
+
3125
3147
  .text-center {
3126
3148
  text-align: center;
3127
3149
  }
@@ -3225,6 +3247,10 @@
3225
3247
  font-size: 26px;
3226
3248
  }
3227
3249
 
3250
+ .text-\[30px\] {
3251
+ font-size: 30px;
3252
+ }
3253
+
3228
3254
  .leading-5 {
3229
3255
  --tw-leading: calc(var(--spacing) * 5);
3230
3256
  line-height: calc(var(--spacing) * 5);
@@ -3235,6 +3261,11 @@
3235
3261
  line-height: calc(var(--spacing) * 6);
3236
3262
  }
3237
3263
 
3264
+ .leading-\[1\.2\] {
3265
+ --tw-leading: 1.2;
3266
+ line-height: 1.2;
3267
+ }
3268
+
3238
3269
  .leading-\[1\.15\] {
3239
3270
  --tw-leading: 1.15;
3240
3271
  line-height: 1.15;
@@ -3265,6 +3296,11 @@
3265
3296
  font-weight: var(--font-weight-bold);
3266
3297
  }
3267
3298
 
3299
+ .font-extrabold {
3300
+ --tw-font-weight: var(--font-weight-extrabold);
3301
+ font-weight: var(--font-weight-extrabold);
3302
+ }
3303
+
3268
3304
  .font-medium {
3269
3305
  --tw-font-weight: var(--font-weight-medium);
3270
3306
  font-weight: var(--font-weight-medium);
@@ -4647,6 +4683,11 @@
4647
4683
  outline-color: var(--ring);
4648
4684
  }
4649
4685
 
4686
+ .focus-visible\:outline-none:focus-visible {
4687
+ --tw-outline-style: none;
4688
+ outline-style: none;
4689
+ }
4690
+
4650
4691
  .active\:bg-sidebar-accent:active {
4651
4692
  background-color: var(--sidebar-accent);
4652
4693
  }
@@ -148,6 +148,7 @@
148
148
  --font-weight-medium: 500;
149
149
  --font-weight-semibold: 600;
150
150
  --font-weight-bold: 700;
151
+ --font-weight-extrabold: 800;
151
152
  --tracking-tight: -.025em;
152
153
  --tracking-normal: 0em;
153
154
  --tracking-wide: .025em;
@@ -811,6 +812,10 @@
811
812
  margin-top: calc(var(--spacing) * 6);
812
813
  }
813
814
 
815
+ .mt-\[5px\] {
816
+ margin-top: 5px;
817
+ }
818
+
814
819
  .mt-auto {
815
820
  margin-top: auto;
816
821
  }
@@ -985,6 +990,11 @@
985
990
  height: calc(var(--spacing) * 4);
986
991
  }
987
992
 
993
+ .size-5 {
994
+ width: calc(var(--spacing) * 5);
995
+ height: calc(var(--spacing) * 5);
996
+ }
997
+
988
998
  .size-6 {
989
999
  width: calc(var(--spacing) * 6);
990
1000
  height: calc(var(--spacing) * 6);
@@ -1196,6 +1206,10 @@
1196
1206
  min-height: calc(var(--spacing) * 9);
1197
1207
  }
1198
1208
 
1209
+ .min-h-10 {
1210
+ min-height: calc(var(--spacing) * 10);
1211
+ }
1212
+
1199
1213
  .min-h-11 {
1200
1214
  min-height: calc(var(--spacing) * 11);
1201
1215
  }
@@ -1488,6 +1502,10 @@
1488
1502
  max-width: 630px;
1489
1503
  }
1490
1504
 
1505
+ .max-w-\[720px\] {
1506
+ max-width: 720px;
1507
+ }
1508
+
1491
1509
  .max-w-\[calc\(100\%-2rem\)\] {
1492
1510
  max-width: calc(100% - 2rem);
1493
1511
  }
@@ -3015,6 +3033,10 @@
3015
3033
  padding-left: calc(var(--spacing) * 8);
3016
3034
  }
3017
3035
 
3036
+ .pl-\[42px\] {
3037
+ padding-left: 42px;
3038
+ }
3039
+
3018
3040
  .text-center {
3019
3041
  text-align: center;
3020
3042
  }
@@ -3118,6 +3140,10 @@
3118
3140
  font-size: 26px;
3119
3141
  }
3120
3142
 
3143
+ .text-\[30px\] {
3144
+ font-size: 30px;
3145
+ }
3146
+
3121
3147
  .leading-5 {
3122
3148
  --tw-leading: calc(var(--spacing) * 5);
3123
3149
  line-height: calc(var(--spacing) * 5);
@@ -3128,6 +3154,11 @@
3128
3154
  line-height: calc(var(--spacing) * 6);
3129
3155
  }
3130
3156
 
3157
+ .leading-\[1\.2\] {
3158
+ --tw-leading: 1.2;
3159
+ line-height: 1.2;
3160
+ }
3161
+
3131
3162
  .leading-\[1\.15\] {
3132
3163
  --tw-leading: 1.15;
3133
3164
  line-height: 1.15;
@@ -3158,6 +3189,11 @@
3158
3189
  font-weight: var(--font-weight-bold);
3159
3190
  }
3160
3191
 
3192
+ .font-extrabold {
3193
+ --tw-font-weight: var(--font-weight-extrabold);
3194
+ font-weight: var(--font-weight-extrabold);
3195
+ }
3196
+
3161
3197
  .font-medium {
3162
3198
  --tw-font-weight: var(--font-weight-medium);
3163
3199
  font-weight: var(--font-weight-medium);
@@ -4456,6 +4492,11 @@
4456
4492
  outline-color: var(--ring);
4457
4493
  }
4458
4494
 
4495
+ .focus-visible\:outline-none:focus-visible {
4496
+ --tw-outline-style: none;
4497
+ outline-style: none;
4498
+ }
4499
+
4459
4500
  .active\:bg-sidebar-accent:active {
4460
4501
  background-color: var(--sidebar-accent);
4461
4502
  }
@@ -148,6 +148,7 @@
148
148
  --font-weight-medium: 500;
149
149
  --font-weight-semibold: 600;
150
150
  --font-weight-bold: 700;
151
+ --font-weight-extrabold: 800;
151
152
  --tracking-tight: -.025em;
152
153
  --tracking-normal: 0em;
153
154
  --tracking-wide: .025em;
@@ -811,6 +812,10 @@
811
812
  margin-top: calc(var(--spacing) * 6);
812
813
  }
813
814
 
815
+ .mt-\[5px\] {
816
+ margin-top: 5px;
817
+ }
818
+
814
819
  .mt-auto {
815
820
  margin-top: auto;
816
821
  }
@@ -985,6 +990,11 @@
985
990
  height: calc(var(--spacing) * 4);
986
991
  }
987
992
 
993
+ .size-5 {
994
+ width: calc(var(--spacing) * 5);
995
+ height: calc(var(--spacing) * 5);
996
+ }
997
+
988
998
  .size-6 {
989
999
  width: calc(var(--spacing) * 6);
990
1000
  height: calc(var(--spacing) * 6);
@@ -1196,6 +1206,10 @@
1196
1206
  min-height: calc(var(--spacing) * 9);
1197
1207
  }
1198
1208
 
1209
+ .min-h-10 {
1210
+ min-height: calc(var(--spacing) * 10);
1211
+ }
1212
+
1199
1213
  .min-h-11 {
1200
1214
  min-height: calc(var(--spacing) * 11);
1201
1215
  }
@@ -1488,6 +1502,10 @@
1488
1502
  max-width: 630px;
1489
1503
  }
1490
1504
 
1505
+ .max-w-\[720px\] {
1506
+ max-width: 720px;
1507
+ }
1508
+
1491
1509
  .max-w-\[calc\(100\%-2rem\)\] {
1492
1510
  max-width: calc(100% - 2rem);
1493
1511
  }
@@ -3015,6 +3033,10 @@
3015
3033
  padding-left: calc(var(--spacing) * 8);
3016
3034
  }
3017
3035
 
3036
+ .pl-\[42px\] {
3037
+ padding-left: 42px;
3038
+ }
3039
+
3018
3040
  .text-center {
3019
3041
  text-align: center;
3020
3042
  }
@@ -3118,6 +3140,10 @@
3118
3140
  font-size: 26px;
3119
3141
  }
3120
3142
 
3143
+ .text-\[30px\] {
3144
+ font-size: 30px;
3145
+ }
3146
+
3121
3147
  .leading-5 {
3122
3148
  --tw-leading: calc(var(--spacing) * 5);
3123
3149
  line-height: calc(var(--spacing) * 5);
@@ -3128,6 +3154,11 @@
3128
3154
  line-height: calc(var(--spacing) * 6);
3129
3155
  }
3130
3156
 
3157
+ .leading-\[1\.2\] {
3158
+ --tw-leading: 1.2;
3159
+ line-height: 1.2;
3160
+ }
3161
+
3131
3162
  .leading-\[1\.15\] {
3132
3163
  --tw-leading: 1.15;
3133
3164
  line-height: 1.15;
@@ -3158,6 +3189,11 @@
3158
3189
  font-weight: var(--font-weight-bold);
3159
3190
  }
3160
3191
 
3192
+ .font-extrabold {
3193
+ --tw-font-weight: var(--font-weight-extrabold);
3194
+ font-weight: var(--font-weight-extrabold);
3195
+ }
3196
+
3161
3197
  .font-medium {
3162
3198
  --tw-font-weight: var(--font-weight-medium);
3163
3199
  font-weight: var(--font-weight-medium);
@@ -4456,6 +4492,11 @@
4456
4492
  outline-color: var(--ring);
4457
4493
  }
4458
4494
 
4495
+ .focus-visible\:outline-none:focus-visible {
4496
+ --tw-outline-style: none;
4497
+ outline-style: none;
4498
+ }
4499
+
4459
4500
  .active\:bg-sidebar-accent:active {
4460
4501
  background-color: var(--sidebar-accent);
4461
4502
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k3-tech/react-kit",
3
- "version": "0.0.75",
3
+ "version": "0.0.77",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",