@swan-io/lake 15.3.1 → 15.4.0
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/package.json +5 -5
- package/src/components/Accordion.d.ts +1 -1
- package/src/components/AppOpeningAnimation.d.ts +1 -1
- package/src/components/AutoWidthImage.d.ts +1 -1
- package/src/components/AutocompleteSearchInput.d.ts +1 -1
- package/src/components/AutocompleteSearchInput.js +2 -2
- package/src/components/Avatar.js +3 -6
- package/src/components/BorderedIcon.d.ts +1 -1
- package/src/components/BottomPanel.d.ts +1 -1
- package/src/components/Box.d.ts +1 -1
- package/src/components/Breadcrumbs.d.ts +2 -2
- package/src/components/Breadcrumbs.js +3 -5
- package/src/components/BulletList.d.ts +10 -0
- package/src/components/BulletList.js +12 -0
- package/src/components/Cells.d.ts +6 -6
- package/src/components/Cells.js +1 -1
- package/src/components/ContextMenu.d.ts +2 -2
- package/src/components/ContextMenu.js +1 -1
- package/src/components/EmptyView.d.ts +1 -1
- package/src/components/EmptyView.js +1 -1
- package/src/components/Fill.d.ts +1 -1
- package/src/components/FlatList.d.ts +1 -1
- package/src/components/FlatList.js +3 -3
- package/src/components/FlowPresentation.d.ts +1 -1
- package/src/components/FocusTrap.d.ts +1 -1
- package/src/components/Form.d.ts +120 -123
- package/src/components/FullViewportLayer.d.ts +1 -1
- package/src/components/Grid.d.ts +1 -1
- package/src/components/Icon.js +1 -1
- package/src/components/InputError.d.ts +1 -1
- package/src/components/LakeAlert.d.ts +1 -1
- package/src/components/LakeAlert.js +2 -2
- package/src/components/LakeButton.d.ts +2 -2
- package/src/components/LakeButton.js +1 -1
- package/src/components/LakeCheckbox.d.ts +2 -2
- package/src/components/LakeCheckbox.js +2 -2
- package/src/components/LakeCombobox.d.ts +1 -1
- package/src/components/LakeCopyButton.d.ts +1 -1
- package/src/components/LakeDownloadButton.d.ts +1 -1
- package/src/components/LakeHeading.d.ts +1 -1
- package/src/components/LakeLabel.d.ts +1 -1
- package/src/components/LakeLabel.js +2 -2
- package/src/components/LakeRadio.d.ts +1 -1
- package/src/components/LakeScrollView.d.ts +1 -1
- package/src/components/LakeSelect.d.ts +1 -1
- package/src/components/LakeSelect.js +8 -10
- package/src/components/LakeSlider.d.ts +1 -1
- package/src/components/LakeStepper.d.ts +3 -3
- package/src/components/LakeStepper.js +3 -3
- package/src/components/LakeTagInput.d.ts +1 -1
- package/src/components/LakeText.d.ts +1 -1
- package/src/components/LakeTextInput.d.ts +1 -1
- package/src/components/LakeTextInput.js +1 -1
- package/src/components/LakeTooltip.d.ts +2 -2
- package/src/components/LakeTooltip.js +2 -2
- package/src/components/Link.d.ts +1 -1
- package/src/components/ListRightPanel.d.ts +2 -2
- package/src/components/LoadingView.d.ts +1 -1
- package/src/components/MultiSelect.d.ts +1 -1
- package/src/components/MultiSelect.js +2 -2
- package/src/components/PlainListView.d.ts +3 -9
- package/src/components/PlainListView.js +1 -1
- package/src/components/PopoverContent.d.ts +1 -1
- package/src/components/Pressable.js +3 -3
- package/src/components/ProgressTracker.d.ts +22 -0
- package/src/components/ProgressTracker.js +71 -0
- package/src/components/ProjectEnvTag.d.ts +1 -1
- package/src/components/QuickActions.d.ts +1 -1
- package/src/components/QuickActions.js +6 -9
- package/src/components/RadioGroup.d.ts +1 -1
- package/src/components/RadioGroup.js +1 -1
- package/src/components/ReadOnlyFieldList.d.ts +1 -1
- package/src/components/ReadOnlyFieldList.js +1 -1
- package/src/components/ResponsiveContainer.d.ts +1 -1
- package/src/components/RightPanel.d.ts +1 -1
- package/src/components/RightPanel.js +1 -1
- package/src/components/ScrollView.d.ts +1 -1
- package/src/components/SectionList.d.ts +1 -1
- package/src/components/SectionList.js +3 -3
- package/src/components/SegmentedControl.d.ts +1 -1
- package/src/components/SegmentedControl.js +1 -1
- package/src/components/Separator.d.ts +1 -1
- package/src/components/SidebarNavigationTracker.d.ts +2 -2
- package/src/components/SidebarNavigationTracker.js +2 -1
- package/src/components/SmsOpeningAnimation.d.ts +1 -1
- package/src/components/SortBottomPanel.d.ts +1 -1
- package/src/components/Space.d.ts +1 -1
- package/src/components/Stack.d.ts +1 -1
- package/src/components/StepDots.d.ts +1 -1
- package/src/components/Suspendable.d.ts +1 -1
- package/src/components/Suspendable.js +1 -1
- package/src/components/Svg.d.ts +10 -10
- package/src/components/Svg.js +1 -1
- package/src/components/SwanLogo.d.ts +1 -1
- package/src/components/Switch.d.ts +1 -1
- package/src/components/Switch.js +1 -1
- package/src/components/TabView.d.ts +1 -1
- package/src/components/TabView.js +4 -4
- package/src/components/Tag.d.ts +1 -1
- package/src/components/Tag.js +1 -1
- package/src/components/Tick.d.ts +1 -1
- package/src/components/Tile.d.ts +13 -6
- package/src/components/Tile.js +32 -6
- package/src/components/TilePlaceholder.d.ts +4 -2
- package/src/components/TilePlaceholder.js +3 -3
- package/src/components/TimePicker.d.ts +2 -2
- package/src/components/Toggle.d.ts +1 -1
- package/src/components/Toggle.js +1 -1
- package/src/components/TransitionGroupView.d.ts +1 -1
- package/src/components/TransitionGroupView.js +1 -1
- package/src/components/TransitionView.d.ts +1 -1
- package/src/components/VirtualizedList.d.ts +2 -2
- package/src/components/VirtualizedList.js +2 -2
- package/src/components/WithCurrentColor.d.ts +2 -2
- package/src/components/WithPartnerAccentColor.d.ts +1 -1
- package/src/hooks/useUpdateEffect.js +1 -2
- package/src/utils/highlights.js +2 -1
- package/src/utils/string.js +1 -1
- package/src/utils/svg.js +5 -5
package/src/utils/svg.js
CHANGED
|
@@ -11,16 +11,16 @@ export const getSvgSize = (svg) => {
|
|
|
11
11
|
// first we try to get width and height from "width" and "height" attributes
|
|
12
12
|
const widthAttr = svg.getAttribute("width");
|
|
13
13
|
const heightAttr = svg.getAttribute("height");
|
|
14
|
-
const width = isNotNullish(widthAttr) ? Number.parseInt(widthAttr) : Number.NaN;
|
|
15
|
-
const height = isNotNullish(heightAttr) ? Number.parseInt(heightAttr) : Number.NaN;
|
|
14
|
+
const width = isNotNullish(widthAttr) ? Number.parseInt(widthAttr, 10) : Number.NaN;
|
|
15
|
+
const height = isNotNullish(heightAttr) ? Number.parseInt(heightAttr, 10) : Number.NaN;
|
|
16
16
|
if (!Number.isNaN(width) || !Number.isNaN(height)) {
|
|
17
17
|
return Result.Ok({ width, height });
|
|
18
18
|
}
|
|
19
19
|
// if height and width aren't provided, we get values from viewBox attribute
|
|
20
20
|
const viewBox = svg.getAttribute("viewBox");
|
|
21
21
|
const [, , boxWidthAttr, boxHeightAttr] = (_a = viewBox === null || viewBox === void 0 ? void 0 : viewBox.split(" ")) !== null && _a !== void 0 ? _a : [];
|
|
22
|
-
const boxWidth = isNotNullish(boxWidthAttr) ? Number.parseInt(boxWidthAttr) : Number.NaN;
|
|
23
|
-
const boxHeight = isNotNullish(boxHeightAttr) ? Number.parseInt(boxHeightAttr) : Number.NaN;
|
|
22
|
+
const boxWidth = isNotNullish(boxWidthAttr) ? Number.parseInt(boxWidthAttr, 10) : Number.NaN;
|
|
23
|
+
const boxHeight = isNotNullish(boxHeightAttr) ? Number.parseInt(boxHeightAttr, 10) : Number.NaN;
|
|
24
24
|
if (Number.isNaN(boxWidth) || Number.isNaN(boxHeight)) {
|
|
25
25
|
return Result.Error("VIEWBOX_MISSING");
|
|
26
26
|
}
|
|
@@ -68,7 +68,7 @@ const getMatrixColor = (color) => {
|
|
|
68
68
|
const green = colorIntensity;
|
|
69
69
|
const blue = colorIntensity;
|
|
70
70
|
const alpha = 1;
|
|
71
|
-
//
|
|
71
|
+
// biome-ignore format: keep matrix format for readability
|
|
72
72
|
const matrix = [
|
|
73
73
|
red, red, red, red, red, // R
|
|
74
74
|
green, green, green, green, green, // G
|