webcoreui 0.8.1 → 0.10.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/README.md +36 -6
- package/astro.d.ts +23 -0
- package/astro.js +8 -0
- package/components/Accordion/Accordion.astro +15 -10
- package/components/Accordion/Accordion.svelte +14 -12
- package/components/Accordion/Accordion.tsx +2 -2
- package/components/Accordion/accordion.module.scss +1 -0
- package/components/Alert/Alert.svelte +17 -12
- package/components/Alert/Alert.tsx +1 -1
- package/components/Alert/alert.ts +10 -3
- package/components/AspectRatio/AspectRatio.svelte +7 -4
- package/components/AspectRatio/aspectratio.ts +6 -0
- package/components/Avatar/Avatar.svelte +11 -9
- package/components/Badge/Badge.svelte +14 -10
- package/components/Badge/badge.ts +3 -2
- package/components/Banner/Banner.astro +10 -4
- package/components/Banner/Banner.svelte +14 -10
- package/components/Banner/Banner.tsx +1 -0
- package/components/Banner/banner.ts +6 -0
- package/components/BottomNavigation/BottomNavigation.astro +51 -0
- package/components/BottomNavigation/BottomNavigation.svelte +47 -0
- package/components/BottomNavigation/BottomNavigation.tsx +63 -0
- package/components/BottomNavigation/bottomnavigation.module.scss +70 -0
- package/components/BottomNavigation/bottomnavigation.ts +16 -0
- package/components/Breadcrumb/Breadcrumb.astro +1 -1
- package/components/Breadcrumb/Breadcrumb.svelte +8 -6
- package/components/Breadcrumb/Breadcrumb.tsx +2 -2
- package/components/Button/Button.svelte +12 -8
- package/components/Button/Button.tsx +2 -2
- package/components/Button/button.ts +2 -3
- package/components/Card/Card.svelte +14 -10
- package/components/Card/card.module.scss +1 -0
- package/components/Card/card.ts +6 -0
- package/components/Carousel/Carousel.astro +46 -41
- package/components/Carousel/carousel.ts +3 -0
- package/components/Checkbox/Checkbox.astro +8 -2
- package/components/Checkbox/Checkbox.svelte +12 -8
- package/components/Checkbox/Checkbox.tsx +3 -1
- package/components/Checkbox/checkbox.module.scss +4 -0
- package/components/Checkbox/checkbox.ts +1 -0
- package/components/Collapsible/Collapsible.astro +8 -5
- package/components/Collapsible/Collapsible.svelte +54 -49
- package/components/Collapsible/collapsible.ts +8 -0
- package/components/ConditionalWrapper/ConditionalWrapper.svelte +10 -6
- package/components/ConditionalWrapper/conditionalwrapper.ts +6 -0
- package/components/Copy/Copy.astro +80 -0
- package/components/Copy/Copy.svelte +68 -0
- package/components/Copy/Copy.tsx +74 -0
- package/components/Copy/copy.module.scss +37 -0
- package/components/Copy/copy.ts +20 -0
- package/components/DataTable/DataTable.astro +103 -93
- package/components/DataTable/DataTable.svelte +276 -272
- package/components/DataTable/datatable.ts +5 -2
- package/components/Flex/Flex.astro +34 -0
- package/components/Flex/Flex.svelte +31 -0
- package/components/Flex/Flex.tsx +30 -0
- package/components/Flex/flex.ts +28 -0
- package/components/Footer/Footer.svelte +12 -9
- package/components/Footer/footer.ts +6 -0
- package/components/Grid/Grid.astro +32 -0
- package/components/Grid/Grid.svelte +29 -0
- package/components/Grid/Grid.tsx +28 -0
- package/components/Grid/grid.ts +24 -0
- package/components/Group/Group.svelte +7 -4
- package/components/Group/group.ts +6 -0
- package/components/Icon/Icon.astro +19 -5
- package/components/Icon/Icon.svelte +23 -7
- package/components/Icon/Icon.tsx +19 -5
- package/components/Icon/icon.ts +10 -3
- package/components/Icon/map.ts +10 -10
- package/components/Input/Input.astro +1 -1
- package/components/Input/Input.svelte +26 -20
- package/components/Input/Input.tsx +4 -1
- package/components/Input/input.ts +10 -3
- package/components/Kbd/Kbd.svelte +7 -4
- package/components/Kbd/kbd.ts +6 -0
- package/components/List/List.astro +65 -60
- package/components/List/List.svelte +149 -147
- package/components/List/List.tsx +1 -1
- package/components/List/list.module.scss +3 -0
- package/components/Masonry/Masonry.svelte +12 -10
- package/components/Menu/Menu.astro +8 -3
- package/components/Menu/Menu.svelte +19 -10
- package/components/Menu/Menu.tsx +3 -1
- package/components/Menu/menu.ts +6 -0
- package/components/Modal/Modal.astro +1 -0
- package/components/Modal/Modal.svelte +18 -13
- package/components/Modal/Modal.tsx +2 -1
- package/components/Modal/modal.ts +6 -1
- package/components/Pagination/Pagination.astro +75 -69
- package/components/Pagination/Pagination.svelte +30 -26
- package/components/Pagination/Pagination.tsx +5 -4
- package/components/Pagination/pagination.module.scss +4 -0
- package/components/Popover/Popover.svelte +10 -6
- package/components/Popover/popover.ts +6 -0
- package/components/Progress/Progress.svelte +12 -10
- package/components/Progress/progress.ts +1 -1
- package/components/Radio/Radio.astro +3 -1
- package/components/Radio/Radio.svelte +14 -10
- package/components/Radio/Radio.tsx +5 -3
- package/components/Radio/radio.ts +5 -2
- package/components/Rating/Rating.svelte +16 -14
- package/components/Ribbon/Ribbon.svelte +9 -6
- package/components/Ribbon/ribbon.ts +6 -0
- package/components/Select/Select.astro +85 -42
- package/components/Select/Select.svelte +62 -21
- package/components/Select/Select.tsx +41 -7
- package/components/Select/select.ts +4 -1
- package/components/Sheet/Sheet.svelte +9 -5
- package/components/Sheet/sheet.ts +6 -2
- package/components/Sidebar/Sidebar.svelte +7 -4
- package/components/Sidebar/sidebar.ts +6 -0
- package/components/Skeleton/Skeleton.astro +2 -2
- package/components/Skeleton/Skeleton.svelte +11 -9
- package/components/Skeleton/Skeleton.tsx +2 -2
- package/components/Slider/Slider.svelte +15 -13
- package/components/Slider/slider.module.scss +4 -0
- package/components/Slider/slider.ts +4 -2
- package/components/Spinner/Spinner.svelte +7 -5
- package/components/Spoiler/Spoiler.astro +13 -8
- package/components/Spoiler/Spoiler.svelte +13 -10
- package/components/Spoiler/spoiler.ts +6 -0
- package/components/Stepper/Stepper.svelte +9 -7
- package/components/Switch/Switch.astro +3 -2
- package/components/Switch/Switch.svelte +15 -11
- package/components/Switch/Switch.tsx +3 -1
- package/components/Switch/switch.ts +1 -0
- package/components/Table/Table.svelte +11 -9
- package/components/Table/table.ts +1 -1
- package/components/Tabs/Tabs.astro +8 -5
- package/components/Tabs/Tabs.svelte +14 -11
- package/components/Tabs/tabs.ts +7 -1
- package/components/Textarea/Textarea.astro +3 -1
- package/components/Textarea/Textarea.svelte +51 -47
- package/components/Textarea/textarea.ts +24 -18
- package/components/ThemeSwitcher/ThemeSwitcher.astro +43 -37
- package/components/ThemeSwitcher/ThemeSwitcher.svelte +14 -10
- package/components/ThemeSwitcher/themeswitcher.ts +7 -0
- package/components/Timeline/Timeline.svelte +12 -9
- package/components/Timeline/timeline.ts +7 -2
- package/components/TimelineItem/TimelineItem.svelte +8 -5
- package/components/TimelineItem/timelineitem.ts +6 -0
- package/components/Toast/Toast.svelte +18 -10
- package/components/Toast/toast.ts +6 -1
- package/icons/alert.svg +2 -2
- package/icons/check.svg +2 -2
- package/icons/chevron-down.svg +3 -0
- package/icons/chevron-left.svg +3 -0
- package/icons/chevron-right.svg +3 -0
- package/icons/chevron-up.svg +3 -0
- package/icons/circle-check.svg +3 -3
- package/icons/copy.svg +3 -0
- package/icons/info.svg +3 -3
- package/icons.d.ts +5 -5
- package/icons.js +5 -5
- package/index.d.ts +75 -2
- package/index.js +2 -0
- package/package.json +31 -22
- package/react.d.ts +23 -0
- package/react.js +8 -0
- package/scss/global/utility.scss +48 -3
- package/svelte.d.ts +111 -88
- package/svelte.js +8 -0
- package/utils/DOMUtils.ts +2 -2
- package/utils/bodyFreeze.ts +13 -0
- package/utils/classNames.ts +1 -1
- package/utils/getLayoutClasses.ts +141 -0
- package/utils/modal.ts +16 -4
- package/utils/popover.ts +30 -4
- package/icons/arrow-down.svg +0 -3
- package/icons/arrow-left.svg +0 -3
- package/icons/arrow-right.svg +0 -3
- package/icons/components.svg +0 -3
- package/icons/file.svg +0 -3
- package/scss/webcore.config.scss +0 -0
package/package.json
CHANGED
|
@@ -1,40 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcoreui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepare": "husky",
|
|
7
7
|
"pre-commit": "lint-staged",
|
|
8
8
|
"dev": "astro dev",
|
|
9
9
|
"build": "astro check && astro build",
|
|
10
10
|
"build:package": "node scripts/build.js",
|
|
11
|
-
"
|
|
11
|
+
"build:local": "node scripts/build.js --local",
|
|
12
|
+
"compile": "node scripts/sass.js",
|
|
13
|
+
"test": "cd .. && vitest run && npm run test:sass",
|
|
14
|
+
"test:dev": "vitest",
|
|
15
|
+
"test:run": "vitest run",
|
|
16
|
+
"test:sass": "vitest run src/tests/scss.test.js --config astro.config.mjs",
|
|
12
17
|
"create-component": "node scripts/createComponent.js",
|
|
13
18
|
"lint": "eslint src/**/* --fix"
|
|
14
19
|
},
|
|
15
20
|
"devDependencies": {
|
|
16
21
|
"@astrojs/check": "0.9.4",
|
|
17
|
-
"@astrojs/node": "
|
|
18
|
-
"@astrojs/react": "
|
|
19
|
-
"@astrojs/svelte": "
|
|
20
|
-
"@eslint/js": "9.
|
|
21
|
-
"@typescript-eslint/parser": "8.
|
|
22
|
-
"astro": "
|
|
23
|
-
"astro-eslint-parser": "1.0
|
|
24
|
-
"eslint": "9.
|
|
25
|
-
"eslint-plugin-astro": "1.
|
|
26
|
-
"eslint-plugin-react": "7.
|
|
22
|
+
"@astrojs/node": "9.0.2",
|
|
23
|
+
"@astrojs/react": "4.1.6",
|
|
24
|
+
"@astrojs/svelte": "7.0.4",
|
|
25
|
+
"@eslint/js": "9.18.0",
|
|
26
|
+
"@typescript-eslint/parser": "8.21.0",
|
|
27
|
+
"astro": "5.1.10",
|
|
28
|
+
"astro-eslint-parser": "1.1.0",
|
|
29
|
+
"eslint": "9.18.0",
|
|
30
|
+
"eslint-plugin-astro": "1.3.1",
|
|
31
|
+
"eslint-plugin-react": "7.37.4",
|
|
27
32
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
28
|
-
"eslint-plugin-svelte": "2.
|
|
29
|
-
"husky": "9.1.
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"react
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
33
|
+
"eslint-plugin-svelte": "2.46.1",
|
|
34
|
+
"husky": "9.1.7",
|
|
35
|
+
"jsdom": "26.0.0",
|
|
36
|
+
"lint-staged": "15.4.2",
|
|
37
|
+
"react": "19.0.0",
|
|
38
|
+
"react-dom": "19.0.0",
|
|
39
|
+
"sass": "1.83.4",
|
|
40
|
+
"sass-true": "8.1.0",
|
|
41
|
+
"svelte": "5.19.2",
|
|
42
|
+
"svelte-eslint-parser": "0.43.0",
|
|
43
|
+
"typescript": "5.7.3",
|
|
44
|
+
"typescript-eslint": "8.21.0",
|
|
45
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
46
|
+
"vitest": "3.0.4"
|
|
38
47
|
},
|
|
39
48
|
"exports": {
|
|
40
49
|
".": "./index.js",
|
package/react.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ReactAspectRatioProps as WReactAspectRatioProps } from './componen
|
|
|
5
5
|
import type { AvatarProps as WAvatarProps } from './components/Avatar/avatar'
|
|
6
6
|
import type { ReactBadgeProps as WReactBadgeProps } from './components/Badge/badge'
|
|
7
7
|
import type { ReactBannerProps as WReactBannerProps } from './components/Banner/banner'
|
|
8
|
+
import type { BottomNavigationProps as WBottomNavigationProps } from './components/BottomNavigation/bottomnavigation'
|
|
8
9
|
import type { BreadcrumbProps as WBreadcrumbProps } from './components/Breadcrumb/breadcrumb'
|
|
9
10
|
import type { ReactButtonProps as WReactButtonProps } from './components/Button/button'
|
|
10
11
|
import type { ReactCardProps as WReactCardProps } from './components/Card/card'
|
|
@@ -12,8 +13,11 @@ import type { ReactCarouselProps as WReactCarouselProps } from './components/Car
|
|
|
12
13
|
import type { ReactCheckboxProps as WReactCheckboxProps } from './components/Checkbox/checkbox'
|
|
13
14
|
import type { ReactCollapsibleProps as WReactCollapsibleProps } from './components/Collapsible/collapsible'
|
|
14
15
|
import type { ReactConditionalWrapperProps as WReactConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
|
|
16
|
+
import type { ReactCopyProps as WReactCopyProps } from './components/Copy/copy'
|
|
15
17
|
import type { ReactDataTableProps as WReactDataTableProps } from './components/DataTable/datatable'
|
|
18
|
+
import type { ReactFlexProps as WReactFlexProps } from './components/Flex/flex'
|
|
16
19
|
import type { ReactFooterProps as WReactFooterProps } from './components/Footer/footer'
|
|
20
|
+
import type { ReactGridProps as WReactGridProps } from './components/Grid/grid'
|
|
17
21
|
import type { ReactGroupProps as WReactGroupProps } from './components/Group/group'
|
|
18
22
|
import type { IconProps as WIconProps } from './components/Icon/icon'
|
|
19
23
|
import type { ReactInputProps as WReactInputProps } from './components/Input/input'
|
|
@@ -45,6 +49,11 @@ import type { ReactTimelineProps as WReactTimelineProps } from './components/Tim
|
|
|
45
49
|
import type { ReactTimelineItemProps as WReactTimelineItemProps } from './components/TimelineItem/timelineitem'
|
|
46
50
|
import type { ReactToastProps as WReactToastProps } from './components/Toast/toast'
|
|
47
51
|
|
|
52
|
+
import type { DataTableEventType as WDataTableEventType, HeadingObject as WHeadingObject } from './components/DataTable/datatable.ts'
|
|
53
|
+
import type { ListEventType as WListEventType } from './components/List/list.ts'
|
|
54
|
+
import type { PaginationEventType as WPaginationEventType } from './components/Pagination/pagination.ts'
|
|
55
|
+
import type { SelectEventType as WSelectEventType } from './components/Select/select.ts'
|
|
56
|
+
|
|
48
57
|
declare module 'webcoreui/react' {
|
|
49
58
|
export const Accordion: FC<WAccordionProps>
|
|
50
59
|
export const Alert: FC<WReactAlertProps>
|
|
@@ -52,6 +61,7 @@ declare module 'webcoreui/react' {
|
|
|
52
61
|
export const Avatar: FC<WAvatarProps>
|
|
53
62
|
export const Badge: FC<WReactBadgeProps>
|
|
54
63
|
export const Banner: FC<WReactBannerProps>
|
|
64
|
+
export const BottomNavigation: FC<WBottomNavigationProps>
|
|
55
65
|
export const Breadcrumb: FC<WBreadcrumbProps>
|
|
56
66
|
export const Button: FC<WReactButtonProps>
|
|
57
67
|
export const Card: FC<WReactCardProps>
|
|
@@ -59,8 +69,11 @@ declare module 'webcoreui/react' {
|
|
|
59
69
|
export const Checkbox: FC<WReactCheckboxProps>
|
|
60
70
|
export const Collapsible: FC<WReactCollapsibleProps>
|
|
61
71
|
export const ConditionalWrapper: FC<WReactConditionalWrapperProps>
|
|
72
|
+
export const Copy: FC<WReactCopyProps>
|
|
62
73
|
export const DataTable: FC<WReactDataTableProps>
|
|
74
|
+
export const Flex: FC<WReactFlexProps>
|
|
63
75
|
export const Footer: FC<WReactFooterProps>
|
|
76
|
+
export const Grid: FC<WReactGridProps>
|
|
64
77
|
export const Group: FC<WReactGroupProps>
|
|
65
78
|
export const Icon: FC<WIconProps>
|
|
66
79
|
export const Input: FC<WReactInputProps>
|
|
@@ -98,6 +111,7 @@ declare module 'webcoreui/react' {
|
|
|
98
111
|
export type AvatarProps = WAvatarProps
|
|
99
112
|
export type BadgeProps = WReactBadgeProps
|
|
100
113
|
export type BannerProps = WReactBannerProps
|
|
114
|
+
export type BottomNavigationProps = WBottomNavigationProps
|
|
101
115
|
export type BreadcrumbProps = WBreadcrumbProps
|
|
102
116
|
export type ButtonProps = WReactButtonProps
|
|
103
117
|
export type CardProps = WReactCardProps
|
|
@@ -105,8 +119,11 @@ declare module 'webcoreui/react' {
|
|
|
105
119
|
export type CheckboxProps = WReactCheckboxProps
|
|
106
120
|
export type CollapsibleProps = WReactCollapsibleProps
|
|
107
121
|
export type ConditionalWrapperProps = WReactConditionalWrapperProps
|
|
122
|
+
export type CopyProps = WReactCopyProps
|
|
108
123
|
export type DataTableProps = WReactDataTableProps
|
|
124
|
+
export type FlexProps = WReactFlexProps
|
|
109
125
|
export type FooterProps = WReactFooterProps
|
|
126
|
+
export type GridProps = WReactGridProps
|
|
110
127
|
export type GroupProps = WReactGroupProps
|
|
111
128
|
export type IconProps = WIconProps
|
|
112
129
|
export type InputProps = WReactInputProps
|
|
@@ -137,4 +154,10 @@ declare module 'webcoreui/react' {
|
|
|
137
154
|
export type TimelineProps = WReactTimelineProps
|
|
138
155
|
export type TimelineItemProps = WReactTimelineItemProps
|
|
139
156
|
export type ToastProps = WReactToastProps
|
|
157
|
+
|
|
158
|
+
export type DataTableEventType = WDataTableEventType
|
|
159
|
+
export type HeadingObject = WHeadingObject
|
|
160
|
+
export type ListEventType = WListEventType
|
|
161
|
+
export type PaginationEventType = WPaginationEventType
|
|
162
|
+
export type SelectEventType = WSelectEventType
|
|
140
163
|
}
|
package/react.js
CHANGED
|
@@ -4,6 +4,7 @@ import AspectRatioComponent from './components/AspectRatio/AspectRatio.tsx'
|
|
|
4
4
|
import AvatarComponent from './components/Avatar/Avatar.tsx'
|
|
5
5
|
import BadgeComponent from './components/Badge/Badge.tsx'
|
|
6
6
|
import BannerComponent from './components/Banner/Banner.tsx'
|
|
7
|
+
import BottomNavigationComponent from './components/BottomNavigation/BottomNavigation.tsx'
|
|
7
8
|
import BreadcrumbComponent from './components/Breadcrumb/Breadcrumb.tsx'
|
|
8
9
|
import ButtonComponent from './components/Button/Button.tsx'
|
|
9
10
|
import CardComponent from './components/Card/Card.tsx'
|
|
@@ -11,8 +12,11 @@ import CarouselComponent from './components/Carousel/Carousel.tsx'
|
|
|
11
12
|
import CheckboxComponent from './components/Checkbox/Checkbox.tsx'
|
|
12
13
|
import CollapsibleComponent from './components/Collapsible/Collapsible.tsx'
|
|
13
14
|
import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.tsx'
|
|
15
|
+
import CopyComponent from './components/Copy/Copy.tsx'
|
|
14
16
|
import DataTableComponent from './components/DataTable/DataTable.tsx'
|
|
17
|
+
import FlexComponent from './components/Flex/Flex.tsx'
|
|
15
18
|
import FooterComponent from './components/Footer/Footer.tsx'
|
|
19
|
+
import GridComponent from './components/Grid/Grid.tsx'
|
|
16
20
|
import GroupComponent from './components/Group/Group.tsx'
|
|
17
21
|
import IconComponent from './components/Icon/Icon.tsx'
|
|
18
22
|
import InputComponent from './components/Input/Input.tsx'
|
|
@@ -50,6 +54,7 @@ export const AspectRatio = AspectRatioComponent
|
|
|
50
54
|
export const Avatar = AvatarComponent
|
|
51
55
|
export const Badge = BadgeComponent
|
|
52
56
|
export const Banner = BannerComponent
|
|
57
|
+
export const BottomNavigation = BottomNavigationComponent
|
|
53
58
|
export const Breadcrumb = BreadcrumbComponent
|
|
54
59
|
export const Button = ButtonComponent
|
|
55
60
|
export const Card = CardComponent
|
|
@@ -57,8 +62,11 @@ export const Carousel = CarouselComponent
|
|
|
57
62
|
export const Checkbox = CheckboxComponent
|
|
58
63
|
export const Collapsible = CollapsibleComponent
|
|
59
64
|
export const ConditionalWrapper = ConditionalWrapperComponent
|
|
65
|
+
export const Copy = CopyComponent
|
|
60
66
|
export const DataTable = DataTableComponent
|
|
67
|
+
export const Flex = FlexComponent
|
|
61
68
|
export const Footer = FooterComponent
|
|
69
|
+
export const Grid = GridComponent
|
|
62
70
|
export const Group = GroupComponent
|
|
63
71
|
export const Icon = IconComponent
|
|
64
72
|
export const Input = InputComponent
|
package/scss/global/utility.scss
CHANGED
|
@@ -34,7 +34,7 @@ $alignments: (
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.muted {
|
|
37
|
-
@include typography(primary-20, md);
|
|
37
|
+
@include typography(primary-20, md, hmd);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// Gaps
|
|
@@ -48,7 +48,13 @@ $alignments: (
|
|
|
48
48
|
$class: string.slice($key, 2, -1) + $firstLetter;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
&.#{$class} { gap: $value; }
|
|
51
|
+
&.#{$class} { gap: $value; }
|
|
52
|
+
|
|
53
|
+
@each $key, $v in $breakpoints {
|
|
54
|
+
@include media($key) {
|
|
55
|
+
&.#{$key}-#{$class} { gap: $value; }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
}
|
|
54
60
|
|
|
@@ -69,6 +75,27 @@ $alignments: (
|
|
|
69
75
|
align-items: center;
|
|
70
76
|
}
|
|
71
77
|
|
|
78
|
+
@each $key, $value in $breakpoints {
|
|
79
|
+
@include media($key) {
|
|
80
|
+
@each $alignmentKey, $alignmentValue in $alignments {
|
|
81
|
+
.#{$key}-#{$alignmentKey} {
|
|
82
|
+
@if (string.index($alignmentKey, 'items')) {
|
|
83
|
+
align-items: $alignmentValue;
|
|
84
|
+
} @else {
|
|
85
|
+
justify-content: $alignmentValue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.flex.#{$key}-center,
|
|
91
|
+
.grid.#{$key}-center {
|
|
92
|
+
justify-content: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Flex directions & wraps
|
|
72
99
|
.flex {
|
|
73
100
|
@include layout(flex, default);
|
|
74
101
|
|
|
@@ -85,6 +112,25 @@ $alignments: (
|
|
|
85
112
|
}
|
|
86
113
|
}
|
|
87
114
|
|
|
115
|
+
@each $key, $value in $breakpoints {
|
|
116
|
+
@include media($key) {
|
|
117
|
+
.flex {
|
|
118
|
+
@each $direction in $flexDirectionValues {
|
|
119
|
+
&.#{$key}-#{$direction} {
|
|
120
|
+
flex-direction: $direction;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@each $wrap in $flexWrapValues {
|
|
125
|
+
&.#{$key}-#{$wrap} {
|
|
126
|
+
flex-wrap: $wrap;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Grid columns
|
|
88
134
|
.grid {
|
|
89
135
|
@include layout(grid, default);
|
|
90
136
|
|
|
@@ -99,7 +145,6 @@ $alignments: (
|
|
|
99
145
|
}
|
|
100
146
|
}
|
|
101
147
|
|
|
102
|
-
// Grid columns
|
|
103
148
|
@each $key, $value in $breakpoints {
|
|
104
149
|
@include media($key) {
|
|
105
150
|
@for $i from 2 to map.get($breakpointMap, $key) + 1 {
|
package/svelte.d.ts
CHANGED
|
@@ -1,140 +1,163 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Component } from 'svelte'
|
|
2
2
|
import type { AccordionProps as WAccordionProps } from './components/Accordion/accordion'
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { SvelteAlertProps as WSvelteAlertProps } from './components/Alert/alert'
|
|
4
|
+
import type { SvelteAspectRatioProps as WSvelteAspectRatioProps } from './components/AspectRatio/aspectratio'
|
|
5
5
|
import type { AvatarProps as WAvatarProps } from './components/Avatar/avatar'
|
|
6
6
|
import type { SvelteBadgeProps as WSvelteBadgeProps } from './components/Badge/badge'
|
|
7
|
-
import type {
|
|
7
|
+
import type { SvelteBannerProps as WSvelteBannerProps } from './components/Banner/banner'
|
|
8
|
+
import type { BottomNavigationProps as WBottomNavigationProps } from './components/BottomNavigation/bottomnavigation'
|
|
8
9
|
import type { BreadcrumbProps as WBreadcrumbProps } from './components/Breadcrumb/breadcrumb'
|
|
9
10
|
import type { SvelteButtonProps as WSvelteButtonProps } from './components/Button/button'
|
|
10
|
-
import type {
|
|
11
|
+
import type { SvelteCardProps as WSvelteCardProps } from './components/Card/card'
|
|
11
12
|
import type { SvelteCarouselProps as WSvelteCarouselProps } from './components/Carousel/carousel'
|
|
12
13
|
import type { SvelteCheckboxProps as WSvelteCheckboxProps } from './components/Checkbox/checkbox'
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
14
|
+
import type { SvelteCollapsibleProps as WSvelteCollapsibleProps } from './components/Collapsible/collapsible'
|
|
15
|
+
import type { SvelteConditionalWrapperProps as WSvelteConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
|
|
16
|
+
import type { SvelteCopyProps as WSvelteCopyProps } from './components/Copy/copy'
|
|
15
17
|
import type { SvelteDataTableProps as WSvelteDataTableProps } from './components/DataTable/datatable'
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
+
import type { SvelteFlexProps as WSvelteFlexProps } from './components/Flex/flex'
|
|
19
|
+
import type { SvelteFooterProps as WSvelteFooterProps } from './components/Footer/footer'
|
|
20
|
+
import type { SvelteGridProps as WSvelteGridProps } from './components/Grid/grid'
|
|
21
|
+
import type { SvelteGroupProps as WSvelteGroupProps } from './components/Group/group'
|
|
18
22
|
import type { IconProps as WIconProps } from './components/Icon/icon'
|
|
19
23
|
import type { SvelteInputProps as WSvelteInputProps } from './components/Input/input'
|
|
20
|
-
import type {
|
|
24
|
+
import type { SvelteKbdProps as WSvelteKbdProps } from './components/Kbd/kbd'
|
|
21
25
|
import type { SvelteListProps as WSvelteListProps } from './components/List/list'
|
|
22
26
|
import type { SvelteMasonryProps as WSvelteMasonryProps } from './components/Masonry/masonry'
|
|
23
|
-
import type {
|
|
24
|
-
import type {
|
|
27
|
+
import type { SvelteMenuProps as WSvelteMenuProps } from './components/Menu/menu'
|
|
28
|
+
import type { SvelteModalProps as WSvelteModalProps } from './components/Modal/modal'
|
|
25
29
|
import type { SveltePaginationProps as WSveltePaginationProps } from './components/Pagination/pagination'
|
|
26
|
-
import type {
|
|
30
|
+
import type { SveltePopoverProps as WSveltePopoverProps } from './components/Popover/popover'
|
|
27
31
|
import type { ProgressProps as WProgressProps } from './components/Progress/progress'
|
|
28
32
|
import type { SvelteRadioProps as WSvelteRadioProps } from './components/Radio/radio'
|
|
29
33
|
import type { RatingProps as WRatingProps } from './components/Rating/rating'
|
|
30
|
-
import type {
|
|
34
|
+
import type { SvelteRibbonProps as WSvelteRibbonProps } from './components/Ribbon/ribbon'
|
|
31
35
|
import type { SvelteSelectProps as WSvelteSelectProps } from './components/Select/select'
|
|
32
|
-
import type {
|
|
33
|
-
import type {
|
|
36
|
+
import type { SvelteSheetProps as WSvelteSheetProps } from './components/Sheet/sheet'
|
|
37
|
+
import type { SvelteSidebarProps as WSvelteSidebarProps } from './components/Sidebar/sidebar'
|
|
34
38
|
import type { SkeletonProps as WSkeletonProps } from './components/Skeleton/skeleton'
|
|
35
39
|
import type { SvelteSliderProps as WSvelteSliderProps } from './components/Slider/slider'
|
|
36
40
|
import type { SpinnerProps as WSpinnerProps } from './components/Spinner/spinner'
|
|
37
|
-
import type {
|
|
41
|
+
import type { SvelteSpoilerProps as WSvelteSpoilerProps } from './components/Spoiler/spoiler'
|
|
38
42
|
import type { StepperProps as WStepperProps } from './components/Stepper/stepper'
|
|
39
43
|
import type { SvelteSwitchProps as WSvelteSwitchProps } from './components/Switch/switch'
|
|
40
44
|
import type { TableProps as WTableProps } from './components/Table/table'
|
|
41
|
-
import type {
|
|
45
|
+
import type { SvelteTabsProps as WSvelteTabsProps } from './components/Tabs/tabs'
|
|
42
46
|
import type { SvelteTextareaProps as WSvelteTextareaProps } from './components/Textarea/textarea'
|
|
43
|
-
import type {
|
|
44
|
-
import type {
|
|
45
|
-
import type {
|
|
46
|
-
import type {
|
|
47
|
+
import type { SvelteThemeSwitcherProps as WSvelteThemeSwitcherProps } from './components/ThemeSwitcher/themeswitcher'
|
|
48
|
+
import type { SvelteTimelineProps as WSvelteTimelineProps } from './components/Timeline/timeline'
|
|
49
|
+
import type { SvelteTimelineItemProps as WSvelteTimelineItemProps } from './components/TimelineItem/timelineitem'
|
|
50
|
+
import type { SvelteToastProps as WSvelteToastProps } from './components/Toast/toast'
|
|
51
|
+
|
|
52
|
+
import type { DataTableEventType as WDataTableEventType, HeadingObject as WHeadingObject } from './components/DataTable/datatable.ts'
|
|
53
|
+
import type { ListEventType as WListEventType } from './components/List/list.ts'
|
|
54
|
+
import type { PaginationEventType as WPaginationEventType } from './components/Pagination/pagination.ts'
|
|
55
|
+
import type { SelectEventType as WSelectEventType } from './components/Select/select.ts'
|
|
47
56
|
|
|
48
57
|
declare module 'webcoreui/svelte' {
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
-
export
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
70
|
-
export
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export
|
|
77
|
-
export
|
|
78
|
-
export
|
|
79
|
-
export
|
|
80
|
-
export
|
|
81
|
-
export
|
|
82
|
-
export
|
|
83
|
-
export
|
|
84
|
-
export
|
|
85
|
-
export
|
|
86
|
-
export
|
|
87
|
-
export
|
|
88
|
-
export
|
|
89
|
-
export
|
|
90
|
-
export
|
|
91
|
-
export
|
|
92
|
-
export
|
|
93
|
-
export
|
|
58
|
+
export const Accordion: Component<WAccordionProps>
|
|
59
|
+
export const Alert: Component<WSvelteAlertProps>
|
|
60
|
+
export const AspectRatio: Component<WSvelteAspectRatioProps>
|
|
61
|
+
export const Avatar: Component<WAvatarProps>
|
|
62
|
+
export const Badge: Component<WSvelteBadgeProps>
|
|
63
|
+
export const Banner: Component<WSvelteBannerProps>
|
|
64
|
+
export const BottomNavigation: Component<WBottomNavigationProps>
|
|
65
|
+
export const Breadcrumb: Component<WBreadcrumbProps>
|
|
66
|
+
export const Button: Component<WSvelteButtonProps>
|
|
67
|
+
export const Card: Component<WSvelteCardProps>
|
|
68
|
+
export const Carousel: Component<WSvelteCarouselProps>
|
|
69
|
+
export const Checkbox: Component<WSvelteCheckboxProps>
|
|
70
|
+
export const Collapsible: Component<WSvelteCollapsibleProps>
|
|
71
|
+
export const ConditionalWrapper: Component<WSvelteConditionalWrapperProps>
|
|
72
|
+
export const Copy: Component<WSvelteCopyProps>
|
|
73
|
+
export const DataTable: Component<WSvelteDataTableProps>
|
|
74
|
+
export const Flex: Component<WSvelteFlexProps>
|
|
75
|
+
export const Footer: Component<WSvelteFooterProps>
|
|
76
|
+
export const Grid: Component<WSvelteGridProps>
|
|
77
|
+
export const Group: Component<WSvelteGroupProps>
|
|
78
|
+
export const Icon: Component<WIconProps>
|
|
79
|
+
export const Input: Component<WSvelteInputProps>
|
|
80
|
+
export const Kbd: Component<WSvelteKbdProps>
|
|
81
|
+
export const List: Component<WSvelteListProps>
|
|
82
|
+
export const Masonry: Component<WSvelteMasonryProps>
|
|
83
|
+
export const Menu: Component<WSvelteMenuProps>
|
|
84
|
+
export const Modal: Component<WSvelteModalProps>
|
|
85
|
+
export const Pagination: Component<WSveltePaginationProps>
|
|
86
|
+
export const Popover: Component<WSveltePopoverProps>
|
|
87
|
+
export const Progress: Component<WProgressProps>
|
|
88
|
+
export const Radio: Component<WSvelteRadioProps>
|
|
89
|
+
export const Rating: Component<WRatingProps>
|
|
90
|
+
export const Ribbon: Component<WSvelteRibbonProps>
|
|
91
|
+
export const Select: Component<WSvelteSelectProps>
|
|
92
|
+
export const Sheet: Component<WSvelteSheetProps>
|
|
93
|
+
export const Sidebar: Component<WSvelteSidebarProps>
|
|
94
|
+
export const Skeleton: Component<WSkeletonProps>
|
|
95
|
+
export const Slider: Component<WSvelteSliderProps>
|
|
96
|
+
export const Spinner: Component<WSpinnerProps>
|
|
97
|
+
export const Spoiler: Component<WSvelteSpoilerProps>
|
|
98
|
+
export const Stepper: Component<WStepperProps>
|
|
99
|
+
export const Switch: Component<WSvelteSwitchProps>
|
|
100
|
+
export const Table: Component<WTableProps>
|
|
101
|
+
export const Tabs: Component<WSvelteTabsProps>
|
|
102
|
+
export const Textarea: Component<WSvelteTextareaProps>
|
|
103
|
+
export const ThemeSwitcher: Component<WSvelteThemeSwitcherProps>
|
|
104
|
+
export const Timeline: Component<WSvelteTimelineProps>
|
|
105
|
+
export const TimelineItem: Component<WSvelteTimelineItemProps>
|
|
106
|
+
export const Toast: Component<WSvelteToastProps>
|
|
94
107
|
|
|
95
108
|
export type AccordionProps = WAccordionProps
|
|
96
|
-
export type AlertProps =
|
|
97
|
-
export type AspectRatioProps =
|
|
109
|
+
export type AlertProps = WSvelteAlertProps
|
|
110
|
+
export type AspectRatioProps = WSvelteAspectRatioProps
|
|
98
111
|
export type AvatarProps = WAvatarProps
|
|
99
112
|
export type BadgeProps = WSvelteBadgeProps
|
|
100
|
-
export type BannerProps =
|
|
113
|
+
export type BannerProps = WSvelteBannerProps
|
|
114
|
+
export type BottomNavigationProps = WBottomNavigationProps
|
|
101
115
|
export type BreadcrumbProps = WBreadcrumbProps
|
|
102
116
|
export type ButtonProps = WSvelteButtonProps
|
|
103
|
-
export type CardProps =
|
|
117
|
+
export type CardProps = WSvelteCardProps
|
|
104
118
|
export type CarouselProps = WSvelteCarouselProps
|
|
105
119
|
export type CheckboxProps = WSvelteCheckboxProps
|
|
106
|
-
export type CollapsibleProps =
|
|
107
|
-
export type ConditionalWrapperProps =
|
|
120
|
+
export type CollapsibleProps = WSvelteCollapsibleProps
|
|
121
|
+
export type ConditionalWrapperProps = WSvelteConditionalWrapperProps
|
|
122
|
+
export type CopyProps = WSvelteCopyProps
|
|
108
123
|
export type DataTableProps = WSvelteDataTableProps
|
|
109
|
-
export type
|
|
110
|
-
export type
|
|
124
|
+
export type FlexProps = WSvelteFlexProps
|
|
125
|
+
export type FooterProps = WSvelteFooterProps
|
|
126
|
+
export type GridProps = WSvelteGridProps
|
|
127
|
+
export type GroupProps = WSvelteGroupProps
|
|
111
128
|
export type IconProps = WIconProps
|
|
112
129
|
export type InputProps = WSvelteInputProps
|
|
113
|
-
export type KbdProps =
|
|
130
|
+
export type KbdProps = WSvelteKbdProps
|
|
114
131
|
export type ListProps = WSvelteListProps
|
|
115
132
|
export type MasonryProps = WSvelteMasonryProps
|
|
116
|
-
export type MenuProps =
|
|
117
|
-
export type ModalProps =
|
|
133
|
+
export type MenuProps = WSvelteMenuProps
|
|
134
|
+
export type ModalProps = WSvelteModalProps
|
|
118
135
|
export type PaginationProps = WSveltePaginationProps
|
|
119
|
-
export type PopoverProps =
|
|
136
|
+
export type PopoverProps = WSveltePopoverProps
|
|
120
137
|
export type ProgressProps = WProgressProps
|
|
121
138
|
export type RadioProps = WSvelteRadioProps
|
|
122
139
|
export type RatingProps = WRatingProps
|
|
123
|
-
export type RibbonProps =
|
|
140
|
+
export type RibbonProps = WSvelteRibbonProps
|
|
124
141
|
export type SelectProps = WSvelteSelectProps
|
|
125
|
-
export type SheetProps =
|
|
126
|
-
export type SidebarProps =
|
|
142
|
+
export type SheetProps = WSvelteSheetProps
|
|
143
|
+
export type SidebarProps = WSvelteSidebarProps
|
|
127
144
|
export type SkeletonProps = WSkeletonProps
|
|
128
145
|
export type SliderProps = WSvelteSliderProps
|
|
129
146
|
export type SpinnerProps = WSpinnerProps
|
|
130
|
-
export type SpoilerProps =
|
|
147
|
+
export type SpoilerProps = WSvelteSpoilerProps
|
|
131
148
|
export type StepperProps = WStepperProps
|
|
132
149
|
export type SwitchProps = WSvelteSwitchProps
|
|
133
150
|
export type TableProps = WTableProps
|
|
134
|
-
export type TabsProps =
|
|
151
|
+
export type TabsProps = WSvelteTabsProps
|
|
135
152
|
export type TextareaProps = WSvelteTextareaProps
|
|
136
|
-
export type ThemeSwitcherProps =
|
|
137
|
-
export type TimelineProps =
|
|
138
|
-
export type TimelineItemProps =
|
|
139
|
-
export type ToastProps =
|
|
153
|
+
export type ThemeSwitcherProps = WSvelteThemeSwitcherProps
|
|
154
|
+
export type TimelineProps = WSvelteTimelineProps
|
|
155
|
+
export type TimelineItemProps = WSvelteTimelineItemProps
|
|
156
|
+
export type ToastProps = WSvelteToastProps
|
|
157
|
+
|
|
158
|
+
export type DataTableEventType = WDataTableEventType
|
|
159
|
+
export type HeadingObject = WHeadingObject
|
|
160
|
+
export type ListEventType = WListEventType
|
|
161
|
+
export type PaginationEventType = WPaginationEventType
|
|
162
|
+
export type SelectEventType = WSelectEventType
|
|
140
163
|
}
|
package/svelte.js
CHANGED
|
@@ -4,6 +4,7 @@ import AspectRatioComponent from './components/AspectRatio/AspectRatio.svelte'
|
|
|
4
4
|
import AvatarComponent from './components/Avatar/Avatar.svelte'
|
|
5
5
|
import BadgeComponent from './components/Badge/Badge.svelte'
|
|
6
6
|
import BannerComponent from './components/Banner/Banner.svelte'
|
|
7
|
+
import BottomNavigationComponent from './components/BottomNavigation/BottomNavigation.svelte'
|
|
7
8
|
import BreadcrumbComponent from './components/Breadcrumb/Breadcrumb.svelte'
|
|
8
9
|
import ButtonComponent from './components/Button/Button.svelte'
|
|
9
10
|
import CardComponent from './components/Card/Card.svelte'
|
|
@@ -11,8 +12,11 @@ import CarouselComponent from './components/Carousel/Carousel.svelte'
|
|
|
11
12
|
import CheckboxComponent from './components/Checkbox/Checkbox.svelte'
|
|
12
13
|
import CollapsibleComponent from './components/Collapsible/Collapsible.svelte'
|
|
13
14
|
import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.svelte'
|
|
15
|
+
import CopyComponent from './components/Copy/Copy.svelte'
|
|
14
16
|
import DataTableComponent from './components/DataTable/DataTable.svelte'
|
|
17
|
+
import FlexComponent from './components/Flex/Flex.svelte'
|
|
15
18
|
import FooterComponent from './components/Footer/Footer.svelte'
|
|
19
|
+
import GridComponent from './components/Grid/Grid.svelte'
|
|
16
20
|
import GroupComponent from './components/Group/Group.svelte'
|
|
17
21
|
import IconComponent from './components/Icon/Icon.svelte'
|
|
18
22
|
import InputComponent from './components/Input/Input.svelte'
|
|
@@ -50,6 +54,7 @@ export const AspectRatio = AspectRatioComponent
|
|
|
50
54
|
export const Avatar = AvatarComponent
|
|
51
55
|
export const Badge = BadgeComponent
|
|
52
56
|
export const Banner = BannerComponent
|
|
57
|
+
export const BottomNavigation = BottomNavigationComponent
|
|
53
58
|
export const Breadcrumb = BreadcrumbComponent
|
|
54
59
|
export const Button = ButtonComponent
|
|
55
60
|
export const Card = CardComponent
|
|
@@ -57,8 +62,11 @@ export const Carousel = CarouselComponent
|
|
|
57
62
|
export const Checkbox = CheckboxComponent
|
|
58
63
|
export const Collapsible = CollapsibleComponent
|
|
59
64
|
export const ConditionalWrapper = ConditionalWrapperComponent
|
|
65
|
+
export const Copy = CopyComponent
|
|
60
66
|
export const DataTable = DataTableComponent
|
|
67
|
+
export const Flex = FlexComponent
|
|
61
68
|
export const Footer = FooterComponent
|
|
69
|
+
export const Grid = GridComponent
|
|
62
70
|
export const Group = GroupComponent
|
|
63
71
|
export const Icon = IconComponent
|
|
64
72
|
export const Input = InputComponent
|
package/utils/DOMUtils.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const get = (selector: string, all
|
|
1
|
+
export const get = (selector: string, all?: boolean) => all
|
|
2
2
|
? document?.querySelectorAll(selector)
|
|
3
3
|
: document?.querySelector(selector)
|
|
4
4
|
|
|
5
5
|
export const on = (
|
|
6
|
-
selector: string | HTMLElement,
|
|
6
|
+
selector: string | HTMLElement | Document,
|
|
7
7
|
event: string,
|
|
8
8
|
callback: any,
|
|
9
9
|
all?: boolean
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const bodyFreeze = (freeze = true) => {
|
|
2
|
+
const scrollbarWidth = window.innerWidth - document.body.clientWidth
|
|
3
|
+
|
|
4
|
+
if (freeze) {
|
|
5
|
+
document.body.style.paddingRight = `${scrollbarWidth}px`
|
|
6
|
+
document.body.style.overflow = 'hidden'
|
|
7
|
+
} else {
|
|
8
|
+
setTimeout(() => {
|
|
9
|
+
document.body.style.paddingRight = ''
|
|
10
|
+
document.body.style.overflow = ''
|
|
11
|
+
}, 300)
|
|
12
|
+
}
|
|
13
|
+
}
|