Skip to content

Commit d79517e

Browse files
authored
fix(tasty): cleanup method (#773)
1 parent b688c77 commit d79517e

24 files changed

+3501
-2326
lines changed

.changeset/breezy-planes-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Fix cleanup of style in the new style injector.

.changeset/chatty-radios-agree.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": minor
3+
---
4+
5+
Improved debug tools with better DX and simpler API.

.changeset/curly-vans-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Optimize rule generation by sorting in cache keys.

.changeset/perfect-jars-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Improve cache cleanup logic and cache checks.

.size-limit.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ module.exports = [
2020
}),
2121
);
2222
},
23-
limit: '305kB',
23+
limit: '310kB',
2424
},
2525
{
2626
name: 'Tree shaking (just a Button)',
2727
path: './dist/es/index.js',
2828
webpack: true,
2929
import: '{ Button }',
30-
limit: '32 kB',
30+
limit: '33 kB',
3131
},
3232
{
3333
name: 'Tree shaking (just an Icon)',
3434
path: './dist/es/index.js',
3535
webpack: true,
3636
import: '{ AiIcon }',
37-
limit: '19 kB',
37+
limit: '20 kB',
3838
},
3939
];

.storybook/preview.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ configure({ testIdAttribute: 'data-qa', asyncUtilTimeout: 10000 });
88

99
// Load tasty debug utilities in local Storybook only (exclude Chromatic)
1010
if (!isChromatic() && import.meta.env.DEV) {
11-
import('../src/tasty/debug').then(({ installGlobalDebug }) => {
11+
import('../src/tasty/debug').then(({ tastyDebug }) => {
1212
try {
13-
installGlobalDebug({ force: true });
13+
tastyDebug.install();
1414
} catch (e) {
1515
console.warn('tastyDebug installation failed:', e);
1616
}

src/components/fields/ComboBox/ComboBox.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ForwardedRef,
44
forwardRef,
55
ReactElement,
6-
ReactNode,
76
RefObject,
87
useEffect,
98
useMemo,
@@ -71,18 +70,14 @@ const TriggerElement = tasty({
7170
placeContent: 'center',
7271
placeSelf: 'stretch',
7372
radius: '(1r - 1bw) right',
74-
width: {
75-
'': '4x',
76-
'[data-size="small"]': '3x',
77-
'[data-size="medium"]': '4x',
78-
},
73+
width: '3x',
7974
color: {
8075
'': '#dark-02',
8176
hovered: '#dark-02',
8277
pressed: '#purple',
8378
'[disabled]': '#dark.30',
8479
},
85-
border: 0,
80+
border: 'left',
8681
reset: 'button',
8782
margin: 0,
8883
fill: {

src/components/fields/FilterPicker/FilterPicker.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,21 @@ export const FilterPicker = forwardRef(function FilterPicker<T extends object>(
220220
allValueProps,
221221
customValueProps,
222222
newCustomValueProps,
223+
searchPlaceholder,
224+
autoFocus,
225+
filter,
226+
emptyLabel,
227+
searchInputStyles,
228+
searchInputRef,
229+
listStyles,
230+
optionStyles,
231+
sectionStyles,
232+
headingStyles,
233+
listRef,
234+
disallowEmptySelection,
235+
shouldUseVirtualFocus,
236+
onEscape,
237+
onOptionClick,
223238
...otherProps
224239
} = props;
225240

@@ -1005,6 +1020,17 @@ export const FilterPicker = forwardRef(function FilterPicker<T extends object>(
10051020
selectedKeys={
10061021
selectionMode === 'multiple' ? mappedSelectedKeys : undefined
10071022
}
1023+
searchPlaceholder={searchPlaceholder}
1024+
filter={filter}
1025+
listStyles={listStyles}
1026+
optionStyles={optionStyles}
1027+
sectionStyles={sectionStyles}
1028+
headingStyles={headingStyles}
1029+
listRef={listRef}
1030+
disallowEmptySelection={disallowEmptySelection}
1031+
emptyLabel={emptyLabel}
1032+
searchInputStyles={searchInputStyles}
1033+
searchInputRef={searchInputRef}
10081034
disabledKeys={disabledKeys}
10091035
focusOnHover={focusOnHover}
10101036
shouldFocusWrap={shouldFocusWrap}

0 commit comments

Comments
 (0)