@cwellt_software/cwellt-reactjs-lib 1.4.14 → 1.4.15
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/index.cjs.js +284 -89
- package/dist/index.css +2 -2
- package/dist/index.d.ts +227 -20
- package/dist/index.es.js +283 -91
- package/dist/src/common/hooks/useRovingSingleSelect.d.ts +28 -0
- package/dist/src/common/hooks/useRovingSingleSelect.d.ts.map +1 -0
- package/dist/src/components/control/action/button/CwButton.d.ts +14 -4
- package/dist/src/components/control/action/button/CwButton.d.ts.map +1 -1
- package/dist/src/components/control/action/button/CwButtonSplit.d.ts +52 -0
- package/dist/src/components/control/action/button/CwButtonSplit.d.ts.map +1 -0
- package/dist/src/components/control/action/button/CwButtonSwitch.d.ts +65 -0
- package/dist/src/components/control/action/button/CwButtonSwitch.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwCheck.d.ts +6 -5
- package/dist/src/components/control/choice/checkbox/CwCheck.d.ts.map +1 -1
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.d.ts +30 -7
- package/dist/src/components/control/choice/checkbox/CwCheckboxGroup.d.ts.map +1 -1
- package/dist/src/components/control/choice/checkbox/CwRadio.d.ts +10 -0
- package/dist/src/components/control/choice/checkbox/CwRadio.d.ts.map +1 -0
- package/dist/src/components/control/choice/checkbox/CwRadioGroup.d.ts +58 -0
- package/dist/src/components/control/choice/checkbox/CwRadioGroup.d.ts.map +1 -0
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts +6 -5
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/playground/PlaygroundApp.d.ts.map +1 -1
- package/dist/src/playground/PlaygroundSection.d.ts +13 -0
- package/dist/src/playground/PlaygroundSection.d.ts.map +1 -0
- package/dist/src/playground/pages/CwButtonPage.d.ts +3 -0
- package/dist/src/playground/pages/CwButtonPage.d.ts.map +1 -0
- package/dist/src/playground/pages/CwButtonSplitPage.d.ts +3 -0
- package/dist/src/playground/pages/CwButtonSplitPage.d.ts.map +1 -0
- package/dist/src/playground/pages/CwButtonSwitchPage.d.ts +3 -0
- package/dist/src/playground/pages/CwButtonSwitchPage.d.ts.map +1 -0
- package/dist/src/playground/pages/CwCheckboxGroupPage.d.ts +3 -0
- package/dist/src/playground/pages/CwCheckboxGroupPage.d.ts.map +1 -0
- package/dist/src/playground/pages/CwRadioGroupPage.d.ts +3 -0
- package/dist/src/playground/pages/CwRadioGroupPage.d.ts.map +1 -0
- package/dist/test/common/hooks/useRovingSingleSelect.test.d.ts +2 -0
- package/dist/test/common/hooks/useRovingSingleSelect.test.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1440,9 +1440,12 @@ declare function CwInput(CwInputProps: React__default.PropsWithChildren<CwInputP
|
|
|
1440
1440
|
* CwButton - Customizable button component with variant styles, color themes, and icon support
|
|
1441
1441
|
*
|
|
1442
1442
|
* @param text - Button text content (displayed in <strong> tag when no children)
|
|
1443
|
-
* @param variant - Button style: 'solid' (default), 'outline', or '
|
|
1443
|
+
* @param variant - Button style: 'solid' (default), 'outline', 'icon', or 'ghost' (low-emphasis text button: transparent, fills with the container color on hover/press)
|
|
1444
1444
|
* @param color - Color theme: 'primary' (default), 'danger', or 'neutral'
|
|
1445
|
+
* @param size - Button size: 'small', 'medium' (default), or 'large'
|
|
1445
1446
|
* @param icon - Icon identifier for CSS classes (cwi-{icon})
|
|
1447
|
+
* @param iconPosition - Icon placement relative to the text: 'left' (default, icon-then-text) or 'right' (text-then-icon). Only affects the auto icon+text rendering, not the icon variant or custom children.
|
|
1448
|
+
* @param pressed - Toggle/"on" state for a toggle button. When defined, sets `aria-pressed` and a selected fill; leave undefined for a normal (non-toggle) button. The consumer owns the state (`pressed` + `onClick`).
|
|
1446
1449
|
* @param className - Additional CSS classes
|
|
1447
1450
|
* @param title - Built-in tooltip
|
|
1448
1451
|
* @param tooltipPosition - Tooltip position: 'top', 'bottom' (default), 'left', 'right'
|
|
@@ -1450,20 +1453,27 @@ declare function CwInput(CwInputProps: React__default.PropsWithChildren<CwInputP
|
|
|
1450
1453
|
*
|
|
1451
1454
|
* @example
|
|
1452
1455
|
* <CwButton text="Save" />
|
|
1456
|
+
* <CwButton text="Save" size="small" />
|
|
1453
1457
|
* <CwButton text="Delete" variant="outline" color="danger" />
|
|
1454
1458
|
* <CwButton variant="icon" icon="edit" title="Edit item" />
|
|
1455
1459
|
* <CwButton icon="star" text="Favorite" color="primary" />
|
|
1460
|
+
* <CwButton text="Next" icon="chevron-right" iconPosition="right" />
|
|
1461
|
+
* <CwButton text="Export" icon="download" variant="ghost" />
|
|
1462
|
+
* <CwButton variant="icon" icon="pin" pressed={isPinned} onClick={togglePinned} title="Pin" />
|
|
1456
1463
|
* <CwButton className="custom-class">Custom content</CwButton>
|
|
1457
1464
|
*/
|
|
1458
|
-
|
|
1465
|
+
|
|
1466
|
+
interface CwButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1459
1467
|
text?: string;
|
|
1460
|
-
variant?: 'solid' | 'outline' | 'icon';
|
|
1468
|
+
variant?: 'solid' | 'outline' | 'icon' | 'ghost';
|
|
1461
1469
|
color?: 'primary' | 'danger' | 'neutral';
|
|
1470
|
+
size?: 'small' | 'medium' | 'large';
|
|
1471
|
+
iconPosition?: 'left' | 'right';
|
|
1472
|
+
pressed?: boolean;
|
|
1462
1473
|
icon?: string;
|
|
1463
1474
|
tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
1464
|
-
ref?: React.LegacyRef<HTMLButtonElement>;
|
|
1465
1475
|
}
|
|
1466
|
-
declare
|
|
1476
|
+
declare const CwButton: React__default.ForwardRefExoticComponent<CwButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
1467
1477
|
|
|
1468
1478
|
interface CwDigitProps extends Omit<HTMLProps<HTMLInputElement>, "className" | "type"> {
|
|
1469
1479
|
/** Props to define alignment and size; undefined == column
|
|
@@ -1890,11 +1900,13 @@ declare const CwWeekdaySelector: FC<CwWeekdaySelectorProps>;
|
|
|
1890
1900
|
interface CwCheckProps extends Omit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type"> {
|
|
1891
1901
|
/** Props for the label component */
|
|
1892
1902
|
labelProps?: CwLabelProps;
|
|
1893
|
-
/** Text content for the checkbox label
|
|
1903
|
+
/** Text content for the checkbox label
|
|
1904
|
+
* @deprecated Use `labelProps.text` instead. */
|
|
1894
1905
|
labelText?: string;
|
|
1895
|
-
/**
|
|
1896
|
-
|
|
1897
|
-
/** Layout alignment: "row" (side by side) | "column" (label
|
|
1906
|
+
/** Layout of the input relative to its label: "row" (side by side, default) | "column" (label below) */
|
|
1907
|
+
direction?: "row" | "column";
|
|
1908
|
+
/** Layout alignment: "row" (side by side) | "column" (label below) @default "row"
|
|
1909
|
+
* @deprecated Use `direction` instead. */
|
|
1898
1910
|
alignment?: "row" | "column";
|
|
1899
1911
|
}
|
|
1900
1912
|
declare function CwCheck(props: CwCheckProps): React__default.JSX.Element;
|
|
@@ -1927,7 +1939,17 @@ interface CheckboxOption {
|
|
|
1927
1939
|
/** Disables this specific option */
|
|
1928
1940
|
disabled?: boolean;
|
|
1929
1941
|
}
|
|
1930
|
-
|
|
1942
|
+
/**
|
|
1943
|
+
* Extends the shared {@link CwGroupLayoutProps} (`groupLayout` + `itemLayout`), the same layout
|
|
1944
|
+
* interface {@link CwRadioGroup} and {@link CwKeyValueList} use:
|
|
1945
|
+
* - `groupLayout` — label vs group block. `direction: "row"` (default, kept for backward
|
|
1946
|
+
* compatibility) = label beside the options; `"column"` = label above. Honors `align`/`gap`.
|
|
1947
|
+
* - `itemLayout` — flow of the checkbox options. `direction: "column"` (default) = stacked;
|
|
1948
|
+
* `"row"` = inline with wrap. Honors `gap`. It also drives each checkbox's own box-to-text
|
|
1949
|
+
* layout to the OPPOSITE axis: stacked items get the box beside the text, side-by-side items
|
|
1950
|
+
* get the box above the text.
|
|
1951
|
+
*/
|
|
1952
|
+
interface CwCheckboxGroupProps extends CwGroupLayoutProps {
|
|
1931
1953
|
/** List of options to display */
|
|
1932
1954
|
options: CheckboxOption[];
|
|
1933
1955
|
/** Currently selected values */
|
|
@@ -1936,29 +1958,98 @@ interface CwCheckboxGroupProps {
|
|
|
1936
1958
|
onChange: (selected: string[]) => void;
|
|
1937
1959
|
/** Props for the label component */
|
|
1938
1960
|
labelProps?: CwLabelProps;
|
|
1939
|
-
/** Props for alignment */
|
|
1940
|
-
alignProps?: CwAlignProps;
|
|
1941
1961
|
/** Marks the group as required */
|
|
1942
1962
|
required?: boolean;
|
|
1943
1963
|
/** Disables all options */
|
|
1944
1964
|
disabled?: boolean;
|
|
1945
|
-
/**
|
|
1965
|
+
/** Additional CSS class for the container */
|
|
1966
|
+
className?: string;
|
|
1967
|
+
/** Error or info messages below the group */
|
|
1968
|
+
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
1969
|
+
/** Props for alignment
|
|
1970
|
+
* @deprecated Use `groupLayout` instead. */
|
|
1971
|
+
alignProps?: CwAlignProps;
|
|
1972
|
+
/** Layout alignment of each individual checkbox: "row" (default) | "column"
|
|
1973
|
+
* @deprecated Use `itemLayout` instead. */
|
|
1946
1974
|
optionsAlignment?: "row" | "column";
|
|
1975
|
+
"data-testid"?: string;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* CwCheckboxGroup - Multi-select group of native checkbox inputs.
|
|
1979
|
+
*
|
|
1980
|
+
* Use for selecting any number of values from a list of options. Layout follows the
|
|
1981
|
+
* CwKeyValueList / CwRadioGroup convention with two nested {@link CwLayoutProps} axes applied as
|
|
1982
|
+
* `data-*` attributes: `groupLayout` positions the label relative to the group block (root grid),
|
|
1983
|
+
* `itemLayout` controls how the checkboxes flow among themselves (options container) and, on the
|
|
1984
|
+
* opposite axis, each checkbox's own box-to-text layout.
|
|
1985
|
+
*/
|
|
1986
|
+
declare function CwCheckboxGroup({ options, value, onChange, labelProps, groupLayout, itemLayout, required, disabled, className, feedback, alignProps, optionsAlignment, "data-testid": dataTestId, }: CwCheckboxGroupProps): React$1.JSX.Element;
|
|
1987
|
+
|
|
1988
|
+
interface RadioOption {
|
|
1989
|
+
/** Value sent to onChange */
|
|
1990
|
+
value: string;
|
|
1991
|
+
/** Text displayed next to the radio */
|
|
1992
|
+
label: string;
|
|
1993
|
+
/** Disables this specific option */
|
|
1994
|
+
disabled?: boolean;
|
|
1995
|
+
}
|
|
1996
|
+
/**
|
|
1997
|
+
* Extends the shared {@link CwGroupLayoutProps} (`groupLayout` + `itemLayout`), the same layout
|
|
1998
|
+
* interface {@link CwKeyValueList} uses:
|
|
1999
|
+
* - `groupLayout` — label vs radiogroup block. `direction: "column"` (default) = label above;
|
|
2000
|
+
* `"row"` = label beside the options. Honors `align`/`gap`.
|
|
2001
|
+
* - `itemLayout` — flow of the radio options. `direction: "column"` (default) = stacked;
|
|
2002
|
+
* `"row"` = inline with wrap. Honors `gap`. It also drives each radio's own circle-to-text
|
|
2003
|
+
* layout to the OPPOSITE axis: stacked items get the circle beside the text, side-by-side
|
|
2004
|
+
* items get the circle above the text.
|
|
2005
|
+
*/
|
|
2006
|
+
interface CwRadioGroupProps extends CwGroupLayoutProps {
|
|
2007
|
+
/** List of options to display */
|
|
2008
|
+
options: RadioOption[];
|
|
2009
|
+
/** Currently selected value */
|
|
2010
|
+
value?: string;
|
|
2011
|
+
/** Callback when the selection changes - returns the selected value */
|
|
2012
|
+
onChange: (value: string) => void;
|
|
2013
|
+
/** Props for the label component */
|
|
2014
|
+
labelProps?: CwLabelProps;
|
|
2015
|
+
/** Marks the group as required */
|
|
2016
|
+
required?: boolean;
|
|
2017
|
+
/** Disables all options */
|
|
2018
|
+
disabled?: boolean;
|
|
1947
2019
|
/** Additional CSS class for the container */
|
|
1948
2020
|
className?: string;
|
|
1949
2021
|
/** Error or info messages below the group */
|
|
1950
2022
|
feedback?: CwInputFeedback | CwInputFeedback[];
|
|
2023
|
+
/** Accessible name for the radiogroup when no visible `labelProps` label is rendered (a11y fallback). */
|
|
2024
|
+
"aria-label"?: string;
|
|
2025
|
+
/** Accessible name for the radiogroup when no visible `labelProps` label is rendered (a11y fallback). */
|
|
2026
|
+
"aria-labelledby"?: string;
|
|
2027
|
+
"data-testid"?: string;
|
|
1951
2028
|
}
|
|
1952
|
-
|
|
2029
|
+
/**
|
|
2030
|
+
* CwRadioGroup - Single-select group of native radio inputs.
|
|
2031
|
+
*
|
|
2032
|
+
* Built on `<input type="radio">` sharing one `name`, so the browser provides radio-group
|
|
2033
|
+
* semantics (roving tabindex, arrow-key navigation) natively. Use for a single choice from a
|
|
2034
|
+
* list of options; for 2–3 options shown as a strip use CwButtonSwitch.
|
|
2035
|
+
*
|
|
2036
|
+
* Layout follows the CwKeyValueList convention with two nested {@link CwLayoutProps} axes
|
|
2037
|
+
* applied as `data-*` attributes: `groupLayout` positions the label relative to the radiogroup
|
|
2038
|
+
* block (root grid), `itemLayout` controls how the radios flow among themselves (options
|
|
2039
|
+
* container) and, on the opposite axis, each radio's own circle-to-text layout.
|
|
2040
|
+
*/
|
|
2041
|
+
declare function CwRadioGroup({ options, value, onChange, labelProps, groupLayout, itemLayout, required, disabled, className, feedback, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "data-testid": dataTestId, }: CwRadioGroupProps): React$1.JSX.Element;
|
|
1953
2042
|
|
|
1954
2043
|
interface CwToggleProps extends Omit<React__default.DetailedHTMLProps<React__default.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "type"> {
|
|
1955
2044
|
/** Props for the label component */
|
|
1956
2045
|
labelProps?: CwLabelProps;
|
|
1957
|
-
/** Text content for the toggle label
|
|
2046
|
+
/** Text content for the toggle label
|
|
2047
|
+
* @deprecated Use `labelProps.text` instead. */
|
|
1958
2048
|
labelText?: string;
|
|
1959
|
-
/**
|
|
1960
|
-
|
|
1961
|
-
/** Layout alignment: "row" (side by side) | "column" (label above) @default "row"
|
|
2049
|
+
/** Layout of the input relative to its label: "row" (side by side, default) | "column" (label above) */
|
|
2050
|
+
direction?: "row" | "column";
|
|
2051
|
+
/** Layout alignment: "row" (side by side) | "column" (label above) @default "row"
|
|
2052
|
+
* @deprecated Use `direction` instead. */
|
|
1962
2053
|
alignment?: "row" | "column";
|
|
1963
2054
|
}
|
|
1964
2055
|
declare function CwToggle(props: CwToggleProps): React__default.JSX.Element;
|
|
@@ -2639,6 +2730,122 @@ interface ContextMenuProps extends React__default.PropsWithChildren {
|
|
|
2639
2730
|
}
|
|
2640
2731
|
declare const CwContextMenu: React__default.FC<ContextMenuProps>;
|
|
2641
2732
|
|
|
2733
|
+
interface CwButtonSplitAction {
|
|
2734
|
+
key: string;
|
|
2735
|
+
label: string;
|
|
2736
|
+
/** cwi icon name (verified against NewCwIcons.json) */
|
|
2737
|
+
icon?: string;
|
|
2738
|
+
disabled?: boolean;
|
|
2739
|
+
}
|
|
2740
|
+
interface CwButtonSplitProps {
|
|
2741
|
+
/** Main action label */
|
|
2742
|
+
text: string;
|
|
2743
|
+
/** Optional main-action icon */
|
|
2744
|
+
icon?: string;
|
|
2745
|
+
/** Default/main action */
|
|
2746
|
+
onClick: () => void;
|
|
2747
|
+
/** Alternative actions shown in the dropdown menu */
|
|
2748
|
+
actions: CwButtonSplitAction[];
|
|
2749
|
+
/** Fired when a menu item is chosen */
|
|
2750
|
+
onSelect: (key: string) => void;
|
|
2751
|
+
/** Shared visual style for both parts. @default 'solid' */
|
|
2752
|
+
variant?: "solid" | "outline";
|
|
2753
|
+
/** Shared color theme for both parts. @default 'primary' */
|
|
2754
|
+
color?: "primary" | "danger" | "neutral";
|
|
2755
|
+
/** Shared size for both parts. @default 'medium' */
|
|
2756
|
+
size?: "small" | "medium" | "large";
|
|
2757
|
+
/** Disables both parts */
|
|
2758
|
+
disabled?: boolean;
|
|
2759
|
+
/** Menu alignment relative to the control. @default 'bottom-end' */
|
|
2760
|
+
placement?: "bottom-start" | "bottom-end";
|
|
2761
|
+
"data-testid"?: string;
|
|
2762
|
+
}
|
|
2763
|
+
/**
|
|
2764
|
+
* CwButtonSplit - A primary action joined to a dropdown of alternative actions.
|
|
2765
|
+
*
|
|
2766
|
+
* Composes a main {@link CwButton} with a {@link CwPopoverButton} chevron whose
|
|
2767
|
+
* panel holds a vertical menu of alternatives (rendered as `variant="ghost"` rows).
|
|
2768
|
+
* Both parts share variant, color and size and read as one joined control.
|
|
2769
|
+
*
|
|
2770
|
+
* @example
|
|
2771
|
+
* <CwButtonSplit
|
|
2772
|
+
* text="Save"
|
|
2773
|
+
* icon="save"
|
|
2774
|
+
* onClick={handleSave}
|
|
2775
|
+
* actions={[
|
|
2776
|
+
* { key: "saveAs", label: "Save as…", icon: "copy" },
|
|
2777
|
+
* { key: "saveAndClose", label: "Save and close" },
|
|
2778
|
+
* ]}
|
|
2779
|
+
* onSelect={handleSelect}
|
|
2780
|
+
* />
|
|
2781
|
+
*/
|
|
2782
|
+
declare function CwButtonSplit({ text, icon, onClick, actions, onSelect, variant, color, size, disabled, placement, "data-testid": dataTestId, }: CwButtonSplitProps): React__default.JSX.Element;
|
|
2783
|
+
|
|
2784
|
+
interface CwButtonSwitchOption {
|
|
2785
|
+
/** Value sent to onChange */
|
|
2786
|
+
value: string;
|
|
2787
|
+
/** Text displayed on the segment */
|
|
2788
|
+
label: string;
|
|
2789
|
+
/** Optional cwi icon name */
|
|
2790
|
+
icon?: string;
|
|
2791
|
+
/** Disables this specific segment */
|
|
2792
|
+
disabled?: boolean;
|
|
2793
|
+
}
|
|
2794
|
+
interface CwButtonSwitchProps {
|
|
2795
|
+
/** Options rendered as joined segments */
|
|
2796
|
+
options: CwButtonSwitchOption[];
|
|
2797
|
+
/** Currently selected value */
|
|
2798
|
+
value: string;
|
|
2799
|
+
/** Callback when the selection changes */
|
|
2800
|
+
onChange: (value: string) => void;
|
|
2801
|
+
/** Segment size */
|
|
2802
|
+
size?: "small" | "medium" | "large";
|
|
2803
|
+
/** Shared color theme for every segment */
|
|
2804
|
+
color?: "primary" | "danger" | "neutral";
|
|
2805
|
+
/** Render only each option's icon (label becomes the tooltip + accessible name). Every option must have an `icon`. */
|
|
2806
|
+
iconOnly?: boolean;
|
|
2807
|
+
/**
|
|
2808
|
+
* Orientation of the joined strip: "row" (default, horizontal) or "column" (vertical,
|
|
2809
|
+
* stacked full-width segments). Only orientation is exposed because the segments are joined
|
|
2810
|
+
* (no gap), so gap/align/justify are not meaningful.
|
|
2811
|
+
*/
|
|
2812
|
+
direction?: "row" | "column";
|
|
2813
|
+
/** Disables every segment */
|
|
2814
|
+
disabled?: boolean;
|
|
2815
|
+
/** Accessible name for the radiogroup (there is no visible label on this inline control). */
|
|
2816
|
+
"aria-label"?: string;
|
|
2817
|
+
/** Accessible name for the radiogroup (there is no visible label on this inline control). */
|
|
2818
|
+
"aria-labelledby"?: string;
|
|
2819
|
+
"data-testid"?: string;
|
|
2820
|
+
}
|
|
2821
|
+
/**
|
|
2822
|
+
* CwButtonSwitch - Segmented single-select control: a strip of joined CwButtons.
|
|
2823
|
+
*
|
|
2824
|
+
* The selected segment renders `solid`, the others `outline`, both sharing the `color`
|
|
2825
|
+
* theme (`primary` default, `danger`, or `neutral`). It is a proper ARIA radiogroup with
|
|
2826
|
+
* roving tabindex (one tab stop) and arrow-key navigation, provided by
|
|
2827
|
+
* {@link useRovingSingleSelect}. Use for 2–3 mutually-exclusive options that benefit from
|
|
2828
|
+
* being shown side by side; for a longer list use CwRadioGroup.
|
|
2829
|
+
*
|
|
2830
|
+
* `direction="column"` renders the strip vertically (stacked, full-width segments) instead of
|
|
2831
|
+
* the default horizontal `row`; arrow-key navigation handles both orientations.
|
|
2832
|
+
*
|
|
2833
|
+
* Set `iconOnly` to render just each option's icon; the option's `label` is still required
|
|
2834
|
+
* and is passed as the segment title, so it becomes the tooltip and the accessible name.
|
|
2835
|
+
*
|
|
2836
|
+
* It is an inline control with no form label — if a caption is needed, place it next to the
|
|
2837
|
+
* control at the call site, and pass `aria-label` (or `aria-labelledby`) to name the radiogroup
|
|
2838
|
+
* for screen readers.
|
|
2839
|
+
*
|
|
2840
|
+
* @example
|
|
2841
|
+
* <CwButtonSwitch
|
|
2842
|
+
* options={[{ value: "list", label: "List", icon: "list" }, { value: "grid", label: "Grid", icon: "grid" }]}
|
|
2843
|
+
* value={view}
|
|
2844
|
+
* onChange={setView}
|
|
2845
|
+
* />
|
|
2846
|
+
*/
|
|
2847
|
+
declare function CwButtonSwitch({ options, value, onChange, size, color, iconOnly, direction, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "data-testid": dataTestId, }: CwButtonSwitchProps): React$1.JSX.Element;
|
|
2848
|
+
|
|
2642
2849
|
/**
|
|
2643
2850
|
* Props for legacy icon button wrappers
|
|
2644
2851
|
* @deprecated These wrappers exist for backward compatibility.
|
|
@@ -3697,5 +3904,5 @@ declare class OnClickContextMenu implements UiEvent {
|
|
|
3697
3904
|
constructor(id: string, clickedMenu: string);
|
|
3698
3905
|
}
|
|
3699
3906
|
|
|
3700
|
-
export { CblDragAndDrop$1 as CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnApprove, CwBtnCancel, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateRangePickerTemporal, CwDateTimePicker, CwDateTimePickerCompact, CwDateTimePickerTemporal, CwDialog, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwPopoverButton, CwReportModal, CwScheduler, CwSearchAsync, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSortableTable, CwSuperScheduler, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PRESET_LIBRARY_TEMPORAL, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, cblEvent, eventIsVisible, filterVisibleEvents, getDefaultDivisions, getEventSizes, getPresetsByKeysTemporal, itemsToMultiFilterTags, useCwMessage, useSortableList, useSortableTable, useTooltipConstraint };
|
|
3701
|
-
export type { BackgroundEventDm, CardChip, ChipColorScheme, ChipVariant, Column$1 as Column, ConfirmationPopupProps, CwAlignProps, CwCardListProps, CwCardProps, CwChipProps, CwDialogProps, CwDropdownOption, CwDropdownProps, CwExpandableProps, CwGroupLayoutProps, CwImageAreaMethods, CwImageAreaProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwLayoutProps, CwMasterDetailItem, CwMasterDetailProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNoteProps, CwPopoverButtonProps, CwReportModalFunctionalProps, CwSearchAsyncOption, CwSearchAsyncProps, CwSelectListProps, CwSortableListProps, CwSortableTableProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTagSelectorOption, CwTagSelectorProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangePresetTemporal, DateRangeValue, DateRangeValueTemporal, ICwMultiFilterTag, ImageItem, IndicatorRowDm, MenuOption, OnEvent, PinRowHeaderProps, RowHeaderDm, RowHeaderProps, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, ServerSideTableState, SortableColumn, SortableTableDragState, SuperSchedulerProps, Tab, UseSortableTableReturn, Weekday, ZoomImageItem, cblEventCompProps, resourceCompProps2 };
|
|
3907
|
+
export { CblDragAndDrop$1 as CblDragAndDrop, CwAccordionContainer, CwAlign, CwAnchoredMenu, CwBtnApprove, CwBtnCancel, CwBtnDelete, CwBtnEdit, CwBtnSave, CwButton, CwButtonSplit, CwButtonSwitch, CwCard, CwCardList, CwCheck, CwCheckbox, CwCheckboxGroup, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwDatePicker, CwDatePickerTemporal, CwDateRangePicker, CwDateRangePickerTemporal, CwDateTimePicker, CwDateTimePickerCompact, CwDateTimePickerTemporal, CwDialog, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFindCrewmember, CwGenericTooltip, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMasterDetail, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalHover, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwNote, CwOption, CwPopoverButton, CwRadioGroup, CwReportModal, CwScheduler, CwSearchAsync, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSortableTable, CwSuperScheduler, CwTable, CwTableGrouped, CwTableServerSide, CwTabs, CwTagSelector, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltipManager, CwTooltipNew, CwTreeView, CwWeekdaySelector, DefaultRowHeader, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PRESET_LIBRARY_TEMPORAL, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, TooltipConstraintContext, UiEvent, Weekdays, cblEvent, eventIsVisible, filterVisibleEvents, getDefaultDivisions, getEventSizes, getPresetsByKeysTemporal, itemsToMultiFilterTags, useCwMessage, useSortableList, useSortableTable, useTooltipConstraint };
|
|
3908
|
+
export type { BackgroundEventDm, CardChip, ChipColorScheme, ChipVariant, Column$1 as Column, ConfirmationPopupProps, CwAlignProps, CwButtonSplitAction, CwButtonSplitProps, CwButtonSwitchOption, CwButtonSwitchProps, CwCardListProps, CwCardProps, CwChipProps, CwDialogProps, CwDropdownOption, CwDropdownProps, CwExpandableProps, CwGroupLayoutProps, CwImageAreaMethods, CwImageAreaProps, CwInputDateTextProps, CwInputDatetimeProps, CwInputImageProps, CwInputNumberProps, CwInputPhoneProps, CwInputTextProps, CwInputTimeProps, CwKeyValueListProps, CwLabelProps, CwLayoutProps, CwMasterDetailItem, CwMasterDetailProps, CwMessageProps, CwModalHoverProps, CwMultiFilterProps, CwMultiFilterTagProps, CwNoteProps, CwPopoverButtonProps, CwRadioGroupProps, CwReportModalFunctionalProps, CwSearchAsyncOption, CwSearchAsyncProps, CwSelectListProps, CwSortableListProps, CwSortableTableProps, CwTableGroupedData, CwTableGroupedData_Group, CwTableGroupedData_Row, CwTableGroupedProps, CwTagSelectorOption, CwTagSelectorProps, CwTextAreaProps, CwTreeNode, DataItem, DateRangePresetTemporal, DateRangeValue, DateRangeValueTemporal, ICwMultiFilterTag, ImageItem, IndicatorRowDm, MenuOption, OnEvent, PinRowHeaderProps, RowHeaderDm, RowHeaderProps, SchedulerEventDm, SchedulerEventState, SchedulerRowProps, SchedulerState, ServerSideTableState, SortableColumn, SortableTableDragState, SuperSchedulerProps, Tab, UseSortableTableReturn, Weekday, ZoomImageItem, cblEventCompProps, resourceCompProps2 };
|