@ever-teams/toolkit-ui 0.2.6
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/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +44 -0
- package/dist/lib/components/accordion.d.ts +8 -0
- package/dist/lib/components/accordion.d.ts.map +1 -0
- package/dist/lib/components/alert-dialog.d.ts +21 -0
- package/dist/lib/components/alert-dialog.d.ts.map +1 -0
- package/dist/lib/components/avatar/avatar.d.ts +22 -0
- package/dist/lib/components/avatar/avatar.d.ts.map +1 -0
- package/dist/lib/components/avatar/teams-avatar.d.ts +10 -0
- package/dist/lib/components/avatar/teams-avatar.d.ts.map +1 -0
- package/dist/lib/components/badge.d.ts +10 -0
- package/dist/lib/components/badge.d.ts.map +1 -0
- package/dist/lib/components/button.d.ts +16 -0
- package/dist/lib/components/button.d.ts.map +1 -0
- package/dist/lib/components/calendar.d.ts +7 -0
- package/dist/lib/components/calendar.d.ts.map +1 -0
- package/dist/lib/components/card.d.ts +39 -0
- package/dist/lib/components/card.d.ts.map +1 -0
- package/dist/lib/components/carousel.d.ts +45 -0
- package/dist/lib/components/carousel.d.ts.map +1 -0
- package/dist/lib/components/checkbox.d.ts +10 -0
- package/dist/lib/components/checkbox.d.ts.map +1 -0
- package/dist/lib/components/color-picker.d.ts +8 -0
- package/dist/lib/components/color-picker.d.ts.map +1 -0
- package/dist/lib/components/command.d.ts +81 -0
- package/dist/lib/components/command.d.ts.map +1 -0
- package/dist/lib/components/date-picker.d.ts +3 -0
- package/dist/lib/components/date-picker.d.ts.map +1 -0
- package/dist/lib/components/date-range-picker.d.ts +4 -0
- package/dist/lib/components/date-range-picker.d.ts.map +1 -0
- package/dist/lib/components/dialog/dialog.d.ts +40 -0
- package/dist/lib/components/dialog/dialog.d.ts.map +1 -0
- package/dist/lib/components/dialog/teams-dailog.d.ts +13 -0
- package/dist/lib/components/dialog/teams-dailog.d.ts.map +1 -0
- package/dist/lib/components/input.d.ts +21 -0
- package/dist/lib/components/input.d.ts.map +1 -0
- package/dist/lib/components/label.d.ts +6 -0
- package/dist/lib/components/label.d.ts.map +1 -0
- package/dist/lib/components/loader.d.ts +6 -0
- package/dist/lib/components/loader.d.ts.map +1 -0
- package/dist/lib/components/menu-bar.d.ts +29 -0
- package/dist/lib/components/menu-bar.d.ts.map +1 -0
- package/dist/lib/components/modal/modal.d.ts +14 -0
- package/dist/lib/components/modal/modal.d.ts.map +1 -0
- package/dist/lib/components/multi-select/multi-select.d.ts +32 -0
- package/dist/lib/components/multi-select/multi-select.d.ts.map +1 -0
- package/dist/lib/components/popover.d.ts +13 -0
- package/dist/lib/components/popover.d.ts.map +1 -0
- package/dist/lib/components/progress.d.ts +10 -0
- package/dist/lib/components/progress.d.ts.map +1 -0
- package/dist/lib/components/radio-button.d.ts +6 -0
- package/dist/lib/components/radio-button.d.ts.map +1 -0
- package/dist/lib/components/select/select-input.d.ts +21 -0
- package/dist/lib/components/select/select-input.d.ts.map +1 -0
- package/dist/lib/components/select/select.d.ts +51 -0
- package/dist/lib/components/select/select.d.ts.map +1 -0
- package/dist/lib/components/switch.d.ts +10 -0
- package/dist/lib/components/switch.d.ts.map +1 -0
- package/dist/lib/components/table.d.ts +51 -0
- package/dist/lib/components/table.d.ts.map +1 -0
- package/dist/lib/components/tabs.d.ts +29 -0
- package/dist/lib/components/tabs.d.ts.map +1 -0
- package/dist/lib/components/textarea.d.ts +17 -0
- package/dist/lib/components/textarea.d.ts.map +1 -0
- package/dist/lib/components/themed-button.d.ts +8 -0
- package/dist/lib/components/themed-button.d.ts.map +1 -0
- package/dist/lib/components/toast/toast.d.ts +48 -0
- package/dist/lib/components/toast/toast.d.ts.map +1 -0
- package/dist/lib/components/toast/toaster.d.ts +2 -0
- package/dist/lib/components/toast/toaster.d.ts.map +1 -0
- package/dist/lib/components/toast/use-toast.d.ts +45 -0
- package/dist/lib/components/toast/use-toast.d.ts.map +1 -0
- package/dist/lib/components/tooltip/teams-tooltip.d.ts +19 -0
- package/dist/lib/components/tooltip/teams-tooltip.d.ts.map +1 -0
- package/dist/lib/components/tooltip/tooltip.d.ts +13 -0
- package/dist/lib/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/lib/hooks/use-UrlInfo.d.ts +11 -0
- package/dist/lib/hooks/use-UrlInfo.d.ts.map +1 -0
- package/dist/lib/hooks/use-resize-observer.d.ts +7 -0
- package/dist/lib/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/lib/svgs/arrow-down.d.ts +6 -0
- package/dist/lib/svgs/arrow-down.d.ts.map +1 -0
- package/dist/lib/svgs/arrow-up.d.ts +6 -0
- package/dist/lib/svgs/arrow-up.d.ts.map +1 -0
- package/dist/lib/svgs/close.d.ts +6 -0
- package/dist/lib/svgs/close.d.ts.map +1 -0
- package/dist/lib/svgs/expand.d.ts +5 -0
- package/dist/lib/svgs/expand.d.ts.map +1 -0
- package/dist/lib/svgs/pause.d.ts +5 -0
- package/dist/lib/svgs/pause.d.ts.map +1 -0
- package/dist/lib/svgs/start.d.ts +5 -0
- package/dist/lib/svgs/start.d.ts.map +1 -0
- package/dist/lib/svgs/stop.d.ts +5 -0
- package/dist/lib/svgs/stop.d.ts.map +1 -0
- package/dist/lib/svgs/teams-logo.d.ts +9 -0
- package/dist/lib/svgs/teams-logo.d.ts.map +1 -0
- package/dist/lib/utils/color.helper.d.ts +4 -0
- package/dist/lib/utils/color.helper.d.ts.map +1 -0
- package/dist/lib/utils/error.helper.d.ts +8 -0
- package/dist/lib/utils/error.helper.d.ts.map +1 -0
- package/dist/lib/utils/report.d.ts +4 -0
- package/dist/lib/utils/report.d.ts.map +1 -0
- package/dist/lib/utils/utils.d.ts +68 -0
- package/dist/lib/utils/utils.d.ts.map +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Combines multiple class names into a single string, merging Tailwind CSS classes
|
|
4
|
+
* for optimization. Utilizes `clsx` to conditionally join class names and `twMerge`
|
|
5
|
+
* to resolve Tailwind CSS conflicts.
|
|
6
|
+
*
|
|
7
|
+
* @param {ClassValue[]} inputs - An array of class name values to be combined.
|
|
8
|
+
* @returns {string} A single string containing the merged class names.
|
|
9
|
+
*/
|
|
10
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
11
|
+
/**
|
|
12
|
+
* Pads a given number with a leading zero if the number is less than 10, and
|
|
13
|
+
* returns the result as a string.
|
|
14
|
+
*
|
|
15
|
+
* @param {number} time - Number to be formatted
|
|
16
|
+
* @returns {string} Formatted time string
|
|
17
|
+
*/
|
|
18
|
+
export declare function getTimeDigits(time: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Checks if two given dates are equal.
|
|
21
|
+
*
|
|
22
|
+
* @param {Date} [date1] - The first date to compare. Defaults to the current date.
|
|
23
|
+
* @param {Date} [date2] - The second date to compare. Defaults to the current date.
|
|
24
|
+
* @returns {boolean} Whether the two dates are equal.
|
|
25
|
+
*/
|
|
26
|
+
export declare function areDatesEqual(date1?: Date, date2?: Date): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Converts a given number of seconds into a formatted time string (HH:MM:SS).
|
|
29
|
+
*
|
|
30
|
+
* @param {number} seconds - The total number of seconds to format. Defaults to 0.
|
|
31
|
+
* @returns {string} The formatted time string in the format HH:MM:SS.
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatTime(seconds?: number): string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the start and end dates of the week for the given date. If the given date
|
|
36
|
+
* is not provided, the current date is used.
|
|
37
|
+
*
|
|
38
|
+
* @param {Date} [date] - The date for which to get the week start and end. Defaults
|
|
39
|
+
* to the current date.
|
|
40
|
+
* @returns {Object} An object containing `start` and `end` properties, which are
|
|
41
|
+
* both `Date` objects representing the start and end of the week, respectively.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getWeekStartAndEnd(date?: Date): {
|
|
44
|
+
start: Date;
|
|
45
|
+
end: Date;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Returns an object with `dayStart` and `dayEnd` properties representing the
|
|
49
|
+
* start and end of the day (inclusive) for the given `callTime` date. If no
|
|
50
|
+
* `callTime` is provided, the current date is used.
|
|
51
|
+
*
|
|
52
|
+
* The start date is 24 hours before the `callTime` and the end date is the
|
|
53
|
+
* `callTime` itself. Both dates have the same hours, minutes, seconds, and
|
|
54
|
+
* milliseconds as the `callTime`.
|
|
55
|
+
*
|
|
56
|
+
* The returned `dayStart` and `dayEnd` properties are formatted as
|
|
57
|
+
* 'YYYY-MM-DD HH:mm:ss' strings.
|
|
58
|
+
*
|
|
59
|
+
* @param {Date} [callTime] - The date for which to get the start and end of the
|
|
60
|
+
* day. Defaults to the current date.
|
|
61
|
+
* @returns {Object} An object with `dayStart` and `dayEnd` properties, which are
|
|
62
|
+
* both strings formatted as 'YYYY-MM-DD HH:mm:ss'.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getStartAndEndOfDay(callTime?: Date): {
|
|
65
|
+
dayStart: string;
|
|
66
|
+
dayEnd: string;
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;GAOG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,OAAa,EAAE,KAAK,OAAa,GAAG,OAAO,CAE7E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAI,GAAG,MAAM,CAU9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,OAAa;;;EAkBnD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,OAAa,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA6B/F"}
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ever-teams/toolkit-ui",
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.es.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"lint": "eslint src/",
|
|
14
|
+
"type-check": "tsc --noEmit",
|
|
15
|
+
"build": "rm -rf dist && rollup -c",
|
|
16
|
+
"dev": "rollup -c --watch"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@emotion/react": ">=11.13.5",
|
|
20
|
+
"react": ">=18.0.0",
|
|
21
|
+
"react-dom": ">=18.0.0",
|
|
22
|
+
"theme-ui": ">=0.16.2"
|
|
23
|
+
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"@emotion/react": "^11.13.5",
|
|
26
|
+
"theme-ui": "^0.16.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@ever-teams/toolkit-types": "*"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@ever-teams/eslint-config": "*",
|
|
33
|
+
"@ever-teams/tailwind-config": "*",
|
|
34
|
+
"@ever-teams/ts-config": "*",
|
|
35
|
+
"@headlessui/react": "^2.1.3",
|
|
36
|
+
"@popperjs/core": "^2.11.8",
|
|
37
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
38
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
39
|
+
"@radix-ui/react-dialog": "^1.1.1",
|
|
40
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
41
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
42
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
43
|
+
"@radix-ui/react-select": "^2.1.1",
|
|
44
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
45
|
+
"@radix-ui/react-switch": "^1.1.3",
|
|
46
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
47
|
+
"@radix-ui/react-toast": "^1.2.1",
|
|
48
|
+
"@radix-ui/react-tooltip": "^1.1.2",
|
|
49
|
+
"@radix-ui/react-label": "^2.1.3",
|
|
50
|
+
"@radix-ui/react-radio-group": "^1.2.4",
|
|
51
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
53
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
54
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
55
|
+
"@radix-ui/react-checkbox": "^1.1.3",
|
|
56
|
+
"@radix-ui/react-alert-dialog": "^1.1.7",
|
|
57
|
+
"add": "^2.0.6",
|
|
58
|
+
"autoprefixer": "^10.4.19",
|
|
59
|
+
"class-variance-authority": "^0.7.0",
|
|
60
|
+
"clsx": "^2.1.1",
|
|
61
|
+
"date-fns": "^3.6.0",
|
|
62
|
+
"lucide-react": "^0.395.0",
|
|
63
|
+
"postcss": "^8.5.10",
|
|
64
|
+
"react": "19.2.3",
|
|
65
|
+
"react-dom": "19.2.3",
|
|
66
|
+
"@types/react": "19.2.8",
|
|
67
|
+
"@types/react-dom": "19.2.3",
|
|
68
|
+
"react-day-picker": "^8.10.1",
|
|
69
|
+
"react-popper-tooltip": "^4.4.2",
|
|
70
|
+
"react-timer-hook": "^3.0.7",
|
|
71
|
+
"recharts": "^2.12.7",
|
|
72
|
+
"rollup": "^4.59.0",
|
|
73
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
74
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
75
|
+
"tailwind-merge": "^3.4.0",
|
|
76
|
+
"tailwindcss": "^4.1.17",
|
|
77
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
78
|
+
"tailwindcss-animate": "^1.0.7",
|
|
79
|
+
"typescript": "^5.6.3",
|
|
80
|
+
"cmdk": "^1.1.1",
|
|
81
|
+
"embla-carousel-react": "^8.6.0",
|
|
82
|
+
"@radix-ui/react-menubar": "^1.1.12"
|
|
83
|
+
},
|
|
84
|
+
"main": "dist/index.es.js",
|
|
85
|
+
"module": "dist/index.es.js",
|
|
86
|
+
"types": "dist/index.d.ts",
|
|
87
|
+
"type": "module",
|
|
88
|
+
"files": [
|
|
89
|
+
"dist"
|
|
90
|
+
],
|
|
91
|
+
"publishConfig": {
|
|
92
|
+
"access": "public"
|
|
93
|
+
}
|
|
94
|
+
}
|