@qld-gov-au/qgds-bootstrap5 2.0.10 → 2.0.12

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.
Files changed (113) hide show
  1. package/.storybook/main.mjs +2 -2
  2. package/.storybook/preview.js +5 -2
  3. package/dist/assets/components/bs5/banner/banner.hbs +3 -6
  4. package/dist/assets/components/bs5/card/card.hbs +2 -2
  5. package/dist/assets/components/bs5/dateinput/dateinput.hbs +27 -27
  6. package/dist/assets/components/bs5/formcheck/formcheck.hbs +10 -2
  7. package/dist/assets/components/bs5/head/head.hbs +1 -1
  8. package/dist/assets/components/bs5/searchInput/searchInput.hbs +31 -29
  9. package/dist/assets/components/bs5/select/select.hbs +19 -19
  10. package/dist/assets/components/bs5/tag/tag.hbs +1 -1
  11. package/dist/assets/components/bs5/textarea/textarea.hbs +17 -17
  12. package/dist/assets/components/bs5/textbox/textbox.hbs +17 -18
  13. package/dist/assets/css/qld.bootstrap.css +2 -2
  14. package/dist/assets/css/qld.bootstrap.css.map +3 -3
  15. package/dist/assets/css/qld.bootstrap.legacy.css +2 -2
  16. package/dist/assets/css/qld.bootstrap.legacy.css.map +3 -3
  17. package/dist/assets/js/handlebars.helpers.bundle.js +2 -2
  18. package/dist/assets/js/handlebars.helpers.bundle.js.map +2 -2
  19. package/dist/assets/js/handlebars.init.min.js +141 -135
  20. package/dist/assets/js/handlebars.init.min.js.map +2 -2
  21. package/dist/assets/js/handlebars.partials.js +141 -135
  22. package/dist/assets/js/handlebars.partials.js.map +2 -2
  23. package/dist/assets/js/qld.bootstrap.min.js +9 -10
  24. package/dist/assets/js/qld.bootstrap.min.js.map +4 -4
  25. package/dist/assets/node/handlebars.init.min.js +59 -11
  26. package/dist/assets/node/handlebars.init.min.js.map +2 -2
  27. package/dist/components/bs5/banner/banner.hbs +3 -6
  28. package/dist/components/bs5/card/card.hbs +2 -2
  29. package/dist/components/bs5/dateinput/dateinput.hbs +27 -27
  30. package/dist/components/bs5/formcheck/formcheck.hbs +10 -2
  31. package/dist/components/bs5/head/head.hbs +1 -1
  32. package/dist/components/bs5/searchInput/searchInput.hbs +31 -29
  33. package/dist/components/bs5/select/select.hbs +19 -19
  34. package/dist/components/bs5/tag/tag.hbs +1 -1
  35. package/dist/components/bs5/textarea/textarea.hbs +17 -17
  36. package/dist/components/bs5/textbox/textbox.hbs +17 -18
  37. package/dist/package.json +1 -1
  38. package/dist/sample-data/card/card.data.json +4 -1
  39. package/dist/sample-data/dateinput/dateinput.data.json +14 -12
  40. package/dist/sample-data/formcheck/stories/checkbox/checkbox.data.json +4 -5
  41. package/dist/sample-data/formcheck/stories/radio/radio.data.json +4 -4
  42. package/dist/sample-data/searchInput/searchInput.data.json +19 -10
  43. package/dist/sample-data/select/select.data.json +12 -10
  44. package/dist/sample-data/tag/tag.data.json +149 -143
  45. package/dist/sample-data/textarea/textarea.data.json +14 -11
  46. package/dist/sample-data/textbox/textbox.data.json +13 -10
  47. package/package.json +1 -1
  48. package/src/components/bs5/banner/banner.hbs +3 -6
  49. package/src/components/bs5/banner/banner.scss +10 -7
  50. package/src/components/bs5/banner/banner.stories.js +2 -5
  51. package/src/components/bs5/button/button.scss +4 -11
  52. package/src/components/bs5/button/button.stories.js +17 -15
  53. package/src/components/bs5/card/Card.js +31 -2
  54. package/src/components/bs5/card/Card.mdx +4 -0
  55. package/src/components/bs5/card/card--icon-list-footer.stories.js +2 -24
  56. package/src/components/bs5/card/card--multi-action.stories.js +9 -28
  57. package/src/components/bs5/card/card--no-action.stories.js +5 -27
  58. package/src/components/bs5/card/card--single-action.stories.js +4 -33
  59. package/src/components/bs5/card/card.data.json +4 -1
  60. package/src/components/bs5/card/card.hbs +2 -2
  61. package/src/components/bs5/dateinput/Dateinput.js +26 -11
  62. package/src/components/bs5/dateinput/dateinput.data.json +14 -12
  63. package/src/components/bs5/dateinput/dateinput.hbs +27 -27
  64. package/src/components/bs5/footer/footer_formio.scss +5 -5
  65. package/src/components/bs5/formcheck/Formcheck.js +57 -6
  66. package/src/components/bs5/formcheck/_form-variables.scss +131 -0
  67. package/src/components/bs5/formcheck/formcheck.hbs +10 -2
  68. package/src/components/bs5/formcheck/formcheck.scss +229 -66
  69. package/src/components/bs5/formcheck/stories/bootstrap-validation/bootstrap-validation.stories.js +304 -0
  70. package/src/components/bs5/formcheck/stories/checkbox/checkbox.data.json +4 -5
  71. package/src/components/bs5/formcheck/stories/checkbox/checkbox.stories.js +19 -111
  72. package/src/components/bs5/formcheck/stories/radio/radio.data.json +4 -4
  73. package/src/components/bs5/formcheck/stories/radio/radio.stories.js +30 -122
  74. package/src/components/bs5/inpageAlert/inpageAlert.scss +1 -1
  75. package/src/components/bs5/modal/modal.scss +106 -99
  76. package/src/components/bs5/navbar/navbar.functions.js +122 -19
  77. package/src/components/bs5/pageLayout/{ThemeShowcase.stories.js → PaletteShowcase.stories.js} +36 -35
  78. package/src/components/bs5/searchInput/__snapshots__/searchInput.test.js.snap +24 -28
  79. package/src/components/bs5/searchInput/search.functions.js +93 -76
  80. package/src/components/bs5/searchInput/searchInput.data.json +19 -10
  81. package/src/components/bs5/searchInput/searchInput.hbs +31 -29
  82. package/src/components/bs5/searchInput/searchInput.scss +140 -196
  83. package/src/components/bs5/searchInput/searchInput.stories.js +35 -13
  84. package/src/components/bs5/searchInput/searchInput.test.js +5 -1
  85. package/src/components/bs5/select/Select.js +13 -5
  86. package/src/components/bs5/select/Select.stories.js +27 -83
  87. package/src/components/bs5/select/select.data.json +12 -10
  88. package/src/components/bs5/select/select.hbs +19 -19
  89. package/src/components/bs5/tag/tag--status.stories.js +1 -0
  90. package/src/components/bs5/tag/tag.data.json +149 -143
  91. package/src/components/bs5/tag/tag.hbs +1 -1
  92. package/src/components/bs5/tag/tag.scss +2 -5
  93. package/src/components/bs5/tag/tag.stories.js +1 -0
  94. package/src/components/bs5/textarea/Textarea.js +13 -5
  95. package/src/components/bs5/textarea/Textarea.stories.js +29 -55
  96. package/src/components/bs5/textarea/textarea.data.json +14 -11
  97. package/src/components/bs5/textarea/textarea.hbs +17 -17
  98. package/src/components/bs5/textbox/Textbox.js +16 -5
  99. package/src/components/bs5/textbox/Textbox.stories.js +26 -51
  100. package/src/components/bs5/textbox/textInput.scss +12 -232
  101. package/src/components/bs5/textbox/textbox.data.json +13 -10
  102. package/src/components/bs5/textbox/textbox.hbs +17 -18
  103. package/src/components/bs5/typography/typography.stories.js +1 -1
  104. package/src/css/functions/_index.scss +2 -0
  105. package/src/css/functions/remify.scss +32 -0
  106. package/src/css/functions/snap-line-height.scss +7 -0
  107. package/src/css/main.scss +1 -1
  108. package/src/css/mixins/focusable.scss +4 -1
  109. package/src/css/mixins/make-icon.scss +1 -1
  110. package/src/css/{qld-theme.scss → qld-palettes.scss} +30 -23
  111. package/src/js/handlebars.helpers.js +9 -1
  112. package/src/js/utils.js +142 -0
  113. package/src/components/bs5/formcheck/_formcheck.stories.bak.js +0 -432
@@ -1,101 +1,75 @@
1
1
  // ComponentExample.stories.js
2
- import { Textarea } from "./Textarea.js";
2
+ import { Textarea, argTypes } from "./Textarea.js";
3
3
  import defaultdata from "./textarea.data.json";
4
4
 
5
5
  export default {
6
6
  tags: ["autodocs"],
7
- title: "3. Components/Forms/Textarea",
7
+ title: "3. Components/Forms/Text Area",
8
8
  render: (args) => {
9
-
10
- //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
9
+ //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
11
10
  //We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
12
11
 
13
- if( typeof(args.customClass) === 'string' ) {
14
- args.customClass = args.customClass.replaceAll(","," ");
15
- } else if ( typeof(args.customClass) === 'object' ) {
12
+ if (typeof args.customClass === "string") {
13
+ args.customClass = args.customClass.replaceAll(",", " ");
14
+ } else if (typeof args.customClass === "object") {
16
15
  args.customClass = args.customClass.join(" ");
17
16
  }
18
-
17
+
19
18
  return new Textarea(args).html;
20
-
21
19
  },
22
-
20
+ parameters: { backgrounds: { disable: false } },
21
+ globals: { backgrounds: { value: "default" } },
23
22
  //https://storybook.js.org/docs/api/arg-types
24
- argTypes: {
25
- },
23
+ argTypes,
26
24
  };
27
25
 
28
26
  /**
29
- * Default textarea
27
+ * Default palette
30
28
  */
31
29
  export const Default = {
32
30
  args: defaultdata,
33
31
  };
34
32
 
35
33
  /**
36
- * Dark themed textarea
34
+ * Dark palette
37
35
  */
38
36
  export const Dark = {
39
- args: {
40
- ...defaultdata,
41
- ...{isDisabled: false},
42
- },
43
- parameters: {
44
- backgrounds: {
45
- default: 'Dark',
46
- values: [
47
- { name: 'Dark', value: 'var(--qld-brand-primary)' },
48
- ],
49
- },
37
+ args: {
38
+ ...defaultdata,
39
+ isDisabled: false,
50
40
  },
51
- decorators: [
52
- (Story) => {
53
- return `
54
- <div class="dark">
55
- ${Story()}
56
- </div>
57
- `;
58
- },
59
- ],
41
+ globals: { backgrounds: { value: "dark" } },
42
+ render: (args) => `<div class="dark">${new Textarea(args).html}</div>`,
60
43
  };
61
44
 
62
45
  /**
63
- * Filled style textarea
46
+ * Add `customClass: "form-style-filled"`
64
47
  */
65
48
  export const Filled = {
66
- args: {
67
- ...defaultdata,
68
- ...{customClass: "form-style-filled"},
49
+ args: {
50
+ ...defaultdata,
51
+ isFilled: true,
69
52
  },
70
53
  };
71
54
 
72
-
73
- /**
74
- * Disabled textarea
75
- */
76
55
  export const Disabled = {
77
- args: {
78
- ...defaultdata,
79
- ...{isDisabled: true, isRequired: false},
56
+ args: {
57
+ ...defaultdata,
58
+ isDisabled: true,
59
+ isRequired: false,
80
60
  },
81
61
  };
82
62
 
83
- /**
84
- * Valid textbox
85
- */
86
63
  export const Valid = {
87
64
  args: {
88
- ...defaultdata,
89
- ...{customClass: "qld-input-success"},
65
+ ...defaultdata,
66
+ isValid: true,
90
67
  },
91
68
  };
92
69
 
93
- /**
94
- * Invalid textbox
95
- */
96
70
  export const Invalid = {
97
71
  args: {
98
- ...defaultdata,
99
- ...{customClass: "qld-input-error"},
72
+ ...defaultdata,
73
+ isValid: false,
100
74
  },
101
75
  };
@@ -1,13 +1,16 @@
1
1
  {
2
- "isDisabled": false,
3
- "isRequired": true,
4
- "isFilled": false,
5
- "customClass": "",
6
- "rows": 3,
7
- "label-text": "Label",
8
- "placeholder": "Leave a comment here",
9
- "optional-text": "optional",
10
- "hint-text": "Hint",
11
- "successMessageText": "Success message",
12
- "errorMessageText": "Error message"
2
+ "id": "example-1",
3
+ "value": "",
4
+ "isDisabled": false,
5
+ "isRequired": true,
6
+ "isValid": null,
7
+ "isFilled": false,
8
+ "customClass": "",
9
+ "rows": 3,
10
+ "label-text": "Label",
11
+ "placeholder": "",
12
+ "optional-text": "optional",
13
+ "hint-text": "Hint",
14
+ "successMessageText": "Success message",
15
+ "errorMessageText": "Error message"
13
16
  }
@@ -1,32 +1,32 @@
1
1
  <!-- QGDS Component: Textarea -->
2
2
 
3
- <!-- Label for the first input field -->
4
3
  <label class="qld-text-input-label {{#if isRequired}}field-required{{/if}} {{#if isDisabled}}field-disabled{{/if}}"
5
- for="example-1">
4
+ for="{{id}}">
6
5
  {{label-text}}
7
6
  {{#if optional-text}}
8
7
  <span class="label-text-optional">({{optional-text}})</span>
9
8
  {{/if}}
10
9
  </label>
11
10
 
12
- <!-- Hint text for the first input field -->
13
11
  {{#if hint-text}}
14
- <span class="qld-hint-text" id="example-1-hint">{{hint-text}}</span>
12
+ <span class="qld-hint-text" id="{{id}}-hint">{{hint-text}}</span>
15
13
  {{/if}}
16
14
 
17
- {{#contains "qld-input-success" customClass}}
18
- <span id="text-field-success" class="qld-input-success">
19
- {{successMessageText}}
20
- </span>
21
- {{/contains}}
15
+ {{#contains "qld-input-success" customClass}}{{! legacy support for feedback classes `qld-input-success`}}
16
+ <span class="qld-input-success">{{successMessageText}}</span>
17
+ {{else}}
18
+ {{#if successMessageText}}{{! updated bootstrap style classes - `valid-feedback`}}
19
+ <div class="valid-feedback">{{successMessageText}}</div>
20
+ {{/if}}{{/contains}}
22
21
 
23
- {{#contains "qld-input-error" customClass}}
24
- <span id="text-field-error" class="qld-input-error">
25
- {{errorMessageText}}
26
- </span>
27
- {{/contains}}
22
+ {{#contains "qld-input-error" customClass}}{{! legacy support for feedback classes `qld-input-error`}}
23
+ <span class="qld-input-error">{{errorMessageText}}</span>
24
+ {{else}}
25
+ {{#if errorMessageText}}{{! updated bootstrap style classes - `invalid-feedback`}}
26
+ <div class="invalid-feedback">{{errorMessageText}}</div>
27
+ {{/if}}{{/contains}}
28
28
 
29
29
  <!-- First text input field, described by the hint text above -->
30
- <textarea id="example-1" class="qld-text-input form-control {{customClass}} {{#if isFilled}}form-style-filled{{/if}}"
31
- placeholder="{{placeholder}}" rows="{{rows}}" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required
32
- aria-required="true" {{/if}}></textarea>
30
+ <textarea id="{{id}}" class="form-control {{customClass}} {{#if isFilled}}is-filled{{/if}} {{#if isValid}}is-valid{{else}}{{#ifCond isValid "===" false}}is-invalid{{/ifCond}}{{/if}}"
31
+ placeholder="{{placeholder}}" rows="{{rows}}" {{#if isDisabled}}disabled{{/if}} {{#if isRequired}}required{{/if}}
32
+ {{#if hint-text}}aria-describedby="{{id}}-hint"{{/if}}>{{value}}</textarea>
@@ -1,13 +1,24 @@
1
- import Component from '../../../js/QGDSComponent.js'
1
+ import Component from "../../../js/QGDSComponent.js";
2
2
  import template from "./textbox.hbs?raw";
3
3
 
4
+ /**
5
+ * Named `Text input` in Design system.
6
+ */
4
7
  export class Textbox {
5
-
6
8
  // Use the global Component class to create a new instance of the Textbox component.
7
- // A data object, containing the Handlebars placeholder replacement strings, should be provided as an argument.
9
+ // A data object, containing the Handlebars placeholder replacement strings, should be provided as an argument.
8
10
 
9
- constructor( data = {} ) {
11
+ constructor(data = {}) {
10
12
  return new Component(template, data);
11
13
  }
12
-
13
14
  }
15
+
16
+ export const argTypes = {
17
+ isValid: {
18
+ description:
19
+ "For server-side validation, set to true or false. Omit or set to null to to indicate the input is yet to be validated.",
20
+ control: "radio",
21
+ options: [true, false, null],
22
+ type: "boolean | null",
23
+ },
24
+ };
@@ -1,45 +1,26 @@
1
1
  // ComponentExample.stories.js
2
- import { Textbox } from "./Textbox.js";
2
+ import { Textbox, argTypes } from "./Textbox.js";
3
3
  import defaultdata from "./textbox.data.json";
4
4
 
5
5
  export default {
6
6
  tags: ["autodocs"],
7
- title: "3. Components/Forms/Textbox",
7
+ title: "3. Components/Forms/Text input",
8
8
  render: (args) => {
9
-
10
- //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
9
+ //Storybook produces a comma delimited string when using the check control type (table-striped, table-bordered) etc.
11
10
  //We can't use commas on our class="..." attribute, so we need to replace the commas with spaces.
12
11
 
13
- if( typeof(args.customClass) === 'string' ) {
14
- args.customClass = args.customClass.replaceAll(","," ");
15
- } else if ( typeof(args.customClass) === 'object' ) {
12
+ if (typeof args.customClass === "string") {
13
+ args.customClass = args.customClass.replaceAll(",", " ");
14
+ } else if (typeof args.customClass === "object") {
16
15
  args.customClass = args.customClass.join(" ");
17
16
  }
18
-
17
+
19
18
  return new Textbox(args).html;
20
-
21
19
  },
22
-
20
+ parameters: { backgrounds: { disable: false } },
21
+ globals: { backgrounds: { value: "default" } },
23
22
  //https://storybook.js.org/docs/api/arg-types
24
- argTypes: {
25
- states: {
26
- name: "States",
27
- description: `Valid/Invalid states`,
28
- control: {
29
- type: "radio",
30
- labels: {
31
- "default": "Default",
32
- "qld-input-success": "Success",
33
- "qld-input-error": "Error",
34
- },
35
- },
36
- options: [
37
- "default",
38
- "qld-input-success",
39
- "qld-input-error",
40
- ],
41
- },
42
- },
23
+ argTypes,
43
24
  };
44
25
 
45
26
  /**
@@ -53,18 +34,11 @@ export const Default = {
53
34
  * Dark themed textbox
54
35
  */
55
36
  export const Dark = {
56
- args: {
57
- ...defaultdata,
58
- ...{isDisabled: false},
59
- },
60
- parameters: {
61
- backgrounds: {
62
- default: 'Dark',
63
- values: [
64
- { name: 'Dark', value: 'var(--qld-brand-primary)' },
65
- ],
66
- },
37
+ args: {
38
+ ...defaultdata,
39
+ ...{ isDisabled: false },
67
40
  },
41
+ globals: { backgrounds: { value: "dark" } },
68
42
  decorators: [
69
43
  (Story) => {
70
44
  return `
@@ -80,20 +54,19 @@ export const Dark = {
80
54
  * Filled style textbox
81
55
  */
82
56
  export const Filled = {
83
- args: {
84
- ...defaultdata,
85
- ...{customClass: "form-style-filled"},
57
+ args: {
58
+ ...defaultdata,
59
+ customClass: "form-style-filled",
86
60
  },
87
61
  };
88
62
 
89
-
90
63
  /**
91
64
  * Disabled textbox
92
65
  */
93
66
  export const Disabled = {
94
- args: {
95
- ...defaultdata,
96
- ...{isDisabled: true},
67
+ args: {
68
+ ...defaultdata,
69
+ isDisabled: true,
97
70
  },
98
71
  };
99
72
 
@@ -102,8 +75,9 @@ export const Disabled = {
102
75
  */
103
76
  export const Valid = {
104
77
  args: {
105
- ...defaultdata,
106
- ...{customClass: "qld-input-success"},
78
+ ...defaultdata,
79
+ isValid: true,
80
+ // ...{ customClass: "qld-input-success" },
107
81
  },
108
82
  };
109
83
 
@@ -112,7 +86,8 @@ export const Valid = {
112
86
  */
113
87
  export const Invalid = {
114
88
  args: {
115
- ...defaultdata,
116
- ...{customClass: "qld-input-error"},
89
+ ...defaultdata,
90
+ isValid: false,
91
+ // ...{ customClass: "qld-input-error" },
117
92
  },
118
93
  };
@@ -1,7 +1,7 @@
1
+ @use "../../../css/functions" as f;
2
+
1
3
  .qld-text-input {
2
- padding: 12px 16px;
3
- border-radius: 4px;
4
- border: 2px solid $qld-soft-grey;
4
+ @extend %form-control;
5
5
 
6
6
  @media (prefers-color-scheme: dark) {
7
7
  --table-row-border-color: var(--qld-white);
@@ -9,44 +9,18 @@
9
9
 
10
10
  //Table dark
11
11
  @include table-variant("dark", $qld-brand-primary);
12
-
13
- &:hover {
14
- background-color: $qld-extra-light-grey;
15
- border-color: $qld-textbox-border-color;
16
- }
17
-
18
- &:focus {
19
- outline: 3px solid $qld-light-blue;
20
- outline-offset: 2px;
21
- background-color: $qld-white !important;
22
- border: 2px solid $qld-light-grey !important;
23
- }
24
-
25
- &.form-style-filled {
26
- background-color: $qld-light-grey-alt;
27
- border-width: 0 0 2px 0;
28
- border-bottom-left-radius: 0;
29
- border-bottom-right-radius: 0;
30
-
31
- &:focus {
32
- border-radius: 4px;
33
- }
34
- }
35
-
36
- &:disabled {
37
- cursor: not-allowed;
38
- opacity: 0.5;
39
- }
40
12
  }
41
13
 
42
14
  .qld-text-input-label {
43
15
  color: var(--#{$prefix}text-grey);
44
16
  display: block;
17
+ font-size: 1rem;
45
18
  font-weight: 600;
46
- line-height: 1.5;
47
- margin-bottom: 0.5rem;
19
+ line-height: $input-line-height;
20
+ margin-bottom: f.remify(8px);
48
21
 
49
22
  .label-text-optional {
23
+ font-size: f.remify(14px);
50
24
  color: $qld-dark-grey-muted;
51
25
  font-weight: 400;
52
26
  }
@@ -64,146 +38,19 @@
64
38
  }
65
39
  }
66
40
 
67
- * + .qld-hint-text,
68
- * + .qld-input-error,
69
- * + .qld-input-success,
70
41
  * + .date-container {
71
- margin-top: 8px;
42
+ margin-top: f.remify(4px);
72
43
  }
73
44
 
74
45
  .qld-hint-text {
75
46
  color: $qld-hint-text-color;
76
47
  display: block;
77
- font-size: 1em;
78
- line-height: 1.5;
79
- margin-bottom: 0.5rem;
80
- }
81
-
82
- * + p.qld-input-error,
83
- * + span.qld-input-error,
84
- * + p.qld-input-success,
85
- * + span.qld-input-success {
86
- font-size: 1rem;
87
- line-height: 1.5;
88
- display: flex;
89
- flex-wrap: wrap;
90
- margin-left: -6px;
91
- align-items: center;
92
- }
93
-
94
- span.qld-input-success {
95
- &:before {
96
- content: "";
97
- height: 2rem;
98
- width: 2rem;
99
- transform: scale(0.6);
100
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' enable-background='new 0 0 64 64'%3E%3Cpath d='M32,2C15.431,2,2,15.432,2,32c0,16.568,13.432,30,30,30c16.568,0,30-13.432,30-30C62,15.432,48.568,2,32,2z M25.025,50 l-0.02-0.02L24.988,50L11,35.6l7.029-7.164l6.977,7.184l21-21.619L53,21.199L25.025,50z' fill='%2343a047'/%3E%3C/svg%3E");
101
- }
102
- }
103
-
104
- span.qld-input-error {
105
- color: $qld-notify-warning;
106
-
107
- &:before {
108
- content: "";
109
- height: 2rem;
110
- width: 2rem;
111
- //background-image: url('../../../img/icon-exclamation.svg');
112
- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z' fill='%23E22339'/%3E%3Cpath d='M11 18C11 17.4477 11.4477 17 12 17C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18Z' fill='white'/%3E%3Cpath d='M11 5C11 4.44771 11.4477 4 12 4C12.5523 4 13 4.44772 13 5V14C13 14.5523 12.5523 15 12 15C11.4477 15 11 14.5523 11 14V5Z' fill='white'/%3E%3C/svg%3E");
113
- background-repeat: no-repeat;
114
- transform: scale(0.6);
115
- }
116
-
117
- .dark & {
118
- color: $qld-color-error-light;
119
- }
120
- }
121
-
122
- .qld-hint-text + select,
123
- .qld-hint-text + input,
124
- .qld-hint-text + textarea,
125
- .sq-form-question-note + select,
126
- .sq-form-question-note + input,
127
- .sq-form-question-note + textarea {
128
- margin-top: 0.5rem;
129
- }
130
-
131
- .qld-input-success + input[type="text"],
132
- .qld-input-error + input[type="text"],
133
- .qld-input-success + input[type="email"],
134
- .qld-input-error + input[type="email"],
135
- .qld-input-success + input[type="date"],
136
- .qld-input-error + input[type="date"],
137
- .qld-input-success + .qld-text-input,
138
- .qld-input-error + .qld-text-input,
139
- .qld-input-success + textarea,
140
- .qld-input-error + textarea {
141
- margin-top: 8px;
142
- margin-top: 0.5rem;
143
- }
144
-
145
- input.qld-text-input.qld-input-error:not(:focus),
146
- input.qld-text-input.qld-input-error.form-style-filled:not(:focus),
147
- textarea.qld-text-input.qld-input-error:not(:focus),
148
- select.qld-select.qld-input-error:not(:focus) {
149
- border-color: $qld-notify-warning;
150
- background-color: $qld-color-error-light;
151
- color: $qld-text-grey;
152
- }
153
-
154
- input.qld-text-input.qld-input-success:not(:focus),
155
- input.qld-text-input.qld-input-success.form-style-filled:not(:focus),
156
- textarea.qld-text-input.qld-input-success:not(:focus),
157
- select.qld-select.qld-input-success:not(:focus) {
158
- border-color: $qld-notify-success;
159
- background-color: $qld-color-success-light;
160
- color: $qld-text-grey;
161
- }
162
-
163
- .qld-select {
164
- padding: 12px 18px;
165
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23008635' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
166
- background-repeat: no-repeat;
167
- appearance: none;
168
- background-position: right 11px center;
169
- background-size: 1rem auto;
170
- width: 100%;
171
- color: var(--#{$prefix}color-default-color-light-text-lighter);
172
-
173
- &.disabled,
174
- &:disabled {
175
- background-color: var(
176
- --#{$prefix}color-default-color-light-background-default-shade
177
- );
178
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23636363' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
179
- }
180
-
181
- &.qld-input-error {
182
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23E22339' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
183
-
184
- &:not([multiple]):not([size]),
185
- &:not([multiple])[size="1"] {
186
- background-size: 1rem auto;
187
- }
188
- }
189
-
190
- &.qld-input-success {
191
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23339d37' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
192
-
193
- &:not([multiple]):not([size]),
194
- &:not([multiple])[size="1"] {
195
- background-size: 1rem auto;
196
- }
197
- }
48
+ font-size: f.remify(14px);
49
+ line-height: f.snap-line-height(1.5);
50
+ margin-block: f.remify(8px);
198
51
  }
199
52
 
200
- .qld-input-success {
201
- @extend .is-valid;
202
- }
203
-
204
- .qld-input-error {
205
- @extend .is-invalid;
206
- }
53
+ // .qld-select style moved to formcheck.scss
207
54
 
208
55
  @include media-breakpoint-up(md) {
209
56
  input.qld-field-width-1-quarter,
@@ -223,73 +70,6 @@ select.qld-select.qld-input-success:not(:focus) {
223
70
  }
224
71
 
225
72
  .dark {
226
- .form-control.qld-text-input:not(:hover):not(:focus):not(
227
- .qld-input-error
228
- ):not(.qld-input-success)::-webkit-input-placeholder {
229
- color: $qld-hint-text-color-muted;
230
- }
231
-
232
- .form-control.qld-text-input:not(:hover):not(:focus):not(
233
- .qld-input-error
234
- ):not(.qld-input-success)::-moz-placeholder {
235
- color: $qld-hint-text-color-muted;
236
- }
237
-
238
- .form-control.qld-text-input:not(:hover):not(:focus):not(
239
- .qld-input-error
240
- ):not(.qld-input-success)::-ms-placeholder {
241
- color: $qld-hint-text-color-muted;
242
- }
243
-
244
- .form-control.qld-text-input:not(:hover):not(:focus):not(
245
- .qld-input-error
246
- ):not(.qld-input-success)::placeholder {
247
- color: $qld-hint-text-color-muted;
248
- }
249
-
250
- .form-control.qld-text-input:hover:not(:focus):not(.qld-input-error):not(
251
- .qld-input-success
252
- )::-webkit-input-placeholder {
253
- color: $qld-white;
254
- }
255
-
256
- .form-control.qld-text-input:hover:not(:focus):not(.qld-input-error):not(
257
- .qld-input-success
258
- )::-moz-placeholder {
259
- color: $qld-white;
260
- }
261
-
262
- .form-control.qld-text-input:hover:not(:focus):not(.qld-input-error):not(
263
- .qld-input-success
264
- )::-ms-placeholder {
265
- color: $qld-white;
266
- }
267
-
268
- .form-control.qld-text-input:hover:not(:focus):not(.qld-input-error):not(
269
- .qld-input-success
270
- )::placeholder {
271
- color: $qld-white;
272
- }
273
- }
274
-
275
- .dark {
276
- .qld-text-input {
277
- border-color: $qld-dark-alt-border;
278
- background-color: var(--qld-dark-background);
279
- color: $qld-hint-text-color-muted;
280
-
281
- &:hover {
282
- color: $qld-white;
283
- background-color: $qld-color-dark-background--shade;
284
- border-color: $color-default-color-dark-action-primary-hover;
285
- }
286
-
287
- &:focus {
288
- outline: 3px solid $qld-dark-focus;
289
- color: $qld-text-grey;
290
- }
291
- }
292
-
293
73
  .qld-select {
294
74
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23FFEF60' d='M4.251 181.1C7.392 177.7 11.69 175.1 16 175.1c3.891 0 7.781 1.406 10.86 4.25l197.1 181.1l197.1-181.1c6.5-6 16.64-5.625 22.61 .9062c6 6.5 5.594 16.59-.8906 22.59l-208 192c-6.156 5.688-15.56 5.688-21.72 0l-208-192C-1.343 197.7-1.749 187.6 4.251 181.1z'/%3E%3C/svg%3E");
295
75
  }
@@ -1,12 +1,15 @@
1
1
  {
2
- "isDisabled": false,
3
- "isRequired": true,
4
- "isFilled": false,
5
- "customClass": "",
6
- "label-text": "Label",
7
- "placeholder": "Hello World",
8
- "optional-text": "optional",
9
- "hint-text": "Hint",
10
- "successMessageText": "Success message",
11
- "errorMessageText": "Error message"
2
+ "id": "example-1",
3
+ "value": "",
4
+ "isDisabled": false,
5
+ "isRequired": true,
6
+ "isValid": null,
7
+ "isFilled": false,
8
+ "customClass": "",
9
+ "label-text": "Label",
10
+ "placeholder": "",
11
+ "optional-text": "optional",
12
+ "hint-text": "Hint",
13
+ "successMessageText": "Success message",
14
+ "errorMessageText": "Error message"
12
15
  }