@crystallize/design-system 1.24.46 → 2.0.2
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/CHANGELOG.md +25 -0
- package/dist/{chunk-6DIAYHKQ.mjs → chunk-D4B2KPZR.mjs} +5384 -4415
- package/dist/index.css +156 -208
- package/dist/index.d.ts +57 -204
- package/dist/index.js +8927 -8258
- package/dist/index.mjs +137 -307
- package/dist/{parser-babel-B7AMC4UT.mjs → parser-babel-D5SPHKKD.mjs} +2424 -2411
- package/dist/{parser-html-URMUOK6U.mjs → parser-html-RZQPYQ4H.mjs} +3 -3
- package/dist/{parser-postcss-AN2EJ77H.mjs → parser-postcss-D5TI5WMI.mjs} +6 -6
- package/dist/{rich-text-editor-EVN3N57G.css → rich-text-editor-4ZROYBHM.css} +98 -147
- package/dist/{rich-text-editor-QGMRYDKQ.mjs → rich-text-editor-QIDU7APE.mjs} +667 -873
- package/dist/{standalone-AR2ENVE7.mjs → standalone-COC5HE24.mjs} +8 -6
- package/package.json +26 -27
- package/src/action-menu/action-menu.tsx +1 -2
- package/src/dialog/config.tsx +6 -10
- package/src/dialog/dialog.tsx +2 -2
- package/src/dropdown-menu/dropdown-menu-root.tsx +3 -4
- package/src/iconography/Icon.stories.tsx +0 -1
- package/src/iconography/actions.tsx +1 -5
- package/src/iconography/add.tsx +1 -5
- package/src/iconography/advance.tsx +1 -5
- package/src/iconography/app.tsx +1 -5
- package/src/iconography/archive.tsx +1 -5
- package/src/iconography/arrow.tsx +1 -5
- package/src/iconography/atom.tsx +1 -5
- package/src/iconography/battery.tsx +1 -5
- package/src/iconography/bell.tsx +1 -5
- package/src/iconography/billing-payments.tsx +1 -5
- package/src/iconography/bin.tsx +1 -5
- package/src/iconography/boolean.tsx +17 -0
- package/src/iconography/cancel.tsx +1 -5
- package/src/iconography/caret.tsx +2 -6
- package/src/iconography/cart.tsx +1 -5
- package/src/iconography/catalogue.tsx +1 -4
- package/src/iconography/check-with-circle.tsx +1 -4
- package/src/iconography/check.tsx +1 -4
- package/src/iconography/checkbox.tsx +24 -0
- package/src/iconography/chevron.tsx +1 -3
- package/src/iconography/choice.tsx +1 -5
- package/src/iconography/chunk.tsx +1 -5
- package/src/iconography/clock.tsx +1 -5
- package/src/iconography/cloud-with-key-hole.tsx +1 -5
- package/src/iconography/cloud.tsx +1 -5
- package/src/iconography/compact.tsx +1 -5
- package/src/iconography/copy-with-cloud.tsx +2 -13
- package/src/iconography/copy.tsx +1 -5
- package/src/iconography/coupon.tsx +1 -5
- package/src/iconography/crystal.tsx +2 -14
- package/src/iconography/customers.tsx +1 -5
- package/src/iconography/dashboard.tsx +1 -5
- package/src/iconography/date-infinity.tsx +1 -5
- package/src/iconography/date.tsx +1 -5
- package/src/iconography/discovery.tsx +1 -5
- package/src/iconography/document-shortcut.tsx +1 -5
- package/src/iconography/document.tsx +1 -5
- package/src/iconography/dots.tsx +1 -5
- package/src/iconography/download.tsx +1 -5
- package/src/iconography/drag-handle.tsx +1 -5
- package/src/iconography/dynamic-value.tsx +1 -5
- package/src/iconography/edit.tsx +1 -5
- package/src/iconography/error-white.tsx +1 -4
- package/src/iconography/error.tsx +1 -4
- package/src/iconography/expanded.tsx +1 -5
- package/src/iconography/eye-closed.tsx +1 -5
- package/src/iconography/eye-open.tsx +1 -5
- package/src/iconography/file-upload.tsx +1 -5
- package/src/iconography/filename.tsx +1 -5
- package/src/iconography/fixed-property-table.tsx +1 -5
- package/src/iconography/fixed-value.tsx +1 -5
- package/src/iconography/flow.tsx +9 -21
- package/src/iconography/folder-shortcut.tsx +1 -5
- package/src/iconography/folder.tsx +1 -5
- package/src/iconography/frontends.tsx +1 -5
- package/src/iconography/fulfilment.tsx +1 -5
- package/src/iconography/glasses.tsx +2 -13
- package/src/iconography/graphQL.tsx +2 -13
- package/src/iconography/grid-relation.tsx +1 -5
- package/src/iconography/grid.tsx +1 -5
- package/src/iconography/hand-mirror.tsx +1 -4
- package/src/iconography/hooks.tsx +1 -5
- package/src/iconography/image.tsx +1 -5
- package/src/iconography/index.ts +18 -1
- package/src/iconography/info.tsx +1 -4
- package/src/iconography/items.tsx +1 -5
- package/src/iconography/key.tsx +1 -5
- package/src/iconography/language.tsx +2 -6
- package/src/iconography/lifebouy.tsx +2 -6
- package/src/iconography/limitations.tsx +1 -5
- package/src/iconography/location.tsx +2 -6
- package/src/iconography/lock-closed.tsx +1 -5
- package/src/iconography/lock-open.tsx +2 -6
- package/src/iconography/magnifier.tsx +22 -37
- package/src/iconography/meta-preset.tsx +36 -0
- package/src/iconography/min-quantity.tsx +2 -6
- package/src/iconography/min-value.tsx +2 -6
- package/src/iconography/multilingual.tsx +2 -6
- package/src/iconography/multiple-choice.tsx +2 -6
- package/src/iconography/mushroom.tsx +2 -6
- package/src/iconography/nail-polish.tsx +3 -14
- package/src/iconography/number.tsx +16 -0
- package/src/iconography/numeric.tsx +2 -6
- package/src/iconography/operation-log.tsx +33 -0
- package/src/iconography/order.tsx +2 -6
- package/src/iconography/organization.tsx +2 -6
- package/src/iconography/paragraph-collection.tsx +2 -6
- package/src/iconography/particle.tsx +3 -15
- package/src/iconography/paths.tsx +2 -5
- package/src/iconography/people.tsx +2 -6
- package/src/iconography/percentage.tsx +3 -8
- package/src/iconography/piece.tsx +4 -8
- package/src/iconography/pin.tsx +2 -6
- package/src/iconography/pipeline-dashed.tsx +2 -6
- package/src/iconography/plans-and-pricing.tsx +2 -6
- package/src/iconography/plug.tsx +2 -6
- package/src/iconography/price-list.tsx +2 -6
- package/src/iconography/price-tag.tsx +2 -6
- package/src/iconography/product-shortcut.tsx +2 -6
- package/src/iconography/product.tsx +2 -6
- package/src/iconography/promotion.tsx +2 -6
- package/src/iconography/property-table.tsx +2 -6
- package/src/iconography/relation.tsx +2 -6
- package/src/iconography/remove.tsx +2 -6
- package/src/iconography/renew.tsx +2 -6
- package/src/iconography/restricted-catalogue.tsx +2 -5
- package/src/iconography/rich-text.tsx +2 -6
- package/src/iconography/rocket.tsx +2 -6
- package/src/iconography/search.tsx +2 -6
- package/src/iconography/select.tsx +20 -0
- package/src/iconography/selection.tsx +2 -6
- package/src/iconography/settings.tsx +2 -6
- package/src/iconography/shapes.tsx +2 -6
- package/src/iconography/singleline.tsx +2 -6
- package/src/iconography/special-price.tsx +2 -6
- package/src/iconography/split.tsx +2 -6
- package/src/iconography/stock-location.tsx +2 -6
- package/src/iconography/string.tsx +16 -0
- package/src/iconography/subscription-contracts.tsx +43 -49
- package/src/iconography/subscription-plans.tsx +2 -6
- package/src/iconography/subscription.tsx +2 -6
- package/src/iconography/switch.tsx +2 -6
- package/src/iconography/target.tsx +2 -6
- package/src/iconography/topics-branch.tsx +2 -6
- package/src/iconography/topics-leaf.tsx +2 -6
- package/src/iconography/topics.tsx +2 -6
- package/src/iconography/transition-in-disabled.tsx +2 -6
- package/src/iconography/transition-in.tsx +2 -6
- package/src/iconography/transition-out-disabled.tsx +13 -19
- package/src/iconography/transition-out.tsx +2 -6
- package/src/iconography/unpublish.tsx +2 -6
- package/src/iconography/usage-meter.tsx +4 -8
- package/src/iconography/usage.tsx +2 -6
- package/src/iconography/user-card.tsx +2 -6
- package/src/iconography/user.tsx +2 -6
- package/src/iconography/users.tsx +2 -6
- package/src/iconography/variant.tsx +2 -6
- package/src/iconography/video.tsx +2 -6
- package/src/iconography/wand.tsx +2 -6
- package/src/iconography/warning.tsx +2 -5
- package/src/iconography/x-for-y.tsx +2 -6
- package/src/label/label.tsx +1 -1
- package/src/popover/popover.tsx +5 -6
- package/src/rich-text-editor/tests/rich-text-editor-basic-rendering.test.tsx +8 -6
- package/src/rich-text-editor/tests/rich-text-editor-code.test.tsx +1 -1
- package/src/rich-text-editor/tests/rich-text-editor-onchange.test.tsx +4 -18
- package/src/rich-text-editor/tests/rich-text-editor-quote.test.tsx +2 -1
- package/src/rich-text-editor/tests/rich-text-editor-typing.test.tsx +6 -4
- package/src/rich-text-editor/tests/utils.ts +3 -1
- package/src/select/select-root.tsx +2 -2
- package/src/spinner/index.tsx +3 -3
- package/src/tag/tag.tsx +2 -2
- package/src/tooltip/tooltip.tsx +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
showError,
|
|
18
18
|
showInfo,
|
|
19
19
|
showWarning
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-D4B2KPZR.mjs";
|
|
21
21
|
import "./chunk-NIH5ZMPE.mjs";
|
|
22
22
|
|
|
23
23
|
// src/card/card.tsx
|
|
@@ -36,12 +36,7 @@ var cardStyles = cva("c-card", {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
var Card = forwardRef(({ children, className, variant, ...delegated }, ref) => {
|
|
39
|
-
return /* @__PURE__ */ jsx("section", {
|
|
40
|
-
ref,
|
|
41
|
-
className: cardStyles({ variant, className }),
|
|
42
|
-
...delegated,
|
|
43
|
-
children
|
|
44
|
-
});
|
|
39
|
+
return /* @__PURE__ */ jsx("section", { ref, className: cardStyles({ variant, className }), ...delegated, children });
|
|
45
40
|
});
|
|
46
41
|
|
|
47
42
|
// src/card/index.ts
|
|
@@ -74,16 +69,7 @@ var avatarClassName = cva2(["c-avatar"], {
|
|
|
74
69
|
}
|
|
75
70
|
});
|
|
76
71
|
var Avatar = forwardRef2(({ name, size, className, ...delegated }, ref) => {
|
|
77
|
-
return /* @__PURE__ */ jsx2("div", {
|
|
78
|
-
ref,
|
|
79
|
-
...delegated,
|
|
80
|
-
title: name,
|
|
81
|
-
className: avatarClassName({ size, className }),
|
|
82
|
-
children: /* @__PURE__ */ jsx2("span", {
|
|
83
|
-
className: "c-avatar-initials",
|
|
84
|
-
children: getInitials(name)
|
|
85
|
-
})
|
|
86
|
-
});
|
|
72
|
+
return /* @__PURE__ */ jsx2("div", { ref, ...delegated, title: name, className: avatarClassName({ size, className }), children: /* @__PURE__ */ jsx2("span", { className: "c-avatar-initials", children: getInitials(name) }) });
|
|
87
73
|
});
|
|
88
74
|
Avatar.displayName = "Avatar";
|
|
89
75
|
|
|
@@ -92,28 +78,22 @@ import { forwardRef as forwardRef3 } from "react";
|
|
|
92
78
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
93
79
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
94
80
|
var Checkbox = forwardRef3((props, ref) => {
|
|
95
|
-
return /* @__PURE__ */ jsx3(CheckboxPrimitive.Root, {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
d: "M7.883 1.087c.043.03.053.09.023.132L3.669 7.132l-.154-.105L7.754 1.11a.093.093 0 01.129-.023z"
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
});
|
|
81
|
+
return /* @__PURE__ */ jsx3(CheckboxPrimitive.Root, { ...props, ref, className: "c-checkbox", children: /* @__PURE__ */ jsx3(CheckboxPrimitive.Indicator, { children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 9 9", fill: "none", className: "c-checkbox__svg", children: [
|
|
82
|
+
/* @__PURE__ */ jsx3(
|
|
83
|
+
"path",
|
|
84
|
+
{
|
|
85
|
+
className: "c-checkbox__svg-p1",
|
|
86
|
+
d: "M1.12 5.51a.559.559 0 01.832-.101l2.201 1.953-.427.624a.326.326 0 01-.486.06L1.21 6.245a.559.559 0 01-.09-.734z"
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsx3(
|
|
90
|
+
"path",
|
|
91
|
+
{
|
|
92
|
+
className: "c-checkbox__svg-p2",
|
|
93
|
+
d: "M7.883 1.087c.043.03.053.09.023.132L3.669 7.132l-.154-.105L7.754 1.11a.093.093 0 01.129-.023z"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }) }) });
|
|
117
97
|
});
|
|
118
98
|
Checkbox.displayName = "Checkbox";
|
|
119
99
|
|
|
@@ -122,10 +102,7 @@ import { cx } from "class-variance-authority";
|
|
|
122
102
|
import * as CollapsiblePrimitives from "@radix-ui/react-collapsible";
|
|
123
103
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
124
104
|
function Content2({ className, ...delegated }) {
|
|
125
|
-
return /* @__PURE__ */ jsx4(CollapsiblePrimitives.Content, {
|
|
126
|
-
...delegated,
|
|
127
|
-
className: cx("c-collapsible-content", className)
|
|
128
|
-
});
|
|
105
|
+
return /* @__PURE__ */ jsx4(CollapsiblePrimitives.Content, { ...delegated, className: cx("c-collapsible-content", className) });
|
|
129
106
|
}
|
|
130
107
|
function CollapsibleTrigger({
|
|
131
108
|
children,
|
|
@@ -134,26 +111,23 @@ function CollapsibleTrigger({
|
|
|
134
111
|
mode,
|
|
135
112
|
...delegated
|
|
136
113
|
}) {
|
|
137
|
-
return /* @__PURE__ */ jsx4(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
width: 9,
|
|
151
|
-
height: 9
|
|
152
|
-
}),
|
|
114
|
+
return /* @__PURE__ */ jsx4(
|
|
115
|
+
CollapsiblePrimitives.Trigger,
|
|
116
|
+
{
|
|
117
|
+
asChild: true,
|
|
118
|
+
...delegated,
|
|
119
|
+
className: cx(
|
|
120
|
+
"c-collapsible-trigger",
|
|
121
|
+
arrowPosition === "right" ? "arrow-right" : "",
|
|
122
|
+
mode === "tree" ? "c-collapsible-tree" : "",
|
|
123
|
+
className
|
|
124
|
+
),
|
|
125
|
+
children: /* @__PURE__ */ jsxs2("div", { children: [
|
|
126
|
+
arrowPosition && /* @__PURE__ */ jsx4(Icon.Caret, { className: "c-collapsible-arrow", width: 9, height: 9 }),
|
|
153
127
|
children
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
|
|
128
|
+
] })
|
|
129
|
+
}
|
|
130
|
+
);
|
|
157
131
|
}
|
|
158
132
|
var Collapsible = {
|
|
159
133
|
Root: CollapsiblePrimitives.Root,
|
|
@@ -179,20 +153,10 @@ var inlineRadioGroupStyles = cva3("c-inline-radio-group", {
|
|
|
179
153
|
}
|
|
180
154
|
});
|
|
181
155
|
function InlineRadioGroup({ size, className, ...delegated }) {
|
|
182
|
-
return /* @__PURE__ */ jsx5(RadioGroupPrimitive.Root, {
|
|
183
|
-
...delegated,
|
|
184
|
-
className: inlineRadioGroupStyles({ size, className })
|
|
185
|
-
});
|
|
156
|
+
return /* @__PURE__ */ jsx5(RadioGroupPrimitive.Root, { ...delegated, className: inlineRadioGroupStyles({ size, className }) });
|
|
186
157
|
}
|
|
187
158
|
function InlineRadioItem({ children, className, ...delegated }) {
|
|
188
|
-
return /* @__PURE__ */ jsx5(RadioGroupPrimitive.Item, {
|
|
189
|
-
...delegated,
|
|
190
|
-
className: cx2("c-inline-radio", className),
|
|
191
|
-
children: /* @__PURE__ */ jsx5(RadioGroupPrimitive.Indicator, {
|
|
192
|
-
forceMount: true,
|
|
193
|
-
children
|
|
194
|
-
})
|
|
195
|
-
});
|
|
159
|
+
return /* @__PURE__ */ jsx5(RadioGroupPrimitive.Item, { ...delegated, className: cx2("c-inline-radio", className), children: /* @__PURE__ */ jsx5(RadioGroupPrimitive.Indicator, { forceMount: true, children }) });
|
|
196
160
|
}
|
|
197
161
|
var InlineRadio = {
|
|
198
162
|
Group: InlineRadioGroup,
|
|
@@ -208,14 +172,7 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
|
208
172
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
209
173
|
function PopoverClose(props) {
|
|
210
174
|
const { asChild, children } = props;
|
|
211
|
-
return /* @__PURE__ */ jsx6(PopoverPrimitive.Close, {
|
|
212
|
-
asChild,
|
|
213
|
-
className: "c-popover-close",
|
|
214
|
-
children: children ?? /* @__PURE__ */ jsx6(Icon.Cancel, {
|
|
215
|
-
width: 16,
|
|
216
|
-
height: 16
|
|
217
|
-
})
|
|
218
|
-
});
|
|
175
|
+
return /* @__PURE__ */ jsx6(PopoverPrimitive.Close, { asChild, className: "c-popover-close", children: children ?? /* @__PURE__ */ jsx6(Icon.Cancel, { width: 16, height: 16 }) });
|
|
219
176
|
}
|
|
220
177
|
|
|
221
178
|
// src/popover/popover.tsx
|
|
@@ -232,35 +189,14 @@ function Popover({
|
|
|
232
189
|
hasArrow = true,
|
|
233
190
|
...delegatedContent
|
|
234
191
|
}) {
|
|
235
|
-
return /* @__PURE__ */ jsxs3(PopoverPrimitive2.Root, {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */ jsx7(PopoverPrimitive2.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */ jsx7(PopoverPrimitive2.Portal, {
|
|
244
|
-
container,
|
|
245
|
-
children: /* @__PURE__ */ jsxs3(PopoverPrimitive2.Content, {
|
|
246
|
-
...delegatedContent,
|
|
247
|
-
side,
|
|
248
|
-
className: cx3("c-popover-content", className),
|
|
249
|
-
children: [
|
|
250
|
-
!closeButton ? null : /* @__PURE__ */ jsx7(PopoverClose, {
|
|
251
|
-
asChild: typeof closeButton !== "boolean",
|
|
252
|
-
children: typeof closeButton !== "boolean" ? closeButton : null
|
|
253
|
-
}),
|
|
254
|
-
hasArrow && /* @__PURE__ */ jsx7(PopoverPrimitive2.Arrow, {
|
|
255
|
-
className: "c-popover-arrow",
|
|
256
|
-
offset: 5
|
|
257
|
-
}),
|
|
258
|
-
content
|
|
259
|
-
]
|
|
260
|
-
})
|
|
261
|
-
})
|
|
262
|
-
]
|
|
263
|
-
});
|
|
192
|
+
return /* @__PURE__ */ jsxs3(PopoverPrimitive2.Root, { open, onOpenChange, children: [
|
|
193
|
+
/* @__PURE__ */ jsx7(PopoverPrimitive2.Trigger, { asChild: true, children }),
|
|
194
|
+
/* @__PURE__ */ jsx7(PopoverPrimitive2.Portal, { container, children: /* @__PURE__ */ jsxs3(PopoverPrimitive2.Content, { ...delegatedContent, side, className: cx3("c-popover-content", className), children: [
|
|
195
|
+
!closeButton ? null : /* @__PURE__ */ jsx7(PopoverClose, { asChild: typeof closeButton !== "boolean", children: typeof closeButton !== "boolean" ? closeButton : null }),
|
|
196
|
+
hasArrow && /* @__PURE__ */ jsx7(PopoverPrimitive2.Arrow, { className: "c-popover-arrow", offset: 5 }),
|
|
197
|
+
content
|
|
198
|
+
] }) })
|
|
199
|
+
] });
|
|
264
200
|
}
|
|
265
201
|
|
|
266
202
|
// src/progress/progress.tsx
|
|
@@ -268,27 +204,20 @@ import { cx as cx4 } from "class-variance-authority";
|
|
|
268
204
|
import * as ProgressPrimitives from "@radix-ui/react-progress";
|
|
269
205
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
270
206
|
function Progress({ className, value }) {
|
|
271
|
-
return /* @__PURE__ */ jsx8(ProgressPrimitives.Root, {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
children: /* @__PURE__ */ jsx8(ProgressPrimitives.Indicator, {
|
|
207
|
+
return /* @__PURE__ */ jsx8(ProgressPrimitives.Root, { className: cx4(className, "c-progress-root"), value, children: /* @__PURE__ */ jsx8(
|
|
208
|
+
ProgressPrimitives.Indicator,
|
|
209
|
+
{
|
|
275
210
|
className: "c-progress-indicator",
|
|
276
211
|
style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
|
|
277
|
-
}
|
|
278
|
-
});
|
|
212
|
+
}
|
|
213
|
+
) });
|
|
279
214
|
}
|
|
280
215
|
|
|
281
216
|
// src/radio/radio.tsx
|
|
282
217
|
import * as RadioGroupPrimitive2 from "@radix-ui/react-radio-group";
|
|
283
218
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
284
219
|
function RadioGroupItem(props) {
|
|
285
|
-
return /* @__PURE__ */ jsx9(RadioGroupPrimitive2.Item, {
|
|
286
|
-
...props,
|
|
287
|
-
className: "c-radio-item",
|
|
288
|
-
children: /* @__PURE__ */ jsx9(RadioGroupPrimitive2.Indicator, {
|
|
289
|
-
className: "c-radio-indicator"
|
|
290
|
-
})
|
|
291
|
-
});
|
|
220
|
+
return /* @__PURE__ */ jsx9(RadioGroupPrimitive2.Item, { ...props, className: "c-radio-item", children: /* @__PURE__ */ jsx9(RadioGroupPrimitive2.Indicator, { className: "c-radio-indicator" }) });
|
|
292
221
|
}
|
|
293
222
|
var Radio = {
|
|
294
223
|
Group: RadioGroupPrimitive2.Root,
|
|
@@ -302,17 +231,10 @@ import * as SelectPrimitives from "@radix-ui/react-select";
|
|
|
302
231
|
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
303
232
|
var SelectItem = forwardRef4((props, ref) => {
|
|
304
233
|
const { children, className, ...delegated } = props;
|
|
305
|
-
return /* @__PURE__ */ jsxs4(SelectPrimitives.Item, {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
children: [
|
|
310
|
-
/* @__PURE__ */ jsx10(SelectPrimitives.ItemText, {
|
|
311
|
-
children
|
|
312
|
-
}),
|
|
313
|
-
/* @__PURE__ */ jsx10(SelectPrimitives.ItemIndicator, {})
|
|
314
|
-
]
|
|
315
|
-
});
|
|
234
|
+
return /* @__PURE__ */ jsxs4(SelectPrimitives.Item, { className: cx5("c-select-item", className), ref, ...delegated, children: [
|
|
235
|
+
/* @__PURE__ */ jsx10(SelectPrimitives.ItemText, { children }),
|
|
236
|
+
/* @__PURE__ */ jsx10(SelectPrimitives.ItemIndicator, {})
|
|
237
|
+
] });
|
|
316
238
|
});
|
|
317
239
|
SelectItem.displayName = "SelectItem";
|
|
318
240
|
|
|
@@ -336,39 +258,26 @@ var selectTriggerStyles = cva4("c-select-trigger", {
|
|
|
336
258
|
});
|
|
337
259
|
var SelectContainer = forwardRef5(
|
|
338
260
|
({ children, id, placeholder, disabled, size, triggerClassName, ...delegated }, ref) => {
|
|
339
|
-
return /* @__PURE__ */ jsxs5(SelectPrimitives2.Root, {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
261
|
+
return /* @__PURE__ */ jsxs5(SelectPrimitives2.Root, { ...delegated, children: [
|
|
262
|
+
/* @__PURE__ */ jsxs5(
|
|
263
|
+
SelectPrimitives2.Trigger,
|
|
264
|
+
{
|
|
343
265
|
ref,
|
|
344
266
|
className: selectTriggerStyles({ size, className: triggerClassName }),
|
|
345
267
|
disabled,
|
|
346
268
|
id,
|
|
347
269
|
children: [
|
|
348
|
-
/* @__PURE__ */ jsx11(SelectPrimitives2.Value, {
|
|
349
|
-
placeholder: /* @__PURE__ */ jsx11("span", {
|
|
350
|
-
className: "c-select-value",
|
|
351
|
-
children: placeholder ?? "Select..."
|
|
352
|
-
})
|
|
353
|
-
}),
|
|
270
|
+
/* @__PURE__ */ jsx11(SelectPrimitives2.Value, { placeholder: /* @__PURE__ */ jsx11("span", { className: "c-select-value", children: placeholder ?? "Select..." }) }),
|
|
354
271
|
/* @__PURE__ */ jsx11(Icon.Arrow, {})
|
|
355
272
|
]
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
children
|
|
365
|
-
}),
|
|
366
|
-
/* @__PURE__ */ jsx11(SelectPrimitives2.ScrollDownButton, {})
|
|
367
|
-
]
|
|
368
|
-
})
|
|
369
|
-
})
|
|
370
|
-
]
|
|
371
|
-
});
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
/* @__PURE__ */ jsx11(SelectPrimitives2.Portal, { children: /* @__PURE__ */ jsxs5(SelectPrimitives2.Content, { className: "c-select-content", children: [
|
|
276
|
+
/* @__PURE__ */ jsx11(SelectPrimitives2.ScrollUpButton, {}),
|
|
277
|
+
/* @__PURE__ */ jsx11(SelectPrimitives2.Viewport, { className: "c-select-viewport", children }),
|
|
278
|
+
/* @__PURE__ */ jsx11(SelectPrimitives2.ScrollDownButton, {})
|
|
279
|
+
] }) })
|
|
280
|
+
] });
|
|
372
281
|
}
|
|
373
282
|
);
|
|
374
283
|
SelectContainer.displayName = "Select";
|
|
@@ -385,41 +294,19 @@ import { cx as cx6 } from "class-variance-authority";
|
|
|
385
294
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
386
295
|
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
387
296
|
var Slider = forwardRef6(({ className, transparentRange, ...delegated }, ref) => {
|
|
388
|
-
return /* @__PURE__ */ jsxs6(SliderPrimitive.Root, {
|
|
389
|
-
className:
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
children: [
|
|
393
|
-
/* @__PURE__ */ jsx12(SliderPrimitive.Track, {
|
|
394
|
-
className: "c-slider-track",
|
|
395
|
-
children: /* @__PURE__ */ jsx12(SliderPrimitive.Range, {
|
|
396
|
-
className: `c-slider-range ${transparentRange ? "c-slider-range-transparent" : ""}`
|
|
397
|
-
})
|
|
398
|
-
}),
|
|
399
|
-
/* @__PURE__ */ jsx12(SliderPrimitive.Thumb, {
|
|
400
|
-
className: "c-slider-thumb"
|
|
401
|
-
})
|
|
402
|
-
]
|
|
403
|
-
});
|
|
297
|
+
return /* @__PURE__ */ jsxs6(SliderPrimitive.Root, { className: cx6("c-slider-root", className), ref, ...delegated, children: [
|
|
298
|
+
/* @__PURE__ */ jsx12(SliderPrimitive.Track, { className: "c-slider-track", children: /* @__PURE__ */ jsx12(SliderPrimitive.Range, { className: `c-slider-range ${transparentRange ? "c-slider-range-transparent" : ""}` }) }),
|
|
299
|
+
/* @__PURE__ */ jsx12(SliderPrimitive.Thumb, { className: "c-slider-thumb" })
|
|
300
|
+
] });
|
|
404
301
|
});
|
|
405
302
|
|
|
406
303
|
// src/stack-icon/stack-icon.tsx
|
|
407
304
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
408
305
|
function StackIcon({ type, children, size = 18 }) {
|
|
409
|
-
return /* @__PURE__ */ jsxs7("span", {
|
|
410
|
-
className: "c-stack-
|
|
411
|
-
children
|
|
412
|
-
|
|
413
|
-
style: { width: size, height: size },
|
|
414
|
-
className: "c-stack-icon__icon",
|
|
415
|
-
children: /* @__PURE__ */ jsx13(Icon.Add, {
|
|
416
|
-
width: size - 4,
|
|
417
|
-
height: size - 4
|
|
418
|
-
})
|
|
419
|
-
}),
|
|
420
|
-
children
|
|
421
|
-
]
|
|
422
|
-
});
|
|
306
|
+
return /* @__PURE__ */ jsxs7("span", { className: "c-stack-icon", children: [
|
|
307
|
+
type === "create" && /* @__PURE__ */ jsx13("span", { style: { width: size, height: size }, className: "c-stack-icon__icon", children: /* @__PURE__ */ jsx13(Icon.Add, { width: size - 4, height: size - 4 }) }),
|
|
308
|
+
children
|
|
309
|
+
] });
|
|
423
310
|
}
|
|
424
311
|
|
|
425
312
|
// src/tag/tag.tsx
|
|
@@ -454,16 +341,12 @@ function Tag({
|
|
|
454
341
|
showRemoveOnHover,
|
|
455
342
|
...delegated
|
|
456
343
|
}) {
|
|
457
|
-
return /* @__PURE__ */ jsxs8("div", {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
children: prepend
|
|
464
|
-
}),
|
|
465
|
-
children,
|
|
466
|
-
onRemove && /* @__PURE__ */ jsxs8("button", {
|
|
344
|
+
return /* @__PURE__ */ jsxs8("div", { className: tagStyles({ className, variant, size }), ...delegated, children: [
|
|
345
|
+
!prepend ? null : /* @__PURE__ */ jsx14("span", { className: "c-tag__prepend", children: prepend }),
|
|
346
|
+
children,
|
|
347
|
+
onRemove && /* @__PURE__ */ jsxs8(
|
|
348
|
+
"button",
|
|
349
|
+
{
|
|
467
350
|
type: "button",
|
|
468
351
|
className: cx7("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
|
|
469
352
|
onClick: (e) => {
|
|
@@ -471,31 +354,20 @@ function Tag({
|
|
|
471
354
|
onRemove();
|
|
472
355
|
},
|
|
473
356
|
children: [
|
|
474
|
-
/* @__PURE__ */ jsx14(Icon.Cancel, {
|
|
475
|
-
|
|
476
|
-
height: 12
|
|
477
|
-
}),
|
|
478
|
-
/* @__PURE__ */ jsx14("span", {
|
|
479
|
-
className: "c-tag__remove-button-text",
|
|
480
|
-
children: "Remove"
|
|
481
|
-
})
|
|
357
|
+
/* @__PURE__ */ jsx14(Icon.Cancel, { width: 12, height: 12 }),
|
|
358
|
+
/* @__PURE__ */ jsx14("span", { className: "c-tag__remove-button-text", children: "Remove" })
|
|
482
359
|
]
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
});
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
] });
|
|
486
363
|
}
|
|
487
364
|
|
|
488
365
|
// src/rich-text-editor/index.tsx
|
|
489
366
|
import { lazy, Suspense } from "react";
|
|
490
367
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
491
|
-
var LazyRichTextEditor = lazy(() => import("./rich-text-editor-
|
|
368
|
+
var LazyRichTextEditor = lazy(() => import("./rich-text-editor-QIDU7APE.mjs"));
|
|
492
369
|
var RichTextEditor = (props) => {
|
|
493
|
-
return /* @__PURE__ */ jsx15(Suspense, {
|
|
494
|
-
fallback: null,
|
|
495
|
-
children: /* @__PURE__ */ jsx15(LazyRichTextEditor, {
|
|
496
|
-
...props
|
|
497
|
-
})
|
|
498
|
-
});
|
|
370
|
+
return /* @__PURE__ */ jsx15(Suspense, { fallback: null, children: /* @__PURE__ */ jsx15(LazyRichTextEditor, { ...props }) });
|
|
499
371
|
};
|
|
500
372
|
|
|
501
373
|
// src/toast/index.ts
|
|
@@ -529,42 +401,21 @@ var toast = ({ title, message, id, type = "success", timeout = 6e3 }) => {
|
|
|
529
401
|
const withMessage = !!message;
|
|
530
402
|
const toastId = id ?? Date.now().toString();
|
|
531
403
|
sonnerToast.custom(
|
|
532
|
-
(id2) => /* @__PURE__ */ jsxs9(
|
|
533
|
-
"
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
children:
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}),
|
|
548
|
-
!!message && /* @__PURE__ */ jsx16("div", {
|
|
549
|
-
className: "c-toast-message",
|
|
550
|
-
children: message
|
|
551
|
-
})
|
|
552
|
-
]
|
|
553
|
-
}),
|
|
554
|
-
/* @__PURE__ */ jsx16("div", {
|
|
555
|
-
className: "c-toast-close",
|
|
556
|
-
"data-testid": "toast-close",
|
|
557
|
-
children: /* @__PURE__ */ jsx16(IconButton, {
|
|
558
|
-
onClick: () => sonnerToast.dismiss(id2),
|
|
559
|
-
size: "xs",
|
|
560
|
-
children: /* @__PURE__ */ jsx16(Icon.Cancel, {
|
|
561
|
-
width: 12,
|
|
562
|
-
height: 12
|
|
563
|
-
})
|
|
564
|
-
})
|
|
565
|
-
})
|
|
566
|
-
]
|
|
567
|
-
}),
|
|
404
|
+
(id2) => /* @__PURE__ */ jsxs9(
|
|
405
|
+
"div",
|
|
406
|
+
{
|
|
407
|
+
"data-testid": `toast-${type}`,
|
|
408
|
+
className: cx8(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(ToastIcon, { width: 26, height: 26 }) }),
|
|
411
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
412
|
+
/* @__PURE__ */ jsx16("div", { className: "c-toast-title", children: title }),
|
|
413
|
+
!!message && /* @__PURE__ */ jsx16("div", { className: "c-toast-message", children: message })
|
|
414
|
+
] }),
|
|
415
|
+
/* @__PURE__ */ jsx16("div", { className: "c-toast-close", "data-testid": "toast-close", children: /* @__PURE__ */ jsx16(IconButton, { onClick: () => sonnerToast.dismiss(id2), size: "xs", children: /* @__PURE__ */ jsx16(Icon.Cancel, { width: 12, height: 12 }) }) })
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
),
|
|
568
419
|
{
|
|
569
420
|
id: toastId,
|
|
570
421
|
duration: timeout,
|
|
@@ -591,14 +442,7 @@ var switchStyles = cva7(["c-switch-root"], {
|
|
|
591
442
|
}
|
|
592
443
|
});
|
|
593
444
|
function Switch({ size, checked, ...props }) {
|
|
594
|
-
return /* @__PURE__ */ jsx17(RadixSwitch.Root, {
|
|
595
|
-
...props,
|
|
596
|
-
checked: checked === null ? false : checked,
|
|
597
|
-
className: switchStyles({ size }),
|
|
598
|
-
children: /* @__PURE__ */ jsx17(RadixSwitch.Thumb, {
|
|
599
|
-
className: cx9("c-switch-thumb", checked === null ? "middle-position" : "")
|
|
600
|
-
})
|
|
601
|
-
});
|
|
445
|
+
return /* @__PURE__ */ jsx17(RadixSwitch.Root, { ...props, checked: checked === null ? false : checked, className: switchStyles({ size }), children: /* @__PURE__ */ jsx17(RadixSwitch.Thumb, { className: cx9("c-switch-thumb", checked === null ? "middle-position" : "") }) });
|
|
602
446
|
}
|
|
603
447
|
|
|
604
448
|
// src/color-picker/color-picker.tsx
|
|
@@ -803,50 +647,36 @@ function ColorPicker({ value, setValue, children, isOpen, setIsOpen }) {
|
|
|
803
647
|
};
|
|
804
648
|
const handleMouseEnter = (colorValue) => setHoveredColor(colorValue);
|
|
805
649
|
const handleMouseLeave = () => setHoveredColor(null);
|
|
806
|
-
return /* @__PURE__ */ jsx18(
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
className: " border border-solid border-border p-5",
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
className: "
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
className: "
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
onMouseEnter: () => handleMouseEnter(colorValue),
|
|
837
|
-
onMouseLeave: handleMouseLeave,
|
|
838
|
-
children: /* @__PURE__ */ jsx18("div", {
|
|
839
|
-
className: "h-5 w-5",
|
|
840
|
-
style: { backgroundColor: colorValue }
|
|
841
|
-
})
|
|
842
|
-
}, colorValue);
|
|
843
|
-
})
|
|
844
|
-
}, colorName))
|
|
845
|
-
})
|
|
846
|
-
]
|
|
847
|
-
}),
|
|
848
|
-
children
|
|
849
|
-
});
|
|
650
|
+
return /* @__PURE__ */ jsx18(
|
|
651
|
+
Popover,
|
|
652
|
+
{
|
|
653
|
+
open: isOpen,
|
|
654
|
+
side: "bottom",
|
|
655
|
+
hasArrow: true,
|
|
656
|
+
onOpenChange: setIsOpen,
|
|
657
|
+
content: /* @__PURE__ */ jsxs10(Card, { variant: "elevate", className: " border border-solid border-border p-5", children: [
|
|
658
|
+
/* @__PURE__ */ jsxs10("div", { className: "mb-3", children: [
|
|
659
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-bold capitalize", children: displayedColorInfo }),
|
|
660
|
+
/* @__PURE__ */ jsx18("span", { className: "ml-4 text-sm italic text-gray-500-400", children: hoveredColor ?? value })
|
|
661
|
+
] }),
|
|
662
|
+
/* @__PURE__ */ jsx18("div", { className: "grid grid-cols-12", children: ORDERED_COLOR_NAMES.map((colorName) => /* @__PURE__ */ jsx18("div", { children: SHADES.map((shade) => {
|
|
663
|
+
const colorValue = colors_default[colorName][shade];
|
|
664
|
+
return /* @__PURE__ */ jsx18(
|
|
665
|
+
"div",
|
|
666
|
+
{
|
|
667
|
+
className: "cursor-pointer rounded p-0.5",
|
|
668
|
+
onClick: () => handleColorSelect(colorValue),
|
|
669
|
+
onMouseEnter: () => handleMouseEnter(colorValue),
|
|
670
|
+
onMouseLeave: handleMouseLeave,
|
|
671
|
+
children: /* @__PURE__ */ jsx18("div", { className: "h-5 w-5", style: { backgroundColor: colorValue } })
|
|
672
|
+
},
|
|
673
|
+
colorValue
|
|
674
|
+
);
|
|
675
|
+
}) }, colorName)) })
|
|
676
|
+
] }),
|
|
677
|
+
children
|
|
678
|
+
}
|
|
679
|
+
);
|
|
850
680
|
}
|
|
851
681
|
|
|
852
682
|
// src/index.ts
|