@vygruppen/spor-react 12.3.5 → 12.4.1
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/.turbo/turbo-build.log +17 -11
- package/.turbo/turbo-postinstall.log +19 -1
- package/CHANGELOG.md +26 -0
- package/dist/icons/index.d.mts +1 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +14 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/index.mjs +3 -0
- package/dist/icons/index.mjs.map +1 -0
- package/dist/index.d.mts +4 -99
- package/dist/index.d.ts +4 -99
- package/dist/index.js +34 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -7
- package/src/icons/index.tsx +1 -0
- package/src/input/CountryCodeSelect.tsx +1 -1
- package/src/input/PhoneNumberInput.tsx +1 -1
- package/src/input/Select.tsx +40 -39
- package/src/theme/slot-recipes/alert.ts +1 -3
- package/src/theme/slot-recipes/select.ts +21 -11
- package/tsup.config.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.
|
2
|
+
> @vygruppen/spor-react@12.4.1 build /home/runner/work/spor/spor/packages/spor-react
|
3
3
|
> tsup
|
4
4
|
|
5
|
-
CLI Building entry: src/index.tsx
|
5
|
+
CLI Building entry: src/index.tsx, src/icons/index.tsx
|
6
6
|
CLI Using tsconfig: tsconfig.json
|
7
7
|
CLI tsup v7.3.0
|
8
8
|
CLI Using tsup config: /home/runner/work/spor/spor/packages/spor-react/tsup.config.ts
|
@@ -10,12 +10,18 @@ CLI Target: node16
|
|
10
10
|
CJS Build start
|
11
11
|
ESM Build start
|
12
12
|
DTS Build start
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
ESM dist/index.mjs
|
17
|
-
ESM
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
13
|
+
ESM dist/icons/index.mjs 110.00 B
|
14
|
+
ESM dist/index.mjs 295.23 KB
|
15
|
+
ESM dist/icons/index.mjs.map 157.00 B
|
16
|
+
ESM dist/index.mjs.map 633.84 KB
|
17
|
+
ESM ⚡️ Build success in 2800ms
|
18
|
+
CJS dist/index.js 315.85 KB
|
19
|
+
CJS dist/icons/index.js 380.00 B
|
20
|
+
CJS dist/index.js.map 633.84 KB
|
21
|
+
CJS dist/icons/index.js.map 157.00 B
|
22
|
+
CJS ⚡️ Build success in 2801ms
|
23
|
+
DTS ⚡️ Build success in 30877ms
|
24
|
+
DTS dist/icons/index.d.ts 44.00 B
|
25
|
+
DTS dist/index.d.ts 126.10 KB
|
26
|
+
DTS dist/icons/index.d.mts 44.00 B
|
27
|
+
DTS dist/index.d.mts 126.10 KB
|
@@ -1,8 +1,26 @@
|
|
1
1
|
|
2
|
-
> @vygruppen/spor-react@12.
|
2
|
+
> @vygruppen/spor-react@12.4.1 postinstall /home/runner/work/spor/spor/packages/spor-react
|
3
3
|
> chakra typegen src/theme/index.ts
|
4
4
|
|
5
5
|
[90m┌[39m Chakra CLI ⚡️
|
6
|
+
▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
|
7
|
+
|
8
|
+
../spor-design-tokens/package.json:15:6:
|
9
|
+
15 │ "types": "./dist/tokens.d.ts"
|
10
|
+
╵ ~~~~~~~
|
11
|
+
|
12
|
+
The "import" condition comes earlier and will be used for all "import" statements:
|
13
|
+
|
14
|
+
../spor-design-tokens/package.json:13:6:
|
15
|
+
13 │ "import": "./dist/tokens.mjs",
|
16
|
+
╵ ~~~~~~~~
|
17
|
+
|
18
|
+
The "require" condition comes earlier and will be used for all "require" calls:
|
19
|
+
|
20
|
+
../spor-design-tokens/package.json:14:6:
|
21
|
+
14 │ "require": "./dist/tokens.js",
|
22
|
+
╵ ~~~~~~~~~
|
23
|
+
|
6
24
|
[?25l[90m│[39m
|
7
25
|
[35m◒[39m Generating conditions types...
|
8
26
|
[999D[J[32m◇[39m ✅ Generated conditions typings
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# @vygruppen/spor-react
|
2
2
|
|
3
|
+
## 12.4.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 184803a: Support exporting icons directly from spor, which seems to fix SSR issues for icons.
|
8
|
+
- 812afc9: CountryCodeSelect: Fixed onValueChange and UU styling in select.
|
9
|
+
|
10
|
+
## 12.4.0
|
11
|
+
|
12
|
+
### Minor Changes
|
13
|
+
|
14
|
+
- 404114d: **spor-icon-react**:
|
15
|
+
|
16
|
+
- Upgraded Chakra UI to the latest version
|
17
|
+
- Removed `ClientOnlyWrapper` from all icons
|
18
|
+
|
19
|
+
**spor-react**:
|
20
|
+
|
21
|
+
- Upgraded Chakra UI to the latest version
|
22
|
+
- Fixed minor styling issues in the `Select` component
|
23
|
+
|
24
|
+
### Patch Changes
|
25
|
+
|
26
|
+
- Updated dependencies [404114d]
|
27
|
+
- @vygruppen/spor-icon-react@4.1.0
|
28
|
+
|
3
29
|
## 12.3.5
|
4
30
|
|
5
31
|
### Patch Changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '@vygruppen/spor-icon-react';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from '@vygruppen/spor-icon-react';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var sporIconReact = require('@vygruppen/spor-icon-react');
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
Object.keys(sporIconReact).forEach(function (k) {
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
9
|
+
enumerable: true,
|
10
|
+
get: function () { return sporIconReact[k]; }
|
11
|
+
});
|
12
|
+
});
|
13
|
+
//# sourceMappingURL=out.js.map
|
14
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/icons/index.tsx"],"names":[],"mappings":";AAAA,cAAc","sourcesContent":["export * from \"@vygruppen/spor-icon-react\";\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/icons/index.tsx"],"names":[],"mappings":";AAAA,cAAc","sourcesContent":["export * from \"@vygruppen/spor-icon-react\";\n"]}
|
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React$1 from 'react';
|
2
2
|
import React__default, { PropsWithChildren, ReactNode } from 'react';
|
3
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
4
|
-
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
4
|
+
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, SelectLabelProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
5
5
|
export { Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
7
7
|
import { IconComponent } from '@vygruppen/spor-icon-react';
|
@@ -1574,80 +1574,7 @@ declare const SearchInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.In
|
|
1574
1574
|
onReset?: () => void;
|
1575
1575
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
1576
1576
|
|
1577
|
-
|
1578
|
-
variant: {
|
1579
|
-
core: {
|
1580
|
-
control: {
|
1581
|
-
outline: "1px solid";
|
1582
|
-
outlineColor: "core.outline";
|
1583
|
-
_hover: {
|
1584
|
-
outline: "2px solid";
|
1585
|
-
outlineColor: "core.outline";
|
1586
|
-
};
|
1587
|
-
_active: {
|
1588
|
-
backgroundColor: "brand.surface.active";
|
1589
|
-
};
|
1590
|
-
_disabled: {
|
1591
|
-
pointerEvents: "none";
|
1592
|
-
color: "text.disabled";
|
1593
|
-
backgroundColor: "surface.disabled";
|
1594
|
-
};
|
1595
|
-
};
|
1596
|
-
};
|
1597
|
-
floating: {
|
1598
|
-
control: {
|
1599
|
-
backgroundColor: {
|
1600
|
-
_light: "bg";
|
1601
|
-
_dark: "color-mix(in srgb, white 10%, var(--spor-colors-bg))";
|
1602
|
-
};
|
1603
|
-
outline: "1px solid";
|
1604
|
-
outlineColor: "floating.outline";
|
1605
|
-
_hover: {
|
1606
|
-
outline: "1px solid";
|
1607
|
-
outlineColor: "floating.outline.hover";
|
1608
|
-
backgroundColor: {
|
1609
|
-
_light: "floating.surface.hover";
|
1610
|
-
_dark: "color-mix(in srgb, white 10%, var(--spor-colors-bg))";
|
1611
|
-
};
|
1612
|
-
};
|
1613
|
-
_active: {
|
1614
|
-
outline: "1px solid";
|
1615
|
-
outlineColor: "floating.outline.active";
|
1616
|
-
backgroundColor: "floating.surface.active";
|
1617
|
-
};
|
1618
|
-
};
|
1619
|
-
selectContent: {
|
1620
|
-
outline: "1px solid";
|
1621
|
-
outlineColor: "floating.outline";
|
1622
|
-
};
|
1623
|
-
};
|
1624
|
-
rightSideSquare: {
|
1625
|
-
control: {
|
1626
|
-
outline: "1px solid";
|
1627
|
-
outlineColor: "core.outline";
|
1628
|
-
};
|
1629
|
-
trigger: {
|
1630
|
-
_focus: {
|
1631
|
-
borderRightRadius: "none";
|
1632
|
-
};
|
1633
|
-
};
|
1634
|
-
};
|
1635
|
-
leftSideSquare: {
|
1636
|
-
control: {
|
1637
|
-
outline: "1px solid";
|
1638
|
-
outlineColor: "core.outline";
|
1639
|
-
};
|
1640
|
-
trigger: {
|
1641
|
-
_focus: {
|
1642
|
-
borderLeftRadius: "none";
|
1643
|
-
};
|
1644
|
-
};
|
1645
|
-
};
|
1646
|
-
};
|
1647
|
-
}>;
|
1648
|
-
|
1649
|
-
type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
|
1650
|
-
type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVariantProps> & {
|
1577
|
+
type SelectProps = SelectRootProps & FieldProps & {
|
1651
1578
|
label?: string;
|
1652
1579
|
};
|
1653
1580
|
/**
|
@@ -1680,52 +1607,30 @@ type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVarian
|
|
1680
1607
|
declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1681
1608
|
children?: React$1.ReactNode | undefined;
|
1682
1609
|
} & FieldBaseProps & {
|
1683
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1684
|
-
} & {
|
1685
1610
|
label?: string;
|
1686
1611
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1612
|
+
declare const SelectLabel: (props: SelectLabelProps) => react_jsx_runtime.JSX.Element;
|
1687
1613
|
declare const SelectItem: React$1.ForwardRefExoticComponent<Select$1.ItemProps & {
|
1688
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1689
|
-
} & {
|
1690
|
-
children?: React$1.ReactNode | undefined;
|
1691
|
-
} & {
|
1692
1614
|
children: React$1.ReactNode;
|
1693
1615
|
description?: React$1.ReactNode;
|
1694
1616
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1695
1617
|
declare const SelectItemGroup: React$1.ForwardRefExoticComponent<Select$1.ItemGroupProps & {
|
1696
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1697
|
-
} & {
|
1698
|
-
children?: React$1.ReactNode | undefined;
|
1699
|
-
} & {
|
1700
1618
|
label: React$1.ReactNode;
|
1701
1619
|
children: React$1.ReactNode;
|
1702
1620
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1703
1621
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Select$1.ControlProps & {
|
1704
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1705
|
-
} & {
|
1706
|
-
children?: React$1.ReactNode | undefined;
|
1707
|
-
} & {
|
1708
1622
|
clearable?: boolean;
|
1709
1623
|
children?: React$1.ReactNode;
|
1710
1624
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
1711
1625
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Select$1.ContentProps & {
|
1712
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1713
|
-
} & {
|
1714
|
-
children?: React$1.ReactNode | undefined;
|
1715
|
-
} & {
|
1716
1626
|
portalled?: boolean;
|
1717
1627
|
portalRef?: React$1.RefObject<HTMLElement>;
|
1718
1628
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1719
1629
|
declare const SelectValueText: React$1.ForwardRefExoticComponent<Omit<Select$1.ValueTextProps, "children"> & {
|
1720
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1721
|
-
} & {
|
1722
|
-
children?: React$1.ReactNode | undefined;
|
1723
|
-
} & {
|
1724
1630
|
children?(items: CollectionItem[]): React$1.ReactNode;
|
1725
1631
|
placeholder?: string;
|
1726
1632
|
withPlaceholder?: boolean;
|
1727
1633
|
} & React$1.RefAttributes<HTMLSpanElement>>;
|
1728
|
-
declare const SelectLabel: React$1.ForwardRefExoticComponent<Select$1.LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
1729
1634
|
declare const SelectItemText: React$1.ForwardRefExoticComponent<Select$1.ItemTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
1730
1635
|
declare const SelectRoot: Select$1.RootComponent;
|
1731
1636
|
|
@@ -3582,7 +3487,7 @@ type ToastProps = {
|
|
3582
3487
|
variant: Variant;
|
3583
3488
|
id?: string;
|
3584
3489
|
};
|
3585
|
-
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string
|
3490
|
+
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string;
|
3586
3491
|
|
3587
3492
|
type BadgeProps = BadgeProps$1 & {
|
3588
3493
|
icon?: IconComponent;
|
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as React$1 from 'react';
|
2
2
|
import React__default, { PropsWithChildren, ReactNode } from 'react';
|
3
3
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
4
|
-
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
4
|
+
import { Accordion as Accordion$1, Alert as Alert$1, ConditionalValue, Breadcrumb as Breadcrumb$1, RecipeVariantProps, ButtonProps as ButtonProps$1, GroupProps, Clipboard as Clipboard$1, IconButtonProps as IconButtonProps$1, BoxProps, Field as Field$1, PopoverRootProps, Dialog, Drawer as Drawer$1, Checkbox as Checkbox$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxCardRootProps, CheckboxCard, Fieldset as Fieldset$1, InputProps as InputProps$1, ListRootProps, NativeSelectFieldProps, NativeSelect as NativeSelect$1, RadioGroup as RadioGroup$1, SelectRootProps, SelectLabelProps, Select as Select$1, CollectionItem, Switch as Switch$1, TextareaProps as TextareaProps$1, RadioCard as RadioCard$1, SeparatorProps, LinkProps as LinkProps$1, List as List$1, UseProgressProps, SkeletonProps as SkeletonProps$1, CircleProps, Popover as Popover$1, Pagination as Pagination$1, ChakraProviderProps, SystemContext, TabsRootProps, Tabs as Tabs$1, TableRootProps, Table as Table$1, BadgeProps as BadgeProps$1, CodeProps, HeadingProps as HeadingProps$1, TextProps as TextProps$1 } from '@chakra-ui/react';
|
5
5
|
export { Box, BoxProps, BreadcrumbCurrentLink, BreadcrumbEllipsis, BreadcrumbLink, Center, CenterProps, Collapsible, CollapsibleRootProps, Container, ContainerProps, Em, Flex, FlexProps, For, FormatByte, FormatNumber, Grid, GridItem, GridItemProps, GridProps, HStack, Image, ImageProps, Kbd, LocaleProvider, Portal, PortalProps, Show, SimpleGrid, SimpleGridProps, Spacer, SpacerProps, Span, Stack, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableColumn, TableColumnHeader, TableColumnHeaderProps, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableRoot, TableRootProps, TableRow, TableRowProps, UseDisclosureProps, VStack, VisuallyHidden, createListCollection, createSystem, defineConfig, defineRecipe, defineStyle, useBreakpointValue, useCheckbox, useClipboard, useControllableProp, useDisclosure, useMediaQuery, useToken } from '@chakra-ui/react';
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
7
7
|
import { IconComponent } from '@vygruppen/spor-icon-react';
|
@@ -1574,80 +1574,7 @@ declare const SearchInput: React$1.ForwardRefExoticComponent<_chakra_ui_react.In
|
|
1574
1574
|
onReset?: () => void;
|
1575
1575
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
1576
1576
|
|
1577
|
-
|
1578
|
-
variant: {
|
1579
|
-
core: {
|
1580
|
-
control: {
|
1581
|
-
outline: "1px solid";
|
1582
|
-
outlineColor: "core.outline";
|
1583
|
-
_hover: {
|
1584
|
-
outline: "2px solid";
|
1585
|
-
outlineColor: "core.outline";
|
1586
|
-
};
|
1587
|
-
_active: {
|
1588
|
-
backgroundColor: "brand.surface.active";
|
1589
|
-
};
|
1590
|
-
_disabled: {
|
1591
|
-
pointerEvents: "none";
|
1592
|
-
color: "text.disabled";
|
1593
|
-
backgroundColor: "surface.disabled";
|
1594
|
-
};
|
1595
|
-
};
|
1596
|
-
};
|
1597
|
-
floating: {
|
1598
|
-
control: {
|
1599
|
-
backgroundColor: {
|
1600
|
-
_light: "bg";
|
1601
|
-
_dark: "color-mix(in srgb, white 10%, var(--spor-colors-bg))";
|
1602
|
-
};
|
1603
|
-
outline: "1px solid";
|
1604
|
-
outlineColor: "floating.outline";
|
1605
|
-
_hover: {
|
1606
|
-
outline: "1px solid";
|
1607
|
-
outlineColor: "floating.outline.hover";
|
1608
|
-
backgroundColor: {
|
1609
|
-
_light: "floating.surface.hover";
|
1610
|
-
_dark: "color-mix(in srgb, white 10%, var(--spor-colors-bg))";
|
1611
|
-
};
|
1612
|
-
};
|
1613
|
-
_active: {
|
1614
|
-
outline: "1px solid";
|
1615
|
-
outlineColor: "floating.outline.active";
|
1616
|
-
backgroundColor: "floating.surface.active";
|
1617
|
-
};
|
1618
|
-
};
|
1619
|
-
selectContent: {
|
1620
|
-
outline: "1px solid";
|
1621
|
-
outlineColor: "floating.outline";
|
1622
|
-
};
|
1623
|
-
};
|
1624
|
-
rightSideSquare: {
|
1625
|
-
control: {
|
1626
|
-
outline: "1px solid";
|
1627
|
-
outlineColor: "core.outline";
|
1628
|
-
};
|
1629
|
-
trigger: {
|
1630
|
-
_focus: {
|
1631
|
-
borderRightRadius: "none";
|
1632
|
-
};
|
1633
|
-
};
|
1634
|
-
};
|
1635
|
-
leftSideSquare: {
|
1636
|
-
control: {
|
1637
|
-
outline: "1px solid";
|
1638
|
-
outlineColor: "core.outline";
|
1639
|
-
};
|
1640
|
-
trigger: {
|
1641
|
-
_focus: {
|
1642
|
-
borderLeftRadius: "none";
|
1643
|
-
};
|
1644
|
-
};
|
1645
|
-
};
|
1646
|
-
};
|
1647
|
-
}>;
|
1648
|
-
|
1649
|
-
type SelectVariantProps = RecipeVariantProps<typeof selectSlotRecipe>;
|
1650
|
-
type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVariantProps> & {
|
1577
|
+
type SelectProps = SelectRootProps & FieldProps & {
|
1651
1578
|
label?: string;
|
1652
1579
|
};
|
1653
1580
|
/**
|
@@ -1680,52 +1607,30 @@ type SelectProps = SelectRootProps & FieldProps & PropsWithChildren<SelectVarian
|
|
1680
1607
|
declare const Select: React$1.ForwardRefExoticComponent<SelectRootProps<any> & Omit<_chakra_ui_react.FieldRootProps, "label"> & {
|
1681
1608
|
children?: React$1.ReactNode | undefined;
|
1682
1609
|
} & FieldBaseProps & {
|
1683
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1684
|
-
} & {
|
1685
1610
|
label?: string;
|
1686
1611
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1612
|
+
declare const SelectLabel: (props: SelectLabelProps) => react_jsx_runtime.JSX.Element;
|
1687
1613
|
declare const SelectItem: React$1.ForwardRefExoticComponent<Select$1.ItemProps & {
|
1688
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1689
|
-
} & {
|
1690
|
-
children?: React$1.ReactNode | undefined;
|
1691
|
-
} & {
|
1692
1614
|
children: React$1.ReactNode;
|
1693
1615
|
description?: React$1.ReactNode;
|
1694
1616
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1695
1617
|
declare const SelectItemGroup: React$1.ForwardRefExoticComponent<Select$1.ItemGroupProps & {
|
1696
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1697
|
-
} & {
|
1698
|
-
children?: React$1.ReactNode | undefined;
|
1699
|
-
} & {
|
1700
1618
|
label: React$1.ReactNode;
|
1701
1619
|
children: React$1.ReactNode;
|
1702
1620
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1703
1621
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Select$1.ControlProps & {
|
1704
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1705
|
-
} & {
|
1706
|
-
children?: React$1.ReactNode | undefined;
|
1707
|
-
} & {
|
1708
1622
|
clearable?: boolean;
|
1709
1623
|
children?: React$1.ReactNode;
|
1710
1624
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
1711
1625
|
declare const SelectContent: React$1.ForwardRefExoticComponent<Select$1.ContentProps & {
|
1712
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1713
|
-
} & {
|
1714
|
-
children?: React$1.ReactNode | undefined;
|
1715
|
-
} & {
|
1716
1626
|
portalled?: boolean;
|
1717
1627
|
portalRef?: React$1.RefObject<HTMLElement>;
|
1718
1628
|
} & React$1.RefAttributes<HTMLDivElement>>;
|
1719
1629
|
declare const SelectValueText: React$1.ForwardRefExoticComponent<Omit<Select$1.ValueTextProps, "children"> & {
|
1720
|
-
variant?: _chakra_ui_react.ConditionalValue<"floating" | "core" | "rightSideSquare" | "leftSideSquare" | undefined>;
|
1721
|
-
} & {
|
1722
|
-
children?: React$1.ReactNode | undefined;
|
1723
|
-
} & {
|
1724
1630
|
children?(items: CollectionItem[]): React$1.ReactNode;
|
1725
1631
|
placeholder?: string;
|
1726
1632
|
withPlaceholder?: boolean;
|
1727
1633
|
} & React$1.RefAttributes<HTMLSpanElement>>;
|
1728
|
-
declare const SelectLabel: React$1.ForwardRefExoticComponent<Select$1.LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
1729
1634
|
declare const SelectItemText: React$1.ForwardRefExoticComponent<Select$1.ItemTextProps & React$1.RefAttributes<HTMLDivElement>>;
|
1730
1635
|
declare const SelectRoot: Select$1.RootComponent;
|
1731
1636
|
|
@@ -3582,7 +3487,7 @@ type ToastProps = {
|
|
3582
3487
|
variant: Variant;
|
3583
3488
|
id?: string;
|
3584
3489
|
};
|
3585
|
-
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string
|
3490
|
+
declare const createToast: ({ text, variant, id, duration, }: ToastProps) => string;
|
3586
3491
|
|
3587
3492
|
type BadgeProps = BadgeProps$1 & {
|
3588
3493
|
icon?: IconComponent;
|
package/dist/index.js
CHANGED
@@ -4181,7 +4181,7 @@ var CountryCodeSelect = React28.forwardRef((props, ref) => {
|
|
4181
4181
|
lazyMount: true,
|
4182
4182
|
"aria-label": t(texts15.countryCode),
|
4183
4183
|
variant: "rightSideSquare",
|
4184
|
-
children: callingCodes.items.map((code) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { item: code, children: code.label }, code.label))
|
4184
|
+
children: callingCodes.items.map((code) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { as: "option", item: code, children: code.label }, code.label))
|
4185
4185
|
}
|
4186
4186
|
);
|
4187
4187
|
});
|
@@ -4250,6 +4250,7 @@ var PhoneNumberInput = React28.forwardRef((props, ref) => {
|
|
4250
4250
|
{
|
4251
4251
|
ref,
|
4252
4252
|
type: "tel",
|
4253
|
+
...props,
|
4253
4254
|
value: value.nationalNumber,
|
4254
4255
|
invalid,
|
4255
4256
|
errorText,
|
@@ -4263,7 +4264,6 @@ var PhoneNumberInput = React28.forwardRef((props, ref) => {
|
|
4263
4264
|
},
|
4264
4265
|
variant,
|
4265
4266
|
"data-state": "on",
|
4266
|
-
...props,
|
4267
4267
|
label
|
4268
4268
|
}
|
4269
4269
|
)
|
@@ -4383,6 +4383,16 @@ var Select = React28__namespace.forwardRef(
|
|
4383
4383
|
) });
|
4384
4384
|
}
|
4385
4385
|
);
|
4386
|
+
var SelectLabel = (props) => {
|
4387
|
+
const { value } = react.useSelectContext();
|
4388
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
4389
|
+
react.Select.Label,
|
4390
|
+
{
|
4391
|
+
...props,
|
4392
|
+
"data-selected": value.length > 0 ? true : void 0
|
4393
|
+
}
|
4394
|
+
);
|
4395
|
+
};
|
4386
4396
|
Select.displayName = "Select";
|
4387
4397
|
var SelectItem = React28__namespace.forwardRef(
|
4388
4398
|
(props, ref) => {
|
@@ -4390,7 +4400,7 @@ var SelectItem = React28__namespace.forwardRef(
|
|
4390
4400
|
const recipe = react.useSlotRecipe({ key: "select" });
|
4391
4401
|
const styles = recipe();
|
4392
4402
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Select.Item, { item, ...rest, ref, css: styles.item, children: [
|
4393
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
4403
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { width: "100%", children: [
|
4394
4404
|
/* @__PURE__ */ jsxRuntime.jsx(react.Select.ItemText, { display: "flex", children }),
|
4395
4405
|
description && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { css: styles.itemDescription, children: description })
|
4396
4406
|
] }),
|
@@ -4455,7 +4465,6 @@ var SelectValueText = React28__namespace.forwardRef(function SelectValueText2(pr
|
|
4455
4465
|
}
|
4456
4466
|
);
|
4457
4467
|
});
|
4458
|
-
var SelectLabel = react.Select.Label;
|
4459
4468
|
var SelectItemText = react.Select.ItemText;
|
4460
4469
|
var SelectRoot = react.Select.Root;
|
4461
4470
|
var Switch = React28.forwardRef(
|
@@ -7141,9 +7150,6 @@ var alertSlotRecipe = react.defineSlotRecipe({
|
|
7141
7150
|
border: "sm"
|
7142
7151
|
},
|
7143
7152
|
description: {
|
7144
|
-
display: "flex",
|
7145
|
-
alignItems: "flex-start",
|
7146
|
-
gap: 1.5,
|
7147
7153
|
color: "text"
|
7148
7154
|
},
|
7149
7155
|
content: {
|
@@ -7154,7 +7160,8 @@ var alertSlotRecipe = react.defineSlotRecipe({
|
|
7154
7160
|
},
|
7155
7161
|
title: {
|
7156
7162
|
fontWeight: "bold"
|
7157
|
-
}
|
7163
|
+
},
|
7164
|
+
closeButton: {}
|
7158
7165
|
},
|
7159
7166
|
variants: {
|
7160
7167
|
variant: {
|
@@ -9226,17 +9233,7 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
9226
9233
|
flexDirection: "column",
|
9227
9234
|
position: "relative",
|
9228
9235
|
cursor: "pointer",
|
9229
|
-
zIndex: "dropdown"
|
9230
|
-
"& [data-state='open']": {
|
9231
|
-
"& + label": {
|
9232
|
-
transform: ["scale(0.825) translateY(-10px)"]
|
9233
|
-
}
|
9234
|
-
},
|
9235
|
-
"&:has(button span:not(:empty))": {
|
9236
|
-
"& label": {
|
9237
|
-
transform: ["scale(0.825) translateY(-10px)"]
|
9238
|
-
}
|
9239
|
-
}
|
9236
|
+
zIndex: "dropdown"
|
9240
9237
|
},
|
9241
9238
|
label: {
|
9242
9239
|
fontSize: ["mobile.sm", "desktop.sm"],
|
@@ -9244,7 +9241,11 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
9244
9241
|
left: 3,
|
9245
9242
|
zIndex: 0,
|
9246
9243
|
position: "absolute",
|
9244
|
+
color: "text",
|
9247
9245
|
marginY: 2,
|
9246
|
+
_selected: {
|
9247
|
+
transform: ["scale(0.825) translateY(-10px)"]
|
9248
|
+
},
|
9248
9249
|
transitionProperty: "transform",
|
9249
9250
|
transitionDuration: "fast",
|
9250
9251
|
transformOrigin: "top left",
|
@@ -9256,6 +9257,7 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
9256
9257
|
appearance: "none",
|
9257
9258
|
width: "100%",
|
9258
9259
|
height: 8,
|
9260
|
+
color: "text",
|
9259
9261
|
paddingY: 1.5,
|
9260
9262
|
paddingX: 3,
|
9261
9263
|
justifyContent: "space-between",
|
@@ -9306,7 +9308,8 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
9306
9308
|
_open: {
|
9307
9309
|
animationStyle: "slide-fade-in",
|
9308
9310
|
animationDuration: "fast",
|
9309
|
-
zIndex: "popover"
|
9311
|
+
zIndex: "popover",
|
9312
|
+
outline: "none"
|
9310
9313
|
},
|
9311
9314
|
_closed: {
|
9312
9315
|
animationStyle: "slide-fade-out",
|
@@ -9326,6 +9329,17 @@ var selectSlotRecipe = react.defineSlotRecipe({
|
|
9326
9329
|
color: "ghost.text",
|
9327
9330
|
cursor: "pointer",
|
9328
9331
|
outline: "none",
|
9332
|
+
"&[data-highlighted]:hover": {
|
9333
|
+
outlineOffset: "2px",
|
9334
|
+
outline: "2px solid",
|
9335
|
+
outlineColor: "outline.focus",
|
9336
|
+
backgroundColor: "ghost.surface.hover"
|
9337
|
+
},
|
9338
|
+
"&[data-highlighted]": {
|
9339
|
+
outlineOffset: "2px",
|
9340
|
+
outline: "2px solid",
|
9341
|
+
outlineColor: "outline.focus"
|
9342
|
+
},
|
9329
9343
|
_active: {
|
9330
9344
|
backgroundColor: "ghost.surface.active",
|
9331
9345
|
color: "green"
|