@webority/ui-react 0.8.4 → 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.
@@ -16,11 +16,12 @@
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;
@@ -1,6 +1,6 @@
1
1
  /**
2
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
3
+ * kebab-case names in scripts/icon-map.json: <AppIcon name="file-text" />. Renders inline
4
4
  * SVG (24x24 viewBox, currentColor) with data-icon={name} so CSS can target a specific
5
5
  * glyph. `size` maps to width/height; `color` to the icon colour.
6
6
  *
@@ -23,12 +23,25 @@ export declare function registerIcons(map: Record<string, (props: {
23
23
  className?: string;
24
24
  style?: object;
25
25
  }) => import('react').ReactNode>): void;
26
- export default function Icon({ name, size, variant, className, color, style, ...rest }: {
27
- [x: string]: any;
28
- className: any;
29
- color: any;
30
- name: any;
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;
31
41
  size?: number;
32
- style: any;
33
- variant: any;
42
+ variant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
43
+ tooltip?: string;
44
+ className?: string;
45
+ color?: string;
46
+ style?: object;
34
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
  }[];