@central-design-system/components 3.0.0-beta.2 → 3.0.0-beta.21

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.
Files changed (186) hide show
  1. package/dist/cds.css +1 -1
  2. package/dist/cds.d.ts +4 -2
  3. package/dist/cds.es.js +10713 -9313
  4. package/dist/cds.umd.js +7 -3
  5. package/dist/components/CdsAutocomplete/CdsAutocomplete.vue.d.ts +97 -37
  6. package/dist/components/CdsBadge/CdsBadge.vue.d.ts +36 -12
  7. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbs.vue.d.ts +11 -0
  8. package/dist/components/CdsBreadcrumbs/CdsBreadcrumbsItem.vue.d.ts +14 -3
  9. package/dist/components/CdsButton/CdsButton.vue.d.ts +37 -26
  10. package/dist/components/CdsCheckbox/CdsCheckbox.vue.d.ts +68 -3
  11. package/dist/components/CdsCheckbox/CdsCheckboxGroup.vue.d.ts +13 -0
  12. package/dist/components/CdsCombobox/CdsCombobox.vue.d.ts +270 -126
  13. package/dist/components/CdsContainer/CdsContainer.vue.d.ts +41 -24
  14. package/dist/components/CdsContainer/context.d.ts +1 -1
  15. package/dist/components/CdsContentSwitcher/CdsContentSwitcher.vue.d.ts +66 -0
  16. package/dist/components/CdsContentSwitcher/CdsContentSwitcherItem.vue.d.ts +212 -0
  17. package/dist/components/CdsContentSwitcher/index.d.ts +2 -0
  18. package/dist/components/CdsDatePicker/CdsDatePicker.vue.d.ts +12 -1
  19. package/dist/components/CdsDatePicker/composable/calendar.d.ts +2 -2
  20. package/dist/components/CdsDrawer/CdsDrawer.vue.d.ts +16 -4
  21. package/dist/components/CdsDropdown/CdsDropdown.vue.d.ts +228 -127
  22. package/dist/components/CdsEmptyState/CdsEmptyState.vue.d.ts +4 -4
  23. package/dist/components/CdsExpandablePanel/CdsExpandablePanel.vue.d.ts +13 -13
  24. package/dist/components/CdsExpandablePanel/CdsExpandablePanelTitle.vue.d.ts +10 -10
  25. package/dist/components/CdsExpandablePanel/CdsExpandablePanels.vue.d.ts +17 -6
  26. package/dist/components/CdsExpandablePanel/composable/expandablePanelTitleProps.d.ts +3 -3
  27. package/dist/components/CdsFooter/CdsFooter.vue.d.ts +23 -3
  28. package/dist/components/CdsForm/CdsForm.vue.d.ts +11 -0
  29. package/dist/components/CdsGrid/composable/column.d.ts +1 -1
  30. package/dist/components/CdsGrid/composable/subgrid.d.ts +1 -1
  31. package/dist/components/CdsGrid/mode/CSSGrid.d.ts +1 -1
  32. package/dist/components/CdsGrid/mode/FlexGrid.d.ts +1 -1
  33. package/dist/components/CdsHeader/CdsHeader.vue.d.ts +23 -3
  34. package/dist/components/CdsIcon/CdsIcon.vue.d.ts +27 -3
  35. package/dist/components/CdsInput/CdsInput.vue.d.ts +26 -21
  36. package/dist/components/CdsInput/CdsInputDescription.vue.d.ts +3 -3
  37. package/dist/components/CdsInput/CdsInputLabel.vue.d.ts +3 -3
  38. package/dist/components/CdsLayout/CdsLayout.vue.d.ts +12 -1
  39. package/dist/components/CdsLayout/context.d.ts +1 -1
  40. package/dist/components/CdsLink/CdsLink.vue.d.ts +15 -3
  41. package/dist/components/CdsList/CdsList.vue.d.ts +31 -19
  42. package/dist/components/CdsList/CdsListGroup.vue.d.ts +7 -7
  43. package/dist/components/CdsList/CdsListItem.vue.d.ts +12 -12
  44. package/dist/components/CdsList/composable/list.d.ts +1 -1
  45. package/dist/components/CdsLoader/CdsLoader.vue.d.ts +12 -0
  46. package/dist/components/CdsMenu/CdsMenu.vue.d.ts +18 -7
  47. package/dist/components/CdsModal/CdsModal.vue.d.ts +14 -3
  48. package/dist/components/CdsNotification/CdsNotification.vue.d.ts +38 -27
  49. package/dist/components/CdsNotification/CdsNotificationAlert.vue.d.ts +33 -22
  50. package/dist/components/CdsNotification/composable/notification.d.ts +4 -4
  51. package/dist/components/CdsOverlay/CdsOverlay.vue.d.ts +11 -5
  52. package/dist/components/CdsOverlay/composable/activator.d.ts +1 -1
  53. package/dist/components/CdsOverlay/composable/locationStrategies.d.ts +16 -16
  54. package/dist/components/CdsOverlay/constants.d.ts +2 -0
  55. package/dist/components/CdsPagination/CdsPagination.vue.d.ts +12 -1
  56. package/dist/components/CdsProgress/CdsProgress.vue.d.ts +12 -1
  57. package/dist/components/CdsRadioButton/CdsRadio.vue.d.ts +26 -11
  58. package/dist/components/CdsRadioButton/CdsRadioButton.vue.d.ts +13 -0
  59. package/dist/components/CdsSelect/CdsSelect.vue.d.ts +81 -61
  60. package/dist/components/CdsSidebar/CdsSidebar.vue.d.ts +30 -8
  61. package/dist/components/CdsSkeletonLoader/CdsSkeletonLoader.vue.d.ts +11 -0
  62. package/dist/components/CdsSlideGroup/CdsSlideGroup.vue.d.ts +19 -19
  63. package/dist/components/CdsStages/CdsStages.vue.d.ts +13 -1
  64. package/dist/components/CdsStatus/CdsStatus.vue.d.ts +20 -8
  65. package/dist/components/CdsSteps/CdsSteps.vue.d.ts +30 -23
  66. package/dist/components/CdsSteps/CdsStepsItem.vue.d.ts +3 -3
  67. package/dist/components/CdsSteps/context.d.ts +1 -1
  68. package/dist/components/CdsTable/CdsTable.vue.d.ts +96 -37
  69. package/dist/components/CdsTable/components/Footer/Footer.d.ts +1 -1
  70. package/dist/components/CdsTable/components/Header/DragHandle.d.ts +1 -1
  71. package/dist/components/CdsTable/components/Table/InternalTable.d.ts +60 -24
  72. package/dist/components/CdsTable/components/TableProvider.d.ts +71 -24
  73. package/dist/components/CdsTable/composable/filter.d.ts +1 -1
  74. package/dist/components/CdsTable/composable/flat.d.ts +1 -1
  75. package/dist/components/CdsTable/composable/pagination.d.ts +1 -1
  76. package/dist/components/CdsTable/composable/scroll.d.ts +4607 -0
  77. package/dist/components/CdsTable/composable/selection.d.ts +1 -1
  78. package/dist/components/CdsTable/composable/sorter.d.ts +1 -1
  79. package/dist/components/CdsTable/composable/sticky.d.ts +1 -1
  80. package/dist/components/CdsTable/composable/table.d.ts +32 -14
  81. package/dist/components/CdsTable/constants.d.ts +1 -0
  82. package/dist/components/CdsTable/context/summary.d.ts +1 -1
  83. package/dist/components/CdsTable/context/table.d.ts +1 -1
  84. package/dist/components/CdsTable/interface.d.ts +4 -4
  85. package/dist/components/CdsTable/utils/index.d.ts +1 -0
  86. package/dist/components/CdsTable/utils/vnode.d.ts +10 -0
  87. package/dist/components/CdsTabs/CdsTab.vue.d.ts +13 -13
  88. package/dist/components/CdsTabs/CdsTabs.vue.d.ts +50 -39
  89. package/dist/components/CdsTag/CdsTag.vue.d.ts +15 -3
  90. package/dist/components/CdsTextArea/CdsTextArea.vue.d.ts +101 -89
  91. package/dist/components/CdsTextInput/CdsTextInput.vue.d.ts +93 -57
  92. package/dist/components/CdsTimePicker/CdsTimePicker.vue.d.ts +11 -0
  93. package/dist/components/CdsTimePicker/composable/time.d.ts +2 -2
  94. package/dist/components/CdsToggle/CdsToggle.vue.d.ts +13 -8
  95. package/dist/components/CdsToolbar/CdsToolbar.vue.d.ts +53 -0
  96. package/dist/components/CdsTooltip/CdsTooltip.vue.d.ts +21 -10
  97. package/dist/components/CdsUploader/CdsUploader.vue.d.ts +61 -40
  98. package/dist/components/CdsUploader/components/AjaxUploader.d.ts +15 -15
  99. package/dist/components/CdsUploader/components/UploadList/ListItem.d.ts +40 -22
  100. package/dist/components/CdsUploader/components/UploadList/UploadList.d.ts +39 -21
  101. package/dist/components/CdsUploader/composable/upload.d.ts +25 -15
  102. package/dist/components/CdsUploader/index.d.ts +1 -0
  103. package/dist/components/CdsUploader/interface.d.ts +1 -1
  104. package/dist/components/index.d.ts +3 -0
  105. package/dist/composable/appearance.d.ts +2 -2
  106. package/dist/composable/datetime.d.ts +4 -4
  107. package/dist/composable/delay.d.ts +2 -2
  108. package/dist/composable/direction.d.ts +1 -1
  109. package/dist/composable/domObserver.d.ts +5 -0
  110. package/dist/composable/field.d.ts +7 -5
  111. package/dist/composable/filter.d.ts +30 -0
  112. package/dist/composable/form.d.ts +2 -2
  113. package/dist/composable/group.d.ts +3 -3
  114. package/dist/composable/icon.d.ts +3 -3
  115. package/dist/composable/index.d.ts +5 -1
  116. package/dist/composable/invertColor.d.ts +19 -0
  117. package/dist/composable/layout.d.ts +20 -20
  118. package/dist/composable/loading.d.ts +2 -2
  119. package/dist/composable/menu.d.ts +1 -1
  120. package/dist/composable/nested/nested.d.ts +2 -2
  121. package/dist/{components/CdsDropdown/composable → composable}/scrolling.d.ts +2 -2
  122. package/dist/composable/select.d.ts +36 -8
  123. package/dist/composable/size.d.ts +1 -1
  124. package/dist/composable/tag.d.ts +0 -3
  125. package/dist/composable/text.d.ts +2 -2
  126. package/dist/composable/theme.d.ts +82 -0
  127. package/dist/composable/transparent.d.ts +19 -0
  128. package/dist/composable/validation.d.ts +2 -2
  129. package/dist/composable/variant.d.ts +1 -1
  130. package/dist/create.d.ts +5 -1
  131. package/dist/directives/index.d.ts +1 -0
  132. package/dist/directives/intersect/index.d.ts +19 -0
  133. package/dist/globals.d.ts +8 -0
  134. package/dist/locale/index.d.ts +1 -1
  135. package/dist/themes/b2b.d.ts +26 -0
  136. package/dist/themes/cds.d.ts +26 -0
  137. package/dist/themes/dark.d.ts +26 -0
  138. package/dist/themes/index.d.ts +5 -0
  139. package/dist/themes/promo.d.ts +26 -0
  140. package/dist/themes/themes.d.ts +10 -0
  141. package/dist/utils/colors.d.ts +368 -0
  142. package/dist/utils/colorsUtils/APCA.d.ts +7 -0
  143. package/dist/utils/colorsUtils/index.d.ts +1 -0
  144. package/dist/utils/colorsUtils/transformCIELAB.d.ts +3 -0
  145. package/dist/utils/colorsUtils/transformSRGB.d.ts +3 -0
  146. package/dist/utils/colorsUtils/utils.d.ts +41 -0
  147. package/dist/utils/date/date.d.ts +12 -12
  148. package/dist/utils/helpers.d.ts +30 -1
  149. package/dist/utils/index.d.ts +2 -0
  150. package/dist/utils/propsFactory.d.ts +1 -1
  151. package/nuxt.js +2 -1
  152. package/package.json +1 -1
  153. package/src/scss/modules/grid/_css-grid.scss +12 -19
  154. package/src/scss/modules/grid/_flex-grid.scss +9 -5
  155. package/src/scss/modules/grid/_mixins.scss +27 -33
  156. package/src/scss/themes/b2b/tokens.json +104 -104
  157. package/src/scss/themes/cds/tokens.json +104 -104
  158. package/src/scss/themes/index.ts +1 -1
  159. package/src/scss/utility/display.scss +56 -5
  160. package/src/scss/utility/flexbox.scss +26 -28
  161. package/src/scss/utility/index.scss +1 -2
  162. package/src/scss/utility/layout.scss +65 -3
  163. package/src/scss/utility/spacing.scss +46 -86
  164. package/src/scss/utility/typography.scss +48 -1
  165. package/src/scss/utility/variables/display.scss +10 -0
  166. package/src/scss/utility/variables/exports/_display.scss +7 -0
  167. package/src/scss/utility/variables/exports/_flex.scss +13 -0
  168. package/src/scss/utility/variables/exports/_overflow.scss +7 -0
  169. package/src/scss/utility/variables/exports/_position.scss +7 -0
  170. package/src/scss/utility/variables/exports/_spacing.scss +14 -0
  171. package/src/scss/utility/variables/exports/_typography.scss +22 -0
  172. package/src/scss/utility/variables/exports/_visibility.scss +7 -0
  173. package/src/scss/utility/variables/exports/_widthHeight.scss +7 -0
  174. package/src/scss/utility/variables/flex.scss +140 -0
  175. package/src/scss/utility/variables/index.scss +12 -0
  176. package/src/scss/utility/variables/overflow.scss +6 -0
  177. package/src/scss/utility/variables/position.scss +7 -0
  178. package/src/scss/utility/variables/spacing.scss +37 -0
  179. package/src/scss/utility/{variables.scss → variables/typography.scss} +48 -71
  180. package/src/scss/utility/variables/visibility.scss +5 -0
  181. package/src/scss/utility/variables/widthHeight.scss +69 -0
  182. package/dist/components/CdsDropdown/composable/index.d.ts +0 -1
  183. package/dist/composable/dark.d.ts +0 -19
  184. package/dist/plugins/index.d.ts +0 -2
  185. package/src/scss/utility/generatedFiles/generatedStyles.json +0 -1
  186. package/src/scss/utility/generatedFiles/generatedStyles.scss +0 -300
@@ -1,5 +1,5 @@
1
- import type { ComponentPublicInstance, ComponentInternalInstance, ComputedGetter, InjectionKey, PropType, Ref, ToRefs, VNodeProps, VNodeChild, AllowedComponentProps, Component } from 'vue';
2
1
  import type { TItemKey } from '../composable';
2
+ import type { ComponentPublicInstance, ComponentInternalInstance, ComputedGetter, InjectionKey, PropType, Ref, ToRefs, VNodeProps, VNodeChild, AllowedComponentProps, Component } from 'vue';
3
3
  export declare const preventedScrollClass = "cds-scroll-blocked";
4
4
  export declare const keyNames: Readonly<{
5
5
  enter: "Enter";
@@ -99,6 +99,22 @@ export declare function getNestedValue(obj: any, path: (string | number)[], fall
99
99
  * @param fallback
100
100
  */
101
101
  export declare function getObjectValueByPath(obj: any, path: string, fallback?: any): any;
102
+ /**
103
+ * 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.
104
+ * If the property is a string, it will be used as a path to retrieve the value from the item.
105
+ * If the property is an array, it will be used as a nested path to retrieve the value from the item.
106
+ * 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.
107
+ * If the property is a boolean, and it's true, the item itself will be returned.
108
+ * If the property is null, undefined, or a boolean that's not true, the fallback value will be returned.
109
+ * If the item is not an object, and the property is not a function, the fallback value will be returned.
110
+ * If the property is not a string, an array, or a function, the fallback value will be returned.
111
+ * If the value retrieved from the item is undefined, the fallback value will be returned.
112
+ *
113
+ * @param item - The item from which to get the property value.
114
+ * @param property - The property to get from the item. Can be a string, an array, a function, or a boolean.
115
+ * @param fallback - The value to return if the property is not found or its value is undefined.
116
+ * @returns The value of the property from the item, or the fallback value.
117
+ */
102
118
  export declare function getPropertyFromItem(item: any, property: SelectItemKey, fallback?: any): any;
103
119
  /**
104
120
  * This function is used to return the scroll position of the given element.
@@ -142,6 +158,7 @@ export declare const isOn: (key: string) => boolean;
142
158
  export declare const EventProp: PropType<(...args: any[]) => any>;
143
159
  export declare function isComponentInstance(obj: any): obj is ComponentPublicInstance;
144
160
  export declare function isFixedPosition(el?: HTMLElement): boolean;
161
+ export declare function padEnd(str: string, length: number, char?: string): string;
145
162
  export declare function padStart(string: number | string, targetLength: number, padString: string): string;
146
163
  export declare function pad(n: string | number, length?: number): string;
147
164
  export declare function refElement<T extends Record<string, any> | undefined>(obj: T): Exclude<T, ComponentPublicInstance> | HTMLElement;
@@ -163,6 +180,18 @@ export declare function matchesSelector<T>(el: T | Element | undefined, selector
163
180
  * @param delay
164
181
  */
165
182
  export declare function debounce(fn: Function, delay: number): (...args: any[]) => void;
183
+ /**
184
+ * Pluralize a word based on a number.
185
+ * @param n
186
+ * @param opts
187
+ */
188
+ export declare function plurals(n: number, opts: string[]): string;
189
+ /**
190
+ * Chunk a string into an array of strings.
191
+ * @param str
192
+ * @param size
193
+ */
194
+ export declare function chunk(str: string, size?: number): string[];
166
195
  export declare function noop(): void;
167
196
  /**
168
197
  * Types
@@ -22,3 +22,5 @@ export * from './dom/wrapperRaf';
22
22
  export * from './dom/warn';
23
23
  export * from './dom/classNames';
24
24
  export * from './dom/hRender';
25
+ export * from './colorsUtils';
26
+ 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
@@ -1,6 +1,7 @@
1
- import { defineNuxtModule } from '@nuxt/kit';
2
1
  import { fileURLToPath } from 'node:url';
3
2
 
3
+ import { defineNuxtModule } from '@nuxt/kit';
4
+
4
5
  export default defineNuxtModule({
5
6
  hooks: {
6
7
  'components:dirs'(dirs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@central-design-system/components",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.21",
4
4
  "description": "Central Design System on the Vue 3.0 and TypeScript",
5
5
  "author": "magersoft",
6
6
  "license": "ISC",
@@ -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--full-width {
91
- max-width: 100%;
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-right: var(--cds-grid-gutter-end);
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-right: var(--cds-grid-gutter-start);
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-right: calc(var(--cds-grid-mode-start) * -1);
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-left: var(--cds-grid-column-hang);
168
+ margin-inline-start: var(--cds-grid-column-hang);
175
169
 
176
170
  [dir='rtl'] & {
177
- margin-right: var(--cds-grid-column-hang);
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-width: 100%;
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-top: $grid-gutter * 0.5;
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-top: $condensed-gutter * 0.5;
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-right: auto;
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-right: #{($grid-gutter * 0.5) + $margin};
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-width: map.get($largest-breakpoint, 'width');
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-width: map.get($value, width);
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
- width: 100%;
92
- padding-right: ($gutter * 0.5);
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-right: ($condensed-gutter * 0.5);
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-right: ($gutter * 0.5);
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-left: 0;
134
+ margin-inline-start: 0;
141
135
  } @else {
142
- margin-left: math.percentage($offset);
136
+ margin-inline-start: math.percentage($offset);
143
137
  }
144
138
  }
145
139
 
@@ -181,17 +175,19 @@
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,
190
184
  .#{$prefix}-col#{$infix}-auto {
191
- width: auto;
185
+ @include -make-col-ready($gutter);
186
+
192
187
  // Reset earlier grid tiers
193
- max-width: 100%;
194
- flex: 1 0 0;
188
+ width: auto;
189
+ max-inline-size: 100%;
190
+ flex: 0 0 auto;
195
191
  }
196
192
 
197
193
  @for $i from 0 through $columns {
@@ -231,8 +227,7 @@
231
227
  @mixin -make-row($gutter: $grid-gutter) {
232
228
  display: flex;
233
229
  flex-wrap: wrap;
234
- margin-right: -1 * $gutter * 0.5;
235
- margin-left: -1 * $gutter * 0.5;
230
+ margin-inline: -1 * $gutter * 0.5;
236
231
  }
237
232
 
238
233
 
@@ -247,18 +242,17 @@
247
242
  @mixin -no-gutter {
248
243
  .#{$prefix}-no-gutter,
249
244
  .#{$prefix}-row.#{$prefix}-no-gutter [class*='#{$prefix}-col'] {
250
- padding-right: 0;
251
- padding-left: 0;
245
+ padding-inline: 0;
252
246
  }
253
247
 
254
248
  .#{$prefix}-no-gutter--start,
255
249
  .#{$prefix}-row.#{$prefix}-no-gutter--start [class*='#{$prefix}-col'] {
256
- padding-left: 0;
250
+ padding-inline-start: 0;
257
251
  }
258
252
 
259
253
  .#{$prefix}-no-gutter--end,
260
254
  .#{$prefix}-row.#{$prefix}-no-gutter--end [class*='#{$prefix}-col'] {
261
- padding-right: 0;
255
+ padding-inline-end: 0;
262
256
  }
263
257
  }
264
258
 
@@ -273,11 +267,11 @@
273
267
  /// @group @carbon/grid
274
268
  @mixin -hang($gutter: $grid-gutter) {
275
269
  .#{$prefix}-hang--start {
276
- padding-left: $gutter * 0.5;
270
+ padding-inline-start: $gutter * 0.5;
277
271
  }
278
272
 
279
273
  .#{$prefix}-hang--end {
280
- padding-right: $gutter * 0.5;
274
+ padding-inline-end: $gutter * 0.5;
281
275
  }
282
276
  }
283
277