@hanwenbo/x-taro-ui 0.0.1 → 0.0.3
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/es/adapters/miniapp/overlayHost.js +14 -8
- package/es/auth/components.d.ts +17 -15
- package/es/auth/components.js +253 -133
- package/es/auth/entries/locales.d.ts +2 -0
- package/es/auth/entries/locales.js +1 -0
- package/es/auth/index.d.ts +1 -0
- package/es/auth/index.js +2 -1
- package/es/auth/internal.d.ts +17 -11
- package/es/auth/internal.js +107 -42
- package/es/auth/phoneNumberInput.d.ts +4 -2
- package/es/auth/phoneNumberInput.js +27 -8
- package/es/auth/provider.d.ts +2 -2
- package/es/auth/styles.css +161 -99
- package/es/auth/theme.js +20 -4
- package/es/components/_shared/render.d.ts +1 -1
- package/es/components/button/button.js +23 -3
- package/es/components/button/types.d.ts +6 -0
- package/es/components/capsuleTabs/capsuleTabs.js +4 -0
- package/es/components/icon/lucide.generated.d.ts +10 -0
- package/es/components/icon/lucide.generated.js +10 -0
- package/es/components/inputItem/inputItem.js +5 -2
- package/es/components/list/list.d.ts +1 -1
- package/es/components/pagination/pagination.js +18 -5
- package/es/components/searchBar/searchBar.js +4 -0
- package/es/components/sectionList/sectionList.d.ts +1 -2
- package/es/components/segmented/segmented.js +10 -2
- package/es/components/touchableOpacity/touchableOpacity.js +1 -0
- package/es/taro-components.d.ts +6 -0
- package/lib/adapters/miniapp/overlayHost.js +13 -6
- package/lib/auth/components.d.ts +17 -15
- package/lib/auth/components.js +257 -125
- package/lib/auth/entries/locales.d.ts +2 -0
- package/lib/auth/entries/locales.js +33 -0
- package/lib/auth/index.d.ts +1 -0
- package/lib/auth/index.js +13 -0
- package/lib/auth/internal.d.ts +17 -11
- package/lib/auth/internal.js +76 -31
- package/lib/auth/phoneNumberInput.d.ts +4 -2
- package/lib/auth/phoneNumberInput.js +65 -45
- package/lib/auth/provider.d.ts +2 -2
- package/lib/auth/styles.css +161 -99
- package/lib/auth/theme.js +7 -4
- package/lib/components/_shared/render.d.ts +1 -1
- package/lib/components/button/button.js +7 -0
- package/lib/components/button/types.d.ts +6 -0
- package/lib/components/capsuleTabs/capsuleTabs.js +1 -0
- package/lib/components/icon/lucide.generated.d.ts +10 -0
- package/lib/components/icon/lucide.generated.js +24 -0
- package/lib/components/inputItem/inputItem.js +3 -0
- package/lib/components/list/list.d.ts +1 -1
- package/lib/components/pagination/pagination.js +19 -5
- package/lib/components/searchBar/searchBar.js +4 -0
- package/lib/components/sectionList/sectionList.d.ts +1 -2
- package/lib/components/segmented/segmented.js +6 -1
- package/lib/components/touchableOpacity/touchableOpacity.js +1 -0
- package/lib/taro-components.d.ts +6 -0
- package/package.json +4 -4
|
@@ -233,6 +233,10 @@ var SearchBar = import_react.default.forwardRef((props, ref) => {
|
|
|
233
233
|
width: "100%",
|
|
234
234
|
flex: 1,
|
|
235
235
|
height: "100%",
|
|
236
|
+
// H5 renders a Taro host around the shorter native input. Center that
|
|
237
|
+
// input inside the full-height host, as well as centering the host itself.
|
|
238
|
+
display: "flex",
|
|
239
|
+
alignItems: "center",
|
|
236
240
|
boxSizing: "border-box",
|
|
237
241
|
padding: 0,
|
|
238
242
|
margin: 0,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { SectionListProps } from './types';
|
|
3
|
-
declare function SectionList<T>({ sections, renderItem, renderSectionHeader, renderSectionFooter, keyExtractor, sectionKeyExtractor, stickySectionHeadersEnabled, extraData, initialNumToRender, inverted, ItemSeparatorComponent, SectionSeparatorComponent, ListEmptyComponent, ListHeaderComponent, ListFooterComponent, testID, activeSectionKey, defaultActiveSectionKey, collapsedSectionKeys, defaultCollapsedSectionKeys, size, variant, collapsible, accordion, divider, emptyText, onSectionChange, onCollapsedSectionKeysChange, children, className, style }: SectionListProps<T>):
|
|
2
|
+
declare function SectionList<T>({ sections, renderItem, renderSectionHeader, renderSectionFooter, keyExtractor, sectionKeyExtractor, stickySectionHeadersEnabled, extraData, initialNumToRender, inverted, ItemSeparatorComponent, SectionSeparatorComponent, ListEmptyComponent, ListHeaderComponent, ListFooterComponent, testID, activeSectionKey, defaultActiveSectionKey, collapsedSectionKeys, defaultCollapsedSectionKeys, size, variant, collapsible, accordion, divider, emptyText, onSectionChange, onCollapsedSectionKeysChange, children, className, style }: SectionListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace SectionList {
|
|
5
4
|
var displayName: string;
|
|
6
5
|
}
|
|
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(segmented_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_components = require("@tarojs/components");
|
|
37
37
|
var import_patterns = require("../../patterns");
|
|
38
|
+
var import_measure = require("../../adapters/miniapp/measure");
|
|
38
39
|
var import_theme = require("../../theme");
|
|
39
40
|
var import_utils = require("../../utils");
|
|
40
41
|
var import_inlineAlignment = require("../../utils/inlineAlignment");
|
|
@@ -217,12 +218,16 @@ var Segmented = ({
|
|
|
217
218
|
const currentValue = value !== void 0 ? value : innerValue;
|
|
218
219
|
const metrics = import_theme.segmentedSizeMetrics[size];
|
|
219
220
|
const currentKey = currentValue === void 0 ? null : String(currentValue);
|
|
220
|
-
const { containerId, itemId, indicatorStyle, indicatorReady, indicatorMotionReady } = (0, import_useTaroSelectionIndicator.useTaroSelectionIndicator)({
|
|
221
|
+
const { containerId, itemId, indicatorStyle, indicatorReady, indicatorMotionReady, remeasure } = (0, import_useTaroSelectionIndicator.useTaroSelectionIndicator)({
|
|
221
222
|
activeKey: currentKey,
|
|
222
223
|
enabled: motion && currentKey !== null,
|
|
223
224
|
inset: metrics.thumbInset,
|
|
224
225
|
mode: "static"
|
|
225
226
|
});
|
|
227
|
+
(0, import_react.useEffect)(() => {
|
|
228
|
+
if (!motion) return;
|
|
229
|
+
return (0, import_measure.subscribeViewportChange)(() => void remeasure());
|
|
230
|
+
}, [motion, remeasure]);
|
|
226
231
|
const activeTextColor = variant === "filled" ? theme.colors["primary-foreground"] : theme.colors.foreground;
|
|
227
232
|
const handleSelect = (option) => {
|
|
228
233
|
if (disabled || option.disabled || option.value === currentValue) return;
|
package/lib/taro-components.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ declare module '@tarojs/components/types/View' {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
declare module '@tarojs/components/types/Button' {
|
|
25
|
+
interface ButtonProps {
|
|
26
|
+
role?: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
24
30
|
declare module '@tarojs/components/types/Input' {
|
|
25
31
|
interface InputProps {
|
|
26
32
|
readonly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanwenbo/x-taro-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "A Taro mini-program UI library based on x-design-system",
|
|
5
5
|
"author": "9476400@qq.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"**/*.css"
|
|
71
71
|
],
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@hanwenbo/x-auth-core": "0.1.
|
|
74
|
-
"@hanwenbo/x-i18n": "1.
|
|
75
|
-
"@hanwenbo/x-mobile-locales": "1.0.
|
|
73
|
+
"@hanwenbo/x-auth-core": "0.1.3",
|
|
74
|
+
"@hanwenbo/x-i18n": "1.1.1",
|
|
75
|
+
"@hanwenbo/x-mobile-locales": "1.0.2",
|
|
76
76
|
"class-variance-authority": "^0.7.1",
|
|
77
77
|
"clsx": "^2.1.0",
|
|
78
78
|
"tailwind-merge": "^2.2.0"
|