Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/grumpy-planes-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": patch
---

Change the default Label preset to `t3m`.
5 changes: 5 additions & 0 deletions .changeset/moody-bears-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": patch
---

Fix font weight for Item and Item Button.
5 changes: 5 additions & 0 deletions .changeset/spicy-jeans-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": patch
---

Use right text alignment in NumberInput component.
1 change: 1 addition & 0 deletions src/components/actions/ItemButton/ItemButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const StyledItem = tasty(Item, {
as: 'button',
type: 'neutral',
theme: 'default',
isButton: true,
styles: {
reset: 'button',
placeContent: 'center stretch',
Expand Down
13 changes: 11 additions & 2 deletions src/components/content/Item/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ export interface CubeItemProps extends BaseProps, ContainerStyleProps {
* When true, applies card styling with increased border radius.
*/
isCard?: boolean;
/**
* When true, adds button modifier to the component styling.
*/
isButton?: boolean;
/**
* @private
* Default tooltip placement for the item.
Expand Down Expand Up @@ -252,9 +256,11 @@ const ItemElement = tasty({
disabled: '#dark-04',
},
preset: {
'': 't3m',
'': 't3',
button: 't3m',
'[data-size="xsmall"]': 't4',
'[data-size="xlarge"]': 't2m',
'[data-size="xlarge"]': 't2',
'[data-size="xlarge"] & button': 't2m',
'[data-size="inline"]': 'tag',
},
boxSizing: 'border-box',
Expand Down Expand Up @@ -685,6 +691,7 @@ const Item = <T extends HTMLElement = HTMLDivElement>(
isLoading = false,
isCard = false,
actions,
isButton = false,
defaultTooltipPlacement = 'top',
...rest
} = props;
Expand Down Expand Up @@ -777,6 +784,7 @@ const Item = <T extends HTMLElement = HTMLDivElement>(
selected: isSelected === true,
loading: isLoading,
card: isCard === true,
button: isButton === true,
...mods,
};
}, [
Expand All @@ -790,6 +798,7 @@ const Item = <T extends HTMLElement = HTMLDivElement>(
isSelected,
isLoading,
isCard,
isButton,
actions,
mods,
]);
Expand Down
1 change: 1 addition & 0 deletions src/components/fields/FilterPicker/FilterPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ export const FilterPicker = forwardRef(function FilterPicker<T extends object>(
<ItemButton
ref={triggerRef as any}
data-popover-trigger
isButton={false}
qa={qa || 'FilterPicker'}
id={id}
type={type}
Expand Down
3 changes: 3 additions & 0 deletions src/components/fields/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export interface CubeNumberInputProps
}

const StyledTextInputBase = tasty(TextInputBase, {
styles: {
textAlign: 'right',
},
wrapperStyles: {
width: 'initial 13x 100%',
},
Expand Down
1 change: 1 addition & 0 deletions src/components/fields/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ export const Picker = forwardRef(function Picker<T extends object>(
<ItemButton
ref={triggerRef as any}
data-popover-trigger
isButton={false}
id={id}
qa={qa || 'PickerTrigger'}
type={type}
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const INLINE_LABEL_STYLES: Styles = {

export const LABEL_STYLES: Styles = {
display: 'block',
preset: 'h6',
preset: 't3m',
color: {
'': '#dark',
invalid: '#danger-text',
Expand Down
Loading