@ultraviolet/ui 1.88.0 → 1.89.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.
- package/dist/components/Alert/index.cjs +6 -6
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/AvatarV2/index.js +1 -1
- package/dist/components/Badge/index.cjs +4 -5
- package/dist/components/Badge/index.js +0 -1
- package/dist/components/Banner/index.cjs +7 -7
- package/dist/components/Banner/index.js +7 -7
- package/dist/components/Bullet/index.cjs +0 -1
- package/dist/components/Bullet/index.js +0 -1
- package/dist/components/Card/index.cjs +8 -8
- package/dist/components/Checkbox/index.cjs +11 -11
- package/dist/components/CheckboxGroup/index.cjs +12 -12
- package/dist/components/CheckboxGroup/index.js +1 -1
- package/dist/components/Chip/index.cjs +4 -4
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/DateInput/components/CalendarContent.cjs +8 -8
- package/dist/components/DateInput/components/CalendarDaily.cjs +4 -4
- package/dist/components/DateInput/components/CalendarDaily.js +1 -1
- package/dist/components/DateInput/components/CalendarMonthly.cjs +4 -4
- package/dist/components/DateInput/index.cjs +9 -9
- package/dist/components/DateInput/index.js +1 -1
- package/dist/components/Dialog/{subComponents → components}/CancelButton.cjs +3 -2
- package/dist/components/Dialog/{subComponents → components}/CancelButton.d.ts +2 -1
- package/dist/components/Dialog/{subComponents → components}/CancelButton.js +3 -2
- package/dist/components/Dialog/index.cjs +13 -13
- package/dist/components/Dialog/index.d.ts +2 -1
- package/dist/components/Dialog/index.js +7 -7
- package/dist/components/Drawer/index.cjs +9 -9
- package/dist/components/EmptyState/index.cjs +11 -11
- package/dist/components/GlobalAlert/index.cjs +8 -8
- package/dist/components/Label/index.cjs +33 -7
- package/dist/components/Label/index.d.ts +9 -2
- package/dist/components/Label/index.js +31 -7
- package/dist/components/LineChart/CustomLegend.cjs +5 -5
- package/dist/components/LineChart/index.js +1 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/HeaderCell.js +1 -1
- package/dist/components/List/ListContext.cjs +71 -67
- package/dist/components/List/ListContext.d.ts +5 -4
- package/dist/components/List/ListContext.js +72 -68
- package/dist/components/List/Row.cjs +24 -36
- package/dist/components/List/Row.js +19 -31
- package/dist/components/List/index.cjs +19 -4
- package/dist/components/List/index.js +21 -6
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/MenuV2/MenuContent.cjs +4 -4
- package/dist/components/MenuV2/MenuProvider.js +1 -1
- package/dist/components/MenuV2/components/Item.cjs +0 -2
- package/dist/components/MenuV2/components/Item.js +0 -2
- package/dist/components/Notification/index.cjs +6 -10
- package/dist/components/Notification/index.js +8 -12
- package/dist/components/NumberInput/index.cjs +11 -11
- package/dist/components/NumberInputV2/index.cjs +12 -12
- package/dist/components/Pagination/PerPage.cjs +7 -7
- package/dist/components/PieChart/Legends.js +1 -1
- package/dist/components/Popup/index.cjs +21 -9
- package/dist/components/Popup/index.js +22 -10
- package/dist/components/ProgressBar/index.cjs +6 -6
- package/dist/components/Radio/index.cjs +22 -21
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/Radio/index.js +15 -14
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/SelectInput/index.cjs +17 -17
- package/dist/components/SelectInput/index.js +11 -11
- package/dist/components/SelectInputV2/Dropdown.cjs +34 -34
- package/dist/components/SelectInputV2/Dropdown.js +10 -10
- package/dist/components/SelectInputV2/DropdownOption.cjs +11 -11
- package/dist/components/SelectInputV2/SelectBar.cjs +25 -24
- package/dist/components/SelectInputV2/SelectBar.d.ts +25 -1
- package/dist/components/SelectInputV2/SelectBar.js +13 -12
- package/dist/components/SelectInputV2/SelectInputProvider.js +1 -1
- package/dist/components/SelectInputV2/index.cjs +9 -9
- package/dist/components/SelectInputV2/index.d.ts +1 -1
- package/dist/components/SelectInputV2/index.js +3 -3
- package/dist/components/SelectableCard/index.cjs +49 -36
- package/dist/components/SelectableCard/index.js +43 -30
- package/dist/components/SelectableCardGroup/index.js +1 -1
- package/dist/components/SelectableCardOptionGroup/Provider.cjs +24 -0
- package/dist/components/SelectableCardOptionGroup/Provider.d.ts +15 -0
- package/dist/components/SelectableCardOptionGroup/Provider.js +24 -0
- package/dist/components/SelectableCardOptionGroup/components/Image.cjs +39 -0
- package/dist/components/SelectableCardOptionGroup/components/Image.d.ts +9 -0
- package/dist/components/SelectableCardOptionGroup/components/Image.js +37 -0
- package/dist/components/SelectableCardOptionGroup/components/Option.cjs +117 -0
- package/dist/components/SelectableCardOptionGroup/components/Option.d.ts +16 -0
- package/dist/components/SelectableCardOptionGroup/components/Option.js +115 -0
- package/dist/components/SelectableCardOptionGroup/index.cjs +67 -0
- package/dist/components/SelectableCardOptionGroup/index.d.ts +45 -0
- package/dist/components/SelectableCardOptionGroup/index.js +65 -0
- package/dist/components/SelectableCardOptionGroup/types.d.ts +1 -0
- package/dist/components/Slider/components/DoubleSlider.cjs +14 -14
- package/dist/components/Slider/components/DoubleSlider.js +9 -9
- package/dist/components/Slider/components/SingleSlider.cjs +24 -16
- package/dist/components/Slider/components/SingleSlider.js +20 -12
- package/dist/components/Snippet/index.cjs +9 -9
- package/dist/components/Stepper/Step.cjs +6 -6
- package/dist/components/Stepper/StepperProvider.js +1 -1
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/SwitchButton/index.cjs +4 -4
- package/dist/components/Table/HeaderCell.cjs +4 -4
- package/dist/components/Table/HeaderCell.js +1 -1
- package/dist/components/Table/Row.cjs +25 -37
- package/dist/components/Table/Row.js +20 -32
- package/dist/components/Table/TableContext.js +1 -1
- package/dist/components/Table/index.cjs +20 -4
- package/dist/components/Table/index.d.ts +6 -5
- package/dist/components/Table/index.js +22 -6
- package/dist/components/Tabs/Tab.cjs +4 -4
- package/dist/components/Tag/index.cjs +10 -10
- package/dist/components/Text/index.cjs +4 -3
- package/dist/components/Text/index.d.ts +2 -1
- package/dist/components/Text/index.js +4 -3
- package/dist/components/TextInput/index.cjs +14 -14
- package/dist/components/TimeInputV2/index.cjs +7 -7
- package/dist/components/TimeInputV2/index.js +2 -2
- package/dist/components/Toaster/index.cjs +10 -14
- package/dist/components/Toaster/index.js +7 -11
- package/dist/components/ToggleGroup/index.js +1 -1
- package/dist/components/UnitInput/index.cjs +6 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +61 -59
- package/dist/index.js +2 -0
- package/dist/types.d.ts +6 -0
- package/package.json +5 -5
- package/dist/components/Notification/react-toastify.css.cjs +0 -3
- package/dist/components/Notification/react-toastify.css.js +0 -4
- package/dist/components/Slider/components/Label.cjs +0 -17
- package/dist/components/Slider/components/Label.d.ts +0 -2
- package/dist/components/Slider/components/Label.js +0 -17
- package/dist/components/Toaster/react-toastify.css.cjs +0 -3
- package/dist/components/Toaster/react-toastify.css.js +0 -4
- /package/dist/components/Dialog/{subComponents → components}/Button.cjs +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Button.d.ts +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Button.js +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Buttons.cjs +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Buttons.d.ts +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Buttons.js +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Stack.cjs +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Stack.d.ts +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Stack.js +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Text.cjs +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Text.d.ts +0 -0
- /package/dist/components/Dialog/{subComponents → components}/Text.js +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComponentProps, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { Label } from '../Label';
|
|
3
|
+
import { Option } from './components/Option';
|
|
4
|
+
import type { Sizes } from './types';
|
|
5
|
+
type SelectableCardOptionGroupProps = {
|
|
6
|
+
legend?: string;
|
|
7
|
+
legendDescription?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
columns?: number;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
helper?: ReactNode;
|
|
13
|
+
error?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The value that is selected among selectable card options.
|
|
16
|
+
*/
|
|
17
|
+
value?: ComponentProps<typeof Option>['value'];
|
|
18
|
+
/**
|
|
19
|
+
* The value that is selected among select input options.
|
|
20
|
+
*/
|
|
21
|
+
optionValue?: ComponentProps<typeof Option>['optionValue'];
|
|
22
|
+
onChangeOption: (value: string) => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
size?: Sizes;
|
|
25
|
+
} & Required<Pick<InputHTMLAttributes<HTMLInputElement>, 'onChange'>> & Pick<InputHTMLAttributes<HTMLInputElement>, 'name'>;
|
|
26
|
+
/**
|
|
27
|
+
* SelectableCardOptionGroup gives you a group of SelectInput within a SelectableCard component.
|
|
28
|
+
* It's an input that provide the choice of one value and sub options to choose from.
|
|
29
|
+
*
|
|
30
|
+
* **Be aware that once you click on the component, the first value of options will be selected by default.**
|
|
31
|
+
*/
|
|
32
|
+
export declare const SelectableCardOptionGroup: {
|
|
33
|
+
({ legend, legendDescription, className, required, columns, children, helper, error, onChange, value, optionValue, onChangeOption, name, disabled, size, }: SelectableCardOptionGroupProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
34
|
+
Option: ({ value, label, labelDescription, "aria-label": ariaLabel, children, className, options, image, disabled, id, }: Omit<import("../SelectableCard").SelectableCardProps & import("react").RefAttributes<HTMLDivElement>, "onChange"> & {
|
|
35
|
+
value: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
options: ComponentProps<typeof import("..").SelectInputV2>["options"];
|
|
39
|
+
optionValue?: ComponentProps<typeof import("..").SelectInputV2>["value"];
|
|
40
|
+
image?: ReactNode;
|
|
41
|
+
labelDescription?: ComponentProps<typeof Label>["labelDescription"];
|
|
42
|
+
id?: string;
|
|
43
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import _styled from "@emotion/styled/base";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { Label } from "../Label/index.js";
|
|
5
|
+
import { Row } from "../Row/index.js";
|
|
6
|
+
import { Stack } from "../Stack/index.js";
|
|
7
|
+
import { Text } from "../Text/index.js";
|
|
8
|
+
import { SelectableCardOptionGroupContext } from "./Provider.js";
|
|
9
|
+
import { Option } from "./components/Option.js";
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() {
|
|
11
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
12
|
+
}
|
|
13
|
+
const FieldSet = /* @__PURE__ */ _styled("fieldset", process.env.NODE_ENV === "production" ? {
|
|
14
|
+
target: "eomr2n30"
|
|
15
|
+
} : {
|
|
16
|
+
target: "eomr2n30",
|
|
17
|
+
label: "FieldSet"
|
|
18
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "7o2an9",
|
|
20
|
+
styles: "border:none;padding:0;margin:0"
|
|
21
|
+
} : {
|
|
22
|
+
name: "7o2an9",
|
|
23
|
+
styles: "border:none;padding:0;margin:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3VsdHJhdmlvbGV0L3VsdHJhdmlvbGV0L3BhY2thZ2VzL3VpL3NyYy9jb21wb25lbnRzL1NlbGVjdGFibGVDYXJkT3B0aW9uR3JvdXAvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVdnQyIsImZpbGUiOiIvaG9tZS9ydW5uZXIvd29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3RhY2sgZ2FwPXsxfT5cbiAgICAgICAgPEZpZWxkU2V0IGNsYXNzTmFtZT17Y2xhc3NOYW1lfT5cbiAgICAgICAgICA8U3RhY2sgZ2FwPXsxLjV9PlxuICAgICAgICAgICAge2xlZ2VuZCA/IChcbiAgICAgICAgICAgICAgPExhYmVsXG4gICAgICAgICAgICAgICAgYXM9XCJsZWdlbmRcIlxuICAgICAgICAgICAgICAgIHJlcXVpcmVkPXtyZXF1aXJlZH1cbiAgICAgICAgICAgICAgICBsYWJlbERlc2NyaXB0aW9uPXtsZWdlbmREZXNjcmlwdGlvbn1cbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHtsZWdlbmR9XG4gICAgICAgICAgICAgIDwvTGFiZWw+XG4gICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgIDxSb3cgZ2FwPXsyfSB0ZW1wbGF0ZUNvbHVtbnM9e2ByZXBlYXQoJHtjb2x1bW5zfSwgbWlubWF4KDAsIDFmcikpYH0+XG4gICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgIDwvUm93PlxuICAgICAgICAgIDwvU3RhY2s+XG4gICAgICAgIDwvRmllbGRTZXQ+XG4gICAgICAgIHsoZXJyb3IgJiYgdHlwZW9mIGVycm9yID09PSAnc3RyaW5nJykgfHwgaGVscGVyID8gKFxuICAgICAgICAgIDxUZXh0XG4gICAgICAgICAgICBhcz1cInNwYW5cIlxuICAgICAgICAgICAgdmFyaWFudD1cImNhcHRpb25cIlxuICAgICAgICAgICAgcHJvbWluZW5jZT1cIndlYWtcIlxuICAgICAgICAgICAgc2VudGltZW50PXtlcnJvciA/ICdkYW5nZXInIDogJ25ldXRyYWwnfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtoZWxwZXIgfHwgZXJyb3J9XG4gICAgICAgICAgPC9UZXh0PlxuICAgICAgICApIDogbnVsbH1cbiAgICAgIDwvU3RhY2s+XG4gICAgPC9TZWxlY3RhYmxlQ2FyZE9wdGlvbkdyb3VwQ29udGV4dC5Qcm92aWRlcj5cbiAgKVxufVxuXG5TZWxlY3RhYmxlQ2FyZE9wdGlvbkdyb3VwLk9wdGlvbiA9IE9wdGlvblxuIl19 */",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
});
|
|
26
|
+
const SelectableCardOptionGroup = ({
|
|
27
|
+
legend,
|
|
28
|
+
legendDescription,
|
|
29
|
+
className,
|
|
30
|
+
required,
|
|
31
|
+
columns = 3,
|
|
32
|
+
children,
|
|
33
|
+
helper,
|
|
34
|
+
error,
|
|
35
|
+
onChange,
|
|
36
|
+
value,
|
|
37
|
+
optionValue,
|
|
38
|
+
onChangeOption,
|
|
39
|
+
name,
|
|
40
|
+
disabled,
|
|
41
|
+
size = "large"
|
|
42
|
+
}) => {
|
|
43
|
+
const contextValue = useMemo(() => ({
|
|
44
|
+
groupName: name,
|
|
45
|
+
groupValue: value,
|
|
46
|
+
onChange,
|
|
47
|
+
onChangeOption,
|
|
48
|
+
optionValue,
|
|
49
|
+
required,
|
|
50
|
+
disabled,
|
|
51
|
+
error: !!error,
|
|
52
|
+
size
|
|
53
|
+
}), [disabled, error, name, onChange, onChangeOption, optionValue, required, value, size]);
|
|
54
|
+
return /* @__PURE__ */ jsx(SelectableCardOptionGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(Stack, { gap: 1, children: [
|
|
55
|
+
/* @__PURE__ */ jsx(FieldSet, { className, children: /* @__PURE__ */ jsxs(Stack, { gap: 1.5, children: [
|
|
56
|
+
legend ? /* @__PURE__ */ jsx(Label, { as: "legend", required, labelDescription: legendDescription, children: legend }) : null,
|
|
57
|
+
/* @__PURE__ */ jsx(Row, { gap: 2, templateColumns: `repeat(${columns}, minmax(0, 1fr))`, children })
|
|
58
|
+
] }) }),
|
|
59
|
+
error && typeof error === "string" || helper ? /* @__PURE__ */ jsx(Text, { as: "span", variant: "caption", prominence: "weak", sentiment: error ? "danger" : "neutral", children: helper || error }) : null
|
|
60
|
+
] }) });
|
|
61
|
+
};
|
|
62
|
+
SelectableCardOptionGroup.Option = Option;
|
|
63
|
+
export {
|
|
64
|
+
SelectableCardOptionGroup
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Sizes = 'large' | 'medium';
|