@cck-ui/core 0.19.0 → 0.20.1
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/cjs/components/action-icon/action-icon-group/action-icon-group.cjs +7 -4
- package/cjs/components/action-icon/action-icon-group/action-icon-group.cjs.map +1 -1
- package/cjs/components/action-icon/action-icon-group-section/action-icon-group-section.cjs +8 -6
- package/cjs/components/action-icon/action-icon-group-section/action-icon-group-section.cjs.map +1 -1
- package/cjs/components/action-icon/action-icon.cjs +7 -4
- package/cjs/components/action-icon/action-icon.cjs.map +1 -1
- package/cjs/components/alert/alert.cjs +7 -4
- package/cjs/components/alert/alert.cjs.map +1 -1
- package/cjs/components/aspect-ratio/aspect-ratio.cjs +7 -4
- package/cjs/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
- package/cjs/components/button/button-group/button-group.cjs +7 -4
- package/cjs/components/button/button-group/button-group.cjs.map +1 -1
- package/cjs/components/button/button-group-section/button-group-section.cjs +7 -4
- package/cjs/components/button/button-group-section/button-group-section.cjs.map +1 -1
- package/cjs/components/button/button.cjs +7 -4
- package/cjs/components/button/button.cjs.map +1 -1
- package/cjs/components/center/center.cjs +7 -4
- package/cjs/components/center/center.cjs.map +1 -1
- package/cjs/components/close-button/close-button.cjs +7 -4
- package/cjs/components/close-button/close-button.cjs.map +1 -1
- package/cjs/components/container/container.cjs +7 -4
- package/cjs/components/container/container.cjs.map +1 -1
- package/cjs/components/copy-button/copy-button.cjs +59 -0
- package/cjs/components/copy-button/copy-button.cjs.map +1 -0
- package/cjs/components/copy-button/index.cjs +10 -0
- package/cjs/components/copy-button/index.cjs.map +1 -0
- package/cjs/components/empty-state/empty-state.cjs +7 -4
- package/cjs/components/empty-state/empty-state.cjs.map +1 -1
- package/cjs/components/flex/flex.cjs +7 -4
- package/cjs/components/flex/flex.cjs.map +1 -1
- package/cjs/components/grid/grid.cjs +7 -4
- package/cjs/components/grid/grid.cjs.map +1 -1
- package/cjs/components/group/group.cjs +7 -4
- package/cjs/components/group/group.cjs.map +1 -1
- package/cjs/components/image/image.cjs +7 -4
- package/cjs/components/image/image.cjs.map +1 -1
- package/cjs/components/loader/loader.cjs +7 -4
- package/cjs/components/loader/loader.cjs.map +1 -1
- package/cjs/components/paper/paper.cjs +7 -4
- package/cjs/components/paper/paper.cjs.map +1 -1
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs +7 -4
- package/cjs/components/semi-circle-progress/semi-circle-progress.cjs.map +1 -1
- package/cjs/components/simple-grid/simple-grid.cjs +7 -4
- package/cjs/components/simple-grid/simple-grid.cjs.map +1 -1
- package/cjs/components/skeleton/skeleton.cjs +8 -4
- package/cjs/components/skeleton/skeleton.cjs.map +1 -1
- package/cjs/components/space/space.cjs +7 -4
- package/cjs/components/space/space.cjs.map +1 -1
- package/cjs/components/splitter/splitter.cjs +7 -4
- package/cjs/components/splitter/splitter.cjs.map +1 -1
- package/cjs/components/stack/stack.cjs +7 -4
- package/cjs/components/stack/stack.cjs.map +1 -1
- package/cjs/components/text/text.cjs +7 -4
- package/cjs/components/text/text.cjs.map +1 -1
- package/cjs/components/unstyled-button/unstyled-button.cjs +7 -4
- package/cjs/components/unstyled-button/unstyled-button.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/use-styles.cjs +75 -70
- package/cjs/core/styles-api/use-styles/use-styles.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/use-transformed-styles.cjs +7 -4
- package/cjs/core/styles-api/use-styles/use-transformed-styles.cjs.map +1 -1
- package/cjs/index.cjs +54 -51
- package/cjs/index.cjs.map +1 -1
- package/esm/components/action-icon/action-icon-group/action-icon-group.mjs +7 -4
- package/esm/components/action-icon/action-icon-group/action-icon-group.mjs.map +1 -1
- package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs +8 -6
- package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs.map +1 -1
- package/esm/components/action-icon/action-icon.mjs +7 -4
- package/esm/components/action-icon/action-icon.mjs.map +1 -1
- package/esm/components/alert/alert.mjs +7 -4
- package/esm/components/alert/alert.mjs.map +1 -1
- package/esm/components/aspect-ratio/aspect-ratio.mjs +7 -4
- package/esm/components/aspect-ratio/aspect-ratio.mjs.map +1 -1
- package/esm/components/button/button-group/button-group.mjs +7 -4
- package/esm/components/button/button-group/button-group.mjs.map +1 -1
- package/esm/components/button/button-group-section/button-group-section.mjs +7 -4
- package/esm/components/button/button-group-section/button-group-section.mjs.map +1 -1
- package/esm/components/button/button.mjs +7 -4
- package/esm/components/button/button.mjs.map +1 -1
- package/esm/components/center/center.mjs +7 -4
- package/esm/components/center/center.mjs.map +1 -1
- package/esm/components/close-button/close-button.mjs +7 -4
- package/esm/components/close-button/close-button.mjs.map +1 -1
- package/esm/components/container/container.mjs +7 -4
- package/esm/components/container/container.mjs.map +1 -1
- package/esm/components/copy-button/copy-button.mjs +59 -0
- package/esm/components/copy-button/copy-button.mjs.map +1 -0
- package/esm/components/copy-button/index.mjs +9 -0
- package/esm/components/copy-button/index.mjs.map +1 -0
- package/esm/components/empty-state/empty-state.mjs +7 -4
- package/esm/components/empty-state/empty-state.mjs.map +1 -1
- package/esm/components/flex/flex.mjs +7 -4
- package/esm/components/flex/flex.mjs.map +1 -1
- package/esm/components/grid/grid.mjs +7 -4
- package/esm/components/grid/grid.mjs.map +1 -1
- package/esm/components/group/group.mjs +7 -4
- package/esm/components/group/group.mjs.map +1 -1
- package/esm/components/image/image.mjs +7 -4
- package/esm/components/image/image.mjs.map +1 -1
- package/esm/components/loader/loader.mjs +7 -4
- package/esm/components/loader/loader.mjs.map +1 -1
- package/esm/components/paper/paper.mjs +7 -4
- package/esm/components/paper/paper.mjs.map +1 -1
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs +7 -4
- package/esm/components/semi-circle-progress/semi-circle-progress.mjs.map +1 -1
- package/esm/components/simple-grid/simple-grid.mjs +7 -4
- package/esm/components/simple-grid/simple-grid.mjs.map +1 -1
- package/esm/components/skeleton/skeleton.mjs +8 -4
- package/esm/components/skeleton/skeleton.mjs.map +1 -1
- package/esm/components/space/space.mjs +7 -4
- package/esm/components/space/space.mjs.map +1 -1
- package/esm/components/splitter/splitter.mjs +7 -4
- package/esm/components/splitter/splitter.mjs.map +1 -1
- package/esm/components/stack/stack.mjs +7 -4
- package/esm/components/stack/stack.mjs.map +1 -1
- package/esm/components/text/text.mjs +7 -4
- package/esm/components/text/text.mjs.map +1 -1
- package/esm/components/unstyled-button/unstyled-button.mjs +7 -4
- package/esm/components/unstyled-button/unstyled-button.mjs.map +1 -1
- package/esm/core/styles-api/use-styles/use-styles.mjs +75 -70
- package/esm/core/styles-api/use-styles/use-styles.mjs.map +1 -1
- package/esm/core/styles-api/use-styles/use-transformed-styles.mjs +7 -4
- package/esm/core/styles-api/use-styles/use-transformed-styles.mjs.map +1 -1
- package/esm/index.mjs +3 -1
- package/esm/index.mjs.map +1 -1
- package/lib/components/copy-button/copy-button.types.d.ts +11 -0
- package/lib/components/copy-button/index.d.ts +3 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/core/styles-api/use-styles/use-styles.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
const require_config_provider_context = require("../../config-provider/config-provider.context.cjs");
|
|
3
|
+
let vue = require("vue");
|
|
3
4
|
//#region packages/@cck-ui/core/src/core/styles-api/use-styles/use-transformed-styles.ts
|
|
4
5
|
function useStylesTransform({ props, stylesCtx, themeName, theme }) {
|
|
5
6
|
const stylesTransform = require_config_provider_context.useCckStylesTransform()?.();
|
|
6
7
|
const getTransformedStyles = (styles) => {
|
|
7
8
|
if (!stylesTransform) return [];
|
|
9
|
+
const currentProps = (0, vue.toValue)(props);
|
|
10
|
+
const currentCtx = (0, vue.toValue)(stylesCtx);
|
|
8
11
|
return [...styles.map((style) => stylesTransform(style, {
|
|
9
|
-
props,
|
|
12
|
+
props: currentProps,
|
|
10
13
|
theme,
|
|
11
|
-
ctx:
|
|
14
|
+
ctx: currentCtx
|
|
12
15
|
})), ...themeName.map((n) => stylesTransform(theme.components[n]?.styles, {
|
|
13
|
-
props,
|
|
16
|
+
props: currentProps,
|
|
14
17
|
theme,
|
|
15
|
-
ctx:
|
|
18
|
+
ctx: currentCtx
|
|
16
19
|
}))].filter(Boolean);
|
|
17
20
|
};
|
|
18
21
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-transformed-styles.cjs","names":["useCckStylesTransform"],"sources":["../../../../src/core/styles-api/use-styles/use-transformed-styles.ts"],"sourcesContent":["import { CTheme, useCckStylesTransform } from '../../config-provider'\n\ninterface UseTransformedStylesInput {\n props: Record<string, any>\n stylesCtx: Record<string, any> | undefined\n themeName: string[]\n theme: CTheme\n}\n\nexport function useStylesTransform({\n props,\n stylesCtx,\n themeName,\n theme,\n}: UseTransformedStylesInput) {\n const stylesTransform = useCckStylesTransform()?.()\n\n const getTransformedStyles = (styles: any[]) => {\n if (!stylesTransform) {\n return []\n }\n\n const transformedStyles = styles.map((style) =>\n stylesTransform(style, { props, theme, ctx:
|
|
1
|
+
{"version":3,"file":"use-transformed-styles.cjs","names":["useCckStylesTransform"],"sources":["../../../../src/core/styles-api/use-styles/use-transformed-styles.ts"],"sourcesContent":["import { toValue } from 'vue'\nimport { CTheme, useCckStylesTransform } from '../../config-provider'\n\ninterface UseTransformedStylesInput {\n props: Record<string, any>\n stylesCtx: Record<string, any> | undefined\n themeName: string[]\n theme: CTheme\n}\n\nexport function useStylesTransform({\n props,\n stylesCtx,\n themeName,\n theme,\n}: UseTransformedStylesInput) {\n const stylesTransform = useCckStylesTransform()?.()\n\n const getTransformedStyles = (styles: any[]) => {\n if (!stylesTransform) {\n return []\n }\n\n const currentProps = toValue(props)\n const currentCtx = toValue(stylesCtx)\n\n const transformedStyles = styles.map((style) =>\n stylesTransform(style, { props: currentProps, theme, ctx: currentCtx })\n )\n\n return [\n ...transformedStyles,\n ...themeName.map((n) =>\n stylesTransform(theme.components[n]?.styles, {\n props: currentProps,\n theme,\n ctx: currentCtx,\n })\n ),\n ].filter(Boolean) as Record<string, string>[]\n }\n\n return {\n getTransformedStyles,\n withStylesTransform: !!stylesTransform,\n }\n}\n"],"mappings":";;;;AAUA,SAAgB,mBAAmB,EACjC,OACA,WACA,WACA,SAC4B;CAC5B,MAAM,kBAAkBA,gCAAAA,sBAAsB,CAAC,GAAG;CAElD,MAAM,wBAAwB,WAAkB;EAC9C,IAAI,CAAC,iBACH,OAAO,CAAC;EAGV,MAAM,gBAAA,GAAA,IAAA,QAAA,CAAuB,KAAK;EAClC,MAAM,cAAA,GAAA,IAAA,QAAA,CAAqB,SAAS;EAMpC,OAAO,CACL,GALwB,OAAO,KAAK,UACpC,gBAAgB,OAAO;GAAE,OAAO;GAAc;GAAO,KAAK;EAAW,CAAC,CAInD,GACnB,GAAG,UAAU,KAAK,MAChB,gBAAgB,MAAM,WAAW,EAAE,EAAE,QAAQ;GAC3C,OAAO;GACP;GACA,KAAK;EACP,CAAC,CACH,CACF,CAAC,CAAC,OAAO,OAAO;CAClB;CAEA,OAAO;EACL;EACA,qBAAqB,CAAC,CAAC;CACzB;AACF"}
|
package/cjs/index.cjs
CHANGED
|
@@ -66,19 +66,20 @@ const require_index$9 = require("./components/aspect-ratio/index.cjs");
|
|
|
66
66
|
const require_index$10 = require("./components/button/index.cjs");
|
|
67
67
|
const require_index$11 = require("./components/center/index.cjs");
|
|
68
68
|
const require_index$12 = require("./components/container/index.cjs");
|
|
69
|
-
const require_index$13 = require("./components/
|
|
70
|
-
const require_index$14 = require("./components/
|
|
71
|
-
const require_index$15 = require("./components/
|
|
72
|
-
const require_index$16 = require("./components/
|
|
73
|
-
const require_index$17 = require("./components/
|
|
74
|
-
const require_index$18 = require("./components/
|
|
75
|
-
const require_index$19 = require("./components/
|
|
76
|
-
const require_index$20 = require("./components/
|
|
77
|
-
const require_index$21 = require("./components/
|
|
78
|
-
const require_index$22 = require("./components/
|
|
79
|
-
const require_index$23 = require("./components/
|
|
80
|
-
const require_index$24 = require("./components/
|
|
81
|
-
const require_index$25 = require("./components/
|
|
69
|
+
const require_index$13 = require("./components/copy-button/index.cjs");
|
|
70
|
+
const require_index$14 = require("./components/empty-state/index.cjs");
|
|
71
|
+
const require_index$15 = require("./components/flex/index.cjs");
|
|
72
|
+
const require_index$16 = require("./components/grid/index.cjs");
|
|
73
|
+
const require_index$17 = require("./components/group/index.cjs");
|
|
74
|
+
const require_index$18 = require("./components/image/index.cjs");
|
|
75
|
+
const require_index$19 = require("./components/paper/index.cjs");
|
|
76
|
+
const require_index$20 = require("./components/semi-circle-progress/index.cjs");
|
|
77
|
+
const require_index$21 = require("./components/simple-grid/index.cjs");
|
|
78
|
+
const require_index$22 = require("./components/skeleton/index.cjs");
|
|
79
|
+
const require_index$23 = require("./components/space/index.cjs");
|
|
80
|
+
const require_index$24 = require("./components/splitter/index.cjs");
|
|
81
|
+
const require_index$25 = require("./components/stack/index.cjs");
|
|
82
|
+
const require_index$26 = require("./components/text/index.cjs");
|
|
82
83
|
let _vue_shared = require("@vue/shared");
|
|
83
84
|
//#region packages/@cck-ui/core/src/index.ts
|
|
84
85
|
const INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
@@ -95,27 +96,28 @@ const components = [
|
|
|
95
96
|
require_index$10.CButtonGroupSection,
|
|
96
97
|
require_index$11.CCenter,
|
|
97
98
|
require_index$7.CCloseButton,
|
|
98
|
-
require_index$
|
|
99
|
+
require_index$16.CCol,
|
|
99
100
|
require_index$12.CContainer,
|
|
100
|
-
require_index$13.
|
|
101
|
-
require_index$
|
|
102
|
-
require_index$
|
|
103
|
-
require_index$
|
|
104
|
-
require_index$
|
|
105
|
-
require_index$14.
|
|
106
|
-
require_index$15.
|
|
107
|
-
require_index$16.
|
|
108
|
-
require_index$17.
|
|
101
|
+
require_index$13.CCopyButton,
|
|
102
|
+
require_index$14.CEmptyState,
|
|
103
|
+
require_index$14.CEmptyStateActions,
|
|
104
|
+
require_index$14.CEmptyStateDescription,
|
|
105
|
+
require_index$14.CEmptyStateIndicator,
|
|
106
|
+
require_index$14.CEmptyStateTitle,
|
|
107
|
+
require_index$15.CFlex,
|
|
108
|
+
require_index$16.CGrid,
|
|
109
|
+
require_index$17.CGroup,
|
|
110
|
+
require_index$18.CImage,
|
|
109
111
|
require_index$4.CLoader,
|
|
110
|
-
require_index$
|
|
111
|
-
require_index$
|
|
112
|
-
require_index$
|
|
113
|
-
require_index$
|
|
114
|
-
require_index$
|
|
115
|
-
require_index$
|
|
116
|
-
require_index$
|
|
117
|
-
require_index$
|
|
118
|
-
require_index$
|
|
112
|
+
require_index$19.CPaper,
|
|
113
|
+
require_index$20.CSemiCircleProgress,
|
|
114
|
+
require_index$21.CSimpleGrid,
|
|
115
|
+
require_index$22.CSkeleton,
|
|
116
|
+
require_index$23.CSpace,
|
|
117
|
+
require_index$24.CSplitter,
|
|
118
|
+
require_index$24.CSplitterPane,
|
|
119
|
+
require_index$25.CStack,
|
|
120
|
+
require_index$26.CText,
|
|
119
121
|
require_index$5.CTransition,
|
|
120
122
|
require_index$3.UnstyledButton
|
|
121
123
|
];
|
|
@@ -139,29 +141,30 @@ exports.CButtonGroupSection = require_index$10.CButtonGroupSection;
|
|
|
139
141
|
exports.CCK_TRANSITIONS = require_transitions.transitions;
|
|
140
142
|
exports.CCenter = require_index$11.CCenter;
|
|
141
143
|
exports.CCloseButton = require_index$7.CCloseButton;
|
|
142
|
-
exports.CCol = require_index$
|
|
144
|
+
exports.CCol = require_index$16.CCol;
|
|
143
145
|
exports.CContainer = require_index$12.CContainer;
|
|
146
|
+
exports.CCopyButton = require_index$13.CCopyButton;
|
|
144
147
|
exports.CDefaultLoaders = require_index$4.CDefaultLoaders;
|
|
145
|
-
exports.CEmptyState = require_index$
|
|
146
|
-
exports.CEmptyStateActions = require_index$
|
|
147
|
-
exports.CEmptyStateDescription = require_index$
|
|
148
|
-
exports.CEmptyStateIndicator = require_index$
|
|
149
|
-
exports.CEmptyStateTitle = require_index$
|
|
150
|
-
exports.CFlex = require_index$
|
|
151
|
-
exports.CGrid = require_index$
|
|
152
|
-
exports.CGroup = require_index$
|
|
153
|
-
exports.CImage = require_index$
|
|
148
|
+
exports.CEmptyState = require_index$14.CEmptyState;
|
|
149
|
+
exports.CEmptyStateActions = require_index$14.CEmptyStateActions;
|
|
150
|
+
exports.CEmptyStateDescription = require_index$14.CEmptyStateDescription;
|
|
151
|
+
exports.CEmptyStateIndicator = require_index$14.CEmptyStateIndicator;
|
|
152
|
+
exports.CEmptyStateTitle = require_index$14.CEmptyStateTitle;
|
|
153
|
+
exports.CFlex = require_index$15.CFlex;
|
|
154
|
+
exports.CGrid = require_index$16.CGrid;
|
|
155
|
+
exports.CGroup = require_index$17.CGroup;
|
|
156
|
+
exports.CImage = require_index$18.CImage;
|
|
154
157
|
exports.CLoader = require_index$4.CLoader;
|
|
155
158
|
exports.CONFIG_KEY = require_config_provider_types.CONFIG_KEY;
|
|
156
|
-
exports.CPaper = require_index$
|
|
157
|
-
exports.CSemiCircleProgress = require_index$
|
|
158
|
-
exports.CSimpleGrid = require_index$
|
|
159
|
-
exports.CSkeleton = require_index$
|
|
160
|
-
exports.CSpace = require_index$
|
|
161
|
-
exports.CSplitter = require_index$
|
|
162
|
-
exports.CSplitterPane = require_index$
|
|
163
|
-
exports.CStack = require_index$
|
|
164
|
-
exports.CText = require_index$
|
|
159
|
+
exports.CPaper = require_index$19.CPaper;
|
|
160
|
+
exports.CSemiCircleProgress = require_index$20.CSemiCircleProgress;
|
|
161
|
+
exports.CSimpleGrid = require_index$21.CSimpleGrid;
|
|
162
|
+
exports.CSkeleton = require_index$22.CSkeleton;
|
|
163
|
+
exports.CSpace = require_index$23.CSpace;
|
|
164
|
+
exports.CSplitter = require_index$24.CSplitter;
|
|
165
|
+
exports.CSplitterPane = require_index$24.CSplitterPane;
|
|
166
|
+
exports.CStack = require_index$25.CStack;
|
|
167
|
+
exports.CText = require_index$26.CText;
|
|
165
168
|
exports.CTransition = require_index$5.CTransition;
|
|
166
169
|
exports.CckConfigProvider = require_index$1.CckConfigProvider;
|
|
167
170
|
exports.CckUI = CckUI;
|
package/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["CckConfigProvider","CBox","CActionIcon","CActionIconGroup","CActionIconGroupSection","CAlert","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCloseButton","CCol","CContainer","CEmptyState","CEmptyStateActions","CEmptyStateDescription","CEmptyStateIndicator","CEmptyStateTitle","CFlex","CGrid","CGroup","CImage","CLoader","CPaper","CSemiCircleProgress","CSimpleGrid","CSkeleton","CSpace","CSplitter","CSplitterPane","CStack","CText","CTransition","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["CckConfigProvider","CBox","CActionIcon","CActionIconGroup","CActionIconGroupSection","CAlert","CAspectRatio","CButton","CButtonGroup","CButtonGroupSection","CCenter","CCloseButton","CCol","CContainer","CCopyButton","CEmptyState","CEmptyStateActions","CEmptyStateDescription","CEmptyStateIndicator","CEmptyStateTitle","CFlex","CGrid","CGroup","CImage","CLoader","CPaper","CSemiCircleProgress","CSimpleGrid","CSkeleton","CSpace","CSplitter","CSplitterPane","CStack","CText","CTransition","UnstyledButton"],"sources":["../src/index.ts"],"sourcesContent":["import type { App, Plugin } from 'vue'\nimport {\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n} from './components'\nimport { CckConfigProvider, CBox } from './core'\n\nconst INSTALLED_KEY = Symbol('INSTALLED_KEY')\n\nconst components = [\n CckConfigProvider,\n CBox,\n CActionIcon,\n CActionIconGroup,\n CActionIconGroupSection,\n CAlert,\n CAspectRatio,\n CButton,\n CButtonGroup,\n CButtonGroupSection,\n CCenter,\n CCloseButton,\n CCol,\n CContainer,\n CCopyButton,\n CEmptyState,\n CEmptyStateActions,\n CEmptyStateDescription,\n CEmptyStateIndicator,\n CEmptyStateTitle,\n CFlex,\n CGrid,\n CGroup,\n CImage,\n CLoader,\n CPaper,\n CSemiCircleProgress,\n CSimpleGrid,\n CSkeleton,\n CSpace,\n CSplitter,\n CSplitterPane,\n CStack,\n CText,\n CTransition,\n UnstyledButton,\n]\n\nconst CckUI: Plugin = {\n install(app: App) {\n if ((app as any)[INSTALLED_KEY]) {\n return\n }\n ;(app as any)[INSTALLED_KEY] = true\n components.forEach((c) => {\n if (c.name) {\n app.component(c.name, c)\n }\n })\n },\n}\n\nexport default CckUI\nexport { CckUI }\n\nexport * from './components'\nexport * from './core'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,aAAa;CACjBA,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,iBAAAA;CACAC,gBAAAA;CACAC,gBAAAA;AACF;AAEA,MAAM,QAAgB,EACpB,QAAQ,KAAU;CAChB,IAAK,IAAY,gBACf;CAED,IAAa,iBAAiB;CAC/B,WAAW,SAAS,MAAM;EACxB,IAAI,EAAE,MACJ,IAAI,UAAU,EAAE,MAAM,CAAC;CAE3B,CAAC;AACH,EACF"}
|
|
@@ -331,12 +331,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
331
331
|
"mod",
|
|
332
332
|
"attributes"
|
|
333
333
|
];
|
|
334
|
+
const styleProps = computed(() => ({
|
|
335
|
+
...props.value,
|
|
336
|
+
...attrs,
|
|
337
|
+
style: attrs.style ?? props.value.style
|
|
338
|
+
}));
|
|
334
339
|
const getStyles = useStyles({
|
|
335
340
|
name: "ActionIconGroup",
|
|
336
|
-
props:
|
|
337
|
-
...props.value,
|
|
338
|
-
...attrs
|
|
339
|
-
},
|
|
341
|
+
props: styleProps,
|
|
340
342
|
classes: action_icon_module_default,
|
|
341
343
|
className: props.value.className,
|
|
342
344
|
style: props.value.style,
|
|
@@ -370,6 +372,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
370
372
|
defaultProps,
|
|
371
373
|
props,
|
|
372
374
|
knownProps,
|
|
375
|
+
styleProps,
|
|
373
376
|
getStyles,
|
|
374
377
|
modList,
|
|
375
378
|
groupAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-icon-group.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group/action-icon-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport { ActionIconGroupFactory, ActionIconGroupProps } from './action-icon-group.types'\nimport classes from '../action-icon.module.css'\nimport { varsResolver } from './action-icon-group.utils'\n\ndefineOptions({\n name: 'CActionIconGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupProps>()\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<ActionIconGroupProps>\n\nconst props = useComponentProps({\n component: 'CActionIconGroup',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ActionIconGroupFactory>({\n name: 'ActionIconGroup',\n props:
|
|
1
|
+
{"version":3,"file":"action-icon-group.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group/action-icon-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../../core'\nimport { ActionIconGroupFactory, ActionIconGroupProps } from './action-icon-group.types'\nimport classes from '../action-icon.module.css'\nimport { varsResolver } from './action-icon-group.utils'\n\ndefineOptions({\n name: 'CActionIconGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupProps>()\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<ActionIconGroupProps>\n\nconst props = useComponentProps({\n component: 'CActionIconGroup',\n defaultProps,\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ActionIconGroupFactory>({\n name: 'ActionIconGroup',\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n rootSelector: 'group',\n})\n\nconst modList = computed(() => [\n {\n orientation: props.value.orientation,\n },\n])\n\nconst groupAttrs = computed(() => getStyles('group'))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...groupAttrs.value }\n})\n\ndefineExpose({\n group: computed(() => _group.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,SAAS,IAAsC,IAAI;EAEzD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,eAAe,EACnB,aAAa,aACf;EAEA,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX;GACA,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAkC;GAClD,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;GACA,cAAc;EAChB,CAAC;EAED,MAAM,UAAU,eAAe,CAC7B,EACE,aAAa,MAAM,MAAM,YAC3B,CACF,CAAC;EAED,MAAM,aAAa,eAAe,UAAU,OAAO,CAAC;EACpD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,WAAW;GAAM;EAC1D,CAAC;EAED,SAAa,EACX,OAAO,eAAe,OAAO,OAAO,QAAQ,IAAI,EAClD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;qBA3FC,YAEQ,OAAA,SAFR,WAEQ;EAFD,KAAI;EAAS,MAAK;IAAgB,OAAA,WAAW,GAAA;yBAC1C,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -337,18 +337,19 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
337
337
|
"styles",
|
|
338
338
|
"unstyled",
|
|
339
339
|
"vars",
|
|
340
|
-
"variant",
|
|
341
340
|
"gradient",
|
|
342
341
|
"radius",
|
|
343
342
|
"autoContrast",
|
|
344
343
|
"attributes"
|
|
345
344
|
];
|
|
345
|
+
const styleProps = computed(() => ({
|
|
346
|
+
...props.value,
|
|
347
|
+
...attrs,
|
|
348
|
+
style: attrs.style ?? props.value.style
|
|
349
|
+
}));
|
|
346
350
|
const getStyles = useStyles({
|
|
347
351
|
name: "ActionIconGroupSection",
|
|
348
|
-
props:
|
|
349
|
-
...props.value,
|
|
350
|
-
...attrs
|
|
351
|
-
},
|
|
352
|
+
props: styleProps,
|
|
352
353
|
classes: action_icon_module_default,
|
|
353
354
|
className: props.value.className,
|
|
354
355
|
style: props.value.style,
|
|
@@ -364,7 +365,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
364
365
|
const mergedAttrs = computed(() => {
|
|
365
366
|
const others = {};
|
|
366
367
|
const propsValue = props.value;
|
|
367
|
-
for (const key in propsValue) others[key] = propsValue[key];
|
|
368
|
+
for (const key in propsValue) if (!knownProps.includes(key)) others[key] = propsValue[key];
|
|
368
369
|
const userMod = props.value.mod;
|
|
369
370
|
const mergedMod = [...Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)];
|
|
370
371
|
return {
|
|
@@ -380,6 +381,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
380
381
|
rawProps,
|
|
381
382
|
props,
|
|
382
383
|
knownProps,
|
|
384
|
+
styleProps,
|
|
383
385
|
getStyles,
|
|
384
386
|
sectionAttrs,
|
|
385
387
|
mergedAttrs,
|
package/esm/components/action-icon/action-icon-group-section/action-icon-group-section.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-icon-group-section.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group-section/action-icon-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport classes from '../action-icon.module.css'\nimport {\n ActionIconGroupSectionFactory,\n ActionIconGroupSectionProps,\n} from './action-icon-group-section.types'\nimport { varsResolver } from './action-icon-group-section.utils'\n\ndefineOptions({\n name: 'CActionIconGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CActionIconGroupSection',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n '
|
|
1
|
+
{"version":3,"file":"action-icon-group-section.mjs","names":[],"sources":["../../../../src/components/action-icon/action-icon-group-section/action-icon-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../../core'\nimport classes from '../action-icon.module.css'\nimport {\n ActionIconGroupSectionFactory,\n ActionIconGroupSectionProps,\n} from './action-icon-group-section.types'\nimport { varsResolver } from './action-icon-group-section.utils'\n\ndefineOptions({\n name: 'CActionIconGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CActionIconGroupSection',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ActionIconGroupSectionFactory>({\n name: 'ActionIconGroupSection',\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n rootSelector: 'groupSection',\n})\n\nconst sectionAttrs = computed(() => getStyles('groupSection'))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...sectionAttrs.value }\n})\n\ndefineExpose({\n section: computed(() => _section.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBA,MAAM,WAAW,IAAsC,IAAI;EAE3D,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAAyC;GACzD,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,OAAO,MAAM,MAAM;GACnB,YAAY,MAAM,MAAM;GACxB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;GACA,cAAc;EAChB,CAAC;EAED,MAAM,eAAe,eAAe,UAAU,cAAc,CAAC;EAC7D,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,KAAK,MAAM,OAAO,YAChB,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAG7B,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,aAAa;GAAM;EAC5D,CAAC;EAED,SAAa,EACX,SAAS,eAAe,SAAS,OAAO,QAAQ,IAAI,EACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAjFC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,WAAU,GAAS,OAAA,WAAW,GAAA;yBAC/B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -374,12 +374,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
374
374
|
"mod",
|
|
375
375
|
"attributes"
|
|
376
376
|
];
|
|
377
|
+
const styleProps = computed(() => ({
|
|
378
|
+
...props.value,
|
|
379
|
+
...attrs,
|
|
380
|
+
style: attrs.style ?? props.value.style
|
|
381
|
+
}));
|
|
377
382
|
const getStyles = useStyles({
|
|
378
383
|
name: ["ActionIcon", props.value.__staticSelector],
|
|
379
|
-
props:
|
|
380
|
-
...props.value,
|
|
381
|
-
...attrs
|
|
382
|
-
},
|
|
384
|
+
props: styleProps,
|
|
383
385
|
classes: action_icon_module_default,
|
|
384
386
|
className: props.value.className,
|
|
385
387
|
style: props.value.style,
|
|
@@ -415,6 +417,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
415
417
|
rawProps,
|
|
416
418
|
props,
|
|
417
419
|
knownProps,
|
|
420
|
+
styleProps,
|
|
418
421
|
getStyles,
|
|
419
422
|
modList,
|
|
420
423
|
rootAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-icon.mjs","names":[],"sources":["../../../src/components/action-icon/action-icon.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-busy=\"props.loading || undefined\"\n :disabled=\"props.disabled || props.loading\"\n :size=\"props.size\"\n :unstyled=\"props.unstyled\"\n >\n <c-transition\n transition=\"slide-down\"\n v-if=\"typeof props.loading === 'boolean'\"\n :duration=\"150\"\n :mounted=\"props.loading\"\n >\n <template #default=\"{ styles }\">\n <c-box\n aria-hidden=\"true\"\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n >\n <c-loader\n color=\"var(--ai-color)\"\n size=\"calc(var(--ai-size) * 0.55)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"getStyles('icon')\" :mod=\"{ loading: props.loading }\">\n <slot />\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport UnstyledButton from '../unstyled-button'\nimport { CLoader } from '../loader'\nimport { CTransition } from '../transition'\nimport { computed, ref, useAttrs } from 'vue'\nimport { ActionIconFactory, ActionIconProps } from './action-icon.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './action-icon.module.css'\nimport { varsResolver } from './action-icon.utils'\n\ndefineOptions({\n name: 'CActionIcon',\n})\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconProps>()\n\nconst props = useComponentProps({\n component: 'CActionIcon',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'loading',\n 'loaderProps',\n 'size',\n 'color',\n 'radius',\n '__staticSelector',\n 'gradient',\n 'vars',\n 'disabled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ActionIconFactory>({\n name: ['ActionIcon', props.value.__staticSelector],\n props:
|
|
1
|
+
{"version":3,"file":"action-icon.mjs","names":[],"sources":["../../../src/components/action-icon/action-icon.vue"],"sourcesContent":["<template>\n <unstyled-button\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-busy=\"props.loading || undefined\"\n :disabled=\"props.disabled || props.loading\"\n :size=\"props.size\"\n :unstyled=\"props.unstyled\"\n >\n <c-transition\n transition=\"slide-down\"\n v-if=\"typeof props.loading === 'boolean'\"\n :duration=\"150\"\n :mounted=\"props.loading\"\n >\n <template #default=\"{ styles }\">\n <c-box\n aria-hidden=\"true\"\n ref=\"_inner\"\n tag=\"span\"\n v-bind=\"getStyles('loader', { style: styles })\"\n >\n <c-loader\n color=\"var(--ai-color)\"\n size=\"calc(var(--ai-size) * 0.55)\"\n v-bind=\"props.loaderProps\"\n ></c-loader>\n </c-box>\n </template>\n </c-transition>\n\n <c-box tag=\"span\" v-bind=\"getStyles('icon')\" :mod=\"{ loading: props.loading }\">\n <slot />\n </c-box>\n </unstyled-button>\n</template>\n\n<script setup lang=\"ts\">\nimport UnstyledButton from '../unstyled-button'\nimport { CLoader } from '../loader'\nimport { CTransition } from '../transition'\nimport { computed, ref, useAttrs } from 'vue'\nimport { ActionIconFactory, ActionIconProps } from './action-icon.types'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './action-icon.module.css'\nimport { varsResolver } from './action-icon.utils'\n\ndefineOptions({\n name: 'CActionIcon',\n})\n\nconst _root = ref<InstanceType<typeof UnstyledButton> | null>(null)\nconst _inner = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ActionIconProps>()\n\nconst props = useComponentProps({\n component: 'CActionIcon',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'classNames',\n 'style',\n 'styles',\n 'unstyled',\n 'loading',\n 'loaderProps',\n 'size',\n 'color',\n 'radius',\n '__staticSelector',\n 'gradient',\n 'vars',\n 'disabled',\n 'dataDisabled',\n 'autoContrast',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ActionIconFactory>({\n name: ['ActionIcon', props.value.__staticSelector],\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst modList = computed(() => [\n { disabled: props.value.disabled || props.value.dataDisabled },\n { loading: props.value.loading },\n])\n\nconst rootAttrs = computed(() =>\n getStyles('root', {\n active: !props.value.disabled && !props.value.loading && !props.value.dataDisabled,\n })\n)\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n inner: computed(() => _inner.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAA,SAAa,OAAA,MAAM,QAAO,EAAA,CAAA,GAAA;0BACjE,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -355,12 +355,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
355
355
|
"role",
|
|
356
356
|
"attributes"
|
|
357
357
|
];
|
|
358
|
+
const styleProps = computed(() => ({
|
|
359
|
+
...props.value,
|
|
360
|
+
...attrs,
|
|
361
|
+
style: attrs.style ?? props.value.style
|
|
362
|
+
}));
|
|
358
363
|
const getStyles = useStyles({
|
|
359
364
|
name: "Alert",
|
|
360
|
-
props:
|
|
361
|
-
...props.value,
|
|
362
|
-
...attrs
|
|
363
|
-
},
|
|
365
|
+
props: styleProps,
|
|
364
366
|
classes: alert_module_default,
|
|
365
367
|
className: props.value.className,
|
|
366
368
|
style: props.value.style,
|
|
@@ -402,6 +404,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
402
404
|
rawProps,
|
|
403
405
|
props,
|
|
404
406
|
knownProps,
|
|
407
|
+
styleProps,
|
|
405
408
|
getStyles,
|
|
406
409
|
rootId,
|
|
407
410
|
titleId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-describedby=\"$slots.default ? bodyId : undefined\"\n :aria-labelledby=\"$slots.title ? titleId : undefined\"\n :id=\"rootId\"\n :role=\"props.role || 'alert'\"\n :variant=\"props.variant\"\n >\n <c-box v-bind=\"wrapperAttrs\">\n <c-box v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </c-box>\n\n <c-box v-bind=\"bodyAttrs\">\n <c-box\n v-bind=\"titleAttrs\"\n v-if=\"$slots.title\"\n :data-with-close-button=\"props.withCloseButton || undefined\"\n >\n <c-box tag=\"span\" :id=\"titleId\" v-bind=\"labelAttrs\">\n <slot name=\"title\" />\n </c-box>\n </c-box>\n\n <c-box\n v-bind=\"messageAttrs\"\n v-if=\"$slots.default\"\n :data-variant=\"props.variant\"\n :id=\"bodyId\"\n >\n <slot />\n </c-box>\n </c-box>\n\n <c-close-button\n v-bind=\"closeButtonAttrs\"\n v-if=\"props.withCloseButton\"\n :aria-label=\"closeButtonLabel\"\n :icon-size=\"16\"\n :size=\"16\"\n :unstyled=\"props.unstyled\"\n variant=\"transparent\"\n @click=\"props.onClose\"\n ></c-close-button>\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useId } from '@cck-ui/hooks'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './alert.module.css'\nimport { AlertFactory, type AlertProps } from './alert.types'\nimport { varsResolver } from './alert.utils'\nimport CCloseButton from '../close-button'\n\ndefineOptions({\n name: 'CAlert',\n})\n\nconst slots = defineSlots<{\n default: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AlertProps>()\n\nconst props = useComponentProps({\n component: 'CAlert',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'radius',\n 'color',\n 'id',\n 'withCloseButton',\n 'onClose',\n 'closeButtonLabel',\n 'variant',\n 'autoContrast',\n 'role',\n 'attributes',\n]\n\nconst getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n props:
|
|
1
|
+
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<template>\n <c-box\n ref=\"_root\"\n v-bind=\"mergedRootAttrs\"\n :aria-describedby=\"$slots.default ? bodyId : undefined\"\n :aria-labelledby=\"$slots.title ? titleId : undefined\"\n :id=\"rootId\"\n :role=\"props.role || 'alert'\"\n :variant=\"props.variant\"\n >\n <c-box v-bind=\"wrapperAttrs\">\n <c-box v-bind=\"iconAttrs\" v-if=\"$slots.icon\">\n <slot name=\"icon\" />\n </c-box>\n\n <c-box v-bind=\"bodyAttrs\">\n <c-box\n v-bind=\"titleAttrs\"\n v-if=\"$slots.title\"\n :data-with-close-button=\"props.withCloseButton || undefined\"\n >\n <c-box tag=\"span\" :id=\"titleId\" v-bind=\"labelAttrs\">\n <slot name=\"title\" />\n </c-box>\n </c-box>\n\n <c-box\n v-bind=\"messageAttrs\"\n v-if=\"$slots.default\"\n :data-variant=\"props.variant\"\n :id=\"bodyId\"\n >\n <slot />\n </c-box>\n </c-box>\n\n <c-close-button\n v-bind=\"closeButtonAttrs\"\n v-if=\"props.withCloseButton\"\n :aria-label=\"closeButtonLabel\"\n :icon-size=\"16\"\n :size=\"16\"\n :unstyled=\"props.unstyled\"\n variant=\"transparent\"\n @click=\"props.onClose\"\n ></c-close-button>\n </c-box>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { useId } from '@cck-ui/hooks'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './alert.module.css'\nimport { AlertFactory, type AlertProps } from './alert.types'\nimport { varsResolver } from './alert.utils'\nimport CCloseButton from '../close-button'\n\ndefineOptions({\n name: 'CAlert',\n})\n\nconst slots = defineSlots<{\n default: any\n icon: any\n title: any\n}>()\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AlertProps>()\n\nconst props = useComponentProps({\n component: 'CAlert',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'style',\n 'className',\n 'styles',\n 'classNames',\n 'unstyled',\n 'vars',\n 'radius',\n 'color',\n 'id',\n 'withCloseButton',\n 'onClose',\n 'closeButtonLabel',\n 'variant',\n 'autoContrast',\n 'role',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<AlertFactory>({\n name: 'Alert',\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst rootId = useId(props.value.id).value\nconst titleId = (slots.title && `${rootId}-title`) || undefined\nconst bodyId = `${rootId}-body`\n\nconst rootAttrs = computed(() => getStyles('root'))\nconst wrapperAttrs = computed(() => getStyles('wrapper'))\nconst iconAttrs = computed(() => getStyles('icon'))\nconst bodyAttrs = computed(() => getStyles('body'))\nconst titleAttrs = computed(() => getStyles('title'))\nconst labelAttrs = computed(() => getStyles('label'))\nconst messageAttrs = computed(() => getStyles('message'))\nconst closeButtonAttrs = computed(() => getStyles('close-button'))\n\nconst mergedRootAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n for (const key in propsValue) {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n }\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod])]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,MAAM,QAA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A,GAFf,YAOQ,OAAA,SAPR,WAOQ,EAAA,KAAA,EAAA,GANE,OAAA,cAAY;MAEnB,gBAAc,OAAA,MAAM;MACpB,IAAI,OAAA;;6BAEG,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;IAMJ,OAAA,MAAM,mBAAA,UAAA,GAFd,YASkB,OAAA,iBATlB,WASkB,EAAA,KAAA,EAAA,GARR,OAAA,kBAAgB;KAEvB,cAAY,OAAA;KACZ,aAAW;KACX,MAAM;KACN,UAAU,OAAA,MAAM;KACjB,SAAQ;KACP,SAAO,OAAA,MAAM"}
|
|
@@ -324,12 +324,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
324
324
|
"ratio",
|
|
325
325
|
"attributes"
|
|
326
326
|
];
|
|
327
|
+
const styleProps = computed(() => ({
|
|
328
|
+
...props.value,
|
|
329
|
+
...attrs,
|
|
330
|
+
style: attrs.style ?? props.value.style
|
|
331
|
+
}));
|
|
327
332
|
const getStyles = useStyles({
|
|
328
333
|
name: "AspectRatio",
|
|
329
|
-
props:
|
|
330
|
-
...props.value,
|
|
331
|
-
...attrs
|
|
332
|
-
},
|
|
334
|
+
props: styleProps,
|
|
333
335
|
classes: aspect_ratio_module_default,
|
|
334
336
|
className: props.value.className,
|
|
335
337
|
classNames: props.value.classNames,
|
|
@@ -362,6 +364,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
362
364
|
rawProps,
|
|
363
365
|
props,
|
|
364
366
|
knownProps,
|
|
367
|
+
styleProps,
|
|
365
368
|
getStyles,
|
|
366
369
|
rootAttrs,
|
|
367
370
|
mergedAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.mjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\n 'attributes',\n]\n\nconst getStyles = useStyles<AspectRatioFactory>({\n name: 'AspectRatio',\n props:
|
|
1
|
+
{"version":3,"file":"aspect-ratio.mjs","names":[],"sources":["../../../src/components/aspect-ratio/aspect-ratio.vue"],"sourcesContent":["<template>\n <c-box ref=\"_root\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { AspectRatioFactory, AspectRatioProps } from './aspect-ratio.types'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../core'\nimport classes from './aspect-ratio.module.css'\nimport { varsResolver } from './aspect-ratio.utils'\n\ndefineOptions({\n name: 'CAspectRatio',\n})\n\nconst _root = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<AspectRatioProps>()\n\nconst props = useComponentProps({\n component: 'CAspectRatio',\n defaultProps: {},\n props: rawProps,\n})\n\nconst knownProps = [\n 'classNames',\n 'className',\n 'style',\n 'styles',\n 'unstyled',\n 'vars',\n 'ratio',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<AspectRatioFactory>({\n name: 'AspectRatio',\n props: styleProps,\n classes,\n className: props.value.className,\n classNames: props.value.classNames,\n style: props.value.style,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n})\n\nconst rootAttrs = computed(() => getStyles('root'))\n\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...rootAttrs.value }\n})\n\ndefineExpose({\n root: computed(() => _root.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ,IAAsC,IAAI;EAExD,MAAM,QAAQ,SAAS;EAEvB,MAAM,WAAW;EAEjB,MAAM,QAAQ,kBAAkB;GAC9B,WAAW;GACX,cAAc,CAAC;GACf,OAAO;EACT,CAAC;EAED,MAAM,aAAa;GACjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EAEA,MAAM,aAAa,gBAAgB;GACjC,GAAG,MAAM;GACT,GAAG;GACH,OAAQ,MAAM,SAAS,MAAM,MAAM;EACrC,EAAE;EAEF,MAAM,YAAY,UAA8B;GAC9C,MAAM;GACN,OAAO;GACP,SAAA;GACA,WAAW,MAAM,MAAM;GACvB,YAAY,MAAM,MAAM;GACxB,OAAO,MAAM,MAAM;GACnB,QAAQ,MAAM,MAAM;GACpB,UAAU,MAAM,MAAM;GACtB,YAAY,MAAM,MAAM;GACxB,MAAM,MAAM,MAAM;GAClB;EACF,CAAC;EAED,MAAM,YAAY,eAAe,UAAU,MAAM,CAAC;EAElD,MAAM,cAAc,eAAe;GACjC,MAAM,SAA8B,CAAC;GACrC,MAAM,aAAa,MAAM;GACzB,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAAC,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,CAAE;GACpF,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,UAAU;GAAM;EACzD,CAAC;EAED,SAAa,EACX,MAAM,eAAe,MAAM,OAAO,QAAQ,IAAI,EAChD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBA5EC,YAEQ,OAAA,SAFR,WAEQ,EAFD,KAAI,QAAO,GAAS,OAAA,WAAW,GAAA;yBAC5B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -332,12 +332,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
332
332
|
"mod",
|
|
333
333
|
"attributes"
|
|
334
334
|
];
|
|
335
|
+
const styleProps = computed(() => ({
|
|
336
|
+
...props.value,
|
|
337
|
+
...attrs,
|
|
338
|
+
style: attrs.style ?? props.value.style
|
|
339
|
+
}));
|
|
335
340
|
const getStyles = useStyles({
|
|
336
341
|
name: "ButtonGroup",
|
|
337
|
-
props:
|
|
338
|
-
...props.value,
|
|
339
|
-
...attrs
|
|
340
|
-
},
|
|
342
|
+
props: styleProps,
|
|
341
343
|
classes: button_module_default,
|
|
342
344
|
className: props.value.className,
|
|
343
345
|
style: props.value.style,
|
|
@@ -374,6 +376,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
374
376
|
rawProps,
|
|
375
377
|
props,
|
|
376
378
|
knownProps,
|
|
379
|
+
styleProps,
|
|
377
380
|
getStyles,
|
|
378
381
|
modList,
|
|
379
382
|
groupAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.mjs","names":[],"sources":["../../../../src/components/button/button-group/button-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <template v-for=\"(child, index) in validChildren\" :key=\"child.key ?? index\">\n <component :is=\"child\" />\n </template>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport classes from '../button.module.css'\nimport { ButtonGroupFactory, type ButtonGroupProps } from './button-group.types'\nimport { useButtonGroup } from './use-button-group'\nimport { varsResolver } from './button-group.utils'\n\ndefineOptions({\n name: 'CButtonGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<ButtonGroupProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroup',\n defaultProps: {\n orientation: 'horizontal',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\n 'mod',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonGroupFactory>({\n name: 'ButtonGroup',\n props:
|
|
1
|
+
{"version":3,"file":"button-group.mjs","names":[],"sources":["../../../../src/components/button/button-group/button-group.vue"],"sourcesContent":["<template>\n <c-box ref=\"_group\" role=\"group\" v-bind=\"mergedAttrs\">\n <template v-for=\"(child, index) in validChildren\" :key=\"child.key ?? index\">\n <component :is=\"child\" />\n </template>\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../../core'\nimport classes from '../button.module.css'\nimport { ButtonGroupFactory, type ButtonGroupProps } from './button-group.types'\nimport { useButtonGroup } from './use-button-group'\nimport { varsResolver } from './button-group.utils'\n\ndefineOptions({\n name: 'CButtonGroup',\n})\n\nconst _group = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\nconst slots = useSlots()\n\nconst rawProps = defineProps<ButtonGroupProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroup',\n defaultProps: {\n orientation: 'horizontal',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'orientation',\n 'vars',\n 'borderWidth',\n 'mod',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ButtonGroupFactory>({\n name: 'ButtonGroup',\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n rootSelector: 'group',\n})\n\nconst modList = computed(() => [\n {\n orientation: props.value.orientation,\n },\n])\n\nconst groupAttrs = computed(() => getStyles('group'))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [\n ...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean)),\n ...(modList.value || []),\n ]\n return { ...others, mod: mergedMod, ...groupAttrs.value }\n})\n\nconst { validChildren } = useButtonGroup(slots)\n\ndefineExpose({\n group: computed(() => _group.value?.root ?? null),\n})\n</script>\n"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SAAS,QAAQ;IACvC,IAAI,CAAC,WAAW,SAAS,GAAG,GAC1B,OAAO,OAAO,WAAW;GAE7B,CAAC;GACD,MAAM,UAAU,MAAM,MAAM;GAC5B,MAAM,YAAY,CAChB,GAAI,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,OAAO,OAAO,GAC/D,GAAI,QAAQ,SAAS,CAAC,CACxB;GACA,OAAO;IAAE,GAAG;IAAQ,KAAK;IAAW,GAAG,WAAW;GAAM;EAC1D,CAAC;EAED,MAAM,EAAE,kBAAkB,eAAe,KAAK;EAE9C,SAAa,EACX,OAAO,eAAe,OAAO,OAAO,QAAQ,IAAI,EAClD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;qBA/FC,YAIQ,OAAA,SAJR,WAIQ;EAJD,KAAI;EAAS,MAAK;IAAgB,OAAA,WAAW,GAAA;yBACD,EAAA,UAAA,IAAA,GAAjD,mBAEW,UAAA,MAAA,WAFwB,OAAA,gBAAjB,OAAO,UAAK;uBAC5B,YAAyB,wBAAT,KAAK,GAAA,EAAA,KADiC,MAAM,OAAO,MAAA,CAAA"}
|
|
@@ -338,12 +338,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
338
338
|
"autoContrast",
|
|
339
339
|
"attributes"
|
|
340
340
|
];
|
|
341
|
+
const styleProps = computed(() => ({
|
|
342
|
+
...props.value,
|
|
343
|
+
...attrs,
|
|
344
|
+
style: attrs.style ?? props.value.style
|
|
345
|
+
}));
|
|
341
346
|
const getStyles = useStyles({
|
|
342
347
|
name: "ButtonGroupSection",
|
|
343
|
-
props:
|
|
344
|
-
...props.value,
|
|
345
|
-
...attrs
|
|
346
|
-
},
|
|
348
|
+
props: styleProps,
|
|
347
349
|
classes: button_module_default,
|
|
348
350
|
className: props.value.className,
|
|
349
351
|
style: props.value.style,
|
|
@@ -377,6 +379,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
377
379
|
rawProps,
|
|
378
380
|
props,
|
|
379
381
|
knownProps,
|
|
382
|
+
styleProps,
|
|
380
383
|
getStyles,
|
|
381
384
|
sectionAttrs,
|
|
382
385
|
mergedAttrs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group-section.mjs","names":[],"sources":["../../../../src/components/button/button-group-section/button-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, useComponentProps, useStyles } from '../../../core'\nimport type {\n ButtonGroupSectionFactory,\n ButtonGroupSectionProps,\n} from './button-group-section.types'\nimport classes from '../button.module.css'\nimport { varsResolver } from './button-group-section.utils'\n\ndefineOptions({\n name: 'CButtonGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ButtonGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroupSection',\n defaultProps: {\n variant: 'default',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\n 'attributes',\n]\n\nconst getStyles = useStyles<ButtonGroupSectionFactory>({\n name: 'ButtonGroupSection',\n props:
|
|
1
|
+
{"version":3,"file":"button-group-section.mjs","names":[],"sources":["../../../../src/components/button/button-group-section/button-group-section.vue"],"sourcesContent":["<template>\n <c-box ref=\"_section\" v-bind=\"mergedAttrs\">\n <slot />\n </c-box>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue'\nimport { CBox, CStyleProp, useComponentProps, useStyles } from '../../../core'\nimport type {\n ButtonGroupSectionFactory,\n ButtonGroupSectionProps,\n} from './button-group-section.types'\nimport classes from '../button.module.css'\nimport { varsResolver } from './button-group-section.utils'\n\ndefineOptions({\n name: 'CButtonGroupSection',\n})\n\nconst _section = ref<InstanceType<typeof CBox> | null>(null)\n\nconst attrs = useAttrs()\n\nconst rawProps = defineProps<ButtonGroupSectionProps>()\n\nconst props = useComponentProps({\n component: 'CButtonGroupSection',\n defaultProps: {\n variant: 'default',\n },\n props: rawProps,\n})\n\nconst knownProps = [\n 'className',\n 'style',\n 'classNames',\n 'styles',\n 'unstyled',\n 'vars',\n 'gradient',\n 'radius',\n 'autoContrast',\n 'attributes',\n]\n\nconst styleProps = computed(() => ({\n ...props.value,\n ...attrs,\n style: (attrs.style ?? props.value.style) as CStyleProp,\n}))\n\nconst getStyles = useStyles<ButtonGroupSectionFactory>({\n name: 'ButtonGroupSection',\n props: styleProps,\n classes,\n className: props.value.className,\n style: props.value.style,\n classNames: props.value.classNames,\n styles: props.value.styles,\n unstyled: props.value.unstyled,\n attributes: props.value.attributes,\n vars: props.value.vars,\n varsResolver,\n rootSelector: 'groupSection',\n})\n\nconst sectionAttrs = computed(() => getStyles('groupSection'))\nconst mergedAttrs = computed(() => {\n const others: Record<string, any> = {}\n const propsValue = props.value\n Object.keys(propsValue).forEach((key) => {\n if (!knownProps.includes(key)) {\n others[key] = propsValue[key as keyof typeof propsValue]\n }\n })\n const userMod = props.value.mod\n const mergedMod = [...(Array.isArray(userMod) ? userMod : [userMod].filter(Boolean))]\n return { ...others, mod: mergedMod, ...sectionAttrs.value }\n})\n\ndefineExpose({\n section: computed(() => _section.value?.root ?? null),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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FD,KAAI,WAAU,GAAS,OAAA,WAAW,GAAA;yBAC/B,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -404,12 +404,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
404
404
|
"mod",
|
|
405
405
|
"attributes"
|
|
406
406
|
];
|
|
407
|
+
const styleProps = computed(() => ({
|
|
408
|
+
...props.value,
|
|
409
|
+
...attrs,
|
|
410
|
+
style: attrs.style ?? props.value.style
|
|
411
|
+
}));
|
|
407
412
|
const getStyles = useStyles({
|
|
408
413
|
name: "Button",
|
|
409
|
-
props:
|
|
410
|
-
...props.value,
|
|
411
|
-
...attrs
|
|
412
|
-
},
|
|
414
|
+
props: styleProps,
|
|
413
415
|
classes: button_module_default,
|
|
414
416
|
className: props.value.className,
|
|
415
417
|
style: props.value.style,
|
|
@@ -462,6 +464,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
462
464
|
rawProps,
|
|
463
465
|
props,
|
|
464
466
|
knownProps,
|
|
467
|
+
styleProps,
|
|
465
468
|
getStyles,
|
|
466
469
|
modList,
|
|
467
470
|
rootAttrs,
|