@sunggang/ui-lib 0.4.30 → 0.4.31

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 (45) hide show
  1. package/Accordion.cjs.d.ts +1 -0
  2. package/Accordion.cjs.default.js +1 -0
  3. package/Accordion.cjs.js +223 -0
  4. package/Accordion.cjs.mjs +2 -0
  5. package/Accordion.esm.d.ts +1 -0
  6. package/Accordion.esm.js +216 -0
  7. package/Carousel.cjs.d.ts +1 -0
  8. package/Carousel.cjs.default.js +1 -0
  9. package/Carousel.cjs.js +177 -0
  10. package/Carousel.cjs.mjs +2 -0
  11. package/Carousel.esm.d.ts +1 -0
  12. package/Carousel.esm.js +153 -0
  13. package/DataTable.cjs.js +4 -3
  14. package/DataTable.esm.js +2 -1
  15. package/Skeleton.cjs.d.ts +1 -0
  16. package/Skeleton.cjs.default.js +1 -0
  17. package/Skeleton.cjs.js +169 -0
  18. package/Skeleton.cjs.mjs +2 -0
  19. package/Skeleton.esm.d.ts +1 -0
  20. package/Skeleton.esm.js +162 -0
  21. package/accordion.cjs2.js +161 -0
  22. package/accordion.esm2.js +135 -0
  23. package/button.cjs.js +175 -0
  24. package/button.esm.js +152 -0
  25. package/carousel.cjs2.js +342 -0
  26. package/carousel.esm2.js +313 -0
  27. package/index.cjs.css +311 -0
  28. package/index.cjs.js +23 -7
  29. package/index.esm.css +311 -0
  30. package/index.esm.js +8 -2
  31. package/input.cjs.js +0 -149
  32. package/input.esm.js +2 -149
  33. package/package.json +18 -1
  34. package/skeleton.cjs2.js +70 -0
  35. package/skeleton.esm2.js +68 -0
  36. package/src/Accordion.d.ts +1 -0
  37. package/src/Carousel.d.ts +1 -0
  38. package/src/Skeleton.d.ts +1 -0
  39. package/src/components/ui/accordion.d.ts +7 -0
  40. package/src/components/ui/carousel.d.ts +18 -0
  41. package/src/components/ui/skeleton.d.ts +2 -0
  42. package/src/index.d.ts +3 -0
  43. package/src/lib/Accordion/index.d.ts +79 -0
  44. package/src/lib/Carousel/index.d.ts +35 -0
  45. package/src/lib/Skeleton/index.d.ts +55 -0
package/input.cjs.js CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
- var reactSlot = require('@radix-ui/react-slot');
6
- var classVarianceAuthority = require('class-variance-authority');
7
5
  var utils = require('./utils.cjs.js');
8
6
 
9
7
  function _interopNamespace(e) {
@@ -26,151 +24,6 @@ function _interopNamespace(e) {
26
24
 
27
25
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
26
 
29
- function _define_property$1(obj, key, value) {
30
- if (key in obj) {
31
- Object.defineProperty(obj, key, {
32
- value: value,
33
- enumerable: true,
34
- configurable: true,
35
- writable: true
36
- });
37
- } else {
38
- obj[key] = value;
39
- }
40
- return obj;
41
- }
42
- function _object_spread$1(target) {
43
- for(var i = 1; i < arguments.length; i++){
44
- var source = arguments[i] != null ? arguments[i] : {};
45
- var ownKeys = Object.keys(source);
46
- if (typeof Object.getOwnPropertySymbols === "function") {
47
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
48
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
49
- }));
50
- }
51
- ownKeys.forEach(function(key) {
52
- _define_property$1(target, key, source[key]);
53
- });
54
- }
55
- return target;
56
- }
57
- function ownKeys(object, enumerableOnly) {
58
- var keys = Object.keys(object);
59
- if (Object.getOwnPropertySymbols) {
60
- var symbols = Object.getOwnPropertySymbols(object);
61
- if (enumerableOnly) {
62
- symbols = symbols.filter(function(sym) {
63
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
64
- });
65
- }
66
- keys.push.apply(keys, symbols);
67
- }
68
- return keys;
69
- }
70
- function _object_spread_props(target, source) {
71
- source = source != null ? source : {};
72
- if (Object.getOwnPropertyDescriptors) {
73
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
74
- } else {
75
- ownKeys(Object(source)).forEach(function(key) {
76
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
77
- });
78
- }
79
- return target;
80
- }
81
- function _object_without_properties$1(source, excluded) {
82
- if (source == null) return {};
83
- var target = _object_without_properties_loose$1(source, excluded);
84
- var key, i;
85
- if (Object.getOwnPropertySymbols) {
86
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
87
- for(i = 0; i < sourceSymbolKeys.length; i++){
88
- key = sourceSymbolKeys[i];
89
- if (excluded.indexOf(key) >= 0) continue;
90
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
91
- target[key] = source[key];
92
- }
93
- }
94
- return target;
95
- }
96
- function _object_without_properties_loose$1(source, excluded) {
97
- if (source == null) return {};
98
- var target = {};
99
- var sourceKeys = Object.keys(source);
100
- var key, i;
101
- for(i = 0; i < sourceKeys.length; i++){
102
- key = sourceKeys[i];
103
- if (excluded.indexOf(key) >= 0) continue;
104
- target[key] = source[key];
105
- }
106
- return target;
107
- }
108
- var buttonVariants = classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
109
- variants: {
110
- variant: {
111
- custom: "bg-inherit",
112
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
113
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
114
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
115
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
116
- ghost: "hover:bg-accent hover:text-accent-foreground",
117
- link: "text-primary underline-offset-4 hover:underline"
118
- },
119
- size: {
120
- default: "h-9 px-4 py-2",
121
- sm: "h-8 rounded-md px-3 text-xs",
122
- lg: "h-10 rounded-md px-8",
123
- icon: "h-9 w-9"
124
- }
125
- },
126
- defaultVariants: {
127
- variant: "default",
128
- size: "default"
129
- }
130
- });
131
- var Button = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
132
- var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, _param_isLoading = _param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, customClassName = _param.customClassName, children = _param.children, props = _object_without_properties$1(_param, [
133
- "className",
134
- "variant",
135
- "size",
136
- "asChild",
137
- "isLoading",
138
- "customClassName",
139
- "children"
140
- ]);
141
- var Comp = asChild ? reactSlot.Slot : "button";
142
- return /*#__PURE__*/ jsxRuntime.jsx(Comp, _object_spread_props(_object_spread$1({
143
- className: utils.cn(variant !== "custom" ? buttonVariants({
144
- variant: variant,
145
- size: size,
146
- className: className
147
- }) : "", isLoading ? "pointer-events-none opacity-70" : "pointer-events-auto opacity-100"),
148
- ref: ref
149
- }, props), {
150
- disabled: isLoading || props.disabled,
151
- children: variant === "custom" ? /*#__PURE__*/ jsxRuntime.jsxs("div", {
152
- className: [
153
- "flex items-center gap-1",
154
- customClassName,
155
- props.disabled ? "pointer-events-none opacity-70" : ""
156
- ].join(" "),
157
- children: [
158
- isLoading && /*#__PURE__*/ jsxRuntime.jsx("div", {
159
- className: "w-4 h-4 rounded-full border-2 border-solid border-white border-t-[#939393] animate-spin mr-2"
160
- }),
161
- children
162
- ]
163
- }) : /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
164
- children: [
165
- isLoading && /*#__PURE__*/ jsxRuntime.jsx("div", {
166
- className: "w-4 h-4 rounded-full border-2 border-solid border-white border-t-[#939393] animate-spin mr-2"
167
- }),
168
- children
169
- ]
170
- })
171
- }));
172
- });
173
-
174
27
  function _define_property(obj, key, value) {
175
28
  if (key in obj) {
176
29
  Object.defineProperty(obj, key, {
@@ -239,6 +92,4 @@ var Input = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
239
92
  });
240
93
  Input.displayName = "Input";
241
94
 
242
- exports.Button = Button;
243
95
  exports.Input = Input;
244
- exports.buttonVariants = buttonVariants;
package/input.esm.js CHANGED
@@ -1,154 +1,7 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { Slot } from '@radix-ui/react-slot';
4
- import { cva } from 'class-variance-authority';
5
3
  import { c as cn } from './utils.esm.js';
6
4
 
7
- function _define_property$1(obj, key, value) {
8
- if (key in obj) {
9
- Object.defineProperty(obj, key, {
10
- value: value,
11
- enumerable: true,
12
- configurable: true,
13
- writable: true
14
- });
15
- } else {
16
- obj[key] = value;
17
- }
18
- return obj;
19
- }
20
- function _object_spread$1(target) {
21
- for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i] != null ? arguments[i] : {};
23
- var ownKeys = Object.keys(source);
24
- if (typeof Object.getOwnPropertySymbols === "function") {
25
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
26
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
27
- }));
28
- }
29
- ownKeys.forEach(function(key) {
30
- _define_property$1(target, key, source[key]);
31
- });
32
- }
33
- return target;
34
- }
35
- function ownKeys(object, enumerableOnly) {
36
- var keys = Object.keys(object);
37
- if (Object.getOwnPropertySymbols) {
38
- var symbols = Object.getOwnPropertySymbols(object);
39
- if (enumerableOnly) {
40
- symbols = symbols.filter(function(sym) {
41
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
42
- });
43
- }
44
- keys.push.apply(keys, symbols);
45
- }
46
- return keys;
47
- }
48
- function _object_spread_props(target, source) {
49
- source = source != null ? source : {};
50
- if (Object.getOwnPropertyDescriptors) {
51
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
52
- } else {
53
- ownKeys(Object(source)).forEach(function(key) {
54
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
55
- });
56
- }
57
- return target;
58
- }
59
- function _object_without_properties$1(source, excluded) {
60
- if (source == null) return {};
61
- var target = _object_without_properties_loose$1(source, excluded);
62
- var key, i;
63
- if (Object.getOwnPropertySymbols) {
64
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
65
- for(i = 0; i < sourceSymbolKeys.length; i++){
66
- key = sourceSymbolKeys[i];
67
- if (excluded.indexOf(key) >= 0) continue;
68
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
69
- target[key] = source[key];
70
- }
71
- }
72
- return target;
73
- }
74
- function _object_without_properties_loose$1(source, excluded) {
75
- if (source == null) return {};
76
- var target = {};
77
- var sourceKeys = Object.keys(source);
78
- var key, i;
79
- for(i = 0; i < sourceKeys.length; i++){
80
- key = sourceKeys[i];
81
- if (excluded.indexOf(key) >= 0) continue;
82
- target[key] = source[key];
83
- }
84
- return target;
85
- }
86
- var buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
87
- variants: {
88
- variant: {
89
- custom: "bg-inherit",
90
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
91
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
92
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
93
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
94
- ghost: "hover:bg-accent hover:text-accent-foreground",
95
- link: "text-primary underline-offset-4 hover:underline"
96
- },
97
- size: {
98
- default: "h-9 px-4 py-2",
99
- sm: "h-8 rounded-md px-3 text-xs",
100
- lg: "h-10 rounded-md px-8",
101
- icon: "h-9 w-9"
102
- }
103
- },
104
- defaultVariants: {
105
- variant: "default",
106
- size: "default"
107
- }
108
- });
109
- var Button = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
110
- var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, _param_isLoading = _param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, customClassName = _param.customClassName, children = _param.children, props = _object_without_properties$1(_param, [
111
- "className",
112
- "variant",
113
- "size",
114
- "asChild",
115
- "isLoading",
116
- "customClassName",
117
- "children"
118
- ]);
119
- var Comp = asChild ? Slot : "button";
120
- return /*#__PURE__*/ jsx(Comp, _object_spread_props(_object_spread$1({
121
- className: cn(variant !== "custom" ? buttonVariants({
122
- variant: variant,
123
- size: size,
124
- className: className
125
- }) : "", isLoading ? "pointer-events-none opacity-70" : "pointer-events-auto opacity-100"),
126
- ref: ref
127
- }, props), {
128
- disabled: isLoading || props.disabled,
129
- children: variant === "custom" ? /*#__PURE__*/ jsxs("div", {
130
- className: [
131
- "flex items-center gap-1",
132
- customClassName,
133
- props.disabled ? "pointer-events-none opacity-70" : ""
134
- ].join(" "),
135
- children: [
136
- isLoading && /*#__PURE__*/ jsx("div", {
137
- className: "w-4 h-4 rounded-full border-2 border-solid border-white border-t-[#939393] animate-spin mr-2"
138
- }),
139
- children
140
- ]
141
- }) : /*#__PURE__*/ jsxs(Fragment, {
142
- children: [
143
- isLoading && /*#__PURE__*/ jsx("div", {
144
- className: "w-4 h-4 rounded-full border-2 border-solid border-white border-t-[#939393] animate-spin mr-2"
145
- }),
146
- children
147
- ]
148
- })
149
- }));
150
- });
151
-
152
5
  function _define_property(obj, key, value) {
153
6
  if (key in obj) {
154
7
  Object.defineProperty(obj, key, {
@@ -217,4 +70,4 @@ var Input = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
217
70
  });
218
71
  Input.displayName = "Input";
219
72
 
220
- export { Button as B, Input as I, buttonVariants as b };
73
+ export { Input as I };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.4.30",
3
+ "version": "0.4.31",
4
4
  "sideEffects": [
5
5
  "*.css",
6
6
  "./src/style.css",
@@ -72,6 +72,21 @@
72
72
  "import": "./BaseSwitch.cjs.mjs",
73
73
  "default": "./BaseSwitch.cjs.js"
74
74
  },
75
+ "./Carousel": {
76
+ "module": "./Carousel.esm.js",
77
+ "import": "./Carousel.cjs.mjs",
78
+ "default": "./Carousel.cjs.js"
79
+ },
80
+ "./Skeleton": {
81
+ "module": "./Skeleton.esm.js",
82
+ "import": "./Skeleton.cjs.mjs",
83
+ "default": "./Skeleton.cjs.js"
84
+ },
85
+ "./Accordion": {
86
+ "module": "./Accordion.esm.js",
87
+ "import": "./Accordion.cjs.mjs",
88
+ "default": "./Accordion.cjs.js"
89
+ },
75
90
  "./package.json": "./package.json"
76
91
  },
77
92
  "dependencies": {
@@ -83,6 +98,7 @@
83
98
  "@mui/icons-material": "^6.4.1",
84
99
  "@mui/material": "^6.4.1",
85
100
  "@mui/x-date-pickers": "^7.24.0",
101
+ "@radix-ui/react-accordion": "^1.2.12",
86
102
  "@radix-ui/react-checkbox": "^1.0.4",
87
103
  "@radix-ui/react-dropdown-menu": "^2.0.6",
88
104
  "@radix-ui/react-icons": "^1.3.0",
@@ -94,6 +110,7 @@
94
110
  "class-variance-authority": "^0.7.0",
95
111
  "clsx": "^2.1.0",
96
112
  "date-fns": "^2.29.3",
113
+ "embla-carousel-react": "^8.6.0",
97
114
  "flatpickr": "^4.6.13",
98
115
  "input-otp": "^1.2.4",
99
116
  "lucide-react": "^0.363.0",
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var utils = require('./utils.cjs.js');
5
+
6
+ function _define_property(obj, key, value) {
7
+ if (key in obj) {
8
+ Object.defineProperty(obj, key, {
9
+ value: value,
10
+ enumerable: true,
11
+ configurable: true,
12
+ writable: true
13
+ });
14
+ } else {
15
+ obj[key] = value;
16
+ }
17
+ return obj;
18
+ }
19
+ function _object_spread(target) {
20
+ for(var i = 1; i < arguments.length; i++){
21
+ var source = arguments[i] != null ? arguments[i] : {};
22
+ var ownKeys = Object.keys(source);
23
+ if (typeof Object.getOwnPropertySymbols === "function") {
24
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
25
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
26
+ }));
27
+ }
28
+ ownKeys.forEach(function(key) {
29
+ _define_property(target, key, source[key]);
30
+ });
31
+ }
32
+ return target;
33
+ }
34
+ function _object_without_properties(source, excluded) {
35
+ if (source == null) return {};
36
+ var target = _object_without_properties_loose(source, excluded);
37
+ var key, i;
38
+ if (Object.getOwnPropertySymbols) {
39
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
40
+ for(i = 0; i < sourceSymbolKeys.length; i++){
41
+ key = sourceSymbolKeys[i];
42
+ if (excluded.indexOf(key) >= 0) continue;
43
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
44
+ target[key] = source[key];
45
+ }
46
+ }
47
+ return target;
48
+ }
49
+ function _object_without_properties_loose(source, excluded) {
50
+ if (source == null) return {};
51
+ var target = {};
52
+ var sourceKeys = Object.keys(source);
53
+ var key, i;
54
+ for(i = 0; i < sourceKeys.length; i++){
55
+ key = sourceKeys[i];
56
+ if (excluded.indexOf(key) >= 0) continue;
57
+ target[key] = source[key];
58
+ }
59
+ return target;
60
+ }
61
+ function Skeleton(_param) {
62
+ var className = _param.className, props = _object_without_properties(_param, [
63
+ "className"
64
+ ]);
65
+ return /*#__PURE__*/ jsxRuntime.jsx("div", _object_spread({
66
+ className: utils.cn("animate-pulse rounded-md bg-muted", className)
67
+ }, props));
68
+ }
69
+
70
+ exports.Skeleton = Skeleton;
@@ -0,0 +1,68 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { c as cn } from './utils.esm.js';
3
+
4
+ function _define_property(obj, key, value) {
5
+ if (key in obj) {
6
+ Object.defineProperty(obj, key, {
7
+ value: value,
8
+ enumerable: true,
9
+ configurable: true,
10
+ writable: true
11
+ });
12
+ } else {
13
+ obj[key] = value;
14
+ }
15
+ return obj;
16
+ }
17
+ function _object_spread(target) {
18
+ for(var i = 1; i < arguments.length; i++){
19
+ var source = arguments[i] != null ? arguments[i] : {};
20
+ var ownKeys = Object.keys(source);
21
+ if (typeof Object.getOwnPropertySymbols === "function") {
22
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
23
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
24
+ }));
25
+ }
26
+ ownKeys.forEach(function(key) {
27
+ _define_property(target, key, source[key]);
28
+ });
29
+ }
30
+ return target;
31
+ }
32
+ function _object_without_properties(source, excluded) {
33
+ if (source == null) return {};
34
+ var target = _object_without_properties_loose(source, excluded);
35
+ var key, i;
36
+ if (Object.getOwnPropertySymbols) {
37
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
38
+ for(i = 0; i < sourceSymbolKeys.length; i++){
39
+ key = sourceSymbolKeys[i];
40
+ if (excluded.indexOf(key) >= 0) continue;
41
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
42
+ target[key] = source[key];
43
+ }
44
+ }
45
+ return target;
46
+ }
47
+ function _object_without_properties_loose(source, excluded) {
48
+ if (source == null) return {};
49
+ var target = {};
50
+ var sourceKeys = Object.keys(source);
51
+ var key, i;
52
+ for(i = 0; i < sourceKeys.length; i++){
53
+ key = sourceKeys[i];
54
+ if (excluded.indexOf(key) >= 0) continue;
55
+ target[key] = source[key];
56
+ }
57
+ return target;
58
+ }
59
+ function Skeleton(_param) {
60
+ var className = _param.className, props = _object_without_properties(_param, [
61
+ "className"
62
+ ]);
63
+ return /*#__PURE__*/ jsx("div", _object_spread({
64
+ className: cn("animate-pulse rounded-md bg-muted", className)
65
+ }, props));
66
+ }
67
+
68
+ export { Skeleton as S };
@@ -0,0 +1 @@
1
+ export * from './lib/Accordion';
@@ -0,0 +1 @@
1
+ export * from './lib/Carousel';
@@ -0,0 +1 @@
1
+ export * from './lib/Skeleton';
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+ declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
3
+ type CarouselApi = UseEmblaCarouselType[1];
4
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
5
+ type CarouselOptions = UseCarouselParameters[0];
6
+ type CarouselPlugin = UseCarouselParameters[1];
7
+ type CarouselProps = {
8
+ opts?: CarouselOptions;
9
+ plugins?: CarouselPlugin;
10
+ orientation?: 'horizontal' | 'vertical';
11
+ setApi?: (api: CarouselApi) => void;
12
+ };
13
+ declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
+ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
package/src/index.d.ts CHANGED
@@ -7,6 +7,9 @@ export * from './components/ui/dateRangePicker';
7
7
  export * from './components/ui/singlePicker';
8
8
  export * from './components/ui/checkbox';
9
9
  export * from './components/ui/inputOtp';
10
+ export * from './components/ui/carousel';
11
+ export * from './components/ui/skeleton';
12
+ export * from './components/ui/accordion';
10
13
  export * from './lib/Function';
11
14
  export * from './lib/Drawer/Base';
12
15
  export * from './lib/Select/CustomSelect';
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ export interface AccordionItemData {
3
+ /** 唯一識別碼 */
4
+ id: string;
5
+ /** 標題 */
6
+ title: React.ReactNode;
7
+ /** 內容 */
8
+ content: React.ReactNode;
9
+ /** 是否禁用 */
10
+ disabled?: boolean;
11
+ /** 自定義標題樣式類名 */
12
+ titleClassName?: string;
13
+ /** 自定義內容樣式類名 */
14
+ contentClassName?: string;
15
+ }
16
+ export interface BaseAccordionProps {
17
+ /** 手風琴項目資料 */
18
+ items: AccordionItemData[];
19
+ /** 手風琴類型 */
20
+ type?: 'single' | 'multiple';
21
+ /** 是否可摺疊(僅在 type="single" 時有效) */
22
+ collapsible?: boolean;
23
+ /** 預設開啟的項目值 */
24
+ defaultValue?: string | string[];
25
+ /** 受控的開啟項目值 */
26
+ value?: string | string[];
27
+ /** 當開啟項目變更時的回調 */
28
+ onValueChange?: (value: string | string[]) => void;
29
+ /** 手風琴方向 */
30
+ orientation?: 'vertical' | 'horizontal';
31
+ /** 容器樣式類名 */
32
+ className?: string;
33
+ /** 項目樣式類名 */
34
+ itemClassName?: string;
35
+ /** 觸發器樣式類名 */
36
+ triggerClassName?: string;
37
+ /** 內容樣式類名 */
38
+ contentClassName?: string;
39
+ /** 是否顯示邊框 */
40
+ showBorder?: boolean;
41
+ /** 大小變體 */
42
+ size?: 'sm' | 'md' | 'lg';
43
+ }
44
+ export declare const BaseAccordion: React.FC<BaseAccordionProps>;
45
+ export interface FAQAccordionProps {
46
+ /** FAQ 項目 */
47
+ faqs: Array<{
48
+ id: string;
49
+ question: string;
50
+ answer: string;
51
+ }>;
52
+ /** 容器樣式類名 */
53
+ className?: string;
54
+ }
55
+ export declare const FAQAccordion: React.FC<FAQAccordionProps>;
56
+ export interface FeatureAccordionProps {
57
+ /** 功能特色項目 */
58
+ features: Array<{
59
+ id: string;
60
+ title: string;
61
+ description: string;
62
+ icon?: React.ReactNode;
63
+ details?: React.ReactNode;
64
+ }>;
65
+ /** 容器樣式類名 */
66
+ className?: string;
67
+ }
68
+ export declare const FeatureAccordion: React.FC<FeatureAccordionProps>;
69
+ export interface SettingsAccordionProps {
70
+ /** 設定分類 */
71
+ categories: Array<{
72
+ id: string;
73
+ title: string;
74
+ settings: React.ReactNode;
75
+ }>;
76
+ /** 容器樣式類名 */
77
+ className?: string;
78
+ }
79
+ export declare const SettingsAccordion: React.FC<SettingsAccordionProps>;
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import { type CarouselApi } from '../../components/ui/carousel';
3
+ export interface CarouselItemData {
4
+ id: string | number;
5
+ content: React.ReactNode;
6
+ }
7
+ export interface BaseCarouselProps {
8
+ /** 輪播項目資料 */
9
+ items: CarouselItemData[];
10
+ /** 是否顯示導航按鈕 */
11
+ showNavigation?: boolean;
12
+ /** 是否顯示指示器 */
13
+ showIndicators?: boolean;
14
+ /** 自動播放間隔時間(毫秒) */
15
+ autoPlay?: number;
16
+ /** 輪播方向 */
17
+ orientation?: 'horizontal' | 'vertical';
18
+ /** 一次顯示的項目數量 */
19
+ itemsPerView?: number;
20
+ /** 項目之間的間距 */
21
+ gap?: string;
22
+ /** 容器樣式類名 */
23
+ className?: string;
24
+ /** 項目樣式類名 */
25
+ itemClassName?: string;
26
+ /** 導航按鈕樣式類名 */
27
+ navigationClassName?: string;
28
+ /** 指示器樣式類名 */
29
+ indicatorClassName?: string;
30
+ /** 當項目變更時的回調 */
31
+ onSlideChange?: (index: number) => void;
32
+ /** 當輪播準備就緒時的回調 */
33
+ onReady?: (api: CarouselApi) => void;
34
+ }
35
+ export declare const BaseCarousel: React.FC<BaseCarouselProps>;