@atom-learning/components 8.1.2 → 8.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/button/Button.js +5 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/dialog/DialogContent.js +19 -6
- package/dist/components/dialog/DialogContent.js.map +1 -1
- package/dist/components/index.d.ts +0 -3
- package/dist/components/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenu.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonCard.js.map +1 -1
- package/dist/components/toast/ToastProvider.js +2 -2
- package/dist/components/toast/ToastProvider.js.map +1 -1
- package/dist/components/top-bar/TopBar.js +4 -4
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +31 -134
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -4
- package/package.json +2 -1
- package/src/index.css +2 -0
- package/src/responsive-variant-classes.css +1 -1
- package/src/utilities.css +6 -0
- package/dist/components/box/Box.d.ts +0 -3
- package/dist/components/box/Box.js +0 -8
- package/dist/components/box/Box.js.map +0 -1
- package/dist/components/flex/Flex.d.ts +0 -9
- package/dist/components/flex/Flex.js +0 -88
- package/dist/components/flex/Flex.js.map +0 -1
- package/dist/components/grid/Grid.d.ts +0 -15
- package/dist/components/grid/Grid.js +0 -35
- package/dist/components/grid/Grid.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -852,7 +852,11 @@ var StyledButton = styled("button", {
|
|
|
852
852
|
"[&_svg]:size-[22px]"
|
|
853
853
|
]
|
|
854
854
|
},
|
|
855
|
-
isLoading: { true: [
|
|
855
|
+
isLoading: { true: [
|
|
856
|
+
"cursor-not-allowed",
|
|
857
|
+
"opacity-60",
|
|
858
|
+
"pointer-events-none"
|
|
859
|
+
] },
|
|
856
860
|
fullWidth: {
|
|
857
861
|
true: ["w-full"],
|
|
858
862
|
false: ["w-max"]
|
|
@@ -2361,10 +2365,6 @@ var BannerSlim = Object.assign(BannerSlimComponent, {
|
|
|
2361
2365
|
});
|
|
2362
2366
|
BannerSlimComponent.displayName = "BannerSlim";
|
|
2363
2367
|
//#endregion
|
|
2364
|
-
//#region src/components/box/Box.tsx
|
|
2365
|
-
var Box = styled("div", { base: [] });
|
|
2366
|
-
Box.displayName = "Box";
|
|
2367
|
-
//#endregion
|
|
2368
2368
|
//#region src/components/carousel/CarouselArrows.tsx
|
|
2369
2369
|
var ArrowButton = styled("button", { base: [
|
|
2370
2370
|
"items-center",
|
|
@@ -6419,7 +6419,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6419
6419
|
"max-h-[90vh]",
|
|
6420
6420
|
"supports-svh:h-auto",
|
|
6421
6421
|
"supports-svh:max-h-[90vh]",
|
|
6422
|
-
"w-95"
|
|
6422
|
+
"w-95",
|
|
6423
|
+
"[&>[data-dialog-close]]:top-4",
|
|
6424
|
+
"[&>[data-dialog-close]]:right-4"
|
|
6423
6425
|
],
|
|
6424
6426
|
sm: [
|
|
6425
6427
|
"rounded-md",
|
|
@@ -6428,7 +6430,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6428
6430
|
"max-h-[90vh]",
|
|
6429
6431
|
"supports-svh:h-auto",
|
|
6430
6432
|
"supports-svh:max-h-[90vh]",
|
|
6431
|
-
"w-120"
|
|
6433
|
+
"w-120",
|
|
6434
|
+
"[&>[data-dialog-close]]:top-4",
|
|
6435
|
+
"[&>[data-dialog-close]]:right-4"
|
|
6432
6436
|
],
|
|
6433
6437
|
md: [
|
|
6434
6438
|
"rounded-md",
|
|
@@ -6437,7 +6441,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6437
6441
|
"max-h-[90vh]",
|
|
6438
6442
|
"supports-svh:h-auto",
|
|
6439
6443
|
"supports-svh:max-h-[90vh]",
|
|
6440
|
-
"w-150"
|
|
6444
|
+
"w-150",
|
|
6445
|
+
"[&>[data-dialog-close]]:top-4",
|
|
6446
|
+
"[&>[data-dialog-close]]:right-4"
|
|
6441
6447
|
],
|
|
6442
6448
|
lg: [
|
|
6443
6449
|
"rounded-md",
|
|
@@ -6446,7 +6452,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6446
6452
|
"max-h-[90vh]",
|
|
6447
6453
|
"supports-svh:h-auto",
|
|
6448
6454
|
"supports-svh:max-h-[90vh]",
|
|
6449
|
-
"w-200"
|
|
6455
|
+
"w-200",
|
|
6456
|
+
"[&>[data-dialog-close]]:top-4",
|
|
6457
|
+
"[&>[data-dialog-close]]:right-4"
|
|
6450
6458
|
],
|
|
6451
6459
|
xl: [
|
|
6452
6460
|
"rounded-md",
|
|
@@ -6455,7 +6463,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6455
6463
|
"max-h-[90vh]",
|
|
6456
6464
|
"supports-svh:h-auto",
|
|
6457
6465
|
"supports-svh:max-h-[90vh]",
|
|
6458
|
-
"w-275"
|
|
6466
|
+
"w-275",
|
|
6467
|
+
"[&>[data-dialog-close]]:top-4",
|
|
6468
|
+
"[&>[data-dialog-close]]:right-4"
|
|
6459
6469
|
],
|
|
6460
6470
|
fullscreen: [
|
|
6461
6471
|
"rounded-none",
|
|
@@ -6464,7 +6474,9 @@ var StyledDialogContent = styled(_radix_ui_react_dialog.Content, {
|
|
|
6464
6474
|
"max-w-screen",
|
|
6465
6475
|
"max-h-screen",
|
|
6466
6476
|
"supports-svh:h-svh",
|
|
6467
|
-
"supports-svh:max-h-svh"
|
|
6477
|
+
"supports-svh:max-h-svh",
|
|
6478
|
+
"[&>[data-dialog-close]]:top-safe-offset-4",
|
|
6479
|
+
"[&>[data-dialog-close]]:right-safe-offset-4"
|
|
6468
6480
|
]
|
|
6469
6481
|
},
|
|
6470
6482
|
layout: { panel: [
|
|
@@ -6489,6 +6501,7 @@ var DialogContent = ({ size = "sm", children, closeDialogText = "Close dialog",
|
|
|
6489
6501
|
hasTooltip: false,
|
|
6490
6502
|
size: "md",
|
|
6491
6503
|
theme: "neutral",
|
|
6504
|
+
"data-dialog-close": true,
|
|
6492
6505
|
className: "absolute top-4 right-4 size-12",
|
|
6493
6506
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { is: _atom_learning_icons.Close })
|
|
6494
6507
|
}), react.Children.map(children, (child) => react.isValidElement(child) && child.type === DialogBackground ? null : child)]
|
|
@@ -6804,90 +6817,6 @@ var FileInput = ({ accept, children, multiple = false, onFileSelect, ...rest })
|
|
|
6804
6817
|
};
|
|
6805
6818
|
FileInput.displayName = "FileInput";
|
|
6806
6819
|
//#endregion
|
|
6807
|
-
//#region src/components/flex/Flex.tsx
|
|
6808
|
-
var Flex = styled("div", {
|
|
6809
|
-
base: ["flex"],
|
|
6810
|
-
variants: {
|
|
6811
|
-
direction: {
|
|
6812
|
-
row: ["flex-row"],
|
|
6813
|
-
"row-reverse": ["flex-row-reverse"],
|
|
6814
|
-
column: ["flex-col"],
|
|
6815
|
-
"column-reverse": ["flex-col-reverse"],
|
|
6816
|
-
inherit: ["direction-[inherit]"],
|
|
6817
|
-
initial: ["direction-[initial]"],
|
|
6818
|
-
revert: ["direction-[revert]"],
|
|
6819
|
-
"revert-layer": ["direction-[revert-layer]"],
|
|
6820
|
-
unset: ["direction-[unset]"]
|
|
6821
|
-
},
|
|
6822
|
-
wrap: {
|
|
6823
|
-
nowrap: ["flex-nowrap"],
|
|
6824
|
-
wrap: ["flex-wrap"],
|
|
6825
|
-
"wrap-reverse": ["flex-wrap-reverse"],
|
|
6826
|
-
inherit: ["[flex-wrap:inherit]"],
|
|
6827
|
-
initial: ["[flex-wrap:initial]"],
|
|
6828
|
-
revert: ["[flex-wrap:revert]"],
|
|
6829
|
-
"revert-layer": ["[flex-wrap:revert-layer]"],
|
|
6830
|
-
unset: ["[flex-wrap:unset]"]
|
|
6831
|
-
},
|
|
6832
|
-
justify: {
|
|
6833
|
-
normal: ["justify-normal"],
|
|
6834
|
-
unsafe: ["[justify-content:unsafe]"],
|
|
6835
|
-
safe: ["[justify-content:safe]"],
|
|
6836
|
-
start: ["justify-start"],
|
|
6837
|
-
center: ["justify-center"],
|
|
6838
|
-
end: ["justify-end"],
|
|
6839
|
-
"flex-start": ["justify-start"],
|
|
6840
|
-
"flex-end": ["justify-end"],
|
|
6841
|
-
left: ["[justify-content:left]"],
|
|
6842
|
-
right: ["[justify-content:right]"],
|
|
6843
|
-
"space-between": ["justify-between"],
|
|
6844
|
-
"space-around": ["justify-around"],
|
|
6845
|
-
"space-evenly": ["justify-evenly"],
|
|
6846
|
-
stretch: ["justify-stretch"],
|
|
6847
|
-
inherit: ["[justify-content:inherit]"],
|
|
6848
|
-
initial: ["[justify-content:initial]"],
|
|
6849
|
-
revert: ["[justify-content:revert]"],
|
|
6850
|
-
"revert-layer": ["[justify-content:revert-layer]"],
|
|
6851
|
-
unset: ["[justify-content:unset]"]
|
|
6852
|
-
},
|
|
6853
|
-
align: {
|
|
6854
|
-
normal: ["[align-items:normal]"],
|
|
6855
|
-
unsafe: ["[align-items:unsafe]"],
|
|
6856
|
-
safe: ["[align-items:safe]"],
|
|
6857
|
-
center: ["items-center"],
|
|
6858
|
-
start: ["items-start"],
|
|
6859
|
-
end: ["items-end"],
|
|
6860
|
-
"self-start": ["[align-items:self-start]"],
|
|
6861
|
-
"self-end": ["[align-items:self-end]"],
|
|
6862
|
-
"flex-start": ["items-start"],
|
|
6863
|
-
"flex-end": ["items-end"],
|
|
6864
|
-
baseline: ["items-baseline"],
|
|
6865
|
-
"first baseline": ["[align-items:first baseline]"],
|
|
6866
|
-
"last baseline": ["[align-items:last baseline]"],
|
|
6867
|
-
stretch: ["items-stretch"],
|
|
6868
|
-
inherit: ["[align-items:inherit]"],
|
|
6869
|
-
initial: ["[align-items:initial]"],
|
|
6870
|
-
revert: ["[align-items:revert]"],
|
|
6871
|
-
"revert-layer": ["[align-items:revert-layer]"],
|
|
6872
|
-
unset: ["[align-items:unset]"]
|
|
6873
|
-
},
|
|
6874
|
-
gap: {
|
|
6875
|
-
0: ["gap-0.5"],
|
|
6876
|
-
1: ["gap-1"],
|
|
6877
|
-
2: ["gap-2"],
|
|
6878
|
-
3: ["gap-3"],
|
|
6879
|
-
4: ["gap-4"],
|
|
6880
|
-
24: ["gap-6"],
|
|
6881
|
-
5: ["gap-8"],
|
|
6882
|
-
6: ["gap-10"],
|
|
6883
|
-
7: ["gap-12"],
|
|
6884
|
-
8: ["gap-16"],
|
|
6885
|
-
9: ["gap-20"]
|
|
6886
|
-
}
|
|
6887
|
-
}
|
|
6888
|
-
}, { enabledResponsiveVariants: true });
|
|
6889
|
-
Flex.displayName = "Flex";
|
|
6890
|
-
//#endregion
|
|
6891
6820
|
//#region src/components/form/Form.tsx
|
|
6892
6821
|
var Form = (props) => {
|
|
6893
6822
|
const { children, defaultValues, validationMode = "onBlur", onSubmit, onError, appearance, theme, ...rest } = props;
|
|
@@ -6913,35 +6842,6 @@ var Form = (props) => {
|
|
|
6913
6842
|
};
|
|
6914
6843
|
Form.displayName = "Form";
|
|
6915
6844
|
//#endregion
|
|
6916
|
-
//#region src/components/grid/Grid.tsx
|
|
6917
|
-
var GridContainer = styled("div", {
|
|
6918
|
-
base: ["grid"],
|
|
6919
|
-
variants: { gap: {
|
|
6920
|
-
0: ["gap-0.5"],
|
|
6921
|
-
1: ["gap-1"],
|
|
6922
|
-
2: ["gap-2"],
|
|
6923
|
-
3: ["gap-3"],
|
|
6924
|
-
4: ["gap-4"],
|
|
6925
|
-
24: ["gap-6"],
|
|
6926
|
-
5: ["gap-8"],
|
|
6927
|
-
6: ["gap-10"],
|
|
6928
|
-
7: ["gap-12"],
|
|
6929
|
-
8: ["gap-16"],
|
|
6930
|
-
9: ["gap-20"]
|
|
6931
|
-
} }
|
|
6932
|
-
}, { enabledResponsiveVariants: true });
|
|
6933
|
-
var Grid = ({ className, style, gap = "2", minItemSize, maxItemSize = "1fr", ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridContainer, {
|
|
6934
|
-
...rest,
|
|
6935
|
-
style: {
|
|
6936
|
-
...style,
|
|
6937
|
-
...minItemSize && { "--min-item-size": minItemSize },
|
|
6938
|
-
...maxItemSize && { "--max-item-size": maxItemSize }
|
|
6939
|
-
},
|
|
6940
|
-
gap,
|
|
6941
|
-
className: cn(minItemSize && ["grid-cols-[repeat(auto-fit,minmax(var(--min-item-size,0),var(--max-item-size,0)))]"], className)
|
|
6942
|
-
});
|
|
6943
|
-
Grid.displayName = "Grid";
|
|
6944
|
-
//#endregion
|
|
6945
6845
|
//#region src/components/input-field/InputField.tsx
|
|
6946
6846
|
var InputField = ({ className, label, name, validation, prompt, description, hideLabel, appearance, theme, ...rest }) => {
|
|
6947
6847
|
const { register } = (0, react_hook_form.useFormContext)();
|
|
@@ -7428,7 +7328,7 @@ var NavigationMenuComponent = ({ children, className, ...rest }) => {
|
|
|
7428
7328
|
const [activeItem, setActiveItem] = react.useState();
|
|
7429
7329
|
const [listWidth, setListWidth] = react.useState(0);
|
|
7430
7330
|
const listRef = react.useRef(null);
|
|
7431
|
-
react.
|
|
7331
|
+
react.useEffect(() => {
|
|
7432
7332
|
if (listRef.current) setListWidth(listRef.current.offsetWidth);
|
|
7433
7333
|
}, [react.Children.toArray(children).length]);
|
|
7434
7334
|
react.useEffect(() => {
|
|
@@ -10211,9 +10111,9 @@ Toast.Close = ToastCloseButton;
|
|
|
10211
10111
|
var ToastProviderBase = styled("div", { base: [
|
|
10212
10112
|
"fixed",
|
|
10213
10113
|
"z-2147483647",
|
|
10214
|
-
"inset-2",
|
|
10114
|
+
"inset-safe-offset-2",
|
|
10215
10115
|
"pointer-events-none",
|
|
10216
|
-
"sm:top-3"
|
|
10116
|
+
"sm:top-safe-offset-3"
|
|
10217
10117
|
] });
|
|
10218
10118
|
var ToastWrapper = styled("div", {
|
|
10219
10119
|
base: [
|
|
@@ -10620,21 +10520,21 @@ var StyledRoot = styled("header", {
|
|
|
10620
10520
|
variants: {
|
|
10621
10521
|
hasScrolled: { true: ["shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]"] },
|
|
10622
10522
|
size: {
|
|
10623
|
-
md: ["h-16"],
|
|
10624
|
-
lg: ["h-24"]
|
|
10523
|
+
md: ["h-safe-offset-top-16", "pt-safe"],
|
|
10524
|
+
lg: ["h-safe-offset-top-24", "pt-safe"]
|
|
10625
10525
|
},
|
|
10626
10526
|
diffused: { true: ["supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]", "supports-color-mix:backdrop-blur-sm"] },
|
|
10627
10527
|
appearance: {
|
|
10628
10528
|
standard: [
|
|
10629
10529
|
"w-screen",
|
|
10630
10530
|
"max-w-full",
|
|
10631
|
-
"top-
|
|
10531
|
+
"top-safe",
|
|
10632
10532
|
"border-b",
|
|
10633
10533
|
"border-b-(--border-bottom)"
|
|
10634
10534
|
],
|
|
10635
10535
|
rounded: [
|
|
10636
10536
|
"w-full",
|
|
10637
|
-
"top-2",
|
|
10537
|
+
"top-safe-offset-2",
|
|
10638
10538
|
"p-2",
|
|
10639
10539
|
"border",
|
|
10640
10540
|
"border-white",
|
|
@@ -11132,7 +11032,6 @@ exports.Avatar = Avatar;
|
|
|
11132
11032
|
exports.Badge = Badge;
|
|
11133
11033
|
exports.BannerRegular = BannerRegular;
|
|
11134
11034
|
exports.BannerSlim = BannerSlim;
|
|
11135
|
-
exports.Box = Box;
|
|
11136
11035
|
exports.Button = Button;
|
|
11137
11036
|
exports.Carousel = Carousel;
|
|
11138
11037
|
exports.Checkbox = Checkbox;
|
|
@@ -11159,9 +11058,7 @@ exports.EmptyState = EmptyState;
|
|
|
11159
11058
|
exports.FieldWrapper = FieldWrapper;
|
|
11160
11059
|
exports.FileDrop = FileDrop;
|
|
11161
11060
|
exports.FileInput = FileInput;
|
|
11162
|
-
exports.Flex = Flex;
|
|
11163
11061
|
exports.Form = Form;
|
|
11164
|
-
exports.Grid = Grid;
|
|
11165
11062
|
exports.Heading = Heading;
|
|
11166
11063
|
exports.Icon = Icon;
|
|
11167
11064
|
exports.Image = Image;
|