@memori.ai/ui 1.3.0 → 1.5.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/CHANGELOG.md +14 -0
- package/README.md +36 -6
- package/dist/index.d.ts +21 -2
- package/dist/memori-ai-ui.cjs.js +11 -11
- package/dist/memori-ai-ui.cjs.js.map +1 -1
- package/dist/memori-ai-ui.css +1 -1
- package/dist/memori-ai-ui.es.js +1686 -1624
- package/dist/memori-ai-ui.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [1.5.0](https://github.com/memori-ai/ui/compare/v1.4.0...v1.5.0) (2026-02-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add shadow prop to Button component ([4c083ae](https://github.com/memori-ai/ui/commit/4c083ae2b1aa764d13ed1a562521e7434a628eab))
|
|
9
|
+
|
|
10
|
+
## [1.4.0](https://github.com/memori-ai/ui/compare/v1.3.0...v1.4.0) (2026-02-04)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add displayValue prop to SelectBox component for custom rendering ([120c2ed](https://github.com/memori-ai/ui/commit/120c2ed58d0cef2e0cdb2a06f9bc48db0473c7b9))
|
|
16
|
+
|
|
3
17
|
## [1.3.0](https://github.com/memori-ai/ui/compare/v1.2.0...v1.3.0) (2026-02-04)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -38,20 +38,50 @@ function App() {
|
|
|
38
38
|
|
|
39
39
|
This library uses a **dynamic OKLCH color system**. The entire color palette (shades 100-900) is automatically generated from base primary and secondary colors using CSS Relative Color Syntax.
|
|
40
40
|
|
|
41
|
-
###
|
|
41
|
+
### Design Tokens
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
The library exposes CSS variables for shadows, interactive states, and focus. Use these tokens in your app or when extending components.
|
|
44
|
+
|
|
45
|
+
#### Shadows
|
|
46
|
+
|
|
47
|
+
| Token | Use case |
|
|
48
|
+
| ------------------------- | ------------------------------------ |
|
|
49
|
+
| `--memori-shadow-xs` | Subtle depth for small elements |
|
|
50
|
+
| `--memori-shadow-sm` | Default for buttons, cards |
|
|
51
|
+
| `--memori-shadow-md` | Hover states |
|
|
52
|
+
| `--memori-shadow-lg` | Modals, dropdowns |
|
|
53
|
+
| `--memori-shadow-xl` | Hero cards, major sections |
|
|
54
|
+
| `--memori-shadow-2xl` | Maximum elevation |
|
|
55
|
+
| `--memori-shadow-primary` | Brand-colored shadow for CTA buttons |
|
|
56
|
+
|
|
57
|
+
Shadows are overridden in dark theme for better contrast.
|
|
58
|
+
|
|
59
|
+
#### Interactive state tokens
|
|
60
|
+
|
|
61
|
+
Primary interactive states are derived from your brand color and can be overridden:
|
|
62
|
+
|
|
63
|
+
- `--memori-primary-hover` – hover background/border
|
|
64
|
+
- `--memori-primary-active` – pressed/active state
|
|
65
|
+
- `--memori-primary-disabled` – disabled state
|
|
66
|
+
- `--memori-focus-ring` – focus outline (box-shadow)
|
|
67
|
+
- `--memori-focus-ring-offset` – gap between element and ring
|
|
68
|
+
|
|
69
|
+
#### Overriding brand colors
|
|
70
|
+
|
|
71
|
+
Set `--memori-primary-color` (and optionally `--memori-secondary-color`) in your app. Interactive states and `--memori-shadow-primary` are computed from these.
|
|
44
72
|
|
|
45
73
|
```css
|
|
46
74
|
:root {
|
|
47
|
-
/* Override Primary
|
|
48
|
-
--memori-primary-
|
|
75
|
+
/* Override Primary (purple default) */
|
|
76
|
+
--memori-primary-color: oklch(0.55 0.22 290);
|
|
49
77
|
|
|
50
|
-
/* Override Secondary
|
|
51
|
-
--memori-secondary-
|
|
78
|
+
/* Override Secondary (cyan default) */
|
|
79
|
+
--memori-secondary-color: oklch(0.7 0.15 200);
|
|
52
80
|
}
|
|
53
81
|
```
|
|
54
82
|
|
|
83
|
+
**Note:** The legacy token `--memori-depth` has been removed. Use the shadow scale (`--memori-shadow-xs` through `--memori-shadow-2xl`) instead.
|
|
84
|
+
|
|
55
85
|
### Dark Mode
|
|
56
86
|
|
|
57
87
|
The library includes built-in dark mode support. All components automatically adapt when dark mode is enabled.
|
package/dist/index.d.ts
CHANGED
|
@@ -185,6 +185,11 @@ declare interface ButtonProps extends Omit<ButtonProps_2, 'className'>, Pick<def
|
|
|
185
185
|
* @default 'default'
|
|
186
186
|
*/
|
|
187
187
|
shape?: 'default' | 'round' | 'circle';
|
|
188
|
+
/**
|
|
189
|
+
* Whether to apply a box shadow to the button
|
|
190
|
+
* @default false
|
|
191
|
+
*/
|
|
192
|
+
shadow?: boolean;
|
|
188
193
|
/**
|
|
189
194
|
* Whether the button is in an active/pressed state (for toggle buttons)
|
|
190
195
|
*/
|
|
@@ -231,7 +236,7 @@ declare interface CardProps extends Omit<default_2.HTMLAttributes<HTMLDivElement
|
|
|
231
236
|
* Visual variant of the card
|
|
232
237
|
* @default 'elevated'
|
|
233
238
|
*/
|
|
234
|
-
variant?: 'elevated' | 'outlined';
|
|
239
|
+
variant?: 'elevated' | 'outlined' | 'flat';
|
|
235
240
|
/**
|
|
236
241
|
* Controls the padding inside the card body
|
|
237
242
|
* @default 'md'
|
|
@@ -535,6 +540,10 @@ declare interface DropdownItemProps extends Omit<default_2.ComponentPropsWithout
|
|
|
535
540
|
* Content of the item.
|
|
536
541
|
*/
|
|
537
542
|
children?: default_2.ReactNode;
|
|
543
|
+
/**
|
|
544
|
+
* Icon to show on the left side of the item.
|
|
545
|
+
*/
|
|
546
|
+
icon?: default_2.ReactNode;
|
|
538
547
|
/**
|
|
539
548
|
* If true, the item is disabled.
|
|
540
549
|
* @default false
|
|
@@ -638,7 +647,10 @@ declare interface DropdownSeparatorProps extends Omit<default_2.ComponentPropsWi
|
|
|
638
647
|
style?: default_2.CSSProperties;
|
|
639
648
|
}
|
|
640
649
|
|
|
641
|
-
|
|
650
|
+
/** Button-related props: when set, the trigger renders as your Button component (single button in DOM). */
|
|
651
|
+
declare type DropdownTriggerButtonProps = Pick<ButtonProps, 'variant' | 'size' | 'fullWidth' | 'shape' | 'shadow' | 'danger' | 'active'>;
|
|
652
|
+
|
|
653
|
+
declare interface DropdownTriggerProps extends Omit<default_2.ComponentPropsWithoutRef<typeof Menu.Trigger>, 'className' | 'style' | 'render'>, DropdownTriggerButtonProps {
|
|
642
654
|
/**
|
|
643
655
|
* Content of the trigger (e.g. button text or icon).
|
|
644
656
|
*/
|
|
@@ -656,6 +668,12 @@ declare interface DropdownTriggerProps extends Omit<default_2.ComponentPropsWith
|
|
|
656
668
|
* Inline styles for the trigger button.
|
|
657
669
|
*/
|
|
658
670
|
style?: default_2.CSSProperties;
|
|
671
|
+
/**
|
|
672
|
+
* Custom element for the trigger. Use this to render your own component (e.g. Button)
|
|
673
|
+
* as the trigger so there is a single button in the DOM. Receives trigger props and
|
|
674
|
+
* state (e.g. open). Prefer using variant/size etc. for the built-in Button.
|
|
675
|
+
*/
|
|
676
|
+
render?: default_2.ComponentPropsWithoutRef<typeof Menu.Trigger>['render'];
|
|
659
677
|
}
|
|
660
678
|
|
|
661
679
|
export declare const Expandable: ({ rows, className, innerClassName, btnClassName, lineHeightMultiplier, defaultExpanded, expandSymbol, collapseSymbol, children, mode, }: Props) => JSX.Element;
|
|
@@ -929,6 +947,7 @@ declare interface SelectBoxProps {
|
|
|
929
947
|
defaultValue?: string | null;
|
|
930
948
|
onChange?: (value: string | null) => void;
|
|
931
949
|
placeholder?: string;
|
|
950
|
+
displayValue?: default_2.ReactNode;
|
|
932
951
|
label?: string;
|
|
933
952
|
disabled?: boolean;
|
|
934
953
|
required?: boolean;
|