plainframe-ui 0.1.5 → 0.1.6
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.d.ts +1 -5
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1060,7 +1060,6 @@ declare const Rotate: React.FC<RotateProps>;
|
|
|
1060
1060
|
type Align$1 = "left" | "center" | "right";
|
|
1061
1061
|
type Variant$4 = "subtle" | "outlined" | "ghost";
|
|
1062
1062
|
type SelectProps<T = unknown> = {
|
|
1063
|
-
/** optional controlled value(s); if omitted, trigger text is derived from child selection props */
|
|
1064
1063
|
value?: T | T[];
|
|
1065
1064
|
defaultValue?: T | T[];
|
|
1066
1065
|
onChange?: (value: T | T[]) => void;
|
|
@@ -1080,15 +1079,12 @@ type SelectProps<T = unknown> = {
|
|
|
1080
1079
|
labelCss?: Interpolation<Theme>;
|
|
1081
1080
|
triggerCss?: Interpolation<Theme>;
|
|
1082
1081
|
menuCss?: Interpolation<Theme>;
|
|
1083
|
-
/** you pass real MenuItem / MenuRadioItem / MenuCheckboxItem (and optional MenuRadioGroup) here */
|
|
1084
1082
|
children: React.ReactNode;
|
|
1085
1083
|
className?: string;
|
|
1086
1084
|
menuSize?: "sm" | "md";
|
|
1087
|
-
/** custom trigger renderer (receives the resolved label text or array of labels) */
|
|
1088
1085
|
triggerRender?: (selected: string | string[] | undefined) => React.ReactNode;
|
|
1089
1086
|
};
|
|
1090
|
-
declare function Select<T = unknown>({ value, defaultValue, onChange,
|
|
1091
|
-
label, placeholder, startIcon, endIcon, disabled, size, variant, fullWidth, width, menuAlign, menuWidth, menuMaxHeight, wrapperCss, labelCss, triggerCss, menuCss, children, className, menuSize, triggerRender, }: SelectProps<T>): JSX.Element;
|
|
1087
|
+
declare function Select<T = unknown>({ value, defaultValue, onChange, label, placeholder, startIcon, endIcon, disabled, size, variant, fullWidth, width, menuAlign, menuWidth, menuMaxHeight, wrapperCss, labelCss, triggerCss, menuCss, children, className, menuSize, triggerRender, }: SelectProps<T>): JSX.Element;
|
|
1092
1088
|
|
|
1093
1089
|
/** @jsxImportSource @emotion/react */
|
|
1094
1090
|
|
package/dist/index.js
CHANGED
|
@@ -5958,9 +5958,8 @@ var Button = React20.memo(React20.forwardRef(({
|
|
|
5958
5958
|
}, ref) => {
|
|
5959
5959
|
const theme = usePlainframeUITheme();
|
|
5960
5960
|
const focusRing = useFocusRing();
|
|
5961
|
-
const normalizedVariant = variant === "ghost-destructive" ? "ghost-destructive" : variant;
|
|
5962
5961
|
const S = useMemo10(() => getSize3(theme, size), [theme, size]);
|
|
5963
|
-
const vis = useMemo10(() => resolveVisuals(theme,
|
|
5962
|
+
const vis = useMemo10(() => resolveVisuals(theme, variant), [theme, variant]);
|
|
5964
5963
|
const isIconOnly = useMemo10(
|
|
5965
5964
|
() => !startIcon && !endIcon && !hasText(children) && React20.Children.count(children) === 1,
|
|
5966
5965
|
[startIcon, endIcon, children]
|
|
@@ -6144,7 +6143,7 @@ var Button = React20.memo(React20.forwardRef(({
|
|
|
6144
6143
|
{
|
|
6145
6144
|
ref,
|
|
6146
6145
|
type: "type" in props && props.type ? props.type : "button",
|
|
6147
|
-
"data-variant":
|
|
6146
|
+
"data-variant": variant,
|
|
6148
6147
|
className: ["plainframe-ui-button", className || ""].join(" ").trim(),
|
|
6149
6148
|
css: [
|
|
6150
6149
|
rootBase,
|
|
@@ -9777,12 +9776,10 @@ var RadioItem = ({
|
|
|
9777
9776
|
fontSize: theme.fontSizes.md,
|
|
9778
9777
|
fontWeight: 500,
|
|
9779
9778
|
padding: theme.spacing.sm,
|
|
9780
|
-
// Hover applies to the CIRCLE only if NOT checked
|
|
9781
9779
|
"&:hover .plainframe-ui-radio-circle-outer": isDisabled || isChecked ? {} : {
|
|
9782
9780
|
background: hoverCircleBg,
|
|
9783
9781
|
boxShadow: variant === "outlined" ? `inset 0 0 0 ${theme.componentHeights.border} ${stroke}` : "none"
|
|
9784
9782
|
},
|
|
9785
|
-
// Focus ring hint on circle
|
|
9786
9783
|
"&:focus-visible .plainframe-ui-radio-circle-outer": {
|
|
9787
9784
|
outline: "none",
|
|
9788
9785
|
filter: "brightness(1.06)"
|
|
@@ -10010,7 +10007,6 @@ function Select({
|
|
|
10010
10007
|
value,
|
|
10011
10008
|
defaultValue,
|
|
10012
10009
|
onChange,
|
|
10013
|
-
// not wired here; your Menu components should manage selection & call you
|
|
10014
10010
|
label,
|
|
10015
10011
|
placeholder = "Select\u2026",
|
|
10016
10012
|
startIcon,
|