Skip to content

Commit

Permalink
feat: update svelte and sass
Browse files Browse the repository at this point in the history
  • Loading branch information
paring-chan committed Nov 2, 2024
1 parent 4772a97 commit 55b666a
Show file tree
Hide file tree
Showing 24 changed files with 1,877 additions and 4,434 deletions.
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,42 @@
"prepack": "pnpm build"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.6.1",
"@chromatic-com/storybook": "^3.2.2",
"@fluent/bundle": "^0.18.0",
"@laynezh/vite-plugin-lib-assets": "^0.5.23",
"@laynezh/vite-plugin-lib-assets": "^0.5.24",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.83.0",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@melt-ui/svelte": "^0.85.0",
"@storybook/addon-essentials": "^8.4.1",
"@storybook/addon-interactions": "^8.4.1",
"@storybook/addon-links": "^8.4.1",
"@storybook/addon-svelte-csf": "5.0.0-next.3",
"@storybook/blocks": "^8.2.9",
"@storybook/svelte": "^8.2.9",
"@storybook/svelte-vite": "^8.2.9",
"@storybook/test": "^8.2.9",
"@sveltejs/package": "^2.3.4",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@storybook/blocks": "^8.4.1",
"@storybook/svelte": "^8.4.1",
"@storybook/svelte-vite": "^8.4.1",
"@storybook/test": "^8.4.1",
"@sveltejs/package": "^2.3.7",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tsconfig/svelte": "^5.0.4",
"@types/js-cookie": "^3.0.6",
"glob": "^11.0.0",
"prettier-plugin-svelte": "^3.2.6",
"sass-embedded": "^1.77.8",
"semantic-release": "^24.0.0",
"storybook": "^8.2.9",
"svelte": "5.0.0-next.257",
"svelte-check": "^4.0.2",
"tslib": "^2.6.3",
"typescript": "^5.5.3",
"vite": "^5.4.0",
"vite-plugin-dts": "^4.0.2",
"prettier-plugin-svelte": "^3.2.7",
"sass-embedded": "^1.80.6",
"semantic-release": "^24.2.0",
"storybook": "^8.4.1",
"svelte": "5.1.9",
"svelte-check": "^4.0.5",
"tslib": "^2.8.1",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vite-plugin-dts": "^4.3.0",
"vite-tsconfig-paths": "^5.0.1"
},
"peerDependencies": {
"@melt-ui/svelte": "*",
"svelte": "5"
},
"dependencies": {
"@fontsource/ibm-plex-sans-kr": "^5.0.13",
"@fontsource/ibm-plex-sans-kr": "^5.1.0",
"clsx": "^2.1.1",
"js-cookie": "^3.0.5",
"svelte-component-actions": "^1.1.0"
Expand Down
6,190 changes: 1,812 additions & 4,378 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/lib/components/Container.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,16 @@
{/if}

<style lang="scss">
@import '../stylesheets/system/breakpoints';
@use '../stylesheets/system/breakpoints' as *;
@use 'sass:map';
.container {
width: 100%;
margin: 0 auto;
@each $name, $data in $breakpoints {
// @media screen and (min-width: #{inspect(map-get($data, 'min-width'))}) {
// max-width: calc(map-get($data, 'min-width'));
// }
@include breakpoint($name) {
max-width: map-get($data, 'min-width');
max-width: map.get($data, 'min-width');
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/Pagination.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import { createPagination, melt } from '@melt-ui/svelte'
import type { CreatePaginationProps } from '@melt-ui/svelte/internal/types'
import { writable, type Writable } from 'svelte/store'
import Icon from './Icon.svelte'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/PopoverContentPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>

<style lang="scss">
@import '../stylesheets/system/colors';
@use '../stylesheets/system/colors' as *;
.popover-content-panel {
padding: 18px;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/footer/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</footer>

<style lang="scss">
@import '../../stylesheets/system/breakpoints';
@use '../../stylesheets/system/breakpoints' as *;
.footer {
background-color: rgba(0, 0, 0, 0.2);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/footer/FooterSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</section>

<style lang="scss">
@import '../../stylesheets/system/breakpoints';
@use '../../stylesheets/system/breakpoints' as *;
.footer-section {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/form/FormField.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.label {
font-size: 16px;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/form/FormHint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.dot {
width: 8px;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/form/FormHintArea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</div>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.form-hint-area {
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/form/ImageSelectorEditIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</button>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.image-selector-edit-icon {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/form/LabeledCheckbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</label>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.labeled-checkbox-sm {
--label-size: 14px;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/menu/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</div> -->

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.menu-popup {
padding: 8px 0;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/menu/MenuItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.menu-default {
--menu-item-color: 255, 255, 255;
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/nav/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</nav>

<style lang="scss">
@import '../../stylesheets/system/breakpoints';
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/breakpoints' as *;
@use '../../stylesheets/system/colors' as *;
.nav-container {
background-color: rgba($darkblue, 0.2);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/search/FilterEditPanel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</form>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.filter-edit-panel {
max-width: 240px;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/search/PopoverSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
</div>

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.search-input {
&:focus {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/user/UserTree.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
{/each}

<style lang="scss">
@import '../../stylesheets/system/colors';
@use '../../stylesheets/system/colors' as *;
.user-list-item {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stylesheets/components/_button.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../system/colors';
@use '../system/colors' as *;

.button {
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions src/lib/stylesheets/components/_panel.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use '../system/colors' as *;

.panel {
border-radius: 12px;
background-color: rgba($darkblue, 0.2);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stylesheets/components/_tag.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../system/colors';
@use '../system/colors' as *;

.tag {
font-size: 20px;
Expand Down
16 changes: 8 additions & 8 deletions src/lib/stylesheets/globals.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@import 'base.scss';
@import 'fonts.scss';
@use 'base.scss';
@use 'fonts.scss';

@import 'components/button';
@import 'components/icon-button';
@import 'components/tag';
@import 'components/panel';
@use 'components/button';
@use 'components/icon-button';
@use 'components/tag';
@use 'components/panel';

@import 'utils/grid';
@import 'utils/table';
@use 'utils/grid';
@use 'utils/table';

$normal_font: 'IBM Plex Sans KR', sans-serif;

Expand Down
7 changes: 5 additions & 2 deletions src/lib/stylesheets/system/_breakpoints.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use 'sass:meta';
@use 'sass:map';

$breakpoints: (
// 'xs': (
// 'min-width': 360px,
Expand Down Expand Up @@ -28,9 +31,9 @@ $breakpoints: (
);

@mixin breakpoint($name) {
$breakpoint: map-get($breakpoints, $name);
$breakpoint: map.get($breakpoints, $name);

@media screen and (min-width: #{inspect(map-get($breakpoint, 'min-width'))}) {
@media screen and (min-width: #{meta.inspect(map.get($breakpoint, 'min-width'))}) {
@content;
}
}
7 changes: 7 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,12 @@ export default defineConfig({
...pkg.peerDependencies
})
}
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler'
}
}
}
})

0 comments on commit 55b666a

Please sign in to comment.