Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
File renamed without changes.
22 changes: 4 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "tbxforms",
"version": "4.3.1",
"type": "module",
"main": "./dist/tbxforms.umd.js",
"module": "./dist/tbxforms.es.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
plugins: {
autoprefixer: {},
},
Expand Down
2 changes: 2 additions & 0 deletions tbxforms/static/sass/govuk-overrides/_settings.scss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@forward '../govuk/settings';

$tbxforms-font-family: unset !default; // Overridden to inherit default project font.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@import '../../govuk/core/lists';
@use '../../govuk/helpers';
@use '../../govuk/settings/colours-legacy-functional';

// Apply summary error styles to non-field errors too.
.tbxforms-error-summary__list li {
@include tbxforms-typography-weight-bold;
color: $tbxforms-error-colour;
@include helpers.tbxforms-typography-weight-bold;
color: colours-legacy-functional.$tbxforms-error-colour;
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import 'error-summary';
@use 'error-summary';
8 changes: 4 additions & 4 deletions tbxforms/static/sass/govuk/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "settings/index";
@import "tools/index";
@import "helpers/index";
@import "objects/index";
@forward "settings";
@forward "tools";
@forward "helpers";
// @forward "components/button/settings";
36 changes: 36 additions & 0 deletions tbxforms/static/sass/govuk/components/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// @use "accordion";
// @use "back-link";
// @use "breadcrumbs";
// @use "button";
@use "character-count";
@use "checkboxes";
// @use "cookie-banner";
@use "date-input";
// @use "details";
@use "error-message";
@use "error-summary";
// @use "exit-this-page";
@use "fieldset";
@use "file-upload";
// @use "footer";
// @use "header";
@use "hint";
@use "input";
// @use "inset-text";
@use "label";
// @use "notification-banner";
// @use "pagination";
// @use "panel";
@use "password-input";
// @use "phase-banner";
@use "radios";
@use "select";
// @use "service-navigation";
// @use "skip-link";
// @use "summary-list";
// @use "table";
// @use "tabs";
// @use "tag";
// @use "task-list";
@use "textarea";
// @use "warning-text";

This file was deleted.

42 changes: 8 additions & 34 deletions tbxforms/static/sass/govuk/components/character-count/_index.scss
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
@import "../error-message/index";
@import "../hint/index";
@import "../label/index";
@import "../textarea/index";

@include tbxforms-exports("govuk/component/character-count") {
.tbxforms-character-count {
@include tbxforms-responsive-margin(6, "bottom");

.tbxforms-form-group,
.tbxforms-textarea {
margin-bottom: tbxforms-spacing(1);
}
}

.tbxforms-character-count__message {
@include tbxforms-font-tabular-numbers;
margin-top: 0;
margin-bottom: 0;

&::after {
// Zero-width space that will reserve vertical space when no hint is
// provided as:
// - setting a min-height is not possible without a magic number because
// the line-height is set by the `tbxforms-font` call above
// - using `:empty` is not possible as the hint macro outputs line breaks
content: "\200B";
}
}

.tbxforms-character-count__message--disabled {
visibility: hidden;
}
}
@use "../../custom-properties";
@use "mixin";
@use "../error-message";
@use "../hint";
@use "../label";
@use "../textarea";

@include mixin.styles;
40 changes: 40 additions & 0 deletions tbxforms/static/sass/govuk/components/character-count/_mixin.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@use "../../base";

/// @access private
@mixin styles {
.tbxforms-character-count {
@include base.tbxforms-responsive-margin(6, "bottom");

.tbxforms-form-group,
.tbxforms-textarea {
margin-bottom: base.tbxforms-spacing(1);
}

// If the textarea enters the error state whilst the user is focused on it,
// show the error state. This presents feedback to the user that the value
// has become invalid without needing to see the counter.
.tbxforms-textarea--error:focus {
border-color: base.tbxforms-functional-colour(error);
box-shadow: inset 0 0 0 base.$tbxforms-border-width-form-element base.tbxforms-functional-colour(error);
}
}

.tbxforms-character-count__message {
@include base.tbxforms-font-tabular-numbers;
margin-top: 0;
margin-bottom: 0;

&::after {
// Zero-width space that will reserve vertical space when no hint is
// provided as:
// - setting a min-height is not possible without a magic number because
// the line-height is set by the `tbxforms-font` call above
// - using `:empty` is not possible as the hint macro outputs line breaks
content: "\200B";
}
}

.tbxforms-character-count__message--disabled {
visibility: hidden;
}
}

This file was deleted.

Loading
Loading