@reco-inc/upbox-ui 1.3.0 → 1.4.0

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/FigmaConnect.md CHANGED
@@ -150,7 +150,7 @@
150
150
 
151
151
  | Slot | 설명 |
152
152
  |---|---|
153
- | `default` | 본문 텍스트. 좌·우 아이콘은 슬롯 안에 `<lucide />` 직접 배치 |
153
+ | `default` | 본문 텍스트. 좌·우 아이콘은 슬롯 안에 `<Icon src="..." />` 또는 `<lucide />` 직접 배치. `Icon` 은 색을 variant 텍스트 색(currentColor)으로, 크기를 size 에 맞춰(16/16/20/20/24) 자동 적용 |
154
154
 
155
155
  ### Code Example
156
156
 
@@ -150,7 +150,7 @@
150
150
 
151
151
  | Slot | 설명 |
152
152
  |---|---|
153
- | `default` | 본문 텍스트. 좌·우 아이콘은 슬롯 안에 `<lucide />` 직접 배치 |
153
+ | `default` | 본문 텍스트. 좌·우 아이콘은 슬롯 안에 `<Icon src="..." />` 또는 `<lucide />` 직접 배치. `Icon` 은 색을 variant 텍스트 색(currentColor)으로, 크기를 size 에 맞춰(16/16/20/20/24) 자동 적용 |
154
154
 
155
155
  ### Code Example
156
156
 
@@ -2,7 +2,7 @@ import { HTMLAttributes } from 'vue';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  export { default as BadgeDivider } from './BadgeDivider';
4
4
  export declare const badgeDividerVariants: (props?: ({
5
- variant?: "navy" | "green" | null | undefined;
5
+ variant?: "green" | "navy" | null | undefined;
6
6
  size?: "3xsmall" | "2xsmall" | "xsmall" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  export type BadgeDividerVariants = VariantProps<typeof badgeDividerVariants>;
@@ -0,0 +1,18 @@
1
+ import { IconProps } from '.';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLSpanElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,40 @@
1
+ import { StoryObj } from '@storybook/vue3-vite';
2
+ declare const meta: {
3
+ title: string;
4
+ component: {
5
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
6
+ P: {};
7
+ B: {};
8
+ D: {};
9
+ C: {};
10
+ M: {};
11
+ Defaults: {};
12
+ }, Readonly<import('.').IconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
13
+ __isFragment?: never;
14
+ __isTeleport?: never;
15
+ __isSuspense?: never;
16
+ } & import('vue').ComponentOptionsBase<Readonly<import('.').IconProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
17
+ $slots: {
18
+ default?(_: {}): any;
19
+ };
20
+ });
21
+ tags: string[];
22
+ argTypes: {
23
+ src: {
24
+ control: "text";
25
+ };
26
+ size: {
27
+ control: "number";
28
+ };
29
+ color: {
30
+ control: "color";
31
+ };
32
+ };
33
+ };
34
+ export default meta;
35
+ type Story = StoryObj<typeof meta>;
36
+ export declare const Default: Story;
37
+ export declare const InButton: Story;
38
+ export declare const ButtonSizes: Story;
39
+ export declare const InIconButton: Story;
40
+ export declare const ColorOverride: Story;
@@ -0,0 +1,6 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ /** 부모 컴포넌트(Button 등)가 자기 size 에 맞는 아이콘 px 를 내려준다 */
3
+ export interface IconContext {
4
+ size: ComputedRef<number>;
5
+ }
6
+ export declare const ICON_CONTEXT_KEY: InjectionKey<IconContext>;
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ export { default as Icon } from './Icon';
3
+ export { ICON_CONTEXT_KEY } from './iconContext';
4
+ export type { IconContext } from './iconContext';
5
+ export interface IconProps {
6
+ /** 앱 Icon src 와 같은 경로 (`action/arrow-left-regular.svg`). 없으면 default slot 의 svg 를 쓴다 */
7
+ src?: string;
8
+ /** px. 없으면 부모(Button/IconButton) size 에 맞춘 값, 부모가 없으면 24 */
9
+ size?: number;
10
+ /** 기본은 currentColor 라 부모 텍스트 색(Button variant/hover/active)을 그대로 따른다 */
11
+ color?: string;
12
+ class?: HTMLAttributes["class"];
13
+ }
@@ -21,12 +21,12 @@ export interface TabsEmits {
21
21
  }
22
22
  export declare const tabsListVariants: (props?: ({
23
23
  variant?: "box" | "default" | "round" | null | undefined;
24
- color?: "navy" | "grey" | null | undefined;
24
+ color?: "grey" | "navy" | null | undefined;
25
25
  size?: "small" | "large" | "regular" | "xlarge" | null | undefined;
26
26
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
27
27
  export declare const tabsTriggerVariants: (props?: ({
28
28
  variant?: "box" | "default" | "round" | null | undefined;
29
- color?: "navy" | "grey" | null | undefined;
29
+ color?: "grey" | "navy" | null | undefined;
30
30
  size?: "small" | "large" | "regular" | "xlarge" | null | undefined;
31
31
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
32
32
  export type TabsListVariants = VariantProps<typeof tabsListVariants>;
package/dist/global.d.ts CHANGED
@@ -82,6 +82,7 @@ declare module 'vue' {
82
82
  FormLabel: typeof import('./components/form')['FormLabel'];
83
83
  FormMessage: typeof import('./components/form')['FormMessage'];
84
84
  TextField: typeof import('./components/text-field')['TextField'];
85
+ Icon: typeof import('./components/icon')['Icon'];
85
86
  InputGroup: typeof import('./components/input-group')['InputGroup'];
86
87
  InputGroupAddon: typeof import('./components/input-group')['InputGroupAddon'];
87
88
  InputGroupButton: typeof import('./components/input-group')['InputGroupButton'];
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export * from './components/badge-divider';
8
8
  export * from './components/breadcrumb';
9
9
  export * from './components/button';
10
10
  export * from './components/fab';
11
+ export * from './components/icon';
11
12
  export * from './components/icon-button';
12
13
  export * from './components/text-button';
13
14
  export * from './components/calendar';