@stackloop/ui 2.4.3 → 3.1.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 +45 -0
- package/dist/AudioRecorder.d.ts +1 -0
- package/dist/Badge.d.ts +1 -0
- package/dist/BottomSheet.d.ts +1 -0
- package/dist/Button.d.ts +1 -0
- package/dist/Card.d.ts +1 -0
- package/dist/Checkbox.d.ts +1 -0
- package/dist/DatePicker.d.ts +1 -0
- package/dist/Drawer.d.ts +1 -0
- package/dist/Dropdown.d.ts +1 -0
- package/dist/DualSlider.d.ts +1 -0
- package/dist/FileUpload.d.ts +2 -0
- package/dist/FloatingActionButton.d.ts +1 -0
- package/dist/Input.d.ts +1 -0
- package/dist/Modal.d.ts +1 -0
- package/dist/Pagination.d.ts +1 -0
- package/dist/PhoneInput.d.ts +18 -0
- package/dist/RadioPills.d.ts +1 -0
- package/dist/Select.d.ts +1 -0
- package/dist/Slider.d.ts +1 -0
- package/dist/Spinner.d.ts +1 -0
- package/dist/StatusBadges.d.ts +2 -0
- package/dist/StepProgress.d.ts +1 -0
- package/dist/Table.d.ts +2 -1
- package/dist/Textarea.d.ts +1 -0
- package/dist/ThumbnailGrid.d.ts +1 -0
- package/dist/Toast.d.ts +1 -0
- package/dist/Toggle.d.ts +1 -0
- package/dist/countries.d.ts +6 -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 +2357 -1646
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,6 +147,24 @@ You can add dark mode variants:
|
|
|
147
147
|
|
|
148
148
|
- For each component below you'll find a short description, props (type, default, notes) and a minimal usage example.
|
|
149
149
|
|
|
150
|
+
## Animation Control
|
|
151
|
+
|
|
152
|
+
Most components support an `animate?: boolean` prop to enable or disable built-in Framer Motion animations. The default is `true`.
|
|
153
|
+
|
|
154
|
+
```jsx
|
|
155
|
+
import { Button, Modal } from '@stackloop/ui'
|
|
156
|
+
|
|
157
|
+
<Button animate={false}>No animation</Button>
|
|
158
|
+
|
|
159
|
+
<Modal isOpen={open} onClose={() => setOpen(false)} animate={false}>
|
|
160
|
+
...
|
|
161
|
+
</Modal>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Components with the `animate` prop:
|
|
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`
|
|
167
|
+
|
|
150
168
|
**Checkbox**:
|
|
151
169
|
- **Description:** Accessible checkbox with optional label and description.
|
|
152
170
|
- **Props:**
|
|
@@ -212,6 +230,33 @@ You can add dark mode variants:
|
|
|
212
230
|
/>
|
|
213
231
|
```
|
|
214
232
|
|
|
233
|
+
**PhoneInput**:
|
|
234
|
+
- **Description:** Phone number input with a country calling code selector and optional locale-based default.
|
|
235
|
+
- **Props:**
|
|
236
|
+
- **`value`**: `string` — optional.
|
|
237
|
+
- **`onChange`**: `(value: string) => void` — optional.
|
|
238
|
+
- **`country`**: `string` — optional ISO2 override (e.g. `US`).
|
|
239
|
+
- **`defaultCountry`**: `string` — default: `'US'`.
|
|
240
|
+
- **`autoDetect`**: `boolean` — default: `true`. Uses `navigator.language` to select a country.
|
|
241
|
+
- **`onCountryChange`**: `(country: Country) => void` — optional.
|
|
242
|
+
- **`searchable`**: `boolean` — default: `true`.
|
|
243
|
+
- **`showFlags`**: `boolean` — default: `true`.
|
|
244
|
+
- **`animate`**: `boolean` — default: `true`.
|
|
245
|
+
- Inherits standard `input` HTML attributes.
|
|
246
|
+
- **Usage:**
|
|
247
|
+
|
|
248
|
+
```jsx
|
|
249
|
+
import { PhoneInput } from '@stackloop/ui'
|
|
250
|
+
|
|
251
|
+
<PhoneInput
|
|
252
|
+
label="Phone"
|
|
253
|
+
value={phone}
|
|
254
|
+
onChange={setPhone}
|
|
255
|
+
searchable
|
|
256
|
+
autoDetect
|
|
257
|
+
/>
|
|
258
|
+
```
|
|
259
|
+
|
|
215
260
|
**Modal**:
|
|
216
261
|
- **Description:** Centered modal with backdrop, title and Escape-to-close handling.
|
|
217
262
|
- **Props:**
|
package/dist/AudioRecorder.d.ts
CHANGED
package/dist/Badge.d.ts
CHANGED
package/dist/BottomSheet.d.ts
CHANGED
package/dist/Button.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
5
5
|
size?: 'sm' | 'md' | 'lg';
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
|
+
animate?: boolean;
|
|
8
9
|
}
|
|
9
10
|
type MotionButtonProps = Omit<ButtonProps, 'children' | keyof HTMLMotionProps<'button'>> & {
|
|
10
11
|
children?: React.ReactNode;
|
package/dist/Card.d.ts
CHANGED
package/dist/Checkbox.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
3
3
|
label?: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
onChange?: (checked: boolean) => void;
|
|
6
|
+
animate?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
package/dist/DatePicker.d.ts
CHANGED
package/dist/Drawer.d.ts
CHANGED
package/dist/Dropdown.d.ts
CHANGED
package/dist/DualSlider.d.ts
CHANGED
package/dist/FileUpload.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface CameraCaptureProps {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
className?: string;
|
|
9
|
+
animate?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const CameraCapture: React.FC<CameraCaptureProps>;
|
|
11
12
|
export interface FileUploaderProps {
|
|
@@ -15,5 +16,6 @@ export interface FileUploaderProps {
|
|
|
15
16
|
label?: string;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
className?: string;
|
|
19
|
+
animate?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare const FileUploader: React.FC<FileUploaderProps>;
|
|
@@ -16,6 +16,7 @@ export interface FloatingActionButtonProps {
|
|
|
16
16
|
position?: 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
+
animate?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const FloatingActionButton: React.FC<FloatingActionButtonProps>;
|
|
21
22
|
export declare const FAB: React.FC<FloatingActionButtonProps>;
|
package/dist/Input.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
5
5
|
hint?: string;
|
|
6
6
|
leftIcon?: React.ReactNode;
|
|
7
7
|
rightIcon?: React.ReactNode;
|
|
8
|
+
animate?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
package/dist/Modal.d.ts
CHANGED
package/dist/Pagination.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Country } from './countries';
|
|
3
|
+
export interface PhoneInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
country?: string;
|
|
7
|
+
defaultCountry?: string;
|
|
8
|
+
autoDetect?: boolean;
|
|
9
|
+
onCountryChange?: (country: Country) => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
searchable?: boolean;
|
|
14
|
+
showFlags?: boolean;
|
|
15
|
+
animate?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const PhoneInput: React.FC<PhoneInputProps>;
|
package/dist/RadioPills.d.ts
CHANGED
package/dist/Select.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
|
|
|
16
16
|
searchable?: boolean;
|
|
17
17
|
clearable?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
+
animate?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
package/dist/Slider.d.ts
CHANGED
package/dist/Spinner.d.ts
CHANGED
package/dist/StatusBadges.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import React from 'react';
|
|
|
2
2
|
export interface OfflineBadgeProps {
|
|
3
3
|
isOffline: boolean;
|
|
4
4
|
className?: string;
|
|
5
|
+
animate?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare const OfflineBadge: React.FC<OfflineBadgeProps>;
|
|
7
8
|
export interface SyncIndicatorProps {
|
|
8
9
|
status: 'synced' | 'syncing' | 'unsynced' | 'error';
|
|
9
10
|
count?: number;
|
|
10
11
|
className?: string;
|
|
12
|
+
animate?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const SyncIndicator: React.FC<SyncIndicatorProps>;
|
package/dist/StepProgress.d.ts
CHANGED
package/dist/Table.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export interface TableProps<T> {
|
|
|
14
14
|
onRowClick?: (item: T) => void;
|
|
15
15
|
keyExtractor: (item: T) => string;
|
|
16
16
|
className?: string;
|
|
17
|
+
animate?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare function Table<T>({ data, columns, loading, onRowClick, keyExtractor, className }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function Table<T>({ data, columns, loading, onRowClick, keyExtractor, className, animate }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
package/dist/Textarea.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
3
3
|
label?: string;
|
|
4
4
|
error?: string;
|
|
5
5
|
helperText?: string;
|
|
6
|
+
animate?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
package/dist/ThumbnailGrid.d.ts
CHANGED
package/dist/Toast.d.ts
CHANGED
package/dist/Toggle.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
|
|
|
3
3
|
label?: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
onChange?: (checked: boolean) => void;
|
|
6
|
+
animate?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>;
|