Skip to content

Commit

Permalink
feat: added expanded tokens
Browse files Browse the repository at this point in the history
refactor: corrected expanded tokens

refactor: code refactoring

refactor: created an abstracted CSS variables

refactor: added missing expanded tokens

refactor: added missing expanded tokens

refactor: small refactoring after review

refactor: corrected imports for CSS files

feat: expanded --pgn-transition-carousel-base token, some refactoring

fix: corrected --pgn-transition-base-timing-function value

refactor: some refactoring and updates

refactor: corrected progress-bar and typography tokens
  • Loading branch information
PKulkoRaccoonGang committed Oct 27, 2024
1 parent a0baaa6 commit 70673e4
Show file tree
Hide file tree
Showing 56 changed files with 2,350 additions and 214 deletions.
3 changes: 2 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"color-function-notation": "legacy",
"value-keyword-case": ["lower", {
"ignoreProperties": ["/font-family/"]
}]
}],
"custom-property-empty-line-before": null
}
}
4 changes: 2 additions & 2 deletions lib/build-tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ async function buildTokensCommand(commandArgs) {
];

// Build tokens for each configuration
await Promise.all(configs.map(async ({ config, isThemeVariant, themeVariant }) => {
await Promise.all(configs.map(async ({ config, themeVariant }) => {
const sd = new StyleDictionary(config);
await sd.cleanAllPlatforms();
await sd.buildAllPlatforms();
createIndexCssFile({
buildDir,
isThemeVariant: !!isThemeVariant,
isThemeVariant: !!themeVariant,
themeVariant,
});
}));
Expand Down
16 changes: 16 additions & 0 deletions src/Annotation/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
@import "mixins";

:root {
--pgn-elevation-annotation-box-shadow:
drop-shadow(
var(--pgn-elevation-annotation-box-shadow-1-offset-x)
var(--pgn-elevation-annotation-box-shadow-1-offset-y)
var(--pgn-elevation-annotation-box-shadow-1-blur)
var(--pgn-elevation-annotation-box-shadow-1-color)
)
drop-shadow(
var(--pgn-elevation-annotation-box-shadow-2-offset-x)
var(--pgn-elevation-annotation-box-shadow-2-offset-y)
var(--pgn-elevation-annotation-box-shadow-2-blur)
var(--pgn-elevation-annotation-box-shadow-2-color)
);
}

.pgn__annotation {
padding: var(--pgn-spacing-annotation-padding);
border-radius: var(--pgn-size-annotation-border-radius);
Expand Down
25 changes: 24 additions & 1 deletion src/Carousel/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
:root {
--pgn-transition-carousel-base:
var(--pgn-transition-carousel-base-property)
var(--pgn-transition-carousel-base-duration)
var(--pgn-transition-carousel-base-timing-function)
var(--pgn-transition-carousel-base-delay)
var(--pgn-transition-carousel-base-behavior);

--pgn-transition-carousel-indicator:
var(--pgn-transition-carousel-indicator-property)
var(--pgn-transition-carousel-indicator-duration)
var(--pgn-transition-carousel-indicator-timing-function)
var(--pgn-transition-carousel-indicator-delay)
var(--pgn-transition-carousel-indicator-behavior);

--pgn-transition-carousel-control:
var(--pgn-transition-carousel-control-property)
var(--pgn-transition-carousel-control-duration)
var(--pgn-transition-carousel-control-timing-function)
var(--pgn-transition-carousel-control-delay)
var(--pgn-transition-carousel-control-behavior);
}

.carousel {
position: relative;
}
Expand Down Expand Up @@ -58,7 +81,7 @@
.active.carousel-item-right {
z-index: 0;
opacity: 0;
transition: opacity 0s var(--pgn-transition-carousel-base);
transition: var(--pgn-transition-carousel-base);
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/CloseButton/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
:root {
--pgn-elevation-close-button-text-shadow:
var(--pgn-elevation-close-button-text-shadow-offset-x)
var(--pgn-elevation-close-button-text-shadow-offset-y)
var(--pgn-elevation-close-button-text-shadow-blur)
var(--pgn-elevation-close-button-text-shadow-color);
}

.close {
float: right;
font-weight: var(--pgn-typography-close-button-font-weight);
Expand Down
12 changes: 12 additions & 0 deletions src/DataTable/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
:root {
--pgn-elevation-data-table-box-shadow:
var(--pgn-elevation-data-table-box-shadow-offset-x)
var(--pgn-elevation-data-table-box-shadow-offset-y)
var(--pgn-elevation-data-table-box-shadow-blur)
var(--pgn-elevation-data-table-box-shadow-color);

--pgn-spacing-data-table-padding-cell:
var(--pgn-spacing-data-table-padding-cell-x)
var(--pgn-spacing-data-table-padding-cell-y);
}

.pgn__data-table-wrapper {
font-size: var(--pgn-typography-font-size-sm);
border-radius: var(--pgn-size-border-radius-base);
Expand Down
6 changes: 6 additions & 0 deletions src/Dropdown/dropdown-bootstrap.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
:root {
--pgn-spacing-dropdown-padding-header:
var(--pgn-spacing-dropdown-padding-header-y)
var(--pgn-spacing-dropdown-padding-header-x);
}

.dropup,
.dropright,
.dropdown,
Expand Down
34 changes: 34 additions & 0 deletions src/Dropzone/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
:root {
--pgn-elevation-dropzone-hover:
var(--pgn-elevation-dropzone-hover-inset)
var(--pgn-elevation-dropzone-hover-offset-x)
var(--pgn-elevation-dropzone-hover-offset-y)
var(--pgn-elevation-dropzone-hover-blur)
var(--pgn-elevation-dropzone-hover-spread)
var(--pgn-elevation-dropzone-hover-color);

--pgn-elevation-dropzone-focus:
var(--pgn-elevation-dropzone-focus-inset)
var(--pgn-elevation-dropzone-focus-offset-x)
var(--pgn-elevation-dropzone-focus-offset-y)
var(--pgn-elevation-dropzone-focus-blur)
var(--pgn-elevation-dropzone-focus-spread)
var(--pgn-elevation-dropzone-focus-color);

--pgn-elevation-dropzone-error:
var(--pgn-elevation-dropzone-error-inset)
var(--pgn-elevation-dropzone-error-offset-x)
var(--pgn-elevation-dropzone-error-offset-y)
var(--pgn-elevation-dropzone-error-blur)
var(--pgn-elevation-dropzone-error-spread)
var(--pgn-elevation-dropzone-error-color);

--pgn-elevation-dropzone-active:
var(--pgn-elevation-dropzone-active-inset)
var(--pgn-elevation-dropzone-active-offset-x)
var(--pgn-elevation-dropzone-active-offset-y)
var(--pgn-elevation-dropzone-active-blur)
var(--pgn-elevation-dropzone-active-spread)
var(--pgn-elevation-dropzone-active-color);
}

.pgn__dropzone {
display: flex;
justify-content: center;
Expand Down
40 changes: 40 additions & 0 deletions src/Form/_bootstrap-custom-forms.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
:root {
--pgn-elevation-form-control-indicator-checked-focus:
var(--pgn-elevation-form-control-indicator-checked-focus-offset-x)
var(--pgn-elevation-form-control-indicator-checked-focus-offset-y)
var(--pgn-elevation-form-control-indicator-checked-focus-blur)
var(--pgn-elevation-form-control-indicator-checked-focus-spread)
var(--pgn-elevation-form-control-indicator-checked-focus-color);

--pgn-elevation-form-control-select-border-focus:
var(--pgn-elevation-form-control-select-border-focus-offset-x)
var(--pgn-elevation-form-control-select-border-focus-offset-y)
var(--pgn-elevation-form-control-select-border-focus-blur)
var(--pgn-elevation-form-control-select-border-focus-spread)
var(--pgn-elevation-form-control-select-border-focus-color);

--pgn-elevation-form-control-file-focus:
var(--pgn-elevation-form-control-file-focus-offset-x)
var(--pgn-elevation-form-control-file-focus-offset-y)
var(--pgn-elevation-form-control-file-focus-blur)
var(--pgn-elevation-form-control-file-focus-spread)
var(--pgn-elevation-form-control-file-focus-color);

--pgn-transition-form-control:
var(--pgn-transition-form-control-1-property)
var(--pgn-transition-form-control-1-duration)
var(--pgn-transition-form-control-1-timing-function)
var(--pgn-transition-form-control-1-delay)
var(--pgn-transition-form-control-1-behavior),
var(--pgn-transition-form-control-2-property)
var(--pgn-transition-form-control-2-duration)
var(--pgn-transition-form-control-2-timing-function)
var(--pgn-transition-form-control-2-delay)
var(--pgn-transition-form-control-2-behavior),
var(--pgn-transition-form-control-3-property)
var(--pgn-transition-form-control-3-duration)
var(--pgn-transition-form-control-3-timing-function)
var(--pgn-transition-form-control-3-delay)
var(--pgn-transition-form-control-3-behavior);
}

// Embedded icons from Open Iconic.
// Released under MIT and copyright 2014 Waybury.
// https://useiconic.com/open
Expand Down
9 changes: 9 additions & 0 deletions src/Form/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
@import "FormText";
@import "FormControlSet";

:root {
--pgn-elevation-form-control-indicator-checked-focus:
var(--pgn-elevation-form-control-indicator-checked-focus-offset-x)
var(--pgn-elevation-form-control-indicator-checked-focus-offset-y)
var(--pgn-elevation-form-control-indicator-checked-focus-blur)
var(--pgn-elevation-form-control-indicator-checked-focus-spread)
var(--pgn-elevation-form-control-indicator-checked-focus-color);
}

// A form input state used by the now deprecate Fieldset and asInput
// we can remove this when they are deleted.
.form-control.is-invalid.is-invalid-nodanger {
Expand Down
22 changes: 22 additions & 0 deletions src/Form/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
:root {
--pgn-elevation-form-input-focus:
var(--pgn-elevation-form-input-focus-offset-x)
var(--pgn-elevation-form-input-focus-offset-y)
var(--pgn-elevation-form-input-focus-blur)
var(--pgn-elevation-form-input-focus-spread)
var(--pgn-elevation-form-input-focus-color);

--pgn-spacing-form-control-select-feedback-icon-position:
var(--pgn-spacing-form-control-select-feedback-icon-position-position-y)
var(--pgn-spacing-form-control-select-feedback-icon-position-position-x)
var(--pgn-spacing-form-control-select-feedback-icon-position-offset-x)
var(--pgn-spacing-form-control-select-feedback-icon-position-offset-y);

--pgn-other-content-form-control-select-bg:
var(--pgn-other-content-form-control-select-bg-image)
var(--pgn-other-content-form-control-select-bg-position-x)
var(--pgn-other-content-form-control-select-bg-offset-y)
var(--pgn-other-content-form-control-select-bg-position-y)
/ var(--pgn-other-content-form-control-select-bg-color); // stylelint-disable-line scss/operator-no-newline-before
}

@mixin form-control-floating-label-initial(
$padding-x,
$padding-y,
Expand Down
146 changes: 146 additions & 0 deletions src/IconButton/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,151 @@
@import "mixins";

:root {
--pgn-elevation-icon-button-box-shadow-primary-base:
var(--pgn-elevation-icon-button-box-shadow-primary-base-inset)
var(--pgn-elevation-icon-button-box-shadow-primary-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-primary-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-primary-base-blur)
var(--pgn-elevation-icon-button-box-shadow-primary-base-spread)
var(--pgn-elevation-icon-button-box-shadow-primary-base-color);

--pgn-elevation-icon-button-box-shadow-primary-inverse:
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-primary-inverse-color);

--pgn-elevation-icon-button-box-shadow-secondary-base:
var(--pgn-elevation-icon-button-box-shadow-secondary-base-inset)
var(--pgn-elevation-icon-button-box-shadow-secondary-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-secondary-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-secondary-base-blur)
var(--pgn-elevation-icon-button-box-shadow-secondary-base-spread)
var(--pgn-elevation-icon-button-box-shadow-secondary-base-color);

--pgn-elevation-icon-button-box-shadow-secondary-inverse:
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-secondary-inverse-color);

--pgn-elevation-icon-button-box-shadow-brand-base:
var(--pgn-elevation-icon-button-box-shadow-brand-base-inset)
var(--pgn-elevation-icon-button-box-shadow-brand-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-brand-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-brand-base-blur)
var(--pgn-elevation-icon-button-box-shadow-brand-base-spread)
var(--pgn-elevation-icon-button-box-shadow-brand-base-color);

--pgn-elevation-icon-button-box-shadow-brand-inverse:
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-brand-inverse-color);

--pgn-elevation-icon-button-box-shadow-success-base:
var(--pgn-elevation-icon-button-box-shadow-success-base-inset)
var(--pgn-elevation-icon-button-box-shadow-success-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-success-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-success-base-blur)
var(--pgn-elevation-icon-button-box-shadow-success-base-spread)
var(--pgn-elevation-icon-button-box-shadow-success-base-color);

--pgn-elevation-icon-button-box-shadow-success-inverse:
var(--pgn-elevation-icon-button-box-shadow-success-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-success-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-success-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-success-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-success-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-success-inverse-color);

--pgn-elevation-icon-button-box-shadow-warning-base:
var(--pgn-elevation-icon-button-box-shadow-warning-base-inset)
var(--pgn-elevation-icon-button-box-shadow-warning-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-warning-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-warning-base-blur)
var(--pgn-elevation-icon-button-box-shadow-warning-base-spread)
var(--pgn-elevation-icon-button-box-shadow-warning-base-color);

--pgn-elevation-icon-button-box-shadow-warning-inverse:
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-warning-inverse-color);

--pgn-elevation-icon-button-box-shadow-danger-base:
var(--pgn-elevation-icon-button-box-shadow-danger-base-inset)
var(--pgn-elevation-icon-button-box-shadow-danger-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-danger-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-danger-base-blur)
var(--pgn-elevation-icon-button-box-shadow-danger-base-spread)
var(--pgn-elevation-icon-button-box-shadow-danger-base-color);

--pgn-elevation-icon-button-box-shadow-danger-inverse:
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-danger-inverse-color);

--pgn-elevation-icon-button-box-shadow-light-base:
var(--pgn-elevation-icon-button-box-shadow-light-base-inset)
var(--pgn-elevation-icon-button-box-shadow-light-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-light-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-light-base-blur)
var(--pgn-elevation-icon-button-box-shadow-light-base-spread)
var(--pgn-elevation-icon-button-box-shadow-light-base-color);

--pgn-elevation-icon-button-box-shadow-light-inverse:
var(--pgn-elevation-icon-button-box-shadow-light-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-light-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-light-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-light-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-light-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-light-inverse-color);

--pgn-elevation-icon-button-box-shadow-dark-base:
var(--pgn-elevation-icon-button-box-shadow-dark-base-inset)
var(--pgn-elevation-icon-button-box-shadow-dark-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-dark-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-dark-base-blur)
var(--pgn-elevation-icon-button-box-shadow-dark-base-spread)
var(--pgn-elevation-icon-button-box-shadow-dark-base-color);

--pgn-elevation-icon-button-box-shadow-dark-inverse:
var(--pgn-elevation-icon-button-box-shadow-dark-inverse)
var(--pgn-elevation-icon-button-box-shadow-dark-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-dark-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-dark-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-dark-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-dark-inverse-color);

--pgn-elevation-icon-button-box-shadow-black-base:
var(--pgn-elevation-icon-button-box-shadow-black-base-inset)
var(--pgn-elevation-icon-button-box-shadow-black-base-offset-x)
var(--pgn-elevation-icon-button-box-shadow-black-base-offset-y)
var(--pgn-elevation-icon-button-box-shadow-black-base-blur)
var(--pgn-elevation-icon-button-box-shadow-black-base-spread)
var(--pgn-elevation-icon-button-box-shadow-black-base-color);

--pgn-elevation-icon-button-box-shadow-black-inverse:
var(--pgn-elevation-icon-button-box-shadow-black-inverse-inset)
var(--pgn-elevation-icon-button-box-shadow-black-inverse-offset-x)
var(--pgn-elevation-icon-button-box-shadow-black-inverse-offset-y)
var(--pgn-elevation-icon-button-box-shadow-black-inverse-blur)
var(--pgn-elevation-icon-button-box-shadow-black-inverse-spread)
var(--pgn-elevation-icon-button-box-shadow-black-inverse-color);
}

.btn-icon {
@include btn-icon-size(var(--pgn-size-icon-button-diameter-md));

Expand Down
Loading

0 comments on commit 70673e4

Please sign in to comment.