@uniai-fe/uds-foundation 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data/typography.js +8 -1
- package/dist/index.css +12 -77
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/provider/ThemeProvider.d.ts +13 -0
- package/dist/provider/ThemeProvider.js +14 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +4 -0
- package/package.json +13 -3
- package/src/color/index.scss +7 -2
- package/src/color/primitives.scss +205 -207
- package/src/color/semantic/background.scss +5 -12
- package/src/color/semantic/border.scss +7 -14
- package/src/color/semantic/core.scss +13 -20
- package/src/color/semantic/feedback.scss +7 -14
- package/src/color/semantic/index.scss +17 -7
- package/src/color/semantic/interaction.scss +3 -10
- package/src/color/semantic/label.scss +7 -14
- package/src/color/semantic/surface.scss +8 -15
- package/src/data/typography.ts +8 -1
- package/src/index.scss +53 -16
- package/src/index.ts +1 -0
- package/src/init/document.scss +2 -2
- package/src/init/reset.scss +2 -2
- package/src/layout/breakpoint.scss +5 -7
- package/src/layout/radius.scss +28 -30
- package/src/layout/size.scss +16 -18
- package/src/provider/ThemeProvider.tsx +23 -0
- package/src/provider/index.ts +2 -0
- package/src/spacing/gap.scss +16 -18
- package/src/spacing/padding.scss +12 -14
- package/src/typography/fonts/font-face.scss +1 -1
- package/src/typography/fonts/font-family.scss +1 -1
- package/src/typography/styles/body.scss +23 -19
- package/src/typography/styles/caption.scss +9 -11
- package/src/typography/styles/display.scss +13 -15
- package/src/typography/styles/heading.scss +25 -27
- package/src/typography/styles/label.scss +13 -15
package/dist/data/typography.js
CHANGED
|
@@ -57,6 +57,7 @@ const typography_tokens = {
|
|
|
57
57
|
font_weight: 600
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
+
// Body scale follows the latest Figma Light tokens including xxsmall.
|
|
60
61
|
body: {
|
|
61
62
|
large: {
|
|
62
63
|
size: 19,
|
|
@@ -71,12 +72,18 @@ const typography_tokens = {
|
|
|
71
72
|
font_weight: 500
|
|
72
73
|
},
|
|
73
74
|
small: {
|
|
74
|
-
size:
|
|
75
|
+
size: 16,
|
|
75
76
|
line_height: "1.5em",
|
|
76
77
|
letter_spacing: 0,
|
|
77
78
|
font_weight: 400
|
|
78
79
|
},
|
|
79
80
|
xsmall: {
|
|
81
|
+
size: 15,
|
|
82
|
+
line_height: "1.5em",
|
|
83
|
+
letter_spacing: 0,
|
|
84
|
+
font_weight: 400
|
|
85
|
+
},
|
|
86
|
+
xxsmall: {
|
|
80
87
|
size: 13,
|
|
81
88
|
line_height: "1.5em",
|
|
82
89
|
letter_spacing: 0,
|
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
@layer
|
|
2
|
+
@layer foundation.reset {
|
|
3
3
|
:root {
|
|
4
4
|
-webkit-tap-highlight-color: transparent;
|
|
5
5
|
-webkit-text-size-adjust: none;
|
|
@@ -287,8 +287,6 @@
|
|
|
287
287
|
font-size: 1vw;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
}
|
|
291
|
-
@layer theme.init {
|
|
292
290
|
html,
|
|
293
291
|
body {
|
|
294
292
|
width: 100%;
|
|
@@ -300,7 +298,7 @@
|
|
|
300
298
|
z-index: 0;
|
|
301
299
|
}
|
|
302
300
|
}
|
|
303
|
-
@layer
|
|
301
|
+
@layer foundation.color {
|
|
304
302
|
:root {
|
|
305
303
|
--color-common-100: #fff;
|
|
306
304
|
--color-common-0: #000;
|
|
@@ -491,11 +489,6 @@
|
|
|
491
489
|
--color-cyan-90: #ccfbff;
|
|
492
490
|
--color-cyan-95: #e5fdff;
|
|
493
491
|
--color-cyan-99: #faffff;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
@layer theme.tokens.color {
|
|
497
|
-
:root,
|
|
498
|
-
.theme-light {
|
|
499
492
|
--color-primary-default: var(--color-blue-55);
|
|
500
493
|
--color-primary-strong: var(--color-blue-45);
|
|
501
494
|
--color-primary-heavy: var(--color-blue-30);
|
|
@@ -505,42 +498,22 @@
|
|
|
505
498
|
--color-tertiary-default: var(--color-cool-gray-95);
|
|
506
499
|
--color-tertiary-strong: var(--color-cool-gray-90);
|
|
507
500
|
--color-tertiary-heavy: var(--color-cool-gray-80);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
@layer theme.tokens.color {
|
|
511
|
-
:root,
|
|
512
|
-
.theme-light {
|
|
513
501
|
--color-label-strong: var(--color-cool-gray-10);
|
|
514
502
|
--color-label-standard: var(--color-cool-gray-20);
|
|
515
503
|
--color-label-neutral: var(--color-cool-gray-50);
|
|
516
504
|
--color-label-alternative: var(--color-cool-gray-70);
|
|
517
505
|
--color-label-assistive: var(--color-cool-gray-80);
|
|
518
506
|
--color-label-disabled: var(--color-cool-gray-80);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
@layer theme.tokens.color {
|
|
522
|
-
:root,
|
|
523
|
-
.theme-light {
|
|
524
507
|
--color-border-standard-cool-gray: var(--color-cool-gray-90);
|
|
525
508
|
--color-border-standard-blue: var(--color-blue-90);
|
|
526
509
|
--color-border-standard-strong: var(--color-cool-gray-75);
|
|
527
510
|
--color-border-standard-heavy: var(--color-cool-gray-20);
|
|
528
511
|
--color-border-standard-alternative: var(--color-cool-gray-80);
|
|
529
512
|
--color-border-standard-assistive: var(--color-cool-gray-90);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
@layer theme.tokens.color {
|
|
533
|
-
:root,
|
|
534
|
-
.theme-light {
|
|
535
513
|
--color-bg-standard-cool-gray: var(--color-cool-gray-99);
|
|
536
514
|
--color-bg-alternative-cool-gray: var(--color-cool-gray-95);
|
|
537
515
|
--color-bg-standard-neutral: var(--color-neutral-99);
|
|
538
516
|
--color-bg-alternative-neutral: var(--color-neutral-95);
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
@layer theme.tokens.color {
|
|
542
|
-
:root,
|
|
543
|
-
.theme-light {
|
|
544
517
|
--color-bg-surface-static-white: var(--color-common-100);
|
|
545
518
|
--color-bg-surface-static-cool-gray: var(--color-cool-gray-99);
|
|
546
519
|
--color-bg-surface-static-blue: var(--color-blue-95);
|
|
@@ -548,18 +521,8 @@
|
|
|
548
521
|
--color-bg-surface-standard: var(--color-cool-gray-95);
|
|
549
522
|
--color-bg-surface-strong: var(--color-neutral-80);
|
|
550
523
|
--color-bg-surface-heavy: var(--color-cool-gray-20);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
@layer theme.tokens.color {
|
|
554
|
-
:root,
|
|
555
|
-
.theme-light {
|
|
556
524
|
--color-interaction-static: var(--color-common-100);
|
|
557
525
|
--color-interaction-disabled: var(--color-cool-gray-95);
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
@layer theme.tokens.color {
|
|
561
|
-
:root,
|
|
562
|
-
.theme-light {
|
|
563
526
|
--color-danger: var(--color-red-40);
|
|
564
527
|
--color-error: var(--color-red-45);
|
|
565
528
|
--color-warning: var(--color-yellow-50);
|
|
@@ -568,7 +531,7 @@
|
|
|
568
531
|
--color-new: var(--color-red-50);
|
|
569
532
|
}
|
|
570
533
|
}
|
|
571
|
-
@layer
|
|
534
|
+
@layer foundation.spacing {
|
|
572
535
|
:root {
|
|
573
536
|
--spacing-padding-1: 2px;
|
|
574
537
|
--spacing-padding-2: 4px;
|
|
@@ -581,10 +544,6 @@
|
|
|
581
544
|
--spacing-padding-9: 28px;
|
|
582
545
|
--spacing-padding-10: 32px;
|
|
583
546
|
--spacing-padding-11: 40px;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
@layer theme.tokens.spacing {
|
|
587
|
-
:root {
|
|
588
547
|
--spacing-gap-1: 2px;
|
|
589
548
|
--spacing-gap-2: 4px;
|
|
590
549
|
--spacing-gap-3: 6px;
|
|
@@ -602,16 +561,12 @@
|
|
|
602
561
|
--spacing-gap-15: 80px;
|
|
603
562
|
}
|
|
604
563
|
}
|
|
605
|
-
@layer
|
|
564
|
+
@layer foundation.layout {
|
|
606
565
|
:root {
|
|
607
566
|
--theme-breakpoint-xsmall-start: 0px;
|
|
608
567
|
--theme-breakpoint-small-start: 768px;
|
|
609
568
|
--theme-breakpoint-medium-start: 992px;
|
|
610
569
|
--theme-breakpoint-large-start: 1200px;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
@layer theme.tokens.layout {
|
|
614
|
-
:root {
|
|
615
570
|
--theme-size-xxsmall: 4px;
|
|
616
571
|
--theme-size-xsmall-1: 8px;
|
|
617
572
|
--theme-size-xsmall-2: 12px;
|
|
@@ -627,10 +582,6 @@
|
|
|
627
582
|
--theme-size-large-2: 80px;
|
|
628
583
|
--theme-size-xlarge-1: 96px;
|
|
629
584
|
--theme-size-xlarge-2: 120px;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
@layer theme.tokens.layout {
|
|
633
|
-
:root {
|
|
634
585
|
--theme-radius-4x4: 1px;
|
|
635
586
|
--theme-radius-8x8: 2px;
|
|
636
587
|
--theme-radius-12x12: 2px;
|
|
@@ -658,7 +609,7 @@
|
|
|
658
609
|
--theme-radius-xlarge: 16px;
|
|
659
610
|
}
|
|
660
611
|
}
|
|
661
|
-
@layer
|
|
612
|
+
@layer foundation.typography {
|
|
662
613
|
@font-face {
|
|
663
614
|
font-family: "Pretendard JP Variable";
|
|
664
615
|
src: url("./fonts/pretendard-jp/PretendardJPVariable.woff2") format("woff2");
|
|
@@ -673,9 +624,7 @@
|
|
|
673
624
|
font-style: normal;
|
|
674
625
|
font-display: swap;
|
|
675
626
|
}
|
|
676
|
-
|
|
677
|
-
@layer theme.tokens.typography {
|
|
678
|
-
:root {
|
|
627
|
+
:root :root {
|
|
679
628
|
--font-family-pretendard:
|
|
680
629
|
"Pretendard JP Variable", "Pretendard JP", "Pretendard Variable",
|
|
681
630
|
"Pretendard", "InterVariable", "Inter", "Noto Sans KR", "-apple-system",
|
|
@@ -697,8 +646,6 @@
|
|
|
697
646
|
"Oxygen", "Oxygen-Sans", "Ubuntu", "Cantarell", "sans-serif";
|
|
698
647
|
--font-family-sans: var(--font-family-pretendard);
|
|
699
648
|
}
|
|
700
|
-
}
|
|
701
|
-
@layer theme.tokens.typography {
|
|
702
649
|
:root {
|
|
703
650
|
--font-display-large-size: 60px;
|
|
704
651
|
--font-display-large-line-height: 1.4em;
|
|
@@ -712,10 +659,6 @@
|
|
|
712
659
|
--font-display-small-line-height: 1.4em;
|
|
713
660
|
--font-display-small-letter-spacing: -0.2px;
|
|
714
661
|
--font-display-small-weight: 600;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
@layer theme.tokens.typography {
|
|
718
|
-
:root {
|
|
719
662
|
--font-heading-xlarge-size: 40px;
|
|
720
663
|
--font-heading-xlarge-line-height: 1.4em;
|
|
721
664
|
--font-heading-xlarge-letter-spacing: -0.2px;
|
|
@@ -740,10 +683,6 @@
|
|
|
740
683
|
--font-heading-xxsmall-line-height: 1.5em;
|
|
741
684
|
--font-heading-xxsmall-letter-spacing: 0px;
|
|
742
685
|
--font-heading-xxsmall-weight: 600;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
@layer theme.tokens.typography {
|
|
746
|
-
:root {
|
|
747
686
|
--font-body-large-size: 19px;
|
|
748
687
|
--font-body-large-line-height: 1.5em;
|
|
749
688
|
--font-body-large-letter-spacing: 0px;
|
|
@@ -752,18 +691,18 @@
|
|
|
752
691
|
--font-body-medium-line-height: 1.5em;
|
|
753
692
|
--font-body-medium-letter-spacing: 0px;
|
|
754
693
|
--font-body-medium-weight: 500;
|
|
755
|
-
--font-body-small-size:
|
|
694
|
+
--font-body-small-size: 16px;
|
|
756
695
|
--font-body-small-line-height: 1.5em;
|
|
757
696
|
--font-body-small-letter-spacing: 0px;
|
|
758
697
|
--font-body-small-weight: 400;
|
|
759
|
-
--font-body-xsmall-size:
|
|
698
|
+
--font-body-xsmall-size: 15px;
|
|
760
699
|
--font-body-xsmall-line-height: 1.5em;
|
|
761
700
|
--font-body-xsmall-letter-spacing: 0px;
|
|
762
701
|
--font-body-xsmall-weight: 400;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
702
|
+
--font-body-xxsmall-size: 13px;
|
|
703
|
+
--font-body-xxsmall-line-height: 1.5em;
|
|
704
|
+
--font-body-xxsmall-letter-spacing: 0px;
|
|
705
|
+
--font-body-xxsmall-weight: 400;
|
|
767
706
|
--font-label-large-size: 16px;
|
|
768
707
|
--font-label-large-line-height: 1.5em;
|
|
769
708
|
--font-label-large-letter-spacing: 0px;
|
|
@@ -776,10 +715,6 @@
|
|
|
776
715
|
--font-label-small-line-height: 1.5em;
|
|
777
716
|
--font-label-small-letter-spacing: 0px;
|
|
778
717
|
--font-label-small-weight: 500;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
@layer theme.tokens.typography {
|
|
782
|
-
:root {
|
|
783
718
|
--font-caption-large-size: 12px;
|
|
784
719
|
--font-caption-large-line-height: 1.5em;
|
|
785
720
|
--font-caption-large-letter-spacing: 0px;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { NextLocalFontOptions, ThemeFontDefinition, ThemeFontDisplay, ThemeFontSource, ThemeFontStyle, createLocalFontOptions } from './typography/fonts/types.js';
|
|
2
2
|
export { pretendardFont, pretendardLocalFont } from './typography/fonts/pretendard.js';
|
|
3
3
|
export { interFont, interLocalFont } from './typography/fonts/inter.js';
|
|
4
|
+
export { ThemeProvider, FoundationThemeProviderProps as ThemeProviderProps } from './provider/ThemeProvider.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
type FoundationThemeProviderProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Foundation Theme Provider — `.uds-theme-root` 클래스를 부여해
|
|
9
|
+
* CSS 변수 토큰이 적용될 루트를 명시한다.
|
|
10
|
+
*/
|
|
11
|
+
declare function ThemeProvider({ children, className, }: PropsWithChildren<FoundationThemeProviderProps>): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { type FoundationThemeProviderProps, ThemeProvider };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
function ThemeProvider({
|
|
3
|
+
children,
|
|
4
|
+
className
|
|
5
|
+
}) {
|
|
6
|
+
const classNames = ["uds-theme-root"];
|
|
7
|
+
if (className) {
|
|
8
|
+
classNames.push(className);
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { className: classNames.join(" "), children });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
ThemeProvider
|
|
14
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-foundation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "UNIAI Design System; Design Foundation Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
|
-
"packageManager": "pnpm@10.26.
|
|
15
|
+
"packageManager": "pnpm@10.26.2",
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=24",
|
|
18
18
|
"pnpm": ">=10"
|
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
"email": "yth4135@naver.com",
|
|
23
23
|
"url": "https://github.com/GraffitoRyu"
|
|
24
24
|
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": ">=19"
|
|
27
|
+
},
|
|
25
28
|
"files": [
|
|
26
29
|
"dist",
|
|
27
30
|
"src",
|
|
@@ -66,6 +69,11 @@
|
|
|
66
69
|
"import": "./dist/helpers/index.js",
|
|
67
70
|
"default": "./dist/helpers/index.js"
|
|
68
71
|
},
|
|
72
|
+
"./provider": {
|
|
73
|
+
"types": "./dist/provider/index.d.ts",
|
|
74
|
+
"import": "./dist/provider/index.js",
|
|
75
|
+
"default": "./dist/provider/index.js"
|
|
76
|
+
},
|
|
69
77
|
"./types/theme-tokens": {
|
|
70
78
|
"types": "./dist/types/theme-tokens.d.ts",
|
|
71
79
|
"import": "./dist/types/theme-tokens.js",
|
|
@@ -92,12 +100,14 @@
|
|
|
92
100
|
},
|
|
93
101
|
"devDependencies": {
|
|
94
102
|
"@types/node": "^24.10.2",
|
|
103
|
+
"@types/react": "^19.2.7",
|
|
104
|
+
"react": "^19.2.0",
|
|
95
105
|
"@uniai-fe/tsconfig": "workspace:*",
|
|
96
106
|
"autoprefixer": "^10.4.23",
|
|
97
107
|
"postcss": "^8.5.6",
|
|
98
108
|
"postcss-cli": "^11.0.1",
|
|
99
109
|
"prettier": "^3.7.4",
|
|
100
|
-
"sass": "^1.97.
|
|
110
|
+
"sass": "^1.97.1",
|
|
101
111
|
"tsup": "^8.5.1",
|
|
102
112
|
"typescript": "~5.9.3"
|
|
103
113
|
}
|
package/src/color/index.scss
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
@use "./primitives.scss";
|
|
2
|
-
@use "./semantic/index.scss";
|
|
1
|
+
@use "./primitives.scss" as colorPrimitives;
|
|
2
|
+
@use "./semantic/index.scss" as colorSemantic;
|
|
3
|
+
|
|
4
|
+
@mixin foundation-color-tokens() {
|
|
5
|
+
@include colorPrimitives.foundation-color-primitives();
|
|
6
|
+
@include colorSemantic.foundation-color-semantic();
|
|
7
|
+
}
|