@conductor-by-89soone/react 0.2.0 → 0.3.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/action.js
CHANGED
|
@@ -81,7 +81,12 @@ var SelectItem = forwardRef(function SelectItem2({ children, className, indicato
|
|
|
81
81
|
] });
|
|
82
82
|
});
|
|
83
83
|
SelectItem.displayName = "Select.Item";
|
|
84
|
-
|
|
84
|
+
function SelectRoot({ required, ...props }) {
|
|
85
|
+
const field = useContext(FieldContext);
|
|
86
|
+
return /* @__PURE__ */ jsx(RadixSelect.Root, { ...props, required: required ?? field?.required });
|
|
87
|
+
}
|
|
88
|
+
SelectRoot.displayName = "Select.Root";
|
|
89
|
+
var Select = { Root: SelectRoot, Trigger: SelectTrigger, Value: RadixSelect.Value, Content: SelectContent, Item: SelectItem, Group: RadixSelect.Group, Label: RadixSelect.Label };
|
|
85
90
|
var Switch = forwardRef(function Switch2({ className, ...props }, ref) {
|
|
86
91
|
const field = useContext(FieldContext);
|
|
87
92
|
const control = useFieldControl(void 0, props["aria-describedby"]);
|
|
@@ -43,7 +43,17 @@ var Button = forwardRef(function Button2({ blockedReason, className, disabled, i
|
|
|
43
43
|
});
|
|
44
44
|
Button.displayName = "Button";
|
|
45
45
|
var IconButton = forwardRef(function IconButton2({ icon, size, ...props }, ref) {
|
|
46
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
Button,
|
|
48
|
+
{
|
|
49
|
+
...props,
|
|
50
|
+
ref,
|
|
51
|
+
size,
|
|
52
|
+
iconStart: icon,
|
|
53
|
+
className: cx("cdt-btn--icon", props.className),
|
|
54
|
+
children: null
|
|
55
|
+
}
|
|
56
|
+
);
|
|
47
57
|
});
|
|
48
58
|
IconButton.displayName = "IconButton";
|
|
49
59
|
|
package/dist/form.d.ts
CHANGED
|
@@ -33,8 +33,25 @@ type SelectTriggerProps = ComponentPropsWithoutRef<typeof RadixSelect.Trigger> &
|
|
|
33
33
|
type SelectItemProps = ComponentPropsWithoutRef<typeof RadixSelect.Item> & {
|
|
34
34
|
readonly indicator?: ReactNode;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* `Select.Root` that carries Field's `required` into Radix (PR #8 review P1).
|
|
38
|
+
*
|
|
39
|
+
* Radix configures the hidden form control from the **root**, not the trigger. Exporting
|
|
40
|
+
* `RadixSelect.Root` unchanged left `aria-required` on the trigger as the only signal: screen
|
|
41
|
+
* readers announced the state while the owning form still submitted with no selection. The
|
|
42
|
+
* documented `<Field required><Select.Root>…` composition therefore lost the constraint it
|
|
43
|
+
* looked like it was setting.
|
|
44
|
+
*
|
|
45
|
+
* An explicit `required` on the element still wins — the context is a default, not an override,
|
|
46
|
+
* the same shape `Switch` and the other controls already use.
|
|
47
|
+
*/
|
|
48
|
+
type SelectRootProps = ComponentPropsWithoutRef<typeof RadixSelect.Root>;
|
|
49
|
+
declare function SelectRoot({ required, ...props }: SelectRootProps): ReactElement;
|
|
50
|
+
declare namespace SelectRoot {
|
|
51
|
+
var displayName: string;
|
|
52
|
+
}
|
|
36
53
|
declare const Select: {
|
|
37
|
-
readonly Root:
|
|
54
|
+
readonly Root: typeof SelectRoot;
|
|
38
55
|
readonly Trigger: react.ForwardRefExoticComponent<Omit<RadixSelect.SelectTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
39
56
|
readonly size?: "sm" | "md";
|
|
40
57
|
readonly invalid?: boolean;
|
|
@@ -56,4 +73,4 @@ declare const Checkbox: react.ForwardRefExoticComponent<Omit<RadixCheckbox.Check
|
|
|
56
73
|
readonly indicator?: ReactNode;
|
|
57
74
|
} & react.RefAttributes<HTMLButtonElement>>;
|
|
58
75
|
|
|
59
|
-
export { Checkbox, type CheckboxProps, Field, type FieldProps, Select, type SelectItemProps, type SelectTriggerProps, Switch, type SwitchProps, TextArea, type TextAreaProps, TextField, type TextFieldProps };
|
|
76
|
+
export { Checkbox, type CheckboxProps, Field, type FieldProps, Select, type SelectItemProps, type SelectRootProps, type SelectTriggerProps, Switch, type SwitchProps, TextArea, type TextAreaProps, TextField, type TextFieldProps };
|
package/dist/form.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Checkbox, Field, Select, Switch, TextArea, TextField } from './chunk-
|
|
1
|
+
export { Checkbox, Field, Select, Switch, TextArea, TextField } from './chunk-3YDK2JBK.js';
|
|
2
2
|
import './chunk-WEIMKRZV.js';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { Badge, SeverityTag, StatusBadge } from './chunk-535YGQAR.js';
|
|
2
2
|
export { Card, CardGrid, Panel } from './chunk-TUHWL5JC.js';
|
|
3
|
-
export { Button, IconButton } from './chunk-
|
|
3
|
+
export { Button, IconButton } from './chunk-G7TRTZRR.js';
|
|
4
4
|
export { CodeBlock, Kbd, Table, Timeline } from './chunk-RBD5Z2LR.js';
|
|
5
5
|
export { Banner, EmptyState, Meter, ProgressRing, Spinner } from './chunk-NF3ZHADJ.js';
|
|
6
|
-
export { Checkbox, Field, Select, Switch, TextArea, TextField } from './chunk-
|
|
6
|
+
export { Checkbox, Field, Select, Switch, TextArea, TextField } from './chunk-3YDK2JBK.js';
|
|
7
7
|
export { Dialog, Drawer, DropdownMenu, Tooltip } from './chunk-MR7FIZKV.js';
|
|
8
8
|
export { AppShell, NavList, TopBar } from './chunk-R5BLKHR2.js';
|
|
9
9
|
export { cx } from './chunk-WEIMKRZV.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conductor-by-89soone/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Accessible React primitives for Conductor.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://89sooner.github.io/design-system/",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@radix-ui/react-select": "2.2.5",
|
|
35
35
|
"@radix-ui/react-switch": "1.2.5",
|
|
36
36
|
"@radix-ui/react-tooltip": "1.2.12",
|
|
37
|
-
"@conductor-by-89soone/
|
|
38
|
-
"@conductor-by-89soone/
|
|
37
|
+
"@conductor-by-89soone/css": "0.3.0",
|
|
38
|
+
"@conductor-by-89soone/tokens": "0.3.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"lucide-react": ">=0.400.0 <2",
|