Skip to content

Commit

Permalink
feat: update registry
Browse files Browse the repository at this point in the history
  • Loading branch information
malangcat committed Jan 3, 2025
1 parent f39d522 commit c97ab18
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docs/public/__registry__/ui/action-chip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "action-chip",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"registries": [
{
Expand Down
3 changes: 1 addition & 2 deletions docs/public/__registry__/ui/avatar.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "avatar",
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-avatar"
"@seed-design/react"
],
"innerDependencies": [
"identity-placeholder"
Expand Down
2 changes: 1 addition & 1 deletion docs/public/__registry__/ui/badge.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "badge",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"registries": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/public/__registry__/ui/checkbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"name": "checkbox.tsx",
"type": "ui",
"content": "\"use client\";\n\nimport IconCheckmarkFatFill from \"@daangn/react-monochrome-icon/IconCheckmarkFatFill\";\nimport { Checkbox as SeedCheckbox } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nimport \"@seed-design/stylesheet/checkbox.css\";\n\nexport interface CheckboxProps extends SeedCheckbox.RootProps {\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n\n rootRef?: React.Ref<HTMLLabelElement>;\n\n label?: React.ReactNode;\n}\n\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ inputProps, rootRef, label, ...otherProps }, ref) => {\n return (\n <SeedCheckbox.Root ref={rootRef} {...otherProps}>\n <SeedCheckbox.Control>\n <SeedCheckbox.CheckedIcon svg={<IconCheckmarkFatFill />} />\n </SeedCheckbox.Control>\n <SeedCheckbox.Label>{label}</SeedCheckbox.Label>\n <SeedCheckbox.HiddenInput ref={ref} {...inputProps} />\n </SeedCheckbox.Root>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n"
"content": "\"use client\";\n\nimport IconCheckmarkFatFill from \"@daangn/react-monochrome-icon/IconCheckmarkFatFill\";\nimport IconMinusFatFill from \"@daangn/react-monochrome-icon/IconMinusFatFill\";\nimport { Checkbox as SeedCheckbox } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nimport \"@seed-design/stylesheet/checkbox.css\";\n\nexport interface CheckboxProps extends SeedCheckbox.RootProps {\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\n\n rootRef?: React.Ref<HTMLLabelElement>;\n\n label?: React.ReactNode;\n}\n\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ inputProps, rootRef, label, ...otherProps }, ref) => {\n return (\n <SeedCheckbox.Root ref={rootRef} {...otherProps}>\n <SeedCheckbox.Control>\n <SeedCheckbox.CheckedIcon svg={<IconCheckmarkFatFill />} />\n <SeedCheckbox.IndeterminateIcon svg={<IconMinusFatFill />} />\n </SeedCheckbox.Control>\n <SeedCheckbox.Label>{label}</SeedCheckbox.Label>\n <SeedCheckbox.HiddenInput ref={ref} {...inputProps} />\n </SeedCheckbox.Root>\n );\n },\n);\nCheckbox.displayName = \"Checkbox\";\n"
}
]
}
4 changes: 2 additions & 2 deletions docs/public/__registry__/ui/control-chip.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "control-chip",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"registries": [
{
"name": "control-chip.tsx",
"type": "ui",
"content": "\"use client\";\n\nimport { ControlChip as SeedControlChip } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nimport \"@seed-design/stylesheet/controlChip.css\";\n\nexport interface ControlChipProps extends SeedControlChip.RootProps {\n prefixIcon?: React.ReactNode;\n\n suffixIcon?: React.ReactNode;\n\n count?: number;\n}\n\nexport const ControlChip = React.forwardRef<HTMLLabelElement, ControlChipProps>(\n (\n { className, children, prefixIcon, suffixIcon, count, ...otherProps },\n ref,\n ) => {\n return (\n <SeedControlChip.Root ref={ref} {...otherProps}>\n {otherProps.layout === \"withText\" ? (\n <>\n {prefixIcon && <SeedControlChip.PrefixIcon svg={prefixIcon} />}\n <SeedControlChip.Label>{children}</SeedControlChip.Label>\n {count && <SeedControlChip.Count>{count}</SeedControlChip.Count>}\n {suffixIcon && <SeedControlChip.SuffixIcon svg={suffixIcon} />}\n </>\n ) : (\n <SeedControlChip.Icon svg={children} />\n )}\n </SeedControlChip.Root>\n );\n },\n);\nControlChip.displayName = \"ControlChip\";\n\n/**\n * This file is generated snippet from the Seed Design.\n * You can extend the functionality from this snippet if needed.\n */\n"
"content": "\"use client\";\n\nimport { ControlChip as SeedControlChip } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nimport \"@seed-design/stylesheet/controlChip.css\";\n\nexport interface ControlChipToggleProps extends SeedControlChip.RootProps {\n prefixIcon?: React.ReactNode;\n\n suffixIcon?: React.ReactNode;\n\n count?: number;\n}\n\nexport const ControlChipToggle = React.forwardRef<\n HTMLLabelElement,\n ControlChipToggleProps\n>(\n (\n { className, children, prefixIcon, suffixIcon, count, ...otherProps },\n ref,\n ) => {\n return (\n <SeedControlChip.Root ref={ref} {...otherProps}>\n {otherProps.layout === \"withText\" ? (\n <>\n {prefixIcon && <SeedControlChip.PrefixIcon svg={prefixIcon} />}\n <SeedControlChip.Label>{children}</SeedControlChip.Label>\n {count && <SeedControlChip.Count>{count}</SeedControlChip.Count>}\n {suffixIcon && <SeedControlChip.SuffixIcon svg={suffixIcon} />}\n </>\n ) : (\n <SeedControlChip.Icon svg={children} />\n )}\n </SeedControlChip.Root>\n );\n },\n);\nControlChipToggle.displayName = \"ControlChip.Toggle\";\n\nexport const ControlChip = Object.assign(\n () => {\n console.warn(\n \"ControlChip is a base component and should not be rendered. Use ControlChip.Toggle or ControlChip.Radio instead.\",\n );\n },\n {\n Toggle: ControlChipToggle,\n },\n);\n\n/**\n * This file is generated snippet from the Seed Design.\n * You can extend the functionality from this snippet if needed.\n */\n"
}
]
}
4 changes: 2 additions & 2 deletions docs/public/__registry__/ui/extended-fab.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "extended-fab",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"registries": [
{
"name": "extended-fab.tsx",
"type": "ui",
"content": "\"use client\";\n\nimport \"@seed-design/stylesheet/extendedFab.css\";\n\nimport { ExtendedFab as SeedExtendedFab } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nexport interface ExtendedFabProps extends SeedExtendedFab.RootProps {\n prefixIcon?: React.ReactNode;\n}\n\n/**\n * @see https://v3.seed-design.io/docs/react/components/action-button\n */\nexport const ExtendedFab = React.forwardRef<\n HTMLButtonElement,\n ExtendedFabProps\n>(({ className, children, prefixIcon, ...otherProps }, ref) => {\n return (\n <SeedExtendedFab.Root ref={ref} {...otherProps}>\n {prefixIcon && <SeedExtendedFab.PrefixIcon svg={prefixIcon} />}\n <SeedExtendedFab.Label>{children}</SeedExtendedFab.Label>\n </SeedExtendedFab.Root>\n );\n});\nExtendedFab.displayName = \"ExtendedFab\";\n"
"content": "\"use client\";\n\nimport \"@seed-design/stylesheet/extendedFab.css\";\n\nimport { ExtendedFab as SeedExtendedFab } from \"@seed-design/react\";\nimport * as React from \"react\";\n\nexport interface ExtendedFabProps extends SeedExtendedFab.RootProps {\n prefixIcon?: React.ReactNode;\n}\n\n/**\n * @see https://v3.seed-design.io/docs/react/components/extended-fab\n */\nexport const ExtendedFab = React.forwardRef<\n HTMLButtonElement,\n ExtendedFabProps\n>(({ className, children, prefixIcon, ...otherProps }, ref) => {\n return (\n <SeedExtendedFab.Root ref={ref} {...otherProps}>\n {prefixIcon && <SeedExtendedFab.PrefixIcon svg={prefixIcon} />}\n <SeedExtendedFab.Label>{children}</SeedExtendedFab.Label>\n </SeedExtendedFab.Root>\n );\n});\nExtendedFab.displayName = \"ExtendedFab\";\n"
}
]
}
2 changes: 1 addition & 1 deletion docs/public/__registry__/ui/fab.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fab",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"registries": [
{
Expand Down
25 changes: 12 additions & 13 deletions docs/public/__registry__/ui/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"identity-placeholder"
],
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-avatar"
"@seed-design/react"
],
"files": [
"ui:avatar.tsx"
Expand All @@ -72,8 +71,7 @@
{
"name": "toggle-button",
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-toggle"
"@seed-design/react"
],
"files": [
"ui:toggle-button.tsx"
Expand All @@ -82,8 +80,7 @@
{
"name": "reaction-button",
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-toggle"
"@seed-design/react"
],
"files": [
"ui:reaction-button.tsx"
Expand All @@ -92,7 +89,7 @@
{
"name": "fab",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"files": [
"ui:fab.tsx"
Expand All @@ -101,7 +98,7 @@
{
"name": "extended-fab",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"files": [
"ui:extended-fab.tsx"
Expand All @@ -110,7 +107,7 @@
{
"name": "action-chip",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"files": [
"ui:action-chip.tsx"
Expand All @@ -119,7 +116,7 @@
{
"name": "badge",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"files": [
"ui:badge.tsx"
Expand All @@ -139,7 +136,7 @@
{
"name": "control-chip",
"dependencies": [
"@radix-ui/react-slot"
"@seed-design/react"
],
"files": [
"ui:control-chip.tsx"
Expand Down Expand Up @@ -204,7 +201,7 @@
{
"name": "progress-circle",
"dependencies": [
"@seed-design/react-progress"
"@seed-design/react"
],
"files": [
"ui:progress-circle.tsx"
Expand Down Expand Up @@ -240,7 +237,9 @@
},
{
"name": "skeleton",
"dependencies": [],
"dependencies": [
"@seed-design/react"
],
"files": [
"ui:skeleton.tsx"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/public/__registry__/ui/progress-circle.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "progress-circle",
"dependencies": [
"@seed-design/react-progress"
"@seed-design/react"
],
"registries": [
{
Expand Down
3 changes: 1 addition & 2 deletions docs/public/__registry__/ui/reaction-button.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "reaction-button",
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-toggle"
"@seed-design/react"
],
"registries": [
{
Expand Down
4 changes: 3 additions & 1 deletion docs/public/__registry__/ui/skeleton.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "skeleton",
"dependencies": [],
"dependencies": [
"@seed-design/react"
],
"registries": [
{
"name": "skeleton.tsx",
Expand Down
3 changes: 1 addition & 2 deletions docs/public/__registry__/ui/toggle-button.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "toggle-button",
"dependencies": [
"@radix-ui/react-slot",
"@seed-design/react-toggle"
"@seed-design/react"
],
"registries": [
{
Expand Down
20 changes: 10 additions & 10 deletions docs/registry/registry-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const registryUI: RegistryUI = [
{
name: "avatar",
innerDependencies: ["identity-placeholder"],
dependencies: ["@radix-ui/react-slot", "@seed-design/react-avatar"],
dependencies: ["@seed-design/react"],
files: ["ui:avatar.tsx"],
},
{
Expand All @@ -46,32 +46,32 @@ export const registryUI: RegistryUI = [
},
{
name: "toggle-button",
dependencies: ["@radix-ui/react-slot", "@seed-design/react-toggle"],
dependencies: ["@seed-design/react"],
files: ["ui:toggle-button.tsx"],
},
{
name: "reaction-button",
dependencies: ["@radix-ui/react-slot", "@seed-design/react-toggle"],
dependencies: ["@seed-design/react"],
files: ["ui:reaction-button.tsx"],
},
{
name: "fab",
dependencies: ["@radix-ui/react-slot"],
dependencies: ["@seed-design/react"],
files: ["ui:fab.tsx"],
},
{
name: "extended-fab",
dependencies: ["@radix-ui/react-slot"],
dependencies: ["@seed-design/react"],
files: ["ui:extended-fab.tsx"],
},
{
name: "action-chip",
dependencies: ["@radix-ui/react-slot"],
dependencies: ["@seed-design/react"],
files: ["ui:action-chip.tsx"],
},
{
name: "badge",
dependencies: ["@radix-ui/react-slot"],
dependencies: ["@seed-design/react"],
files: ["ui:badge.tsx"],
},
{
Expand All @@ -85,7 +85,7 @@ export const registryUI: RegistryUI = [
},
{
name: "control-chip",
dependencies: ["@radix-ui/react-slot"],
dependencies: ["@seed-design/react"],
files: ["ui:control-chip.tsx"],
},
{
Expand Down Expand Up @@ -127,7 +127,7 @@ export const registryUI: RegistryUI = [
},
{
name: "progress-circle",
dependencies: ["@seed-design/react-progress"],
dependencies: ["@seed-design/react"],
files: ["ui:progress-circle.tsx"],
},
{
Expand All @@ -149,7 +149,7 @@ export const registryUI: RegistryUI = [
},
{
name: "skeleton",
dependencies: [],
dependencies: ["@seed-design/react"],
files: ["ui:skeleton.tsx"],
},
{
Expand Down

0 comments on commit c97ab18

Please sign in to comment.