@_linked/primitives 1.0.5

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.
Files changed (191) hide show
  1. package/.changeset/README.md +20 -0
  2. package/.changeset/config.json +14 -0
  3. package/.github/workflows/changeset-check.yml +44 -0
  4. package/.github/workflows/ci.yml +30 -0
  5. package/.github/workflows/publish.yml +42 -0
  6. package/CHANGELOG.md +7 -0
  7. package/lib/cjs/backend.d.ts +0 -0
  8. package/lib/cjs/components/Accordion.d.ts +13 -0
  9. package/lib/cjs/components/Accordion.module.css +101 -0
  10. package/lib/cjs/components/AlertDialog.d.ts +37 -0
  11. package/lib/cjs/components/AlertDialog.module.css +80 -0
  12. package/lib/cjs/components/AspectRatio.d.ts +7 -0
  13. package/lib/cjs/components/AspectRatio.module.css +28 -0
  14. package/lib/cjs/components/Avatar.d.ts +11 -0
  15. package/lib/cjs/components/Avatar.module.css +43 -0
  16. package/lib/cjs/components/Breadcrumb.d.ts +41 -0
  17. package/lib/cjs/components/Breadcrumb.module.css +78 -0
  18. package/lib/cjs/components/Button.d.ts +9 -0
  19. package/lib/cjs/components/Button.module.css +246 -0
  20. package/lib/cjs/components/Checkbox.d.ts +4 -0
  21. package/lib/cjs/components/Checkbox.module.css +43 -0
  22. package/lib/cjs/components/Collapsible.d.ts +11 -0
  23. package/lib/cjs/components/Command.d.ts +167 -0
  24. package/lib/cjs/components/Command.module.css +153 -0
  25. package/lib/cjs/components/ContextMenu.d.ts +51 -0
  26. package/lib/cjs/components/ContextMenu.module.css +238 -0
  27. package/lib/cjs/components/Dialog.d.ts +38 -0
  28. package/lib/cjs/components/Dialog.module.css +109 -0
  29. package/lib/cjs/components/Drawer.d.ts +40 -0
  30. package/lib/cjs/components/Drawer.module.css +87 -0
  31. package/lib/cjs/components/DropdownMenu.d.ts +52 -0
  32. package/lib/cjs/components/DropdownMenu.module.css +244 -0
  33. package/lib/cjs/components/Form.d.ts +23 -0
  34. package/lib/cjs/components/Form.module.css +75 -0
  35. package/lib/cjs/components/Heading.d.ts +7 -0
  36. package/lib/cjs/components/Heading.module.css +83 -0
  37. package/lib/cjs/components/HoverCard.d.ts +15 -0
  38. package/lib/cjs/components/HoverCard.module.css +75 -0
  39. package/lib/cjs/components/IconButton.d.ts +9 -0
  40. package/lib/cjs/components/IconButton.module.css +150 -0
  41. package/lib/cjs/components/Input.d.ts +6 -0
  42. package/lib/cjs/components/Input.module.css +61 -0
  43. package/lib/cjs/components/Label.d.ts +4 -0
  44. package/lib/cjs/components/Label.module.css +7 -0
  45. package/lib/cjs/components/Menubar.d.ts +65 -0
  46. package/lib/cjs/components/Menubar.module.css +128 -0
  47. package/lib/cjs/components/MultiSelect.d.ts +86 -0
  48. package/lib/cjs/components/MultiSelect.module.css +93 -0
  49. package/lib/cjs/components/NavigationMenu.d.ts +21 -0
  50. package/lib/cjs/components/NavigationMenu.module.css +248 -0
  51. package/lib/cjs/components/Popover.d.ts +17 -0
  52. package/lib/cjs/components/Popover.module.css +106 -0
  53. package/lib/cjs/components/Progress.d.ts +9 -0
  54. package/lib/cjs/components/Progress.module.css +23 -0
  55. package/lib/cjs/components/RadioGroup.d.ts +9 -0
  56. package/lib/cjs/components/RadioGroup.module.css +57 -0
  57. package/lib/cjs/components/ScrollArea.d.ts +9 -0
  58. package/lib/cjs/components/ScrollArea.module.css +55 -0
  59. package/lib/cjs/components/Select.d.ts +28 -0
  60. package/lib/cjs/components/Select.module.css +153 -0
  61. package/lib/cjs/components/Separator.d.ts +4 -0
  62. package/lib/cjs/components/Separator.module.css +13 -0
  63. package/lib/cjs/components/Slider.d.ts +13 -0
  64. package/lib/cjs/components/Slider.module.css +43 -0
  65. package/lib/cjs/components/Spinner.d.ts +4 -0
  66. package/lib/cjs/components/Spinner.module.css +21 -0
  67. package/lib/cjs/components/Switch.d.ts +4 -0
  68. package/lib/cjs/components/Switch.module.css +52 -0
  69. package/lib/cjs/components/Tabs.d.ts +13 -0
  70. package/lib/cjs/components/Tabs.module.css +64 -0
  71. package/lib/cjs/components/Text.d.ts +8 -0
  72. package/lib/cjs/components/Text.module.css +24 -0
  73. package/lib/cjs/components/Textarea.d.ts +5 -0
  74. package/lib/cjs/components/Textarea.module.css +34 -0
  75. package/lib/cjs/components/Toast.d.ts +21 -0
  76. package/lib/cjs/components/Toast.module.css +133 -0
  77. package/lib/cjs/components/Toaster.d.ts +2 -0
  78. package/lib/cjs/components/Toggle.d.ts +7 -0
  79. package/lib/cjs/components/Toggle.module.css +32 -0
  80. package/lib/cjs/components/ToggleGroup.d.ts +9 -0
  81. package/lib/cjs/components/ToggleGroup.module.css +61 -0
  82. package/lib/cjs/components/Toolbar.d.ts +17 -0
  83. package/lib/cjs/components/Toolbar.module.css +113 -0
  84. package/lib/cjs/components/Tooltip.d.ts +15 -0
  85. package/lib/cjs/components/Tooltip.module.css +78 -0
  86. package/lib/cjs/components/Typography.d.ts +8 -0
  87. package/lib/cjs/components/Typography.module.css +25 -0
  88. package/lib/cjs/components/VisuallyHidden.d.ts +4 -0
  89. package/lib/cjs/components/helpers/mixins.css +15 -0
  90. package/lib/cjs/data/primitives.json +10 -0
  91. package/lib/cjs/hooks/use-toast.d.ts +44 -0
  92. package/lib/cjs/index.d.ts +45 -0
  93. package/lib/cjs/ontologies/primitives.d.ts +6 -0
  94. package/lib/cjs/package.d.ts +3 -0
  95. package/lib/cjs/package.json +85 -0
  96. package/lib/cjs/theme.css +3 -0
  97. package/lib/cjs/types.d.ts +12 -0
  98. package/lib/esm/backend.d.ts +0 -0
  99. package/lib/esm/components/Accordion.d.ts +13 -0
  100. package/lib/esm/components/Accordion.module.css +101 -0
  101. package/lib/esm/components/AlertDialog.d.ts +37 -0
  102. package/lib/esm/components/AlertDialog.module.css +80 -0
  103. package/lib/esm/components/AspectRatio.d.ts +7 -0
  104. package/lib/esm/components/AspectRatio.module.css +28 -0
  105. package/lib/esm/components/Avatar.d.ts +11 -0
  106. package/lib/esm/components/Avatar.module.css +43 -0
  107. package/lib/esm/components/Breadcrumb.d.ts +41 -0
  108. package/lib/esm/components/Breadcrumb.module.css +78 -0
  109. package/lib/esm/components/Button.d.ts +9 -0
  110. package/lib/esm/components/Button.module.css +246 -0
  111. package/lib/esm/components/Checkbox.d.ts +4 -0
  112. package/lib/esm/components/Checkbox.module.css +43 -0
  113. package/lib/esm/components/Collapsible.d.ts +11 -0
  114. package/lib/esm/components/Command.d.ts +167 -0
  115. package/lib/esm/components/Command.module.css +153 -0
  116. package/lib/esm/components/ContextMenu.d.ts +51 -0
  117. package/lib/esm/components/ContextMenu.module.css +238 -0
  118. package/lib/esm/components/Dialog.d.ts +38 -0
  119. package/lib/esm/components/Dialog.module.css +109 -0
  120. package/lib/esm/components/Drawer.d.ts +40 -0
  121. package/lib/esm/components/Drawer.module.css +87 -0
  122. package/lib/esm/components/DropdownMenu.d.ts +52 -0
  123. package/lib/esm/components/DropdownMenu.module.css +244 -0
  124. package/lib/esm/components/Form.d.ts +23 -0
  125. package/lib/esm/components/Form.module.css +75 -0
  126. package/lib/esm/components/Heading.d.ts +7 -0
  127. package/lib/esm/components/Heading.module.css +83 -0
  128. package/lib/esm/components/HoverCard.d.ts +15 -0
  129. package/lib/esm/components/HoverCard.module.css +75 -0
  130. package/lib/esm/components/IconButton.d.ts +9 -0
  131. package/lib/esm/components/IconButton.module.css +150 -0
  132. package/lib/esm/components/Input.d.ts +6 -0
  133. package/lib/esm/components/Input.module.css +61 -0
  134. package/lib/esm/components/Label.d.ts +4 -0
  135. package/lib/esm/components/Label.module.css +7 -0
  136. package/lib/esm/components/Menubar.d.ts +65 -0
  137. package/lib/esm/components/Menubar.module.css +128 -0
  138. package/lib/esm/components/MultiSelect.d.ts +86 -0
  139. package/lib/esm/components/MultiSelect.module.css +93 -0
  140. package/lib/esm/components/NavigationMenu.d.ts +21 -0
  141. package/lib/esm/components/NavigationMenu.module.css +248 -0
  142. package/lib/esm/components/Popover.d.ts +17 -0
  143. package/lib/esm/components/Popover.module.css +106 -0
  144. package/lib/esm/components/Progress.d.ts +9 -0
  145. package/lib/esm/components/Progress.module.css +23 -0
  146. package/lib/esm/components/RadioGroup.d.ts +9 -0
  147. package/lib/esm/components/RadioGroup.module.css +57 -0
  148. package/lib/esm/components/ScrollArea.d.ts +9 -0
  149. package/lib/esm/components/ScrollArea.module.css +55 -0
  150. package/lib/esm/components/Select.d.ts +28 -0
  151. package/lib/esm/components/Select.module.css +153 -0
  152. package/lib/esm/components/Separator.d.ts +4 -0
  153. package/lib/esm/components/Separator.module.css +13 -0
  154. package/lib/esm/components/Slider.d.ts +13 -0
  155. package/lib/esm/components/Slider.module.css +43 -0
  156. package/lib/esm/components/Spinner.d.ts +4 -0
  157. package/lib/esm/components/Spinner.module.css +21 -0
  158. package/lib/esm/components/Switch.d.ts +4 -0
  159. package/lib/esm/components/Switch.module.css +52 -0
  160. package/lib/esm/components/Tabs.d.ts +13 -0
  161. package/lib/esm/components/Tabs.module.css +64 -0
  162. package/lib/esm/components/Text.d.ts +8 -0
  163. package/lib/esm/components/Text.module.css +24 -0
  164. package/lib/esm/components/Textarea.d.ts +5 -0
  165. package/lib/esm/components/Textarea.module.css +34 -0
  166. package/lib/esm/components/Toast.d.ts +21 -0
  167. package/lib/esm/components/Toast.module.css +133 -0
  168. package/lib/esm/components/Toaster.d.ts +2 -0
  169. package/lib/esm/components/Toggle.d.ts +7 -0
  170. package/lib/esm/components/Toggle.module.css +32 -0
  171. package/lib/esm/components/ToggleGroup.d.ts +9 -0
  172. package/lib/esm/components/ToggleGroup.module.css +61 -0
  173. package/lib/esm/components/Toolbar.d.ts +17 -0
  174. package/lib/esm/components/Toolbar.module.css +113 -0
  175. package/lib/esm/components/Tooltip.d.ts +15 -0
  176. package/lib/esm/components/Tooltip.module.css +78 -0
  177. package/lib/esm/components/Typography.d.ts +8 -0
  178. package/lib/esm/components/Typography.module.css +25 -0
  179. package/lib/esm/components/VisuallyHidden.d.ts +4 -0
  180. package/lib/esm/components/helpers/mixins.css +15 -0
  181. package/lib/esm/data/primitives.json +10 -0
  182. package/lib/esm/hooks/use-toast.d.ts +44 -0
  183. package/lib/esm/index.d.ts +45 -0
  184. package/lib/esm/ontologies/primitives.d.ts +6 -0
  185. package/lib/esm/package.d.ts +3 -0
  186. package/lib/esm/package.json +85 -0
  187. package/lib/esm/theme.css +3 -0
  188. package/lib/esm/types.d.ts +12 -0
  189. package/package.json +103 -0
  190. package/tsconfig-cjs.json +8 -0
  191. package/tsconfig-esm.json +9 -0
@@ -0,0 +1,20 @@
1
+ # Changesets
2
+
3
+ This package uses [changesets](https://github.com/changesets/changesets) for version management and publishing.
4
+
5
+ ## Adding a changeset
6
+
7
+ When making a change that should trigger a new release, run:
8
+
9
+ ```bash
10
+ npx changeset
11
+ ```
12
+
13
+ This generates a markdown file in `.changeset/` describing the change. Commit it with your PR.
14
+
15
+ On merge to `main`, the publish workflow either:
16
+
17
+ 1. Creates (or updates) a **Release PR** that bumps the version + updates `CHANGELOG.md`, or
18
+ 2. If the Release PR is already merged, publishes the new version to npm.
19
+
20
+ Changes that don't need a release (docs, CI config, tooling) can skip the changeset — the check is a warning, not a block.
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+ "changelog": [
4
+ "@changesets/changelog-github",
5
+ { "repo": "linked-cm/primitives" }
6
+ ],
7
+ "commit": false,
8
+ "fixed": [],
9
+ "linked": [],
10
+ "access": "public",
11
+ "baseBranch": "main",
12
+ "updateInternalDependencies": "patch",
13
+ "ignore": []
14
+ }
@@ -0,0 +1,44 @@
1
+ name: Changeset Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ changeset-check:
10
+ name: Check for changeset
11
+ # Skip the check on the automated Release PR.
12
+ if: ${{ github.head_ref != 'changeset-release/main' }}
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Check for changeset files
21
+ uses: actions/github-script@v7
22
+ with:
23
+ script: |
24
+ const { data: files } = await github.rest.pulls.listFiles({
25
+ owner: context.repo.owner,
26
+ repo: context.repo.repo,
27
+ pull_number: context.issue.number,
28
+ });
29
+
30
+ const hasChangeset = files.some(f =>
31
+ f.filename.startsWith('.changeset/') &&
32
+ f.filename.endsWith('.md') &&
33
+ f.filename !== '.changeset/README.md'
34
+ );
35
+
36
+ if (!hasChangeset) {
37
+ await github.rest.issues.createComment({
38
+ owner: context.repo.owner,
39
+ repo: context.repo.repo,
40
+ issue_number: context.issue.number,
41
+ body: "No changeset found. If this PR should trigger a release, run `npx changeset` and commit the generated file.\n\nIf this change doesn't need a release (docs, CI config, etc.), you can ignore this message."
42
+ });
43
+ core.warning('No changeset file found in this PR.');
44
+ }
@@ -0,0 +1,30 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ build-and-test:
10
+ name: Build & Test
11
+ # Skip CI on the automated Release PR created by changesets/action.
12
+ if: ${{ !(github.event.pull_request.base.ref == 'main' && github.head_ref == 'changeset-release/main') }}
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Checkout
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: 22.16.0
22
+
23
+ - name: Install dependencies
24
+ run: npm ci --legacy-peer-deps
25
+
26
+ - name: Build
27
+ run: npm run build
28
+
29
+ - name: Test
30
+ run: npm test --if-present
@@ -0,0 +1,42 @@
1
+ name: Publish
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ concurrency: ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ jobs:
11
+ release:
12
+ name: Publish Release
13
+ runs-on: ubuntu-latest
14
+ permissions:
15
+ contents: write
16
+ pull-requests: write
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 22.16.0
25
+ registry-url: 'https://registry.npmjs.org'
26
+
27
+ - name: Install dependencies
28
+ run: npm ci --legacy-peer-deps
29
+
30
+ - name: Build
31
+ run: npm run build
32
+
33
+ - name: Create release Pull Request or Publish
34
+ uses: changesets/action@v1
35
+ with:
36
+ publish: npx changeset publish
37
+ title: 'chore: release'
38
+ commit: 'chore: release'
39
+ env:
40
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
42
+ NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @\_linked/primitives
2
+
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`479b093`](https://github.com/linked-cm/primitives/commit/479b093a35399f2d8628b7d1bd5e38b1e2e006d6) - Initial release under the new publishing setup.
File without changes
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+ declare const Root: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export declare const Accordion: {
8
+ Root: React.ForwardRefExoticComponent<(Omit<AccordionPrimitive.AccordionSingleProps & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<AccordionPrimitive.AccordionMultipleProps & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
9
+ Item: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ Trigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ Content: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ };
13
+ export { Root, Item, Trigger, Content };
@@ -0,0 +1,101 @@
1
+ .Root {
2
+ border-radius: var(--accordion-radius, var(--box-radius));
3
+ width: 100%;
4
+ background-color: var(--accordion-bg, var(--box-bg));
5
+ box-shadow: var(--accordion-shadow, var(--box-shadow));
6
+ }
7
+
8
+ .Item {
9
+ overflow: hidden;
10
+ margin-top: 1px;
11
+
12
+ &:first-child {
13
+ margin-top: 0;
14
+ border-top-left-radius: var(--accordion-radius, var(--box-radius));
15
+ border-top-right-radius: var(--accordion-radius, var(--box-radius));
16
+ }
17
+
18
+ &:last-child {
19
+ border-bottom-left-radius: var(--accordion-radius, var(--box-radius));
20
+ border-bottom-right-radius: var(--accordion-radius, var(--box-radius));
21
+ }
22
+
23
+ &:focus-within {
24
+ position: relative;
25
+ z-index: 1;
26
+ /* box-shadow: var(--accordion-shadow);*/
27
+ }
28
+ }
29
+
30
+ .Header {
31
+ display: flex;
32
+ }
33
+
34
+ .Trigger {
35
+ font-family: inherit;
36
+ background-color: transparent;
37
+ padding: 0 var(--accordion-padding, var(--box-padding));
38
+ height: var(--accordion-trigger-height, 2.75rem);
39
+ flex: 1;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: space-between;
43
+ font-size: var(--accordion-trigger-font-size, var(--typography-small-size));
44
+ line-height: 1;
45
+ color: var(--box-text);
46
+ /* box-shadow: var(--accordion-shadow);*/
47
+ background-color: var(--accordion-bg, var(--box-bg));
48
+ transition: var(--transition-normal);
49
+
50
+ &:hover {
51
+ background-color: var(--accordion-bg-active, var(--bg-hover));
52
+ }
53
+
54
+ &[data-state='open'] > .Icon {
55
+ transform: rotate(180deg);
56
+ }
57
+ }
58
+
59
+ .Icon {
60
+ transition: transform var(--transition-duration-normal)
61
+ var(--transition-easing);
62
+ }
63
+
64
+ .Content {
65
+ overflow: hidden;
66
+ font-size: var(--typography-font-size);
67
+ color: var(--typography-color);
68
+ background-color: var(--accordion-content-bg, var(--box-bg));
69
+
70
+ &[data-state='open'] {
71
+ animation: slideDown var(--transition-duration-normal)
72
+ var(--transition-easing);
73
+ }
74
+
75
+ &[data-state='closed'] {
76
+ animation: slideUp var(--transition-duration-normal)
77
+ var(--transition-easing);
78
+ }
79
+ }
80
+
81
+ .ContentText {
82
+ padding: var(--accordion-content-padding, var(--box-padding));
83
+ }
84
+
85
+ @keyframes slideDown {
86
+ from {
87
+ height: 0;
88
+ }
89
+ to {
90
+ height: var(--radix-accordion-content-height);
91
+ }
92
+ }
93
+
94
+ @keyframes slideUp {
95
+ from {
96
+ height: var(--radix-accordion-content-height);
97
+ }
98
+ to {
99
+ height: 0;
100
+ }
101
+ }
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ declare const Root: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const Trigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const Overlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const Title: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
8
+ declare const Action: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const Cancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const Content: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const Header: {
12
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const Footer: {
16
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export declare const AlertDialog: {
20
+ Root: React.FC<AlertDialogPrimitive.AlertDialogProps>;
21
+ Trigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
22
+ Overlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ Content: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
+ Header: {
25
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
26
+ displayName: string;
27
+ };
28
+ Footer: {
29
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
30
+ displayName: string;
31
+ };
32
+ Title: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
33
+ Description: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
34
+ Action: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
35
+ Cancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
36
+ };
37
+ export { Root, Trigger, Overlay, Content, Header, Footer, Title, Description, Action, Cancel, };
@@ -0,0 +1,80 @@
1
+ .Overlay {
2
+ background-color: var(--alertdialog-overlay-bg, var(--modal-overlay-bg));
3
+ position: fixed;
4
+ inset: 0;
5
+ animation: overlayShow
6
+ var(--alertdialog-animation-duration, var(--transition-duration-normal))
7
+ var(--transition-easing);
8
+ }
9
+
10
+ .Content {
11
+ background-color: var(--alertdialog-bg, var(--modal-bg));
12
+ color: var(--alertdialog-text, var(--modal-text));
13
+ border: 1px solid var(--alertdialog-border, var(--modal-border));
14
+ border-radius: var(--alertdialog-radius, var(--modal-radius));
15
+ box-shadow: var(--alertdialog-shadow, var(--modal-shadow));
16
+ position: fixed;
17
+ top: 50%;
18
+ left: 50%;
19
+ transform: var(--alertdialog-transform, translate(-50%, -50%));
20
+ width: min(90vw, var(--alertdialog-max-width, 32rem));
21
+ max-height: 85vh;
22
+ padding: var(--alertdialog-padding, var(--modal-padding));
23
+ outline: none;
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: var(--alertdialog-gap, var(--modal-gap));
27
+ animation: var(--alertdialog-animation-name, contentShow)
28
+ var(--alertdialog-animation-duration, var(--transition-duration-normal))
29
+ var(--transition-easing);
30
+ }
31
+
32
+ .Title {
33
+ margin: 0;
34
+ color: var(--heading-5-color);
35
+ font-size: var(--heading-5-font-size);
36
+ font-weight: var(--heading-5-font-weight);
37
+ font-family: var(--heading-5-font-family);
38
+ letter-spacing: var(--heading-5-letter-spacing);
39
+ line-height: var(--heading-5-line-height);
40
+ }
41
+
42
+ .Description {
43
+ margin: 0;
44
+ color: var(--typography-color);
45
+ font-family: var(--typography-font-family);
46
+ font-size: var(--typography-font-size);
47
+ line-height: var(--typography-line-height);
48
+ }
49
+
50
+ .Header {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: var(--alertdialog-gap, var(--modal-gap));
54
+ }
55
+
56
+ .Footer {
57
+ display: flex;
58
+ gap: var(--alertdialog-gap, var(--modal-gap));
59
+ justify-content: flex-end;
60
+ }
61
+
62
+ @keyframes overlayShow {
63
+ from {
64
+ opacity: 0;
65
+ }
66
+ to {
67
+ opacity: 1;
68
+ }
69
+ }
70
+
71
+ @keyframes contentShow {
72
+ from {
73
+ opacity: 0;
74
+ transform: translate(-50%, -48%) scale(0.96);
75
+ }
76
+ to {
77
+ opacity: 1;
78
+ transform: translate(-50%, -50%) scale(1);
79
+ }
80
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
3
+ declare const Root: React.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const AspectRatio: {
5
+ Root: React.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
6
+ };
7
+ export { Root };
@@ -0,0 +1,28 @@
1
+ .Root {
2
+ overflow: hidden;
3
+ width: 100%;
4
+ border-radius: var(--aspectratio-radius, var(--media-radius));
5
+ background-color: var(--aspectratio-bg, var(--media-bg));
6
+ box-shadow: var(--aspectratio-shadow, var(--media-shadow));
7
+ }
8
+
9
+ .Image {
10
+ width: 100%;
11
+ height: 100%;
12
+ object-fit: cover;
13
+ border-radius: inherit;
14
+ }
15
+
16
+ .Fallback {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ width: 100%;
21
+ height: 100%;
22
+ background-color: var(--aspectratio-bg, var(--media-bg));
23
+ color: var(--aspectratio-fallback-color, var(--typography-auxiliary-color));
24
+ font-family: var(--aspectratio-font-family, var(--typography-font-family));
25
+ font-size: var(--aspectratio-font-size, var(--typography-font-size));
26
+ font-weight: var(--aspectratio-font-weight, var(--typography-font-weight));
27
+ line-height: var(--aspectratio-line-height, var(--typography-line-height));
28
+ }
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+ declare const Root: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const Image: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const Fallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export declare const Avatar: {
7
+ Root: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
+ Image: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
9
+ Fallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
10
+ };
11
+ export { Root, Image, Fallback };
@@ -0,0 +1,43 @@
1
+ .Root {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ vertical-align: middle;
6
+ overflow: hidden;
7
+ user-select: none;
8
+ width: var(--avatar-size, var(--avatar-size-md));
9
+ height: var(--avatar-size, var(--avatar-size-md));
10
+ border-radius: var(--avatar-radius, var(--media-radius));
11
+ background-color: var(--avatar-bg, var(--media-bg));
12
+ color: var(--avatar-color, var(--typography-auxiliary-color));
13
+ box-shadow: var(--avatar-shadow, var(--media-shadow));
14
+ }
15
+
16
+ .Root[data-size='sm'] {
17
+ --avatar-size: var(--avatar-size-sm);
18
+ }
19
+
20
+ .Root[data-size='lg'] {
21
+ --avatar-size: var(--avatar-size-lg);
22
+ }
23
+
24
+ .Image {
25
+ width: 100%;
26
+ height: 100%;
27
+ object-fit: cover;
28
+ border-radius: inherit;
29
+ }
30
+
31
+ .Fallback {
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ width: 100%;
36
+ height: 100%;
37
+ background-color: var(--avatar-bg, var(--media-bg));
38
+ color: var(--avatar-color, var(--typography-auxiliary-color));
39
+ font-family: var(--avatar-font-family, var(--typography-font-family));
40
+ font-size: var(--avatar-font-size, var(--typography-font-size));
41
+ font-weight: var(--avatar-font-weight, var(--typography-font-weight));
42
+ line-height: var(--avatar-line-height, var(--typography-line-height));
43
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * copy from `https://ui.shadcn.com/docs/components/breadcrumb`
3
+ */
4
+ import * as React from 'react';
5
+ declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
6
+ separator?: React.ReactNode;
7
+ } & React.RefAttributes<HTMLElement>>;
8
+ declare const List: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
9
+ declare const Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
10
+ declare const Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
11
+ asChild?: boolean;
12
+ } & React.RefAttributes<HTMLAnchorElement>>;
13
+ declare const Page: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
14
+ declare const Separator: {
15
+ ({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
16
+ displayName: string;
17
+ };
18
+ declare const Ellipsis: {
19
+ ({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ export declare const Breadcrumb: {
23
+ Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
24
+ separator?: React.ReactNode;
25
+ } & React.RefAttributes<HTMLElement>>;
26
+ List: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
27
+ Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
28
+ Link: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
29
+ asChild?: boolean;
30
+ } & React.RefAttributes<HTMLAnchorElement>>;
31
+ Page: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
32
+ Separator: {
33
+ ({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
34
+ displayName: string;
35
+ };
36
+ Ellipsis: {
37
+ ({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
38
+ displayName: string;
39
+ };
40
+ };
41
+ export { Root, List, Item, Link, Page, Separator, Ellipsis };
@@ -0,0 +1,78 @@
1
+ .Root {
2
+ color: var(--breadcrumb-text, var(--navigation-text));
3
+ }
4
+
5
+ .List {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ align-items: center;
9
+ gap: var(--breadcrumb-gap, var(--navigation-gap));
10
+ overflow-wrap: anywhere;
11
+ font-family: var(--typography-font-family);
12
+ font-size: var(--breadcrumb-font-size, var(--typography-font-size));
13
+ color: inherit;
14
+ }
15
+
16
+ @media (min-width: 640px) {
17
+ .List {
18
+ gap: calc(var(--breadcrumb-gap, var(--navigation-gap)) / 2);
19
+ }
20
+ }
21
+
22
+ .Item {
23
+ display: inline-flex;
24
+ align-items: center;
25
+ gap: var(--breadcrumb-item-gap, var(--breadcrumb-gap, var(--navigation-gap)));
26
+ }
27
+
28
+ .Link {
29
+ color: inherit;
30
+ transition: var(--breadcrumb-transition, var(--transition-normal));
31
+ text-decoration: none;
32
+
33
+ &:hover,
34
+ &:focus-visible {
35
+ color: var(--breadcrumb-text-hover, var(--link-color));
36
+ }
37
+ }
38
+
39
+ .Page {
40
+ font-weight: var(--typography-font-weight);
41
+ color: var(--breadcrumb-text-active, var(--navigation-text-active));
42
+ }
43
+
44
+ .Separator {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ line-height: 0;
48
+ color: var(--breadcrumb-separator, var(--navigation-border));
49
+
50
+ svg {
51
+ width: var(--breadcrumb-icon-size, var(--icon-size-sm));
52
+ height: var(--breadcrumb-icon-size, var(--icon-size-sm));
53
+ }
54
+ }
55
+
56
+ .Ellipsis {
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ width: var(--breadcrumb-ellipsis-size, var(--icon-size-md));
61
+ height: var(--breadcrumb-ellipsis-size, var(--icon-size-md));
62
+
63
+ .moreHorizontal {
64
+ width: var(--breadcrumb-icon-size, var(--icon-size-sm));
65
+ height: var(--breadcrumb-icon-size, var(--icon-size-sm));
66
+ }
67
+
68
+ .srOnly {
69
+ position: absolute;
70
+ width: 1px;
71
+ height: 1px;
72
+ padding: 0;
73
+ margin: -1px;
74
+ overflow: hidden;
75
+ clip: rect(0, 0, 0, 0);
76
+ border: 0;
77
+ }
78
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ asChild?: boolean;
4
+ variant?: 'solid' | 'outline' | 'ghost' | 'link';
5
+ color?: 'primary' | 'secondary' | 'tertiary';
6
+ size?: 'small' | 'medium' | 'large' | 'default';
7
+ }
8
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
9
+ export { Button };