@central-design-system/components 3.0.0-beta.4 → 3.0.0-beta.40
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/cds.css +1 -1
- package/dist/cds.d.ts +4 -1
- package/dist/cds.es.js +16879 -12481
- package/dist/cds.umd.js +7 -3
- package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +97 -37
- package/dist/components/CdsBadge/CdsBadge.vue.d.ts +40 -12
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +11 -0
- package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +14 -3
- package/dist/components/CdsButton/CdsButton.vue.d.ts +37 -26
- package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +68 -3
- package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +13 -0
- package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +319 -120
- package/dist/components/CdsContainer/CdsContainer.vue.d.ts +41 -24
- package/dist/components/CdsContainer/context.d.ts +1 -1
- package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +11 -0
- package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +26 -26
- package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +12 -1
- package/dist/components/CdsDatePicker/composable/calendar.d.ts +2 -2
- package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +70 -4
- package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +278 -117
- package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +4 -4
- package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +13 -13
- package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
- package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +16 -5
- package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +3 -3
- package/dist/components/CdsFooter/CdsFooter.vue.d.ts +23 -3
- package/dist/components/CdsForm/CdsForm.vue.d.ts +11 -0
- package/dist/components/CdsGrid/composable/column.d.ts +1 -1
- package/dist/components/CdsGrid/composable/subgrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/CSSGrid.d.ts +1 -1
- package/dist/components/CdsGrid/mode/FlexGrid.d.ts +1 -1
- package/dist/components/CdsHeader/CdsHeader.vue.d.ts +23 -3
- package/dist/components/CdsIcon/CdsIcon.vue.d.ts +27 -3
- package/dist/components/CdsInput/CdsInput.vue.d.ts +26 -21
- package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +3 -3
- package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +3 -3
- package/dist/components/CdsLayout/CdsLayout.vue.d.ts +12 -1
- package/dist/components/CdsLayout/context.d.ts +1 -1
- package/dist/components/CdsLink/CdsLink.vue.d.ts +15 -3
- package/dist/components/CdsList/CdsList.vue.d.ts +31 -19
- package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
- package/dist/components/CdsList/CdsListItem.vue.d.ts +12 -12
- package/dist/components/CdsList/composable/list.d.ts +1 -1
- package/dist/components/CdsLoader/CdsLoader.vue.d.ts +12 -0
- package/dist/components/CdsMenu/CdsMenu.vue.d.ts +36 -7
- package/dist/components/CdsModal/CdsModal.vue.d.ts +38 -5
- package/dist/components/CdsNotification/CdsNotification.vue.d.ts +38 -27
- package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +51 -22
- package/dist/components/CdsNotification/composable/notification.d.ts +4 -4
- package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +35 -3
- package/dist/components/CdsOverlay/composable/activator.d.ts +19 -6
- package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +6 -5
- package/dist/components/CdsOverlay/composable/scrollStrategies.d.ts +1 -1
- package/dist/components/CdsOverlay/composable/teleport.d.ts +25 -1
- package/dist/components/CdsOverlay/constants.d.ts +2 -0
- package/dist/components/CdsPagination/CdsPagination.vue.d.ts +11 -0
- package/dist/components/CdsProgress/CdsProgress.vue.d.ts +12 -1
- package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +26 -11
- package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +13 -0
- package/dist/components/CdsSelect/CdsSelect.vue.d.ts +91 -61
- package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +30 -8
- package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +14 -3
- package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +19 -19
- package/dist/components/CdsStages/CdsStages.vue.d.ts +13 -1
- package/dist/components/CdsStatus/CdsStatus.vue.d.ts +20 -8
- package/dist/components/CdsSteps/CdsSteps.vue.d.ts +30 -23
- package/dist/components/CdsSteps/CdsStepsItem.vue.d.ts +3 -3
- package/dist/components/CdsSteps/context.d.ts +1 -1
- package/dist/components/CdsTable/CdsTable.vue.d.ts +99 -31
- package/dist/components/CdsTable/components/Footer/Footer.d.ts +1 -1
- package/dist/components/CdsTable/components/Header/DragHandle.d.ts +1 -1
- package/dist/components/CdsTable/components/Table/InternalTable.d.ts +89 -23
- package/dist/components/CdsTable/components/TableProvider.d.ts +101 -24
- package/dist/components/CdsTable/composable/filter.d.ts +1 -1
- package/dist/components/CdsTable/composable/flat.d.ts +1 -1
- package/dist/components/CdsTable/composable/pagination.d.ts +1 -1
- package/dist/components/CdsTable/composable/scroll.d.ts +4607 -0
- package/dist/components/CdsTable/composable/selection.d.ts +1 -1
- package/dist/components/CdsTable/composable/sorter.d.ts +1 -1
- package/dist/components/CdsTable/composable/sticky.d.ts +1 -1
- package/dist/components/CdsTable/composable/table.d.ts +47 -14
- package/dist/components/CdsTable/constants.d.ts +1 -0
- package/dist/components/CdsTable/context/summary.d.ts +1 -1
- package/dist/components/CdsTable/context/table.d.ts +1 -1
- package/dist/components/CdsTable/interface.d.ts +4 -7
- package/dist/components/CdsTable/utils/column.d.ts +1 -3
- package/dist/components/CdsTable/utils/index.d.ts +1 -1
- package/dist/components/CdsTable/utils/vnode.d.ts +10 -0
- package/dist/components/CdsTabs/CdsTab.vue.d.ts +13 -13
- package/dist/components/CdsTabs/CdsTabs.vue.d.ts +33 -22
- package/dist/components/CdsTag/CdsTag.vue.d.ts +15 -3
- package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +107 -87
- package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +103 -55
- package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +11 -0
- package/dist/components/CdsTimePicker/composable/time.d.ts +2 -2
- package/dist/components/CdsToggle/CdsToggle.vue.d.ts +13 -8
- package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +53 -0
- package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +39 -10
- package/dist/components/CdsTree/CdsTree.vue.d.ts +698 -0
- package/dist/components/CdsTree/CdsTreeDirectory.vue.d.ts +446 -0
- package/dist/components/CdsTree/CdsTreeNode.vue.d.ts +119 -0
- package/dist/components/CdsTree/components/DropIndicator.d.ts +9 -0
- package/dist/components/CdsTree/components/Indent.d.ts +10 -0
- package/dist/components/CdsTree/components/MotionTreeNode.d.ts +128 -0
- package/dist/components/CdsTree/components/NodeList.d.ts +191 -0
- package/dist/components/CdsTree/components/SwitcherIcon.d.ts +12 -0
- package/dist/components/CdsTree/components/TreeContext.d.ts +81 -0
- package/dist/components/CdsTree/components/TreeProvider.d.ts +619 -0
- package/dist/components/CdsTree/components/VirtualList/Filler.d.ts +12 -0
- package/dist/components/CdsTree/components/VirtualList/Item.d.ts +6 -0
- package/dist/components/CdsTree/components/VirtualList/ScrollBar.d.ts +33 -0
- package/dist/components/CdsTree/components/VirtualList/VirtualList.d.ts +84 -0
- package/dist/components/CdsTree/components/VirtualList/features/index.d.ts +5 -0
- package/dist/components/CdsTree/components/VirtualList/features/useFrameWheel.d.ts +10 -0
- package/dist/components/CdsTree/components/VirtualList/features/useHeights.d.ts +9 -0
- package/dist/components/CdsTree/components/VirtualList/features/useMobileTouchMove.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/features/useOriginScroll.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/features/useScrollTo.d.ts +4 -0
- package/dist/components/CdsTree/components/VirtualList/index.d.ts +2 -0
- package/dist/components/CdsTree/components/VirtualList/interface.d.ts +10 -0
- package/dist/components/CdsTree/composable/events.d.ts +133 -0
- package/dist/components/CdsTree/composable/index.d.ts +2 -0
- package/dist/components/CdsTree/composable/tree.d.ts +273 -0
- package/dist/components/CdsTree/composable/treeNode.d.ts +75 -0
- package/dist/components/CdsTree/index.d.ts +5 -0
- package/dist/components/CdsTree/interface.d.ts +104 -4
- package/dist/components/CdsTree/utils/conduct.d.ts +1 -1
- package/dist/components/CdsTree/utils/data.d.ts +70 -0
- package/dist/components/CdsTree/utils/diff.d.ts +6 -0
- package/dist/components/CdsTree/utils/directory.d.ts +9 -0
- package/dist/components/CdsTree/utils/index.d.ts +2 -0
- package/dist/components/CdsUploader/CdsUploader.vue.d.ts +62 -41
- package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
- package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +40 -22
- package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +39 -21
- package/dist/components/CdsUploader/composable/upload.d.ts +28 -15
- package/dist/components/CdsUploader/index.d.ts +1 -0
- package/dist/components/CdsUploader/interface.d.ts +1 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/composable/appearance.d.ts +2 -2
- package/dist/composable/datetime.d.ts +4 -4
- package/dist/composable/delay.d.ts +3 -2
- package/dist/composable/direction.d.ts +1 -1
- package/dist/composable/display.d.ts +2 -0
- package/dist/composable/domObserver.d.ts +5 -0
- package/dist/composable/field.d.ts +16 -5
- package/dist/composable/filter.d.ts +30 -0
- package/dist/composable/form.d.ts +2 -2
- package/dist/composable/group.d.ts +3 -3
- package/dist/composable/icon.d.ts +3 -3
- package/dist/composable/index.d.ts +5 -1
- package/dist/composable/invertColor.d.ts +19 -0
- package/dist/composable/layout.d.ts +20 -20
- package/dist/composable/loading.d.ts +2 -2
- package/dist/composable/menu.d.ts +1 -1
- package/dist/composable/nested/nested.d.ts +2 -2
- package/dist/composable/overlay.d.ts +9 -1
- package/dist/{components/CdsDropdown/composable → composable}/scrolling.d.ts +2 -2
- package/dist/composable/select.d.ts +29 -11
- package/dist/composable/size.d.ts +1 -1
- package/dist/composable/text.d.ts +2 -2
- package/dist/composable/theme.d.ts +82 -0
- package/dist/composable/transition.d.ts +2 -0
- package/dist/composable/transparent.d.ts +19 -0
- package/dist/composable/validation.d.ts +2 -2
- package/dist/composable/variant.d.ts +1 -1
- package/dist/create.d.ts +7 -1
- package/dist/globals.d.ts +7 -0
- package/dist/locale/index.d.ts +1 -1
- package/dist/themes/b2b.d.ts +26 -0
- package/dist/themes/cds.d.ts +26 -0
- package/dist/themes/dark.d.ts +26 -0
- package/dist/themes/index.d.ts +5 -0
- package/dist/themes/promo.d.ts +26 -0
- package/dist/themes/themes.d.ts +10 -0
- package/dist/transitions/collapseTransition.d.ts +11 -0
- package/dist/transitions/index.d.ts +1 -0
- package/dist/utils/colors.d.ts +368 -0
- package/dist/utils/colorsUtils/APCA.d.ts +7 -0
- package/dist/utils/colorsUtils/index.d.ts +1 -0
- package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
- package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
- package/dist/utils/colorsUtils/utils.d.ts +41 -0
- package/dist/utils/dom/bindProps.d.ts +2 -0
- package/dist/utils/dom/box.d.ts +1 -0
- package/dist/utils/helpers.d.ts +31 -6
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/propsFactory.d.ts +1 -1
- package/dist/utils/use/flattenChildren.d.ts +3 -0
- package/nuxt.js +2 -1
- package/package.json +4 -1
- package/src/scss/mixins/typo.scss +0 -3
- package/src/scss/modules/_transition.scss +31 -0
- package/src/scss/modules/grid/_css-grid.scss +12 -19
- package/src/scss/modules/grid/_flex-grid.scss +9 -5
- package/src/scss/modules/grid/_mixins.scss +23 -31
- package/src/scss/themes/b2b/tokens.json +104 -104
- package/src/scss/themes/cds/tokens.json +104 -104
- package/src/scss/themes/index.ts +1 -1
- package/src/scss/utility/display.scss +56 -5
- package/src/scss/utility/flexbox.scss +26 -28
- package/src/scss/utility/index.scss +1 -2
- package/src/scss/utility/layout.scss +65 -3
- package/src/scss/utility/spacing.scss +46 -86
- package/src/scss/utility/typography.scss +48 -1
- package/src/scss/utility/variables/display.scss +10 -0
- package/src/scss/utility/variables/exports/_display.scss +7 -0
- package/src/scss/utility/variables/exports/_flex.scss +13 -0
- package/src/scss/utility/variables/exports/_overflow.scss +7 -0
- package/src/scss/utility/variables/exports/_position.scss +7 -0
- package/src/scss/utility/variables/exports/_spacing.scss +14 -0
- package/src/scss/utility/variables/exports/_typography.scss +22 -0
- package/src/scss/utility/variables/exports/_visibility.scss +7 -0
- package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
- package/src/scss/utility/variables/flex.scss +140 -0
- package/src/scss/utility/variables/index.scss +12 -0
- package/src/scss/utility/variables/overflow.scss +6 -0
- package/src/scss/utility/variables/position.scss +7 -0
- package/src/scss/utility/variables/spacing.scss +37 -0
- package/src/scss/utility/{variables.scss → variables/typography.scss} +48 -71
- package/src/scss/utility/variables/visibility.scss +5 -0
- package/src/scss/utility/variables/widthHeight.scss +69 -0
- package/dist/components/CdsDropdown/composable/index.d.ts +0 -1
- package/dist/composable/dark.d.ts +0 -19
- package/dist/plugins/index.d.ts +0 -2
- package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
- package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
- /package/dist/{components/CdsTable/utils → utils/use}/listener.d.ts +0 -0
package/dist/utils/dom/box.d.ts
CHANGED
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type VNode } from 'vue';
|
|
2
2
|
import type { TItemKey } from '../composable';
|
|
3
|
+
import type { ComponentPublicInstance, ComponentInternalInstance, ComputedGetter, InjectionKey, PropType, Ref, ToRefs, VNodeProps, VNodeChild, AllowedComponentProps, Component } from 'vue';
|
|
3
4
|
export declare const preventedScrollClass = "cds-scroll-blocked";
|
|
4
5
|
export declare const keyNames: Readonly<{
|
|
5
6
|
enter: "Enter";
|
|
@@ -99,6 +100,22 @@ export declare function getNestedValue(obj: any, path: (string | number)[], fall
|
|
|
99
100
|
* @param fallback
|
|
100
101
|
*/
|
|
101
102
|
export declare function getObjectValueByPath(obj: any, path: string, fallback?: any): any;
|
|
103
|
+
/**
|
|
104
|
+
* This function is used to get the value of a property from an item. The property can be a string, an array, a function, or a boolean.
|
|
105
|
+
* If the property is a string, it will be used as a path to retrieve the value from the item.
|
|
106
|
+
* If the property is an array, it will be used as a nested path to retrieve the value from the item.
|
|
107
|
+
* If the property is a function, it will be called with the item and the fallback value as arguments, and its return value will be used.
|
|
108
|
+
* If the property is a boolean, and it's true, the item itself will be returned.
|
|
109
|
+
* If the property is null, undefined, or a boolean that's not true, the fallback value will be returned.
|
|
110
|
+
* If the item is not an object, and the property is not a function, the fallback value will be returned.
|
|
111
|
+
* If the property is not a string, an array, or a function, the fallback value will be returned.
|
|
112
|
+
* If the value retrieved from the item is undefined, the fallback value will be returned.
|
|
113
|
+
*
|
|
114
|
+
* @param item - The item from which to get the property value.
|
|
115
|
+
* @param property - The property to get from the item. Can be a string, an array, a function, or a boolean.
|
|
116
|
+
* @param fallback - The value to return if the property is not found or its value is undefined.
|
|
117
|
+
* @returns The value of the property from the item, or the fallback value.
|
|
118
|
+
*/
|
|
102
119
|
export declare function getPropertyFromItem(item: any, property: SelectItemKey, fallback?: any): any;
|
|
103
120
|
/**
|
|
104
121
|
* This function is used to return the scroll position of the given element.
|
|
@@ -123,6 +140,7 @@ export declare function destructComputed<T extends object>(getter: ComputedGette
|
|
|
123
140
|
* @param val
|
|
124
141
|
*/
|
|
125
142
|
export declare function includes(arr: readonly any[], val: any): boolean;
|
|
143
|
+
export declare function eventName(propName: string): string;
|
|
126
144
|
export declare function convertToUnit(str: number, unit?: string): string;
|
|
127
145
|
export declare function convertToUnit(str: string | number | null | undefined, unit?: string): string | undefined;
|
|
128
146
|
export declare function convertRemToPx(value: string): number;
|
|
@@ -134,17 +152,14 @@ export declare function convertRemToPx(value: string): number;
|
|
|
134
152
|
*/
|
|
135
153
|
export declare function clamp(value: number, min?: number, max?: number): number;
|
|
136
154
|
export declare function createRange(length: number, start?: number): number[];
|
|
137
|
-
/**
|
|
138
|
-
* Is value an like event
|
|
139
|
-
* @param key
|
|
140
|
-
*/
|
|
141
155
|
export declare const isOn: (key: string) => boolean;
|
|
142
156
|
export declare const EventProp: PropType<(...args: any[]) => any>;
|
|
143
157
|
export declare function isComponentInstance(obj: any): obj is ComponentPublicInstance;
|
|
144
158
|
export declare function isFixedPosition(el?: HTMLElement): boolean;
|
|
159
|
+
export declare function padEnd(str: string, length: number, char?: string): string;
|
|
145
160
|
export declare function padStart(string: number | string, targetLength: number, padString: string): string;
|
|
146
161
|
export declare function pad(n: string | number, length?: number): string;
|
|
147
|
-
export declare function refElement
|
|
162
|
+
export declare function refElement(obj: ComponentPublicInstance<any> | HTMLElement): HTMLElement | undefined;
|
|
148
163
|
export declare function omit<T extends object, K extends keyof T>(obj: T, fields: K[]): Omit<T, K>;
|
|
149
164
|
export declare function findChildrenWithProvide(key: InjectionKey<any> | symbol, vnode?: VNodeChild | {
|
|
150
165
|
[key: string]: any;
|
|
@@ -169,11 +184,21 @@ export declare function debounce(fn: Function, delay: number): (...args: any[])
|
|
|
169
184
|
* @param opts
|
|
170
185
|
*/
|
|
171
186
|
export declare function plurals(n: number, opts: string[]): string;
|
|
187
|
+
/**
|
|
188
|
+
* Chunk a string into an array of strings.
|
|
189
|
+
* @param str
|
|
190
|
+
* @param size
|
|
191
|
+
*/
|
|
192
|
+
export declare function chunk(str: string, size?: number): string[];
|
|
193
|
+
export declare function defer(timeout: number, cb: () => void): () => void;
|
|
194
|
+
export declare function isValidElement(element: any): any;
|
|
172
195
|
export declare function noop(): void;
|
|
173
196
|
/**
|
|
174
197
|
* Types
|
|
175
198
|
*/
|
|
176
199
|
export declare type MaybeRef<T> = T | Ref<T>;
|
|
200
|
+
declare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void;
|
|
201
|
+
export declare type VueNode = VNodeChildAtom | VNodeChildAtom[] | JSX.Element;
|
|
177
202
|
export declare type SelectItemKey = TItemKey;
|
|
178
203
|
export declare type MaybePick<T extends object, U extends Extract<keyof T, string>> = Record<string, unknown> extends T ? Partial<Pick<T, U>> : Pick<T, U>;
|
|
179
204
|
export declare type EventProp<T = (...args: any[]) => any> = T;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * from './use/eagerComputed';
|
|
|
6
6
|
export * from './use/pickAttrs';
|
|
7
7
|
export * from './use/cache';
|
|
8
8
|
export * from './use/copyToClipboard';
|
|
9
|
+
export * from './use/flattenChildren';
|
|
10
|
+
export * from './use/listener';
|
|
9
11
|
export * from './changeCase/noCase';
|
|
10
12
|
export * from './changeCase/lowerCase';
|
|
11
13
|
export * from './changeCase/pascalCase';
|
|
@@ -22,3 +24,6 @@ export * from './dom/wrapperRaf';
|
|
|
22
24
|
export * from './dom/warn';
|
|
23
25
|
export * from './dom/classNames';
|
|
24
26
|
export * from './dom/hRender';
|
|
27
|
+
export * from './dom/bindProps';
|
|
28
|
+
export * from './colorsUtils';
|
|
29
|
+
export { default as colors } from './colors';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
1
|
import type { Prop, ComponentObjectPropsOptions } from '../shims-vue';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a factory function for props definitions.
|
|
5
5
|
* This is used to define props in a composable then override
|
package/nuxt.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@central-design-system/components",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.40",
|
|
4
4
|
"description": "Central Design System on the Vue 3.0 and TypeScript",
|
|
5
5
|
"author": "magersoft",
|
|
6
6
|
"license": "ISC",
|
|
@@ -52,5 +52,8 @@
|
|
|
52
52
|
"vue": "3.2.47",
|
|
53
53
|
"vue-router": "4.1.6",
|
|
54
54
|
"vue-tsc": "1.0.9"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"resize-observer-polyfill": "1.5.1"
|
|
55
58
|
}
|
|
56
59
|
}
|
|
@@ -117,7 +117,6 @@
|
|
|
117
117
|
font-size: var(--cds-font-body-size-s);
|
|
118
118
|
line-height: var(--cds-font-height-helper);
|
|
119
119
|
font-weight: var(--cds-font-weight-normal);
|
|
120
|
-
max-width: $max-width;
|
|
121
120
|
}
|
|
122
121
|
@mixin cds-font-description($max-width: 32rem) {
|
|
123
122
|
font-family: var(--cds-font-family-sans);
|
|
@@ -132,6 +131,4 @@
|
|
|
132
131
|
font-size: var(--cds-font-body-size-xs);
|
|
133
132
|
line-height: var(--cds-font-height-helper);
|
|
134
133
|
font-weight: var(--cds-font-weight-normal);
|
|
135
|
-
max-width: $max-width;
|
|
136
|
-
width: 75%;
|
|
137
134
|
}
|
|
@@ -10,6 +10,24 @@ $standard-duration: $cds-duration-fast + ms;
|
|
|
10
10
|
$accent-duration: $cds-duration-normal + ms;
|
|
11
11
|
|
|
12
12
|
@mixin transition-default() {
|
|
13
|
+
&-enter-active {
|
|
14
|
+
transition-duration: $standard-duration !important;
|
|
15
|
+
transition-timing-function: $standard-easing !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-leave-active {
|
|
19
|
+
transition-duration: $standard-duration !important;
|
|
20
|
+
transition-timing-function: $standard-easing !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-move {
|
|
24
|
+
transition-duration: 0.5s !important;
|
|
25
|
+
transition-property: transform !important;
|
|
26
|
+
transition-timing-function: $standard-easing !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin transition-minimal() {
|
|
13
31
|
&-enter-active {
|
|
14
32
|
transition: $standard-duration $standard-easing;
|
|
15
33
|
}
|
|
@@ -36,6 +54,19 @@ $accent-duration: $cds-duration-normal + ms;
|
|
|
36
54
|
.fade-transition {
|
|
37
55
|
@include transition-default();
|
|
38
56
|
|
|
57
|
+
&-enter-from, &-leave-to {
|
|
58
|
+
opacity: 0 !important;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-enter-active,
|
|
62
|
+
&-leave-active {
|
|
63
|
+
transition-property: opacity !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.fade-transition-minimal {
|
|
68
|
+
@include transition-minimal();
|
|
69
|
+
|
|
39
70
|
&-leave-active {
|
|
40
71
|
position: absolute;
|
|
41
72
|
}
|
|
@@ -75,20 +75,18 @@
|
|
|
75
75
|
--cds-grid-column-hang: calc(var(--cds-grid-gutter) / 2);
|
|
76
76
|
|
|
77
77
|
display: grid;
|
|
78
|
-
width: 100%;
|
|
79
|
-
max-width: get-grid-width($breakpoints, largest-breakpoint-name($breakpoints));
|
|
80
|
-
padding-right: var(--cds-grid-margin);
|
|
81
|
-
padding-left: var(--cds-grid-margin);
|
|
82
|
-
margin-right: auto;
|
|
83
|
-
margin-left: auto;
|
|
84
78
|
grid-template-columns: repeat(var(--cds-grid-columns), minmax(0, 1fr));
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
margin-inline: auto;
|
|
81
|
+
padding-inline: var(--cds-grid-margin);
|
|
82
|
+
max-inline-size: get-grid-width($breakpoints, largest-breakpoint-name($breakpoints));
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
// -----------------------------------------------------------------------------
|
|
88
86
|
// Full width
|
|
89
87
|
// -----------------------------------------------------------------------------
|
|
90
|
-
.#{$prefix}--css-grid--
|
|
91
|
-
max-
|
|
88
|
+
.#{$prefix}--css-grid--wide {
|
|
89
|
+
max-inline-size: 100%;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
// -----------------------------------------------------------------------------
|
|
@@ -105,12 +103,10 @@
|
|
|
105
103
|
--cds-grid-mode-start: var(--cds-grid-gutter-start);
|
|
106
104
|
--cds-grid-mode-end: var(--cds-grid-gutter-end);
|
|
107
105
|
|
|
108
|
-
margin-
|
|
109
|
-
margin-left: var(--cds-grid-gutter-start);
|
|
106
|
+
margin-inline: var(--cds-grid-gutter-start) var(--cds-grid-gutter-end);
|
|
110
107
|
|
|
111
108
|
[dir='rtl'] & {
|
|
112
|
-
margin-
|
|
113
|
-
margin-left: var(--cds-grid-gutter-end);
|
|
109
|
+
margin-inline: var(--cds-grid-gutter-end) var(--cds-grid-gutter-start);
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
|
|
@@ -134,13 +130,11 @@
|
|
|
134
130
|
// -----------------------------------------------------------------------------
|
|
135
131
|
.#{$prefix}--subgrid {
|
|
136
132
|
display: grid;
|
|
137
|
-
margin-right: calc(var(--cds-grid-mode-end) * -1);
|
|
138
|
-
margin-left: calc(var(--cds-grid-mode-start) * -1);
|
|
139
133
|
grid-template-columns: repeat(var(--cds-grid-columns), minmax(0, 1fr));
|
|
134
|
+
margin-inline: calc(var(--cds-grid-mode-start) * -1) calc(var(--cds-grid-mode-end) * -1);
|
|
140
135
|
|
|
141
136
|
[dir='rtl'] & {
|
|
142
|
-
margin-
|
|
143
|
-
margin-left: calc(var(--cds-grid-mode-end) * -1);
|
|
137
|
+
margin-inline: calc(var(--cds-grid-mode-end) * -1) calc(var(--cds-grid-mode-start) * -1);
|
|
144
138
|
}
|
|
145
139
|
}
|
|
146
140
|
|
|
@@ -171,11 +165,10 @@
|
|
|
171
165
|
// Helper class to allow for text alignment in columns where the leading
|
|
172
166
|
// gutter is missing (like narrow) or is reduced (like in condensed).
|
|
173
167
|
.#{$prefix}--grid-column-hang {
|
|
174
|
-
margin-
|
|
168
|
+
margin-inline-start: var(--cds-grid-column-hang);
|
|
175
169
|
|
|
176
170
|
[dir='rtl'] & {
|
|
177
|
-
margin-
|
|
178
|
-
margin-left: initial;
|
|
171
|
+
margin-inline: initial var(--cds-grid-column-hang);
|
|
179
172
|
}
|
|
180
173
|
}
|
|
181
174
|
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
@import 'mixins';
|
|
5
5
|
|
|
6
|
+
/// Generate the CSS for a grid for the given breakpoints and gutters
|
|
7
|
+
/// @param {Map} $breakpoints [$grid-breakpoints] - The default breakpoints
|
|
8
|
+
/// @param {Number} $grid-gutter [$grid-gutter] - The default gutters
|
|
9
|
+
/// @param {Number} $condensed-gutter [$grid-gutter-condensed] - The condensed mode gutter
|
|
10
|
+
/// @access public
|
|
11
|
+
/// @group @cds/grid
|
|
6
12
|
@mixin flex-grid(
|
|
7
13
|
$breakpoints: $grid-breakpoints,
|
|
8
14
|
$grid-gutter: $grid-gutter,
|
|
@@ -14,7 +20,7 @@
|
|
|
14
20
|
|
|
15
21
|
@include cds-largest-breakpoint($breakpoints) {
|
|
16
22
|
.#{$prefix}-grid--wide {
|
|
17
|
-
max-
|
|
23
|
+
max-inline-size: 100%;
|
|
18
24
|
}
|
|
19
25
|
}
|
|
20
26
|
|
|
@@ -24,13 +30,11 @@
|
|
|
24
30
|
|
|
25
31
|
.#{$prefix}-row-padding [class*='#{$prefix}-col'],
|
|
26
32
|
.#{$prefix}-col-padding {
|
|
27
|
-
padding-
|
|
28
|
-
padding-bottom: $grid-gutter * 0.5;
|
|
33
|
+
padding-block: $grid-gutter * 0.5;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
.#{$prefix}-grid-condensed [class*='#{$prefix}-col'] {
|
|
32
|
-
padding-
|
|
33
|
-
padding-bottom: $condensed-gutter * 0.5;
|
|
37
|
+
padding-block: $condensed-gutter * 0.5;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
@include -make-grid-columns($breakpoints, $grid-gutter);
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
/// @access private
|
|
25
25
|
/// @group @cds/grid
|
|
26
26
|
@mixin -make-container($breakpoints: $grid-breakpoints) {
|
|
27
|
-
margin-
|
|
28
|
-
margin-left: auto;
|
|
27
|
+
margin-inline: auto;
|
|
29
28
|
|
|
30
29
|
@include -set-largest-breakpoint($breakpoints);
|
|
31
30
|
|
|
@@ -38,15 +37,13 @@
|
|
|
38
37
|
|
|
39
38
|
@if $prev-margin != $margin {
|
|
40
39
|
@include cds-breakpoint($name) {
|
|
41
|
-
padding-
|
|
42
|
-
padding-left: #{($grid-gutter * 0.5) + $margin};
|
|
43
|
-
}
|
|
44
|
-
} @else {
|
|
45
|
-
@include cds-breakpoint($name) {
|
|
46
|
-
padding-right: #{($grid-gutter * 0.5) + $margin};
|
|
47
|
-
padding-left: #{($grid-gutter * 0.5) + $margin};
|
|
40
|
+
padding-inline: #{($grid-gutter * 0.5) + $margin};
|
|
48
41
|
}
|
|
49
42
|
}
|
|
43
|
+
} @else {
|
|
44
|
+
@include cds-breakpoint($name) {
|
|
45
|
+
padding-inline: #{($grid-gutter * 0.5) + $margin};
|
|
46
|
+
}
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
}
|
|
@@ -57,7 +54,7 @@
|
|
|
57
54
|
/// @group @cds/grid
|
|
58
55
|
@mixin -set-largest-breakpoint($breakpoints: $grid-breakpoints) {
|
|
59
56
|
$largest-breakpoint: -last-map-item($breakpoints);
|
|
60
|
-
max-
|
|
57
|
+
max-inline-size: map.get($largest-breakpoint, 'width');
|
|
61
58
|
}
|
|
62
59
|
|
|
63
60
|
/// Add in the max-widths for each breakpoint to the container
|
|
@@ -67,7 +64,7 @@
|
|
|
67
64
|
@mixin -make-container-max-widths($breakpoints: $grid-breakpoints) {
|
|
68
65
|
@each $name, $value in $breakpoints {
|
|
69
66
|
@include cds-breakpoint($name) {
|
|
70
|
-
max-
|
|
67
|
+
max-inline-size: map.get($value, width);
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
}
|
|
@@ -88,22 +85,19 @@
|
|
|
88
85
|
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
|
89
86
|
// always setting `width: 100%;`. This works because we use `flex` values
|
|
90
87
|
// later on to override this initial width.
|
|
91
|
-
|
|
92
|
-
padding-
|
|
93
|
-
padding-left: ($gutter * 0.5);
|
|
88
|
+
inline-size: 100%;
|
|
89
|
+
padding-inline: $gutter * 0.5;
|
|
94
90
|
|
|
95
91
|
// For our condensed use-case, our gutters collapse to 2px solid, 1px on each side.
|
|
96
92
|
.#{$prefix}-row-condensed &,
|
|
97
93
|
.#{$prefix}-grid-condensed & {
|
|
98
|
-
padding-
|
|
99
|
-
padding-left: ($condensed-gutter * 0.5);
|
|
94
|
+
padding-inline: $condensed-gutter * 0.5;
|
|
100
95
|
}
|
|
101
96
|
|
|
102
97
|
// For our narrow use-case, our container hangs 16px into the gutter
|
|
103
98
|
.#{$prefix}-row-narrow &,
|
|
104
99
|
.#{$prefix}-grid-narrow & {
|
|
105
|
-
padding-
|
|
106
|
-
padding-left: 0;
|
|
100
|
+
padding-inline: 0 $gutter * 0.5;
|
|
107
101
|
}
|
|
108
102
|
}
|
|
109
103
|
|
|
@@ -122,8 +116,8 @@
|
|
|
122
116
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
123
117
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
124
118
|
// do not appear to require this.
|
|
125
|
-
max-width: math.percentage(math.div($span, $columns));
|
|
126
119
|
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
120
|
+
max-inline-size: math.percentage(math.div($span, $columns));
|
|
127
121
|
}
|
|
128
122
|
}
|
|
129
123
|
|
|
@@ -137,9 +131,9 @@
|
|
|
137
131
|
$offset: math.div($span, $columns);
|
|
138
132
|
|
|
139
133
|
@if $offset == 0 {
|
|
140
|
-
margin-
|
|
134
|
+
margin-inline-start: 0;
|
|
141
135
|
} @else {
|
|
142
|
-
margin-
|
|
136
|
+
margin-inline-start: math.percentage($offset);
|
|
143
137
|
}
|
|
144
138
|
}
|
|
145
139
|
|
|
@@ -181,9 +175,9 @@
|
|
|
181
175
|
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
|
182
176
|
.#{$prefix}-col,
|
|
183
177
|
.#{$prefix}-col#{$infix} {
|
|
184
|
-
max-width: 100%;
|
|
185
178
|
flex-basis: 0;
|
|
186
179
|
flex-grow: 1;
|
|
180
|
+
max-inline-size: 100%;
|
|
187
181
|
}
|
|
188
182
|
|
|
189
183
|
.#{$prefix}-col-auto,
|
|
@@ -192,7 +186,7 @@
|
|
|
192
186
|
|
|
193
187
|
// Reset earlier grid tiers
|
|
194
188
|
width: auto;
|
|
195
|
-
max-
|
|
189
|
+
max-inline-size: 100%;
|
|
196
190
|
flex: 0 0 auto;
|
|
197
191
|
}
|
|
198
192
|
|
|
@@ -233,8 +227,7 @@
|
|
|
233
227
|
@mixin -make-row($gutter: $grid-gutter) {
|
|
234
228
|
display: flex;
|
|
235
229
|
flex-wrap: wrap;
|
|
236
|
-
margin-
|
|
237
|
-
margin-left: -1 * $gutter * 0.5;
|
|
230
|
+
margin-inline: -1 * $gutter * 0.5;
|
|
238
231
|
}
|
|
239
232
|
|
|
240
233
|
|
|
@@ -249,18 +242,17 @@
|
|
|
249
242
|
@mixin -no-gutter {
|
|
250
243
|
.#{$prefix}-no-gutter,
|
|
251
244
|
.#{$prefix}-row.#{$prefix}-no-gutter [class*='#{$prefix}-col'] {
|
|
252
|
-
padding-
|
|
253
|
-
padding-left: 0;
|
|
245
|
+
padding-inline: 0;
|
|
254
246
|
}
|
|
255
247
|
|
|
256
248
|
.#{$prefix}-no-gutter--start,
|
|
257
249
|
.#{$prefix}-row.#{$prefix}-no-gutter--start [class*='#{$prefix}-col'] {
|
|
258
|
-
padding-
|
|
250
|
+
padding-inline-start: 0;
|
|
259
251
|
}
|
|
260
252
|
|
|
261
253
|
.#{$prefix}-no-gutter--end,
|
|
262
254
|
.#{$prefix}-row.#{$prefix}-no-gutter--end [class*='#{$prefix}-col'] {
|
|
263
|
-
padding-
|
|
255
|
+
padding-inline-end: 0;
|
|
264
256
|
}
|
|
265
257
|
}
|
|
266
258
|
|
|
@@ -275,11 +267,11 @@
|
|
|
275
267
|
/// @group @carbon/grid
|
|
276
268
|
@mixin -hang($gutter: $grid-gutter) {
|
|
277
269
|
.#{$prefix}-hang--start {
|
|
278
|
-
padding-
|
|
270
|
+
padding-inline-start: $gutter * 0.5;
|
|
279
271
|
}
|
|
280
272
|
|
|
281
273
|
.#{$prefix}-hang--end {
|
|
282
|
-
padding-
|
|
274
|
+
padding-inline-end: $gutter * 0.5;
|
|
283
275
|
}
|
|
284
276
|
}
|
|
285
277
|
|