@algorithm-shift/design-system 1.3.105 → 1.3.106
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/dist/index.css +23 -19
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +45 -4
- package/dist/index.d.ts +45 -4
- package/dist/index.js +373 -202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +270 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -244,11 +244,52 @@ interface BreadcrumbProps extends ElementProps {
|
|
|
244
244
|
list?: Record<string, any>;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
interface ButtonGroupItem {
|
|
248
|
+
id?: string | number;
|
|
249
|
+
value?: string | number;
|
|
250
|
+
label?: string;
|
|
251
|
+
name?: string;
|
|
252
|
+
url?: string;
|
|
253
|
+
href?: string;
|
|
254
|
+
onClick?: () => void;
|
|
255
|
+
disabled?: boolean;
|
|
256
|
+
separator?: boolean;
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
}
|
|
259
|
+
|
|
247
260
|
interface ButtonGroupProps extends ElementProps {
|
|
261
|
+
// Main button props
|
|
248
262
|
textContent?: string;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
263
|
+
text?: string;
|
|
264
|
+
|
|
265
|
+
// Dropdown items
|
|
266
|
+
list?: ButtonGroupItem[] | string[] | Record<string, any>;
|
|
267
|
+
data?: ButtonGroupItem[] | string[] | Record<string, any>[];
|
|
268
|
+
dataKey?: string;
|
|
269
|
+
dataLabel?: string;
|
|
270
|
+
|
|
271
|
+
// Styling
|
|
272
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
273
|
+
buttonSize?: 'default' | 'sm' | 'lg' | 'icon';
|
|
274
|
+
buttonVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
275
|
+
dropdownVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
276
|
+
|
|
277
|
+
// Layout
|
|
278
|
+
orientation?: 'horizontal' | 'vertical';
|
|
279
|
+
showDropdownIcon?: boolean;
|
|
280
|
+
dropdownIcon?: React.ReactNode;
|
|
281
|
+
alignDropdown?: 'start' | 'center' | 'end';
|
|
282
|
+
|
|
283
|
+
// Behavior
|
|
284
|
+
onItemSelect?: (params: { item: ButtonGroupItem; index: number }) => void;
|
|
285
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
286
|
+
|
|
287
|
+
// Advanced
|
|
288
|
+
disabled?: boolean;
|
|
289
|
+
loading?: boolean;
|
|
290
|
+
emptyStateText?: string;
|
|
291
|
+
maxItems?: number;
|
|
292
|
+
showSeparator?: boolean;
|
|
252
293
|
}
|
|
253
294
|
interface AccordionProps extends ElementProps {
|
|
254
295
|
name?: string;
|
|
@@ -318,7 +359,7 @@ declare const Typography: ({ className, style, tagName, textContent, onClick, }:
|
|
|
318
359
|
|
|
319
360
|
declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
320
361
|
|
|
321
|
-
declare
|
|
362
|
+
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
|
322
363
|
|
|
323
364
|
type IconSet = 'fa-css' | 'fa' | 'fontawesome' | 'lucide';
|
|
324
365
|
type FAPrefix = 'fas' | 'far' | 'fab' | string;
|
package/dist/index.d.ts
CHANGED
|
@@ -244,11 +244,52 @@ interface BreadcrumbProps extends ElementProps {
|
|
|
244
244
|
list?: Record<string, any>;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
interface ButtonGroupItem {
|
|
248
|
+
id?: string | number;
|
|
249
|
+
value?: string | number;
|
|
250
|
+
label?: string;
|
|
251
|
+
name?: string;
|
|
252
|
+
url?: string;
|
|
253
|
+
href?: string;
|
|
254
|
+
onClick?: () => void;
|
|
255
|
+
disabled?: boolean;
|
|
256
|
+
separator?: boolean;
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
}
|
|
259
|
+
|
|
247
260
|
interface ButtonGroupProps extends ElementProps {
|
|
261
|
+
// Main button props
|
|
248
262
|
textContent?: string;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
263
|
+
text?: string;
|
|
264
|
+
|
|
265
|
+
// Dropdown items
|
|
266
|
+
list?: ButtonGroupItem[] | string[] | Record<string, any>;
|
|
267
|
+
data?: ButtonGroupItem[] | string[] | Record<string, any>[];
|
|
268
|
+
dataKey?: string;
|
|
269
|
+
dataLabel?: string;
|
|
270
|
+
|
|
271
|
+
// Styling
|
|
272
|
+
variant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
273
|
+
buttonSize?: 'default' | 'sm' | 'lg' | 'icon';
|
|
274
|
+
buttonVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
275
|
+
dropdownVariant?: 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive';
|
|
276
|
+
|
|
277
|
+
// Layout
|
|
278
|
+
orientation?: 'horizontal' | 'vertical';
|
|
279
|
+
showDropdownIcon?: boolean;
|
|
280
|
+
dropdownIcon?: React.ReactNode;
|
|
281
|
+
alignDropdown?: 'start' | 'center' | 'end';
|
|
282
|
+
|
|
283
|
+
// Behavior
|
|
284
|
+
onItemSelect?: (params: { item: ButtonGroupItem; index: number }) => void;
|
|
285
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
286
|
+
|
|
287
|
+
// Advanced
|
|
288
|
+
disabled?: boolean;
|
|
289
|
+
loading?: boolean;
|
|
290
|
+
emptyStateText?: string;
|
|
291
|
+
maxItems?: number;
|
|
292
|
+
showSeparator?: boolean;
|
|
252
293
|
}
|
|
253
294
|
interface AccordionProps extends ElementProps {
|
|
254
295
|
name?: string;
|
|
@@ -318,7 +359,7 @@ declare const Typography: ({ className, style, tagName, textContent, onClick, }:
|
|
|
318
359
|
|
|
319
360
|
declare const Breadcrumb: ({ list, className, style }: BreadcrumbProps) => react_jsx_runtime.JSX.Element;
|
|
320
361
|
|
|
321
|
-
declare
|
|
362
|
+
declare const ButtonGroup: React$1.FC<ButtonGroupProps>;
|
|
322
363
|
|
|
323
364
|
type IconSet = 'fa-css' | 'fa' | 'fontawesome' | 'lucide';
|
|
324
365
|
type FAPrefix = 'fas' | 'far' | 'fab' | string;
|