@yamada-ui/segmented-control 0.2.3 → 0.2.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.
@@ -0,0 +1,3 @@
1
+ export { SegmentedControl, SegmentedControlButton, SegmentedControlButtonProps, SegmentedControlProps } from './segmented-control.mjs';
2
+ import '@yamada-ui/core';
3
+ import 'react';
@@ -0,0 +1,50 @@
1
+ import * as _yamada_ui_core from '@yamada-ui/core';
2
+ import { HTMLUIProps, ThemeProps } from '@yamada-ui/core';
3
+ import { ChangeEventHandler } from 'react';
4
+
5
+ type SegmentedControlOptions = {
6
+ /**
7
+ * The HTML `name` attribute used for forms.
8
+ */
9
+ name?: string;
10
+ /**
11
+ * The value of the segmented control.
12
+ */
13
+ value?: string;
14
+ /**
15
+ * The initial value of the segmented control.
16
+ */
17
+ defaultValue?: string;
18
+ /**
19
+ * The callback fired when any children radio is checked or unchecked.
20
+ */
21
+ onChange?: (value: string) => void;
22
+ /**
23
+ * If `true`, the segmented control will be readonly.
24
+ *
25
+ * @default false
26
+ */
27
+ isReadOnly?: boolean;
28
+ /**
29
+ * If `true`, the segmented control will be disabled.
30
+ *
31
+ * @default false
32
+ */
33
+ isDisabled?: boolean;
34
+ };
35
+ type SegmentedControlProps = Omit<HTMLUIProps<'div'>, 'onChange'> & ThemeProps<'SegmentedControl'> & SegmentedControlOptions;
36
+ declare const SegmentedControl: _yamada_ui_core.Component<"div", SegmentedControlProps>;
37
+ type SegmentedControlButtonOptions = {
38
+ /**
39
+ * The value of the segmented control button.
40
+ */
41
+ value: string | number;
42
+ /**
43
+ * The callback fired when any children radio is checked or unchecked.
44
+ */
45
+ onChange?: ChangeEventHandler<HTMLInputElement>;
46
+ };
47
+ type SegmentedControlButtonProps = Omit<HTMLUIProps<'label'>, 'onChange'> & Pick<SegmentedControlProps, 'isDisabled' | 'isReadOnly'> & SegmentedControlButtonOptions;
48
+ declare const SegmentedControlButton: _yamada_ui_core.Component<"input", SegmentedControlButtonProps>;
49
+
50
+ export { SegmentedControl, SegmentedControlButton, SegmentedControlButtonProps, SegmentedControlProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/segmented-control",
3
- "version": "0.2.3",
3
+ "version": "0.2.6",
4
4
  "description": "Yamada UI segmented control components",
5
5
  "keywords": [
6
6
  "yamada",
@@ -35,12 +35,12 @@
35
35
  "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@yamada-ui/core": "0.4.2",
39
- "@yamada-ui/utils": "0.1.2",
40
- "@yamada-ui/use-focus-visible": "0.1.2",
41
- "@yamada-ui/use-descendant": "0.1.2",
42
- "@yamada-ui/use-resize-observer": "0.1.2",
43
- "@yamada-ui/use-controllable-state": "0.1.3"
38
+ "@yamada-ui/core": "0.5.0",
39
+ "@yamada-ui/utils": "0.1.3",
40
+ "@yamada-ui/use-focus-visible": "0.1.3",
41
+ "@yamada-ui/use-descendant": "0.1.4",
42
+ "@yamada-ui/use-resize-observer": "0.1.3",
43
+ "@yamada-ui/use-controllable-state": "0.1.4"
44
44
  },
45
45
  "devDependencies": {
46
46
  "react": "^18.0.0",