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: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,5 @@
]
}
]
},
"locales": [
"en-US"
]
}
}
2 changes: 1 addition & 1 deletion packages/dev/s2-docs/pages/s2/DateField.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {useState} from 'react';
function Example() {
let [date, setDate] = useState(parseDate('2020-02-03'));
let formatter = useDateFormatter({ dateStyle: 'full' });

return (
<>
<DateField
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/s2-docs/src/VisualExampleClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,8 +1018,8 @@ function PlacementControl({control, value, onChange}) {
"sb . . . eb"
". bs bc be . "
`,
gridTemplateColumns: '25px 24px 24px 25px 24px',
gridTemplateRows: '25px 24px 24px 25px 24px'
gridTemplateColumns: 'calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale))',
gridTemplateRows: 'calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale))'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use an array of numbers here and the style macro will do this automatically?

Suggested change
gridTemplateRows: 'calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(24px * var(--s2-scale)) calc(25px * var(--s2-scale)) calc(24px * var(--s2-scale))'
gridTemplateRows: [25, 24, 24, 25, 24]

}}>
<PlacementControlItem id="top start" style={{gridArea: 'ts'}} />
<PlacementControlItem id="top" style={{gridArea: 'tc'}} />
Expand Down
2 changes: 2 additions & 0 deletions starters/docs/src/DateField.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
white-space: nowrap;
forced-color-adjust: none;
cursor: text;
overflow-x: auto;
scrollbar-width: none;

&[data-focus-within] {
outline: 2px solid var(--focus-ring-color);
Expand Down
2 changes: 1 addition & 1 deletion starters/tailwind/src/DateField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const segmentStyles = tv({

export function DateInput(props: Omit<DateInputProps, 'children'>) {
return (
<AriaDateInput className={renderProps => fieldGroupStyles({...renderProps, class: 'block min-w-[150px] px-2 py-1.5 text-sm font-sans'})} {...props}>
<AriaDateInput className={renderProps => fieldGroupStyles({...renderProps, class: 'inline min-w-[150px] px-2 py-1.5 text-sm font-sans whitespace-nowrap overflow-x-auto [scrollbar-width:none]'})} {...props}>
{(segment) => <DateSegment segment={segment} className={segmentStyles} />}
</AriaDateInput>
);
Expand Down