@manifest-editor/components 1.0.2 → 1.1.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.
package/dist/index.cjs CHANGED
@@ -104,7 +104,7 @@ function ActionButton({
104
104
  {
105
105
  className: cn(
106
106
  //
107
- "flex gap-1 items-center px-2 py-1 bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
107
+ "border-none flex gap-1 items-center px-2 py-1 bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
108
108
  primary ? "bg-me-primary-500 text-white hover:bg-me-primary-600" : "",
109
109
  center ? "place-content-center" : "",
110
110
  className2
@@ -228,8 +228,12 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
228
228
  function Sidebar({ children }) {
229
229
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "w-full h-full flex flex-col overflow-hidden", children });
230
230
  }
231
- function SidebarContent({ children, className: className2 }) {
232
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto", className2), children });
231
+ function SidebarContent({
232
+ children,
233
+ className: className2,
234
+ padding
235
+ }) {
236
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("flex-1 min-h-0 overflow-y-auto", className2, padding && "p-3"), children });
233
237
  }
234
238
  function SidebarHeader(props) {
235
239
  const { actions, title } = props;
@@ -267,7 +271,7 @@ function PanelSideMenuItem(props) {
267
271
  "button",
268
272
  {
269
273
  className: cn(
270
- "aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
274
+ "border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
271
275
  props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
272
276
  ),
273
277
  onMouseDown: props.onClick,
@@ -282,7 +286,7 @@ function PanelSideMenuItem(props) {
282
286
  // src/PanelSideMenu.tsx
283
287
  var import_jsx_runtime6 = require("react/jsx-runtime");
284
288
  function PanelSideMenu(props) {
285
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "bg-white border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime5.Fragment, { children: [
289
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "bg-white border-me-gray-300 border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime5.Fragment, { children: [
286
290
  panel.divide ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex-1 block w-2 min-h-1" }) : null,
287
291
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
288
292
  PanelSideMenuItem,
@@ -516,10 +520,10 @@ var import_jsx_runtime13 = require("react/jsx-runtime");
516
520
  function Modal({ id, title, open = true, onClose, actions, children }) {
517
521
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react4.Dialog, { open, onClose, id, className: "relative z-[500]", children: [
518
522
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
519
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative p-4 w-full max-w-3xl max-h-full", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react4.DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl dark:bg-gray-700 max-h-[80vh] flex flex-col", children: [
520
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between p-4 md:p-5 rounded-t-lg dark:border-gray-600 sticky top-0 bg-white", children: [
521
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 dark:text-white", children: title }),
522
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react4.CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [
523
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative p-4 w-full max-w-3xl max-h-full", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react4.DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
524
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center justify-between p-4 md:p-5 rounded-t-lg sticky top-0 bg-white", children: [
525
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react4.DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
526
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react4.CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center", children: [
523
527
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
524
528
  "svg",
525
529
  {
@@ -544,7 +548,7 @@ function Modal({ id, title, open = true, onClose, actions, children }) {
544
548
  ] })
545
549
  ] }),
546
550
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react4.Description, { className: "flex-1 min-h-0 overflow-y-auto", children }),
547
- actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600 justify-end", children: actions }) : null
551
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
548
552
  ] }) }) })
549
553
  ] }) });
550
554
  }
@@ -670,7 +674,7 @@ function CreatorGridItem(props) {
670
674
  id: props.id,
671
675
  onAction: props.onClick,
672
676
  className: ($s) => (0, import_tailwind_merge3.twMerge)(
673
- "bg-white p-2 rounded-md border hover:border-me-primary-500",
677
+ "bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
674
678
  $s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
675
679
  ),
676
680
  children: [
@@ -1061,7 +1065,7 @@ function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
1061
1065
  import_react_aria_components7.Button,
1062
1066
  {
1063
1067
  className: cn(
1064
- "rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
1068
+ "border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
1065
1069
  selectedIndex > hidden && "bg-me-primary-500 text-white rounded"
1066
1070
  ),
1067
1071
  children: "MORE"
package/dist/index.css CHANGED
@@ -305,6 +305,9 @@
305
305
  .border-dotted {
306
306
  border-style: dotted;
307
307
  }
308
+ .border-none {
309
+ border-style: none;
310
+ }
308
311
  .border-black {
309
312
  --tw-border-opacity: 1;
310
313
  border-color: rgb(0 0 0 / var(--tw-border-opacity));
@@ -317,6 +320,10 @@
317
320
  --tw-border-opacity: 1;
318
321
  border-color: rgb(55 65 81 / var(--tw-border-opacity));
319
322
  }
323
+ .border-me-gray-300 {
324
+ --tw-border-opacity: 1;
325
+ border-color: rgb(217 217 217 / var(--tw-border-opacity));
326
+ }
320
327
  .border-me-primary-500 {
321
328
  --tw-border-opacity: 1;
322
329
  border-color: rgb(184 76 116 / var(--tw-border-opacity));
@@ -393,6 +400,9 @@
393
400
  .p-2 {
394
401
  padding: 0.5rem;
395
402
  }
403
+ .p-3 {
404
+ padding: 0.75rem;
405
+ }
396
406
  .p-4 {
397
407
  padding: 1rem;
398
408
  }
@@ -778,28 +788,6 @@
778
788
  padding: 1.25rem;
779
789
  }
780
790
  }
781
- @media (prefers-color-scheme: dark) {
782
- .dark\:border-gray-600 {
783
- --tw-border-opacity: 1;
784
- border-color: rgb(75 85 99 / var(--tw-border-opacity));
785
- }
786
- .dark\:bg-gray-700 {
787
- --tw-bg-opacity: 1;
788
- background-color: rgb(55 65 81 / var(--tw-bg-opacity));
789
- }
790
- .dark\:text-white {
791
- --tw-text-opacity: 1;
792
- color: rgb(255 255 255 / var(--tw-text-opacity));
793
- }
794
- .dark\:hover\:bg-gray-600:hover {
795
- --tw-bg-opacity: 1;
796
- background-color: rgb(75 85 99 / var(--tw-bg-opacity));
797
- }
798
- .dark\:hover\:text-white:hover {
799
- --tw-text-opacity: 1;
800
- color: rgb(255 255 255 / var(--tw-text-opacity));
801
- }
802
- }
803
791
  .\[\&\>svg\]\:h-16 > svg {
804
792
  height: 4rem;
805
793
  }
package/dist/index.d.cts CHANGED
@@ -17,9 +17,10 @@ declare function ActionButton({ className, primary, center, children, ...props }
17
17
  declare function Sidebar({ children }: {
18
18
  children: React.ReactNode;
19
19
  }): react_jsx_runtime.JSX.Element;
20
- declare function SidebarContent({ children, className }: {
20
+ declare function SidebarContent({ children, className, padding, }: {
21
21
  children: React.ReactNode;
22
22
  className?: string;
23
+ padding?: boolean;
23
24
  }): react_jsx_runtime.JSX.Element;
24
25
  interface SidebarHeaderProps {
25
26
  actions?: Array<{
package/dist/index.d.ts CHANGED
@@ -17,9 +17,10 @@ declare function ActionButton({ className, primary, center, children, ...props }
17
17
  declare function Sidebar({ children }: {
18
18
  children: React.ReactNode;
19
19
  }): react_jsx_runtime.JSX.Element;
20
- declare function SidebarContent({ children, className }: {
20
+ declare function SidebarContent({ children, className, padding, }: {
21
21
  children: React.ReactNode;
22
22
  className?: string;
23
+ padding?: boolean;
23
24
  }): react_jsx_runtime.JSX.Element;
24
25
  interface SidebarHeaderProps {
25
26
  actions?: Array<{
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ function ActionButton({
24
24
  {
25
25
  className: cn(
26
26
  //
27
- "flex gap-1 items-center px-2 py-1 bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
27
+ "border-none flex gap-1 items-center px-2 py-1 bg-gray-100 text-me-primary-500 text-sm rounded hover:bg-gray-200",
28
28
  primary ? "bg-me-primary-500 text-white hover:bg-me-primary-600" : "",
29
29
  center ? "place-content-center" : "",
30
30
  className2
@@ -161,8 +161,12 @@ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
161
161
  function Sidebar({ children }) {
162
162
  return /* @__PURE__ */ jsx3("div", { className: "w-full h-full flex flex-col overflow-hidden", children });
163
163
  }
164
- function SidebarContent({ children, className: className2 }) {
165
- return /* @__PURE__ */ jsx3("div", { className: cn("flex-1 min-h-0 overflow-y-auto", className2), children });
164
+ function SidebarContent({
165
+ children,
166
+ className: className2,
167
+ padding
168
+ }) {
169
+ return /* @__PURE__ */ jsx3("div", { className: cn("flex-1 min-h-0 overflow-y-auto", className2, padding && "p-3"), children });
166
170
  }
167
171
  function SidebarHeader(props) {
168
172
  const { actions, title } = props;
@@ -200,7 +204,7 @@ function PanelSideMenuItem(props) {
200
204
  "button",
201
205
  {
202
206
  className: cn(
203
- "aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
207
+ "border-none aspect-square w-full flex justify-center items-center hover:bg-me-primary-100 hover:text-black [&>svg]:text-2xl cursor-default",
204
208
  props.selected ? "bg-me-primary-500 hover:bg-me-primary-600 hover:text-white text-white" : "text-me-gray-700"
205
209
  ),
206
210
  onMouseDown: props.onClick,
@@ -215,7 +219,7 @@ function PanelSideMenuItem(props) {
215
219
  // src/PanelSideMenu.tsx
216
220
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
217
221
  function PanelSideMenu(props) {
218
- return /* @__PURE__ */ jsx5("div", { className: "bg-white border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ jsxs3(Fragment, { children: [
222
+ return /* @__PURE__ */ jsx5("div", { className: "bg-white border-me-gray-300 border-t border-r flex flex-col w-12 pb-2", "data-open": props.open, children: props.items.map((panel) => /* @__PURE__ */ jsxs3(Fragment, { children: [
219
223
  panel.divide ? /* @__PURE__ */ jsx5("div", { className: "flex-1 block w-2 min-h-1" }) : null,
220
224
  /* @__PURE__ */ jsx5(
221
225
  PanelSideMenuItem,
@@ -449,10 +453,10 @@ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-ru
449
453
  function Modal({ id, title, open = true, onClose, actions, children }) {
450
454
  return /* @__PURE__ */ jsx12(Fragment2, { children: /* @__PURE__ */ jsxs8(Dialog, { open, onClose, id, className: "relative z-[500]", children: [
451
455
  /* @__PURE__ */ jsx12("div", { className: `fixed inset-0 bg-black/30 animate-fadeIn z-[501]`, "aria-hidden": "true" }),
452
- /* @__PURE__ */ jsx12("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ jsx12("div", { className: "relative p-4 w-full max-w-3xl max-h-full", children: /* @__PURE__ */ jsxs8(DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl dark:bg-gray-700 max-h-[80vh] flex flex-col", children: [
453
- /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between p-4 md:p-5 rounded-t-lg dark:border-gray-600 sticky top-0 bg-white", children: [
454
- /* @__PURE__ */ jsx12(DialogTitle, { className: "text-xl font-semibold text-gray-900 dark:text-white", children: title }),
455
- /* @__PURE__ */ jsxs8(CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white", children: [
456
+ /* @__PURE__ */ jsx12("div", { className: "fixed inset-0 flex w-screen items-center justify-center p-4 z-[502]", children: /* @__PURE__ */ jsx12("div", { className: "relative p-4 w-full max-w-3xl max-h-full", children: /* @__PURE__ */ jsxs8(DialogPanel, { className: "relative bg-white rounded-lg overflow-hidden shadow-2xl max-h-[80vh] flex flex-col", children: [
457
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between p-4 md:p-5 rounded-t-lg sticky top-0 bg-white", children: [
458
+ /* @__PURE__ */ jsx12(DialogTitle, { className: "text-xl font-semibold text-gray-900 ", children: title }),
459
+ /* @__PURE__ */ jsxs8(CloseButton, { className: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center", children: [
456
460
  /* @__PURE__ */ jsx12(
457
461
  "svg",
458
462
  {
@@ -477,7 +481,7 @@ function Modal({ id, title, open = true, onClose, actions, children }) {
477
481
  ] })
478
482
  ] }),
479
483
  /* @__PURE__ */ jsx12(Description, { className: "flex-1 min-h-0 overflow-y-auto", children }),
480
- actions ? /* @__PURE__ */ jsx12("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600 justify-end", children: actions }) : null
484
+ actions ? /* @__PURE__ */ jsx12("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b justify-end", children: actions }) : null
481
485
  ] }) }) })
482
486
  ] }) });
483
487
  }
@@ -608,7 +612,7 @@ function CreatorGridItem(props) {
608
612
  id: props.id,
609
613
  onAction: props.onClick,
610
614
  className: ($s) => twMerge3(
611
- "bg-white p-2 rounded-md border hover:border-me-primary-500",
615
+ "bg-white p-2 border-me-gray-300 rounded-md border hover:border-me-primary-500",
612
616
  $s.isFocused && "border-me-primary-500 outline-me-primary-500 outline-2"
613
617
  ),
614
618
  children: [
@@ -999,7 +1003,7 @@ function SidebarTabs({ menu, menuId, selectedKey, onSelectionChange }) {
999
1003
  Button5,
1000
1004
  {
1001
1005
  className: cn(
1002
- "rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
1006
+ "border-none rounded bg-gray-100 px-1.5 py-1 mr-2 mb-1 text-me-primary-500 semibold uppercase text-[10px]",
1003
1007
  selectedIndex > hidden && "bg-me-primary-500 text-white rounded"
1004
1008
  ),
1005
1009
  children: "MORE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manifest-editor/components",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
6
6
  "repository": {
@@ -51,10 +51,10 @@
51
51
  "@iiif/presentation-3": "^2.2.3",
52
52
  "clsx": "^2.1.1",
53
53
  "polygon-editor": "^0.0.4",
54
- "react": "^18.2.0",
54
+ "react": "^18.3.1",
55
55
  "react-aria": "^3.33.1",
56
56
  "react-aria-components": "^1.2.1",
57
- "react-dom": "^18.2.0",
57
+ "react-dom": "^18.3.1",
58
58
  "react-iiif-vault": "^1.2.1",
59
59
  "react-lazy-load-image-component": "^1.6.0",
60
60
  "tailwind-merge": "^2.3.0"
@@ -63,18 +63,18 @@
63
63
  "@repo/eslint-config": "0.0.0",
64
64
  "@storylite/storylite": "^0.15.1",
65
65
  "@storylite/vite-plugin": "^0.15.0",
66
- "@types/react": "^18.2.74",
67
- "@types/react-dom": "^18.2.24",
66
+ "@types/react": "^18.3.3",
67
+ "@types/react-dom": "^18.3.0",
68
68
  "@types/react-lazy-load-image-component": "^1.6.4",
69
69
  "@vitejs/plugin-react-swc": "^3.6.0",
70
70
  "postcss": "^8.4.38",
71
71
  "tailwindcss": "^3.4.3",
72
72
  "tsup": "^8.0.2",
73
- "vite": "^5.2.8"
73
+ "vite": "^5.4.1"
74
74
  },
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
78
  "globalName": "ClientVault",
79
- "gitHead": "083fd2ce7d40755fb1857490e006e9854906d031"
79
+ "gitHead": "64dd0a345330544398ac49a35484f45171488b4e"
80
80
  }