@fluid-topics/ft-text-input 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,6 +71,7 @@ class FtdsTextInput extends withI18n(toFtInput(FtdsBase)) {
71
71
  render() {
72
72
  const inputClasses = classMap({
73
73
  "ftds-input": true,
74
+ "has-append-icon": this.appendIcon !== undefined,
74
75
  ...this.getDesignSystemBaseClasses(),
75
76
  });
76
77
  return html `
@@ -30,16 +30,40 @@ export const styles = css `
30
30
  appearance: textfield;
31
31
  }
32
32
 
33
+ input[type="date"], input[type="time"] {
34
+ --date-icon-horizontal-padding: calc(var(--icon-size) / 2 + var(--field-horizontal-padding));
35
+ --date-icon-top: calc(var(--field-height) / 2);
36
+ --date-icon-right: calc(var(--date-icon-horizontal-padding) + var(--append-icon-horizontal-padding, 0px));
37
+
38
+ &.ftds--size-large {
39
+ --field-height: ${textInput.largeFieldHeight};
40
+ --field-horizontal-padding: ${textInput.largeFieldHorizontalPadding};
41
+ --icon-size: ${textInput.largeFieldIconSize};
42
+ }
43
+
44
+ &.ftds--size-medium {
45
+ --field-height: ${textInput.mediumFieldHeight};
46
+ --field-horizontal-padding: ${textInput.mediumFieldHorizontalPadding};
47
+ --icon-size: ${textInput.mediumFieldIconSize};
48
+ }
49
+
50
+ &.has-append-icon {
51
+ --append-icon-horizontal-padding: calc(var(--field-horizontal-padding) + var(--icon-size) / 2);
52
+ }
53
+ }
54
+
33
55
  input[type="date"]::-webkit-inner-spin-button,
34
56
  input[type="time"]::-webkit-inner-spin-button,
35
57
  input[type="date"]::-webkit-calendar-picker-indicator,
36
58
  input[type="time"]::-webkit-calendar-picker-indicator {
37
- display: none;
38
- -webkit-appearance: none;
59
+ position: absolute;
60
+ padding: 0;
61
+ transform: translateY(-50%);
62
+ top: var(--date-icon-top);
63
+ right: var(--date-icon-right);
39
64
  }
40
65
  /* We didn't found a way to remove the calendar icon from Firefox yet, sad.png */
41
66
 
42
-
43
67
  input[type="date"], input[type="time"] {
44
68
  font-family: ${typographyBody2Medium.fontFamily};
45
69
  font-size: ${typographyBody2Medium.fontSize};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-text-input",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Text Input",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,17 +19,17 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-base-input": "1.4.1",
23
- "@fluid-topics/ft-i18n": "1.4.1",
24
- "@fluid-topics/ft-icon": "1.4.1",
25
- "@fluid-topics/ft-input-helper-text": "1.4.1",
26
- "@fluid-topics/ft-input-label": "1.4.1",
27
- "@fluid-topics/ft-tooltip": "1.4.1",
28
- "@fluid-topics/ft-wc-utils": "1.4.1",
22
+ "@fluid-topics/ft-base-input": "1.4.3",
23
+ "@fluid-topics/ft-i18n": "1.4.3",
24
+ "@fluid-topics/ft-icon": "1.4.3",
25
+ "@fluid-topics/ft-input-helper-text": "1.4.3",
26
+ "@fluid-topics/ft-input-label": "1.4.3",
27
+ "@fluid-topics/ft-tooltip": "1.4.3",
28
+ "@fluid-topics/ft-wc-utils": "1.4.3",
29
29
  "lit": "3.1.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@fluid-topics/ft-wc-test-utils": "1.4.1"
32
+ "@fluid-topics/ft-wc-test-utils": "1.4.3"
33
33
  },
34
- "gitHead": "1afa9ec0ae6a444d5dbd791dd7ecf2cee8766f8c"
34
+ "gitHead": "f9f5324c86da35137044bc768819fcd81057791d"
35
35
  }