Skip to content

Commit

Permalink
chore(css): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusps committed Dec 1, 2023
1 parent ef3df40 commit 1aacabf
Show file tree
Hide file tree
Showing 13 changed files with 62 additions and 470 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/flex/stories/story.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.item {
background-color: lightblue;
width: 100px;
height: 100px;
width: 6.25rem;
height: 6.25rem;
}
2 changes: 1 addition & 1 deletion packages/components/src/grid/stories/story.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.cell {
background-color: lightblue;
width: 100%;
height: 56px;
height: 3.5rem;
}
2 changes: 1 addition & 1 deletion packages/components/src/pagination/stories/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.pagination-container {
margin: 24px;
margin: 1.5rem;
}
4 changes: 2 additions & 2 deletions packages/components/src/popover/stories/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.content {
height: 112px;
width: 192px;
height: 7rem;
width: 12rem;
background: var(--sl-bg-muted);
}
4 changes: 2 additions & 2 deletions packages/components/src/scroll-area/scroll-area.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
transform: translate(-50%, -50%);
width: 100%;
height: 100%;
min-width: 44px;
min-height: 44px;
min-width: 2.75rem;
min-height: 2.75rem;
}
}
}
2 changes: 1 addition & 1 deletion packages/components/src/select-field/stories/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.select-container {
margin: 16px;
margin: 1rem;
display: grid;
align-items: start;
gap: 16px;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/simple-table/simple-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
width: 100%;

&[data-virtualize='true'] {
height: 500px;
height: 31.25rem;
overflow-y: auto;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/textarea/stories/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.textarea-container {
margin: 26px;
margin: 1.625rem;
}
4 changes: 2 additions & 2 deletions packages/components/src/virtual/virtual.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
top: 0;
left: 0;
width: 100%;
height: var(--sl-virtual-item-size, 0px);
height: var(--sl-virtual-item-size, 0rem);
transform: translateY(var(--sl-virtual-item-start, 0px));
}

Expand All @@ -20,7 +20,7 @@
}

[data-sl-virtual] {
height: 500px;
height: 31.25rem;
overflow-y: auto;
width: 100%;
}
Expand Down
456 changes: 0 additions & 456 deletions packages/date/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/date/src/date-field/date-field.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
gap: var(--sl-space-05);
border: var(--sl-border-strong);
border-radius: var(--sl-border-radius-medium);
height: 44px;
height: 2.75rem;
padding: var(--sl-space-3) var(--sl-space-4);
justify-content: flex-start;
align-items: center;
Expand Down
42 changes: 42 additions & 0 deletions packages/date/src/date-field/date-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ import { Field, FieldLabel } from '@vtex/shoreline-components'
import { DateSegment } from '../date-segment'
import './date-field.css'

/**
* Allow users to select a date in a segmented field
* @example
* <DateField label="Date" />
*/
export const DateField = forwardRef<HTMLDivElement, DateFieldProps>(
function DateField(props, forwardedRef) {
const {
Expand Down Expand Up @@ -56,18 +61,55 @@ export const DateField = forwardRef<HTMLDivElement, DateFieldProps>(
)

export interface DateFieldProps {
/**
* Custom className
*/
className?: string
/**
* Granularity of the filed
* @default 'day'
*/
granularity?: 'day' | 'hour' | 'minute' | 'second'
/**
* Hour cycle
* @default 24
*/
hourCycle?: 12 | 24
/**
* Field label
*/
label?: string
/**
* Field locale
* @default 'en-US'
*/
locale?: string
/**
* Wheter has error
* @default false
*/
error?: boolean
/**
* Field value
*/
value?: DateValue
/**
* Minimal date allowed
*/
minValue?: DateValue
/**
* Maximun date allowed
*/
maxValue?: DateValue
/**
* Callback after value changes
*/
onChange?:
| Dispatch<SetStateAction<CalendarDate>>
| Dispatch<SetStateAction<ZonedDateTime>>
| Dispatch<SetStateAction<CalendarDateTime>>
/**
* Default field value
*/
defaultValue?: DateValue
}
6 changes: 6 additions & 0 deletions packages/stylelint/src/plugins/no-px-values/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ const spaceProps = [
'padding-right',
'padding-top',
'padding-bottom',
'height',
'width',
'max-height',
'max-width',
'min-height',
'min-width',
]

module.exports = stylelint.createPlugin(
Expand Down

0 comments on commit 1aacabf

Please sign in to comment.