@lynx-js/lynx-ui-switch 3.136.0 → 3.139.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 +16 -0
- package/dist/index.d.ts +2 -2
- package/dist/switch.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.docs.d.ts +5 -1
- package/dist/types/index.docs.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/types/index.docs.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @lynx-js/lynx-ui-switch
|
|
2
2
|
|
|
3
|
+
## 3.139.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`1a4ad19`](https://github.com/lynx-family/lynx-ui/commit/1a4ad190993d57425b4c377a7dd63882cc65a8d2)]:
|
|
8
|
+
- @lynx-js/lynx-ui-common@3.139.0
|
|
9
|
+
|
|
10
|
+
## 3.137.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Emit declaration imports with explicit ESM-compatible paths. ([#280](https://github.com/lynx-family/lynx-ui/pull/280))
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`064ea4e`](https://github.com/lynx-family/lynx-ui/commit/064ea4e49cd3d0ac5754519cbee43d8ab3040024)]:
|
|
17
|
+
- @lynx-js/lynx-ui-common@3.137.0
|
|
18
|
+
|
|
3
19
|
## 3.136.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Switch, SwitchThumb, SwitchTrack } from './switch';
|
|
2
|
-
export type { SwitchProps, SwitchThumbProps, SwitchTrackProps, SwitchRenderProps, } from './types';
|
|
1
|
+
export { Switch, SwitchThumb, SwitchTrack } from './switch.js';
|
|
2
|
+
export type { SwitchProps, SwitchThumbProps, SwitchTrackProps, SwitchRenderProps, } from './types/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/switch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from '@lynx-js/react';
|
|
2
|
-
import type { SwitchProps, SwitchThumbProps, SwitchTrackProps } from './types';
|
|
2
|
+
import type { SwitchProps, SwitchThumbProps, SwitchTrackProps } from './types/index.js';
|
|
3
3
|
declare function Switch({ style, className, children, onChange, checked: checkedProp, defaultChecked, disabled, switchProps, }: SwitchProps): ReactNode;
|
|
4
4
|
declare function SwitchThumb(props: SwitchThumbProps): ReactNode;
|
|
5
5
|
declare function SwitchTrack(props: SwitchTrackProps): ReactNode;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from './index.docs';
|
|
1
|
+
export type * from './index.docs.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -85,7 +85,7 @@ export interface SwitchRenderProps {
|
|
|
85
85
|
* Use them as CSS selectors to style different states.
|
|
86
86
|
* @zh Switch 根据状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
|
|
87
87
|
*/
|
|
88
|
-
export interface
|
|
88
|
+
export interface SwitchUIVariants {
|
|
89
89
|
/**
|
|
90
90
|
* Applied when `status.active` is true.
|
|
91
91
|
* @zh 当 status.active 为 true 时生效,可用于 `.ui-active { ... }`。
|
|
@@ -102,6 +102,10 @@ export interface SwitchUiVariants {
|
|
|
102
102
|
*/
|
|
103
103
|
'ui-disabled'?: boolean;
|
|
104
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Use `SwitchUIVariants` instead.
|
|
107
|
+
*/
|
|
108
|
+
export type SwitchUiVariants = SwitchUIVariants;
|
|
105
109
|
/**
|
|
106
110
|
* The thumb of the Switch.
|
|
107
111
|
* The draggable/clickable handle that toggles the state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.docs.d.ts","sourceR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;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/lynx-ui-switch",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.139.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/lynx-family/lynx-ui.git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@lynx-js/react-use": "0.2.2",
|
|
29
29
|
"clsx": "^2.1.1",
|
|
30
|
-
"@lynx-js/lynx-ui-common": "3.
|
|
30
|
+
"@lynx-js/lynx-ui-common": "3.139.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@lynx-js/react": "0.123.1",
|
package/src/types/index.docs.ts
CHANGED
|
@@ -103,7 +103,7 @@ export interface SwitchRenderProps {
|
|
|
103
103
|
* Use them as CSS selectors to style different states.
|
|
104
104
|
* @zh Switch 根据状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
|
|
105
105
|
*/
|
|
106
|
-
export interface
|
|
106
|
+
export interface SwitchUIVariants {
|
|
107
107
|
/**
|
|
108
108
|
* Applied when `status.active` is true.
|
|
109
109
|
* @zh 当 status.active 为 true 时生效,可用于 `.ui-active { ... }`。
|
|
@@ -123,6 +123,11 @@ export interface SwitchUiVariants {
|
|
|
123
123
|
'ui-disabled'?: boolean
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Use `SwitchUIVariants` instead.
|
|
128
|
+
*/
|
|
129
|
+
export type SwitchUiVariants = SwitchUIVariants
|
|
130
|
+
|
|
126
131
|
/**
|
|
127
132
|
* The thumb of the Switch.
|
|
128
133
|
* The draggable/clickable handle that toggles the state.
|