@vkzstudio/muza-ui 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/ButtonLoader.d.ts +7 -0
- package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
- package/dist/components/Button/ButtonLoader.js +40 -0
- package/dist/components/Chip/Chip.d.ts +43 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +98 -0
- package/dist/components/Chip/Chip.stories.d.ts +9 -0
- package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts +10 -4
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +77 -49
- package/dist/components/DataTable/DataTable.stories.d.ts +4 -0
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DataTable/index.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +1 -1
- package/dist/components/Reorderable/Reorderable.d.ts +100 -0
- package/dist/components/Reorderable/Reorderable.d.ts.map +1 -0
- package/dist/components/Reorderable/Reorderable.js +197 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts +14 -0
- package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -0
- package/dist/components/Reorderable/index.d.ts +2 -0
- package/dist/components/Reorderable/index.d.ts.map +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.d.ts +40 -0
- package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -0
- package/dist/components/ReorderableTable/ReorderableTable.js +175 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +18 -0
- package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -0
- package/dist/components/ReorderableTable/index.d.ts +2 -0
- package/dist/components/ReorderableTable/index.d.ts.map +1 -0
- package/dist/components/SwipeButton/SwipeButton.js +7 -7
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index.js +196 -183
- package/dist/muza-ui.css +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +46 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +34 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
- package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
- package/dist/translations/locales/cs.d.ts.map +1 -1
- package/dist/translations/locales/cs.js +4 -0
- package/dist/translations/locales/en.d.ts.map +1 -1
- package/dist/translations/locales/en.js +4 -0
- package/dist/translations/locales/sk.d.ts.map +1 -1
- package/dist/translations/locales/sk.js +4 -0
- package/dist/translations/types.d.ts +8 -0
- package/dist/translations/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.js +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import "class-variance-authority";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Typography as
|
|
4
|
+
import { ButtonLoader as b } from "./ButtonLoader.js";
|
|
5
|
+
import { buttonVariants as N } from "./buttonVariants.js";
|
|
6
|
+
import { Typography as B } from "../Typography/Typography.js";
|
|
7
7
|
import { cn as n } from "../../utils/cn.js";
|
|
8
|
-
const
|
|
8
|
+
const h = x.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
className: f,
|
|
11
11
|
variant: i,
|
|
12
12
|
size: t,
|
|
13
13
|
fullWidth: c,
|
|
14
|
-
asChild:
|
|
14
|
+
asChild: u = !1,
|
|
15
15
|
icon: r,
|
|
16
16
|
iconPosition: m = "start",
|
|
17
17
|
ghost: e = !1,
|
|
18
18
|
danger: p = !1,
|
|
19
19
|
loading: a = !1,
|
|
20
|
-
children:
|
|
21
|
-
...
|
|
20
|
+
children: o,
|
|
21
|
+
...l
|
|
22
22
|
}, y) => /* @__PURE__ */ d(
|
|
23
|
-
|
|
23
|
+
u ? "span" : "button",
|
|
24
24
|
{
|
|
25
25
|
className: n(
|
|
26
|
-
|
|
26
|
+
N({
|
|
27
27
|
variant: i,
|
|
28
28
|
size: t,
|
|
29
29
|
fullWidth: c,
|
|
30
|
-
iconOnly: !
|
|
30
|
+
iconOnly: !o,
|
|
31
31
|
ghost: e,
|
|
32
32
|
danger: p,
|
|
33
33
|
loading: a,
|
|
@@ -37,12 +37,12 @@ const j = x.forwardRef(
|
|
|
37
37
|
ref: y,
|
|
38
38
|
"data-ghost": e,
|
|
39
39
|
"data-danger": p,
|
|
40
|
-
...
|
|
40
|
+
...l,
|
|
41
41
|
children: [
|
|
42
|
-
a && /* @__PURE__ */
|
|
42
|
+
a && /* @__PURE__ */ s("span", { className: "absolute", children: /* @__PURE__ */ s(b, {}) }),
|
|
43
43
|
m === "start" && r,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
o && /* @__PURE__ */ s(
|
|
45
|
+
B,
|
|
46
46
|
{
|
|
47
47
|
variant: "cta",
|
|
48
48
|
size: t == "sm" || t == "xs" ? "sm" : "base",
|
|
@@ -52,7 +52,7 @@ const j = x.forwardRef(
|
|
|
52
52
|
className: n("transition-opacity", {
|
|
53
53
|
"opacity-0": a
|
|
54
54
|
}),
|
|
55
|
-
children:
|
|
55
|
+
children: o
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
m === "end" && r
|
|
@@ -60,8 +60,8 @@ const j = x.forwardRef(
|
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
);
|
|
63
|
-
|
|
63
|
+
h.displayName = "Button";
|
|
64
64
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
h as Button,
|
|
66
|
+
N as buttonVariants
|
|
67
67
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ButtonLoaderProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ButtonLoader: React.ForwardRefExoticComponent<ButtonLoaderProps & React.RefAttributes<SVGSVGElement>>;
|
|
6
|
+
export { ButtonLoader };
|
|
7
|
+
//# sourceMappingURL=ButtonLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLoader.d.ts","sourceRoot":"","sources":["../../../src/components/Button/ButtonLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,YAAY,yFA2BjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cn as a } from "../../utils/cn.js";
|
|
4
|
+
const i = o.forwardRef(
|
|
5
|
+
({ className: r }, e) => /* @__PURE__ */ t(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
ref: e,
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: "24",
|
|
11
|
+
height: "24",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
className: a(r),
|
|
15
|
+
children: /* @__PURE__ */ t(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
children: /* @__PURE__ */ t(
|
|
21
|
+
"animateTransform",
|
|
22
|
+
{
|
|
23
|
+
attributeType: "xml",
|
|
24
|
+
attributeName: "transform",
|
|
25
|
+
type: "rotate",
|
|
26
|
+
from: "-10 12 12",
|
|
27
|
+
to: "360 12 12",
|
|
28
|
+
dur: "0.75s",
|
|
29
|
+
repeatCount: "indefinite"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
i.displayName = "ButtonLoader";
|
|
38
|
+
export {
|
|
39
|
+
i as ButtonLoader
|
|
40
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const chipVariants: (props?: ({
|
|
3
|
+
checked?: boolean | null | undefined;
|
|
4
|
+
disabled?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Chip component.
|
|
8
|
+
* Extends standard button HTML attributes, excluding 'onChange' and 'disabled' to use custom implementations.
|
|
9
|
+
*/
|
|
10
|
+
export interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'disabled'> {
|
|
11
|
+
/**
|
|
12
|
+
* The checked state of the chip.
|
|
13
|
+
* When true, the chip displays a filled check icon and active styling.
|
|
14
|
+
*/
|
|
15
|
+
checked: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Callback function triggered when the chip's checked state changes.
|
|
18
|
+
* @param checked - The new checked state
|
|
19
|
+
*/
|
|
20
|
+
onCheckedChange: (checked: boolean) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the chip is disabled.
|
|
23
|
+
* When true, prevents interaction and applies disabled styling.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A selectable chip component that acts as a toggleable filter or option.
|
|
30
|
+
* Displays as a pill-shaped button with an icon indicating its checked state.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* const [checked, setChecked] = React.useState(false)
|
|
35
|
+
*
|
|
36
|
+
* <Chip checked={checked} onCheckedChange={setChecked}>
|
|
37
|
+
* Option Label
|
|
38
|
+
* </Chip>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLButtonElement>>;
|
|
42
|
+
export { Chip, chipVariants };
|
|
43
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,QAAA,MAAM,YAAY;;;8EA0CjB,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,SACf,SAAQ,IAAI,CACV,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,UAAU,GAAG,UAAU,CACxB;IACD;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,IAAI,qFA6CT,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { EmptyCircle as f } from "../Icons/CustomIcons.js";
|
|
5
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
6
|
+
import { cn as x } from "../../utils/cn.js";
|
|
7
|
+
import { CheckCircleBold as b } from "@solar-icons/react-perf";
|
|
8
|
+
const v = m(
|
|
9
|
+
[
|
|
10
|
+
"inline-flex items-center gap-xs rounded-full px-md py-sm",
|
|
11
|
+
"cursor-pointer transition-colors",
|
|
12
|
+
"focus-visible-default",
|
|
13
|
+
"[&>svg]:size-icon-small [&>svg]:shrink-0",
|
|
14
|
+
"border-1 border-stroke-base-primary"
|
|
15
|
+
],
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
checked: {
|
|
19
|
+
true: [
|
|
20
|
+
"bg-surface-brand-primary",
|
|
21
|
+
"border-surface-brand-primary",
|
|
22
|
+
"text-text-invert-def",
|
|
23
|
+
"[&>svg]:text-icon-invert-def"
|
|
24
|
+
],
|
|
25
|
+
false: [
|
|
26
|
+
"text-text-dark-secondary",
|
|
27
|
+
"[&>svg]:text-icon-dark-secondary-def",
|
|
28
|
+
"hover:text-text-brand-hover",
|
|
29
|
+
"hover:bg-surface-brand-brand-tertiary",
|
|
30
|
+
"hover:[&>svg]:text-icon-brand-hover"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
true: [
|
|
35
|
+
"cursor-not-allowed",
|
|
36
|
+
"text-text-dark-disabled",
|
|
37
|
+
"[&>svg]:text-icon-dark-tertiary",
|
|
38
|
+
"hover:bg-transparent",
|
|
39
|
+
"hover:text-text-dark-disabled",
|
|
40
|
+
"hover:[&>svg]:text-icon-dark-tertiary"
|
|
41
|
+
],
|
|
42
|
+
false: ""
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: {
|
|
46
|
+
checked: !1,
|
|
47
|
+
disabled: !1
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
), h = l.forwardRef(
|
|
51
|
+
({
|
|
52
|
+
className: a,
|
|
53
|
+
checked: r,
|
|
54
|
+
onCheckedChange: o,
|
|
55
|
+
disabled: e = !1,
|
|
56
|
+
children: i,
|
|
57
|
+
...s
|
|
58
|
+
}, n) => {
|
|
59
|
+
const d = () => {
|
|
60
|
+
e || o(!r);
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ c(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
ref: n,
|
|
66
|
+
type: "button",
|
|
67
|
+
role: "checkbox",
|
|
68
|
+
"aria-checked": r,
|
|
69
|
+
"aria-disabled": e,
|
|
70
|
+
disabled: e,
|
|
71
|
+
"data-state": r ? "checked" : "unchecked",
|
|
72
|
+
className: x(v({ checked: r, disabled: e, className: a })),
|
|
73
|
+
onClick: d,
|
|
74
|
+
...s,
|
|
75
|
+
children: [
|
|
76
|
+
r ? /* @__PURE__ */ t(b, {}) : /* @__PURE__ */ t(f, {}),
|
|
77
|
+
/* @__PURE__ */ t(
|
|
78
|
+
p,
|
|
79
|
+
{
|
|
80
|
+
component: "span",
|
|
81
|
+
variant: "body",
|
|
82
|
+
weight: "medium",
|
|
83
|
+
size: "base",
|
|
84
|
+
fixY: !0,
|
|
85
|
+
className: "text-inherit",
|
|
86
|
+
children: i
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
h.displayName = "Chip";
|
|
95
|
+
export {
|
|
96
|
+
h as Chip,
|
|
97
|
+
v as chipVariants
|
|
98
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Chip } from './Chip';
|
|
3
|
+
declare const meta: Meta<typeof Chip>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Chip>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const AllStates: Story;
|
|
8
|
+
export declare const ChipGroup: Story;
|
|
9
|
+
//# sourceMappingURL=Chip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CA0C3B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAmDvB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const dataTableCellVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "white" | null | undefined;
|
|
5
|
+
position?: "first" | "last" | "middle" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
2
7
|
export interface DataTableColumn<T> {
|
|
3
8
|
dataKey: keyof T;
|
|
4
9
|
title: ReactNode;
|
|
5
10
|
className?: string;
|
|
6
11
|
lineClamp?: boolean | 1 | 2;
|
|
7
|
-
render?: (value: T[keyof T], rowData: T, rowIndex: number) => ReactNode;
|
|
12
|
+
render?: (value: T[keyof T], rowData: T, rowIndex: number, disabled?: boolean) => ReactNode;
|
|
8
13
|
}
|
|
9
|
-
export interface DataTableProps<T> extends Omit<React.HTMLAttributes<HTMLTableElement>, 'children'> {
|
|
14
|
+
export interface DataTableProps<T> extends Omit<React.HTMLAttributes<HTMLTableElement>, 'children'>, VariantProps<typeof dataTableCellVariants> {
|
|
10
15
|
data: T[];
|
|
11
16
|
columns: DataTableColumn<T>[];
|
|
12
17
|
showHeader?: boolean;
|
|
13
18
|
className?: string;
|
|
19
|
+
disabled?: boolean;
|
|
14
20
|
}
|
|
15
|
-
declare const DataTable: <T>({ data, columns, showHeader, className, ...props }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export { DataTable };
|
|
21
|
+
declare const DataTable: <T>({ data, columns, showHeader, className, variant, disabled, ...props }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { DataTable, dataTableCellVariants };
|
|
17
23
|
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,qBAAqB;;;8EAmB1B,CAAA;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,CAAC,EAAE,CACP,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EACjB,OAAO,EAAE,CAAC,EACV,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,OAAO,KACf,SAAS,CAAA;CACf;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,CAC/B,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC,EAC9D,YAAY,CAAC,OAAO,qBAAqB,CAAC;IAC5C,IAAI,EAAE,CAAC,EAAE,CAAA;IACT,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,SAAS,GAAI,CAAC,EAAG,uEAQpB,cAAc,CAAC,CAAC,CAAC,4CAyFnB,CAAA;AAED,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -1,73 +1,101 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
import { typographyVariants as h, Typography as y } from "../Typography/Typography.js";
|
|
5
|
+
import { cn as i } from "../../utils/cn.js";
|
|
6
|
+
const u = f(
|
|
7
|
+
"h-comp-table-h border-y border-stroke-base-secondary px-2xl transition-colors",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-surface-base-primary",
|
|
12
|
+
white: "bg-surface-base-secondary"
|
|
13
|
+
},
|
|
14
|
+
position: {
|
|
15
|
+
first: "rounded-l-xl border-l",
|
|
16
|
+
middle: "",
|
|
17
|
+
last: "rounded-r-xl border-r"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
position: "middle"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
), C = ({
|
|
26
|
+
data: n,
|
|
27
|
+
columns: s,
|
|
28
|
+
showHeader: o = !0,
|
|
29
|
+
className: p,
|
|
30
|
+
variant: m = "default",
|
|
31
|
+
disabled: d = !1,
|
|
32
|
+
...c
|
|
33
|
+
}) => /* @__PURE__ */ r("div", { className: "w-full overflow-x-auto overflow-y-hidden", children: /* @__PURE__ */ b(
|
|
12
34
|
"table",
|
|
13
35
|
{
|
|
14
|
-
className:
|
|
15
|
-
"-my-
|
|
16
|
-
|
|
36
|
+
className: i(
|
|
37
|
+
"-my-md w-full border-separate border-spacing-y-md",
|
|
38
|
+
p
|
|
17
39
|
),
|
|
18
|
-
...
|
|
40
|
+
...c,
|
|
19
41
|
children: [
|
|
20
|
-
|
|
42
|
+
o && /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: s.map((a, t) => /* @__PURE__ */ r(
|
|
21
43
|
"th",
|
|
22
44
|
{
|
|
23
|
-
className:
|
|
24
|
-
|
|
45
|
+
className: i(
|
|
46
|
+
h({
|
|
25
47
|
size: "sm",
|
|
26
48
|
uppercase: !0,
|
|
27
49
|
variant: "body",
|
|
28
50
|
weight: "medium"
|
|
29
51
|
}),
|
|
30
52
|
"px-comp-table-p text-left text-text-dark-secondary",
|
|
53
|
+
{
|
|
54
|
+
"text-text-dark-disabled": d
|
|
55
|
+
},
|
|
31
56
|
a.className
|
|
32
57
|
),
|
|
33
58
|
children: a.title
|
|
34
59
|
},
|
|
35
60
|
t
|
|
36
61
|
)) }) }),
|
|
37
|
-
/* @__PURE__ */ r("tbody", { children:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
/* @__PURE__ */ r("tbody", { children: n.map((a, t) => /* @__PURE__ */ r("tr", { className: "group", children: s.map((e, l) => /* @__PURE__ */ r(
|
|
63
|
+
"td",
|
|
64
|
+
{
|
|
65
|
+
className: i(
|
|
66
|
+
u({
|
|
67
|
+
variant: m,
|
|
68
|
+
position: l === 0 ? "first" : l === s.length - 1 ? "last" : "middle"
|
|
69
|
+
}),
|
|
70
|
+
e.className
|
|
71
|
+
),
|
|
72
|
+
children: e.render ? e.render(
|
|
73
|
+
a[e.dataKey],
|
|
74
|
+
a,
|
|
75
|
+
t,
|
|
76
|
+
d
|
|
77
|
+
) : /* @__PURE__ */ r(
|
|
78
|
+
y,
|
|
79
|
+
{
|
|
80
|
+
variant: "body",
|
|
81
|
+
size: "base",
|
|
82
|
+
weight: "medium",
|
|
83
|
+
component: "span",
|
|
84
|
+
className: i({
|
|
85
|
+
"line-clamp-1": e.lineClamp === !0 || e.lineClamp === 1,
|
|
86
|
+
"line-clamp-2": e.lineClamp === 2,
|
|
87
|
+
"text-text-dark-disabled": d
|
|
88
|
+
}),
|
|
89
|
+
children: a[e.dataKey]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
},
|
|
93
|
+
l
|
|
94
|
+
)) }, t)) })
|
|
68
95
|
]
|
|
69
96
|
}
|
|
70
97
|
) });
|
|
71
98
|
export {
|
|
72
|
-
|
|
99
|
+
C as DataTable,
|
|
100
|
+
u as dataTableCellVariants
|
|
73
101
|
};
|
|
@@ -7,4 +7,8 @@ export declare const SimpleTable: Story;
|
|
|
7
7
|
export declare const WithCustomContent: Story;
|
|
8
8
|
export declare const HiddenHeader: Story;
|
|
9
9
|
export declare const WithEditableFields: Story;
|
|
10
|
+
export declare const WhiteVariant: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const WhiteVariantDisabled: Story;
|
|
13
|
+
export declare const AllVariants: Story;
|
|
10
14
|
//# sourceMappingURL=DataTable.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"DataTable.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTable.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAO3D,QAAA,MAAM,IAAI,EAAE,IA2DX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAsFrB,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAA;AAaD,eAAO,MAAM,WAAW,EAAE,KAazB,CAAA;AA0CD,eAAO,MAAM,iBAAiB,EAAE,KAa/B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAA;AASD,eAAO,MAAM,kBAAkB,EAAE,KAmIhC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAqEzB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DataTable, type DataTableProps, type DataTableColumn, } from './DataTable';
|
|
1
|
+
export { DataTable, dataTableCellVariants, type DataTableProps, type DataTableColumn, } from './DataTable';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,aAAa,CAAA"}
|
|
@@ -423,7 +423,7 @@ const _ = r(
|
|
|
423
423
|
(L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
|
|
424
424
|
"path",
|
|
425
425
|
{
|
|
426
|
-
d: "
|
|
426
|
+
d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
|
|
427
427
|
fill: "currentColor"
|
|
428
428
|
}
|
|
429
429
|
) })
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { CSSProperties, ForwardedRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { DragControls, TargetAndTransition } from 'motion/react';
|
|
3
|
+
interface ReorderableGroupContextValue<T = unknown> {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
values?: T[];
|
|
6
|
+
onReorder?: (newOrder: T[]) => void;
|
|
7
|
+
axis?: 'x' | 'y';
|
|
8
|
+
}
|
|
9
|
+
declare const useReorderableGroup: <T>() => ReorderableGroupContextValue<T>;
|
|
10
|
+
interface ReorderableItemContextValue {
|
|
11
|
+
dragControls: DragControls;
|
|
12
|
+
dragListenerDisabled: boolean;
|
|
13
|
+
moveItem: (direction: -1 | 1) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const useReorderableItem: () => ReorderableItemContextValue;
|
|
16
|
+
type ReorderableGroupElement = 'ul' | 'ol' | 'div';
|
|
17
|
+
export interface ReorderableGroupProps<T> {
|
|
18
|
+
/** Items array to reorder */
|
|
19
|
+
values: T[];
|
|
20
|
+
/** Callback when items are reordered */
|
|
21
|
+
onReorder: (newOrder: T[]) => void;
|
|
22
|
+
/** Drag axis - defaults to 'y' */
|
|
23
|
+
axis?: 'x' | 'y';
|
|
24
|
+
/** HTML element type - defaults to 'ul' */
|
|
25
|
+
as?: ReorderableGroupElement;
|
|
26
|
+
/** Disable all reordering */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Enable layout scroll measurement for scrollable containers */
|
|
29
|
+
layoutScroll?: boolean;
|
|
30
|
+
/** Inline styles */
|
|
31
|
+
style?: CSSProperties;
|
|
32
|
+
/** Additional CSS classes */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** Child elements */
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}
|
|
37
|
+
declare const ReorderableGroup: <T>(props: ReorderableGroupProps<T> & {
|
|
38
|
+
ref?: ForwardedRef<HTMLUListElement>;
|
|
39
|
+
}) => ReactElement;
|
|
40
|
+
type ReorderableItemElement = 'li' | 'div' | 'tr';
|
|
41
|
+
export interface ReorderableItemProps<T> {
|
|
42
|
+
/** Item identifier - must match an item in the parent group's values array */
|
|
43
|
+
value: T;
|
|
44
|
+
/** HTML element type - defaults to 'li' */
|
|
45
|
+
as?: ReorderableItemElement;
|
|
46
|
+
/** Disable this item from being dragged */
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
/** Restrict drag to handle only - when true, item can only be dragged via ReorderableHandle */
|
|
49
|
+
dragListenerDisabled?: boolean;
|
|
50
|
+
/** Additional styles to apply while dragging (merged with default whileDrag styles) */
|
|
51
|
+
whileDrag?: TargetAndTransition;
|
|
52
|
+
/** Additional CSS classes */
|
|
53
|
+
className?: string;
|
|
54
|
+
/** Child elements */
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
declare const ReorderableItem: <T>(props: ReorderableItemProps<T> & {
|
|
58
|
+
ref?: ForwardedRef<HTMLLIElement>;
|
|
59
|
+
}) => ReactElement;
|
|
60
|
+
type ReorderableHandleElement = 'button' | 'div' | 'span';
|
|
61
|
+
export interface ReorderableHandleProps {
|
|
62
|
+
/** HTML element type - defaults to 'button' */
|
|
63
|
+
as?: ReorderableHandleElement;
|
|
64
|
+
/** Disable the handle */
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
/** Accessibility label - defaults to 'Drag to reorder' */
|
|
67
|
+
'aria-label'?: string;
|
|
68
|
+
/** Additional CSS classes */
|
|
69
|
+
className?: string;
|
|
70
|
+
/** Child elements */
|
|
71
|
+
children?: ReactNode;
|
|
72
|
+
}
|
|
73
|
+
declare const ReorderableHandle: import('react').ForwardRefExoticComponent<ReorderableHandleProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
type ReorderableStaticItemElement = 'li' | 'div' | 'tr';
|
|
75
|
+
type ReorderableStaticItemElementMap = {
|
|
76
|
+
li: HTMLLIElement;
|
|
77
|
+
div: HTMLDivElement;
|
|
78
|
+
tr: HTMLTableRowElement;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Props for ReorderableStaticItem component.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* **Limitation:** ReorderableStaticItem must be placed as the first or last item
|
|
85
|
+
* in a ReorderableGroup. Placing it in the middle will cause reordering issues
|
|
86
|
+
* as Motion's Reorder API doesn't support non-contiguous reorderable items.
|
|
87
|
+
*/
|
|
88
|
+
export interface ReorderableStaticItemProps<T extends ReorderableStaticItemElement = 'li'> {
|
|
89
|
+
/** HTML element type - defaults to 'li' */
|
|
90
|
+
as?: T;
|
|
91
|
+
/** Additional CSS classes */
|
|
92
|
+
className?: string;
|
|
93
|
+
/** Child elements */
|
|
94
|
+
children: ReactNode;
|
|
95
|
+
}
|
|
96
|
+
declare const ReorderableStaticItem: <T extends ReorderableStaticItemElement = "li">(props: ReorderableStaticItemProps<T> & {
|
|
97
|
+
ref?: ForwardedRef<ReorderableStaticItemElementMap[T]>;
|
|
98
|
+
}) => ReactElement;
|
|
99
|
+
export { ReorderableGroup, ReorderableItem, ReorderableHandle, ReorderableStaticItem, useReorderableGroup, useReorderableItem, };
|
|
100
|
+
//# sourceMappingURL=Reorderable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reorderable.d.ts","sourceRoot":"","sources":["../../../src/components/Reorderable/Reorderable.tsx"],"names":[],"mappings":"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"}
|