haya-select 1.0.112 → 1.0.114
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/README.md +15 -0
- package/build/select/index.d.ts +3 -2
- package/build/select/index.d.ts.map +1 -1
- package/build/select/index.js +211 -42
- package/build/select/option-group.js +2 -2
- package/build/select/option.d.ts +1 -0
- package/build/select/option.d.ts.map +1 -1
- package/build/select/option.js +11 -7
- package/build/select/pagination-page-button.js +2 -2
- package/build/system-test-helpers.d.ts.map +1 -1
- package/build/system-test-helpers.js +11 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,6 +76,21 @@ The callback receives the current `searchValue`, `page`, and optional `values` w
|
|
|
76
76
|
|
|
77
77
|
If `totalCount` and `page` are provided, the options list shows pagination controls with previous/next buttons, a page range around the current page, and a "Page X of Y" label that can be clicked to enter a page number manually.
|
|
78
78
|
|
|
79
|
+
## Mobile options sheet
|
|
80
|
+
|
|
81
|
+
HayaSelect opens options in a bottom sheet on mobile-sized screens by default. The sheet is used when the window width is 768px or less on web, iOS, and Android. It keeps the options list scrollable inside the sheet and places the search input at the bottom.
|
|
82
|
+
|
|
83
|
+
Use `mobileOptionsMode` to override the automatic behavior:
|
|
84
|
+
|
|
85
|
+
```jsx
|
|
86
|
+
<HayaSelect
|
|
87
|
+
mobileOptionsMode="never"
|
|
88
|
+
options={options}
|
|
89
|
+
/>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`mobileOptionsMode` accepts `"auto"` (default), `"always"`, or `"never"`.
|
|
93
|
+
|
|
79
94
|
# Contributing
|
|
80
95
|
|
|
81
96
|
Contributions are very welcome! Please refer to guidelines described in the [contributing guide]( https://github.com/expo/expo#contributing).
|
package/build/select/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export type HayaSelectProps = {
|
|
|
33
33
|
debug?: boolean | undefined;
|
|
34
34
|
id?: import("react").ReactNode;
|
|
35
35
|
model?: object;
|
|
36
|
+
mobileOptionsMode?: "auto" | "always" | "never" | undefined;
|
|
36
37
|
multiple?: boolean | undefined;
|
|
37
38
|
name?: string | undefined;
|
|
38
39
|
noOptionsText?: (() => import("react").ReactNode) | undefined;
|
|
@@ -76,7 +77,7 @@ export type HayaSelectState = {
|
|
|
76
77
|
pageSize: number | null;
|
|
77
78
|
opened: boolean;
|
|
78
79
|
optionsContainerLayout: HayaSelectLayout | null;
|
|
79
|
-
optionsPlacement: "above" | "below" | undefined;
|
|
80
|
+
optionsPlacement: "above" | "below" | "sheet" | undefined;
|
|
80
81
|
optionsTop: number | undefined;
|
|
81
82
|
optionsVisibility: "hidden" | "visible" | undefined;
|
|
82
83
|
optionsWidth: number | undefined | null;
|
|
@@ -109,7 +110,7 @@ export type HayaSelectOnChangePayload = {
|
|
|
109
110
|
};
|
|
110
111
|
export type HayaSelectStylingContext = {
|
|
111
112
|
opened: boolean;
|
|
112
|
-
optionsPlacement: "above" | "below" | undefined;
|
|
113
|
+
optionsPlacement: "above" | "below" | "sheet" | undefined;
|
|
113
114
|
state: HayaSelectState;
|
|
114
115
|
style: Record<string, any>;
|
|
115
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/select/index.jsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/select/index.jsx"],"names":[],"mappings":";;;UA2Bc,MAAM;WACN,MAAM;WACN,MAAM;;;WAKN,MAAM,GAAC,MAAM;WACb,OAAO,OAAO,EAAE,SAAS;qBACb,OAAO,OAAO,EAAE,SAAS;4BACzB,OAAO,OAAO,EAAE,SAAS;;;;;;YAGrC,OAAO,OAAO,EAAE,SAAS;;;aAOzB,KAAK,CAAC,gBAAgB,CAAC;;;;;;;;qBAUvB,MAAM;;;;;SAKN,OAAO,OAAO,EAAE,SAAS;YACzB,MAAM;;;;2BAIM,OAAO,OAAO,EAAE,SAAS;sBAC5B,OAAO,OAAO,EAA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