Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core/datetime-picker): responsiveness, strict typing, spacing #1558

Merged
merged 26 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bc15221
fix(core/datetime-picker): adapt spacing according to figma, responsiโ€ฆ
matthiashader Oct 22, 2024
49931e6
fix(core/date-time-picker): responsiveness and spacing, strict typing
matthiashader Nov 11, 2024
d0bba56
fix: vrts, linting
matthiashader Nov 11, 2024
b622603
fix: linting
matthiashader Nov 11, 2024
f89aa74
fix: strict typing
matthiashader Nov 12, 2024
b969fda
fix: padding
matthiashader Nov 18, 2024
2b3846d
Merge remote-tracking branch 'origin/fix/1614-datetime-picker' into fโ€ฆ
matthiashader Nov 18, 2024
1c92a1e
fix: spacing adaptions
matthiashader Nov 18, 2024
13ecac9
fix: adapt vrts
matthiashader Nov 18, 2024
ff3c7c5
fix: strict typing
matthiashader Nov 19, 2024
6d3508b
Revert "fix: strict typing"
matthiashader Nov 19, 2024
8510cc4
Merge remote-tracking branch 'refs/remotes/origin/main' into fix/1614โ€ฆ
matthiashader Nov 19, 2024
50527bf
fix: strict typing
matthiashader Nov 19, 2024
0297756
Merge remote-tracking branch 'refs/remotes/origin/main' into fix/1614โ€ฆ
matthiashader Nov 19, 2024
cf6ff81
fix: typing
matthiashader Nov 19, 2024
9ca7b75
fix: update vrts
matthiashader Nov 19, 2024
6bc0c5e
fix: adapt date-dropdown and vrts
matthiashader Nov 19, 2024
04d0a40
fix: adapt spacing and vrts
matthiashader Nov 19, 2024
e5f9b89
fix: review comments
matthiashader Nov 20, 2024
dba47ee
fix: review comments
matthiashader Nov 20, 2024
99a8249
fix: units
matthiashader Nov 20, 2024
e2f35fa
fix: remove css var
matthiashader Nov 20, 2024
fcc640d
fix: adapt spacings
matthiashader Nov 20, 2024
3a34f21
fix: adapt spacing and vrts
matthiashader Nov 20, 2024
a83f26c
fix: adapt icon import and revert textarea vrt
matthiashader Nov 21, 2024
9dcde2a
fix: adapt icon
matthiashader Nov 21, 2024
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/twenty-mangos-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siemens/ix': patch
---

fix(core/date-time-picker): responsiveness and spacing, strict typing
matthiashader marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 15 additions & 16 deletions packages/core/component-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4423,7 +4423,7 @@
"name": "from",
"type": "string",
"complexType": {
"original": "string | undefined",
"original": "string",
"resolved": "string",
"references": {}
},
Expand All @@ -4442,7 +4442,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down Expand Up @@ -4496,7 +4496,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand All @@ -4522,7 +4522,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand All @@ -4548,7 +4548,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down Expand Up @@ -4641,10 +4641,10 @@
},
{
"name": "showTimeReference",
"type": "any",
"type": "boolean",
"complexType": {
"original": "any",
"resolved": "any",
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"mutable": false,
Expand All @@ -4661,13 +4661,12 @@
"text": "1.1.0"
}
],
"default": "undefined",
"values": [
{
"type": "any"
"type": "boolean"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down Expand Up @@ -4698,7 +4697,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand All @@ -4724,7 +4723,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down Expand Up @@ -4777,14 +4776,14 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
"name": "to",
"type": "string",
"complexType": {
"original": "string | undefined",
"original": "string",
"resolved": "string",
"references": {}
},
Expand All @@ -4803,7 +4802,7 @@
"type": "string"
}
],
"optional": false,
"optional": true,
"required": false
},
{
Expand Down
24 changes: 12 additions & 12 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ export namespace Components {
* The selected starting date. If the picker is not in range mode this is the selected date. Format has to match the `format` property.
* @since 1.1.0
*/
"from": string | undefined;
"from"?: string;
/**
* Text of date select button
* @since 2.1.0
Expand All @@ -712,17 +712,17 @@ export namespace Components {
* Format of time string See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
* @since 2.1.0
*/
"locale": string;
"locale"?: string;
/**
* The latest date that can be selected by the date picker. If not set there will be no restriction.
* @since 1.1.0
*/
"maxDate": string;
"maxDate"?: string;
/**
* The earliest date that can be selected by the date picker. If not set there will be no restriction.
* @since 1.1.0
*/
"minDate": string;
"minDate"?: string;
/**
* If true a date-range can be selected (from/to).
*/
Expand All @@ -744,18 +744,18 @@ export namespace Components {
* @see { this.timeFormat}
* @since 1.1.0
*/
"showTimeReference": any;
"showTimeReference"?: boolean;
/**
* Text of date select button
* @since 1.1.0
* @deprecated since 2.1.0. Use `i18nDone`
*/
"textSelectDate": string;
"textSelectDate"?: string;
/**
* Select time with format string
* @since 1.1.0
*/
"time": string;
"time"?: string;
/**
* Time format string. See {@link "https://moment.github.io/luxon/#/formatting?id=table-of-tokens"} for all available tokens.
* @since 1.1.0
Expand All @@ -764,12 +764,12 @@ export namespace Components {
/**
* Set time reference
*/
"timeReference": 'AM' | 'PM';
"timeReference"?: 'AM' | 'PM';
/**
* The selected end date. If the the picker is not in range mode this property has no impact. Format has to match the `format` property.
* @since 1.1.0
*/
"to": string | undefined;
"to"?: string;
/**
* The index of which day to start the week on, based on the Locale#weekdays array. E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.
* @since 2.1.0
Expand Down Expand Up @@ -4825,7 +4825,7 @@ declare namespace LocalJSX {
* The selected starting date. If the picker is not in range mode this is the selected date. Format has to match the `format` property.
* @since 1.1.0
*/
"from"?: string | undefined;
"from"?: string;
/**
* Text of date select button
* @since 2.1.0
Expand Down Expand Up @@ -4887,7 +4887,7 @@ declare namespace LocalJSX {
* @see { this.timeFormat}
* @since 1.1.0
*/
"showTimeReference"?: any;
"showTimeReference"?: boolean;
/**
* Text of date select button
* @since 1.1.0
Expand All @@ -4912,7 +4912,7 @@ declare namespace LocalJSX {
* The selected end date. If the the picker is not in range mode this property has no impact. Format has to match the `format` property.
* @since 1.1.0
*/
"to"?: string | undefined;
"to"?: string;
/**
* The index of which day to start the week on, based on the Locale#weekdays array. E.g. if the locale is en-us, weekStartIndex = 1 results in starting the week on monday.
* @since 2.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@

.pull-right {
float: right;
padding: $tiny-space $default-space;
}
padding: 0 $default-space $medium-space $default-space; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ export interface IxDatePickerComponent {
/**
* Annotae with @Prop() decorator
*/
minDate: string;
minDate?: string;

/**
* Annotae with @Prop() decorator
*/
maxDate: string;
maxDate?: string;

/**
* Annotate with @Prop({ attribute: 'i18n-done' }) decorator
Expand Down
56 changes: 25 additions & 31 deletions packages/core/src/components/date-picker/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

.grid {
display: grid;
grid-template-columns: repeat(8, 40px);
grid-template-columns: 24px repeat(7, 40px);
grid-template-rows: repeat(7, 40px);
align-items: center;
justify-items: center;
Expand All @@ -126,6 +126,13 @@
&:focus-visible {
outline: 1px solid var(--theme-color-focus-bdr);
outline-offset: var(--theme-btn--focus--outline-offset);

background-color: var(--theme-datepicker-day--background--selected);
border: inset 1px solid var(--theme-datepicker-day--border-color--selected);
color: var(--theme-datepicker-day--color--selected);
font-size: 14px;
line-height: 20px;
letter-spacing: 0;
}

&.today {
Expand All @@ -144,23 +151,22 @@

&:hover {
background-color: var(
--theme-datepicker-day--background--selected-hover
--theme-datepicker-day--background--selected-hover
);
}

&:active {
background-color: var(
--theme-datepicker-day--background--selected-active
--theme-datepicker-day--background--selected-active
);
}

&.disabled {
pointer-events: none;
background-color: var(
--theme-datepicker-day--background--selected-disabled
--theme-datepicker-day--background--selected-disabled
);
border: 1px solid
var(--theme-datepicker-day--background--selected-disabled);
border: 1px solid var(--theme-datepicker-day--background--selected-disabled);
color: var(--theme-datepicker-day--color--selected-disabled);
}
}
Expand All @@ -173,27 +179,24 @@

&:hover {
background-color: var(
--theme-datepicker-day--background--range-hover
--theme-datepicker-day--background--range-hover
);
border: 1px solid
var(--theme-datepicker-today--border-color--range-hover);
border: 1px solid var(--theme-datepicker-today--border-color--range-hover);
}

&:active {
background-color: var(
--theme-datepicker-day--background--range-active
--theme-datepicker-day--background--range-active
);
border: 1px solid
var(--theme-datepicker-today--border-color--range-active);
border: 1px solid var(--theme-datepicker-today--border-color--range-active);
}

&.disabled {
background-color: var(
--theme-datepicker-day--background--range-disabled
--theme-datepicker-day--background--range-disabled
);
color: var(--theme-datepicker-day--color--range-disabled);
border: 1px solid
var(--theme-datepicker-today--border-color--range-disabled);
border: 1px solid var(--theme-datepicker-today--border-color--range-disabled);
}
}

Expand All @@ -220,20 +223,20 @@

&:hover {
background-color: var(
--theme-datepicker-day--background--selected-hover
--theme-datepicker-day--background--selected-hover
);
}

&:active {
background-color: var(
--theme-datepicker-day--background--selected-active
--theme-datepicker-day--background--selected-active
);
}

&.disabled {
pointer-events: none;
background-color: var(
--theme-datepicker-day--background--selected-disabled
--theme-datepicker-day--background--selected-disabled
);
color: var(--theme-datepicker-day--color--selected-disabled);
}
Expand All @@ -245,20 +248,20 @@

&:hover {
background-color: var(
--theme-datepicker-day--background--range-hover
--theme-datepicker-day--background--range-hover
);
}

&:active {
background-color: var(
--theme-datepicker-day--background--range-active
--theme-datepicker-day--background--range-active
);
}

&.disabled {
pointer-events: none;
background-color: var(
--theme-datepicker-day--background--range-disabled
--theme-datepicker-day--background--range-disabled
);
color: var(--theme-datepicker-day--color--range-disabled);
}
Expand Down Expand Up @@ -296,16 +299,7 @@
border: none;
background: none;
cursor: initial;
}

&:focus-visible {
background-color: var(--theme-datepicker-day--background--selected);
border: inset 1px solid
var(--theme-datepicker-day--border-color--selected);
color: var(--theme-datepicker-day--color--selected);
font-size: 14px;
line-height: 20px;
letter-spacing: 0;
width: 1.5rem;
}
}
}
Expand Down
Loading
Loading