@undefine-ui/design-system 3.11.0 → 3.12.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 +23 -2
- package/dist/index.cjs +373 -369
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -13
- package/dist/index.d.ts +23 -13
- package/dist/index.js +372 -368
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -603,6 +603,7 @@ import {
|
|
|
603
603
|
ToolbarSettingsButton,
|
|
604
604
|
ToolbarTodayButton,
|
|
605
605
|
ToolbarDatePickerButton,
|
|
606
|
+
ToolbarSelectionButton,
|
|
606
607
|
FilterDropdown,
|
|
607
608
|
SortDropdown,
|
|
608
609
|
DateRangeDropdown,
|
|
@@ -614,6 +615,12 @@ import {
|
|
|
614
615
|
// Base toolbar button with icon and label
|
|
615
616
|
<ToolbarButton icon="Filter" label="Filter" onClick={handleClick} />
|
|
616
617
|
|
|
618
|
+
// Base toolbar button with custom children (icon and label are ignored when children provided)
|
|
619
|
+
<ToolbarButton>
|
|
620
|
+
<CustomIcon />
|
|
621
|
+
<span>Custom Content</span>
|
|
622
|
+
</ToolbarButton>
|
|
623
|
+
|
|
617
624
|
// Specialized button components
|
|
618
625
|
<ToolbarFilterButton onClick={handleFilter} />
|
|
619
626
|
<ToolbarSortButton onClick={handleSort} />
|
|
@@ -621,6 +628,11 @@ import {
|
|
|
621
628
|
<ToolbarTodayButton onClick={handleToday} />
|
|
622
629
|
<ToolbarDatePickerButton label="Last 30 days" onClick={handleDate} />
|
|
623
630
|
|
|
631
|
+
// Selection button - shows count with clear action
|
|
632
|
+
<ToolbarSelectionButton count={3} onClear={() => clearSelection()} />
|
|
633
|
+
<ToolbarSelectionButton count={5} label="items" onClear={handleClear} />
|
|
634
|
+
<ToolbarSelectionButton count={3} showClearButton={false} />
|
|
635
|
+
|
|
624
636
|
// Search field with clear button
|
|
625
637
|
<ToolbarSearchField
|
|
626
638
|
value={search}
|
|
@@ -677,12 +689,21 @@ const sortOptions: SortOption[] = [
|
|
|
677
689
|
|
|
678
690
|
**ToolbarButton Props:**
|
|
679
691
|
|
|
680
|
-
- `icon` - Icon name from the icon library
|
|
681
|
-
- `label` - Button label text
|
|
692
|
+
- `icon` - Icon name from the icon library (used when children is not provided)
|
|
693
|
+
- `label` - Button label text (used when children is not provided)
|
|
694
|
+
- `children` - Custom content to render. When provided, icon and label props are ignored
|
|
682
695
|
- `open` - Whether the button is in open/active state
|
|
683
696
|
- `disabled` - Disable the button
|
|
684
697
|
- All standard MUI ButtonBase props
|
|
685
698
|
|
|
699
|
+
**ToolbarSelectionButton Props:**
|
|
700
|
+
|
|
701
|
+
- `count` - Number of selected items (required)
|
|
702
|
+
- `label` - Text after the count (default: `'selected'`)
|
|
703
|
+
- `onClear` - Callback when the clear button is clicked
|
|
704
|
+
- `showClearButton` - Whether to show the clear button (default: `true`)
|
|
705
|
+
- All standard MUI ButtonBase props (except `icon`, `open`, `children`)
|
|
706
|
+
|
|
686
707
|
**FilterDropdown Props:**
|
|
687
708
|
|
|
688
709
|
- `children` - Content to render inside the popover (use Form + Field components)
|