@castlabs/ui 4.18.2

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 (140) hide show
  1. package/README.md +94 -0
  2. package/dist/assets/castlabs-logo.svg +2 -0
  3. package/dist/assets/cookie.svg +1 -0
  4. package/dist/castlabs-ui-editor.common.js +23189 -0
  5. package/dist/castlabs-ui-editor.common.js.map +1 -0
  6. package/dist/castlabs-ui-editor.css +1 -0
  7. package/dist/castlabs-ui-editor.umd.js +23208 -0
  8. package/dist/castlabs-ui-editor.umd.js.map +1 -0
  9. package/dist/castlabs-ui-editor.umd.min.js +10 -0
  10. package/dist/castlabs-ui-editor.umd.min.js.map +1 -0
  11. package/dist/castlabs-ui.common.js +6828 -0
  12. package/dist/castlabs-ui.common.js.map +1 -0
  13. package/dist/castlabs-ui.core.js +1031 -0
  14. package/dist/castlabs-ui.css +12 -0
  15. package/dist/castlabs-ui.module.d.ts +83 -0
  16. package/dist/castlabs-ui.module.js +1031 -0
  17. package/dist/castlabs-ui.umd.js +6847 -0
  18. package/dist/castlabs-ui.umd.js.map +1 -0
  19. package/dist/castlabs-ui.umd.min.js +8 -0
  20. package/dist/castlabs-ui.umd.min.js.map +1 -0
  21. package/dist/demo.html +1 -0
  22. package/dist/favicon/192.png +0 -0
  23. package/dist/favicon/512.png +0 -0
  24. package/dist/favicon/apple-touch-icon.png +0 -0
  25. package/dist/favicon/favicon-unread.svg +75 -0
  26. package/dist/favicon/favicon.ico +0 -0
  27. package/dist/favicon/favicon.svg +43 -0
  28. package/dist/favicon/manifest.webmanifest +6 -0
  29. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCCwR26eg.f31394d2.woff2 +0 -0
  30. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCFwR26eg.00073a59.woff2 +0 -0
  31. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCGwR0.faa92a75.woff2 +0 -0
  32. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCIwR26eg.f8e38fba.woff2 +0 -0
  33. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCJwR26eg.f1d5cd16.woff2 +0 -0
  34. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCKwR26eg.ebbe259f.woff2 +0 -0
  35. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCLwR26eg.e3d460d0.woff2 +0 -0
  36. package/dist/fonts/fa-brands-400.18993be8.woff2 +0 -0
  37. package/dist/fonts/fa-regular-400.e45bb696.woff2 +0 -0
  38. package/dist/fonts/fa-solid-900.16e3d2f0.woff2 +0 -0
  39. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Udc1UAw.6de93dc1.woff2 +0 -0
  40. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Wdc1UAw.55c9461f.woff2 +0 -0
  41. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Xdc1UAw.111f8c99.woff2 +0 -0
  42. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Zdc0.92257a03.woff2 +0 -0
  43. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0adc1UAw.1844ded3.woff2 +0 -0
  44. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0bdc1UAw.719267ea.woff2 +0 -0
  45. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0ddc1UAw.037dea2d.woff2 +0 -0
  46. package/dist/fonts/mem8YaGs126MiZpBA-UFUZ0bbck.6869bd80.woff2 +0 -0
  47. package/dist/fonts/mem8YaGs126MiZpBA-UFV50bbck.05a41692.woff2 +0 -0
  48. package/dist/fonts/mem8YaGs126MiZpBA-UFVZ0b.38ffdf27.woff2 +0 -0
  49. package/dist/fonts/mem8YaGs126MiZpBA-UFVp0bbck.f12c0c2c.woff2 +0 -0
  50. package/dist/fonts/mem8YaGs126MiZpBA-UFW50bbck.03f14837.woff2 +0 -0
  51. package/dist/fonts/mem8YaGs126MiZpBA-UFWJ0bbck.abcca84a.woff2 +0 -0
  52. package/dist/fonts/mem8YaGs126MiZpBA-UFWp0bbck.4d1e267c.woff2 +0 -0
  53. package/package.json +71 -0
  54. package/plugins/uid/index.js +16 -0
  55. package/plugins/uid/index.ts +16 -0
  56. package/src/assets/castlabs-logo.svg +2 -0
  57. package/src/assets/cookie.svg +1 -0
  58. package/src/components/ClAlert/style.scss +117 -0
  59. package/src/components/ClBadge/style.scss +122 -0
  60. package/src/components/ClButton/style.scss +338 -0
  61. package/src/components/ClCard/style.scss +61 -0
  62. package/src/components/ClCard/style.variables.scss +179 -0
  63. package/src/components/ClDropdown/style.scss +272 -0
  64. package/src/components/ClDropzone/style.scss +21 -0
  65. package/src/components/ClFooter/style.scss +119 -0
  66. package/src/components/ClIcon/style.scss +58 -0
  67. package/src/components/ClIconotron/style.scss +86 -0
  68. package/src/components/ClList/style.scss +93 -0
  69. package/src/components/ClList/style.variables.scss +133 -0
  70. package/src/components/ClListGroup/style.scss +9 -0
  71. package/src/components/ClPagination/style.scss +123 -0
  72. package/src/components/ClProgress/style.scss +49 -0
  73. package/src/components/ClScrollbar/style.scss +14 -0
  74. package/src/components/ClSpinner/style.scss +26 -0
  75. package/src/components/ClTabs/style.scss +90 -0
  76. package/src/components/ClToggle/style.scss +97 -0
  77. package/src/components/ClTooltip/style.scss +46 -0
  78. package/src/components/ClWizard/style.scss +173 -0
  79. package/src/components/form/ClField/style.scss +45 -0
  80. package/src/components/form/ClFieldCheck/style.scss +99 -0
  81. package/src/components/form/ClFieldFile/style.scss +71 -0
  82. package/src/components/form/ClFieldGroup/style.scss +73 -0
  83. package/src/components/form/ClFieldInput/style.scss +118 -0
  84. package/src/components/form/ClFieldSelect/style.scss +39 -0
  85. package/src/components/form/ClFieldSet/style.scss +16 -0
  86. package/src/components/form/ClForm/style.scss +87 -0
  87. package/src/components/modal/ClModal/style.scss +138 -0
  88. package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +444 -0
  89. package/src/components/navigation/ClNavSide/ClNavSideMenu/style.scss +51 -0
  90. package/src/components/navigation/ClNavSide/style.scss +81 -0
  91. package/src/components/navigation/ClNavTop/style.scss +305 -0
  92. package/src/components/section/ClSectionHeadline/style.scss +49 -0
  93. package/src/components/section/ClSectionMainSide/style.scss +60 -0
  94. package/src/components/table/ClTable/style.scss +23 -0
  95. package/src/components/table/ClTable/style.variables.scss +155 -0
  96. package/src/components/table/ClTableCel/Actions/style.scss +11 -0
  97. package/src/components/table/ClTableCel/Audit/style.scss +26 -0
  98. package/src/components/table/ClTableCel/Boolean/style.scss +12 -0
  99. package/src/components/table/ClTableCel/Checkbox/style.scss +18 -0
  100. package/src/components/table/ClTableCel/Code/style.scss +13 -0
  101. package/src/components/table/ClTableCel/Currency/style.scss +9 -0
  102. package/src/components/table/ClTableCel/Date/style.scss +12 -0
  103. package/src/components/table/ClTableCel/ID/style.scss +16 -0
  104. package/src/components/table/ClTableCel/Links/style.scss +44 -0
  105. package/src/components/table/ClTableCel/style.scss +7 -0
  106. package/src/components/table/ClTableCel/style.variables.scss +25 -0
  107. package/src/components/table/ClTableFootChecked/style.scss +2 -0
  108. package/src/components/table/ClTableHead/style.scss +36 -0
  109. package/src/components/text/ClCopy/style.scss +42 -0
  110. package/src/components/text/ClHashtag/style.scss +31 -0
  111. package/src/components/text/ClLinkExternal/style.scss +147 -0
  112. package/src/components/text/ClOrg/style.scss +40 -0
  113. package/src/components/text/ClPlan/style.scss +35 -0
  114. package/src/components/text/ClRole/style.scss +39 -0
  115. package/src/components/widget/ClBackCancelOk/style.scss +3 -0
  116. package/src/components/widget/ClCookieBanner/style.scss +40 -0
  117. package/src/components/widget/ClPage/style.scss +11 -0
  118. package/src/fonts/FontAwesome5/FontAwesome5.scss +6121 -0
  119. package/src/fonts/NotoSansMono/NotoSansMono.scss +82 -0
  120. package/src/fonts/OpenSansVariable/OpenSansVariable.scss +183 -0
  121. package/src/styles/_global.scss +70 -0
  122. package/src/styles/abstracts/color.scss +127 -0
  123. package/src/styles/abstracts/layer.scss +10 -0
  124. package/src/styles/abstracts/spacing.scss +35 -0
  125. package/src/styles/abstracts/tools.scss +117 -0
  126. package/src/styles/assets/logo.scss +22 -0
  127. package/src/styles/components/button.variables.scss +18 -0
  128. package/src/styles/components/form.variables.scss +51 -0
  129. package/src/styles/layout/animation.scss +39 -0
  130. package/src/styles/layout/grid.scss +144 -0
  131. package/src/styles/layout/grid.variables.scss +50 -0
  132. package/src/styles/layout/section.scss +90 -0
  133. package/src/styles/layout/spacing.scss +295 -0
  134. package/src/styles/layout/typography.scss +321 -0
  135. package/src/styles/layout/typography.variables.scss +363 -0
  136. package/src/styles/ui.scss +98 -0
  137. package/src/styles/vendors/bootstrap.scss +28 -0
  138. package/src/styles/vendors/castlabs.scss +17 -0
  139. package/types/castlabs-ui.module.d.ts +83 -0
  140. package/types/index.d.ts +140 -0
@@ -0,0 +1,173 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file adds our *-*-*-* wizard progress indicator.
7
+
8
+ .cl-wizard-steps {
9
+ $wizard-li-spacing: $spacing-small;
10
+ $wizard-offset-indicator: -1em;
11
+ $wizard-color-done: $color-ci-blue;
12
+ $wizard-color-todo: $color-ci-silver;
13
+
14
+ display: flex;
15
+ flex-direction: row;
16
+ justify-content: center;
17
+ margin: $spacing-medium + $spacing-small 0 0;
18
+
19
+ &:first-child {
20
+ margin-top: $spacing-medium + $spacing-small;
21
+ }
22
+
23
+ li {
24
+ @extend %p-small;
25
+
26
+ color: $color-text;
27
+ display: inline-block;
28
+ font-weight: 600;
29
+ margin: 0 $wizard-li-spacing;
30
+ position: relative;
31
+
32
+ // --- line ----------------------------------------------------------------
33
+
34
+ &::before {
35
+ // line
36
+ background: linear-gradient(90deg, $wizard-color-done 50%, $wizard-color-done 50%);
37
+ content: '';
38
+ display: inline-block;
39
+ height: $typography-line-width;
40
+ left: -$wizard-li-spacing;
41
+ position: absolute;
42
+ top: $wizard-offset-indicator;
43
+ width: calc(100% + $wizard-li-spacing * 2);
44
+ }
45
+
46
+ &:first-child::before {
47
+ left: 50%;
48
+ width: calc(50% + $wizard-li-spacing);
49
+ }
50
+
51
+ &:last-child::before {
52
+ left: -$wizard-li-spacing;
53
+ width: calc(50% + $wizard-li-spacing);
54
+ }
55
+
56
+ // --- dot -----------------------------------------------------------------
57
+
58
+ &::after {
59
+ // dot
60
+ background-color: $wizard-color-done;
61
+ border: $typography-line-width solid $wizard-color-done;
62
+ border-radius: 100%;
63
+ content: '';
64
+ display: inline-block;
65
+ height: 1em;
66
+ left: calc(50% - 0.5em);
67
+ position: absolute;
68
+ top: $wizard-offset-indicator - 0.45em;
69
+ width: 1em;
70
+ }
71
+
72
+ &.active {
73
+ color: $wizard-color-done;
74
+
75
+ &::before {
76
+ background: linear-gradient(90deg, $wizard-color-done 50%, $wizard-color-todo 50%);
77
+ }
78
+
79
+ &:first-child::before {
80
+ background: $wizard-color-todo;
81
+ left: 50%;
82
+ }
83
+
84
+ &:last-child::before {
85
+ background: $wizard-color-done;
86
+ left: -$wizard-li-spacing;
87
+ }
88
+
89
+ &::after {
90
+ background-color: $color-ci-white;
91
+ }
92
+
93
+ + *,
94
+ + * + *,
95
+ + * + * + *,
96
+ + * + * + * + *,
97
+ + * + * + * + * + *,
98
+ + * + * + * + * + * + *,
99
+ + * + * + * + * + * + * + *,
100
+ + * + * + * + * + * + * + * + *,
101
+ + * + * + * + * + * + * + * + * + *,
102
+ + * + * + * + * + * + * + * + * + * + * {
103
+ color: $wizard-color-todo;
104
+
105
+ &::before {
106
+ background: linear-gradient(90deg, $wizard-color-todo 50%, $wizard-color-todo 50%);
107
+ }
108
+
109
+ &::after {
110
+ background-color: $color-ci-white;
111
+ border-color: $wizard-color-todo;
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ @include media-breakpoint-down(md) {
118
+ flex-direction: column;
119
+ margin: $spacing-medium 0 0 $spacing-medium;
120
+
121
+ li {
122
+ margin: $spacing-tiny 0;
123
+ text-align: left;
124
+
125
+ &::before {
126
+ // line
127
+ background: linear-gradient(0deg, $wizard-color-done 50%, $wizard-color-done 50%);
128
+ bottom: -0.55em;
129
+ height: calc(100% + $spacing-tiny * 2);
130
+ left: -1.3em;
131
+ top: unset;
132
+ width: $typography-line-width;
133
+ }
134
+
135
+ &:first-child::before {
136
+ bottom: -0.55em;
137
+ height: calc(50% + $spacing-tiny);
138
+ left: -1.3em;
139
+ top: unset;
140
+ width: $typography-line-width;
141
+ }
142
+
143
+ &:last-child::before {
144
+ bottom: 0.9em;
145
+ height: calc(50% + $spacing-tiny);
146
+ left: -1.3em;
147
+ top: unset;
148
+ width: $typography-line-width;
149
+ }
150
+
151
+ &::after {
152
+ // dot
153
+ bottom: calc(50% - 0.5em);
154
+ left: -1.75em;
155
+ top: unset;
156
+ }
157
+
158
+ &.active {
159
+ &::before {
160
+ background: linear-gradient(180deg, $wizard-color-done 50%, $wizard-color-todo 50%);
161
+ }
162
+
163
+ &:first-child::before {
164
+ left: -1.3em;
165
+ }
166
+
167
+ &:last-child::before {
168
+ left: -1.3em;
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,45 @@
1
+ .cl-form {
2
+ // --- field invalidation ----------------------------------------------------
3
+
4
+ :invalid {
5
+ // remove HTML5 browser styling
6
+ box-shadow: none; // remove browser shading
7
+ }
8
+
9
+ [invalid],
10
+ .invalid {
11
+ border-color: $color-ci-blue;
12
+ color: $color-ci-blue;
13
+
14
+ + * + .invalid-feedback,
15
+ + .invalid-feedback {
16
+ display: block;
17
+ }
18
+
19
+ + * + .valid-feedback,
20
+ + .valid-feedback {
21
+ display: none;
22
+ }
23
+ }
24
+
25
+ // --- disabled fields -------------------------------------------------------
26
+
27
+ .form-label.disabled,
28
+ .valid-feedback.disabled {
29
+ color: $color-ci-silver;
30
+ }
31
+
32
+ fieldset[disabled] input,
33
+ fieldset[disabled] textarea,
34
+ fieldset[disabled] select,
35
+ textarea[disabled],
36
+ input[disabled],
37
+ select[disabled] {
38
+ color: $form-color-disabled;
39
+ cursor: not-allowed;
40
+ }
41
+
42
+ select[disabled] {
43
+ --bs-form-select-bg-img: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath fill=%27none%27 stroke=%27%23B0B3B6%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%272%27 d=%27m2 5 6 6 6-6%27/%3E%3C/svg%3E');
44
+ }
45
+ }
@@ -0,0 +1,99 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines castlabs' checkboxes and radio buttons
7
+
8
+ @import 'bootstrap/scss/forms/form-check';
9
+
10
+ .form-check {
11
+ margin-top: $spacing-small;
12
+ padding-left: $spacing-medium;
13
+
14
+ &.form-check-inline {
15
+ margin-top: $spacing-tiny + $spacing-micro;
16
+ }
17
+
18
+ .form-check-input {
19
+ margin-left: -$spacing-medium;
20
+ margin-right: $spacing-micro;
21
+ margin-top: 0.25em;
22
+
23
+ &[type='checkbox'] {
24
+ border: $form-field-border;
25
+ border-radius: 0;
26
+
27
+ &:checked {
28
+ background-color: $color-ci-dim;
29
+ border: 0;
30
+ }
31
+
32
+ &:indeterminate {
33
+ background-color: transparent;
34
+ background-image: none;
35
+ border-color: $color-ci-dim;
36
+ box-shadow:
37
+ 0 0 0 0.15em $color-white-100 inset,
38
+ 0 0 0 1em $color-ci-dim inset;
39
+
40
+ &:disabled,
41
+ &.disabled {
42
+ border-color: $color-ci-smoke;
43
+ box-shadow:
44
+ 0 0 0 0.15em $color-white-100 inset,
45
+ 0 0 0 1em $form-field-border-color inset;
46
+ }
47
+ }
48
+ }
49
+
50
+ &[type='radio'] {
51
+ border: $form-field-border;
52
+
53
+ &:checked {
54
+ background-color: $color-ci-dim;
55
+ border-color: $color-ci-dim;
56
+
57
+ &.disabled,
58
+ &:disabled {
59
+ border-color: $color-ci-smoke;
60
+ }
61
+ }
62
+ }
63
+
64
+ &:focus {
65
+ @include focus-glow-embed($color-ci-dim);
66
+ }
67
+
68
+ &.disabled,
69
+ &:disabled {
70
+ background-color: $color-ci-haze;
71
+ opacity: 1;
72
+
73
+ &:checked {
74
+ background-color: $form-field-border-color;
75
+ }
76
+
77
+ ~ .form-check-label {
78
+ color: $form-color-disabled;
79
+ opacity: 1;
80
+ }
81
+ }
82
+ }
83
+
84
+ label {
85
+ @extend %p-medium; // looks like regular text
86
+
87
+ letter-spacing: 0;
88
+ margin-top: 0;
89
+ text-transform: none;
90
+ }
91
+
92
+ .form-label + & {
93
+ margin-top: $spacing-tiny;
94
+ }
95
+
96
+ + .form-check {
97
+ margin-top: $spacing-micro;
98
+ }
99
+ }
@@ -0,0 +1,71 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines castlabs' <input> fields.
7
+
8
+ .cl-form {
9
+ [type='file'] {
10
+ @extend %form-field-box;
11
+ @extend %form-field-typography;
12
+
13
+ @include form-focus-border($color-ci-silver);
14
+
15
+ &.cl-file {
16
+ border: 0;
17
+ height: 0;
18
+ margin: 0;
19
+ overflow: hidden;
20
+ padding: 0;
21
+ width: 0;
22
+ }
23
+
24
+ &:focus + .cl-file-companion {
25
+ @include form-focus-border-embed($color-ci-silver);
26
+ }
27
+
28
+ &[invalid]:focus + .cl-file-companion,
29
+ &.invalid:focus + .cl-file-companion {
30
+ border-color: $color-ci-silver;
31
+ }
32
+
33
+ .form-label + & {
34
+ @extend %spacing-micro;
35
+ }
36
+
37
+ &[invalid] + .cl-file-companion,
38
+ &.invalid + .cl-file-companion {
39
+ border-color: $color-ci-blue;
40
+ color: $color-ci-blue;
41
+
42
+ + * + .invalid-feedback,
43
+ + .invalid-feedback {
44
+ display: block;
45
+ }
46
+
47
+ + * + .valid-feedback,
48
+ + .valid-feedback {
49
+ display: none;
50
+ }
51
+ }
52
+
53
+ &[disabled] + .cl-file-companion {
54
+ color: $form-color-disabled;
55
+ cursor: not-allowed;
56
+ }
57
+ }
58
+
59
+ .cl-file-companion {
60
+ @extend %spacing-micro;
61
+ @extend %form-field-box;
62
+ @extend %form-field-typography;
63
+
64
+ @include form-focus-border($color-ci-silver);
65
+
66
+ & {
67
+ letter-spacing: 0;
68
+ text-transform: none;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,73 @@
1
+ .cl-form {
2
+ .input-group {
3
+ align-items: center;
4
+ display: flex;
5
+
6
+ &[invalid],
7
+ &.invalid {
8
+ > * {
9
+ border-color: $color-ci-blue;
10
+ color: $color-ci-blue;
11
+ }
12
+ }
13
+
14
+ > .btn:not(:last-child) {
15
+ margin-right: $spacing-tiny;
16
+ }
17
+
18
+ input + .btn,
19
+ select + .btn,
20
+ .invalid-feedback + .btn,
21
+ .valid-feedback + .btn {
22
+ margin-left: $spacing-tiny;
23
+ }
24
+
25
+ > .btn {
26
+ flex-shrink: 0;
27
+ }
28
+
29
+ > .btn + :not(.btn) {
30
+ border-left-width: $form-field-border-width !important; // sass-lint:disable-line no-important
31
+ }
32
+
33
+ > * {
34
+ margin-top: 0;
35
+ z-index: 0;
36
+
37
+ &:focus {
38
+ z-index: 1; // needed so the focused element's border is always on top
39
+ }
40
+
41
+ &:not(.btn) + * {
42
+ // trick to share one ][ border between 2 inputs
43
+ &:not(.btn) {
44
+ border-left-width: 0;
45
+
46
+ &:focus,
47
+ &.invalid:focus {
48
+ box-shadow: -$form-field-border-width 0 0 $color-ci-silver !important; // sass-lint:disable-line no-important
49
+ }
50
+ }
51
+
52
+ &.invalid {
53
+ box-shadow: -$form-field-border-width 0 0 $color-ci-blue !important; // sass-lint:disable-line no-important
54
+ }
55
+ }
56
+ }
57
+
58
+ .invalid-feedback,
59
+ .valid-feedback {
60
+ display: none; // hide individual field's texts
61
+ }
62
+
63
+ &-text {
64
+ @extend %form-field-box;
65
+ @extend %form-field-typography-monospace;
66
+
67
+ background-color: $color-ci-haze;
68
+ height: 100%;
69
+ white-space: nowrap;
70
+ width: auto;
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,118 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines castlabs' <input> fields.
7
+
8
+ .cl-form {
9
+ input,
10
+ textarea {
11
+ display: inline-block;
12
+
13
+ .form-label + & {
14
+ margin-top: $spacing-micro;
15
+ }
16
+
17
+ &.cl-field-sans {
18
+ @extend %form-field-typography;
19
+ }
20
+
21
+ &.cl-field-monospace {
22
+ @extend %form-field-typography-monospace;
23
+ }
24
+ }
25
+
26
+ textarea,
27
+ [type='text'],
28
+ [type='password'],
29
+ [type='url'],
30
+ [type='date'],
31
+ [type='email'],
32
+ [type='number'],
33
+ [type='date'],
34
+ [type='time'],
35
+ [type='datetime-local'] {
36
+ @extend %form-field-box;
37
+ @extend %form-field-typography;
38
+
39
+ @include form-focus-border($color-ci-silver);
40
+
41
+ &.form-control-plaintext {
42
+ background-color: transparent;
43
+ border-color: transparent;
44
+ }
45
+
46
+ &.cl-field-sans {
47
+ @extend %form-field-typography;
48
+ }
49
+
50
+ &.cl-field-monospace {
51
+ @extend %form-field-typography-monospace;
52
+ }
53
+
54
+ &::placeholder {
55
+ color: $color-ci-smoke;
56
+ opacity: 1;
57
+ }
58
+ }
59
+
60
+ [type='number'] {
61
+ appearance: textfield;
62
+
63
+ &::-webkit-inner-spin-button {
64
+ appearance: none;
65
+ }
66
+ }
67
+
68
+ [type='password'] {
69
+ letter-spacing: 0.25em;
70
+
71
+ &::placeholder {
72
+ letter-spacing: 0;
73
+ }
74
+ }
75
+
76
+ [type='range'] {
77
+ $color-bullet: $color-ci-dim;
78
+ $color-bullet-focus: $color-ci-blue;
79
+
80
+ appearance: none;
81
+ background: $color-ci-smoke;
82
+ border-radius: $border-ui-radius;
83
+ height: $spacing-tiny;
84
+ outline: none;
85
+ position: relative;
86
+ top: px(-2);
87
+ width: 100%;
88
+
89
+ &::-webkit-slider-thumb {
90
+ appearance: none;
91
+ background: $color-bullet;
92
+ border: 0;
93
+ border-radius: 100%;
94
+ cursor: pointer;
95
+ height: $spacing-medium;
96
+ width: $spacing-medium;
97
+ }
98
+
99
+ &::-moz-range-thumb {
100
+ background: $color-bullet;
101
+ border: 0;
102
+ border-radius: 100%;
103
+ cursor: pointer;
104
+ height: $spacing-medium;
105
+ width: $spacing-medium;
106
+ }
107
+
108
+ &:focus {
109
+ &::-webkit-slider-thumb {
110
+ background: $color-bullet-focus;
111
+ }
112
+
113
+ &::-moz-range-thumb {
114
+ background: $color-bullet-focus;
115
+ }
116
+ }
117
+ }
118
+ }
@@ -0,0 +1,39 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines castlabs <select> boxes.
7
+
8
+ @import 'bootstrap/scss/forms/form-select';
9
+
10
+ .cl-form {
11
+ label + select {
12
+ margin-top: $spacing-micro;
13
+ }
14
+
15
+ .form-select {
16
+ @extend %form-field-box;
17
+ @extend %form-field-typography;
18
+
19
+ @include form-focus-border($color-ci-silver);
20
+
21
+ & {
22
+ border-radius: 0;
23
+ display: block;
24
+ }
25
+
26
+ &.cl-field-monospace {
27
+ @extend %form-field-typography-monospace;
28
+ }
29
+ }
30
+
31
+ .input-group {
32
+ .form-select {
33
+ flex-grow: 0;
34
+ flex-shrink: 0;
35
+ padding-right: 2rem;
36
+ width: inherit;
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,16 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines castlabs' <fieldset>s.
7
+
8
+ .cl-form {
9
+ fieldset {
10
+ padding-bottom: $spacing-micro;
11
+
12
+ legend {
13
+ @extend %p-form-label;
14
+ }
15
+ }
16
+ }