@undefine-ui/design-system 2.1.0 → 2.3.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/README.md +73 -11
- package/dist/index.cjs +134 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +144 -1
- package/dist/index.d.ts +144 -1
- package/dist/index.js +169 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,9 +74,50 @@ import {
|
|
|
74
74
|
|
|
75
75
|
Storybook (`pnpm dev:storybook`) documents each component and token surface.
|
|
76
76
|
|
|
77
|
+
### Icon library
|
|
78
|
+
|
|
79
|
+
The package includes a comprehensive icon library with 23 SVG icons organized by category.
|
|
80
|
+
|
|
81
|
+
**Available icons:**
|
|
82
|
+
|
|
83
|
+
- **Navigation:** NavArrowLeft, NavArrowRight, NavArrowDown, LongArrowUpLeftSolid
|
|
84
|
+
- **User:** UserFill, UserOutline
|
|
85
|
+
- **Form Controls:** CheckboxDefault, CheckboxSelect, CheckboxIndeterminate, RadioDefault, RadioSelect
|
|
86
|
+
- **Actions:** Search, Copy, Trash, XMark, XMarkSolid, CloudUpload
|
|
87
|
+
- **Feedback:** InfoCircleFill, InfoCircleOutline, ClipboardCheck, Loader
|
|
88
|
+
- **Visibility:** Eye, EyeClosed
|
|
89
|
+
|
|
90
|
+
**Usage:**
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import { Icon } from '@undefine-ui/design-system';
|
|
94
|
+
|
|
95
|
+
// Basic usage
|
|
96
|
+
<Icon icon="Search" sx={{ width: 24, height: 24 }} />
|
|
97
|
+
|
|
98
|
+
// With custom color
|
|
99
|
+
<Icon icon="InfoCircleFill" sx={{ width: 32, height: 32, color: 'primary.main' }} />
|
|
100
|
+
|
|
101
|
+
// Different sizes
|
|
102
|
+
<Icon icon="Loader" sx={{ width: 16, height: 16 }} />
|
|
103
|
+
<Icon icon="Loader" sx={{ width: 48, height: 48 }} />
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Props:**
|
|
107
|
+
|
|
108
|
+
- `icon` - Icon name (required, type: `IconType`)
|
|
109
|
+
- `sx` - MUI sx prop for styling (size, color, etc.)
|
|
110
|
+
- All `BoxProps` from MUI are supported
|
|
111
|
+
|
|
112
|
+
The Icon component renders SVG icons with full theme integration and accepts any MUI Box props for flexible styling.
|
|
113
|
+
|
|
77
114
|
### Logo assets
|
|
78
115
|
|
|
79
|
-
|
|
116
|
+
The package exports two Logo components:
|
|
117
|
+
|
|
118
|
+
#### `<Logo />`
|
|
119
|
+
|
|
120
|
+
Renders logo images hosted on Cloudinary by default. The component automatically selects the appropriate variant based on props:
|
|
80
121
|
|
|
81
122
|
| Variant flag combo | Asset served |
|
|
82
123
|
| -------------------------- | ----------------------------------- |
|
|
@@ -89,19 +130,40 @@ Storybook (`pnpm dev:storybook`) documents each component and token surface.
|
|
|
89
130
|
|
|
90
131
|
All logo assets are served from Cloudinary and don't require any local files in your host app.
|
|
91
132
|
|
|
92
|
-
|
|
133
|
+
```tsx
|
|
134
|
+
<Logo isFull isWhite href="/dashboard" />
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Props:**
|
|
138
|
+
|
|
139
|
+
- `isFull` - Use full logo with text (default: `false`)
|
|
140
|
+
- `isWhite` - Use white variant (default: `false`)
|
|
141
|
+
- `isBlack` - Use black variant (default: `false`)
|
|
142
|
+
- `disableLink` - Render without link wrapper (default: `false`)
|
|
143
|
+
- `href` - Link destination (default: `'/'`)
|
|
144
|
+
- `LinkComponent` - Custom link component (default: `'a'`)
|
|
145
|
+
- `src` - Override logo source URL
|
|
146
|
+
- `alt` - Image alt text (default: `'Undefine UI logo'`)
|
|
147
|
+
- `sx` - MUI sx prop for styling
|
|
148
|
+
|
|
149
|
+
#### `<AnimatedLogo />`
|
|
150
|
+
|
|
151
|
+
An animated SVG version of the logo perfect for splash screens and loading states. Features a smooth infinite animation sequence with staggered timing for visual interest.
|
|
93
152
|
|
|
94
153
|
```tsx
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
sx={{ width: 140 }}
|
|
99
|
-
disableLink={false}
|
|
100
|
-
alt="Custom logo"
|
|
101
|
-
/>
|
|
154
|
+
import { AnimatedLogo } from '@undefine-ui/design-system';
|
|
155
|
+
|
|
156
|
+
<AnimatedLogo />;
|
|
102
157
|
```
|
|
103
158
|
|
|
104
|
-
|
|
159
|
+
The animated logo automatically plays on mount with:
|
|
160
|
+
|
|
161
|
+
- Background fade-in
|
|
162
|
+
- Left bars sliding in from the left
|
|
163
|
+
- D letter scaling in with a bounce effect
|
|
164
|
+
- Continuous infinite loop
|
|
165
|
+
|
|
166
|
+
Ideal for splash screens, loading overlays, or brand storytelling moments.
|
|
105
167
|
|
|
106
168
|
## Export surface
|
|
107
169
|
|
|
@@ -110,7 +172,7 @@ Everything is re-exported from `src/index.ts`. Key groups:
|
|
|
110
172
|
| Group | Exports |
|
|
111
173
|
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
112
174
|
| Components | `CopyButton`, `HookForm` helpers (`Form`, `Field`, `RHFSwitch`, etc.), `Icon`, `Logo`, `LoadingScreen`, `Table`, `Upload` |
|
|
113
|
-
| Hooks | `useBoolean`, `useCopyToClipboard`, `useEventListener`, `useLocalStorage`, `useResponsive`, `useSettings`
|
|
175
|
+
| Hooks | `useBoolean`, `useCopyToClipboard`, `useEventListener`, `useLocalStorage`, `useResponsive`, `useSettings`, `useSetState`, `useScrollOffsetTop` |
|
|
114
176
|
| Contexts | `SettingsProvider`, `SettingsContext`, `defaultSettings`, `SettingsValueProps` |
|
|
115
177
|
| Theme | `ThemeProvider`, `createTheme`, `colorSchemes`, `components`, `palette`, `radius`, `shadows`, `customSpacing`, utilities such as `varAlpha`, `bgGradient`, `hideScrollX/Y` |
|
|
116
178
|
| Utilities | `changeCase` helpers, `formatNumber`, generic `helpers` |
|
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
AnimatedLogo: () => AnimatedLogo,
|
|
33
34
|
CheckboxDefault: () => CheckboxDefault,
|
|
34
35
|
CheckboxIndeterminate: () => CheckboxIndeterminate,
|
|
35
36
|
CheckboxSelect: () => CheckboxSelect,
|
|
@@ -68,6 +69,7 @@ __export(index_exports, {
|
|
|
68
69
|
SettingsConsumer: () => SettingsConsumer,
|
|
69
70
|
SettingsContext: () => SettingsContext,
|
|
70
71
|
SettingsProvider: () => SettingsProvider,
|
|
72
|
+
SplashScreen: () => SplashScreen,
|
|
71
73
|
Table: () => Table,
|
|
72
74
|
TablePagination: () => TablePagination,
|
|
73
75
|
ThemeProvider: () => ThemeProvider,
|
|
@@ -2047,7 +2049,7 @@ var Search = (props) => {
|
|
|
2047
2049
|
fillRule: "evenodd",
|
|
2048
2050
|
clipRule: "evenodd",
|
|
2049
2051
|
d: "M10.9804 10.9798C11.1757 10.7845 11.4923 10.7845 11.6875 10.9798L14.3542 13.6464C14.5495 13.8417 14.5495 14.1583 14.3542 14.3535C14.1589 14.5488 13.8424 14.5488 13.6471 14.3535L10.9804 11.6869C10.7852 11.4916 10.7852 11.175 10.9804 10.9798Z",
|
|
2050
|
-
fill: "
|
|
2052
|
+
fill: "currentColor"
|
|
2051
2053
|
}
|
|
2052
2054
|
),
|
|
2053
2055
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -2056,7 +2058,7 @@ var Search = (props) => {
|
|
|
2056
2058
|
fillRule: "evenodd",
|
|
2057
2059
|
clipRule: "evenodd",
|
|
2058
2060
|
d: "M7.33333 2.5C4.66396 2.5 2.5 4.66396 2.5 7.33333C2.5 10.0027 4.66396 12.1667 7.33333 12.1667C8.67047 12.1667 9.87999 11.6244 10.7556 10.7465C11.6281 9.87162 12.1667 8.66585 12.1667 7.33333C12.1667 4.66396 10.0027 2.5 7.33333 2.5ZM1.5 7.33333C1.5 4.11167 4.11167 1.5 7.33333 1.5C10.555 1.5 13.1667 4.11167 13.1667 7.33333C13.1667 8.94123 12.5155 10.398 11.4636 11.4526C10.4081 12.5109 8.94682 13.1667 7.33333 13.1667C4.11167 13.1667 1.5 10.555 1.5 7.33333Z",
|
|
2059
|
-
fill: "
|
|
2061
|
+
fill: "currentColor"
|
|
2060
2062
|
}
|
|
2061
2063
|
)
|
|
2062
2064
|
]
|
|
@@ -5637,6 +5639,108 @@ var Logo = ({
|
|
|
5637
5639
|
}
|
|
5638
5640
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_Link.default, { component: LinkComponent, href, sx: { display: "contents" }, children: logo });
|
|
5639
5641
|
};
|
|
5642
|
+
var AnimatedLogo = () => {
|
|
5643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5644
|
+
"svg",
|
|
5645
|
+
{
|
|
5646
|
+
width: "120",
|
|
5647
|
+
height: "120",
|
|
5648
|
+
viewBox: "0 0 120 120",
|
|
5649
|
+
fill: "none",
|
|
5650
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5651
|
+
children: [
|
|
5652
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("style", { children: `
|
|
5653
|
+
@keyframes fadeIn {
|
|
5654
|
+
from {
|
|
5655
|
+
opacity: 0;
|
|
5656
|
+
}
|
|
5657
|
+
to {
|
|
5658
|
+
opacity: 1;
|
|
5659
|
+
}
|
|
5660
|
+
}
|
|
5661
|
+
|
|
5662
|
+
@keyframes slideInLeft {
|
|
5663
|
+
from {
|
|
5664
|
+
opacity: 0;
|
|
5665
|
+
transform: translateX(-30px);
|
|
5666
|
+
}
|
|
5667
|
+
to {
|
|
5668
|
+
opacity: 1;
|
|
5669
|
+
transform: translateX(0);
|
|
5670
|
+
}
|
|
5671
|
+
}
|
|
5672
|
+
|
|
5673
|
+
@keyframes slideInRight {
|
|
5674
|
+
from {
|
|
5675
|
+
opacity: 0;
|
|
5676
|
+
transform: translateX(30px);
|
|
5677
|
+
}
|
|
5678
|
+
to {
|
|
5679
|
+
opacity: 1;
|
|
5680
|
+
transform: translateX(0);
|
|
5681
|
+
}
|
|
5682
|
+
}
|
|
5683
|
+
|
|
5684
|
+
@keyframes scaleIn {
|
|
5685
|
+
from {
|
|
5686
|
+
opacity: 0;
|
|
5687
|
+
transform: scale(0.5);
|
|
5688
|
+
}
|
|
5689
|
+
to {
|
|
5690
|
+
opacity: 1;
|
|
5691
|
+
transform: scale(1);
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
|
|
5695
|
+
.background-rect {
|
|
5696
|
+
animation: fadeIn 1.2s ease-out infinite;
|
|
5697
|
+
opacity: 0;
|
|
5698
|
+
}
|
|
5699
|
+
|
|
5700
|
+
.bars {
|
|
5701
|
+
animation: slideInLeft 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
|
|
5702
|
+
animation-delay: 0.4s;
|
|
5703
|
+
opacity: 0;
|
|
5704
|
+
}
|
|
5705
|
+
|
|
5706
|
+
.d-letter {
|
|
5707
|
+
animation: scaleIn 2s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
|
|
5708
|
+
animation-delay: 1s;
|
|
5709
|
+
opacity: 0;
|
|
5710
|
+
transform-origin: center;
|
|
5711
|
+
}
|
|
5712
|
+
` }),
|
|
5713
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5714
|
+
"rect",
|
|
5715
|
+
{
|
|
5716
|
+
className: "background-rect",
|
|
5717
|
+
x: "30.2988",
|
|
5718
|
+
y: "11.9149",
|
|
5719
|
+
width: "75.7447",
|
|
5720
|
+
height: "78.8085",
|
|
5721
|
+
fill: "white"
|
|
5722
|
+
}
|
|
5723
|
+
),
|
|
5724
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5725
|
+
"path",
|
|
5726
|
+
{
|
|
5727
|
+
className: "bars",
|
|
5728
|
+
d: "M8.85059 113.191H7.48926C7.11333 113.191 6.8086 112.887 6.80859 112.511V28.3671C6.8086 28.1866 6.88019 28.0134 7.00781 27.8857L8.85059 26.0429V113.191ZM12.5957 113.191H10.5527V24.3408L12.5957 22.2978V113.191ZM16 113.191H13.957V20.9365L16 18.8935V113.191ZM19.0635 113.191H17.0215V17.872L19.0635 15.83V113.191ZM21.7871 113.191H19.7451V15.1484L21.7871 13.1064V113.191ZM24.1699 113.191H22.2979V12.5956L24.1699 10.7236V113.191Z",
|
|
5729
|
+
fill: "#5E30EB"
|
|
5730
|
+
}
|
|
5731
|
+
),
|
|
5732
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5733
|
+
"path",
|
|
5734
|
+
{
|
|
5735
|
+
className: "d-letter",
|
|
5736
|
+
d: "M112.511 6.80853C112.887 6.80854 113.191 7.11326 113.191 7.4892V91.6328C113.191 91.8133 113.12 91.9865 112.992 92.1142L92.1143 112.992C91.9866 113.120 91.8133 113.191 91.6328 113.191H24.5107V10.3828L27.8857 7.00775C28.0134 6.88012 28.1867 6.80854 28.3672 6.80853H112.511ZM48.3408 82.7236H65.6172C71.9715 82.7235 77.4182 81.5604 81.957 79.2343C86.5528 76.9081 90.071 73.4463 92.5107 68.8505C95.007 64.2549 96.2548 58.5532 96.2549 51.7451C96.2549 45.2202 95.0919 39.773 92.7656 35.4042C90.4394 30.9788 87.0924 27.6308 82.7236 25.3613C78.4117 23.0918 73.2201 21.957 67.1494 21.957H48.3408V82.7236ZM67.5742 32.5107C70.7515 32.5107 73.39 33.2202 75.4893 34.6386C77.6452 36.0003 79.2628 38.1278 80.3408 41.0214C81.4187 43.915 81.957 47.6029 81.957 52.0849C81.957 58.723 80.6809 63.7159 78.1279 67.0634C75.6315 70.4109 71.7161 72.0849 66.3828 72.0849H62.1279V32.5107H67.5742Z",
|
|
5737
|
+
fill: "#5E30EB"
|
|
5738
|
+
}
|
|
5739
|
+
)
|
|
5740
|
+
]
|
|
5741
|
+
}
|
|
5742
|
+
);
|
|
5743
|
+
};
|
|
5640
5744
|
|
|
5641
5745
|
// src/components/Table/Table.tsx
|
|
5642
5746
|
var import_Box4 = __toESM(require("@mui/material/Box"), 1);
|
|
@@ -6860,8 +6964,35 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
6860
6964
|
}
|
|
6861
6965
|
return content;
|
|
6862
6966
|
};
|
|
6967
|
+
var SplashScreen = ({ portal, sx, ...rest }) => {
|
|
6968
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6969
|
+
import_Box14.default,
|
|
6970
|
+
{
|
|
6971
|
+
sx: {
|
|
6972
|
+
right: 0,
|
|
6973
|
+
width: 1,
|
|
6974
|
+
bottom: 0,
|
|
6975
|
+
height: 1,
|
|
6976
|
+
zIndex: 9998,
|
|
6977
|
+
display: "flex",
|
|
6978
|
+
position: "fixed",
|
|
6979
|
+
alignItems: "center",
|
|
6980
|
+
justifyContent: "center",
|
|
6981
|
+
bgcolor: "background.default",
|
|
6982
|
+
...sx
|
|
6983
|
+
},
|
|
6984
|
+
...rest,
|
|
6985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AnimatedLogo, {})
|
|
6986
|
+
}
|
|
6987
|
+
);
|
|
6988
|
+
if (portal) {
|
|
6989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_Portal.default, { children: content });
|
|
6990
|
+
}
|
|
6991
|
+
return content;
|
|
6992
|
+
};
|
|
6863
6993
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6864
6994
|
0 && (module.exports = {
|
|
6995
|
+
AnimatedLogo,
|
|
6865
6996
|
CheckboxDefault,
|
|
6866
6997
|
CheckboxIndeterminate,
|
|
6867
6998
|
CheckboxSelect,
|
|
@@ -6900,6 +7031,7 @@ var LoadingScreen = ({ portal, sx, ...rest }) => {
|
|
|
6900
7031
|
SettingsConsumer,
|
|
6901
7032
|
SettingsContext,
|
|
6902
7033
|
SettingsProvider,
|
|
7034
|
+
SplashScreen,
|
|
6903
7035
|
Table,
|
|
6904
7036
|
TablePagination,
|
|
6905
7037
|
ThemeProvider,
|