Skip to content

Commit 290431f

Browse files
authored
refactor: drop calcite-base dep (#12206)
**Related Issue:** N/A ## Summary `calcite-base` is a legacy dependency that is used for a small set of Sass variables. This PR drops it as dependency by inlining some values within our style files. 📦✂️ ### Notes - This will help with #10585 and #10583 - I'll create a follow-up issue to replace `$baseline`, `$easing-function` and `$floating-ui-shadow` with token or alternate styling (if applicable)
1 parent 32b31d5 commit 290431f

File tree

8 files changed

+9
-12
lines changed

8 files changed

+9
-12
lines changed

package-lock.json

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"@cspell/dict-scientific-terms-us": "3.0.6",
4242
"@cspell/eslint-plugin": "8.19.1",
4343
"@eslint/js": "9.25.0",
44-
"@esri/calcite-base": "1.2.0",
4544
"@octokit/webhooks-types": "7.6.1",
4645
"@prettier/sync": "0.5.5",
4746
"@storybook/addon-a11y": "8.6.12",

packages/calcite-components/src/assets/styles/_animation.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
$easing-function: cubic-bezier(0.215, 0.44, 0.42, 0.88);
2+
13
@mixin animation-helper-classes() {
24
@keyframes in {
35
0% {

packages/calcite-components/src/assets/styles/_floating-ui.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
$floating-ui-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.16);
12
$floating-ui-transition-offset: 5px;
23

34
@mixin floating-ui-offset-bottom {
@@ -30,7 +31,7 @@ $floating-ui-transition-offset: 5px;
3031
/* stylelint-disable-next-line liberty/use-logical-spec -- explicit position */
3132
transition-property: inset, left, opacity;
3233
opacity: 0;
33-
box-shadow: $shadow-2;
34+
box-shadow: $floating-ui-shadow;
3435
@apply rounded z-default;
3536
}
3637
}

packages/calcite-components/src/assets/styles/_spacing.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
$baseline: 1.5rem;
2+
13
%component-spacing {
24
/* Component spacing variables */
35

packages/calcite-components/src/assets/styles/global.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import "@esri/calcite-base/dist/index";
21
@import "@esri/calcite-design-tokens/dist/scss/index";
32
@import "@esri/calcite-design-tokens/dist/scss/core";
43

packages/calcite-components/src/assets/styles/includes.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import "@esri/calcite-base/dist/index";
21
@import "@esri/calcite-design-tokens/dist/scss/index";
32
@import "@esri/calcite-design-tokens/dist/scss/core";
43

packages/calcite-components/src/components/modal/modal.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*
1212
*/
1313

14+
$viewport-small: 480px;
15+
$viewport-medium: 860px;
16+
1417
:host {
1518
--calcite-modal-scrim-background: #{rgba($calcite-color-neutral-blk-240, $calcite-opacity-85)};
1619
}

0 commit comments

Comments
 (0)