@js-empire/emperor-ui 1.3.0 → 1.3.1
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/README.md +23 -0
- package/dist/color-picker-impl-D4fYqmHw.js +8 -0
- package/dist/emperor-ui.js +19 -19
- package/dist/emperor-ui.umd.cjs +13 -13
- package/dist/globals.css +1 -1
- package/dist/{index-CK7pu2VH.js → index-DYyUdSUy.js} +1 -1
- package/dist/{index-yq9M8Mqg.js → index-DrsKwOSa.js} +22 -22
- package/dist/{index-DoF4sONu.js → index-N24la87s.js} +541 -529
- package/dist/index.d.ts +5 -1
- package/dist/{src-UW24ZMRV-DZ8MyM4k.js → src-UW24ZMRV-BO0l5GbB.js} +1 -1
- package/package.json +1 -1
- package/src/components/atoms/color-picker/color-picker-impl.tsx +17 -0
- package/src/components/atoms/color-picker/color-picker.tsx +23 -5
package/README.md
CHANGED
|
@@ -61,6 +61,29 @@ Import the library’s global styles in your app root (e.g. `layout.tsx` or `_ap
|
|
|
61
61
|
import "@js-empire/emperor-ui/globals.css";
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
### Next.js — avoiding "document is not defined"
|
|
65
|
+
|
|
66
|
+
Emperor UI uses HeroUI, which accesses browser APIs during module load. In Next.js (App Router), this can cause `document is not defined` when components are imported in server-rendered contexts (e.g. error boundaries, layouts, or barrel exports that load on the server).
|
|
67
|
+
|
|
68
|
+
**Fix:** Use dynamic import with `ssr: false` for Emperor UI components in files that may run on the server:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
"use client";
|
|
72
|
+
|
|
73
|
+
import dynamic from "next/dynamic";
|
|
74
|
+
|
|
75
|
+
const ColorPicker = dynamic(
|
|
76
|
+
() =>
|
|
77
|
+
import("@js-empire/emperor-ui").then((m) => ({ default: m.ColorPicker })),
|
|
78
|
+
{ ssr: false },
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
export { ColorPicker };
|
|
82
|
+
export type { ColorPickerProps } from "@js-empire/emperor-ui";
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Apply this pattern to any Emperor UI component used in error boundaries or other server-rendered modules. Ensure `HeroUIProvider` wraps your app as per [HeroUI's Next.js setup](https://heroui.com/docs/frameworks/nextjs).
|
|
86
|
+
|
|
64
87
|
---
|
|
65
88
|
|
|
66
89
|
## Components
|
package/dist/emperor-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { dE as a, dF as i, dG as o, dH as t, dI as r, dJ as l, dK as d, dL as f, dM as C, dN as n, dO as E, dP as I, dQ as m, dR as _, dS as S, dT as p, dU as c, dV as M, dW as T, dX as F, dY as g, dZ as A, d_ as O, d$ as L, e0 as u, e1 as P, e2 as B, e3 as R, e4 as D, e5 as K, F as N, e6 as U, e7 as x, e8 as y, e9 as h, ea as k, eb as v, ec as W, ed as H, ee as G, ef as w, eg as V, eh as b, ei as Y, ej as z, ek as Q, el as q, em as J, en as X, eo as Z, ep as $, eq as j, er as ee, es as se, et as ae, eu as ie, ev as oe, ew as te, ex as re, ey as le, ez as de, eA as fe, eB as Ce, eC as ne, eD as Ee, eE as Ie, eF as me, eG as _e, eH as Se, eI as pe, eJ as ce, eK as Me, eL as Te, eM as Fe, eN as ge, P as Ae, eO as Oe, eP as Le, eQ as ue, eR as Pe, eS as Be, eT as Re, eU as De, eV as Ke, eW as Ne, eX as Ue, eY as xe, eZ as ye, e_ as he, e$ as ke, f0 as ve, f1 as We, f2 as He, f3 as Ge, f4 as we, f5 as Ve, f6 as be, f7 as Ye, f8 as ze, f9 as Qe, fa as qe, fb as Je, fc as Xe, fd as Ze, fe as $e, ff as je, fg as es, fh as ss, fi as as, fj as is, fk as os, fl as ts, fm as rs, fn as ls, fo as ds, fp as fs, fq as Cs, fr as ns, fs as Es, ft as Is, fu as ms, fv as _s, fw as Ss, fx as ps, fy as cs, fz as Ms, fA as Ts, fB as Fs, fC as gs, fD as As, fE as Os, fF as Ls, fG as us, fH as Ps, fI as Bs, fJ as Rs, fK as Ds, fL as Ks, fM as Ns, fN as Us, fO as xs, fP as ys, fQ as hs, fR as ks, fS as vs, fT as Ws, fU as Hs, fV as Gs, fW as ws, fX as Vs, fY as bs, fZ as Ys, f_ as zs, f$ as Qs, g0 as qs, g1 as Js } from "./index-N24la87s.js";
|
|
3
3
|
export {
|
|
4
4
|
a as ALLOWED_DOC_TYPES,
|
|
5
5
|
i as ALLOWED_IMAGES_TYPES,
|
|
@@ -8,8 +8,8 @@ export {
|
|
|
8
8
|
r as AutocompleteFilter,
|
|
9
9
|
l as AvatarLabel,
|
|
10
10
|
d as Brand,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
f as CheckboxField,
|
|
12
|
+
C as CheckboxFilter,
|
|
13
13
|
n as CheckboxGroupFilter,
|
|
14
14
|
E as ColorPicker,
|
|
15
15
|
I as Column,
|
|
@@ -26,10 +26,10 @@ export {
|
|
|
26
26
|
O as FAKE_PARAGRAPH,
|
|
27
27
|
L as FAKE_SENTENCE,
|
|
28
28
|
u as Field,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
P as Filter,
|
|
30
|
+
B as Footer,
|
|
31
|
+
R as FormBuilder,
|
|
32
|
+
D as FormBuilderContext,
|
|
33
33
|
K as FormBuilderProvider,
|
|
34
34
|
N as FreeColorPicker,
|
|
35
35
|
U as Header,
|
|
@@ -62,8 +62,8 @@ export {
|
|
|
62
62
|
re as MOCK_ITEM_REVIEWS_3,
|
|
63
63
|
le as MOCK_LISTINGS,
|
|
64
64
|
de as MOCK_LISTING_DESCRIPTIONS,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
fe as MOCK_LISTING_IMAGES,
|
|
66
|
+
Ce as MOCK_LISTING_TITLES,
|
|
67
67
|
ne as MOCK_REVIEW_AUTHORS,
|
|
68
68
|
Ee as MOCK_REVIEW_COMMENTS,
|
|
69
69
|
Ie as NavBar,
|
|
@@ -80,10 +80,10 @@ export {
|
|
|
80
80
|
Oe as QuickLinksBox,
|
|
81
81
|
Le as RadioField,
|
|
82
82
|
ue as RangeFilter,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
Pe as Row,
|
|
84
|
+
Be as Scaffold,
|
|
85
|
+
Re as SearchFilter,
|
|
86
|
+
De as SelectField,
|
|
87
87
|
Ke as SelectFilter,
|
|
88
88
|
Ne as SideBar,
|
|
89
89
|
Ue as SocialLinksBox,
|
|
@@ -116,8 +116,8 @@ export {
|
|
|
116
116
|
rs as fieldClasses,
|
|
117
117
|
ls as fileTypesMapping,
|
|
118
118
|
ds as filterClasses,
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
fs as getAllowedTypes,
|
|
120
|
+
Cs as getCardMotion,
|
|
121
121
|
ns as getListing,
|
|
122
122
|
Es as getListings,
|
|
123
123
|
Is as getStorybookDecorators,
|
|
@@ -134,10 +134,10 @@ export {
|
|
|
134
134
|
Os as itemMainWrapperClasses,
|
|
135
135
|
Ls as itemPriceClasses,
|
|
136
136
|
us as itemTitleClasses,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
Ps as listingsClasses,
|
|
138
|
+
Bs as listingsItemClasses,
|
|
139
|
+
Rs as listingsPaginationClasses,
|
|
140
|
+
Ds as listingsStyles,
|
|
141
141
|
Ks as mapFileType,
|
|
142
142
|
Ns as mergeLocales,
|
|
143
143
|
Us as mergeUploaderLocale,
|