@c15t/react 0.0.1-rc.3
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/LICENSE.md +595 -0
- package/README.md +55 -0
- package/dist/common/components/consent-manager-provider.cjs +93 -0
- package/dist/common/components/consent-manager-provider.d.ts +16 -0
- package/dist/common/components/consent-manager-provider.d.ts.map +1 -0
- package/dist/common/components/consent-manager-provider.js +59 -0
- package/dist/common/context/consent-manager-context.cjs +38 -0
- package/dist/common/context/consent-manager-context.d.ts +13 -0
- package/dist/common/context/consent-manager-context.d.ts.map +1 -0
- package/dist/common/context/consent-manager-context.js +4 -0
- package/dist/common/hooks/use-consent-manager.cjs +45 -0
- package/dist/common/hooks/use-consent-manager.d.ts +20 -0
- package/dist/common/hooks/use-consent-manager.d.ts.map +1 -0
- package/dist/common/hooks/use-consent-manager.js +11 -0
- package/dist/common/index.cjs +42 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +9 -0
- package/dist/common/store/use-consent-manager.cjs +47 -0
- package/dist/common/store/use-consent-manager.d.ts +136 -0
- package/dist/common/store/use-consent-manager.d.ts.map +1 -0
- package/dist/common/store/use-consent-manager.js +13 -0
- package/dist/common/store/use-translations.cjs +58 -0
- package/dist/common/store/use-translations.d.ts +29 -0
- package/dist/common/store/use-translations.d.ts.map +1 -0
- package/dist/common/store/use-translations.js +24 -0
- package/dist/common/types/consent-manager.cjs +19 -0
- package/dist/common/types/consent-manager.d.ts +82 -0
- package/dist/common/types/consent-manager.d.ts.map +1 -0
- package/dist/common/types/consent-manager.js +0 -0
- package/dist/common/utils/theme.cjs +47 -0
- package/dist/common/utils/theme.d.ts +8 -0
- package/dist/common/utils/theme.d.ts.map +1 -0
- package/dist/common/utils/theme.js +13 -0
- package/dist/common/utils/translations.cjs +86 -0
- package/dist/common/utils/translations.d.ts +14 -0
- package/dist/common/utils/translations.d.ts.map +1 -0
- package/dist/common/utils/translations.js +50 -0
- package/dist/consent-manager-dialog/__tests__/styles.spec.cjs +218 -0
- package/dist/consent-manager-dialog/__tests__/styles.spec.d.ts +2 -0
- package/dist/consent-manager-dialog/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/consent-manager-dialog/__tests__/styles.spec.js +183 -0
- package/dist/consent-manager-dialog/__tests__/utils.cjs +68 -0
- package/dist/consent-manager-dialog/__tests__/utils.d.ts +13 -0
- package/dist/consent-manager-dialog/__tests__/utils.d.ts.map +1 -0
- package/dist/consent-manager-dialog/__tests__/utils.js +34 -0
- package/dist/consent-manager-dialog/atoms/dialog-card.cjs +139 -0
- package/dist/consent-manager-dialog/atoms/dialog-card.d.ts +90 -0
- package/dist/consent-manager-dialog/atoms/dialog-card.d.ts.map +1 -0
- package/dist/consent-manager-dialog/atoms/dialog-card.js +94 -0
- package/dist/consent-manager-dialog/atoms/overlay.cjs +67 -0
- package/dist/consent-manager-dialog/atoms/overlay.d.ts +71 -0
- package/dist/consent-manager-dialog/atoms/overlay.d.ts.map +1 -0
- package/dist/consent-manager-dialog/atoms/overlay.js +32 -0
- package/dist/consent-manager-dialog/consent-manager-dialog.cjs +129 -0
- package/dist/consent-manager-dialog/consent-manager-dialog.css +75 -0
- package/dist/consent-manager-dialog/consent-manager-dialog.d.ts +44 -0
- package/dist/consent-manager-dialog/consent-manager-dialog.d.ts.map +1 -0
- package/dist/consent-manager-dialog/consent-manager-dialog.js +95 -0
- package/dist/consent-manager-dialog/index.cjs +51 -0
- package/dist/consent-manager-dialog/index.d.ts +4 -0
- package/dist/consent-manager-dialog/index.d.ts.map +1 -0
- package/dist/consent-manager-dialog/index.js +18 -0
- package/dist/consent-manager-dialog/theme.cjs +19 -0
- package/dist/consent-manager-dialog/theme.d.ts +19 -0
- package/dist/consent-manager-dialog/theme.d.ts.map +1 -0
- package/dist/consent-manager-dialog/theme.js +0 -0
- package/dist/consent-manager-widget/__tests__/styles.spec.cjs +228 -0
- package/dist/consent-manager-widget/__tests__/styles.spec.d.ts +2 -0
- package/dist/consent-manager-widget/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/consent-manager-widget/__tests__/styles.spec.js +193 -0
- package/dist/consent-manager-widget/__tests__/utils.cjs +68 -0
- package/dist/consent-manager-widget/__tests__/utils.d.ts +13 -0
- package/dist/consent-manager-widget/__tests__/utils.d.ts.map +1 -0
- package/dist/consent-manager-widget/__tests__/utils.js +34 -0
- package/dist/consent-manager-widget/atoms/accordion.cjs +147 -0
- package/dist/consent-manager-widget/atoms/accordion.d.ts +57 -0
- package/dist/consent-manager-widget/atoms/accordion.d.ts.map +1 -0
- package/dist/consent-manager-widget/atoms/accordion.js +98 -0
- package/dist/consent-manager-widget/atoms/button.cjs +77 -0
- package/dist/consent-manager-widget/atoms/button.d.ts +17 -0
- package/dist/consent-manager-widget/atoms/button.d.ts.map +1 -0
- package/dist/consent-manager-widget/atoms/button.js +38 -0
- package/dist/consent-manager-widget/atoms/footer.cjs +70 -0
- package/dist/consent-manager-widget/atoms/footer.d.ts +22 -0
- package/dist/consent-manager-widget/atoms/footer.d.ts.map +1 -0
- package/dist/consent-manager-widget/atoms/footer.js +34 -0
- package/dist/consent-manager-widget/atoms/logo.cjs +101 -0
- package/dist/consent-manager-widget/atoms/logo.d.ts +8 -0
- package/dist/consent-manager-widget/atoms/logo.d.ts.map +1 -0
- package/dist/consent-manager-widget/atoms/logo.js +67 -0
- package/dist/consent-manager-widget/atoms/root.cjs +64 -0
- package/dist/consent-manager-widget/atoms/root.d.ts +82 -0
- package/dist/consent-manager-widget/atoms/root.d.ts.map +1 -0
- package/dist/consent-manager-widget/atoms/root.js +29 -0
- package/dist/consent-manager-widget/consent-manager-widget.cjs +98 -0
- package/dist/consent-manager-widget/consent-manager-widget.css +79 -0
- package/dist/consent-manager-widget/consent-manager-widget.d.ts +51 -0
- package/dist/consent-manager-widget/consent-manager-widget.d.ts.map +1 -0
- package/dist/consent-manager-widget/consent-manager-widget.js +64 -0
- package/dist/consent-manager-widget/index.cjs +62 -0
- package/dist/consent-manager-widget/index.d.ts +10 -0
- package/dist/consent-manager-widget/index.d.ts.map +1 -0
- package/dist/consent-manager-widget/index.js +29 -0
- package/dist/consent-manager-widget/theme.cjs +19 -0
- package/dist/consent-manager-widget/theme.d.ts +48 -0
- package/dist/consent-manager-widget/theme.d.ts.map +1 -0
- package/dist/consent-manager-widget/theme.js +0 -0
- package/dist/consent-manager-widget/types.cjs +19 -0
- package/dist/consent-manager-widget/types.d.ts +18 -0
- package/dist/consent-manager-widget/types.d.ts.map +1 -0
- package/dist/consent-manager-widget/types.js +0 -0
- package/dist/cookie-banner/__tests__/styles.spec.cjs +234 -0
- package/dist/cookie-banner/__tests__/styles.spec.d.ts +2 -0
- package/dist/cookie-banner/__tests__/styles.spec.d.ts.map +1 -0
- package/dist/cookie-banner/__tests__/styles.spec.js +199 -0
- package/dist/cookie-banner/__tests__/utils.cjs +67 -0
- package/dist/cookie-banner/__tests__/utils.d.ts +13 -0
- package/dist/cookie-banner/__tests__/utils.d.ts.map +1 -0
- package/dist/cookie-banner/__tests__/utils.js +33 -0
- package/dist/cookie-banner/atoms/overlay.cjs +71 -0
- package/dist/cookie-banner/atoms/overlay.d.ts +46 -0
- package/dist/cookie-banner/atoms/overlay.d.ts.map +1 -0
- package/dist/cookie-banner/atoms/overlay.js +36 -0
- package/dist/cookie-banner/atoms/root.cjs +116 -0
- package/dist/cookie-banner/atoms/root.d.ts +79 -0
- package/dist/cookie-banner/atoms/root.d.ts.map +1 -0
- package/dist/cookie-banner/atoms/root.js +81 -0
- package/dist/cookie-banner/components.cjs +160 -0
- package/dist/cookie-banner/components.d.ts +136 -0
- package/dist/cookie-banner/components.d.ts.map +1 -0
- package/dist/cookie-banner/components.js +109 -0
- package/dist/cookie-banner/cookie-banner.cjs +99 -0
- package/dist/cookie-banner/cookie-banner.css +226 -0
- package/dist/cookie-banner/cookie-banner.d.ts +134 -0
- package/dist/cookie-banner/cookie-banner.d.ts.map +1 -0
- package/dist/cookie-banner/cookie-banner.js +65 -0
- package/dist/cookie-banner/error-boundary.cjs +68 -0
- package/dist/cookie-banner/error-boundary.d.ts +56 -0
- package/dist/cookie-banner/error-boundary.d.ts.map +1 -0
- package/dist/cookie-banner/error-boundary.js +34 -0
- package/dist/cookie-banner/index.cjs +59 -0
- package/dist/cookie-banner/index.d.ts +52 -0
- package/dist/cookie-banner/index.d.ts.map +1 -0
- package/dist/cookie-banner/index.js +26 -0
- package/dist/cookie-banner/theme.cjs +19 -0
- package/dist/cookie-banner/theme.d.ts +30 -0
- package/dist/cookie-banner/theme.d.ts.map +1 -0
- package/dist/cookie-banner/theme.js +0 -0
- package/dist/index.cjs +89 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/primitives/box.cjs +54 -0
- package/dist/primitives/box.d.ts +47 -0
- package/dist/primitives/box.d.ts.map +1 -0
- package/dist/primitives/box.js +20 -0
- package/dist/primitives/button.cjs +93 -0
- package/dist/primitives/button.d.ts +207 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +59 -0
- package/dist/primitives/button.types.cjs +19 -0
- package/dist/primitives/button.types.d.ts +34 -0
- package/dist/primitives/button.types.d.ts.map +1 -0
- package/dist/primitives/button.types.js +0 -0
- package/dist/theme/context.cjs +44 -0
- package/dist/theme/context.d.ts +96 -0
- package/dist/theme/context.d.ts.map +1 -0
- package/dist/theme/context.js +9 -0
- package/dist/theme/index.cjs +39 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/style-keys.cjs +39 -0
- package/dist/theme/style-keys.d.ts +77 -0
- package/dist/theme/style-keys.d.ts.map +1 -0
- package/dist/theme/style-keys.js +5 -0
- package/dist/theme/use-style.cjs +95 -0
- package/dist/theme/use-style.d.ts +32 -0
- package/dist/theme/use-style.d.ts.map +1 -0
- package/dist/theme/use-style.js +61 -0
- package/dist/theme/utils/merge-styles.cjs +62 -0
- package/dist/theme/utils/merge-styles.d.ts +3 -0
- package/dist/theme/utils/merge-styles.d.ts.map +1 -0
- package/dist/theme/utils/merge-styles.js +28 -0
- package/dist/ui/components/accordion.cjs +204 -0
- package/dist/ui/components/accordion.css +158 -0
- package/dist/ui/components/accordion.d.ts +45 -0
- package/dist/ui/components/accordion.d.ts.map +1 -0
- package/dist/ui/components/accordion.js +164 -0
- package/dist/ui/components/button.cjs +185 -0
- package/dist/ui/components/button.css +303 -0
- package/dist/ui/components/button.d.ts +445 -0
- package/dist/ui/components/button.d.ts.map +1 -0
- package/dist/ui/components/button.js +149 -0
- package/dist/ui/components/card.cjs +80 -0
- package/dist/ui/components/card.css +55 -0
- package/dist/ui/components/card.d.ts +10 -0
- package/dist/ui/components/card.d.ts.map +1 -0
- package/dist/ui/components/card.js +41 -0
- package/dist/ui/components/icon.cjs +57 -0
- package/dist/ui/components/icon.d.ts +8 -0
- package/dist/ui/components/icon.d.ts.map +1 -0
- package/dist/ui/components/icon.js +23 -0
- package/dist/ui/components/logo.cjs +101 -0
- package/dist/ui/components/logo.d.ts +8 -0
- package/dist/ui/components/logo.d.ts.map +1 -0
- package/dist/ui/components/logo.js +67 -0
- package/dist/ui/components/switch.cjs +81 -0
- package/dist/ui/components/switch.css +135 -0
- package/dist/ui/components/switch.d.ts +25 -0
- package/dist/ui/components/switch.d.ts.map +1 -0
- package/dist/ui/components/switch.js +47 -0
- package/dist/ui/libs/cn.cjs +55 -0
- package/dist/ui/libs/cn.d.ts +11 -0
- package/dist/ui/libs/cn.d.ts.map +1 -0
- package/dist/ui/libs/cn.js +6 -0
- package/dist/ui/libs/polymorphic.cjs +19 -0
- package/dist/ui/libs/polymorphic.d.ts +15 -0
- package/dist/ui/libs/polymorphic.d.ts.map +1 -0
- package/dist/ui/libs/polymorphic.js +0 -0
- package/dist/ui/libs/recursive-clone-children.cjs +49 -0
- package/dist/ui/libs/recursive-clone-children.d.ts +14 -0
- package/dist/ui/libs/recursive-clone-children.d.ts.map +1 -0
- package/dist/ui/libs/recursive-clone-children.js +15 -0
- package/dist/ui/theme/context.cjs +6 -0
- package/dist/ui/theme/context.d.ts +2 -0
- package/dist/ui/theme/context.d.ts.map +1 -0
- package/dist/ui/theme/context.js +0 -0
- package/package.json +71 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = function(obj, prop) {
|
|
14
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.r = function(exports1) {
|
|
19
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
20
|
+
value: 'Module'
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
var __webpack_exports__ = {};
|
|
28
|
+
__webpack_require__.r(__webpack_exports__);
|
|
29
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
30
|
+
useStyles: ()=>useStyles
|
|
31
|
+
});
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const external_context_cjs_namespaceObject = require("./context.cjs");
|
|
34
|
+
const merge_styles_cjs_namespaceObject = require("./utils/merge-styles.cjs");
|
|
35
|
+
function useStyles(themeKey, componentStyle) {
|
|
36
|
+
const { noStyle: contextNoStyle, theme } = (0, external_context_cjs_namespaceObject.useThemeContext)();
|
|
37
|
+
const mergedNoStyle = 'object' == typeof componentStyle && 'noStyle' in componentStyle ? componentStyle.noStyle : contextNoStyle;
|
|
38
|
+
const themeStylesObject = (0, external_react_namespaceObject.useMemo)(()=>themeKey ? theme?.[themeKey] : null, [
|
|
39
|
+
themeKey,
|
|
40
|
+
theme
|
|
41
|
+
]);
|
|
42
|
+
const initialStyle = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
43
|
+
const initial = {
|
|
44
|
+
className: 'string' == typeof componentStyle ? componentStyle : componentStyle?.className,
|
|
45
|
+
style: void 0
|
|
46
|
+
};
|
|
47
|
+
return initial;
|
|
48
|
+
}, [
|
|
49
|
+
componentStyle
|
|
50
|
+
]);
|
|
51
|
+
const mergedWithContext = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
52
|
+
const merged = themeStylesObject ? (0, merge_styles_cjs_namespaceObject.mergeStyles)(initialStyle, themeStylesObject) : initialStyle;
|
|
53
|
+
return merged;
|
|
54
|
+
}, [
|
|
55
|
+
initialStyle,
|
|
56
|
+
themeStylesObject
|
|
57
|
+
]);
|
|
58
|
+
const finalMergedStyle = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
59
|
+
const final = componentStyle ? (0, merge_styles_cjs_namespaceObject.mergeStyles)(mergedWithContext, componentStyle) : mergedWithContext;
|
|
60
|
+
return final;
|
|
61
|
+
}, [
|
|
62
|
+
mergedWithContext,
|
|
63
|
+
componentStyle
|
|
64
|
+
]);
|
|
65
|
+
return (0, external_react_namespaceObject.useMemo)(()=>{
|
|
66
|
+
if (mergedNoStyle) {
|
|
67
|
+
if (!themeStylesObject) return {};
|
|
68
|
+
const noStyleResult = 'string' == typeof themeStylesObject ? {
|
|
69
|
+
className: themeStylesObject
|
|
70
|
+
} : {
|
|
71
|
+
className: themeStylesObject.className,
|
|
72
|
+
style: themeStylesObject.style
|
|
73
|
+
};
|
|
74
|
+
return noStyleResult;
|
|
75
|
+
}
|
|
76
|
+
const finalClassName = Array.from(new Set([
|
|
77
|
+
'string' == typeof componentStyle ? componentStyle : componentStyle?.className,
|
|
78
|
+
finalMergedStyle.className
|
|
79
|
+
].filter(Boolean).flat())).join(' ');
|
|
80
|
+
return {
|
|
81
|
+
...finalMergedStyle,
|
|
82
|
+
className: finalClassName
|
|
83
|
+
};
|
|
84
|
+
}, [
|
|
85
|
+
finalMergedStyle,
|
|
86
|
+
mergedNoStyle,
|
|
87
|
+
themeStylesObject,
|
|
88
|
+
componentStyle
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
var __webpack_export_target__ = exports;
|
|
92
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
93
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
94
|
+
value: true
|
|
95
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AllThemeKeys } from './types/style-keys';
|
|
2
|
+
import type { ClassNameStyle, ThemeValue } from './types/style-types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook for retrieving and merging styles from theme context and component props.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This hook manages the style resolution process by:
|
|
8
|
+
* - Retrieving styles from theme context
|
|
9
|
+
* - Merging with component-level styles
|
|
10
|
+
* - Handling style disabling through noStyle flags
|
|
11
|
+
* - Memoizing results for performance
|
|
12
|
+
*
|
|
13
|
+
* @param themeKey - The theme key to lookup styles
|
|
14
|
+
* @param componentStyle - Optional component-level styles to merge
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const MyComponent = () => {
|
|
19
|
+
* const styles = useStyles('cookie-banner.root', {
|
|
20
|
+
* className: 'custom-class',
|
|
21
|
+
* style: { backgroundColor: 'white' }
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* return <div {...styles} />;
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @returns An object containing merged className and style properties
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function useStyles(themeKey: AllThemeKeys, componentStyle?: ThemeValue): ClassNameStyle;
|
|
32
|
+
//# sourceMappingURL=use-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-style.d.ts","sourceRoot":"","sources":["../../src/theme/use-style.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,wBAAgB,SAAS,CACxB,QAAQ,EAAE,YAAY,EACtB,cAAc,CAAC,EAAE,UAAU,GACzB,cAAc,CA4EhB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__context_js_80e2871f__ from "./context.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_merge_styles_js_2f2d47eb__ from "./utils/merge-styles.js";
|
|
5
|
+
function useStyles(themeKey, componentStyle) {
|
|
6
|
+
const { noStyle: contextNoStyle, theme } = (0, __WEBPACK_EXTERNAL_MODULE__context_js_80e2871f__.useThemeContext)();
|
|
7
|
+
const mergedNoStyle = 'object' == typeof componentStyle && 'noStyle' in componentStyle ? componentStyle.noStyle : contextNoStyle;
|
|
8
|
+
const themeStylesObject = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>themeKey ? theme?.[themeKey] : null, [
|
|
9
|
+
themeKey,
|
|
10
|
+
theme
|
|
11
|
+
]);
|
|
12
|
+
const initialStyle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
13
|
+
const initial = {
|
|
14
|
+
className: 'string' == typeof componentStyle ? componentStyle : componentStyle?.className,
|
|
15
|
+
style: void 0
|
|
16
|
+
};
|
|
17
|
+
return initial;
|
|
18
|
+
}, [
|
|
19
|
+
componentStyle
|
|
20
|
+
]);
|
|
21
|
+
const mergedWithContext = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
22
|
+
const merged = themeStylesObject ? (0, __WEBPACK_EXTERNAL_MODULE__utils_merge_styles_js_2f2d47eb__.mergeStyles)(initialStyle, themeStylesObject) : initialStyle;
|
|
23
|
+
return merged;
|
|
24
|
+
}, [
|
|
25
|
+
initialStyle,
|
|
26
|
+
themeStylesObject
|
|
27
|
+
]);
|
|
28
|
+
const finalMergedStyle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
29
|
+
const final = componentStyle ? (0, __WEBPACK_EXTERNAL_MODULE__utils_merge_styles_js_2f2d47eb__.mergeStyles)(mergedWithContext, componentStyle) : mergedWithContext;
|
|
30
|
+
return final;
|
|
31
|
+
}, [
|
|
32
|
+
mergedWithContext,
|
|
33
|
+
componentStyle
|
|
34
|
+
]);
|
|
35
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
36
|
+
if (mergedNoStyle) {
|
|
37
|
+
if (!themeStylesObject) return {};
|
|
38
|
+
const noStyleResult = 'string' == typeof themeStylesObject ? {
|
|
39
|
+
className: themeStylesObject
|
|
40
|
+
} : {
|
|
41
|
+
className: themeStylesObject.className,
|
|
42
|
+
style: themeStylesObject.style
|
|
43
|
+
};
|
|
44
|
+
return noStyleResult;
|
|
45
|
+
}
|
|
46
|
+
const finalClassName = Array.from(new Set([
|
|
47
|
+
'string' == typeof componentStyle ? componentStyle : componentStyle?.className,
|
|
48
|
+
finalMergedStyle.className
|
|
49
|
+
].filter(Boolean).flat())).join(' ');
|
|
50
|
+
return {
|
|
51
|
+
...finalMergedStyle,
|
|
52
|
+
className: finalClassName
|
|
53
|
+
};
|
|
54
|
+
}, [
|
|
55
|
+
finalMergedStyle,
|
|
56
|
+
mergedNoStyle,
|
|
57
|
+
themeStylesObject,
|
|
58
|
+
componentStyle
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
export { useStyles };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
mergeStyles: ()=>mergeStyles
|
|
30
|
+
});
|
|
31
|
+
const cn_cjs_namespaceObject = require("../../ui/libs/cn.cjs");
|
|
32
|
+
function mergeStyles(style1, style2) {
|
|
33
|
+
const getThemeValue = (style)=>{
|
|
34
|
+
if ('string' == typeof style || void 0 === style) return style;
|
|
35
|
+
if ('className' in style || 'style' in style || 'noStyle' in style) return style;
|
|
36
|
+
};
|
|
37
|
+
const s1 = getThemeValue(Array.isArray(style1) ? style1[0] : style1);
|
|
38
|
+
const s2 = getThemeValue(style2);
|
|
39
|
+
if ('object' == typeof s1 && s1?.noStyle || 'object' == typeof s2 && s2?.noStyle) return {
|
|
40
|
+
className: void 0,
|
|
41
|
+
style: void 0
|
|
42
|
+
};
|
|
43
|
+
const className = (0, cn_cjs_namespaceObject.cnExt)([
|
|
44
|
+
'string' == typeof s1 ? s1 : s1?.className,
|
|
45
|
+
'string' == typeof s2 ? s2 : s2?.className,
|
|
46
|
+
'object' == typeof s1 && s1?.baseClassName,
|
|
47
|
+
'object' == typeof s2 && s2?.baseClassName
|
|
48
|
+
]);
|
|
49
|
+
const style = {
|
|
50
|
+
...'object' == typeof s1 && s1?.style,
|
|
51
|
+
...'object' == typeof s2 && s2?.style
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
className: className || void 0,
|
|
55
|
+
style: Object.keys(style).length > 0 ? style : void 0
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var __webpack_export_target__ = exports;
|
|
59
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
60
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
61
|
+
value: true
|
|
62
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-styles.d.ts","sourceRoot":"","sources":["../../../src/theme/utils/merge-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAGrD,wBAAgB,WAAW,CAC1B,MAAM,EAAE,UAAU,EAClB,MAAM,CAAC,EAAE,UAAU,GACjB,cAAc,CA2ChB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__ui_libs_cn_js_c64d687d__ from "../../ui/libs/cn.js";
|
|
2
|
+
function mergeStyles(style1, style2) {
|
|
3
|
+
const getThemeValue = (style)=>{
|
|
4
|
+
if ('string' == typeof style || void 0 === style) return style;
|
|
5
|
+
if ('className' in style || 'style' in style || 'noStyle' in style) return style;
|
|
6
|
+
};
|
|
7
|
+
const s1 = getThemeValue(Array.isArray(style1) ? style1[0] : style1);
|
|
8
|
+
const s2 = getThemeValue(style2);
|
|
9
|
+
if ('object' == typeof s1 && s1?.noStyle || 'object' == typeof s2 && s2?.noStyle) return {
|
|
10
|
+
className: void 0,
|
|
11
|
+
style: void 0
|
|
12
|
+
};
|
|
13
|
+
const className = (0, __WEBPACK_EXTERNAL_MODULE__ui_libs_cn_js_c64d687d__.cnExt)([
|
|
14
|
+
'string' == typeof s1 ? s1 : s1?.className,
|
|
15
|
+
'string' == typeof s2 ? s2 : s2?.className,
|
|
16
|
+
'object' == typeof s1 && s1?.baseClassName,
|
|
17
|
+
'object' == typeof s2 && s2?.baseClassName
|
|
18
|
+
]);
|
|
19
|
+
const style = {
|
|
20
|
+
...'object' == typeof s1 && s1?.style,
|
|
21
|
+
...'object' == typeof s2 && s2?.style
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
className: className || void 0,
|
|
25
|
+
style: Object.keys(style).length > 0 ? style : void 0
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export { mergeStyles };
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = function(obj, prop) {
|
|
14
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.r = function(exports1) {
|
|
19
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
20
|
+
value: 'Module'
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
var __webpack_exports__ = {};
|
|
28
|
+
__webpack_require__.r(__webpack_exports__);
|
|
29
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
30
|
+
Root: ()=>AccordionRoot,
|
|
31
|
+
Header: ()=>AccordionHeader,
|
|
32
|
+
Arrow: ()=>AccordionArrow,
|
|
33
|
+
Content: ()=>AccordionContent,
|
|
34
|
+
Icon: ()=>AccordionIcon,
|
|
35
|
+
Item: ()=>AccordionItem,
|
|
36
|
+
Trigger: ()=>AccordionTrigger
|
|
37
|
+
});
|
|
38
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
require("./accordion.css");
|
|
40
|
+
const react_accordion_namespaceObject = require("@radix-ui/react-accordion");
|
|
41
|
+
const external_react_namespaceObject = require("react");
|
|
42
|
+
const box_cjs_namespaceObject = require("../../primitives/box.cjs");
|
|
43
|
+
const index_cjs_namespaceObject = require("../../theme/index.cjs");
|
|
44
|
+
const external_icon_cjs_namespaceObject = require("./icon.cjs");
|
|
45
|
+
const ACCORDION_ROOT_NAME = 'AccordionRoot';
|
|
46
|
+
const ACCORDION_ITEM_NAME = 'AccordionItem';
|
|
47
|
+
const ACCORDION_ICON_NAME = 'AccordionIcon';
|
|
48
|
+
const ACCORDION_ARROW_NAME = 'AccordionArrow';
|
|
49
|
+
const ACCORDION_TRIGGER_NAME = 'AccordionTrigger';
|
|
50
|
+
const ACCORDION_CONTENT_NAME = 'AccordionContent';
|
|
51
|
+
const AccordionHeader = react_accordion_namespaceObject.Header;
|
|
52
|
+
const AccordionRoot = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ className, themeKey = 'accordion.root', baseClassName, noStyle, style, ...rest }, forwardedRef)=>{
|
|
53
|
+
const { noStyle: contextNoStyle } = (0, index_cjs_namespaceObject.useThemeContext)();
|
|
54
|
+
const accordionStyle = (0, index_cjs_namespaceObject.useStyles)(themeKey, {
|
|
55
|
+
baseClassName: [
|
|
56
|
+
baseClassName,
|
|
57
|
+
'c15t-accordion'
|
|
58
|
+
],
|
|
59
|
+
className,
|
|
60
|
+
noStyle: contextNoStyle || noStyle,
|
|
61
|
+
style
|
|
62
|
+
});
|
|
63
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Root, {
|
|
64
|
+
ref: forwardedRef,
|
|
65
|
+
...rest,
|
|
66
|
+
...accordionStyle
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
AccordionRoot.displayName = ACCORDION_ROOT_NAME;
|
|
70
|
+
const AccordionItem = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ className, themeKey, baseClassName, noStyle, style, ...rest }, forwardedRef)=>{
|
|
71
|
+
const { noStyle: contextNoStyle } = (0, index_cjs_namespaceObject.useThemeContext)();
|
|
72
|
+
const accordionItemStyle = (0, index_cjs_namespaceObject.useStyles)(themeKey ?? 'accordion.item', {
|
|
73
|
+
baseClassName: [
|
|
74
|
+
baseClassName,
|
|
75
|
+
'c15t-accordion-item'
|
|
76
|
+
],
|
|
77
|
+
className,
|
|
78
|
+
noStyle: contextNoStyle || noStyle,
|
|
79
|
+
style
|
|
80
|
+
});
|
|
81
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Item, {
|
|
82
|
+
ref: forwardedRef,
|
|
83
|
+
...rest,
|
|
84
|
+
...accordionItemStyle
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
AccordionItem.displayName = ACCORDION_ITEM_NAME;
|
|
88
|
+
const AccordionTrigger = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ children, className, themeKey, baseClassName, noStyle, style, ...rest }, forwardedRef)=>{
|
|
89
|
+
const { noStyle: contextNoStyle } = (0, index_cjs_namespaceObject.useThemeContext)();
|
|
90
|
+
const accordionTriggerStyle = (0, index_cjs_namespaceObject.useStyles)(themeKey ?? 'accordion.trigger-inner', {
|
|
91
|
+
baseClassName: [
|
|
92
|
+
baseClassName,
|
|
93
|
+
'c15t-accordion-trigger-inner'
|
|
94
|
+
],
|
|
95
|
+
className,
|
|
96
|
+
noStyle: contextNoStyle || noStyle,
|
|
97
|
+
style
|
|
98
|
+
});
|
|
99
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Trigger, {
|
|
100
|
+
ref: forwardedRef,
|
|
101
|
+
...rest,
|
|
102
|
+
...accordionTriggerStyle,
|
|
103
|
+
children: children
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
AccordionTrigger.displayName = ACCORDION_TRIGGER_NAME;
|
|
107
|
+
function AccordionIcon({ className, themeKey, baseClassName, noStyle, style, as, ...rest }) {
|
|
108
|
+
const accordionIconStyle = (0, index_cjs_namespaceObject.useStyles)(themeKey ?? 'accordion.icon', {
|
|
109
|
+
baseClassName: [
|
|
110
|
+
baseClassName,
|
|
111
|
+
'c15t-accordion-icon'
|
|
112
|
+
],
|
|
113
|
+
className,
|
|
114
|
+
noStyle,
|
|
115
|
+
style
|
|
116
|
+
});
|
|
117
|
+
const Component = as || 'div';
|
|
118
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {
|
|
119
|
+
...rest,
|
|
120
|
+
...accordionIconStyle
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
AccordionIcon.displayName = ACCORDION_ICON_NAME;
|
|
124
|
+
function AccordionArrow({ openIcon = {
|
|
125
|
+
Element: (0, external_icon_cjs_namespaceObject.LucideIcon)({
|
|
126
|
+
title: 'Open',
|
|
127
|
+
iconPath: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
128
|
+
d: "M5 12h14M12 5v14"
|
|
129
|
+
})
|
|
130
|
+
}),
|
|
131
|
+
themeKey: 'accordion.arrow.open'
|
|
132
|
+
}, closeIcon = {
|
|
133
|
+
Element: (0, external_icon_cjs_namespaceObject.LucideIcon)({
|
|
134
|
+
title: 'Close',
|
|
135
|
+
iconPath: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
|
|
136
|
+
d: "M5 12h14"
|
|
137
|
+
})
|
|
138
|
+
}),
|
|
139
|
+
themeKey: 'accordion.arrow.close'
|
|
140
|
+
}, ...rest }) {
|
|
141
|
+
const accordionArrowOpenStyle = (0, index_cjs_namespaceObject.useStyles)(openIcon.themeKey, {
|
|
142
|
+
baseClassName: [
|
|
143
|
+
openIcon.baseClassName,
|
|
144
|
+
'c15t-accordion-arrow-open'
|
|
145
|
+
],
|
|
146
|
+
className: openIcon.className,
|
|
147
|
+
noStyle: openIcon.noStyle,
|
|
148
|
+
style: openIcon.style
|
|
149
|
+
});
|
|
150
|
+
const accordionArrowClosedStyle = (0, index_cjs_namespaceObject.useStyles)(closeIcon.themeKey, {
|
|
151
|
+
baseClassName: [
|
|
152
|
+
closeIcon.baseClassName,
|
|
153
|
+
'c15t-accordion-arrow-close'
|
|
154
|
+
],
|
|
155
|
+
className: closeIcon.className,
|
|
156
|
+
noStyle: closeIcon.noStyle,
|
|
157
|
+
style: closeIcon.style
|
|
158
|
+
});
|
|
159
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
160
|
+
children: [
|
|
161
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(openIcon.Element, {
|
|
162
|
+
...rest,
|
|
163
|
+
...accordionArrowOpenStyle
|
|
164
|
+
}),
|
|
165
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(closeIcon.Element, {
|
|
166
|
+
...rest,
|
|
167
|
+
...accordionArrowClosedStyle
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
AccordionArrow.displayName = ACCORDION_ARROW_NAME;
|
|
173
|
+
const AccordionContent = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(({ children, className, theme, ...rest }, forwardedRef)=>{
|
|
174
|
+
const { noStyle: contextNoStyle } = (0, index_cjs_namespaceObject.useThemeContext)();
|
|
175
|
+
const accordionContentStyle = (0, index_cjs_namespaceObject.useStyles)(theme?.content?.themeKey ?? 'accordion.content', {
|
|
176
|
+
baseClassName: [
|
|
177
|
+
theme?.content?.baseClassName,
|
|
178
|
+
'c15t-accordion-content'
|
|
179
|
+
],
|
|
180
|
+
className,
|
|
181
|
+
noStyle: theme?.content?.noStyle || contextNoStyle,
|
|
182
|
+
style: theme?.content?.style
|
|
183
|
+
});
|
|
184
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_accordion_namespaceObject.Content, {
|
|
185
|
+
ref: forwardedRef,
|
|
186
|
+
...rest,
|
|
187
|
+
...accordionContentStyle,
|
|
188
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box, {
|
|
189
|
+
...theme?.contentInner,
|
|
190
|
+
baseClassName: [
|
|
191
|
+
theme?.content?.baseClassName,
|
|
192
|
+
'c15t-accordion-content-inner'
|
|
193
|
+
],
|
|
194
|
+
themeKey: theme?.contentInner?.themeKey ?? 'accordion.content-inner',
|
|
195
|
+
children: children
|
|
196
|
+
})
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
AccordionContent.displayName = ACCORDION_CONTENT_NAME;
|
|
200
|
+
var __webpack_export_target__ = exports;
|
|
201
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
202
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
203
|
+
value: true
|
|
204
|
+
});
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
.c15t-accordion {
|
|
2
|
+
--c15t-accordion-padding: .875rem;
|
|
3
|
+
--c15t-accordion-radius: .625rem;
|
|
4
|
+
--c15t-accordion-duration: .2s;
|
|
5
|
+
--c15t-accordion-ease: cubic-bezier(.4, 0, .2, 1);
|
|
6
|
+
--c15t-accordion-icon-size: 1.25rem;
|
|
7
|
+
--c15t-accordion-bg-default: #fff;
|
|
8
|
+
--c15t-accordion-bg-hover: #f7f7f7;
|
|
9
|
+
--c15t-accordion-border-color: #ebebeb;
|
|
10
|
+
--c15t-accordion-text-color: #171717;
|
|
11
|
+
--c15t-accordion-icon-color: #5c5c5c;
|
|
12
|
+
--c15t-accordion-arrow-color: #a3a3a3;
|
|
13
|
+
--c15t-accordion-content-color: #5c5c5c;
|
|
14
|
+
--c15t-accordion-focus-ring: #476cff;
|
|
15
|
+
|
|
16
|
+
& > :not([hidden]) ~ :not([hidden]) {
|
|
17
|
+
--c15t-space-y-reverse: 0;
|
|
18
|
+
margin-top: calc(1rem * calc(1 - var(--c15t-space-y-reverse)));
|
|
19
|
+
margin-bottom: calc(1rem * var(--c15t-space-y-reverse));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dark .c15t-accordion {
|
|
24
|
+
--c15t-accordion-bg-default: #171717;
|
|
25
|
+
--c15t-accordion-bg-hover: #1c1c1c;
|
|
26
|
+
--c15t-accordion-border-color: #333;
|
|
27
|
+
--c15t-accordion-text-color: #e6e6e6;
|
|
28
|
+
--c15t-accordion-icon-color: #999;
|
|
29
|
+
--c15t-accordion-arrow-color: #ccc;
|
|
30
|
+
--c15t-accordion-content-color: #999;
|
|
31
|
+
--c15t-accordion-focus-ring: #99aeff;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.c15t-accordion-item {
|
|
35
|
+
padding: var(--c15t-accordion-padding);
|
|
36
|
+
background-color: var(--c15t-accordion-bg-default);
|
|
37
|
+
box-shadow: inset 0 0 0 1px var(--c15t-accordion-border-color);
|
|
38
|
+
transition: all var(--c15t-accordion-duration) var(--c15t-accordion-ease);
|
|
39
|
+
border-radius: var(--c15t-accordion-radius);
|
|
40
|
+
position: relative;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.c15t-accordion-item:is(:hover, :focus-within, [data-state="open"]) {
|
|
44
|
+
background-color: var(--c15t-accordion-bg-hover);
|
|
45
|
+
box-shadow: inset 0 0 0 1px #0000;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.c15t-accordion-trigger-inner {
|
|
49
|
+
width: calc(100% + (var(--c15t-accordion-padding) * 2));
|
|
50
|
+
margin: calc(-1 * var(--c15t-accordion-padding));
|
|
51
|
+
padding: var(--c15t-accordion-padding);
|
|
52
|
+
letter-spacing: -.006em;
|
|
53
|
+
text-align: left;
|
|
54
|
+
color: var(--c15t-accordion-text-color);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
background: none;
|
|
57
|
+
border: 0;
|
|
58
|
+
grid-template-columns: auto 1fr;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: .625rem;
|
|
61
|
+
font-size: .875rem;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
line-height: 1.25rem;
|
|
64
|
+
display: grid;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.c15t-accordion-trigger:focus-visible {
|
|
68
|
+
outline: 2px solid var(--c15t-accordion-focus-ring);
|
|
69
|
+
outline-offset: -2px;
|
|
70
|
+
border-radius: calc(var(--c15t-accordion-radius) - 2px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.c15t-accordion-icon {
|
|
74
|
+
width: var(--c15t-accordion-icon-size);
|
|
75
|
+
height: var(--c15t-accordion-icon-size);
|
|
76
|
+
color: var(--c15t-accordion-icon-color);
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.c15t-accordion-arrow-open, .c15t-accordion-arrow-close {
|
|
81
|
+
width: var(--c15t-accordion-icon-size);
|
|
82
|
+
height: var(--c15t-accordion-icon-size);
|
|
83
|
+
transition: color var(--c15t-accordion-duration) var(--c15t-accordion-ease);
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.c15t-accordion-arrow-open {
|
|
88
|
+
color: var(--c15t-accordion-arrow-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.c15t-accordion-item:hover .c15t-accordion-arrow-open {
|
|
92
|
+
color: var(--c15t-accordion-icon-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.c15t-accordion-arrow-close {
|
|
96
|
+
color: var(--c15t-accordion-icon-color);
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.c15t-accordion-item[data-state="open"] .c15t-accordion-arrow-open {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.c15t-accordion-item[data-state="open"] .c15t-accordion-arrow-close {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.c15t-accordion-content {
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes c15t-accordion-down {
|
|
113
|
+
from {
|
|
114
|
+
opacity: 0;
|
|
115
|
+
height: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
to {
|
|
119
|
+
height: var(--radix-accordion-content-height);
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes c15t-accordion-up {
|
|
125
|
+
from {
|
|
126
|
+
height: var(--radix-accordion-content-height);
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
to {
|
|
131
|
+
opacity: 0;
|
|
132
|
+
height: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.c15t-accordion-content[data-state="open"] {
|
|
137
|
+
animation: c15t-accordion-down var(--c15t-accordion-duration) var(--c15t-accordion-ease);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.c15t-accordion-content[data-state="closed"] {
|
|
141
|
+
animation: c15t-accordion-up var(--c15t-accordion-duration) var(--c15t-accordion-ease);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.c15t-accordion-content-inner {
|
|
145
|
+
letter-spacing: -.006em;
|
|
146
|
+
color: var(--c15t-accordion-content-color);
|
|
147
|
+
padding-top: .375rem;
|
|
148
|
+
font-size: .875rem;
|
|
149
|
+
line-height: 1.25rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.c15t-accordion-trigger {
|
|
153
|
+
justify-content: space-between;
|
|
154
|
+
align-items: center;
|
|
155
|
+
display: flex;
|
|
156
|
+
position: relative;
|
|
157
|
+
}
|
|
158
|
+
|