@ayasofyazilim/ui 0.0.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/__mocks__/canvas.ts +8 -0
- package/components.json +21 -0
- package/eslint.config.js +4 -0
- package/jest-environment.js +37 -0
- package/jest.config.ts +47 -0
- package/jest.setup.ts +69 -0
- package/package.json +124 -0
- package/postcss.config.mjs +6 -0
- package/src/aria/index.tsx +1 -0
- package/src/aria/number-field.tsx +41 -0
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion.tsx +66 -0
- package/src/components/alert-dialog.tsx +157 -0
- package/src/components/alert.tsx +70 -0
- package/src/components/aspect-ratio.tsx +11 -0
- package/src/components/avatar.tsx +53 -0
- package/src/components/badge.tsx +67 -0
- package/src/components/breadcrumb.tsx +109 -0
- package/src/components/button-group.tsx +83 -0
- package/src/components/button.tsx +68 -0
- package/src/components/calendar.tsx +219 -0
- package/src/components/card.tsx +92 -0
- package/src/components/carousel.tsx +241 -0
- package/src/components/chart.tsx +363 -0
- package/src/components/checkbox.tsx +32 -0
- package/src/components/collapsible.tsx +33 -0
- package/src/components/command.tsx +184 -0
- package/src/components/context-menu.tsx +252 -0
- package/src/components/dialog.tsx +144 -0
- package/src/components/drawer.tsx +135 -0
- package/src/components/dropdown-menu.tsx +258 -0
- package/src/components/empty.tsx +100 -0
- package/src/components/field.tsx +248 -0
- package/src/components/form.tsx +169 -0
- package/src/components/hover-card.tsx +44 -0
- package/src/components/input-group.tsx +170 -0
- package/src/components/input-otp.tsx +77 -0
- package/src/components/input.tsx +21 -0
- package/src/components/item.tsx +193 -0
- package/src/components/kbd.tsx +28 -0
- package/src/components/label.tsx +24 -0
- package/src/components/menubar.tsx +276 -0
- package/src/components/navigation-menu.tsx +168 -0
- package/src/components/pagination.tsx +130 -0
- package/src/components/popover.tsx +88 -0
- package/src/components/progress.tsx +31 -0
- package/src/components/radio-group.tsx +45 -0
- package/src/components/resizable.tsx +56 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.tsx +189 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +140 -0
- package/src/components/sidebar.tsx +862 -0
- package/src/components/skeleton.tsx +13 -0
- package/src/components/slider.tsx +63 -0
- package/src/components/sonner.tsx +40 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/stepper.tsx +291 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/table.tsx +133 -0
- package/src/components/tabs.tsx +66 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/toggle-group.tsx +83 -0
- package/src/components/toggle.tsx +47 -0
- package/src/components/tooltip.tsx +66 -0
- package/src/custom/action-button.tsx +48 -0
- package/src/custom/async-select.tsx +287 -0
- package/src/custom/awesome-not-found.tsx +116 -0
- package/src/custom/charts/area-chart.tsx +147 -0
- package/src/custom/charts/bar-chart.tsx +233 -0
- package/src/custom/charts/chart-card.tsx +103 -0
- package/src/custom/charts/index.tsx +16 -0
- package/src/custom/charts/pie-chart.tsx +168 -0
- package/src/custom/charts/radar-chart.tsx +126 -0
- package/src/custom/checkbox-tree.tsx +100 -0
- package/src/custom/combobox.tsx +296 -0
- package/src/custom/confirm-dialog.tsx +102 -0
- package/src/custom/country-selector.tsx +204 -0
- package/src/custom/date-picker/calendar-rac.tsx +109 -0
- package/src/custom/date-picker/datefield-rac.tsx +84 -0
- package/src/custom/date-picker/index.tsx +273 -0
- package/src/custom/date-picker/types/index.ts +4 -0
- package/src/custom/date-picker/utils/index.ts +42 -0
- package/src/custom/date-picker-old.tsx +50 -0
- package/src/custom/date-tooltip.tsx +98 -0
- package/src/custom/document-scanner/consts.ts +5 -0
- package/src/custom/document-scanner/corner-adjustment/action-buttons.tsx +33 -0
- package/src/custom/document-scanner/corner-adjustment/corner-handle.tsx +43 -0
- package/src/custom/document-scanner/corner-adjustment/hooks/use-corner-drag.ts +85 -0
- package/src/custom/document-scanner/corner-adjustment/index.tsx +125 -0
- package/src/custom/document-scanner/corner-adjustment/types.ts +53 -0
- package/src/custom/document-scanner/corner-adjustment/utils/clip-path.ts +22 -0
- package/src/custom/document-scanner/corner-adjustment/zoom-magnifier.tsx +115 -0
- package/src/custom/document-scanner/hooks/use-document-capture.ts +81 -0
- package/src/custom/document-scanner/hooks/use-document-scanner.ts +80 -0
- package/src/custom/document-scanner/hooks/use-perspective-crop.ts +38 -0
- package/src/custom/document-scanner/index.tsx +255 -0
- package/src/custom/document-scanner/lib.ts +407 -0
- package/src/custom/document-scanner/types.ts +205 -0
- package/src/custom/document-scanner/utils/perspective-correction.ts +139 -0
- package/src/custom/document-viewer/controllers.tsx +98 -0
- package/src/custom/document-viewer/index.tsx +43 -0
- package/src/custom/document-viewer/renderers/image.tsx +37 -0
- package/src/custom/document-viewer/renderers/index.tsx +2 -0
- package/src/custom/document-viewer/renderers/pdf.tsx +105 -0
- package/src/custom/email-input/domains.json +159 -0
- package/src/custom/email-input/email.tsx +229 -0
- package/src/custom/email-input/index.tsx +4 -0
- package/src/custom/email-input/types.ts +104 -0
- package/src/custom/file-uploader.tsx +541 -0
- package/src/custom/filter-component/fields/async-select.tsx +33 -0
- package/src/custom/filter-component/fields/date.tsx +60 -0
- package/src/custom/filter-component/fields/multi-select.tsx +30 -0
- package/src/custom/filter-component/index.tsx +217 -0
- package/src/custom/image-canvas.tsx +260 -0
- package/src/custom/json-editor.tsx +22 -0
- package/src/custom/master-data-grid/components/dialogs/column-settings-dialog.tsx +100 -0
- package/src/custom/master-data-grid/components/dialogs/index.ts +1 -0
- package/src/custom/master-data-grid/components/filters/client-filter.tsx +368 -0
- package/src/custom/master-data-grid/components/filters/filter-input.tsx +256 -0
- package/src/custom/master-data-grid/components/filters/index.ts +3 -0
- package/src/custom/master-data-grid/components/filters/inline-column-filter.tsx +233 -0
- package/src/custom/master-data-grid/components/filters/multi-filter-dialog.tsx +90 -0
- package/src/custom/master-data-grid/components/filters/server-filter.tsx +255 -0
- package/src/custom/master-data-grid/components/master-data-grid.tsx +472 -0
- package/src/custom/master-data-grid/components/pagination/index.ts +1 -0
- package/src/custom/master-data-grid/components/pagination/pagination.tsx +178 -0
- package/src/custom/master-data-grid/components/table/cell-renderer.tsx +634 -0
- package/src/custom/master-data-grid/components/table/header-cell.tsx +162 -0
- package/src/custom/master-data-grid/components/table/index.ts +4 -0
- package/src/custom/master-data-grid/components/table/table-body-renderer.tsx +113 -0
- package/src/custom/master-data-grid/components/table/virtual-body.tsx +138 -0
- package/src/custom/master-data-grid/components/toolbar/index.ts +1 -0
- package/src/custom/master-data-grid/components/toolbar/toolbar.tsx +314 -0
- package/src/custom/master-data-grid/hooks/index.ts +3 -0
- package/src/custom/master-data-grid/hooks/use-columns.tsx +332 -0
- package/src/custom/master-data-grid/hooks/use-editing.ts +106 -0
- package/src/custom/master-data-grid/hooks/use-table-state-reducer.ts +157 -0
- package/src/custom/master-data-grid/hooks/use-table-state.ts +31 -0
- package/src/custom/master-data-grid/index.ts +16 -0
- package/src/custom/master-data-grid/types.ts +466 -0
- package/src/custom/master-data-grid/utils/column-generator.tsx +306 -0
- package/src/custom/master-data-grid/utils/export-utils.ts +67 -0
- package/src/custom/master-data-grid/utils/filter-fns.ts +290 -0
- package/src/custom/master-data-grid/utils/index.ts +8 -0
- package/src/custom/master-data-grid/utils/pinning-utils.ts +88 -0
- package/src/custom/master-data-grid/utils/translation-utils.ts +42 -0
- package/src/custom/multi-select.tsx +432 -0
- package/src/custom/password-input.tsx +194 -0
- package/src/custom/phone-input.tsx +172 -0
- package/src/custom/schema-form/custom/index.tsx +1 -0
- package/src/custom/schema-form/custom/label.tsx +53 -0
- package/src/custom/schema-form/fields/base-input-field.tsx +82 -0
- package/src/custom/schema-form/fields/field.tsx +67 -0
- package/src/custom/schema-form/fields/index.tsx +5 -0
- package/src/custom/schema-form/fields/object.tsx +12 -0
- package/src/custom/schema-form/fields/table-array/array-field-item.tsx +90 -0
- package/src/custom/schema-form/fields/table-array/array-field-template.tsx +115 -0
- package/src/custom/schema-form/index.tsx +259 -0
- package/src/custom/schema-form/templates/description.tsx +20 -0
- package/src/custom/schema-form/templates/index.tsx +2 -0
- package/src/custom/schema-form/templates/submit.tsx +32 -0
- package/src/custom/schema-form/types.ts +64 -0
- package/src/custom/schema-form/utils/index.ts +4 -0
- package/src/custom/schema-form/utils/schema-dependency.ts +655 -0
- package/src/custom/schema-form/utils/schemas.ts +289 -0
- package/src/custom/schema-form/utils/validation.ts +23 -0
- package/src/custom/schema-form/widgets/boolean.tsx +77 -0
- package/src/custom/schema-form/widgets/combobox.tsx +274 -0
- package/src/custom/schema-form/widgets/date.tsx +59 -0
- package/src/custom/schema-form/widgets/email.tsx +34 -0
- package/src/custom/schema-form/widgets/index.tsx +10 -0
- package/src/custom/schema-form/widgets/password.tsx +40 -0
- package/src/custom/schema-form/widgets/phone.tsx +40 -0
- package/src/custom/schema-form/widgets/select.tsx +105 -0
- package/src/custom/schema-form/widgets/selectable.tsx +25 -0
- package/src/custom/schema-form/widgets/string-array.tsx +296 -0
- package/src/custom/schema-form/widgets/url.tsx +56 -0
- package/src/custom/section-layout-v2.tsx +212 -0
- package/src/custom/select-tabs.tsx +109 -0
- package/src/custom/selectable.tsx +316 -0
- package/src/custom/stepper.tsx +236 -0
- package/src/custom/tab-layout.tsx +213 -0
- package/src/custom/tanstack-table/fields/index.tsx +12 -0
- package/src/custom/tanstack-table/fields/tanstack-table-action-dialogs.tsx +89 -0
- package/src/custom/tanstack-table/fields/tanstack-table-column-header.tsx +66 -0
- package/src/custom/tanstack-table/fields/tanstack-table-filter-date.tsx +180 -0
- package/src/custom/tanstack-table/fields/tanstack-table-filter-faceted.tsx +158 -0
- package/src/custom/tanstack-table/fields/tanstack-table-filter-text.tsx +76 -0
- package/src/custom/tanstack-table/fields/tanstack-table-pagination.tsx +136 -0
- package/src/custom/tanstack-table/fields/tanstack-table-plain-table.tsx +142 -0
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-confirmation.tsx +77 -0
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-custom-dialog.tsx +87 -0
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions.tsx +151 -0
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-custom-dialog.tsx +88 -0
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-schemaform-dialog.tsx +47 -0
- package/src/custom/tanstack-table/fields/tanstack-table-toolbar.tsx +143 -0
- package/src/custom/tanstack-table/fields/tanstack-table-view-options.tsx +171 -0
- package/src/custom/tanstack-table/index.tsx +244 -0
- package/src/custom/tanstack-table/types/index.ts +328 -0
- package/src/custom/tanstack-table/utils/cell-with-actions.tsx +21 -0
- package/src/custom/tanstack-table/utils/column-names.ts +26 -0
- package/src/custom/tanstack-table/utils/columns-by-row-data.tsx +312 -0
- package/src/custom/tanstack-table/utils/editable-columns-by-row-data.tsx +219 -0
- package/src/custom/tanstack-table/utils/faceted-boolean-options.tsx +22 -0
- package/src/custom/tanstack-table/utils/index.tsx +10 -0
- package/src/custom/tanstack-table/utils/pinning-styles.ts +57 -0
- package/src/custom/tanstack-table/utils/table.tsx +83 -0
- package/src/custom/tanstack-table/utils/test-conditions.ts +17 -0
- package/src/custom/timeline.tsx +208 -0
- package/src/custom/tree.tsx +200 -0
- package/src/custom/tscanify/browser.ts +66 -0
- package/src/custom/tscanify/index.ts +51 -0
- package/src/custom/tscanify/tscanify-browser.ts +522 -0
- package/src/custom/tscanify/tscanify.ts +262 -0
- package/src/custom/tscanify/types.ts +22 -0
- package/src/custom/webcam.tsx +737 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/use-callback-ref.ts +27 -0
- package/src/hooks/use-controllable-state.ts +67 -0
- package/src/hooks/use-debounce.ts +19 -0
- package/src/hooks/use-is-visible.ts +23 -0
- package/src/hooks/use-media-query.ts +21 -0
- package/src/hooks/use-mobile.ts +21 -0
- package/src/hooks/use-on-window-resize.ts +15 -0
- package/src/hooks/use-scroll.tsx +22 -0
- package/src/lib/utils.ts +61 -0
- package/src/lib/zod.ts +2 -0
- package/src/styles/core.css +57 -0
- package/src/styles/globals.css +130 -0
- package/src/test/email-input.test.tsx +217 -0
- package/src/test/password-input.test.tsx +92 -0
- package/src/test/select-tabs.test.tsx +302 -0
- package/src/test/selectable.test.tsx +1093 -0
- package/tsconfig.json +13 -0
- package/tsconfig.lint.json +8 -0
package/components.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/styles/globals.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true
|
|
11
|
+
},
|
|
12
|
+
"iconLibrary": "lucide",
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@repo/ayasofyazilim-ui/components",
|
|
15
|
+
"custom": "@repo/ayasofyazilim-ui/custom",
|
|
16
|
+
"utils": "@repo/ayasofyazilim-ui/lib/utils",
|
|
17
|
+
"hooks": "@repo/ayasofyazilim-ui/hooks",
|
|
18
|
+
"lib": "@repo/ayasofyazilim-ui/lib",
|
|
19
|
+
"ui": "@repo/ayasofyazilim-ui/components"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const JSDOMEnvironment = require("jest-environment-jsdom").default;
|
|
2
|
+
|
|
3
|
+
// Mock canvas before jsdom loads it
|
|
4
|
+
const mockCanvas = () => ({});
|
|
5
|
+
Object.defineProperty(mockCanvas, "createCanvas", {
|
|
6
|
+
value: () => ({}),
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(mockCanvas, "loadImage", {
|
|
9
|
+
value: () => Promise.resolve({}),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
module.exports = class CustomJSDOMEnvironment extends JSDOMEnvironment {
|
|
13
|
+
constructor(config, context) {
|
|
14
|
+
// Mock canvas module globally before parent constructor
|
|
15
|
+
if (typeof global !== "undefined") {
|
|
16
|
+
const Module = require("module");
|
|
17
|
+
const originalRequire = Module.prototype.require;
|
|
18
|
+
|
|
19
|
+
Module.prototype.require = function (id) {
|
|
20
|
+
if (id === "canvas") {
|
|
21
|
+
return mockCanvas;
|
|
22
|
+
}
|
|
23
|
+
return originalRequire.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
super(config, context);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async setup() {
|
|
31
|
+
await super.setup();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async teardown() {
|
|
35
|
+
await super.teardown();
|
|
36
|
+
}
|
|
37
|
+
};
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Config } from "jest";
|
|
2
|
+
|
|
3
|
+
const config: Config = {
|
|
4
|
+
preset: "ts-jest",
|
|
5
|
+
testEnvironment: "<rootDir>/jest-environment.js",
|
|
6
|
+
roots: ["<rootDir>/src"],
|
|
7
|
+
testMatch: ["**/__tests__/**/*.{ts,tsx}", "**/*.{spec,test}.{ts,tsx}"],
|
|
8
|
+
moduleNameMapper: {
|
|
9
|
+
"^@/(.*)$": "<rootDir>/src/$1",
|
|
10
|
+
"^@repo/ayasofyazilim-ui/(.*)$": "<rootDir>/src/$1",
|
|
11
|
+
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
|
|
12
|
+
},
|
|
13
|
+
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
|
|
14
|
+
transform: {
|
|
15
|
+
"^.+\\.tsx?$": [
|
|
16
|
+
"ts-jest",
|
|
17
|
+
{
|
|
18
|
+
tsconfig: {
|
|
19
|
+
jsx: "react-jsx",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
"^.+\\.(js|jsx)$": [
|
|
24
|
+
"ts-jest",
|
|
25
|
+
{
|
|
26
|
+
tsconfig: {
|
|
27
|
+
allowJs: true,
|
|
28
|
+
jsx: "react-jsx",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
collectCoverageFrom: [
|
|
34
|
+
"src/**/*.{ts,tsx}",
|
|
35
|
+
"!src/**/*.d.ts",
|
|
36
|
+
"!src/**/*.stories.{ts,tsx}",
|
|
37
|
+
"!src/**/index.{ts,tsx}",
|
|
38
|
+
],
|
|
39
|
+
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
40
|
+
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
|
|
41
|
+
coveragePathIgnorePatterns: ["/node_modules/", "/dist/"],
|
|
42
|
+
transformIgnorePatterns: [
|
|
43
|
+
"node_modules/(?!(react-phone-number-input|lucide-react)/)",
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default config;
|
package/jest.setup.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
// Mock canvas to avoid native dependency issues
|
|
5
|
+
jest.mock("canvas", () => ({}), { virtual: true });
|
|
6
|
+
|
|
7
|
+
// Minimal lucide-react mock - returns actual SVG elements
|
|
8
|
+
jest.mock("lucide-react", () => {
|
|
9
|
+
return new Proxy(
|
|
10
|
+
{},
|
|
11
|
+
{
|
|
12
|
+
get: (target, prop) => {
|
|
13
|
+
// Return a component that renders an SVG
|
|
14
|
+
return React.forwardRef((props: any, ref: any) =>
|
|
15
|
+
React.createElement(
|
|
16
|
+
"svg",
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
...props,
|
|
20
|
+
"data-lucide": prop,
|
|
21
|
+
"data-testid": `lucide-${String(prop)
|
|
22
|
+
.replace(/([A-Z])/g, "-$1")
|
|
23
|
+
.toLowerCase()
|
|
24
|
+
.slice(1)}`,
|
|
25
|
+
},
|
|
26
|
+
React.createElement("path", { d: "M0 0" })
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Mock localStorage
|
|
35
|
+
const localStorageMock = {
|
|
36
|
+
getItem: jest.fn(),
|
|
37
|
+
setItem: jest.fn(),
|
|
38
|
+
removeItem: jest.fn(),
|
|
39
|
+
clear: jest.fn(),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
global.localStorage = localStorageMock as any;
|
|
43
|
+
|
|
44
|
+
// Mock ResizeObserver
|
|
45
|
+
global.ResizeObserver = class ResizeObserver {
|
|
46
|
+
observe() {}
|
|
47
|
+
unobserve() {}
|
|
48
|
+
disconnect() {}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// Mock IntersectionObserver
|
|
52
|
+
global.IntersectionObserver = class IntersectionObserver {
|
|
53
|
+
constructor() {}
|
|
54
|
+
observe() {}
|
|
55
|
+
unobserve() {}
|
|
56
|
+
disconnect() {}
|
|
57
|
+
takeRecords() {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
} as any;
|
|
61
|
+
|
|
62
|
+
// Mock scrollIntoView
|
|
63
|
+
Element.prototype.scrollIntoView = jest.fn();
|
|
64
|
+
|
|
65
|
+
// Reset mocks before each test
|
|
66
|
+
beforeEach(() => {
|
|
67
|
+
jest.clearAllMocks();
|
|
68
|
+
localStorageMock.getItem.mockReturnValue("TR");
|
|
69
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ayasofyazilim/ui",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"lint": "eslint .",
|
|
7
|
+
"type-check": "tsc --noEmit",
|
|
8
|
+
"test": "jest --no-cache",
|
|
9
|
+
"test:watch": "jest --watch",
|
|
10
|
+
"test:coverage": "jest --coverage"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@headless-tree/core": "^1.5.1",
|
|
14
|
+
"@headless-tree/react": "^1.5.1",
|
|
15
|
+
"@hookform/resolvers": "5.2.2",
|
|
16
|
+
"@internationalized/date": "^3.10.0",
|
|
17
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
18
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
19
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
20
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
21
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
22
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
23
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
24
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
25
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
26
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
27
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
28
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
29
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
30
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
31
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
32
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
33
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
34
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
35
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
36
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
37
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
38
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
39
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
40
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
41
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
42
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
43
|
+
"@rjsf/core": "6.1.1",
|
|
44
|
+
"@rjsf/shadcn": "6.1.1",
|
|
45
|
+
"@rjsf/utils": "6.1.1",
|
|
46
|
+
"@rjsf/validator-ajv8": "6.1.1",
|
|
47
|
+
"@tanstack/react-table": "^8.21.3",
|
|
48
|
+
"@tanstack/react-virtual": "^3.13.18",
|
|
49
|
+
"@types/google-libphonenumber": "^7.4.30",
|
|
50
|
+
"@types/lodash": "^4.17.20",
|
|
51
|
+
"ajv": "^8.17.1",
|
|
52
|
+
"canvas": "3.1.2",
|
|
53
|
+
"class-variance-authority": "^0.7.1",
|
|
54
|
+
"clsx": "^2.1.1",
|
|
55
|
+
"cmdk": "^1.1.1",
|
|
56
|
+
"date-fns": "^4.1.0",
|
|
57
|
+
"embla-carousel-react": "^8.6.0",
|
|
58
|
+
"emblor": "^1.4.8",
|
|
59
|
+
"eslint": "^9.32.0",
|
|
60
|
+
"google-libphonenumber": "^3.2.43",
|
|
61
|
+
"input-otp": "^1.4.2",
|
|
62
|
+
"jsdom": "26.1.0",
|
|
63
|
+
"json-edit-react": "^1.29.0",
|
|
64
|
+
"lodash": "^4.17.21",
|
|
65
|
+
"lucide-react": "^0.562.0",
|
|
66
|
+
"motion": "^12.34.1",
|
|
67
|
+
"next": "^16.0.10",
|
|
68
|
+
"next-themes": "^0.4.6",
|
|
69
|
+
"opencv-ts": "^1.3.6",
|
|
70
|
+
"radix-ui": "^1.4.3",
|
|
71
|
+
"react": "^19.1.1",
|
|
72
|
+
"react-aria-components": "^1.6.0",
|
|
73
|
+
"react-day-picker": "^9.11.1",
|
|
74
|
+
"react-doc-viewer": "^0.1.15",
|
|
75
|
+
"react-dom": "^19.1.1",
|
|
76
|
+
"react-dropzone": "^14.3.8",
|
|
77
|
+
"react-hook-form": "^7.68.0",
|
|
78
|
+
"react-international-phone": "^4.6.0",
|
|
79
|
+
"react-pdf": "^10.2.0",
|
|
80
|
+
"react-phone-number-input": "^3.4.12",
|
|
81
|
+
"react-resizable-panels": "^3.0.6",
|
|
82
|
+
"react-webcam": "^7.2.0",
|
|
83
|
+
"recharts": "2.15.4",
|
|
84
|
+
"sonner": "^2.0.7",
|
|
85
|
+
"tailwind-merge": "^3.3.1",
|
|
86
|
+
"tw-animate-css": "^1.3.6",
|
|
87
|
+
"vaul": "^1.1.2",
|
|
88
|
+
"zod": "4.1.13"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@tailwindcss/postcss": "^4.1.11",
|
|
92
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
93
|
+
"@testing-library/react": "^16.1.0",
|
|
94
|
+
"@testing-library/user-event": "^14.5.2",
|
|
95
|
+
"@turbo/gen": "^2.5.5",
|
|
96
|
+
"@types/jest": "^29.5.14",
|
|
97
|
+
"@types/jsdom": "^21.1.7",
|
|
98
|
+
"@types/node": "^20.19.9",
|
|
99
|
+
"@types/react": "^19.1.9",
|
|
100
|
+
"@types/react-dom": "^19.1.7",
|
|
101
|
+
"@workspace/eslint-config": "workspace:*",
|
|
102
|
+
"@workspace/typescript-config": "workspace:*",
|
|
103
|
+
"identity-obj-proxy": "^3.0.0",
|
|
104
|
+
"jest": "^29.7.0",
|
|
105
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
106
|
+
"tailwindcss": "^4.1.11",
|
|
107
|
+
"ts-jest": "^29.2.5",
|
|
108
|
+
"typescript": "^5.9.2"
|
|
109
|
+
},
|
|
110
|
+
"exports": {
|
|
111
|
+
"./globals.css": "./src/styles/globals.css",
|
|
112
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
113
|
+
"./lib/*": "./src/lib/*.ts",
|
|
114
|
+
"./components/*": "./src/components/*.tsx",
|
|
115
|
+
"./aria/*": "./src/aria/*.tsx",
|
|
116
|
+
"./custom/*": [
|
|
117
|
+
"./src/custom/*.tsx",
|
|
118
|
+
"./src/custom/*/index.tsx",
|
|
119
|
+
"./src/custom/*.ts",
|
|
120
|
+
"./src/custom/*/index.ts"
|
|
121
|
+
],
|
|
122
|
+
"./hooks/*": "./src/hooks/*.ts"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "react-aria-components";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { MinusIcon, PlusIcon } from "lucide-react";
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Group,
|
|
5
|
+
Input,
|
|
6
|
+
NumberField,
|
|
7
|
+
NumberFieldProps,
|
|
8
|
+
} from "react-aria-components";
|
|
9
|
+
import { cn } from "../lib/utils";
|
|
10
|
+
|
|
11
|
+
export function NumberFieldWithIndicators({
|
|
12
|
+
containerClassName,
|
|
13
|
+
...props
|
|
14
|
+
}: NumberFieldProps & {
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
}) {
|
|
17
|
+
return (
|
|
18
|
+
<NumberField defaultValue={2048} minValue={0} {...props}>
|
|
19
|
+
<Group
|
|
20
|
+
className={cn(
|
|
21
|
+
"border-input data-focus-within:border-ring data-focus-within:ring-ring/50 data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive relative inline-flex h-9 w-full items-center overflow-hidden rounded-md border text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none data-disabled:opacity-50 data-focus-within:ring-[3px]",
|
|
22
|
+
containerClassName
|
|
23
|
+
)}
|
|
24
|
+
>
|
|
25
|
+
<Button
|
|
26
|
+
slot="decrement"
|
|
27
|
+
className="border-input bg-background text-muted-foreground/80 hover:bg-accent hover:text-foreground -ms-px flex aspect-square h-[inherit] items-center justify-center rounded-s-md border text-sm transition-[color,box-shadow] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
28
|
+
>
|
|
29
|
+
<MinusIcon size={16} aria-hidden="true" />
|
|
30
|
+
</Button>
|
|
31
|
+
<Input className="bg-background text-foreground w-full grow px-3 py-2 text-center tabular-nums" />
|
|
32
|
+
<Button
|
|
33
|
+
slot="increment"
|
|
34
|
+
className="border-input bg-background text-muted-foreground/80 hover:bg-accent hover:text-foreground -me-px flex aspect-square h-[inherit] items-center justify-center rounded-e-md border text-sm transition-[color,box-shadow] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
35
|
+
>
|
|
36
|
+
<PlusIcon size={16} aria-hidden="true" />
|
|
37
|
+
</Button>
|
|
38
|
+
</Group>
|
|
39
|
+
</NumberField>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
8
|
+
|
|
9
|
+
function Accordion({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
12
|
+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function AccordionItem({
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
19
|
+
return (
|
|
20
|
+
<AccordionPrimitive.Item
|
|
21
|
+
data-slot="accordion-item"
|
|
22
|
+
className={cn("border-b last:border-b-0", className)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function AccordionTrigger({
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
33
|
+
return (
|
|
34
|
+
<AccordionPrimitive.Header className="flex">
|
|
35
|
+
<AccordionPrimitive.Trigger
|
|
36
|
+
data-slot="accordion-trigger"
|
|
37
|
+
className={cn(
|
|
38
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
39
|
+
className
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
{children}
|
|
44
|
+
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
|
|
45
|
+
</AccordionPrimitive.Trigger>
|
|
46
|
+
</AccordionPrimitive.Header>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function AccordionContent({
|
|
51
|
+
className,
|
|
52
|
+
children,
|
|
53
|
+
...props
|
|
54
|
+
}: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
55
|
+
return (
|
|
56
|
+
<AccordionPrimitive.Content
|
|
57
|
+
data-slot="accordion-content"
|
|
58
|
+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<div className={cn("pt-0 pb-4", className)}>{children}</div>
|
|
62
|
+
</AccordionPrimitive.Content>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
5
|
+
|
|
6
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
7
|
+
import { buttonVariants } from "@repo/ayasofyazilim-ui/components/button";
|
|
8
|
+
|
|
9
|
+
function AlertDialog({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
12
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function AlertDialogTrigger({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
18
|
+
return (
|
|
19
|
+
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function AlertDialogPortal({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
26
|
+
return (
|
|
27
|
+
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function AlertDialogOverlay({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
35
|
+
return (
|
|
36
|
+
<AlertDialogPrimitive.Overlay
|
|
37
|
+
data-slot="alert-dialog-overlay"
|
|
38
|
+
className={cn(
|
|
39
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
40
|
+
className
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function AlertDialogContent({
|
|
48
|
+
className,
|
|
49
|
+
...props
|
|
50
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
51
|
+
return (
|
|
52
|
+
<AlertDialogPortal>
|
|
53
|
+
<AlertDialogOverlay />
|
|
54
|
+
<AlertDialogPrimitive.Content
|
|
55
|
+
data-slot="alert-dialog-content"
|
|
56
|
+
className={cn(
|
|
57
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
58
|
+
className
|
|
59
|
+
)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
</AlertDialogPortal>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function AlertDialogHeader({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<"div">) {
|
|
70
|
+
return (
|
|
71
|
+
<div
|
|
72
|
+
data-slot="alert-dialog-header"
|
|
73
|
+
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function AlertDialogFooter({
|
|
80
|
+
className,
|
|
81
|
+
...props
|
|
82
|
+
}: React.ComponentProps<"div">) {
|
|
83
|
+
return (
|
|
84
|
+
<div
|
|
85
|
+
data-slot="alert-dialog-footer"
|
|
86
|
+
className={cn(
|
|
87
|
+
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
88
|
+
className
|
|
89
|
+
)}
|
|
90
|
+
{...props}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function AlertDialogTitle({
|
|
96
|
+
className,
|
|
97
|
+
...props
|
|
98
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
99
|
+
return (
|
|
100
|
+
<AlertDialogPrimitive.Title
|
|
101
|
+
data-slot="alert-dialog-title"
|
|
102
|
+
className={cn("text-lg font-semibold", className)}
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function AlertDialogDescription({
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
112
|
+
return (
|
|
113
|
+
<AlertDialogPrimitive.Description
|
|
114
|
+
data-slot="alert-dialog-description"
|
|
115
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
116
|
+
{...props}
|
|
117
|
+
/>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function AlertDialogAction({
|
|
122
|
+
className,
|
|
123
|
+
...props
|
|
124
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
125
|
+
return (
|
|
126
|
+
<AlertDialogPrimitive.Action
|
|
127
|
+
className={cn(buttonVariants(), className)}
|
|
128
|
+
{...props}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function AlertDialogCancel({
|
|
134
|
+
className,
|
|
135
|
+
...props
|
|
136
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
137
|
+
return (
|
|
138
|
+
<AlertDialogPrimitive.Cancel
|
|
139
|
+
className={cn(buttonVariants({ variant: "outline" }), className)}
|
|
140
|
+
{...props}
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
AlertDialog,
|
|
147
|
+
AlertDialogPortal,
|
|
148
|
+
AlertDialogOverlay,
|
|
149
|
+
AlertDialogTrigger,
|
|
150
|
+
AlertDialogContent,
|
|
151
|
+
AlertDialogHeader,
|
|
152
|
+
AlertDialogFooter,
|
|
153
|
+
AlertDialogTitle,
|
|
154
|
+
AlertDialogDescription,
|
|
155
|
+
AlertDialogAction,
|
|
156
|
+
AlertDialogCancel,
|
|
157
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@repo/ayasofyazilim-ui/lib/utils";
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva(
|
|
7
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-card text-card-foreground",
|
|
12
|
+
destructive:
|
|
13
|
+
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
14
|
+
success:
|
|
15
|
+
"border-green-500/50 text-green-500 dark:border-green-500 [&>svg]:text-green-500",
|
|
16
|
+
information:
|
|
17
|
+
"border-blue-500/50 text-blue-500 dark:border-blue-500 [&>svg]:text-blue-500",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
function Alert({
|
|
27
|
+
className,
|
|
28
|
+
variant,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
|
|
31
|
+
return (
|
|
32
|
+
<div
|
|
33
|
+
data-slot="alert"
|
|
34
|
+
role="alert"
|
|
35
|
+
className={cn(alertVariants({ variant }), className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
+
return (
|
|
43
|
+
<div
|
|
44
|
+
data-slot="alert-title"
|
|
45
|
+
className={cn(
|
|
46
|
+
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
47
|
+
className
|
|
48
|
+
)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function AlertDescription({
|
|
55
|
+
className,
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<"div">) {
|
|
58
|
+
return (
|
|
59
|
+
<div
|
|
60
|
+
data-slot="alert-description"
|
|
61
|
+
className={cn(
|
|
62
|
+
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
63
|
+
className
|
|
64
|
+
)}
|
|
65
|
+
{...props}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
4
|
+
|
|
5
|
+
function AspectRatio({
|
|
6
|
+
...props
|
|
7
|
+
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
8
|
+
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { AspectRatio };
|