@webority/ui-react 0.8.3 → 0.8.5
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/iconCatalogFull.g-ofRXGqrB.js +5680 -0
- 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 +4 -2
- package/dist/types/components/AppChip.d.ts +1 -1
- package/dist/types/components/AppEmptyState.d.ts +1 -1
- package/dist/types/components/AppIcon.d.ts +47 -0
- package/dist/types/components/AppTabs.d.ts +9 -2
- package/dist/types/components/iconCatalogFull.g.d.ts +5678 -0
- package/dist/types/components/iconCatalogNames.g.d.ts +1 -0
- package/dist/types/components/iconGlyphs.g.d.ts +148 -0
- package/dist/types/components/iconVariants.g.d.ts +707 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/ui-react.js +1285 -1064
- package/package.json +3 -3
- package/dist/types/components/Icon.d.ts +0 -23
|
@@ -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,15 +12,16 @@
|
|
|
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.
|
|
19
|
+
* @param {boolean} [props.bordered=true] Draw the soft ring and thick tone-coloured left edge. `false` keeps only the tint fill.
|
|
19
20
|
* @param {boolean} [props.dismissible=false] Show a × on the right that removes the callout.
|
|
20
21
|
* @param {() => void} [props.onDismiss] Called after the callout is dismissed.
|
|
21
22
|
* @param {string} [props.className]
|
|
22
23
|
*/
|
|
23
|
-
export default function AppCallout({ children, tone, title, icon, image, imageAlt, size, dismissible, onDismiss, className, ...rest }: {
|
|
24
|
+
export default function AppCallout({ children, tone, title, icon, image, imageAlt, size, bordered, dismissible, onDismiss, className, ...rest }: {
|
|
24
25
|
children: import('react').ReactNode;
|
|
25
26
|
tone?: "info" | "success" | "warning" | "danger";
|
|
26
27
|
title?: import('react').ReactNode;
|
|
@@ -28,6 +29,7 @@ export default function AppCallout({ children, tone, title, icon, image, imageAl
|
|
|
28
29
|
image?: string;
|
|
29
30
|
imageAlt?: string;
|
|
30
31
|
size?: "md" | "sm";
|
|
32
|
+
bordered?: boolean;
|
|
31
33
|
dismissible?: boolean;
|
|
32
34
|
onDismiss?: () => void;
|
|
33
35
|
className?: string;
|
|
@@ -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
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The library's icon component — iconsax (Linear) glyphs, keyed by the semantic
|
|
3
|
+
* kebab-case names in scripts/icon-map.json: <AppIcon 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
|
+
*/
|
|
11
|
+
export declare const iconNames: string[];
|
|
12
|
+
/**
|
|
13
|
+
* Register product-specific glyphs — call once at app init, before first render. Each value is a
|
|
14
|
+
* render function `({ size, color, className, style }) => ReactNode` that returns your own glyph
|
|
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.
|
|
17
|
+
*
|
|
18
|
+
* @param {Record<string, (props: { size: number, color?: string, className?: string, style?: object }) => import('react').ReactNode>} map
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerIcons(map: Record<string, (props: {
|
|
21
|
+
size: number;
|
|
22
|
+
color?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: object;
|
|
25
|
+
}) => import('react').ReactNode>): void;
|
|
26
|
+
/**
|
|
27
|
+
* @param {object} props
|
|
28
|
+
* @param {string} props.name Icon name (kebab-case; curated or full-catalogue).
|
|
29
|
+
* @param {number} [props.size=16]
|
|
30
|
+
* @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.variant]
|
|
31
|
+
* @param {string} [props.tooltip] A hover/focus tooltip. Wraps the glyph in a
|
|
32
|
+
* `.wui-icon-tip[data-wui-tip]` span that the theme styles as an instant, styled CSS bubble
|
|
33
|
+
* (no JS), plus `role="img"` + `aria-label` so it names the icon for assistive tech. For a
|
|
34
|
+
* collision-aware / richer tooltip, wrap the icon in `AppTooltip` instead.
|
|
35
|
+
* @param {string} [props.className]
|
|
36
|
+
* @param {string} [props.color]
|
|
37
|
+
* @param {object} [props.style]
|
|
38
|
+
*/
|
|
39
|
+
export default function AppIcon({ name, size, variant, tooltip, className, color, style, ...rest }: {
|
|
40
|
+
name: string;
|
|
41
|
+
size?: number;
|
|
42
|
+
variant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
43
|
+
tooltip?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
style?: object;
|
|
47
|
+
}): any;
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
* focus moves; `activation="manual"` moves focus only and selects on Enter/Space.
|
|
15
15
|
*
|
|
16
16
|
* @param {object} props
|
|
17
|
-
* @param {{ key: string, label: import('react').ReactNode, count?: number, tone?: string, icon?: import('react').ReactNode, danger?: boolean, disabled?: boolean }[]} props.tabs
|
|
17
|
+
* @param {{ key: string, label: import('react').ReactNode, count?: number, tone?: string, icon?: string|import('react').ReactNode, image?: string, imageAlt?: string, tooltip?: import('react').ReactNode, danger?: boolean, disabled?: boolean }[]} props.tabs
|
|
18
|
+
* `icon` is a Bootstrap-Icons name OR a custom node (e.g. an iconsax glyph); `image` is a
|
|
19
|
+
* picture URL (logo/avatar) rendered before the label — `image` wins over `icon`. `tooltip`
|
|
20
|
+
* is a hover/focus hint (text or node) shown on the tab via AppTooltip — the same branded
|
|
21
|
+
* tip the Razor `<app-tab tooltip="…">` renders.
|
|
18
22
|
* @param {string} props.value Selected tab key.
|
|
19
23
|
* @param {(key: string) => void} props.onChange
|
|
20
24
|
* @param {"underline"|"pills"} [props.variant="underline"]
|
|
@@ -33,7 +37,10 @@ export default function AppTabs({ tabs, value, onChange, variant, orientation, s
|
|
|
33
37
|
label: import('react').ReactNode;
|
|
34
38
|
count?: number;
|
|
35
39
|
tone?: string;
|
|
36
|
-
icon?: import('react').ReactNode;
|
|
40
|
+
icon?: string | import('react').ReactNode;
|
|
41
|
+
image?: string;
|
|
42
|
+
imageAlt?: string;
|
|
43
|
+
tooltip?: import('react').ReactNode;
|
|
37
44
|
danger?: boolean;
|
|
38
45
|
disabled?: boolean;
|
|
39
46
|
}[];
|