-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forms): include styles by default (#2918)
This PR includes the forms extension styles in the components package. This means, that theses styles do not need to be imported separately. These styles are very small in size (6 KB), and will not grow substantially either. It also allows automated generation of theme files, when needed.
- Loading branch information
1 parent
b2dbd44
commit e2f4c1e
Showing
25 changed files
with
142 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
packages/dnb-eufemia/src/extensions/forms/Field/Expiry/style/dnb-expiry.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
packages/dnb-eufemia/src/extensions/forms/Field/PhoneNumber/style/dnb-phone-number.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
packages/dnb-eufemia/src/extensions/forms/Field/Selection/style/dnb-selection.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@import '../../style/field-sizes.scss'; | ||
|
||
.dnb-forms-field-selection { | ||
&--width { | ||
&-large { | ||
|
5 changes: 0 additions & 5 deletions
5
packages/dnb-eufemia/src/extensions/forms/Field/style/dnb-forms-field.scss
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/dnb-eufemia/src/extensions/forms/Form/style/dnb-forms-form.scss
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/dnb-eufemia/src/extensions/forms/Form/style/index.ts
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/dnb-eufemia/src/extensions/forms/StepsLayout/style/index.scss
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/dnb-eufemia/src/extensions/forms/ValueBlock/style/index.scss
This file was deleted.
Oops, something went wrong.
7 changes: 1 addition & 6 deletions
7
packages/dnb-eufemia/src/extensions/forms/style/dnb-forms.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
@import '../Form/style/dnb-forms-form.scss'; | ||
@import '../Field/style/dnb-forms-field.scss'; | ||
@import '../StepsLayout/style/index.scss'; | ||
@import '../utils/TestElement/style/dnb-test-element.scss'; | ||
@import '../FieldBlock/style/dnb-field-block.scss'; | ||
@import '../ValueBlock/style/dnb-value-block.scss'; | ||
@import '../../../style/dnb-ui-forms.scss'; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Web Style Import | ||
* | ||
*/ | ||
|
||
import '../../style/themes/theme-ui/ui-theme-extensions.scss' | ||
|
||
import { warn } from '../../shared/helpers' | ||
|
||
// @deprecated - this warning should be remove when forms is out of beta | ||
warn( | ||
"This import statement is not needed and can be removed: import '@dnb/eufemia/extensions/forms/style'" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* ATTENTION: This file is auto generated by using "styleFactory". | ||
* Do not change the content! | ||
* | ||
*/ | ||
|
||
@import './core/utilities.scss'; | ||
@import '../extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss'; | ||
@import '../extensions/forms/Field/Expiry/style/dnb-expiry.scss'; | ||
@import '../extensions/forms/Field/PhoneNumber/style/dnb-phone-number.scss'; | ||
@import '../extensions/forms/Field/PostalCodeAndCity/style/dnb-postal-code-and-city.scss'; | ||
@import '../extensions/forms/Field/Selection/style/dnb-selection.scss'; | ||
@import '../extensions/forms/FieldBlock/style/dnb-field-block.scss'; | ||
@import '../extensions/forms/Form/ButtonRow/style/dnb-form-button-row.scss'; | ||
@import '../extensions/forms/Form/MainHeading/style/dnb-form-main-heading.scss'; | ||
@import '../extensions/forms/Form/SubHeading/style/dnb-form-sub-heading.scss'; | ||
@import '../extensions/forms/StepsLayout/style/dnb-steps-layout.scss'; | ||
@import '../extensions/forms/ValueBlock/style/dnb-value-block.scss'; | ||
@import '../extensions/forms/utils/TestElement/style/dnb-test-element.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/dnb-eufemia/src/style/themes/theme-eiendom/eiendom-theme-forms.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* ATTENTION: This file is auto generated by using "themeFactory". | ||
* But you still can change the content of this file on the very top. | ||
*/ | ||
|
||
// Add "ui" themes, if file don't exists | ||
$THEME_FALLBACK: 'ui'; | ||
|
||
// Import shared styles | ||
@import '../../dnb-ui-forms.scss'; | ||
|
||
/** | ||
* NB: The content below is auto generated by the "themeFactory". | ||
* You may want to update it by running "yarn build" locally. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/dnb-eufemia/src/style/themes/theme-sbanken/sbanken-theme-forms.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* ATTENTION: This file is auto generated by using "themeFactory". | ||
* But you still can change the content of this file on the very top. | ||
*/ | ||
|
||
// Add "ui" themes, if file don't exists | ||
$THEME_FALLBACK: 'ui'; | ||
|
||
// Import shared styles | ||
@import '../../dnb-ui-forms.scss'; | ||
|
||
/** | ||
* NB: The content below is auto generated by the "themeFactory". | ||
* You may want to update it by running "yarn build" locally. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/dnb-eufemia/src/style/themes/theme-ui/ui-theme-forms.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* ATTENTION: This file is auto generated by using "themeFactory". | ||
* But you still can change the content of this file on the very top. | ||
*/ | ||
|
||
// Add "ui" themes, if file don't exists | ||
$THEME_FALLBACK: 'ui'; | ||
|
||
// Import shared styles | ||
@import '../../dnb-ui-forms.scss'; | ||
|
||
/** | ||
* NB: The content below is auto generated by the "themeFactory". | ||
* You may want to update it by running "yarn build" locally. | ||
*/ |