Skip to content

Commit

Permalink
feat: prerelease with alpha tag
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Oct 5, 2024
1 parent 29bea98 commit e812460
Show file tree
Hide file tree
Showing 58 changed files with 802 additions and 537 deletions.
11 changes: 11 additions & 0 deletions component-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# component-docs

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/react-tabs@0.0.0-alpha-20241004093556
- @seed-design/recipe@0.0.0-alpha-20241004093556
- @seed-design/stylesheet@0.0.0-alpha-20241004093556
- @seed-design/react-checkbox@0.0.0-alpha-20241004093556
11 changes: 6 additions & 5 deletions component-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"dependencies": {
"@radix-ui/react-slot": "^1.1.0",
"@seed-design/design-token": "^1.0.3",
"@seed-design/react-checkbox": "0.0.0",
"@seed-design/react-tabs": "0.0.0",
"@seed-design/recipe": "0.0.0",
"@seed-design/stylesheet": "1.0.4",
"@seed-design/react-checkbox": "0.0.0-alpha-20241004093556",
"@seed-design/react-tabs": "0.0.0-alpha-20241004093556",
"@seed-design/recipe": "0.0.0-alpha-20241004093556",
"@seed-design/stylesheet": "0.0.0-alpha-20241004093556",
"@stackflow/config": "^1.1.0",
"@stackflow/core": "^1.0.13",
"@stackflow/plugin-basic-ui": "^1.8.4",
Expand Down Expand Up @@ -51,5 +51,6 @@
"typescript": "^5.5.4",
"watchlist": "^0.3.1",
"zod": "^3.23.8"
}
},
"version": "0.0.0-alpha-20241004093556"
}
14 changes: 7 additions & 7 deletions component-docs/public/mdx/component/chip-tabs.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
```tsx copy filename="chip-tabs.tsx"
"use client";

import clsx from "clsx";
import * as React from "react";
import {
useLazyContents,
useTabs,
type UseTabsProps,
type TriggerProps,
type ContentProps,
useLazyContents,
type TriggerProps,
type UseLazyContentsProps,
type UseTabsProps,
} from "@seed-design/react-tabs";
import { chipTabs, ChipTabsVariant } from "@seed-design/recipe/chipTabs";
import { chipTab, ChipTabVariant } from "@seed-design/recipe/chipTab";
import { chipTab } from "@seed-design/recipe/chipTab";
import { ChipTabsVariant, chipTabs } from "@seed-design/recipe/chipTabs";
import clsx from "clsx";
import * as React from "react";

import "@seed-design/stylesheet/chipTab.css";
import "@seed-design/stylesheet/chipTabs.css";
Expand Down
2 changes: 1 addition & 1 deletion component-docs/public/registry/component/chip-tabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"registries": [
{
"name": "chip-tabs.tsx",
"content": "\"use client\";\n\nimport clsx from \"clsx\";\nimport * as React from \"react\";\nimport {\n useTabs,\n type UseTabsProps,\n type TriggerProps,\n type ContentProps,\n useLazyContents,\n type UseLazyContentsProps,\n} from \"@seed-design/react-tabs\";\nimport { chipTabs, ChipTabsVariant } from \"@seed-design/recipe/chipTabs\";\nimport { chipTab, ChipTabVariant } from \"@seed-design/recipe/chipTab\";\n\nimport \"@seed-design/stylesheet/chipTab.css\";\nimport \"@seed-design/stylesheet/chipTabs.css\";\n\ntype Assign<T, U> = Omit<T, keyof U> & U;\n\ninterface ChipTabsContextValue {\n api: ReturnType<typeof useTabs>;\n classNames: ReturnType<typeof chipTabs>;\n shouldRender: (value: string) => boolean;\n variant: ChipTabsVariant[\"variant\"];\n}\n\nconst ChipTabsContext = React.createContext<ChipTabsContextValue | null>(null);\n\nconst useChipTabsContext = () => {\n const context = React.useContext(ChipTabsContext);\n if (!context) {\n throw new Error(\"Tabs cannot be rendered outside the Tabs\");\n }\n return context;\n};\n\nexport interface ChipTabsProps\n extends Assign<React.HTMLAttributes<HTMLDivElement>, Omit<UseTabsProps, \"layout\">>,\n ChipTabsVariant,\n Omit<UseLazyContentsProps, \"currentValue\"> {}\n\nexport const ChipTabs = React.forwardRef<HTMLDivElement, ChipTabsProps>((props, ref) => {\n const { className, lazyMode, isLazy, variant } = props;\n const api = useTabs(props);\n const classNames = chipTabs({\n variant,\n });\n const { rootProps, value, restProps } = api;\n const { shouldRender } = useLazyContents({ currentValue: value, lazyMode, isLazy });\n\n return (\n <div ref={ref} {...rootProps} {...restProps} className={clsx(classNames.root, className)}>\n <ChipTabsContext.Provider\n value={{\n api,\n classNames,\n shouldRender,\n variant,\n }}\n >\n {props.children}\n </ChipTabsContext.Provider>\n </div>\n );\n});\nChipTabs.displayName = \"ChipTabs\";\n\nexport const ChipTabTriggerList = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...otherProps }, ref) => {\n const { api, classNames } = useChipTabsContext();\n const { tabTriggerListProps, triggerSize } = api;\n const { left } = triggerSize;\n const { triggerList } = classNames;\n\n const containerRef = React.useRef<HTMLDivElement>(null);\n React.useImperativeHandle(ref, () => containerRef.current as HTMLDivElement);\n\n React.useEffect(() => {\n if (containerRef.current) {\n containerRef.current?.scrollTo({\n // NOTE: 27px is half of tab's min-width\n left: left - 27,\n behavior: \"smooth\",\n });\n }\n }, [left]);\n\n return (\n <div\n ref={containerRef}\n {...tabTriggerListProps}\n className={clsx(triggerList, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n});\nChipTabTriggerList.displayName = \"ChipTabTriggerList\";\n\nexport interface ChipTabTriggerProps\n extends Assign<React.HTMLAttributes<HTMLButtonElement>, TriggerProps> {}\n\nexport const ChipTabTrigger = React.forwardRef<HTMLButtonElement, ChipTabTriggerProps>(\n ({ className, children, value, isDisabled, ...otherProps }, ref) => {\n const { api, variant } = useChipTabsContext();\n const { getTabTriggerProps } = api;\n const { label, root } = chipTab({\n variant,\n });\n const { rootProps, labelProps } = getTabTriggerProps({ value, isDisabled });\n\n return (\n <button ref={ref} {...rootProps} className={clsx(root, className)} {...otherProps}>\n <span className={label} {...labelProps}>\n {children}\n </span>\n </button>\n );\n },\n);\nChipTabTrigger.displayName = \"ChipTabTrigger\";\n\nexport const ChipTabContent = React.forwardRef<\n HTMLDivElement,\n Assign<React.HTMLAttributes<HTMLDivElement>, ContentProps>\n>(({ className, children, value, ...otherProps }, ref) => {\n const { api, classNames, shouldRender } = useChipTabsContext();\n const { getTabContentProps } = api;\n const { content } = classNames;\n const tabContentProps = getTabContentProps({ value });\n const isRender = shouldRender(value);\n\n return (\n <div ref={ref} {...tabContentProps} className={clsx(content, className)} {...otherProps}>\n {isRender && children}\n </div>\n );\n});\nChipTabContent.displayName = \"ChipTabContent\";\n"
"content": "\"use client\";\n\nimport {\n useLazyContents,\n useTabs,\n type ContentProps,\n type TriggerProps,\n type UseLazyContentsProps,\n type UseTabsProps,\n} from \"@seed-design/react-tabs\";\nimport { chipTab } from \"@seed-design/recipe/chipTab\";\nimport { ChipTabsVariant, chipTabs } from \"@seed-design/recipe/chipTabs\";\nimport clsx from \"clsx\";\nimport * as React from \"react\";\n\nimport \"@seed-design/stylesheet/chipTab.css\";\nimport \"@seed-design/stylesheet/chipTabs.css\";\n\ntype Assign<T, U> = Omit<T, keyof U> & U;\n\ninterface ChipTabsContextValue {\n api: ReturnType<typeof useTabs>;\n classNames: ReturnType<typeof chipTabs>;\n shouldRender: (value: string) => boolean;\n variant: ChipTabsVariant[\"variant\"];\n}\n\nconst ChipTabsContext = React.createContext<ChipTabsContextValue | null>(null);\n\nconst useChipTabsContext = () => {\n const context = React.useContext(ChipTabsContext);\n if (!context) {\n throw new Error(\"Tabs cannot be rendered outside the Tabs\");\n }\n return context;\n};\n\nexport interface ChipTabsProps\n extends Assign<React.HTMLAttributes<HTMLDivElement>, Omit<UseTabsProps, \"layout\">>,\n ChipTabsVariant,\n Omit<UseLazyContentsProps, \"currentValue\"> {}\n\nexport const ChipTabs = React.forwardRef<HTMLDivElement, ChipTabsProps>((props, ref) => {\n const { className, lazyMode, isLazy, variant } = props;\n const api = useTabs(props);\n const classNames = chipTabs({\n variant,\n });\n const { rootProps, value, restProps } = api;\n const { shouldRender } = useLazyContents({ currentValue: value, lazyMode, isLazy });\n\n return (\n <div ref={ref} {...rootProps} {...restProps} className={clsx(classNames.root, className)}>\n <ChipTabsContext.Provider\n value={{\n api,\n classNames,\n shouldRender,\n variant,\n }}\n >\n {props.children}\n </ChipTabsContext.Provider>\n </div>\n );\n});\nChipTabs.displayName = \"ChipTabs\";\n\nexport const ChipTabTriggerList = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...otherProps }, ref) => {\n const { api, classNames } = useChipTabsContext();\n const { tabTriggerListProps, triggerSize } = api;\n const { left } = triggerSize;\n const { triggerList } = classNames;\n\n const containerRef = React.useRef<HTMLDivElement>(null);\n React.useImperativeHandle(ref, () => containerRef.current as HTMLDivElement);\n\n React.useEffect(() => {\n if (containerRef.current) {\n containerRef.current?.scrollTo({\n // NOTE: 27px is half of tab's min-width\n left: left - 27,\n behavior: \"smooth\",\n });\n }\n }, [left]);\n\n return (\n <div\n ref={containerRef}\n {...tabTriggerListProps}\n className={clsx(triggerList, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n});\nChipTabTriggerList.displayName = \"ChipTabTriggerList\";\n\nexport interface ChipTabTriggerProps\n extends Assign<React.HTMLAttributes<HTMLButtonElement>, TriggerProps> {}\n\nexport const ChipTabTrigger = React.forwardRef<HTMLButtonElement, ChipTabTriggerProps>(\n ({ className, children, value, isDisabled, ...otherProps }, ref) => {\n const { api, variant } = useChipTabsContext();\n const { getTabTriggerProps } = api;\n const { label, root } = chipTab({\n variant,\n });\n const { rootProps, labelProps } = getTabTriggerProps({ value, isDisabled });\n\n return (\n <button ref={ref} {...rootProps} className={clsx(root, className)} {...otherProps}>\n <span className={label} {...labelProps}>\n {children}\n </span>\n </button>\n );\n },\n);\nChipTabTrigger.displayName = \"ChipTabTrigger\";\n\nexport const ChipTabContent = React.forwardRef<\n HTMLDivElement,\n Assign<React.HTMLAttributes<HTMLDivElement>, ContentProps>\n>(({ className, children, value, ...otherProps }, ref) => {\n const { api, classNames, shouldRender } = useChipTabsContext();\n const { getTabContentProps } = api;\n const { content } = classNames;\n const tabContentProps = getTabContentProps({ value });\n const isRender = shouldRender(value);\n\n return (\n <div ref={ref} {...tabContentProps} className={clsx(content, className)} {...otherProps}>\n {isRender && children}\n </div>\n );\n});\nChipTabContent.displayName = \"ChipTabContent\";\n"
}
],
"type": "component"
Expand Down
14 changes: 7 additions & 7 deletions component-docs/seed-design/ui/chip-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"use client";

import clsx from "clsx";
import * as React from "react";
import {
useLazyContents,
useTabs,
type UseTabsProps,
type TriggerProps,
type ContentProps,
useLazyContents,
type TriggerProps,
type UseLazyContentsProps,
type UseTabsProps,
} from "@seed-design/react-tabs";
import { chipTabs, ChipTabsVariant } from "@seed-design/recipe/chipTabs";
import { chipTab, ChipTabVariant } from "@seed-design/recipe/chipTab";
import { chipTab } from "@seed-design/recipe/chipTab";
import { ChipTabsVariant, chipTabs } from "@seed-design/recipe/chipTabs";
import clsx from "clsx";
import * as React from "react";

import "@seed-design/stylesheet/chipTab.css";
import "@seed-design/stylesheet/chipTabs.css";
Expand Down
14 changes: 7 additions & 7 deletions component-docs/snippets/component/chip-tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"use client";

import clsx from "clsx";
import * as React from "react";
import {
useLazyContents,
useTabs,
type UseTabsProps,
type TriggerProps,
type ContentProps,
useLazyContents,
type TriggerProps,
type UseLazyContentsProps,
type UseTabsProps,
} from "@seed-design/react-tabs";
import { chipTabs, ChipTabsVariant } from "@seed-design/recipe/chipTabs";
import { chipTab, ChipTabVariant } from "@seed-design/recipe/chipTab";
import { chipTab } from "@seed-design/recipe/chipTab";
import { ChipTabsVariant, chipTabs } from "@seed-design/recipe/chipTabs";
import clsx from "clsx";
import * as React from "react";

import "@seed-design/stylesheet/chipTab.css";
import "@seed-design/stylesheet/chipTabs.css";
Expand Down
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @seed-design/docs

## 0.0.0-alpha-20241004093556

### Patch Changes

- [email protected]
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seed-design/docs",
"version": "0.0.0",
"version": "0.0.0-alpha-20241004093556",
"private": true,
"description": "seed docs",
"keywords": [
Expand Down
1 change: 1 addition & 0 deletions examples/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@seed-design/cli-example",
"version": "0.0.1",
"private": true,
"packageManager": "[email protected]",
"devDependencies": {
"@seed-design/cli": "workspace:^"
Expand Down
14 changes: 14 additions & 0 deletions examples/stackflow-spa/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# @seed-design/stackflow-spa

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/react-tabs@0.0.0-alpha-20241004093556
- @seed-design/recipe@0.0.0-alpha-20241004093556
- @seed-design/stylesheet@0.0.0-alpha-20241004093556
- @seed-design/react-popover@0.0.0-alpha-20241004093556
- @seed-design/react-radio-group@0.0.0-alpha-20241004093556
- @seed-design/react-switch@0.0.0-alpha-20241004093556
- @seed-design/react-text-field@0.0.0-alpha-20241004093556
17 changes: 9 additions & 8 deletions examples/stackflow-spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"dependencies": {
"@radix-ui/react-slot": "^1.0.2",
"@seed-design/icon": "^0.6.1",
"@seed-design/react-popover": "0.0.0",
"@seed-design/react-radio-group": "0.0.0",
"@seed-design/react-switch": "0.0.0",
"@seed-design/react-tabs": "0.0.0",
"@seed-design/react-text-field": "0.0.0",
"@seed-design/recipe": "0.0.0",
"@seed-design/stylesheet": "1.0.4",
"@seed-design/react-popover": "0.0.0-alpha-20241004093556",
"@seed-design/react-radio-group": "0.0.0-alpha-20241004093556",
"@seed-design/react-switch": "0.0.0-alpha-20241004093556",
"@seed-design/react-tabs": "0.0.0-alpha-20241004093556",
"@seed-design/react-text-field": "0.0.0-alpha-20241004093556",
"@seed-design/recipe": "0.0.0-alpha-20241004093556",
"@seed-design/stylesheet": "0.0.0-alpha-20241004093556",
"@stackflow/core": "^1.0.13",
"@stackflow/plugin-basic-ui": "^1.8.4",
"@stackflow/plugin-history-sync": "^1.6.0",
Expand All @@ -34,5 +34,6 @@
"typescript": "^5.4.5",
"vite": "^5.1.4",
"vite-plugin-checker": "^0.6.2"
}
},
"version": "0.0.0-alpha-20241004093556"
}
13 changes: 13 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @seed-design/cli

## 0.0.0-alpha-20241004093556

### Patch Changes

- prerelease

## 0.0.0-alpha-20241004093313

### Patch Changes

- bump
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seed-design/cli",
"version": "0.0.1",
"version": "0.0.0-alpha-20241004093556",
"type": "module",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/utils/get-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
} from "@/src/schema";

const BASE_URL =
process.env.NODE_ENV === "prod" ? "https://component-seed.design.io" : "http://localhost:3000";
process.env.NODE_ENV === "prod" ? "https://component.seed-design.io" : "http://localhost:3000";

export async function fetchComponentMetadatas(
fileNames?: string[],
Expand Down
7 changes: 7 additions & 0 deletions packages/gatsby-plugin-seed-design/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# gatsby-plugin-seed-design

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/stylesheet@0.0.0-alpha-20241004093556

## 0.2.7

### Patch Changes
Expand Down
5 changes: 3 additions & 2 deletions packages/gatsby-plugin-seed-design/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "gatsby-plugin-seed-design",
"version": "0.2.7",
"private": true,
"version": "0.0.0-alpha-20241004093556",
"description": "Seed Design Gatsby plugin",
"repository": {
"type": "git",
Expand Down Expand Up @@ -30,7 +31,7 @@
],
"dependencies": {
"@seed-design/react-theming": "^2.1.3",
"@seed-design/stylesheet": "^1.0.3"
"@seed-design/stylesheet": "0.0.0-alpha-20241004093556"
},
"peerDependencies": {
"gatsby": "^3.0.0 || ^4.0.0 || ^5.0.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-headless/avatar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @seed-design/react-avatar

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/dom-utils@0.0.0-alpha-20241004093556
4 changes: 2 additions & 2 deletions packages/react-headless/avatar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seed-design/react-avatar",
"version": "0.0.0",
"version": "0.0.0-alpha-20241004093556",
"repository": {
"type": "git",
"url": "git+https://github.com/daangn/seed-design.git",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"@radix-ui/react-use-layout-effect": "^1.0.1",
"@seed-design/dom-utils": "0.0.0"
"@seed-design/dom-utils": "0.0.0-alpha-20241004093556"
},
"devDependencies": {
"nanobundle": "^1.6.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/react-headless/checkbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @seed-design/react-checkbox

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/dom-utils@0.0.0-alpha-20241004093556
4 changes: 2 additions & 2 deletions packages/react-headless/checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@seed-design/react-checkbox",
"version": "0.0.0",
"version": "0.0.0-alpha-20241004093556",
"repository": {
"type": "git",
"url": "git+https://github.com/daangn/seed-design.git",
Expand All @@ -25,7 +25,7 @@
},
"dependencies": {
"@radix-ui/react-use-controllable-state": "1.0.1",
"@seed-design/dom-utils": "0.0.0"
"@seed-design/dom-utils": "0.0.0-alpha-20241004093556"
},
"devDependencies": {
"nanobundle": "^1.6.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/react-headless/popover/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# @seed-design/react-popover

## 0.0.0-alpha-20241004093556

### Patch Changes

- Updated dependencies
- @seed-design/dom-utils@0.0.0-alpha-20241004093556
Loading

0 comments on commit e812460

Please sign in to comment.