@lynx-js/lynx-ui-checkbox 3.130.0 → 3.133.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @lynx-js/lynx-ui-checkbox
2
2
 
3
+ ## 3.133.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`85d2e9d`](https://github.com/lynx-family/lynx-ui/commit/85d2e9d12e9aeee3256856f1be0076524ddb7d8a)]:
8
+ - @lynx-js/lynx-ui-common@3.133.0
9
+ - @lynx-js/lynx-ui-button@3.133.0
10
+
11
+ ## 3.131.0
12
+
13
+ ### Patch Changes
14
+
15
+ - Fix checkbox docs typo in the `checkboxProps` description. ([#126](https://github.com/lynx-family/lynx-ui/pull/126))
16
+
17
+ - Updated dependencies [[`bc167c5`](https://github.com/lynx-family/lynx-ui/commit/bc167c5d03cdb344156e897c4d2d69f95bf7d29b)]:
18
+ - @lynx-js/lynx-ui-common@3.131.0
19
+ - @lynx-js/lynx-ui-button@3.131.0
20
+
3
21
  ## 3.130.0
4
22
 
5
23
  ### Patch Changes
@@ -41,7 +41,7 @@ export interface CheckboxProps extends ComponentBasicProps {
41
41
  */
42
42
  onChange?: (checked: boolean) => void;
43
43
  /**
44
- * Radio supports original view props to be directly spread in this prop.
44
+ * Checkbox supports original view props to be directly spread in this prop.
45
45
  * @Android
46
46
  * @iOS
47
47
  * @zh Checkbox 支持将原始视图属性直接展开到这个属性中。
@@ -78,4 +78,57 @@ export interface CheckboxIndicatorProps extends ComponentBasicProps {
78
78
  */
79
79
  forceMount?: boolean;
80
80
  }
81
+ /**
82
+ * The interactive status passed to Checkbox's render-prop children.
83
+ * @zh 传入 Checkbox render-prop children 的交互状态。
84
+ */
85
+ export interface CheckboxRenderProps {
86
+ /**
87
+ * Whether the checkbox is currently checked.
88
+ * @zh 复选框当前是否处于选中态。
89
+ */
90
+ checked?: boolean;
91
+ /**
92
+ * Whether the checkbox is in an indeterminate state.
93
+ * @zh 复选框是否处于不确定态。
94
+ */
95
+ indeterminate?: boolean;
96
+ /**
97
+ * Whether the checkbox is currently being pressed (and not disabled).
98
+ * @zh 复选框当前是否处于按下态(且未被禁用)。
99
+ */
100
+ active?: boolean;
101
+ /**
102
+ * Whether the checkbox is disabled.
103
+ * @zh 复选框是否处于禁用态。
104
+ */
105
+ disabled?: boolean;
106
+ }
107
+ /**
108
+ * UI variants applied by Checkbox based on its interactive status.
109
+ * Use them as CSS selectors to style different states.
110
+ * @zh Checkbox 根据交互状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
111
+ */
112
+ export interface CheckboxUiVariants {
113
+ /**
114
+ * Applied when `status.checked` is true.
115
+ * @zh 当 status.checked 为 true 时生效,可用于 `.ui-checked { ... }`。
116
+ */
117
+ 'ui-checked'?: boolean;
118
+ /**
119
+ * Applied when `status.indeterminate` is true.
120
+ * @zh 当 status.indeterminate 为 true 时生效,可用于 `.ui-indeterminate { ... }`。
121
+ */
122
+ 'ui-indeterminate'?: boolean;
123
+ /**
124
+ * Applied when `status.active` is true.
125
+ * @zh 当 status.active 为 true 时生效,可用于 `.ui-active { ... }`。
126
+ */
127
+ 'ui-active'?: boolean;
128
+ /**
129
+ * Applied when `status.disabled` is true.
130
+ * @zh 当 status.disabled 为 true 时生效,可用于 `.ui-disabled { ... }`。
131
+ */
132
+ 'ui-disabled'?: boolean;
133
+ }
81
134
  //# sourceMappingURL=index.docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.docs.d.ts","sourceRoot":"","sources":["../../src/types/index.docs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACx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B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB;;;;;;OAMG;IACH,QAAQ,CAAC,EACL,SAAS,GACT,CAAC,CACD,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAA;QAChB,aAAa,EAAE,OAAO,CAAA;QACtB,MAAM,EAAE,OAAO,CAAA;QACf,QAAQ,EAAE,OAAO,CAAA;KAClB,KACE,SAAS,CAAC,CAAA;CAClB;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/lynx-ui-checkbox",
3
- "version": "3.130.0",
3
+ "version": "3.133.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lynx-family/lynx-ui.git",
@@ -26,11 +26,11 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "clsx": "^2.1.1",
29
- "@lynx-js/lynx-ui-button": "3.130.0",
30
- "@lynx-js/lynx-ui-common": "3.130.0"
29
+ "@lynx-js/lynx-ui-button": "3.133.0",
30
+ "@lynx-js/lynx-ui-common": "3.133.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@lynx-js/react": "0.113.0",
33
+ "@lynx-js/react": "0.114.0",
34
34
  "@lynx-js/types": "3.6.0",
35
35
  "@rslib/core": "^0.16.0",
36
36
  "@types/react": "^18.3.8",
@@ -47,7 +47,7 @@ export interface CheckboxProps extends ComponentBasicProps {
47
47
  */
48
48
  onChange?: (checked: boolean) => void
49
49
  /**
50
- * Radio supports original view props to be directly spread in this prop.
50
+ * Checkbox supports original view props to be directly spread in this prop.
51
51
  * @Android
52
52
  * @iOS
53
53
  * @zh Checkbox 支持将原始视图属性直接展开到这个属性中。
@@ -89,3 +89,64 @@ export interface CheckboxIndicatorProps extends ComponentBasicProps {
89
89
  */
90
90
  forceMount?: boolean
91
91
  }
92
+
93
+ /**
94
+ * The interactive status passed to Checkbox's render-prop children.
95
+ * @zh 传入 Checkbox render-prop children 的交互状态。
96
+ */
97
+ export interface CheckboxRenderProps {
98
+ /**
99
+ * Whether the checkbox is currently checked.
100
+ * @zh 复选框当前是否处于选中态。
101
+ */
102
+ checked?: boolean
103
+
104
+ /**
105
+ * Whether the checkbox is in an indeterminate state.
106
+ * @zh 复选框是否处于不确定态。
107
+ */
108
+ indeterminate?: boolean
109
+
110
+ /**
111
+ * Whether the checkbox is currently being pressed (and not disabled).
112
+ * @zh 复选框当前是否处于按下态(且未被禁用)。
113
+ */
114
+ active?: boolean
115
+
116
+ /**
117
+ * Whether the checkbox is disabled.
118
+ * @zh 复选框是否处于禁用态。
119
+ */
120
+ disabled?: boolean
121
+ }
122
+
123
+ /**
124
+ * UI variants applied by Checkbox based on its interactive status.
125
+ * Use them as CSS selectors to style different states.
126
+ * @zh Checkbox 根据交互状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
127
+ */
128
+ export interface CheckboxUiVariants {
129
+ /**
130
+ * Applied when `status.checked` is true.
131
+ * @zh 当 status.checked 为 true 时生效,可用于 `.ui-checked { ... }`。
132
+ */
133
+ 'ui-checked'?: boolean
134
+
135
+ /**
136
+ * Applied when `status.indeterminate` is true.
137
+ * @zh 当 status.indeterminate 为 true 时生效,可用于 `.ui-indeterminate { ... }`。
138
+ */
139
+ 'ui-indeterminate'?: boolean
140
+
141
+ /**
142
+ * Applied when `status.active` is true.
143
+ * @zh 当 status.active 为 true 时生效,可用于 `.ui-active { ... }`。
144
+ */
145
+ 'ui-active'?: boolean
146
+
147
+ /**
148
+ * Applied when `status.disabled` is true.
149
+ * @zh 当 status.disabled 为 true 时生效,可用于 `.ui-disabled { ... }`。
150
+ */
151
+ 'ui-disabled'?: boolean
152
+ }