@stackloop/ui 3.1.0 → 3.2.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/README.md +26 -1
- package/dist/CountrySelect.d.ts +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1014 -968
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -163,7 +163,7 @@ import { Button, Modal } from '@stackloop/ui'
|
|
|
163
163
|
|
|
164
164
|
Components with the `animate` prop:
|
|
165
165
|
|
|
166
|
-
- `AudioRecorder`, `Badge`, `BottomSheet`, `Button`, `Card`, `CameraCapture`, `Checkbox`, `DatePicker`, `Drawer`, `Dropdown`, `DualSlider`, `FileUploader`, `FloatingActionButton`, `Input`, `Modal`, `Pagination`, `PhoneInput`, `RadioPills`, `Select`, `Slider`, `Spinner`, `StepProgress`, `Table`, `Textarea`, `ThumbnailGrid`, `Toggle`, `ToastProvider`
|
|
166
|
+
- `AudioRecorder`, `Badge`, `BottomSheet`, `Button`, `Card`, `CameraCapture`, `Checkbox`, `CountrySelect`, `DatePicker`, `Drawer`, `Dropdown`, `DualSlider`, `FileUploader`, `FloatingActionButton`, `Input`, `Modal`, `Pagination`, `PhoneInput`, `RadioPills`, `Select`, `Slider`, `Spinner`, `StepProgress`, `Table`, `Textarea`, `ThumbnailGrid`, `Toggle`, `ToastProvider`
|
|
167
167
|
|
|
168
168
|
**Checkbox**:
|
|
169
169
|
- **Description:** Accessible checkbox with optional label and description.
|
|
@@ -257,6 +257,31 @@ Components with the `animate` prop:
|
|
|
257
257
|
/>
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
+
**CountrySelect**:
|
|
261
|
+
- **Description:** Country selector built on `Select` with optional flags and search.
|
|
262
|
+
- **Props:**
|
|
263
|
+
- **`value`**: `string` — optional (ISO2, e.g. `US`).
|
|
264
|
+
- **`onChange`**: `(value: string) => void` — optional.
|
|
265
|
+
- **`onCountryChange`**: `(country: Country) => void` — optional.
|
|
266
|
+
- **`label`**: `string` — optional.
|
|
267
|
+
- **`placeholder`**: `string` — optional.
|
|
268
|
+
- **`searchable`**: `boolean` — default: `true`.
|
|
269
|
+
- **`clearable`**: `boolean` — default: `true`.
|
|
270
|
+
- **`showFlags`**: `boolean` — default: `true`.
|
|
271
|
+
- **`animate`**: `boolean` — default: `true`.
|
|
272
|
+
- **Usage:**
|
|
273
|
+
|
|
274
|
+
```jsx
|
|
275
|
+
import { CountrySelect } from '@stackloop/ui'
|
|
276
|
+
|
|
277
|
+
<CountrySelect
|
|
278
|
+
label="Country"
|
|
279
|
+
value={country}
|
|
280
|
+
onChange={setCountry}
|
|
281
|
+
searchable
|
|
282
|
+
/>
|
|
283
|
+
```
|
|
284
|
+
|
|
260
285
|
**Modal**:
|
|
261
286
|
- **Description:** Centered modal with backdrop, title and Escape-to-close handling.
|
|
262
287
|
- **Props:**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Country } from './countries';
|
|
3
|
+
export interface CountrySelectProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
onCountryChange?: (country: Country) => void;
|
|
7
|
+
label?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
searchable?: boolean;
|
|
10
|
+
clearable?: boolean;
|
|
11
|
+
showFlags?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
animate?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const CountrySelect: React.FC<CountrySelectProps>;
|