@webority/ui-react 0.8.3 → 0.8.4
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/iconVariants.g-3DZ_Lh8k.js +710 -0
- package/dist/types/components/AppAlert.d.ts +1 -1
- package/dist/types/components/AppCallout.d.ts +1 -1
- package/dist/types/components/AppChip.d.ts +1 -1
- package/dist/types/components/AppEmptyState.d.ts +1 -1
- package/dist/types/components/Icon.d.ts +14 -3
- package/dist/types/components/iconGlyphs.g.d.ts +148 -0
- package/dist/types/components/iconVariants.g.d.ts +707 -0
- package/dist/ui-react.js +1206 -1015
- package/package.json +3 -3
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @param {"info"|"success"|"warning"|"danger"} [props.variant="info"]
|
|
8
8
|
* @param {import('react').ReactNode} props.children The alert body.
|
|
9
9
|
* @param {import('react').ReactNode} [props.title] A bold heading line above the body (`.alert-heading`).
|
|
10
|
-
* @param {string|import('react').ReactNode} [props.icon] A leading glyph — a
|
|
10
|
+
* @param {string|import('react').ReactNode} [props.icon] A leading glyph — a semantic icon name or a node. Defaults to the variant's badge glyph; pass `null` for none.
|
|
11
11
|
* @param {string} [props.image] A custom image URL shown in the badge instead of the icon glyph (fills the circle).
|
|
12
12
|
* @param {string} [props.imageAlt] Alt text for the custom image.
|
|
13
13
|
* @param {string} [props.className]
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @param {import('react').ReactNode} props.children The explanation. `<strong>` is styled.
|
|
13
13
|
* @param {"info"|"success"|"warning"|"danger"} [props.tone="info"] The colour, mapped to intent.
|
|
14
14
|
* @param {import('react').ReactNode} [props.title] A bold heading line above the body.
|
|
15
|
-
* @param {string|import('react').ReactNode} [props.icon] Leading glyph — a
|
|
15
|
+
* @param {string|import('react').ReactNode} [props.icon] Leading glyph — a semantic icon name or a node. Defaults to the tone's badge glyph; pass `null` for none.
|
|
16
16
|
* @param {string} [props.image] A custom image URL shown in the badge instead of the icon glyph (fills the circle).
|
|
17
17
|
* @param {string} [props.imageAlt] Alt text for the custom image.
|
|
18
18
|
* @param {"md"|"sm"} [props.size="md"] `sm` is a compact single line with tone-coloured text.
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* @param {import('react').ReactNode} [props.children]
|
|
15
15
|
* @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone="neutral"]
|
|
16
16
|
* @param {"sm"|"md"} [props.size="md"]
|
|
17
|
-
* @param {string} [props.leadingIcon]
|
|
17
|
+
* @param {string} [props.leadingIcon] Semantic icon name for a leading glyph.
|
|
18
18
|
* @param {string|import('react').ReactNode} [props.avatar] Leading avatar — an image URL or a node.
|
|
19
19
|
* @param {() => void} [props.onRemove] Present → shows the dismiss ✕.
|
|
20
20
|
* @param {() => void} [props.onClick] Present → the chip body is clickable.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* the tighter widget/tile variant (smaller title + text).
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
|
-
* @param {string|import('react').ReactNode} props.icon
|
|
13
|
+
* @param {string|import('react').ReactNode} props.icon Semantic icon name for the bubble, or a custom node
|
|
14
14
|
* @param {number} [props.iconSize=24]
|
|
15
15
|
* @param {"md"|"sm"} [props.size="md"]
|
|
16
16
|
* @param {import('react').ReactNode} props.title
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The library's icon component — iconsax (Linear) glyphs, keyed by the semantic
|
|
3
|
+
* kebab-case names in scripts/icon-map.json: <Icon name="file-text" />. Renders inline
|
|
4
|
+
* SVG (24x24 viewBox, currentColor) with data-icon={name} so CSS can target a specific
|
|
5
|
+
* glyph. `size` maps to width/height; `color` to the icon colour.
|
|
6
|
+
*
|
|
7
|
+
* The glyph bodies are GENERATED (iconGlyphs.g.js) from one source shared with the Razor
|
|
8
|
+
* RCL and the wui elements, so every surface draws the identical icon. Add or change an
|
|
9
|
+
* icon in scripts/icon-map.json and run `node scripts/gen-icons.mjs`.
|
|
10
|
+
*/
|
|
1
11
|
export declare const iconNames: string[];
|
|
2
12
|
/**
|
|
3
13
|
* Register product-specific glyphs — call once at app init, before first render. Each value is a
|
|
4
14
|
* render function `({ size, color, className, style }) => ReactNode` that returns your own glyph
|
|
5
|
-
*
|
|
6
|
-
*
|
|
15
|
+
* applied to those props. A registered name wins over the built-in iconsax resolution; every
|
|
16
|
+
* unregistered name still resolves to the generated iconsax glyph.
|
|
7
17
|
*
|
|
8
18
|
* @param {Record<string, (props: { size: number, color?: string, className?: string, style?: object }) => import('react').ReactNode>} map
|
|
9
19
|
*/
|
|
@@ -13,11 +23,12 @@ export declare function registerIcons(map: Record<string, (props: {
|
|
|
13
23
|
className?: string;
|
|
14
24
|
style?: object;
|
|
15
25
|
}) => import('react').ReactNode>): void;
|
|
16
|
-
export default function Icon({ name, size, className, color, style, ...rest }: {
|
|
26
|
+
export default function Icon({ name, size, variant, className, color, style, ...rest }: {
|
|
17
27
|
[x: string]: any;
|
|
18
28
|
className: any;
|
|
19
29
|
color: any;
|
|
20
30
|
name: any;
|
|
21
31
|
size?: number;
|
|
22
32
|
style: any;
|
|
33
|
+
variant: any;
|
|
23
34
|
}): any;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export declare const GLYPHS: {
|
|
2
|
+
activity: string;
|
|
3
|
+
alarm: string;
|
|
4
|
+
'alert-circle': string;
|
|
5
|
+
'alert-triangle': string;
|
|
6
|
+
'arrow-down': string;
|
|
7
|
+
'arrow-down-up': string;
|
|
8
|
+
'arrow-left': string;
|
|
9
|
+
'arrow-right': string;
|
|
10
|
+
'arrow-up': string;
|
|
11
|
+
'arrow-up-right': string;
|
|
12
|
+
'badge-check': string;
|
|
13
|
+
bell: string;
|
|
14
|
+
book: string;
|
|
15
|
+
'box-seam': string;
|
|
16
|
+
briefcase: string;
|
|
17
|
+
bug: string;
|
|
18
|
+
building: string;
|
|
19
|
+
'building-2': string;
|
|
20
|
+
bullseye: string;
|
|
21
|
+
calculator: string;
|
|
22
|
+
calendar: string;
|
|
23
|
+
'calendar-check': string;
|
|
24
|
+
'calendar-dots': string;
|
|
25
|
+
camera: string;
|
|
26
|
+
'cash-stack': string;
|
|
27
|
+
chart: string;
|
|
28
|
+
'chart-column': string;
|
|
29
|
+
chat: string;
|
|
30
|
+
'chat-dots': string;
|
|
31
|
+
check: string;
|
|
32
|
+
'check-check': string;
|
|
33
|
+
'check-circle': string;
|
|
34
|
+
'chevron-down': string;
|
|
35
|
+
'chevron-left': string;
|
|
36
|
+
'chevron-right': string;
|
|
37
|
+
'chevron-up': string;
|
|
38
|
+
'chevrons-up-down': string;
|
|
39
|
+
circle: string;
|
|
40
|
+
'circle-help': string;
|
|
41
|
+
'clipboard-check': string;
|
|
42
|
+
clock: string;
|
|
43
|
+
cloud: string;
|
|
44
|
+
coins: string;
|
|
45
|
+
contact: string;
|
|
46
|
+
copy: string;
|
|
47
|
+
'credit-card': string;
|
|
48
|
+
cursor: string;
|
|
49
|
+
'diagram-3': string;
|
|
50
|
+
display: string;
|
|
51
|
+
download: string;
|
|
52
|
+
edit: string;
|
|
53
|
+
'emoji-smile': string;
|
|
54
|
+
'external-link': string;
|
|
55
|
+
eye: string;
|
|
56
|
+
'eye-off': string;
|
|
57
|
+
factory: string;
|
|
58
|
+
'file-plus-2': string;
|
|
59
|
+
'file-text': string;
|
|
60
|
+
files: string;
|
|
61
|
+
filter: string;
|
|
62
|
+
flag: string;
|
|
63
|
+
folder: string;
|
|
64
|
+
'folder-kanban': string;
|
|
65
|
+
'folder-open': string;
|
|
66
|
+
'folder-plus': string;
|
|
67
|
+
gauge: string;
|
|
68
|
+
gift: string;
|
|
69
|
+
globe: string;
|
|
70
|
+
globe2: string;
|
|
71
|
+
grid: string;
|
|
72
|
+
heart: string;
|
|
73
|
+
history: string;
|
|
74
|
+
house: string;
|
|
75
|
+
image: string;
|
|
76
|
+
inbox: string;
|
|
77
|
+
info: string;
|
|
78
|
+
key: string;
|
|
79
|
+
'layout-dashboard': string;
|
|
80
|
+
'layout-grid': string;
|
|
81
|
+
lightbulb: string;
|
|
82
|
+
list: string;
|
|
83
|
+
lock: string;
|
|
84
|
+
'log-out': string;
|
|
85
|
+
mail: string;
|
|
86
|
+
'map-pin': string;
|
|
87
|
+
menu: string;
|
|
88
|
+
'message-square': string;
|
|
89
|
+
minus: string;
|
|
90
|
+
moon: string;
|
|
91
|
+
'more-horizontal': string;
|
|
92
|
+
palette: string;
|
|
93
|
+
'panel-left-close': string;
|
|
94
|
+
'panel-left-open': string;
|
|
95
|
+
'pen-tool': string;
|
|
96
|
+
pencil: string;
|
|
97
|
+
phone: string;
|
|
98
|
+
plug: string;
|
|
99
|
+
plus: string;
|
|
100
|
+
'plus-circle': string;
|
|
101
|
+
receipt: string;
|
|
102
|
+
'refresh-cw': string;
|
|
103
|
+
repeat: string;
|
|
104
|
+
'rotate-ccw': string;
|
|
105
|
+
search: string;
|
|
106
|
+
send: string;
|
|
107
|
+
server: string;
|
|
108
|
+
settings: string;
|
|
109
|
+
'share-2': string;
|
|
110
|
+
shield: string;
|
|
111
|
+
'shield-check': string;
|
|
112
|
+
'shield-lock': string;
|
|
113
|
+
'shield-plus': string;
|
|
114
|
+
shop: string;
|
|
115
|
+
sort: string;
|
|
116
|
+
sparkles: string;
|
|
117
|
+
star: string;
|
|
118
|
+
stars: string;
|
|
119
|
+
sun: string;
|
|
120
|
+
tag: string;
|
|
121
|
+
telephone: string;
|
|
122
|
+
text: string;
|
|
123
|
+
'trash-2': string;
|
|
124
|
+
'trending-up': string;
|
|
125
|
+
triangle: string;
|
|
126
|
+
'two-page': string;
|
|
127
|
+
upload: string;
|
|
128
|
+
user: string;
|
|
129
|
+
'user-check': string;
|
|
130
|
+
'user-minus': string;
|
|
131
|
+
'user-plus': string;
|
|
132
|
+
users: string;
|
|
133
|
+
wallet2: string;
|
|
134
|
+
'wand-sparkles': string;
|
|
135
|
+
whatsapp: string;
|
|
136
|
+
x: string;
|
|
137
|
+
'x-circle': string;
|
|
138
|
+
zap: string;
|
|
139
|
+
'zoom-in': string;
|
|
140
|
+
'zoom-out': string;
|
|
141
|
+
};
|
|
142
|
+
export declare const iconNames: string[];
|
|
143
|
+
/** The library's single icon SVG emitter — identical markup to Razor's IconMarkup.Render. */
|
|
144
|
+
export declare function glyphSvg(name: any, { size, className, style }?: {
|
|
145
|
+
className?: string;
|
|
146
|
+
size?: number;
|
|
147
|
+
style?: string;
|
|
148
|
+
}): string;
|