@vlrc-fe/components 3.0.4 → 3.0.6
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 +19 -0
- package/dist/ConfirmModal.cjs +30 -32
- package/dist/ConfirmModal.d.ts +3 -7
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/ConfirmModal.js +31 -32
- package/dist/Modal.cjs +3 -4
- package/dist/Modal.d.ts +1 -3
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +3 -4
- package/dist/MultiSelect/MultiSelect.cjs +0 -1
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.js +0 -1
- package/dist/MultiSelect/useMultiSelect.cjs +1 -0
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.js +1 -0
- package/dist/MultiSelect/utils.cjs +2 -2
- package/dist/MultiSelect/utils.js +2 -2
- package/dist/Typography/Link.cjs +3 -5
- package/dist/Typography/Link.d.ts +1 -1
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Link.js +3 -5
- package/dist/Typography/Paragraph.cjs +3 -5
- package/dist/Typography/Paragraph.d.ts +1 -1
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Paragraph.js +3 -5
- package/dist/Typography/Text.cjs +3 -4
- package/dist/Typography/Text.d.ts +1 -1
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Text.js +4 -5
- package/dist/Typography/Title.cjs +4 -4
- package/dist/Typography/Title.d.ts +1 -1
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/Title.js +5 -5
- package/dist/Typography/Typography.d.ts +8 -4
- package/dist/Typography/Typography.d.ts.map +1 -1
- package/dist/Typography/index.d.ts +0 -3
- package/dist/Typography/index.d.ts.map +1 -1
- package/dist/Typography/index.js +1 -4
- package/dist/Typography/types.d.ts +4 -0
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/assets/stylex.css +32 -8
- package/dist/astryx.cjs +1 -10
- package/dist/astryx.d.ts +0 -1
- package/dist/astryx.d.ts.map +1 -1
- package/dist/astryx.js +0 -2
- package/dist/index.cjs +2 -12
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -6
- package/dist/layout/Box.cjs +44 -67
- package/dist/layout/Box.d.ts +3 -5
- package/dist/layout/Box.d.ts.map +1 -1
- package/dist/layout/Box.js +44 -67
- package/dist/layout/Center.cjs +13 -24
- package/dist/layout/Center.d.ts +2 -2
- package/dist/layout/Center.d.ts.map +1 -1
- package/dist/layout/Center.js +13 -24
- package/dist/layout/Container.cjs +21 -10
- package/dist/layout/Container.d.ts +3 -5
- package/dist/layout/Container.d.ts.map +1 -1
- package/dist/layout/Container.js +21 -10
- package/dist/layout/Stack.cjs +55 -93
- package/dist/layout/Stack.d.ts +5 -5
- package/dist/layout/Stack.d.ts.map +1 -1
- package/dist/layout/Stack.js +55 -93
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/lazyLoad.cjs +1 -1
- package/dist/lazyLoad.d.ts.map +1 -1
- package/dist/lazyLoad.js +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/zIndex.cjs +0 -2
- package/dist/theme/zIndex.d.ts +4 -4
- package/dist/theme/zIndex.d.ts.map +1 -1
- package/dist/theme.css +32 -8
- package/dist/ui/aspect-ratio.cjs +0 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +0 -1
- package/dist/ui/avatar.cjs +0 -1
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +0 -1
- package/dist/ui/calendar.cjs +0 -1
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/calendar.js +0 -1
- package/dist/ui/carousel.cjs +0 -1
- package/dist/ui/carousel.d.ts.map +1 -1
- package/dist/ui/carousel.js +0 -1
- package/dist/ui/checkbox.cjs +4 -8
- package/dist/ui/checkbox.d.ts +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +5 -9
- package/dist/ui/circular-progress.cjs +25 -20
- package/dist/ui/circular-progress.d.ts +3 -3
- package/dist/ui/circular-progress.d.ts.map +1 -1
- package/dist/ui/circular-progress.js +25 -20
- package/dist/ui/code-block.cjs +180 -176
- package/dist/ui/code-block.d.ts +17 -9
- package/dist/ui/code-block.d.ts.map +1 -1
- package/dist/ui/code-block.js +181 -177
- package/dist/ui/collapsible.cjs +0 -1
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +0 -1
- package/dist/ui/compare-slider.cjs +2 -3
- package/dist/ui/compare-slider.d.ts +3 -2
- package/dist/ui/compare-slider.d.ts.map +1 -1
- package/dist/ui/compare-slider.js +3 -4
- package/dist/ui/context-menu.cjs +0 -1
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +0 -1
- package/dist/ui/copy-button.cjs +2 -3
- package/dist/ui/copy-button.d.ts +1 -1
- package/dist/ui/copy-button.d.ts.map +1 -1
- package/dist/ui/copy-button.js +3 -4
- package/dist/ui/dialog.cjs +2 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +2 -0
- package/dist/ui/drawer.cjs +2 -0
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +2 -0
- package/dist/ui/editable.cjs +1 -0
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/editable.js +1 -0
- package/dist/ui/empty.cjs +37 -52
- package/dist/ui/empty.d.ts +5 -5
- package/dist/ui/empty.d.ts.map +1 -1
- package/dist/ui/empty.js +38 -53
- package/dist/ui/file-upload.cjs +0 -1
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +0 -1
- package/dist/ui/flex.cjs +3 -4
- package/dist/ui/flex.d.ts +3 -2
- package/dist/ui/flex.d.ts.map +1 -1
- package/dist/ui/flex.js +3 -4
- package/dist/ui/form.cjs +0 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +0 -1
- package/dist/ui/gauge.cjs +2 -4
- package/dist/ui/gauge.d.ts +3 -2
- package/dist/ui/gauge.d.ts.map +1 -1
- package/dist/ui/gauge.js +2 -4
- package/dist/ui/grid.cjs +7 -7
- package/dist/ui/grid.d.ts +7 -3
- package/dist/ui/grid.d.ts.map +1 -1
- package/dist/ui/grid.js +7 -8
- package/dist/ui/hover-card.cjs +0 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +0 -1
- package/dist/ui/input-group.cjs +17 -23
- package/dist/ui/input-group.d.ts +2 -2
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-group.js +17 -23
- package/dist/ui/marker.cjs +78 -75
- package/dist/ui/marker.d.ts +7 -4
- package/dist/ui/marker.d.ts.map +1 -1
- package/dist/ui/marker.js +79 -76
- package/dist/ui/masonry.cjs +2 -4
- package/dist/ui/masonry.d.ts +1 -1
- package/dist/ui/masonry.d.ts.map +1 -1
- package/dist/ui/masonry.js +3 -5
- package/dist/ui/menubar.cjs +0 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +0 -1
- package/dist/ui/progress.cjs +6 -5
- package/dist/ui/progress.d.ts +3 -3
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +6 -5
- package/dist/ui/questionnaire.cjs +138 -135
- package/dist/ui/questionnaire.d.ts +21 -11
- package/dist/ui/questionnaire.d.ts.map +1 -1
- package/dist/ui/questionnaire.js +139 -136
- package/dist/ui/rating.cjs +2 -3
- package/dist/ui/rating.d.ts +3 -2
- package/dist/ui/rating.d.ts.map +1 -1
- package/dist/ui/rating.js +3 -4
- package/dist/ui/resizable.cjs +0 -1
- package/dist/ui/resizable.d.ts.map +1 -1
- package/dist/ui/resizable.js +0 -1
- package/dist/ui/row-col.cjs +4 -6
- package/dist/ui/row-col.d.ts +6 -4
- package/dist/ui/row-col.d.ts.map +1 -1
- package/dist/ui/row-col.js +5 -7
- package/dist/ui/scroll-area.cjs +40 -53
- package/dist/ui/scroll-area.d.ts +1 -1
- package/dist/ui/scroll-area.d.ts.map +1 -1
- package/dist/ui/scroll-area.js +40 -53
- package/dist/ui/segmented.cjs +2 -3
- package/dist/ui/segmented.d.ts +3 -2
- package/dist/ui/segmented.d.ts.map +1 -1
- package/dist/ui/segmented.js +3 -4
- package/dist/ui/sheet.cjs +2 -0
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +2 -0
- package/dist/ui/sidebar.cjs +0 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +0 -1
- package/dist/ui/signature-pad.cjs +148 -147
- package/dist/ui/signature-pad.d.ts +17 -9
- package/dist/ui/signature-pad.d.ts.map +1 -1
- package/dist/ui/signature-pad.js +149 -148
- package/dist/ui/stat.cjs +57 -71
- package/dist/ui/stat.d.ts +8 -8
- package/dist/ui/stat.d.ts.map +1 -1
- package/dist/ui/stat.js +57 -71
- package/dist/ui/switch.cjs +4 -8
- package/dist/ui/switch.d.ts +1 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +5 -9
- package/dist/utils.cjs +1 -6
- package/dist/utils.d.ts +2 -12
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.0.6] - 2026-11-20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **ConfirmModal & Modal Prop Compatibility**:
|
|
8
|
+
- Restored backward-compatible prop aliases (`onClose`, `isOpen`, `onOk`, `variant`, `loading`, `message`) on `Modal` and `ConfirmModal` to ensure zero breaking changes across enterprise consumer applications.
|
|
9
|
+
|
|
10
|
+
## [3.0.5] - 2026-11-20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- **Modern Web Guidance & Baseline 2026 Enhancements**:
|
|
15
|
+
- Enhanced all UI primitives and composite components to meet the Modern Web Baseline 2026 standard.
|
|
16
|
+
- Eliminated redundant `forwardRef` wrappers and legacy workarounds in favor of React 19 standard ref-as-prop pattern.
|
|
17
|
+
- Refined Typography (`Text`, `Title`, `Paragraph`, `Link`) and Layout primitives (`Box`, `Stack`, `Container`, `Center`, `Flex`) with strict zero magic values, leveraging design tokens exclusively.
|
|
18
|
+
- Modernized Modal and Dialog components with accessible ARIA landmarks, CSS Anchor Positioning compatibility, and focus management.
|
|
19
|
+
- Validated 0 findings across the entire Modern Web Guidance analyzer corpus (38 qualified guides).
|
|
20
|
+
- Cleaned up redundant split files and exports across core packages for minimal footprint.
|
|
21
|
+
|
|
3
22
|
## [3.0.4] - 2026-11-19
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/ConfirmModal.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var styles = {
|
|
|
22
22
|
k1xSpc: "x78zum5",
|
|
23
23
|
kXwgrk: "xdt5ytf",
|
|
24
24
|
kOIVth: "x15iy025",
|
|
25
|
+
kZeWKH: "xish69e",
|
|
25
26
|
$$css: true
|
|
26
27
|
},
|
|
27
28
|
sizeXxs: {
|
|
@@ -151,12 +152,33 @@ var sizeStyles = {
|
|
|
151
152
|
xl: styles.sizeXl,
|
|
152
153
|
xxl: styles.sizeXxl
|
|
153
154
|
};
|
|
155
|
+
var TYPE_CONFIG = {
|
|
156
|
+
warning: {
|
|
157
|
+
Icon: require_Icons.Icons.AlertTriangle,
|
|
158
|
+
iconStyle: styles.iconWarning,
|
|
159
|
+
btnStyle: styles.btnWarning
|
|
160
|
+
},
|
|
161
|
+
info: {
|
|
162
|
+
Icon: require_Icons.Icons.Info,
|
|
163
|
+
iconStyle: styles.iconInfo,
|
|
164
|
+
btnStyle: styles.btnInfo
|
|
165
|
+
},
|
|
166
|
+
success: {
|
|
167
|
+
Icon: require_Icons.Icons.CheckCircle2,
|
|
168
|
+
iconStyle: styles.iconSuccess,
|
|
169
|
+
btnStyle: styles.btnSuccess
|
|
170
|
+
},
|
|
171
|
+
danger: {
|
|
172
|
+
Icon: require_Icons.Icons.XCircle,
|
|
173
|
+
iconStyle: styles.iconDanger,
|
|
174
|
+
btnStyle: styles.btnDanger
|
|
175
|
+
}
|
|
176
|
+
};
|
|
154
177
|
/**
|
|
155
178
|
* Confirmation dialog for critical user actions (deletions, warnings, approvals).
|
|
156
|
-
*
|
|
157
|
-
* 7-tier sizing scale, and unified prop conventions matching Modal.
|
|
179
|
+
* Built with Meta StyleX and Radix UI Dialog with native overscroll containment.
|
|
158
180
|
*/
|
|
159
|
-
function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title, message, description, children, confirmText = "Confirm", cancelText = "Cancel", closeLabel = "Close", processingText, loadingText, type, variant = "warning", isLoading, loading, size = "md", width, footer, sx, className }) {
|
|
181
|
+
function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title, message, description, children, confirmText = "Confirm", cancelText = "Cancel", closeLabel = "Close", processingText = "Processing...", loadingText, type, variant = "warning", isLoading, loading, size = "md", width, footer, sx, className }) {
|
|
160
182
|
const isModalOpen = open ?? isOpen ?? true;
|
|
161
183
|
const isPending = isLoading ?? loading ?? false;
|
|
162
184
|
const rawType = type ?? variant ?? "warning";
|
|
@@ -169,30 +191,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
169
191
|
const handleConfirm = () => {
|
|
170
192
|
if (!isPending) (onConfirm ?? onOk)?.();
|
|
171
193
|
};
|
|
172
|
-
const Icon =
|
|
173
|
-
warning: require_Icons.Icons.AlertTriangle,
|
|
174
|
-
info: require_Icons.Icons.Info,
|
|
175
|
-
success: require_Icons.Icons.CheckCircle2,
|
|
176
|
-
danger: require_Icons.Icons.XCircle
|
|
177
|
-
}[resolvedType];
|
|
178
|
-
const typeStyles = {
|
|
179
|
-
warning: {
|
|
180
|
-
icon: styles.iconWarning,
|
|
181
|
-
btn: styles.btnWarning
|
|
182
|
-
},
|
|
183
|
-
info: {
|
|
184
|
-
icon: styles.iconInfo,
|
|
185
|
-
btn: styles.btnInfo
|
|
186
|
-
},
|
|
187
|
-
success: {
|
|
188
|
-
icon: styles.iconSuccess,
|
|
189
|
-
btn: styles.btnSuccess
|
|
190
|
-
},
|
|
191
|
-
danger: {
|
|
192
|
-
icon: styles.iconDanger,
|
|
193
|
-
btn: styles.btnDanger
|
|
194
|
-
}
|
|
195
|
-
}[resolvedType];
|
|
194
|
+
const { Icon, iconStyle, btnStyle } = TYPE_CONFIG[resolvedType] ?? TYPE_CONFIG.warning;
|
|
196
195
|
const sizeStyle = sizeStyles[size] ?? styles.sizeMd;
|
|
197
196
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.Dialog, {
|
|
198
197
|
open: isModalOpen,
|
|
@@ -225,7 +224,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
225
224
|
className: "x78zum5 x1cy8zhl x1fsutb xnywu7s",
|
|
226
225
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
227
226
|
className: "x78zum5 x6s0dn4 xl56j7k x2lah0s xrhwvvd",
|
|
228
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { ..._stylexjs_stylex.props(styles.typeIcon,
|
|
227
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { ..._stylexjs_stylex.props(styles.typeIcon, iconStyle) })
|
|
229
228
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
230
229
|
className: "xeuugli x845mor",
|
|
231
230
|
children: [
|
|
@@ -250,7 +249,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
250
249
|
]
|
|
251
250
|
})]
|
|
252
251
|
}),
|
|
253
|
-
footer
|
|
252
|
+
footer ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
254
253
|
className: "x78zum5 x13a6bvl xb6y1gh xdj266r",
|
|
255
254
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
256
255
|
type: "button",
|
|
@@ -261,10 +260,10 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
261
260
|
children: cancelText
|
|
262
261
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
263
262
|
type: "button",
|
|
264
|
-
variant:
|
|
263
|
+
variant: resolvedType === "danger" ? "destructive" : "default",
|
|
265
264
|
onClick: handleConfirm,
|
|
266
265
|
isLoading: isPending,
|
|
267
|
-
sx: [styles.confirmBtn,
|
|
266
|
+
sx: [styles.confirmBtn, btnStyle],
|
|
268
267
|
children: isPending ? resolvedLoadingText : confirmText
|
|
269
268
|
})]
|
|
270
269
|
})
|
|
@@ -273,4 +272,3 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
273
272
|
});
|
|
274
273
|
}
|
|
275
274
|
exports.ConfirmModal = ConfirmModal;
|
|
276
|
-
exports.default = ConfirmModal;
|
package/dist/ConfirmModal.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface ConfirmModalProps {
|
|
|
17
17
|
onOk?: () => void;
|
|
18
18
|
/** Dialog heading title summarizing the intent. */
|
|
19
19
|
title: ReactNode;
|
|
20
|
-
/**
|
|
20
|
+
/** Explanatory message describing the consequences of the action. */
|
|
21
21
|
message?: ReactNode;
|
|
22
22
|
/** Alias for `message` (consistent with Modal `description`). */
|
|
23
23
|
description?: ReactNode;
|
|
@@ -31,7 +31,7 @@ export interface ConfirmModalProps {
|
|
|
31
31
|
closeLabel?: string;
|
|
32
32
|
/** Text shown when an async confirmation is pending (defaults to "Processing..."). */
|
|
33
33
|
processingText?: string;
|
|
34
|
-
/** Alias for
|
|
34
|
+
/** Alias for processingText */
|
|
35
35
|
loadingText?: string;
|
|
36
36
|
/** Semantic type determining the accent color and icon. */
|
|
37
37
|
type?: ConfirmModalType;
|
|
@@ -52,13 +52,9 @@ export interface ConfirmModalProps {
|
|
|
52
52
|
/** Additional CSS class names. */
|
|
53
53
|
className?: string;
|
|
54
54
|
}
|
|
55
|
-
/** Legacy type alias */
|
|
56
|
-
export type ConfirmationDialogProps = ConfirmModalProps;
|
|
57
55
|
/**
|
|
58
56
|
* Confirmation dialog for critical user actions (deletions, warnings, approvals).
|
|
59
|
-
*
|
|
60
|
-
* 7-tier sizing scale, and unified prop conventions matching Modal.
|
|
57
|
+
* Built with Meta StyleX and Radix UI Dialog with native overscroll containment.
|
|
61
58
|
*/
|
|
62
59
|
export declare function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title, message, description, children, confirmText, cancelText, closeLabel, processingText, loadingText, type, variant, isLoading, loading, size, width, footer, sx, className, }: ConfirmModalProps): import("react").JSX.Element;
|
|
63
|
-
export default ConfirmModal;
|
|
64
60
|
//# sourceMappingURL=ConfirmModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../src/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../src/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C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AmE;IACnE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IACzB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,WAAW,EACX,QAAQ,EACR,WAAuB,EACvB,UAAqB,EACrB,UAAoB,EACpB,cAAgC,EAChC,WAAW,EACX,IAAI,EACJ,OAAmB,EACnB,SAAS,EACT,OAAO,EACP,IAAW,EACX,KAAK,EACL,MAAM,EACN,EAAE,EACF,SAAS,GACV,EAAE,iBAAiB,+BA0FnB"}
|
package/dist/ConfirmModal.js
CHANGED
|
@@ -20,6 +20,7 @@ var styles = {
|
|
|
20
20
|
k1xSpc: "x78zum5",
|
|
21
21
|
kXwgrk: "xdt5ytf",
|
|
22
22
|
kOIVth: "x15iy025",
|
|
23
|
+
kZeWKH: "xish69e",
|
|
23
24
|
$$css: true
|
|
24
25
|
},
|
|
25
26
|
sizeXxs: {
|
|
@@ -149,12 +150,33 @@ var sizeStyles = {
|
|
|
149
150
|
xl: styles.sizeXl,
|
|
150
151
|
xxl: styles.sizeXxl
|
|
151
152
|
};
|
|
153
|
+
var TYPE_CONFIG = {
|
|
154
|
+
warning: {
|
|
155
|
+
Icon: Icons.AlertTriangle,
|
|
156
|
+
iconStyle: styles.iconWarning,
|
|
157
|
+
btnStyle: styles.btnWarning
|
|
158
|
+
},
|
|
159
|
+
info: {
|
|
160
|
+
Icon: Icons.Info,
|
|
161
|
+
iconStyle: styles.iconInfo,
|
|
162
|
+
btnStyle: styles.btnInfo
|
|
163
|
+
},
|
|
164
|
+
success: {
|
|
165
|
+
Icon: Icons.CheckCircle2,
|
|
166
|
+
iconStyle: styles.iconSuccess,
|
|
167
|
+
btnStyle: styles.btnSuccess
|
|
168
|
+
},
|
|
169
|
+
danger: {
|
|
170
|
+
Icon: Icons.XCircle,
|
|
171
|
+
iconStyle: styles.iconDanger,
|
|
172
|
+
btnStyle: styles.btnDanger
|
|
173
|
+
}
|
|
174
|
+
};
|
|
152
175
|
/**
|
|
153
176
|
* Confirmation dialog for critical user actions (deletions, warnings, approvals).
|
|
154
|
-
*
|
|
155
|
-
* 7-tier sizing scale, and unified prop conventions matching Modal.
|
|
177
|
+
* Built with Meta StyleX and Radix UI Dialog with native overscroll containment.
|
|
156
178
|
*/
|
|
157
|
-
function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title, message, description, children, confirmText = "Confirm", cancelText = "Cancel", closeLabel = "Close", processingText, loadingText, type, variant = "warning", isLoading, loading, size = "md", width, footer, sx, className }) {
|
|
179
|
+
function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title, message, description, children, confirmText = "Confirm", cancelText = "Cancel", closeLabel = "Close", processingText = "Processing...", loadingText, type, variant = "warning", isLoading, loading, size = "md", width, footer, sx, className }) {
|
|
158
180
|
const isModalOpen = open ?? isOpen ?? true;
|
|
159
181
|
const isPending = isLoading ?? loading ?? false;
|
|
160
182
|
const rawType = type ?? variant ?? "warning";
|
|
@@ -167,30 +189,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
167
189
|
const handleConfirm = () => {
|
|
168
190
|
if (!isPending) (onConfirm ?? onOk)?.();
|
|
169
191
|
};
|
|
170
|
-
const Icon =
|
|
171
|
-
warning: Icons.AlertTriangle,
|
|
172
|
-
info: Icons.Info,
|
|
173
|
-
success: Icons.CheckCircle2,
|
|
174
|
-
danger: Icons.XCircle
|
|
175
|
-
}[resolvedType];
|
|
176
|
-
const typeStyles = {
|
|
177
|
-
warning: {
|
|
178
|
-
icon: styles.iconWarning,
|
|
179
|
-
btn: styles.btnWarning
|
|
180
|
-
},
|
|
181
|
-
info: {
|
|
182
|
-
icon: styles.iconInfo,
|
|
183
|
-
btn: styles.btnInfo
|
|
184
|
-
},
|
|
185
|
-
success: {
|
|
186
|
-
icon: styles.iconSuccess,
|
|
187
|
-
btn: styles.btnSuccess
|
|
188
|
-
},
|
|
189
|
-
danger: {
|
|
190
|
-
icon: styles.iconDanger,
|
|
191
|
-
btn: styles.btnDanger
|
|
192
|
-
}
|
|
193
|
-
}[resolvedType];
|
|
192
|
+
const { Icon, iconStyle, btnStyle } = TYPE_CONFIG[resolvedType] ?? TYPE_CONFIG.warning;
|
|
194
193
|
const sizeStyle = sizeStyles[size] ?? styles.sizeMd;
|
|
195
194
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
196
195
|
open: isModalOpen,
|
|
@@ -223,7 +222,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
223
222
|
className: "x78zum5 x1cy8zhl x1fsutb xnywu7s",
|
|
224
223
|
children: [/* @__PURE__ */ jsx("div", {
|
|
225
224
|
className: "x78zum5 x6s0dn4 xl56j7k x2lah0s xrhwvvd",
|
|
226
|
-
children: /* @__PURE__ */ jsx(Icon, { ...stylex.props(styles.typeIcon,
|
|
225
|
+
children: /* @__PURE__ */ jsx(Icon, { ...stylex.props(styles.typeIcon, iconStyle) })
|
|
227
226
|
}), /* @__PURE__ */ jsxs("div", {
|
|
228
227
|
className: "xeuugli x845mor",
|
|
229
228
|
children: [
|
|
@@ -248,7 +247,7 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
248
247
|
]
|
|
249
248
|
})]
|
|
250
249
|
}),
|
|
251
|
-
footer
|
|
250
|
+
footer ?? /* @__PURE__ */ jsxs("div", {
|
|
252
251
|
className: "x78zum5 x13a6bvl xb6y1gh xdj266r",
|
|
253
252
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
254
253
|
type: "button",
|
|
@@ -259,10 +258,10 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
259
258
|
children: cancelText
|
|
260
259
|
}), /* @__PURE__ */ jsx(Button, {
|
|
261
260
|
type: "button",
|
|
262
|
-
variant:
|
|
261
|
+
variant: resolvedType === "danger" ? "destructive" : "default",
|
|
263
262
|
onClick: handleConfirm,
|
|
264
263
|
isLoading: isPending,
|
|
265
|
-
sx: [styles.confirmBtn,
|
|
264
|
+
sx: [styles.confirmBtn, btnStyle],
|
|
266
265
|
children: isPending ? resolvedLoadingText : confirmText
|
|
267
266
|
})]
|
|
268
267
|
})
|
|
@@ -270,4 +269,4 @@ function ConfirmModal({ open, isOpen, onClose, onCancel, onConfirm, onOk, title,
|
|
|
270
269
|
})
|
|
271
270
|
});
|
|
272
271
|
}
|
|
273
|
-
export { ConfirmModal
|
|
272
|
+
export { ConfirmModal };
|
package/dist/Modal.cjs
CHANGED
|
@@ -13,6 +13,7 @@ var styles = {
|
|
|
13
13
|
kOIVth: "xxhr3t",
|
|
14
14
|
kmVPX3: "x1717udv",
|
|
15
15
|
kzqmXN: "xh8yej3",
|
|
16
|
+
kZeWKH: "xish69e",
|
|
16
17
|
$$css: true
|
|
17
18
|
},
|
|
18
19
|
sizeXxs: {
|
|
@@ -76,9 +77,7 @@ var sizeStyles = {
|
|
|
76
77
|
};
|
|
77
78
|
/**
|
|
78
79
|
* Standard modal dialog component for VLRC applications.
|
|
79
|
-
* Built on top of Radix UI Dialog and styled with Meta StyleX.
|
|
80
|
-
* Supports configurable 7-tier sizing ('xxs' - 'xxl'), built-in loading states,
|
|
81
|
-
* and unified prop conventions aligned with ConfirmModal.
|
|
80
|
+
* Built on top of Radix UI Dialog and styled with Meta StyleX with overscroll containment.
|
|
82
81
|
*/
|
|
83
82
|
function Modal({ open, isOpen, title, description, message, children, footer, size = "md", width, confirmText = "Confirm", cancelText = "Cancel", isLoading, loading, loadingText, onCancel, onClose, onConfirm, onOk, sx, className }) {
|
|
84
83
|
const isVisible = open ?? isOpen ?? true;
|
|
@@ -114,7 +113,7 @@ function Modal({ open, isOpen, title, description, message, children, footer, si
|
|
|
114
113
|
}) : null,
|
|
115
114
|
(footer || hasConfirmAction) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dialog.DialogFooter, {
|
|
116
115
|
sx: styles.footer,
|
|
117
|
-
children: footer
|
|
116
|
+
children: footer ?? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
118
117
|
className: "x78zum5 xh8yej3 x13a6bvl x13z6uf9",
|
|
119
118
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
120
119
|
variant: "outline",
|
package/dist/Modal.d.ts
CHANGED
|
@@ -45,9 +45,7 @@ export interface ModalProps {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Standard modal dialog component for VLRC applications.
|
|
48
|
-
* Built on top of Radix UI Dialog and styled with Meta StyleX.
|
|
49
|
-
* Supports configurable 7-tier sizing ('xxs' - 'xxl'), built-in loading states,
|
|
50
|
-
* and unified prop conventions aligned with ConfirmModal.
|
|
48
|
+
* Built on top of Radix UI Dialog and styled with Meta StyleX with overscroll containment.
|
|
51
49
|
*/
|
|
52
50
|
export declare function Modal({ open, isOpen, title, description, message, children, footer, size, width, confirmText, cancelText, isLoading, loading, loadingText, onCancel, onClose, onConfirm, onOk, sx, className, }: ModalProps): import("react").JSX.Element;
|
|
53
51
|
//# sourceMappingURL=Modal.d.ts.map
|
package/dist/Modal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../src/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"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AC,YAAY,CAAC;IACzB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,MAAM,EACN,IAAW,EACX,KAAK,EACL,WAAuB,EACvB,UAAqB,EACrB,SAAS,EACT,OAAO,EACP,WAAW,EACX,QAAQ,EACR,OAAO,EACP,SAAS,EACT,IAAI,EACJ,EAAE,EACF,SAAS,GACV,EAAE,UAAU,+BAiDZ"}
|
package/dist/Modal.js
CHANGED
|
@@ -11,6 +11,7 @@ var styles = {
|
|
|
11
11
|
kOIVth: "xxhr3t",
|
|
12
12
|
kmVPX3: "x1717udv",
|
|
13
13
|
kzqmXN: "xh8yej3",
|
|
14
|
+
kZeWKH: "xish69e",
|
|
14
15
|
$$css: true
|
|
15
16
|
},
|
|
16
17
|
sizeXxs: {
|
|
@@ -74,9 +75,7 @@ var sizeStyles = {
|
|
|
74
75
|
};
|
|
75
76
|
/**
|
|
76
77
|
* Standard modal dialog component for VLRC applications.
|
|
77
|
-
* Built on top of Radix UI Dialog and styled with Meta StyleX.
|
|
78
|
-
* Supports configurable 7-tier sizing ('xxs' - 'xxl'), built-in loading states,
|
|
79
|
-
* and unified prop conventions aligned with ConfirmModal.
|
|
78
|
+
* Built on top of Radix UI Dialog and styled with Meta StyleX with overscroll containment.
|
|
80
79
|
*/
|
|
81
80
|
function Modal({ open, isOpen, title, description, message, children, footer, size = "md", width, confirmText = "Confirm", cancelText = "Cancel", isLoading, loading, loadingText, onCancel, onClose, onConfirm, onOk, sx, className }) {
|
|
82
81
|
const isVisible = open ?? isOpen ?? true;
|
|
@@ -112,7 +111,7 @@ function Modal({ open, isOpen, title, description, message, children, footer, si
|
|
|
112
111
|
}) : null,
|
|
113
112
|
(footer || hasConfirmAction) && /* @__PURE__ */ jsx(DialogFooter, {
|
|
114
113
|
sx: styles.footer,
|
|
115
|
-
children: footer
|
|
114
|
+
children: footer ?? /* @__PURE__ */ jsxs("div", {
|
|
116
115
|
className: "x78zum5 xh8yej3 x13a6bvl x13z6uf9",
|
|
117
116
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
118
117
|
variant: "outline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AA6E/C,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAoMpD,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/MultiSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AA6E/C,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAoMpD,CAAC;eAEa,WAAW"}
|
|
@@ -46,6 +46,7 @@ var useMultiSelect = ({ forwardedRef, ...props }) => {
|
|
|
46
46
|
]);
|
|
47
47
|
const handleInputKeyDown = (event) => {
|
|
48
48
|
if (disabled) return;
|
|
49
|
+
if (event.nativeEvent.isComposing || event.keyCode === 229) return;
|
|
49
50
|
if (event.key === "Enter") setIsPopoverOpen(true);
|
|
50
51
|
else if (event.key === "Backspace" && !event.currentTarget.value) {
|
|
51
52
|
const newSelectedValues = [...selectedValues];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultiSelect.d.ts","sourceRoot":"","sources":["../../src/MultiSelect/useMultiSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa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AAS,EAAE,MAAM,IAAI,CAAC;QACtB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KACnD,CAAC;CACH;AAMD,eAAO,MAAM,cAAc,+BAGxB,oBAAoB,KAAG,oBA0UzB,CAAC"}
|
|
@@ -46,6 +46,7 @@ var useMultiSelect = ({ forwardedRef, ...props }) => {
|
|
|
46
46
|
]);
|
|
47
47
|
const handleInputKeyDown = (event) => {
|
|
48
48
|
if (disabled) return;
|
|
49
|
+
if (event.nativeEvent.isComposing || event.keyCode === 229) return;
|
|
49
50
|
if (event.key === "Enter") setIsPopoverOpen(true);
|
|
50
51
|
else if (event.key === "Backspace" && !event.currentTarget.value) {
|
|
51
52
|
const newSelectedValues = [...selectedValues];
|
|
@@ -4,8 +4,8 @@ var isGroupedOptions = (opts) => {
|
|
|
4
4
|
};
|
|
5
5
|
var arraysEqual = (a, b) => {
|
|
6
6
|
if (a.length !== b.length) return false;
|
|
7
|
-
const sortedA =
|
|
8
|
-
const sortedB =
|
|
7
|
+
const sortedA = a.toSorted();
|
|
8
|
+
const sortedB = b.toSorted();
|
|
9
9
|
return sortedA.every((val, index) => val === sortedB[index]);
|
|
10
10
|
};
|
|
11
11
|
var buildAllOptions = (options, deduplicateOptions) => {
|
|
@@ -4,8 +4,8 @@ var isGroupedOptions = (opts) => {
|
|
|
4
4
|
};
|
|
5
5
|
var arraysEqual = (a, b) => {
|
|
6
6
|
if (a.length !== b.length) return false;
|
|
7
|
-
const sortedA =
|
|
8
|
-
const sortedB =
|
|
7
|
+
const sortedA = a.toSorted();
|
|
8
|
+
const sortedB = b.toSorted();
|
|
9
9
|
return sortedA.every((val, index) => val === sortedB[index]);
|
|
10
10
|
};
|
|
11
11
|
var buildAllOptions = (options, deduplicateOptions) => {
|
package/dist/Typography/Link.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_Icons = require("../Icons/Icons.cjs");
|
|
3
|
-
const require_utils = require("./utils.cjs");
|
|
4
3
|
const require_tooltip = require("./tooltip.cjs");
|
|
4
|
+
const require_utils = require("./utils.cjs");
|
|
5
5
|
const require_weightStyles = require("./weightStyles.cjs");
|
|
6
6
|
let _stylexjs_stylex = require("@stylexjs/stylex");
|
|
7
7
|
_stylexjs_stylex = require_runtime.__toESM(_stylexjs_stylex, 1);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
let react = require("react");
|
|
10
9
|
// src/Typography/Link.tsx
|
|
11
10
|
var styles = {
|
|
12
11
|
base: {
|
|
@@ -96,7 +95,7 @@ var underlineStyles = {
|
|
|
96
95
|
hover: styles.hover,
|
|
97
96
|
none: styles.none
|
|
98
97
|
};
|
|
99
|
-
|
|
98
|
+
function Link({ href, size = "md", external, underline = "hover", disabled, weight, target, rel, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, as: Component = "a", className, children, sx, ref, ...props }) {
|
|
100
99
|
const resolvedTarget = external ? target ?? "_blank" : target;
|
|
101
100
|
const resolvedRel = external ? rel ?? "noopener noreferrer" : rel;
|
|
102
101
|
const resolvedRows = lines ?? rows ?? (typeof ellipsis === "object" ? ellipsis?.rows : void 0);
|
|
@@ -136,6 +135,5 @@ var Link = (0, react.forwardRef)(function Link({ href, size = "md", external, un
|
|
|
136
135
|
children: [children, external && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icons.Icons.ArrowRight, { className: "x1jw3ynk xvle69y x1us6l5c x1rr8tx7" })]
|
|
137
136
|
});
|
|
138
137
|
return require_tooltip.renderWithTooltip(element, tooltipContent);
|
|
139
|
-
}
|
|
140
|
-
Link.displayName = "Typography.Link";
|
|
138
|
+
}
|
|
141
139
|
exports.Link = Link;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LinkProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function Link({ href, size, external, underline, disabled, weight, target, rel, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, as: Component, className, children, sx, ref, ...props }: LinkProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
3
3
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Typography/Link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Typography/Link.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAmGxD,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,IAAW,EACX,QAAQ,EACR,SAAmB,EACnB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,GAAG,EACH,UAAU,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,EAAE,EAAE,SAAe,EACnB,SAAS,EACT,QAAQ,EACR,EAAE,EACF,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,8FA0DX"}
|
package/dist/Typography/Link.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Icons } from "../Icons/Icons.js";
|
|
2
|
-
import { resolveCustomTypographyStyle } from "./utils.js";
|
|
3
2
|
import { renderWithTooltip, resolveTooltipContent } from "./tooltip.js";
|
|
3
|
+
import { resolveCustomTypographyStyle } from "./utils.js";
|
|
4
4
|
import { typographyWeightStyles } from "./weightStyles.js";
|
|
5
5
|
import * as stylex from "@stylexjs/stylex";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { forwardRef } from "react";
|
|
8
7
|
// src/Typography/Link.tsx
|
|
9
8
|
var styles = {
|
|
10
9
|
base: {
|
|
@@ -94,7 +93,7 @@ var underlineStyles = {
|
|
|
94
93
|
hover: styles.hover,
|
|
95
94
|
none: styles.none
|
|
96
95
|
};
|
|
97
|
-
|
|
96
|
+
function Link({ href, size = "md", external, underline = "hover", disabled, weight, target, rel, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, as: Component = "a", className, children, sx, ref, ...props }) {
|
|
98
97
|
const resolvedTarget = external ? target ?? "_blank" : target;
|
|
99
98
|
const resolvedRel = external ? rel ?? "noopener noreferrer" : rel;
|
|
100
99
|
const resolvedRows = lines ?? rows ?? (typeof ellipsis === "object" ? ellipsis?.rows : void 0);
|
|
@@ -134,6 +133,5 @@ var Link = forwardRef(function Link({ href, size = "md", external, underline = "
|
|
|
134
133
|
children: [children, external && /* @__PURE__ */ jsx(Icons.ArrowRight, { className: "x1jw3ynk xvle69y x1us6l5c x1rr8tx7" })]
|
|
135
134
|
});
|
|
136
135
|
return renderWithTooltip(element, tooltipContent);
|
|
137
|
-
}
|
|
138
|
-
Link.displayName = "Typography.Link";
|
|
136
|
+
}
|
|
139
137
|
export { Link };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
-
const require_utils = require("./utils.cjs");
|
|
3
2
|
const require_tooltip = require("./tooltip.cjs");
|
|
3
|
+
const require_utils = require("./utils.cjs");
|
|
4
4
|
const require_weightStyles = require("./weightStyles.cjs");
|
|
5
5
|
let _stylexjs_stylex = require("@stylexjs/stylex");
|
|
6
6
|
_stylexjs_stylex = require_runtime.__toESM(_stylexjs_stylex, 1);
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let react = require("react");
|
|
9
8
|
// src/Typography/Paragraph.tsx
|
|
10
9
|
var styles = {
|
|
11
10
|
base: {
|
|
@@ -166,7 +165,7 @@ var paragraphTypeStyles = {
|
|
|
166
165
|
info: styles.typeInfo,
|
|
167
166
|
inherit: styles.typeInherit
|
|
168
167
|
};
|
|
169
|
-
|
|
168
|
+
function Paragraph({ size = "md", variant = "default", type, spacing = "none", align = "left", weight, required, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, color, margin, m, marginTop, mt, marginBottom, mb, marginLeft, ml, marginRight, mr, marginInline, mx, marginBlock, my, letterSpacing, as: Component = "p", className, children, sx, ref, ...props }) {
|
|
170
169
|
const resolvedRows = lines ?? rows ?? (typeof ellipsis === "object" ? ellipsis?.rows : void 0);
|
|
171
170
|
const isSingleEllipsis = (ellipsis === true || typeof ellipsis === "object" && ellipsis !== null && !ellipsis.rows) && !resolvedRows;
|
|
172
171
|
const currentSizeStyle = paragraphSizeStyles[size] ?? styles.sizeMd;
|
|
@@ -221,6 +220,5 @@ var Paragraph = (0, react.forwardRef)(function Paragraph({ size = "md", variant
|
|
|
221
220
|
})]
|
|
222
221
|
});
|
|
223
222
|
return require_tooltip.renderWithTooltip(element, tooltipContent);
|
|
224
|
-
}
|
|
225
|
-
Paragraph.displayName = "Typography.Paragraph";
|
|
223
|
+
}
|
|
226
224
|
exports.Paragraph = Paragraph;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ParagraphProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function Paragraph({ size, variant, type, spacing, align, weight, required, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, color, margin, m, marginTop, mt, marginBottom, mb, marginLeft, ml, marginRight, mr, marginInline, mx, marginBlock, my, letterSpacing, as: Component, className, children, sx, ref, ...props }: ParagraphProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
3
3
|
//# sourceMappingURL=Paragraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../src/Typography/Paragraph.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../src/Typography/Paragraph.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,cAAc,EAIf,MAAM,SAAS,CAAC;AAkKjB,wBAAgB,SAAS,CAAC,EACxB,IAAW,EACX,OAAmB,EACnB,IAAI,EACJ,OAAgB,EAChB,KAAc,EACd,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,mBAAmB,EACnB,KAAK,EACL,MAAM,EACN,CAAC,EACD,SAAS,EACT,EAAE,EACF,YAAY,EACZ,EAAE,EACF,UAAU,EACV,EAAE,EACF,WAAW,EACX,EAAE,EACF,YAAY,EACZ,EAAE,EACF,WAAW,EACX,EAAE,EACF,aAAa,EACb,EAAE,EAAE,SAAe,EACnB,SAAS,EACT,QAAQ,EACR,EAAE,EACF,GAAG,EACH,GAAG,KAAK,EACT,EAAE,cAAc,8FA0EhB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { resolveCustomTypographyStyle } from "./utils.js";
|
|
2
1
|
import { renderWithTooltip, resolveTooltipContent } from "./tooltip.js";
|
|
2
|
+
import { resolveCustomTypographyStyle } from "./utils.js";
|
|
3
3
|
import { typographyWeightStyles } from "./weightStyles.js";
|
|
4
4
|
import * as stylex from "@stylexjs/stylex";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
6
|
// src/Typography/Paragraph.tsx
|
|
8
7
|
var styles = {
|
|
9
8
|
base: {
|
|
@@ -164,7 +163,7 @@ var paragraphTypeStyles = {
|
|
|
164
163
|
info: styles.typeInfo,
|
|
165
164
|
inherit: styles.typeInherit
|
|
166
165
|
};
|
|
167
|
-
|
|
166
|
+
function Paragraph({ size = "md", variant = "default", type, spacing = "none", align = "left", weight, required, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, color, margin, m, marginTop, mt, marginBottom, mb, marginLeft, ml, marginRight, mr, marginInline, mx, marginBlock, my, letterSpacing, as: Component = "p", className, children, sx, ref, ...props }) {
|
|
168
167
|
const resolvedRows = lines ?? rows ?? (typeof ellipsis === "object" ? ellipsis?.rows : void 0);
|
|
169
168
|
const isSingleEllipsis = (ellipsis === true || typeof ellipsis === "object" && ellipsis !== null && !ellipsis.rows) && !resolvedRows;
|
|
170
169
|
const currentSizeStyle = paragraphSizeStyles[size] ?? styles.sizeMd;
|
|
@@ -219,6 +218,5 @@ var Paragraph = forwardRef(function Paragraph({ size = "md", variant = "default"
|
|
|
219
218
|
})]
|
|
220
219
|
});
|
|
221
220
|
return renderWithTooltip(element, tooltipContent);
|
|
222
|
-
}
|
|
223
|
-
Paragraph.displayName = "Typography.Paragraph";
|
|
221
|
+
}
|
|
224
222
|
export { Paragraph };
|
package/dist/Typography/Text.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
2
|
const require_Icons = require("../Icons/Icons.cjs");
|
|
3
|
-
const require_utils = require("./utils.cjs");
|
|
4
3
|
const require_tooltip = require("./tooltip.cjs");
|
|
4
|
+
const require_utils = require("./utils.cjs");
|
|
5
5
|
const require_weightStyles = require("./weightStyles.cjs");
|
|
6
6
|
let _stylexjs_stylex = require("@stylexjs/stylex");
|
|
7
7
|
_stylexjs_stylex = require_runtime.__toESM(_stylexjs_stylex, 1);
|
|
@@ -140,7 +140,7 @@ var typeStyles = {
|
|
|
140
140
|
info: styles.typeInfo,
|
|
141
141
|
inherit: styles.typeInherit
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
function Text({ type, size = "md", weight = "regular", required, strong, italic, underline, delete: isDelete, keyboard, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, color, margin, m, marginTop, mt, marginBottom, mb, marginLeft, ml, marginRight, mr, marginInline, mx, marginBlock, my, letterSpacing, copyable, as, className, children, sx, ref, ...props }) {
|
|
144
144
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
145
145
|
let defaultComponent = "span";
|
|
146
146
|
if (keyboard) defaultComponent = "kbd";
|
|
@@ -219,6 +219,5 @@ var Text = (0, react.forwardRef)(function Text({ type, size = "md", weight = "re
|
|
|
219
219
|
]
|
|
220
220
|
});
|
|
221
221
|
return require_tooltip.renderWithTooltip(element, tooltipContent);
|
|
222
|
-
}
|
|
223
|
-
Text.displayName = "Typography.Text";
|
|
222
|
+
}
|
|
224
223
|
exports.Text = Text;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TextProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function Text({ type, size, weight, required, strong, italic, underline, delete: isDelete, keyboard, customSize, lines, rows, lineHeight, ellipsis, tooltip, textDecoration, textDecorationLine, textDecorationStyle, textDecorationColor, textDecorationThickness, textUnderlineOffset, color, margin, m, marginTop, mt, marginBottom, mb, marginLeft, ml, marginRight, mr, marginInline, mx, marginBlock, my, letterSpacing, copyable, as, className, children, sx, ref, ...props }: TextProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
3
3
|
//# sourceMappingURL=Text.d.ts.map
|