@iamproperty/components 7.5.1--beta8 → 7.5.1--beta10

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 (150) hide show
  1. package/assets/css/components/actionbar.component.css +1 -1
  2. package/assets/css/components/actionbar.component.css.map +1 -1
  3. package/assets/css/components/actionbar.global.css.map +1 -1
  4. package/assets/css/components/address-lookup.component.css +1 -1
  5. package/assets/css/components/address-lookup.component.css.map +1 -1
  6. package/assets/css/components/applied-filters.css.map +1 -1
  7. package/assets/css/components/barchart.component.css.map +1 -1
  8. package/assets/css/components/calendar.component.css +1 -1
  9. package/assets/css/components/calendar.component.css.map +1 -1
  10. package/assets/css/components/calendar.config.css.map +1 -1
  11. package/assets/css/components/card.component.css.map +1 -1
  12. package/assets/css/components/carousel.component.css.map +1 -1
  13. package/assets/css/components/carousel.config.css.map +1 -1
  14. package/assets/css/components/charts.config.css.map +1 -1
  15. package/assets/css/components/collapsible-side.css.map +1 -1
  16. package/assets/css/components/content.component.css.map +1 -1
  17. package/assets/css/components/doughnutchart.component.css.map +1 -1
  18. package/assets/css/components/fileupload.css +1 -1
  19. package/assets/css/components/fileupload.css.map +1 -1
  20. package/assets/css/components/header.css.map +1 -1
  21. package/assets/css/components/inline-edit.css.map +1 -1
  22. package/assets/css/components/inline-edit.preload.css.map +1 -1
  23. package/assets/css/components/marketing.component.css.map +1 -1
  24. package/assets/css/components/menu.global.css.map +1 -1
  25. package/assets/css/components/modal.component.css.map +1 -1
  26. package/assets/css/components/multi-step-modal.component.css.map +1 -1
  27. package/assets/css/components/multi-step-modal.global.css.map +1 -1
  28. package/assets/css/components/multi-step.component.css.map +1 -1
  29. package/assets/css/components/multiselect.css +1 -1
  30. package/assets/css/components/multiselect.css.map +1 -1
  31. package/assets/css/components/multiselect.preload.css.map +1 -1
  32. package/assets/css/components/nav.component.css +1 -1
  33. package/assets/css/components/nav.component.css.map +1 -1
  34. package/assets/css/components/nav.docs.css.map +1 -1
  35. package/assets/css/components/nav.global.css.map +1 -1
  36. package/assets/css/components/nav.preload.css.map +1 -1
  37. package/assets/css/components/notification.css.map +1 -1
  38. package/assets/css/components/pagination.css +1 -1
  39. package/assets/css/components/pagination.css.map +1 -1
  40. package/assets/css/components/property-searchbar.css.map +1 -1
  41. package/assets/css/components/rank.component.css.map +1 -1
  42. package/assets/css/components/rankings.component.css.map +1 -1
  43. package/assets/css/components/rankings.global.css.map +1 -1
  44. package/assets/css/components/slider.css +1 -1
  45. package/assets/css/components/slider.css.map +1 -1
  46. package/assets/css/components/snapshot.css.map +1 -1
  47. package/assets/css/components/split-button.component.css.map +1 -1
  48. package/assets/css/components/stepper.css.map +1 -1
  49. package/assets/css/components/table-basic.component.css.map +1 -1
  50. package/assets/css/components/table-basic.global.css +1 -1
  51. package/assets/css/components/table-basic.global.css.map +1 -1
  52. package/assets/css/components/table.component.css.map +1 -1
  53. package/assets/css/components/table.global.css +1 -1
  54. package/assets/css/components/table.global.css.map +1 -1
  55. package/assets/css/components/tabs.component.css +1 -1
  56. package/assets/css/components/tabs.component.css.map +1 -1
  57. package/assets/css/components/tabs.config.css.map +1 -1
  58. package/assets/css/components/testimonial.css.map +1 -1
  59. package/assets/css/components/timeline.css.map +1 -1
  60. package/assets/css/core.min.css +1 -1
  61. package/assets/css/core.min.css.map +1 -1
  62. package/assets/css/mobile-core.min.css +1 -1
  63. package/assets/css/mobile-core.min.css.map +1 -1
  64. package/assets/css/mobile.min.css +1 -1
  65. package/assets/css/mobile.min.css.map +1 -1
  66. package/assets/css/style.min.css +1 -1
  67. package/assets/css/style.min.css.map +1 -1
  68. package/assets/js/components/accordion/accordion.component.min.js +1 -1
  69. package/assets/js/components/actionbar/actionbar.component.min.js +4 -4
  70. package/assets/js/components/address-lookup/address-lookup.component.min.js +4 -4
  71. package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
  72. package/assets/js/components/advanced-select/advanced-select.component.min.js +3 -3
  73. package/assets/js/components/advanced-select/advanced-select.component.min.js.map +1 -1
  74. package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
  75. package/assets/js/components/barchart/barchart.component.min.js +1 -1
  76. package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
  77. package/assets/js/components/calendar/calendar.component.min.js +2 -2
  78. package/assets/js/components/card/card.component.min.js +1 -1
  79. package/assets/js/components/carousel/carousel.component.min.js +1 -1
  80. package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
  81. package/assets/js/components/content/content.component.min.js +1 -1
  82. package/assets/js/components/darkmode/darkmode.component.js +5 -1
  83. package/assets/js/components/darkmode/darkmode.component.min.js +2 -2
  84. package/assets/js/components/darkmode/darkmode.component.min.js.map +1 -1
  85. package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
  86. package/assets/js/components/fileupload/fileupload.component.min.js +3 -3
  87. package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
  88. package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
  89. package/assets/js/components/header/header.component.min.js +1 -1
  90. package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
  91. package/assets/js/components/input/input.component.js +82 -1
  92. package/assets/js/components/input/input.component.min.js +4 -4
  93. package/assets/js/components/input/input.component.min.js.map +1 -1
  94. package/assets/js/components/input-range/input-range.component.min.js +1 -1
  95. package/assets/js/components/marketing/marketing.component.min.js +1 -1
  96. package/assets/js/components/menu/menu.component.min.js +1 -1
  97. package/assets/js/components/milestone/milestone.component.min.js +1 -1
  98. package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
  99. package/assets/js/components/modal/modal.component.min.js +1 -1
  100. package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
  101. package/assets/js/components/multi-step-modal/multi-step-modal.component.min.js +1 -1
  102. package/assets/js/components/multiselect/multiselect.component.min.js +2 -2
  103. package/assets/js/components/nav/nav.component.min.js +2 -2
  104. package/assets/js/components/notification/notification.component.min.js +1 -1
  105. package/assets/js/components/pagination/pagination.component.min.js +2 -2
  106. package/assets/js/components/password/password.component.min.js +1 -1
  107. package/assets/js/components/rank/rank.component.min.js +1 -1
  108. package/assets/js/components/rankings/rankings.component.min.js +1 -1
  109. package/assets/js/components/record-card/record-card.component.min.js +1 -1
  110. package/assets/js/components/search/search.component.min.js +5 -5
  111. package/assets/js/components/search/search.component.min.js.map +1 -1
  112. package/assets/js/components/slider/slider.component.min.js +2 -2
  113. package/assets/js/components/split-button/split-button.component.min.js +1 -1
  114. package/assets/js/components/std-address-lookup/std-address-lookup.component.js +1 -1
  115. package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +7 -7
  116. package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js.map +1 -1
  117. package/assets/js/components/table/table.component.min.js +5 -5
  118. package/assets/js/components/table/table.component.min.js.map +1 -1
  119. package/assets/js/components/table-ajax/table-ajax.component.min.js +5 -5
  120. package/assets/js/components/table-ajax/table-ajax.component.min.js.map +1 -1
  121. package/assets/js/components/table-basic/table-basic.component.min.js +3 -3
  122. package/assets/js/components/table-basic/table-basic.component.min.js.map +1 -1
  123. package/assets/js/components/table-no-submit/table-no-submit.component.min.js +2 -2
  124. package/assets/js/components/table-no-submit/table-no-submit.component.min.js.map +1 -1
  125. package/assets/js/components/table-submit/table-submit.component.min.js +3 -3
  126. package/assets/js/components/table-submit/table-submit.component.min.js.map +1 -1
  127. package/assets/js/components/tabs/tabs.component.min.js +4 -4
  128. package/assets/js/components/video-card/video-card.component.min.js +1 -1
  129. package/assets/js/components/word-count/word-count.component.min.js +1 -1
  130. package/assets/js/modules/advanced-select.js +6 -0
  131. package/assets/js/modules/table.js +49 -163
  132. package/assets/js/scripts.bundle.js +1 -1
  133. package/assets/js/scripts.bundle.min.js +1 -1
  134. package/assets/sass/_elements.scss +5 -0
  135. package/assets/sass/_functions/mixins.scss +53 -0
  136. package/assets/sass/components/actionbar.component.scss +8 -1
  137. package/assets/sass/components/address-lookup.component.scss +1 -0
  138. package/assets/sass/components/table-basic.global.scss +0 -6
  139. package/assets/sass/elements/feature.scss +53 -0
  140. package/assets/sass/elements/forms.scss +10 -187
  141. package/assets/sass/elements/input.scss +177 -0
  142. package/assets/sass/elements/links.scss +7 -1
  143. package/assets/ts/components/darkmode/darkmode.component.ts +6 -2
  144. package/assets/ts/components/input/input.component.ts +109 -1
  145. package/assets/ts/components/std-address-lookup/std-address-lookup.component.ts +1 -1
  146. package/assets/ts/modules/advanced-select.ts +8 -0
  147. package/assets/ts/modules/table.ts +16 -163
  148. package/dist/components.es.js +29 -29
  149. package/dist/components.umd.js +107 -107
  150. package/package.json +4 -4
@@ -5,6 +5,7 @@
5
5
  @use 'sass:string';
6
6
 
7
7
  @use 'variables' as *;
8
+ @use 'functions' as *;
8
9
 
9
10
  // Utility generator
10
11
  // Used to generate utilities & print utilities
@@ -588,3 +589,55 @@
588
589
  @content;
589
590
  }
590
591
  }
592
+ @mixin input {
593
+ display: block;
594
+ width: 100%;
595
+ display: block;
596
+ width: 100%;
597
+ padding: var(--input-padding-block, #{rem(12)}) var(--input-padding-inline, #{rem(16)});
598
+ font-size: var(--input-fs, #{rem(16)});
599
+ line-height: var(--input-lh, #{rem(20)});
600
+ color: var(--colour-heading);
601
+ background-color: var(--colour-canvas-2);
602
+ background-clip: padding-box;
603
+ border: 2px solid var(--colour-primary);
604
+ appearance: none; // Fix appearance for date inputs in Safari
605
+ border-radius: rem(8);
606
+ margin-bottom: rem(24);
607
+ min-height: calc(
608
+ var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) +
609
+ 4px
610
+ );
611
+ max-height: calc(
612
+ var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) +
613
+ 4px
614
+ );
615
+
616
+ &:is(textarea) {
617
+ max-height: 100%;
618
+ }
619
+
620
+ // Customize the `:focus` state to imitate native WebKit styles.
621
+ &:is(:focus, .focus):not(:disabled) {
622
+ border-color: var(--colour-info);
623
+ outline: 0;
624
+ }
625
+
626
+ &:is(:focus, .focus):not(:disabled):not(:invalid) {
627
+ box-shadow: 0 0 0 0.1rem rgba(30, 190, 230, 0.25);
628
+ }
629
+ // Add some height to date inputs on iOS
630
+ // https://github.com/twbs/bootstrap/issues/23307
631
+ // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
632
+ &::-webkit-date-and-time-value {
633
+ // Multiply line-height by 1em if it has no unit
634
+ height: if(math.unit($input-line-height) == '', $input-line-height * 1em, $input-line-height);
635
+ }
636
+
637
+ // Disabled inputs
638
+ &:disabled {
639
+ background-color: #ccd6d8;
640
+ opacity: 0.4;
641
+ cursor: not-allowed;
642
+ }
643
+ }
@@ -174,11 +174,13 @@ slot[name='selectall'] {
174
174
  ::slotted([data-single]) {
175
175
  pointer-events: none;
176
176
  opacity: 0.5;
177
+ cursor: not-allowed;
177
178
  }
178
179
 
179
180
  :host([data-selected='1']) ::slotted([data-single]) {
180
181
  pointer-events: all;
181
182
  opacity: 1;
183
+ cursor: pointer;
182
184
  }
183
185
 
184
186
  ::slotted(hr) {
@@ -341,12 +343,17 @@ slot[name='selectall'] {
341
343
  #saveColumns:not(:hover, :focus, :active) {
342
344
  background-color: var(--colour-warning);
343
345
  }
346
+ #saveColumns:is(:hover, :focus, :active) {
347
+ background-color: transparent;
348
+ color: var(--colour-heading);
349
+ border-color: var(--colour-warning);
350
+ }
344
351
  #cancelColumns:not(:hover, :focus, :active) {
345
352
  border-color: var(--colour-border);
346
353
  }
347
354
  }
348
355
 
349
- .fa-table-columns:has(+ dialog input:not(:checked)) {
356
+ .fa-table-columns:has(+ iam-menu input:not(:checked)) {
350
357
  overflow: visible;
351
358
  text-indent: -200vw;
352
359
 
@@ -1,6 +1,7 @@
1
1
  @use '../_func.scss' as *;
2
2
 
3
3
  @use '../elements/forms.scss' as *;
4
+ @use '../elements/prefix.scss' as *;
4
5
  @use '../elements/buttons.scss' as *;
5
6
  @use '../elements/links.scss' as *;
6
7
 
@@ -484,12 +484,6 @@ table {
484
484
  }
485
485
  }
486
486
 
487
- @container (width > 23.4375em) {
488
- tr:has([type='checkbox']:checked) {
489
- height: calc(4.625rem - 2px);
490
- }
491
- }
492
-
493
487
  tr:has([type='checkbox']:hover, [type='checkbox']:focus):not(:has(.tag)) {
494
488
  --row-bg: #eeeeee;
495
489
  }
@@ -0,0 +1,53 @@
1
+ @use '../_func' as *;
2
+
3
+ $layers: 'true' !default;
4
+ $mobileOnly: 'false' !default;
5
+ $darkMode: 'true' !default;
6
+
7
+ @include layer('elements', $layers) {
8
+
9
+
10
+ .feature {
11
+
12
+ background-color: var(--colour-canvas-2);
13
+ border: 1px solid var(--colour-border);
14
+ border-radius: 0.5rem;
15
+ padding: 1rem 1rem 1rem 1rem;
16
+
17
+ strong {
18
+ display: block;
19
+ padding-bottom: 0.2em;
20
+ }
21
+ }
22
+
23
+ .feature[class*="fa-"] {
24
+
25
+ padding-left: 4rem;
26
+ position: relative;
27
+
28
+ &:before {
29
+ position: absolute;
30
+ inset: 1rem;
31
+ content: var(--fa);
32
+ font-family: "Font Awesome 6 Pro";
33
+ display: block;
34
+
35
+ background-color: var(--colour-success);
36
+ border-radius: 50%;
37
+ padding: 0;
38
+ height: 2rem;
39
+ line-height: 2rem;
40
+ width: 2rem;
41
+ text-align: center;
42
+ }
43
+ }
44
+
45
+ .feature[class*="fa-rocket"] {
46
+
47
+ &:before {
48
+
49
+ padding-right: 0.1rem;
50
+ }
51
+ }
52
+
53
+ }
@@ -3,6 +3,9 @@
3
3
 
4
4
  @use '../_func' as *;
5
5
 
6
+ @use 'input' as *;
7
+
8
+
6
9
  $icon-error: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d='M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c-8.8 0-16 7.2-16 16V272c0 8.8 7.2 16 16 16s16-7.2 16-16V144c0-8.8-7.2-16-16-16zm24 224a24 24 0 1 0 -48 0 24 24 0 1 0 48 0z' fill='#dc3545'/></svg>");
7
10
 
8
11
  $icon-tick: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d='M441 103c9.4 9.4 9.4 24.6 0 33.9L177 401c-9.4 9.4-24.6 9.4-33.9 0L7 265c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l119 119L407 103c9.4-9.4 24.6-9.4 33.9 0z' fill='#0f9d58' /></svg>");
@@ -20,8 +23,6 @@ $optionalText: 'true' !default;
20
23
  }
21
24
 
22
25
  // 1. Remove the margin in Firefox and Safari
23
-
24
- input,
25
26
  select,
26
27
  optgroup,
27
28
  textarea {
@@ -50,26 +51,7 @@ $optionalText: 'true' !default;
50
51
  }
51
52
  }
52
53
 
53
- // Remove the dropdown arrow only from text type inputs built with datalists in Chrome.
54
- // See https://stackoverflow.com/a/54997118
55
-
56
- [list]:not([type='date']):not([type='datetime-local']):not([type='month']):not([type='week']):not(
57
- [type='time']
58
- )::-webkit-calendar-picker-indicator {
59
- display: none !important;
60
- }
61
-
62
- // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
63
- // controls in Android 4.
64
- // 2. Correct the inability to style clickable types in iOS and Safari.
65
- // 3. Opinionated: add "hand" cursor to non-disabled button elements.
66
-
67
- // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
68
-
69
- ::-moz-focus-inner {
70
- padding: 0;
71
- border-style: none;
72
- }
54
+
73
55
 
74
56
  // 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
75
57
 
@@ -91,97 +73,6 @@ $optionalText: 'true' !default;
91
73
  border: 0; // 2
92
74
  }
93
75
 
94
- // 1. By using `float: left`, the legend will behave like a block element.
95
- // This way the border of a fieldset wraps around the legend if present.
96
- // 2. Fix wrapping bug.
97
- // See https://github.com/twbs/bootstrap/issues/29712
98
-
99
- legend {
100
- float: left; // 1
101
- width: 100%;
102
- padding: 0;
103
- margin-bottom: $legend-margin-bottom;
104
- @include font-size($legend-font-size);
105
- font-weight: $legend-font-weight;
106
- line-height: inherit;
107
-
108
- + * {
109
- clear: left; // 2
110
- }
111
- }
112
-
113
- // Fix height of inputs with a type of datetime-local, date, month, week, or time
114
- // See https://github.com/twbs/bootstrap/issues/18842
115
-
116
- ::-webkit-datetime-edit-fields-wrapper,
117
- ::-webkit-datetime-edit-text,
118
- ::-webkit-datetime-edit-minute,
119
- ::-webkit-datetime-edit-hour-field,
120
- ::-webkit-datetime-edit-day-field,
121
- ::-webkit-datetime-edit-month-field,
122
- ::-webkit-datetime-edit-year-field {
123
- padding: 0;
124
- }
125
-
126
- ::-webkit-inner-spin-button {
127
- height: auto;
128
- }
129
-
130
- // 1. Correct the outline style in Safari.
131
- // 2. This overrides the extra rounded corners on search inputs in iOS so that our
132
- // `.form-control` class can properly style them. Note that this cannot simply
133
- // be added to `.form-control` as it's not specific enough. For details, see
134
- // https://github.com/twbs/bootstrap/issues/11586.
135
-
136
- [type='search'] {
137
- outline-offset: -2px; // 1
138
- -webkit-appearance: textfield; // 2
139
- }
140
-
141
- // 1. A few input types should stay LTR
142
- // See https://rtlstyling.com/posts/rtl-styling#form-inputs
143
- // 2. RTL only output
144
- // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
145
-
146
- /* rtl:raw:
147
- [type="tel"],
148
- [type="url"],
149
- [type="email"],
150
- [type="number"] {
151
- direction: ltr;
152
- }
153
- */
154
-
155
- // Remove the inner padding in Chrome and Safari on macOS.
156
-
157
- ::-webkit-search-decoration {
158
- -webkit-appearance: none;
159
- }
160
-
161
- // Remove padding around color pickers in webkit browsers
162
-
163
- ::-webkit-color-swatch-wrapper {
164
- padding: 0;
165
- }
166
-
167
- ::-moz-color-swatch {
168
- border-radius: 0;
169
- border: none;
170
- }
171
-
172
- ::-webkit-color-swatch {
173
- border-radius: 0;
174
- border: none;
175
- }
176
-
177
- // 1. Inherit font family and line height for file input buttons
178
- // 2. Correct the inability to style clickable types in iOS and Safari.
179
-
180
- ::file-selector-button {
181
- font: inherit; // 1
182
- -webkit-appearance: button; // 2
183
- }
184
-
185
76
  // Correct element displays
186
77
 
187
78
  output {
@@ -232,73 +123,13 @@ $optionalText: 'true' !default;
232
123
 
233
124
  // #region input field
234
125
  :is(
235
- input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
236
- textarea,
237
- output,
238
126
  select:not(.select--minimal, .btn)
239
127
  ) {
240
- display: block;
241
- width: 100%;
242
- display: block;
243
- width: 100%;
244
- padding: var(--input-padding-block, #{rem(12)}) var(--input-padding-inline, #{rem(16)});
245
- font-size: var(--input-fs, #{rem(16)});
246
- line-height: var(--input-lh, #{rem(20)});
247
- color: var(--colour-heading);
248
- background-color: var(--colour-canvas-2);
249
- background-clip: padding-box;
250
- border: 2px solid var(--colour-primary);
251
- appearance: none; // Fix appearance for date inputs in Safari
252
- border-radius: rem(8);
253
- margin-bottom: rem(24);
254
- min-height: calc(
255
- var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) +
256
- 4px
257
- );
258
- max-height: calc(
259
- var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) + var(--input-lh, #{rem(20)}) +
260
- 4px
261
- );
262
-
263
- &:is(textarea) {
264
- max-height: 100%;
265
- }
266
-
267
- // Customize the `:focus` state to imitate native WebKit styles.
268
- &:is(:focus, .focus):not(:disabled) {
269
- border-color: var(--colour-info);
270
- outline: 0;
271
- }
272
-
273
- &:is(:focus, .focus):not(:disabled):not(:invalid) {
274
- box-shadow: 0 0 0 0.1rem rgba(30, 190, 230, 0.25);
275
- }
276
- // Add some height to date inputs on iOS
277
- // https://github.com/twbs/bootstrap/issues/23307
278
- // TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
279
- &::-webkit-date-and-time-value {
280
- // Multiply line-height by 1em if it has no unit
281
- height: if(math.unit($input-line-height) == '', $input-line-height * 1em, $input-line-height);
282
- }
283
-
284
- // Disabled inputs
285
- &:disabled {
286
- background-color: #ccd6d8;
287
- opacity: 0.4;
288
- cursor: not-allowed;
289
- }
128
+
129
+ @include input();
290
130
  }
291
131
 
292
- input[type='color'] {
293
-
294
- padding: 0!important;
295
- max-width: 3rem!important;
296
- }
297
-
298
132
  [disabled] :is(
299
- input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
300
- textarea,
301
- output,
302
133
  select:not(.select--minimal, .btn)
303
134
  ) {
304
135
  background-color: #ccd6d8;
@@ -312,18 +143,6 @@ $optionalText: 'true' !default;
312
143
  cursor: not-allowed;
313
144
  pointer-events: none;
314
145
  }
315
-
316
- :is(input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range'])) {
317
- max-width: $input-max-width;
318
- }
319
-
320
- textarea {
321
- --textarea-height-scale: 3;
322
- min-height: calc(
323
- var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) +
324
- (var(--input-lh, #{rem(20)}) * var(--textarea-height-scale)) + 4px
325
- ) !important;
326
- }
327
146
  // #endregion
328
147
 
329
148
  // #region legend
@@ -1221,6 +1040,10 @@ $optionalText: 'true' !default;
1221
1040
  }
1222
1041
  }
1223
1042
 
1043
+ &:has(input:is([name$="Alt"]):not([data-value],[data-placeholder])) .empty {
1044
+ display: none;
1045
+ }
1046
+
1224
1047
  label:after,
1225
1048
  .hint-text {
1226
1049
  position: absolute;
@@ -0,0 +1,177 @@
1
+ @use 'sass:map';
2
+ @use 'sass:math';
3
+
4
+ @use '../_func' as *;
5
+
6
+
7
+ @layer elements {
8
+
9
+ input {
10
+ margin: 0; // 1
11
+ font-family: inherit;
12
+ @include font-size(inherit);
13
+ line-height: inherit;
14
+ }
15
+
16
+ // Remove the dropdown arrow only from text type inputs built with datalists in Chrome.
17
+ // See https://stackoverflow.com/a/54997118
18
+
19
+ [list]:not([type='date']):not([type='datetime-local']):not([type='month']):not([type='week']):not(
20
+ [type='time']
21
+ )::-webkit-calendar-picker-indicator {
22
+ display: none !important;
23
+ }
24
+
25
+ // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
26
+ // controls in Android 4.
27
+ // 2. Correct the inability to style clickable types in iOS and Safari.
28
+ // 3. Opinionated: add "hand" cursor to non-disabled button elements.
29
+
30
+ // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
31
+
32
+ ::-moz-focus-inner {
33
+ padding: 0;
34
+ border-style: none;
35
+ }
36
+
37
+ // 1. By using `float: left`, the legend will behave like a block element.
38
+ // This way the border of a fieldset wraps around the legend if present.
39
+ // 2. Fix wrapping bug.
40
+ // See https://github.com/twbs/bootstrap/issues/29712
41
+
42
+ legend {
43
+ float: left; // 1
44
+ width: 100%;
45
+ padding: 0;
46
+ margin-bottom: $legend-margin-bottom;
47
+ @include font-size($legend-font-size);
48
+ font-weight: $legend-font-weight;
49
+ line-height: inherit;
50
+
51
+ + * {
52
+ clear: left; // 2
53
+ }
54
+ }
55
+
56
+ // Fix height of inputs with a type of datetime-local, date, month, week, or time
57
+ // See https://github.com/twbs/bootstrap/issues/18842
58
+
59
+ ::-webkit-datetime-edit-fields-wrapper,
60
+ ::-webkit-datetime-edit-text,
61
+ ::-webkit-datetime-edit-minute,
62
+ ::-webkit-datetime-edit-hour-field,
63
+ ::-webkit-datetime-edit-day-field,
64
+ ::-webkit-datetime-edit-month-field,
65
+ ::-webkit-datetime-edit-year-field {
66
+ padding: 0;
67
+ }
68
+
69
+ ::-webkit-inner-spin-button {
70
+ height: auto;
71
+ }
72
+
73
+ // 1. Correct the outline style in Safari.
74
+ // 2. This overrides the extra rounded corners on search inputs in iOS so that our
75
+ // `.form-control` class can properly style them. Note that this cannot simply
76
+ // be added to `.form-control` as it's not specific enough. For details, see
77
+ // https://github.com/twbs/bootstrap/issues/11586.
78
+
79
+ [type='search'] {
80
+ outline-offset: -2px; // 1
81
+ -webkit-appearance: textfield; // 2
82
+ }
83
+
84
+ // 1. A few input types should stay LTR
85
+ // See https://rtlstyling.com/posts/rtl-styling#form-inputs
86
+ // 2. RTL only output
87
+ // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
88
+
89
+ /* rtl:raw:
90
+ [type="tel"],
91
+ [type="url"],
92
+ [type="email"],
93
+ [type="number"] {
94
+ direction: ltr;
95
+ }
96
+ */
97
+
98
+ // Remove the inner padding in Chrome and Safari on macOS.
99
+
100
+ ::-webkit-search-decoration {
101
+ -webkit-appearance: none;
102
+ }
103
+
104
+ // Remove padding around color pickers in webkit browsers
105
+
106
+ ::-webkit-color-swatch-wrapper {
107
+ padding: 0;
108
+ }
109
+
110
+ ::-moz-color-swatch {
111
+ border-radius: 0;
112
+ border: none;
113
+ }
114
+
115
+ ::-webkit-color-swatch {
116
+ border-radius: 0;
117
+ border: none;
118
+ }
119
+
120
+ // 1. Inherit font family and line height for file input buttons
121
+ // 2. Correct the inability to style clickable types in iOS and Safari.
122
+
123
+ ::file-selector-button {
124
+ font: inherit; // 1
125
+ -webkit-appearance: button; // 2
126
+ }
127
+
128
+
129
+
130
+
131
+ // #region input field
132
+ :is(
133
+ input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
134
+ textarea,
135
+ output
136
+ ) {
137
+ @include input();
138
+ }
139
+
140
+ input[type='color'] {
141
+
142
+ padding: 0!important;
143
+ max-width: 3rem!important;
144
+ }
145
+
146
+ [disabled] :is(
147
+ input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
148
+ textarea,
149
+ output,
150
+ select:not(.select--minimal, .btn)
151
+ ) {
152
+ background-color: #ccd6d8;
153
+ opacity: 0.4;
154
+ cursor: not-allowed;
155
+ pointer-events: none;
156
+ }
157
+
158
+ [disabled] label {
159
+
160
+ cursor: not-allowed;
161
+ pointer-events: none;
162
+ }
163
+
164
+ :is(input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range'])) {
165
+ max-width: $input-max-width;
166
+ }
167
+
168
+ textarea {
169
+ --textarea-height-scale: 3;
170
+ min-height: calc(
171
+ var(--input-padding-block, #{rem(12)}) + var(--input-padding-block, #{rem(12)}) +
172
+ (var(--input-lh, #{rem(20)}) * var(--textarea-height-scale)) + 4px
173
+ ) !important;
174
+ }
175
+ // #endregion
176
+
177
+ }
@@ -72,6 +72,12 @@ $darkMode: 'true' !default;
72
72
  }
73
73
  }
74
74
 
75
+ &:not(.text-decoration-none).text-underline-plain {
76
+ &:after {
77
+ background: currentColor;
78
+ }
79
+ }
80
+
75
81
  [class*='fa-'] {
76
82
  margin-left: 0;
77
83
  margin-right: 0.5rem;
@@ -94,7 +100,7 @@ $darkMode: 'true' !default;
94
100
  }
95
101
 
96
102
  @include inline-text() {
97
- a:not(.btn) {
103
+ a:not(.btn):not(.link) {
98
104
  min-height: none;
99
105
  display: inline;
100
106
  margin: 0;
@@ -34,14 +34,18 @@ class iamDarkMode extends HTMLElement {
34
34
 
35
35
  const storedTheme = localStorage.getItem('user-theme');
36
36
 
37
+ console.log(storedTheme);
38
+
37
39
  // Work from local storage first then look at the media preferences
38
40
  label?.innerHTML = `<input type="checkbox" name="dark-mode" /> Light mode`;
39
41
  if (storedTheme == 'dark-theme') {
40
42
  label?.innerHTML = `<input type="checkbox" name="dark-mode" checked="checked" /> Dark mode`;
41
43
  label?.classList.add('dark-theme');
44
+ document.documentElement.className = 'dark-theme';
42
45
  } else if (storedTheme == 'light-theme') {
43
46
  label?.innerHTML = `<input type="checkbox" name="dark-mode" /> Light mode`;
44
47
  label?.classList.remove('dark-theme');
48
+ document.documentElement.className = 'light-theme';
45
49
  }
46
50
 
47
51
  const hasDarkPreference = window.matchMedia('(prefers-color-scheme: dark)').matches;
@@ -51,8 +55,6 @@ class iamDarkMode extends HTMLElement {
51
55
  }
52
56
 
53
57
  this.addEventListener('click', (event) => {
54
- console.log(label?.querySelector('input:checked'));
55
-
56
58
  if (label?.querySelector('input:checked')) {
57
59
  label?.innerHTML = `<input type="checkbox" name="dark-mode" checked="checked" /> Dark mode`;
58
60
  localStorage.setItem('user-theme', 'dark-theme');
@@ -70,6 +72,7 @@ class iamDarkMode extends HTMLElement {
70
72
  if (matches) {
71
73
  label?.innerHTML = `<input type="checkbox" name="dark-mode" checked="checked" /> Dark mode`;
72
74
  label?.classList.add('dark-theme');
75
+ document.documentElement.className = 'dark-theme';
73
76
  }
74
77
  });
75
78
 
@@ -77,6 +80,7 @@ class iamDarkMode extends HTMLElement {
77
80
  if (matches) {
78
81
  label?.innerHTML = `<input type="checkbox" name="dark-mode" /> Light mode`;
79
82
  label?.classList.remove('dark-theme');
83
+ document.documentElement.className = 'light-theme';
80
84
  }
81
85
  });
82
86
  }