@ncds/ui-admin 1.8.8 → 1.8.11
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/cjs/src/components/feedback-and-status/badge/Badge.js +19 -0
- package/dist/cjs/src/components/forms-and-input/image-file-input/ImageFileInput.js +17 -12
- package/dist/cjs/src/components/index.js +11 -0
- package/dist/cjs/src/components/navigation/context-tab/ContextTab.js +233 -0
- package/dist/cjs/src/components/navigation/context-tab/index.js +16 -0
- package/dist/cjs/src/components/navigation/context-tab/useContextTabScroll.js +84 -0
- package/dist/esm/src/components/feedback-and-status/badge/Badge.js +19 -0
- package/dist/esm/src/components/forms-and-input/image-file-input/ImageFileInput.js +17 -12
- package/dist/esm/src/components/index.js +1 -0
- package/dist/esm/src/components/navigation/context-tab/ContextTab.js +226 -0
- package/dist/esm/src/components/navigation/context-tab/index.js +1 -0
- package/dist/esm/src/components/navigation/context-tab/useContextTabScroll.js +77 -0
- package/dist/temp/src/components/feedback-and-status/badge/Badge.d.ts +3 -2
- package/dist/temp/src/components/feedback-and-status/badge/Badge.js +10 -0
- package/dist/temp/src/components/forms-and-input/image-file-input/ImageFileInput.js +15 -12
- package/dist/temp/src/components/index.d.ts +1 -0
- package/dist/temp/src/components/index.js +1 -0
- package/dist/temp/src/components/navigation/context-tab/ContextTab.d.ts +18 -0
- package/dist/temp/src/components/navigation/context-tab/ContextTab.js +103 -0
- package/dist/temp/src/components/navigation/context-tab/index.d.ts +1 -0
- package/dist/temp/src/components/navigation/context-tab/index.js +1 -0
- package/dist/temp/src/components/navigation/context-tab/useContextTabScroll.d.ts +22 -0
- package/dist/temp/src/components/navigation/context-tab/useContextTabScroll.js +65 -0
- package/dist/types/src/components/feedback-and-status/badge/Badge.d.ts +3 -2
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/navigation/context-tab/ContextTab.d.ts +18 -0
- package/dist/types/src/components/navigation/context-tab/index.d.ts +1 -0
- package/dist/types/src/components/navigation/context-tab/useContextTabScroll.d.ts +22 -0
- package/dist/ui-admin/assets/styles/style.css +201 -1
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface ContextTabItemProps {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
isNew?: boolean;
|
|
5
|
+
/** pill-outline 배지로 표시할 텍스트. 있으면 비신규 항목에도 배지를 노출한다. */
|
|
6
|
+
badgeLabel?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface ContextTabProps {
|
|
10
|
+
menus?: ContextTabItemProps[];
|
|
11
|
+
activeTab?: string;
|
|
12
|
+
onTabChange?: (id: string) => void;
|
|
13
|
+
visibleTabsCount?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const ContextTab: ({ menus, activeTab, onTabChange, visibleTabsCount, className, }: ContextTabProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export { ContextTab };
|
|
18
|
+
export type { ContextTabItemProps, ContextTabProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ContextTab';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface UseContextTabScrollParams {
|
|
2
|
+
activeTab?: string;
|
|
3
|
+
menus: {
|
|
4
|
+
id: string;
|
|
5
|
+
}[];
|
|
6
|
+
visibleTabsCount: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* ContextTab Tab Bar의 네이티브 가로 스크롤·페이징 메커니즘을 담당하는 훅.
|
|
10
|
+
*
|
|
11
|
+
* - `barRef`: 스크롤 컨테이너(ref)
|
|
12
|
+
* - `isBeginning` / `isEnd`: 좌/우 네비 버튼의 disabled 판정
|
|
13
|
+
* - `scrollByPage`: `<` `>` 클릭 시 한 페이지(보이는 폭)만큼 이동 — scroll-snap이 탭 경계에 맞춰 정렬
|
|
14
|
+
* - `activeTab` 변경 시 해당 탭이 보이는 페이지로 자동 스크롤
|
|
15
|
+
*/
|
|
16
|
+
export declare const useContextTabScroll: ({ activeTab, menus, visibleTabsCount }: UseContextTabScrollParams) => {
|
|
17
|
+
barRef: import("react").RefObject<HTMLDivElement>;
|
|
18
|
+
isBeginning: boolean;
|
|
19
|
+
isEnd: boolean;
|
|
20
|
+
scrollByPage: (direction: 1 | -1) => void;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -5017,6 +5017,20 @@ button {
|
|
|
5017
5017
|
color: var(--gray-300);
|
|
5018
5018
|
background-color: var(--gray-100);
|
|
5019
5019
|
}
|
|
5020
|
+
.ncua-badge--new-badge {
|
|
5021
|
+
justify-content: center;
|
|
5022
|
+
color: var(--pink-600);
|
|
5023
|
+
background-color: var(--pink-200);
|
|
5024
|
+
border-radius: 5px;
|
|
5025
|
+
}
|
|
5026
|
+
.ncua-badge--new-badge-sm {
|
|
5027
|
+
width: 16px;
|
|
5028
|
+
height: 16px;
|
|
5029
|
+
}
|
|
5030
|
+
.ncua-badge--new-badge-md {
|
|
5031
|
+
width: 20px;
|
|
5032
|
+
height: 20px;
|
|
5033
|
+
}
|
|
5020
5034
|
|
|
5021
5035
|
.ncua-badge-group {
|
|
5022
5036
|
display: inline-flex;
|
|
@@ -5508,6 +5522,164 @@ button {
|
|
|
5508
5522
|
box-shadow: -2px 0 var(--gray-700);
|
|
5509
5523
|
}
|
|
5510
5524
|
|
|
5525
|
+
.ncua-context-tab {
|
|
5526
|
+
position: relative;
|
|
5527
|
+
display: flex;
|
|
5528
|
+
align-items: center;
|
|
5529
|
+
gap: 8px;
|
|
5530
|
+
padding-inline: 4px;
|
|
5531
|
+
border: 1px solid var(--gray-100);
|
|
5532
|
+
border-radius: 8px;
|
|
5533
|
+
background-color: var(--gray-100);
|
|
5534
|
+
}
|
|
5535
|
+
.ncua-context-tab__bar {
|
|
5536
|
+
position: relative;
|
|
5537
|
+
display: flex;
|
|
5538
|
+
flex: 1;
|
|
5539
|
+
gap: 8px;
|
|
5540
|
+
min-width: 0;
|
|
5541
|
+
padding-block: 4px;
|
|
5542
|
+
padding-inline-end: 4px;
|
|
5543
|
+
margin-inline-end: -4px;
|
|
5544
|
+
overflow-x: auto;
|
|
5545
|
+
scroll-snap-type: x mandatory;
|
|
5546
|
+
scrollbar-width: none;
|
|
5547
|
+
}
|
|
5548
|
+
.ncua-context-tab__bar::-webkit-scrollbar {
|
|
5549
|
+
display: none;
|
|
5550
|
+
}
|
|
5551
|
+
.ncua-context-tab__bar.is-fill .ncua-context-tab__tab {
|
|
5552
|
+
flex: 1 1 0;
|
|
5553
|
+
}
|
|
5554
|
+
.ncua-context-tab__tab {
|
|
5555
|
+
border: 0;
|
|
5556
|
+
padding: 0;
|
|
5557
|
+
background-color: transparent;
|
|
5558
|
+
cursor: pointer;
|
|
5559
|
+
display: flex;
|
|
5560
|
+
align-items: center;
|
|
5561
|
+
justify-content: center;
|
|
5562
|
+
gap: 4px;
|
|
5563
|
+
flex: 0 0 calc((100% - (var(--ncua-context-tab-visible, 7) - 1) * 8px) / var(--ncua-context-tab-visible, 7));
|
|
5564
|
+
min-width: 0;
|
|
5565
|
+
scroll-snap-align: start;
|
|
5566
|
+
padding: 5px 12px;
|
|
5567
|
+
border-radius: 6px;
|
|
5568
|
+
font-size: var(--font-size-sm);
|
|
5569
|
+
line-height: var(--line-heights-sm);
|
|
5570
|
+
font-weight: 700;
|
|
5571
|
+
color: var(--gray-400);
|
|
5572
|
+
white-space: nowrap;
|
|
5573
|
+
}
|
|
5574
|
+
.ncua-context-tab__tab-label {
|
|
5575
|
+
overflow: hidden;
|
|
5576
|
+
display: block;
|
|
5577
|
+
text-overflow: ellipsis;
|
|
5578
|
+
white-space: nowrap;
|
|
5579
|
+
word-wrap: break-word;
|
|
5580
|
+
min-width: 0;
|
|
5581
|
+
}
|
|
5582
|
+
.ncua-context-tab__tab:hover {
|
|
5583
|
+
color: var(--gray-500);
|
|
5584
|
+
}
|
|
5585
|
+
.ncua-context-tab__tab.is-active {
|
|
5586
|
+
color: var(--gray-700);
|
|
5587
|
+
}
|
|
5588
|
+
.ncua-context-tab__tab.is-disabled, .ncua-context-tab__tab:disabled {
|
|
5589
|
+
color: var(--gray-300);
|
|
5590
|
+
cursor: not-allowed;
|
|
5591
|
+
}
|
|
5592
|
+
.ncua-context-tab__tab.is-disabled:hover, .ncua-context-tab__tab:disabled:hover {
|
|
5593
|
+
background-color: transparent;
|
|
5594
|
+
box-shadow: none;
|
|
5595
|
+
}
|
|
5596
|
+
.ncua-context-tab__control {
|
|
5597
|
+
flex-shrink: 0;
|
|
5598
|
+
}
|
|
5599
|
+
.ncua-context-tab__control--menu.ncua-btn--xs, .ncua-context-tab__control--prev.ncua-btn--xs, .ncua-context-tab__control--next.ncua-btn--xs {
|
|
5600
|
+
width: 32px;
|
|
5601
|
+
height: 32px;
|
|
5602
|
+
transition: none;
|
|
5603
|
+
}
|
|
5604
|
+
.ncua-context-tab__tab:hover, .ncua-context-tab__tab.is-active, .ncua-context-tab__control--menu.ncua-btn--xs[aria-expanded]:hover, .ncua-context-tab__control--menu.ncua-btn--xs[aria-expanded=true], .ncua-context-tab__control--prev.ncua-btn--xs:not(.is-disable):hover, .ncua-context-tab__control--next.ncua-btn--xs:not(.is-disable):hover {
|
|
5605
|
+
background-color: var(--base-white);
|
|
5606
|
+
box-shadow: var(--shadow-sm);
|
|
5607
|
+
}
|
|
5608
|
+
.ncua-context-tab__nav {
|
|
5609
|
+
display: flex;
|
|
5610
|
+
align-items: center;
|
|
5611
|
+
gap: 4px;
|
|
5612
|
+
flex-shrink: 0;
|
|
5613
|
+
}
|
|
5614
|
+
.ncua-context-tab__panel {
|
|
5615
|
+
position: absolute;
|
|
5616
|
+
top: calc(100% + 4px);
|
|
5617
|
+
left: -1px;
|
|
5618
|
+
z-index: 10;
|
|
5619
|
+
display: flex;
|
|
5620
|
+
width: 100%;
|
|
5621
|
+
max-height: 188px;
|
|
5622
|
+
overflow-y: auto;
|
|
5623
|
+
border: 1px solid var(--gray-100);
|
|
5624
|
+
border-radius: 8px;
|
|
5625
|
+
background-color: var(--base-white);
|
|
5626
|
+
box-shadow: var(--shadow-lg);
|
|
5627
|
+
}
|
|
5628
|
+
.ncua-context-tab__panel-column {
|
|
5629
|
+
flex: 1 1 0;
|
|
5630
|
+
min-width: 0;
|
|
5631
|
+
padding: 4px 0;
|
|
5632
|
+
list-style: none;
|
|
5633
|
+
margin: 0;
|
|
5634
|
+
}
|
|
5635
|
+
.ncua-context-tab__panel-column li {
|
|
5636
|
+
padding: 2px 6px;
|
|
5637
|
+
}
|
|
5638
|
+
.ncua-context-tab__option {
|
|
5639
|
+
border: 0;
|
|
5640
|
+
padding: 0;
|
|
5641
|
+
background-color: transparent;
|
|
5642
|
+
cursor: pointer;
|
|
5643
|
+
display: flex;
|
|
5644
|
+
align-items: center;
|
|
5645
|
+
gap: 8px;
|
|
5646
|
+
width: 100%;
|
|
5647
|
+
min-width: 120px;
|
|
5648
|
+
padding: 7px 10px;
|
|
5649
|
+
border-radius: 6px;
|
|
5650
|
+
font-size: var(--font-size-xs);
|
|
5651
|
+
line-height: var(--line-heights-xs);
|
|
5652
|
+
font-weight: 500;
|
|
5653
|
+
color: var(--gray-500);
|
|
5654
|
+
text-align: left;
|
|
5655
|
+
}
|
|
5656
|
+
.ncua-context-tab__option-label {
|
|
5657
|
+
overflow: hidden;
|
|
5658
|
+
display: block;
|
|
5659
|
+
text-overflow: ellipsis;
|
|
5660
|
+
white-space: nowrap;
|
|
5661
|
+
word-wrap: break-word;
|
|
5662
|
+
min-width: 0;
|
|
5663
|
+
}
|
|
5664
|
+
.ncua-context-tab__option-check {
|
|
5665
|
+
flex-shrink: 0;
|
|
5666
|
+
margin-inline-start: auto;
|
|
5667
|
+
color: var(--gray-700);
|
|
5668
|
+
}
|
|
5669
|
+
.ncua-context-tab__option:hover {
|
|
5670
|
+
background-color: var(--gray-50);
|
|
5671
|
+
}
|
|
5672
|
+
.ncua-context-tab__option:disabled {
|
|
5673
|
+
color: var(--gray-300);
|
|
5674
|
+
cursor: not-allowed;
|
|
5675
|
+
}
|
|
5676
|
+
.ncua-context-tab__option:disabled:hover {
|
|
5677
|
+
background-color: transparent;
|
|
5678
|
+
}
|
|
5679
|
+
.ncua-context-tab .ncua-badge {
|
|
5680
|
+
flex-shrink: 0;
|
|
5681
|
+
}
|
|
5682
|
+
|
|
5511
5683
|
.ncua-progress-circle {
|
|
5512
5684
|
position: relative;
|
|
5513
5685
|
display: inline-flex;
|
|
@@ -5965,6 +6137,8 @@ button {
|
|
|
5965
6137
|
}
|
|
5966
6138
|
|
|
5967
6139
|
.ncua-table {
|
|
6140
|
+
--ncua-table-header-height: 40px;
|
|
6141
|
+
--ncua-table-default-min-width: 1140px;
|
|
5968
6142
|
position: relative;
|
|
5969
6143
|
display: flex;
|
|
5970
6144
|
flex-direction: column;
|
|
@@ -6357,6 +6531,24 @@ button {
|
|
|
6357
6531
|
align-items: center;
|
|
6358
6532
|
line-height: 1;
|
|
6359
6533
|
}
|
|
6534
|
+
.ncua-table--vertical .ncua-table .ncua-table__header > .ncua-table__row th:first-child {
|
|
6535
|
+
width: auto;
|
|
6536
|
+
min-width: 0;
|
|
6537
|
+
max-width: none;
|
|
6538
|
+
padding: 0 var(--spacing-m);
|
|
6539
|
+
font-size: var(--font-size-xs);
|
|
6540
|
+
font-weight: var(--font-weights-commerce-sans-1);
|
|
6541
|
+
line-height: var(--line-heights-xs);
|
|
6542
|
+
color: var(--gray-500);
|
|
6543
|
+
text-align: center;
|
|
6544
|
+
background: var(--gray-100);
|
|
6545
|
+
border-right: 1px solid var(--gray-200);
|
|
6546
|
+
}
|
|
6547
|
+
.ncua-table--vertical .ncua-table .ncua-table__header > .ncua-table__row th:last-child {
|
|
6548
|
+
padding: 0 var(--spacing-m);
|
|
6549
|
+
text-align: center;
|
|
6550
|
+
font-weight: var(--font-weights-commerce-sans-1);
|
|
6551
|
+
}
|
|
6360
6552
|
.ncua-table--vertical .ncua-table .ncua-table__body > .ncua-table__row td:first-child,
|
|
6361
6553
|
.ncua-table--vertical .ncua-table .ncua-table__body > .ncua-table__row th:first-child {
|
|
6362
6554
|
width: auto;
|
|
@@ -6501,7 +6693,15 @@ button {
|
|
|
6501
6693
|
border: 1px solid var(--gray-100);
|
|
6502
6694
|
border-radius: 12px;
|
|
6503
6695
|
box-shadow: var(--shadow-sm);
|
|
6504
|
-
|
|
6696
|
+
}
|
|
6697
|
+
.ncua-block-container > *:first-child {
|
|
6698
|
+
border-radius: 12px 12px 0 0;
|
|
6699
|
+
}
|
|
6700
|
+
.ncua-block-container > *:last-child {
|
|
6701
|
+
border-radius: 0 0 12px 12px;
|
|
6702
|
+
}
|
|
6703
|
+
.ncua-block-container > *:only-child, .ncua-block-container > *:first-child:has(~ *:last-child[style*="display: none"]), .ncua-block-container > *:first-child:has(~ *:last-child[hidden]) {
|
|
6704
|
+
border-radius: 12px;
|
|
6505
6705
|
}
|
|
6506
6706
|
.ncua-block-container__body {
|
|
6507
6707
|
display: flex;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncds/ui-admin",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.11",
|
|
4
4
|
"description": "nhn-commerce의 어드민 디자인 시스템입니다.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"barrel": "node barrel.js",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "2.1.0",
|
|
71
71
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
72
72
|
"@atlaskit/pragmatic-drag-and-drop-react-accessibility": "1.1.4",
|
|
73
|
-
"@ncds/ui-admin-icon": "0.1.
|
|
73
|
+
"@ncds/ui-admin-icon": "0.1.11",
|
|
74
74
|
"classnames": "2.5.1",
|
|
75
75
|
"dompurify": "3.4.1",
|
|
76
76
|
"flatpickr": "4.6.13",
|