@webority/ui-react 0.8.8 → 0.9.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.
@@ -18,7 +18,7 @@
18
18
  * @param {React.ElementType} [props.as] render as something else — a router `Link`, `"a"`.
19
19
  * @param {string} [props.href] sets an anchor without needing `as`.
20
20
  */
21
- export default function ActionIcon({ icon, label, danger, disabled, size, onClick, className, as, href, ...rest }: {
21
+ export default function AppActionIcon({ icon, label, danger, disabled, size, onClick, className, as, href, ...rest }: {
22
22
  icon: string | import('react').ReactNode;
23
23
  label: string;
24
24
  danger?: boolean;
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * @param {object} props
9
9
  * @param {import('react').ReactNode} props.children
10
- * @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone] Legacy "warn" is aliased to "warning".
10
+ * @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone]
11
11
  * @param {boolean} [props.dot=false]
12
12
  * @param {string} [props.className]
13
13
  */
@@ -13,6 +13,9 @@
13
13
  * @param {import('react').ReactNode} [props.label] Chip text (or use `children`).
14
14
  * @param {import('react').ReactNode} [props.children]
15
15
  * @param {"neutral"|"primary"|"success"|"warning"|"danger"|"info"} [props.tone="neutral"]
16
+ * @param {"soft"|"outline"|"solid"} [props.variant="soft"] Colour treatment — a tinted
17
+ * surface (`soft`, default), a tinted surface with a coloured border (`outline`), or a
18
+ * filled pill with contrasting text (`solid`).
16
19
  * @param {"sm"|"md"} [props.size="md"]
17
20
  * @param {string} [props.leadingIcon] Semantic icon name for a leading glyph.
18
21
  * @param {string|import('react').ReactNode} [props.avatar] Leading avatar — an image URL or a node.
@@ -22,10 +25,11 @@
22
25
  * @param {string} [props.removeLabel] aria-label for the dismiss button.
23
26
  * @param {string} [props.className]
24
27
  */
25
- export default function AppChip({ label, children, tone, size, leadingIcon, avatar, onRemove, onClick, disabled, removeLabel, className, ...rest }: {
28
+ export default function AppChip({ label, children, tone, variant, size, leadingIcon, avatar, onRemove, onClick, disabled, removeLabel, className, ...rest }: {
26
29
  label?: import('react').ReactNode;
27
30
  children?: import('react').ReactNode;
28
31
  tone?: "neutral" | "primary" | "success" | "warning" | "danger" | "info";
32
+ variant?: "soft" | "outline" | "solid";
29
33
  size?: "sm" | "md";
30
34
  leadingIcon?: string;
31
35
  avatar?: string | import('react').ReactNode;
@@ -9,7 +9,7 @@
9
9
  * @param {string} props.text The text to copy (required)
10
10
  * @param {string} [props.label="Copy"] Button label
11
11
  * @param {string} [props.copiedLabel="Copied"] Label shown after successful copy
12
- * @param {boolean} [props.iconOnly] Render as an icon-only button (like ActionIcon); label becomes aria-label
12
+ * @param {boolean} [props.iconOnly] Render as an icon-only button (like AppActionIcon); label becomes aria-label
13
13
  * @param {"sm"|"md"|"lg"} [props.size="md"] Button size
14
14
  * @param {"ghost"|"outline"|"secondary"|"light"} [props.variant="ghost"] Button variant
15
15
  * @param {() => void} [props.onCopied] Callback fired on successful copy
@@ -8,7 +8,7 @@
8
8
  * @param {object} props
9
9
  * @param {import('react').ReactElement} props.trigger The anchor element the panel opens from.
10
10
  * Must be a single element that forwards a ref (a DOM element, or a react-bootstrap-based
11
- * App* like AppButton/ActionIcon). It renders as written; clicking (or hovering/focusing) it
11
+ * App* like AppButton/AppActionIcon). It renders as written; clicking (or hovering/focusing) it
12
12
  * toggles the panel.
13
13
  * @param {import('react').ReactNode} props.children The panel body.
14
14
  * @param {string} [props.title] Optional panel heading.
@@ -4,4 +4,4 @@
4
4
  *
5
5
  * @returns {import('react').JSX.Element}
6
6
  */
7
- export default function RequiredMark(): import('react').JSX.Element;
7
+ export default function AppRequiredMark(): import('react').JSX.Element;
@@ -7,7 +7,7 @@
7
7
  * @param {object} props
8
8
  * @param {import('react').ReactNode} props.content The tooltip text or node (required).
9
9
  * @param {import('react').ReactElement} props.children A single trigger element that forwards
10
- * a ref (a DOM element, or a react-bootstrap-based App* like AppButton/ActionIcon). It
10
+ * a ref (a DOM element, or a react-bootstrap-based App* like AppButton/AppActionIcon). It
11
11
  * renders as written; hovering or focusing it reveals the tooltip.
12
12
  * @param {'top'|'bottom'|'start'|'end'} [props.placement='top'] Where the tooltip appears;
13
13
  * prefers the given direction, flips if needed to stay in view.
@@ -31,8 +31,9 @@
31
31
  * @param {string} [props.createLabel="Create workspace"] Copy for the create row.
32
32
  * @param {boolean} [props.compact=false] Renders the 36px monogram button instead of the full
33
33
  * card — the shape a collapsed rail slot wants. Same menu either way.
34
- * @param {"sm"|"md"|"lg"} [props.size="md"] Trigger size tier — scales the card (and the compact
35
- * square), its mark and name. The dropdown menu is unchanged across sizes.
34
+ * @param {"sm"|"md"|"lg"} [props.size="md"] Size tier — scales the trigger (the card / compact
35
+ * square, its mark and name) AND the dropdown menu (width, row padding, avatars, the create
36
+ * "+" chip and the footer), so trigger and panel read at one size.
36
37
  * @param {string} [props.ariaLabel] Accessible name for the trigger. Defaults to
37
38
  * "Workspace <name>".
38
39
  */
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * A wrong prop whose name happens to be a real HTML attribute cannot be told apart from a
11
11
  * deliberate pass-through, so it stays silent. That is not one prop — the allowlist below
12
- * contains `name`, `title`, `type`, `value`, `width`, `height` and more, so `<ActionIcon
12
+ * contains `name`, `title`, `type`, `value`, `width`, `height` and more, so `<AppActionIcon
13
13
  * name="eye">` (meaning `icon`) and `<AppFoo title="…">` (meaning `label`) both pass
14
14
  * unremarked. Silence means "nothing recognisably wrong", never "checked and correct".
15
15
  *
@@ -1,5 +1,5 @@
1
- export { default as ActionIcon } from "./components/ActionIcon.jsx";
2
1
  export { default as AppAccordion } from "./components/AppAccordion.jsx";
2
+ export { default as AppActionIcon } from "./components/AppActionIcon.jsx";
3
3
  export { default as AppAlert } from "./components/AppAlert.jsx";
4
4
  export { default as AppAsyncBlock } from "./components/AppAsyncBlock.jsx";
5
5
  export { default as AppAutocomplete } from "./components/AppAutocomplete.jsx";
@@ -50,6 +50,7 @@ export { default as AppPricingCard } from "./components/AppPricingCard.jsx";
50
50
  export { default as AppProgress } from "./components/AppProgress.jsx";
51
51
  export { default as AppRadio } from "./components/AppRadio.jsx";
52
52
  export { default as AppRepeater } from "./components/AppRepeater.jsx";
53
+ export { default as AppRequiredMark } from "./components/AppRequiredMark.jsx";
53
54
  export { default as AppResourceCard } from "./components/AppResourceCard.jsx";
54
55
  export { default as AppResult } from "./components/AppResult.jsx";
55
56
  export { default as AppScrollbar } from "./components/AppScrollbar.jsx";
@@ -73,12 +74,11 @@ export { default as AppTagInput } from "./components/AppTagInput.jsx";
73
74
  export { default as AppTextarea } from "./components/AppTextarea.jsx";
74
75
  export { default as AppTimeline } from "./components/AppTimeline.jsx";
75
76
  export { default as AppTimePicker } from "./components/AppTimePicker.jsx";
76
- export { default as AppToast, default as AppToastContainer } from "./components/AppToast.jsx";
77
+ export { default as AppToast } from "./components/AppToast.jsx";
77
78
  export { default as AppToolbar } from "./components/AppToolbar.jsx";
78
79
  export { default as AppTooltip } from "./components/AppTooltip.jsx";
79
80
  export { default as AppWizard } from "./components/AppWizard.jsx";
80
81
  export { default as AppWorkspaceSwitcher } from "./components/AppWorkspaceSwitcher.jsx";
81
82
  export { MODAL_ICONS } from "./components/ModalIcons.jsx";
82
- export { default as RequiredMark } from "./components/RequiredMark.jsx";
83
83
  export { dismissAll, errorToast, toast } from "./components/toast.js";
84
84
  export { usePagination } from "./lib/usePagination.js";