@luscii-healthtech/web-ui 58.7.2 → 58.8.1

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.
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ export interface ButtonGroupProps extends React.ComponentPropsWithoutRef<"div"> {
3
+ /**
4
+ * The buttons to render in the group. A button group holds a single, double
5
+ * or triple action.
6
+ */
7
+ children?: React.ReactNode;
8
+ /**
9
+ * Direction of the group.
10
+ *
11
+ * - `RTL` (default) aligns the actions to the end of the container, with the
12
+ * most important action last (right). This is the default for most button
13
+ * groups, e.g. in modals and cards.
14
+ * - `LTR` aligns the actions to the start of the container, with the most
15
+ * important action first (left). Use this in a full page form.
16
+ */
17
+ direction?: "RTL" | "LTR";
18
+ }
19
+ /**
20
+ * A button group is a container that defines the button combinations that can
21
+ * be used in the UI. It takes a single, double or triple action as children and
22
+ * takes care of the spacing and alignment between them.
23
+ *
24
+ * The buttons themselves are the regular button components, so any combination
25
+ * of `PrimaryButton`, `SecondaryButton`, `TertiaryButton` and their icon
26
+ * counterparts can be passed in.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <ButtonGroup>
31
+ * <SecondaryButton>Cancel</SecondaryButton>
32
+ * <PrimaryButton>Save</PrimaryButton>
33
+ * </ButtonGroup>
34
+ * ```
35
+ */
36
+ export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ export interface ButtonGroupProps extends React.ComponentPropsWithoutRef<"div"> {
3
+ /**
4
+ * The buttons to render in the group. A button group holds a single, double
5
+ * or triple action.
6
+ */
7
+ children?: React.ReactNode;
8
+ /**
9
+ * Direction of the group.
10
+ *
11
+ * - `RTL` (default) aligns the actions to the end of the container, with the
12
+ * most important action last (right). This is the default for most button
13
+ * groups, e.g. in modals and cards.
14
+ * - `LTR` aligns the actions to the start of the container, with the most
15
+ * important action first (left). Use this in a full page form.
16
+ */
17
+ direction?: "RTL" | "LTR";
18
+ }
19
+ /**
20
+ * A button group is a container that defines the button combinations that can
21
+ * be used in the UI. It takes a single, double or triple action as children and
22
+ * takes care of the spacing and alignment between them.
23
+ *
24
+ * The buttons themselves are the regular button components, so any combination
25
+ * of `PrimaryButton`, `SecondaryButton`, `TertiaryButton` and their icon
26
+ * counterparts can be passed in.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <ButtonGroup>
31
+ * <SecondaryButton>Cancel</SecondaryButton>
32
+ * <PrimaryButton>Save</PrimaryButton>
33
+ * </ButtonGroup>
34
+ * ```
35
+ */
36
+ export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -27,6 +27,7 @@ export { TertiaryButton } from "./components/ButtonV2/TertiaryButton";
27
27
  export { PrimaryIconButton } from "./components/ButtonV2/PrimaryIconButton";
28
28
  export { SecondaryIconButton } from "./components/ButtonV2/SecondaryIconButton";
29
29
  export { TertiaryIconButton } from "./components/ButtonV2/TertiaryIconButton";
30
+ export { ButtonGroup, type ButtonGroupProps, } from "./components/ButtonGroup/ButtonGroup";
30
31
  export { default as Carousel } from "./components/Carousel/Carousel";
31
32
  export { default as CenteredHero } from "./components/CenteredHero/CenteredHero";
32
33
  export { Checkbox } from "./components/Checkbox/Checkbox";
@@ -27,6 +27,7 @@ export { TertiaryButton } from "./components/ButtonV2/TertiaryButton";
27
27
  export { PrimaryIconButton } from "./components/ButtonV2/PrimaryIconButton";
28
28
  export { SecondaryIconButton } from "./components/ButtonV2/SecondaryIconButton";
29
29
  export { TertiaryIconButton } from "./components/ButtonV2/TertiaryIconButton";
30
+ export { ButtonGroup, type ButtonGroupProps, } from "./components/ButtonGroup/ButtonGroup";
30
31
  export { default as Carousel } from "./components/Carousel/Carousel";
31
32
  export { default as CenteredHero } from "./components/CenteredHero/CenteredHero";
32
33
  export { Checkbox } from "./components/Checkbox/Checkbox";
@@ -0,0 +1,39 @@
1
+ import { type StoryObj } from "@storybook/react-vite";
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<import("../src").ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
5
+ parameters: {
6
+ docs: {
7
+ description: {
8
+ component: string;
9
+ };
10
+ };
11
+ };
12
+ };
13
+ export default meta;
14
+ type Story = StoryObj<typeof meta>;
15
+ /**
16
+ * A single action. Most commonly a primary button.
17
+ */
18
+ export declare const Single: Story;
19
+ /**
20
+ * Two actions. The most important action is placed last, so it sits closest to
21
+ * the edge of the container.
22
+ */
23
+ export declare const Double: Story;
24
+ /**
25
+ * Three actions. This is the maximum a button group should hold.
26
+ */
27
+ export declare const Triple: Story;
28
+ /**
29
+ * The default `RTL` direction aligns the actions to the end of the container,
30
+ * with the most important action last. Use `LTR` in a full page form, which
31
+ * aligns the actions to the start with the most important action first.
32
+ */
33
+ export declare const Direction: Story;
34
+ /**
35
+ * The button group is only a container, so any combination of the button
36
+ * components can be used as its actions. These are the combinations defined in
37
+ * the design system.
38
+ */
39
+ export declare const Combinations: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luscii-healthtech/web-ui",
3
- "version": "58.7.2",
3
+ "version": "58.8.1",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"