origam 2.18.21 → 2.20.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/CHANGELOG.md +138 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +0 -6
- package/dist/src/assets/css/tokens/light.css +0 -3
- package/dist/src/assets/scss/tokens/_dark.scss +0 -6
- package/dist/src/assets/scss/tokens/_light.scss +0 -3
- package/dist/src/components/Alert/OrigamAlert.vue +20 -0
- package/dist/src/components/App/OrigamAppBar.vue +20 -0
- package/dist/src/components/Audio/OrigamAudio.vue +20 -0
- package/dist/src/components/Avatar/OrigamAvatar.vue +20 -0
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +20 -0
- package/dist/src/components/Badge/OrigamBadge.vue +12 -0
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +20 -0
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +20 -0
- package/dist/src/components/Bracket/OrigamBracket.vue +12 -0
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +20 -0
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +33 -5
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +20 -0
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +8 -0
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +20 -0
- package/dist/src/components/Btn/OrigamBtn.vue +20 -0
- package/dist/src/components/Btn/OrigamBtnGroup.vue +20 -0
- package/dist/src/components/Btn/OrigamBtnToggle.vue +20 -0
- package/dist/src/components/Calendar/OrigamCalendar.vue +21 -1
- package/dist/src/components/Card/OrigamCard.vue +20 -0
- package/dist/src/components/Card/OrigamCardHeader.vue +20 -0
- package/dist/src/components/Card/OrigamCardText.vue +20 -0
- package/dist/src/components/Carousel/OrigamCarousel.vue +20 -0
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +20 -0
- package/dist/src/components/Chart/OrigamChart.vue +25 -1
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +12 -0
- package/dist/src/components/Chart/OrigamChartBullet.vue +12 -0
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +12 -0
- package/dist/src/components/Chart/OrigamChartCartesian.vue +12 -0
- package/dist/src/components/Chart/OrigamChartGauge.vue +12 -0
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +12 -0
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +12 -0
- package/dist/src/components/Chart/OrigamChartMap.vue +12 -0
- package/dist/src/components/Chart/OrigamChartPareto.vue +12 -0
- package/dist/src/components/Chart/OrigamChartPictorial.vue +12 -0
- package/dist/src/components/Chart/OrigamChartPolar.vue +12 -0
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +12 -0
- package/dist/src/components/Chart/OrigamChartPyramid.vue +12 -0
- package/dist/src/components/Chart/OrigamChartRadar.vue +12 -0
- package/dist/src/components/Chart/OrigamChartSankey.vue +12 -0
- package/dist/src/components/Chart/OrigamChartSparkline.vue +12 -0
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +12 -0
- package/dist/src/components/Chart/OrigamChartSunburst.vue +12 -0
- package/dist/src/components/Chart/OrigamChartTreemap.vue +12 -0
- package/dist/src/components/Chart/OrigamChartVariwide.vue +12 -0
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +12 -0
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +20 -0
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +12 -0
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +20 -0
- package/dist/src/components/Chip/OrigamChip.vue +20 -0
- package/dist/src/components/Chip/OrigamChipGroup.vue +20 -0
- package/dist/src/components/Clipboard/OrigamClipboard.vue +20 -0
- package/dist/src/components/Code/OrigamCode.vue +20 -0
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +20 -0
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +20 -0
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +4 -0
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +20 -0
- package/dist/src/components/Counter/OrigamCounter.vue +20 -0
- package/dist/src/components/DataList/OrigamDataList.vue +20 -0
- package/dist/src/components/DataList/OrigamDataText.vue +8 -0
- package/dist/src/components/DataList/OrigamDataTitle.vue +8 -0
- package/dist/src/components/DataTable/OrigamDataTable.vue +20 -0
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +5 -1
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +4 -0
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +20 -0
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +20 -0
- package/dist/src/components/Dialog/OrigamDialog.vue +20 -0
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +20 -0
- package/dist/src/components/Divider/OrigamDivider.vue +4 -0
- package/dist/src/components/Drawer/OrigamDrawer.vue +20 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +20 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +20 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +20 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +20 -0
- package/dist/src/components/Field/OrigamField.vue +20 -0
- package/dist/src/components/FileField/OrigamFileField.vue +20 -0
- package/dist/src/components/Grid/OrigamGrid.vue +21 -1
- package/dist/src/components/Grids/OrigamCol.vue +16 -0
- package/dist/src/components/Grids/OrigamContainer.vue +17 -1
- package/dist/src/components/Grids/OrigamRow.vue +16 -0
- package/dist/src/components/Icon/OrigamClassIcon.vue +21 -1
- package/dist/src/components/Icon/OrigamComponentIcon.vue +21 -1
- package/dist/src/components/Icon/OrigamIcon.vue +21 -1
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +21 -1
- package/dist/src/components/Icon/OrigamSvgIcon.vue +21 -1
- package/dist/src/components/Img/OrigamImg.vue +20 -0
- package/dist/src/components/Input/OrigamInput.vue +20 -0
- package/dist/src/components/Kbd/OrigamKbd.vue +35 -41
- package/dist/src/components/Label/OrigamLabel.vue +20 -0
- package/dist/src/components/Layout/OrigamLayout.vue +21 -1
- package/dist/src/components/List/OrigamList.vue +21 -1
- package/dist/src/components/List/OrigamListGroup.vue +20 -0
- package/dist/src/components/List/OrigamListItem.vue +20 -0
- package/dist/src/components/List/OrigamListSubheader.vue +20 -0
- package/dist/src/components/Main/OrigamMain.vue +20 -0
- package/dist/src/components/Masonry/OrigamMasonry.vue +21 -1
- package/dist/src/components/Media/OrigamMediaScrubber.vue +5 -1
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +4 -0
- package/dist/src/components/Menu/OrigamMenu.vue +20 -0
- package/dist/src/components/Messages/OrigamMessages.vue +20 -0
- package/dist/src/components/NumberField/OrigamNumberField.vue +20 -0
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +20 -0
- package/dist/src/components/Pagination/OrigamPagination.vue +16 -0
- package/dist/src/components/Parallax/OrigamParallax.vue +20 -0
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +20 -0
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +20 -0
- package/dist/src/components/Picker/OrigamPicker.vue +20 -0
- package/dist/src/components/Progress/OrigamProgress.vue +12 -0
- package/dist/src/components/Progress/OrigamProgressCircular.vue +8 -0
- package/dist/src/components/Progress/OrigamProgressLinear.vue +12 -0
- package/dist/src/components/QrCode/OrigamQrCode.vue +21 -1
- package/dist/src/components/Radio/OrigamRadio.vue +20 -0
- package/dist/src/components/Radio/OrigamRadioBtn.vue +12 -0
- package/dist/src/components/Radio/OrigamRadioGroup.vue +20 -0
- package/dist/src/components/RatingField/OrigamRatingField.vue +20 -0
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +20 -0
- package/dist/src/components/Responsive/OrigamResponsive.vue +21 -1
- package/dist/src/components/Select/OrigamSelect.vue +20 -0
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +12 -0
- package/dist/src/components/Sheet/OrigamSheet.vue +20 -0
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +5 -1
- package/dist/src/components/Slide/OrigamSlideGroup.vue +20 -0
- package/dist/src/components/SliderField/OrigamSliderField.vue +20 -0
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +5 -1
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +20 -0
- package/dist/src/components/Stepper/OrigamStepper.vue +21 -1
- package/dist/src/components/Switch/OrigamSwitch.vue +20 -0
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +12 -0
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +12 -0
- package/dist/src/components/Table/OrigamTable.vue +20 -0
- package/dist/src/components/Tabs/OrigamTabs.vue +4 -0
- package/dist/src/components/TextField/OrigamTextField.vue +20 -0
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +20 -0
- package/dist/src/components/Title/OrigamTitle.vue +16 -0
- package/dist/src/components/Toolbar/OrigamToolbar.vue +20 -0
- package/dist/src/components/Video/OrigamVideo.vue +20 -0
- package/dist/src/components/Window/OrigamWindow.vue +20 -0
- package/dist/src/composables/Commons/border.composable.cjs +24 -16
- package/dist/src/composables/Commons/border.composable.d.ts +31 -10
- package/dist/src/composables/Commons/border.composable.js +21 -17
- package/dist/src/composables/Commons/margin.composable.cjs +7 -0
- package/dist/src/composables/Commons/margin.composable.d.ts +7 -1
- package/dist/src/composables/Commons/margin.composable.js +5 -1
- package/dist/src/composables/Commons/padding.composable.cjs +7 -0
- package/dist/src/composables/Commons/padding.composable.d.ts +15 -1
- package/dist/src/composables/Commons/padding.composable.js +5 -1
- package/dist/src/composables/Commons/rounded.composable.cjs +7 -0
- package/dist/src/composables/Commons/rounded.composable.d.ts +14 -1
- package/dist/src/composables/Commons/rounded.composable.js +5 -1
- package/dist/src/composables/Commons/stateEffect.composable.cjs +60 -0
- package/dist/src/composables/Commons/stateEffect.composable.js +60 -0
- package/dist/src/consts/Commons/border.const.cjs +19 -2
- package/dist/src/consts/Commons/border.const.d.ts +65 -4
- package/dist/src/consts/Commons/border.const.js +16 -2
- package/dist/src/consts/Commons/spacing.const.cjs +40 -1
- package/dist/src/consts/Commons/spacing.const.d.ts +68 -1
- package/dist/src/consts/Commons/spacing.const.js +19 -1
- package/dist/src/consts/Commons/variant-preset.const.cjs +4 -1
- package/dist/src/consts/Commons/variant-preset.const.d.ts +22 -13
- package/dist/src/consts/Commons/variant-preset.const.js +4 -1
- package/dist/src/consts/Kbd/kbd.const.cjs +22 -0
- package/dist/src/consts/Kbd/kbd.const.d.ts +102 -0
- package/dist/src/consts/Kbd/kbd.const.js +16 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +2 -2
- package/dist/src/interfaces/Bracket/bracket-surface.interface.d.ts +39 -0
- package/dist/src/interfaces/Bracket/bracket.interface.d.ts +25 -4
- package/dist/src/interfaces/Commons/border.interface.d.ts +123 -0
- package/dist/src/interfaces/Commons/margin.interface.d.ts +35 -1
- package/dist/src/interfaces/Commons/padding.interface.d.ts +41 -1
- package/dist/src/interfaces/Commons/rounded.interface.d.ts +47 -4
- package/dist/src/interfaces/Kbd/kbd.interface.d.ts +2 -1
- package/dist/src/types/Bracket/bracket.type.d.ts +82 -0
- package/dist/src/types/Commons/anchor.type.d.ts +48 -0
- package/dist/src/types/Commons/variant-preset.type.d.ts +22 -4
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Bracket/bracket-surface.util.cjs +19 -0
- package/dist/src/utils/Bracket/bracket-surface.util.js +10 -0
- package/dist/src/utils/Commons/border.util.d.ts +16 -8
- package/package.json +1 -1
|
@@ -125,6 +125,18 @@ export function useStateEffect(props, isHover = noopRef, isActive = noopRef, hov
|
|
|
125
125
|
get borderInline() {
|
|
126
126
|
return props.borderInline;
|
|
127
127
|
},
|
|
128
|
+
get borderBlockStart() {
|
|
129
|
+
return props.borderBlockStart;
|
|
130
|
+
},
|
|
131
|
+
get borderBlockEnd() {
|
|
132
|
+
return props.borderBlockEnd;
|
|
133
|
+
},
|
|
134
|
+
get borderInlineStart() {
|
|
135
|
+
return props.borderInlineStart;
|
|
136
|
+
},
|
|
137
|
+
get borderInlineEnd() {
|
|
138
|
+
return props.borderInlineEnd;
|
|
139
|
+
},
|
|
128
140
|
get borderTop() {
|
|
129
141
|
return props.borderTop;
|
|
130
142
|
},
|
|
@@ -148,6 +160,18 @@ export function useStateEffect(props, isHover = noopRef, isActive = noopRef, hov
|
|
|
148
160
|
},
|
|
149
161
|
get borderLeftColor() {
|
|
150
162
|
return props.borderLeftColor;
|
|
163
|
+
},
|
|
164
|
+
get borderBlockStartColor() {
|
|
165
|
+
return props.borderBlockStartColor;
|
|
166
|
+
},
|
|
167
|
+
get borderBlockEndColor() {
|
|
168
|
+
return props.borderBlockEndColor;
|
|
169
|
+
},
|
|
170
|
+
get borderInlineStartColor() {
|
|
171
|
+
return props.borderInlineStartColor;
|
|
172
|
+
},
|
|
173
|
+
get borderInlineEndColor() {
|
|
174
|
+
return props.borderInlineEndColor;
|
|
151
175
|
}
|
|
152
176
|
})
|
|
153
177
|
);
|
|
@@ -167,6 +191,18 @@ export function useStateEffect(props, isHover = noopRef, isActive = noopRef, hov
|
|
|
167
191
|
},
|
|
168
192
|
get roundedBottomRight() {
|
|
169
193
|
return props.roundedBottomRight;
|
|
194
|
+
},
|
|
195
|
+
get roundedStartStart() {
|
|
196
|
+
return props.roundedStartStart;
|
|
197
|
+
},
|
|
198
|
+
get roundedStartEnd() {
|
|
199
|
+
return props.roundedStartEnd;
|
|
200
|
+
},
|
|
201
|
+
get roundedEndStart() {
|
|
202
|
+
return props.roundedEndStart;
|
|
203
|
+
},
|
|
204
|
+
get roundedEndEnd() {
|
|
205
|
+
return props.roundedEndEnd;
|
|
170
206
|
}
|
|
171
207
|
})
|
|
172
208
|
);
|
|
@@ -196,6 +232,18 @@ export function useStateEffect(props, isHover = noopRef, isActive = noopRef, hov
|
|
|
196
232
|
},
|
|
197
233
|
get paddingInline() {
|
|
198
234
|
return props.paddingInline;
|
|
235
|
+
},
|
|
236
|
+
get paddingInlineStart() {
|
|
237
|
+
return props.paddingInlineStart;
|
|
238
|
+
},
|
|
239
|
+
get paddingInlineEnd() {
|
|
240
|
+
return props.paddingInlineEnd;
|
|
241
|
+
},
|
|
242
|
+
get paddingBlockStart() {
|
|
243
|
+
return props.paddingBlockStart;
|
|
244
|
+
},
|
|
245
|
+
get paddingBlockEnd() {
|
|
246
|
+
return props.paddingBlockEnd;
|
|
199
247
|
}
|
|
200
248
|
})
|
|
201
249
|
);
|
|
@@ -221,6 +269,18 @@ export function useStateEffect(props, isHover = noopRef, isActive = noopRef, hov
|
|
|
221
269
|
},
|
|
222
270
|
get marginInline() {
|
|
223
271
|
return props.marginInline;
|
|
272
|
+
},
|
|
273
|
+
get marginInlineStart() {
|
|
274
|
+
return props.marginInlineStart;
|
|
275
|
+
},
|
|
276
|
+
get marginInlineEnd() {
|
|
277
|
+
return props.marginInlineEnd;
|
|
278
|
+
},
|
|
279
|
+
get marginBlockStart() {
|
|
280
|
+
return props.marginBlockStart;
|
|
281
|
+
},
|
|
282
|
+
get marginBlockEnd() {
|
|
283
|
+
return props.marginBlockEnd;
|
|
224
284
|
}
|
|
225
285
|
})
|
|
226
286
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BORDER_REGEX = exports.BORDER_PROP_KEYS = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
|
|
6
|
+
exports.BORDER_REGEX = exports.BORDER_PROP_KEYS = exports.BORDER_POSITION_MAP = exports.BORDER_LOGICAL_SIDE_MAP = exports.BORDER_LOGICAL_AXIS_MAP = exports.BORDER_KEYWORD_WIDTH = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
8
|
const BORDER_STYLE_ALTERNATION = Object.values(_enums.BORDER_STYLE).join("|");
|
|
9
9
|
const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
|
|
@@ -33,7 +33,24 @@ const BORDER_LOGICAL_AXIS_MAP = exports.BORDER_LOGICAL_AXIS_MAP = [{
|
|
|
33
33
|
axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
|
|
34
34
|
widthProp: "borderInline"
|
|
35
35
|
}];
|
|
36
|
-
const
|
|
36
|
+
const BORDER_LOGICAL_SIDE_MAP = exports.BORDER_LOGICAL_SIDE_MAP = [{
|
|
37
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
|
|
38
|
+
widthProp: "borderBlockStart",
|
|
39
|
+
colorProp: "borderBlockStartColor"
|
|
40
|
+
}, {
|
|
41
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
|
|
42
|
+
widthProp: "borderBlockEnd",
|
|
43
|
+
colorProp: "borderBlockEndColor"
|
|
44
|
+
}, {
|
|
45
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
|
|
46
|
+
widthProp: "borderInlineStart",
|
|
47
|
+
colorProp: "borderInlineStartColor"
|
|
48
|
+
}, {
|
|
49
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
|
|
50
|
+
widthProp: "borderInlineEnd",
|
|
51
|
+
colorProp: "borderInlineEndColor"
|
|
52
|
+
}];
|
|
53
|
+
const BORDER_PROP_KEYS = exports.BORDER_PROP_KEYS = ["border", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderBlock", "borderInline", "borderBlockStart", "borderBlockEnd", "borderInlineStart", "borderInlineEnd", "borderColor", "borderStyle", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "borderBlockStartColor", "borderBlockEndColor", "borderInlineStartColor", "borderInlineEndColor"];
|
|
37
54
|
const BORDER_KEYWORD_WIDTH = exports.BORDER_KEYWORD_WIDTH = {
|
|
38
55
|
none: "var(--origam-border__width---0)",
|
|
39
56
|
thin: "var(--origam-border__width---thin)",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BLOCK, INLINE } from '../../enums';
|
|
2
2
|
import type { TBorderLogicalAxis, TBorderWidthKeyword } from '../../types/Commons/border.type';
|
|
3
|
+
import type { TLogicalSide } from '../../types/Commons/anchor.type';
|
|
3
4
|
export declare const BORDER_REGEX: RegExp;
|
|
4
5
|
/**
|
|
5
6
|
* Physical-side lookup driving the per-side border wiring (issue #215).
|
|
@@ -37,14 +38,74 @@ export declare const BORDER_POSITION_MAP: readonly [{
|
|
|
37
38
|
* onto the native CSS logical properties `border-block-{width,style,color}`
|
|
38
39
|
* / `border-inline-{width,style,color}` — no physical translation table
|
|
39
40
|
* needed, the browser resolves start/end per the active writing mode.
|
|
40
|
-
* No matching `borderBlockColor` / `borderInlineColor` prop exists
|
|
41
|
-
* per-side color override
|
|
42
|
-
*
|
|
41
|
+
* No matching `borderBlockColor` / `borderInlineColor` prop exists — the
|
|
42
|
+
* per-side color override is defined PER EDGE, not per axis, so an
|
|
43
|
+
* axis-level color prop would be ambiguous about which of its two edges
|
|
44
|
+
* it paints. Hence, unlike `BORDER_POSITION_MAP` and
|
|
45
|
+
* `BORDER_LOGICAL_SIDE_MAP` (both per-EDGE), there is no `colorProp`
|
|
46
|
+
* here.
|
|
47
|
+
*
|
|
48
|
+
* ⚠️ This note used to read "the per-side color override only applies to
|
|
49
|
+
* the 4 physical corners". That was true until #1013, which added the 4
|
|
50
|
+
* LOGICAL per-side color props — per-edge color is now available on both
|
|
51
|
+
* spellings. The reason this map has no `colorProp` was never the
|
|
52
|
+
* physical/logical distinction; it is the axis/edge one, which #1013 does
|
|
53
|
+
* not change.
|
|
43
54
|
*/
|
|
44
55
|
export declare const BORDER_LOGICAL_AXIS_MAP: ReadonlyArray<{
|
|
45
56
|
axis: TBorderLogicalAxis;
|
|
46
57
|
widthProp: 'borderBlock' | 'borderInline';
|
|
47
58
|
}>;
|
|
59
|
+
/*********************************************************
|
|
60
|
+
* BORDER_LOGICAL_SIDE_MAP
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
* Logical-PER-SIDE lookup driving `borderInlineStart` / `borderInlineEnd`
|
|
64
|
+
* / `borderBlockStart` / `borderBlockEnd` and their four `*Color` twins
|
|
65
|
+
* (issue #1013). The third and last of the three directional grids: this
|
|
66
|
+
* map is to `BORDER_LOGICAL_AXIS_MAP` what `BORDER_POSITION_MAP` is to
|
|
67
|
+
* the global `border` shorthand — it narrows an axis to ONE of its two
|
|
68
|
+
* edges.
|
|
69
|
+
*
|
|
70
|
+
* @description
|
|
71
|
+
* ⛔ DELIBERATELY THE SAME SHAPE AS `BORDER_POSITION_MAP`
|
|
72
|
+
* (`{side, widthProp, colorProp}`), because `useBorder` iterates both
|
|
73
|
+
* with the SAME loop body. That body emits
|
|
74
|
+
* `border-${side}-{width,style,color}`, so a `side` of `'inline-start'`
|
|
75
|
+
* produces `border-inline-start-width` / `-style` / `-color` verbatim —
|
|
76
|
+
* the native CSS logical longhands, which the browser maps to the correct
|
|
77
|
+
* physical edge per the active writing mode. This lot is therefore an
|
|
78
|
+
* extension of an existing TABLE, not a new precedence grammar: nothing
|
|
79
|
+
* in the loop body changed to accommodate it.
|
|
80
|
+
*
|
|
81
|
+
* @description
|
|
82
|
+
* WHY LOGICAL PER SIDE AT ALL, given `borderInline` exists. The axis prop
|
|
83
|
+
* paints BOTH edges; there was no way to paint a single writing-mode-
|
|
84
|
+
* relative edge. The only alternative was a PHYSICAL prop
|
|
85
|
+
* (`borderLeft`), which silently breaks RTL — exactly the trap
|
|
86
|
+
* `OrigamBlockquote`'s accent rule avoids by hand-writing
|
|
87
|
+
* `border-inline-start` in its SCSS (#1013's trigger).
|
|
88
|
+
*
|
|
89
|
+
* @description
|
|
90
|
+
* ⚠️ VALUE GRAMMAR IS SHARED WITH THE OTHER TWO GRIDS, LIMITS INCLUDED.
|
|
91
|
+
* String values go through `parseBorderPositionValue` → `BORDER_REGEX`,
|
|
92
|
+
* so these props accept exactly what `borderLeft` / `borderBlock` accept
|
|
93
|
+
* and reject exactly what they reject. Measured 2026-10-01, and NOT
|
|
94
|
+
* introduced by this lot: `"calc(2px + 1px) solid red"` and a FRACTIONAL
|
|
95
|
+
* width such as `"0.5rem solid red"` both fail the regex outright (the
|
|
96
|
+
* width group is `[0-9]+` with no decimal point, and has no `calc()`
|
|
97
|
+
* alternative), so `parseBorderPositionValue` returns `null` and NOTHING
|
|
98
|
+
* is emitted. A tokenised width works only in the `var(--x) <style>`
|
|
99
|
+
* form, and a bare number (`:border-inline-start="4"`) bypasses the regex
|
|
100
|
+
* entirely via `convertToUnit`. Pinned by the "shared grammar limits"
|
|
101
|
+
* tests in `packages/tests/TU/composables/Commons/border-logical-side.spec.ts`
|
|
102
|
+
* so a future regex change has to acknowledge all three grids at once.
|
|
103
|
+
********************************************************/
|
|
104
|
+
export declare const BORDER_LOGICAL_SIDE_MAP: ReadonlyArray<{
|
|
105
|
+
side: TLogicalSide;
|
|
106
|
+
widthProp: 'borderBlockStart' | 'borderBlockEnd' | 'borderInlineStart' | 'borderInlineEnd';
|
|
107
|
+
colorProp: 'borderBlockStartColor' | 'borderBlockEndColor' | 'borderInlineStartColor' | 'borderInlineEndColor';
|
|
108
|
+
}>;
|
|
48
109
|
/*********************************************************
|
|
49
110
|
* BORDER_PROP_KEYS
|
|
50
111
|
*
|
|
@@ -63,7 +124,7 @@ export declare const BORDER_LOGICAL_AXIS_MAP: ReadonlyArray<{
|
|
|
63
124
|
* retyped in four templates, where one forgotten key (`borderBlock`,
|
|
64
125
|
* `borderTopColor`, …) would silently restore the defect for that one value.
|
|
65
126
|
*/
|
|
66
|
-
export declare const BORDER_PROP_KEYS: readonly ["border", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderBlock", "borderInline", "borderColor", "borderStyle", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"];
|
|
127
|
+
export declare const BORDER_PROP_KEYS: readonly ["border", "borderTop", "borderRight", "borderBottom", "borderLeft", "borderBlock", "borderInline", "borderBlockStart", "borderBlockEnd", "borderInlineStart", "borderInlineEnd", "borderColor", "borderStyle", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "borderBlockStartColor", "borderBlockEndColor", "borderInlineStartColor", "borderInlineEndColor"];
|
|
67
128
|
/*********************************************************
|
|
68
129
|
* BORDER_KEYWORD_WIDTH
|
|
69
130
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BLOCK, BORDER_LOGICAL_AXIS, BORDER_STYLE, INLINE } from "../../enums/index.js";
|
|
1
|
+
import { BLOCK, BORDER_LOGICAL_AXIS, BORDER_STYLE, INLINE, START_END } from "../../enums/index.js";
|
|
2
2
|
const BORDER_STYLE_ALTERNATION = Object.values(BORDER_STYLE).join("|");
|
|
3
3
|
const BORDER_LENGTH_UNITS = "(?:px|pt|PC|in|cm|mm|em|rem|%|ex|ch|fr)?";
|
|
4
4
|
const BORDER_COLOR_GROUP = "(?<color>(?: ?(?:(?:(?:#)(?:[a-f0-9]{3}|[a-f0-9]{6}))|(?:var\\(--[^)]+\\))|(?:(?:rgb|hsl|rgba)a?\\(.*\\))|(?:[A-Za-z]+))){0,4})";
|
|
@@ -15,6 +15,12 @@ export const BORDER_LOGICAL_AXIS_MAP = [
|
|
|
15
15
|
{ axis: BORDER_LOGICAL_AXIS.BLOCK, widthProp: "borderBlock" },
|
|
16
16
|
{ axis: BORDER_LOGICAL_AXIS.INLINE, widthProp: "borderInline" }
|
|
17
17
|
];
|
|
18
|
+
export const BORDER_LOGICAL_SIDE_MAP = [
|
|
19
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.START}`, widthProp: "borderBlockStart", colorProp: "borderBlockStartColor" },
|
|
20
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.END}`, widthProp: "borderBlockEnd", colorProp: "borderBlockEndColor" },
|
|
21
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.START}`, widthProp: "borderInlineStart", colorProp: "borderInlineStartColor" },
|
|
22
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.END}`, widthProp: "borderInlineEnd", colorProp: "borderInlineEndColor" }
|
|
23
|
+
];
|
|
18
24
|
export const BORDER_PROP_KEYS = [
|
|
19
25
|
"border",
|
|
20
26
|
"borderTop",
|
|
@@ -23,12 +29,20 @@ export const BORDER_PROP_KEYS = [
|
|
|
23
29
|
"borderLeft",
|
|
24
30
|
"borderBlock",
|
|
25
31
|
"borderInline",
|
|
32
|
+
"borderBlockStart",
|
|
33
|
+
"borderBlockEnd",
|
|
34
|
+
"borderInlineStart",
|
|
35
|
+
"borderInlineEnd",
|
|
26
36
|
"borderColor",
|
|
27
37
|
"borderStyle",
|
|
28
38
|
"borderTopColor",
|
|
29
39
|
"borderRightColor",
|
|
30
40
|
"borderBottomColor",
|
|
31
|
-
"borderLeftColor"
|
|
41
|
+
"borderLeftColor",
|
|
42
|
+
"borderBlockStartColor",
|
|
43
|
+
"borderBlockEndColor",
|
|
44
|
+
"borderInlineStartColor",
|
|
45
|
+
"borderInlineEndColor"
|
|
32
46
|
];
|
|
33
47
|
export const BORDER_KEYWORD_WIDTH = {
|
|
34
48
|
none: "var(--origam-border__width---0)",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.UTILITY_RADIUS_FALLBACK = exports.SPACING_SCALE_STEPS = exports.ROUNDED_CORNER_MAP = exports.PADDING_POSITION_MAP = exports.PADDING_LOGICAL_AXIS_MAP = exports.NAMED_RADIUS_TOKEN = exports.MARGIN_POSITION_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = void 0;
|
|
6
|
+
exports.UTILITY_RADIUS_FALLBACK = exports.SPACING_SCALE_STEPS = exports.ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_CORNER_MAP = exports.PADDING_POSITION_MAP = exports.PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_AXIS_MAP = exports.NAMED_RADIUS_TOKEN = exports.MARGIN_POSITION_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
8
|
const SPACING_SCALE_STEPS = exports.SPACING_SCALE_STEPS = ["0", "1", "2", "3", "4", "5", "6", "8", "10", "12"];
|
|
9
9
|
const PADDING_POSITION_MAP = exports.PADDING_POSITION_MAP = [{
|
|
@@ -26,6 +26,19 @@ const PADDING_LOGICAL_AXIS_MAP = exports.PADDING_LOGICAL_AXIS_MAP = [{
|
|
|
26
26
|
axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
|
|
27
27
|
prop: "paddingInline"
|
|
28
28
|
}];
|
|
29
|
+
const PADDING_LOGICAL_SIDE_MAP = exports.PADDING_LOGICAL_SIDE_MAP = [{
|
|
30
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
|
|
31
|
+
prop: "paddingBlockStart"
|
|
32
|
+
}, {
|
|
33
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
|
|
34
|
+
prop: "paddingBlockEnd"
|
|
35
|
+
}, {
|
|
36
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
|
|
37
|
+
prop: "paddingInlineStart"
|
|
38
|
+
}, {
|
|
39
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
|
|
40
|
+
prop: "paddingInlineEnd"
|
|
41
|
+
}];
|
|
29
42
|
const MARGIN_POSITION_MAP = exports.MARGIN_POSITION_MAP = [{
|
|
30
43
|
side: _enums.BLOCK.TOP,
|
|
31
44
|
prop: "marginTop"
|
|
@@ -46,6 +59,19 @@ const MARGIN_LOGICAL_AXIS_MAP = exports.MARGIN_LOGICAL_AXIS_MAP = [{
|
|
|
46
59
|
axis: _enums.BORDER_LOGICAL_AXIS.INLINE,
|
|
47
60
|
prop: "marginInline"
|
|
48
61
|
}];
|
|
62
|
+
const MARGIN_LOGICAL_SIDE_MAP = exports.MARGIN_LOGICAL_SIDE_MAP = [{
|
|
63
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.START}`,
|
|
64
|
+
prop: "marginBlockStart"
|
|
65
|
+
}, {
|
|
66
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.BLOCK}-${_enums.START_END.END}`,
|
|
67
|
+
prop: "marginBlockEnd"
|
|
68
|
+
}, {
|
|
69
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.START}`,
|
|
70
|
+
prop: "marginInlineStart"
|
|
71
|
+
}, {
|
|
72
|
+
side: `${_enums.BORDER_LOGICAL_AXIS.INLINE}-${_enums.START_END.END}`,
|
|
73
|
+
prop: "marginInlineEnd"
|
|
74
|
+
}];
|
|
49
75
|
const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
|
|
50
76
|
corner: "top-left",
|
|
51
77
|
prop: "roundedTopLeft"
|
|
@@ -59,6 +85,19 @@ const ROUNDED_CORNER_MAP = exports.ROUNDED_CORNER_MAP = [{
|
|
|
59
85
|
corner: "bottom-right",
|
|
60
86
|
prop: "roundedBottomRight"
|
|
61
87
|
}];
|
|
88
|
+
const ROUNDED_LOGICAL_CORNER_MAP = exports.ROUNDED_LOGICAL_CORNER_MAP = [{
|
|
89
|
+
corner: `${_enums.START_END.START}-${_enums.START_END.START}`,
|
|
90
|
+
prop: "roundedStartStart"
|
|
91
|
+
}, {
|
|
92
|
+
corner: `${_enums.START_END.START}-${_enums.START_END.END}`,
|
|
93
|
+
prop: "roundedStartEnd"
|
|
94
|
+
}, {
|
|
95
|
+
corner: `${_enums.START_END.END}-${_enums.START_END.START}`,
|
|
96
|
+
prop: "roundedEndStart"
|
|
97
|
+
}, {
|
|
98
|
+
corner: `${_enums.START_END.END}-${_enums.START_END.END}`,
|
|
99
|
+
prop: "roundedEndEnd"
|
|
100
|
+
}];
|
|
62
101
|
const NAMED_RADIUS_TOKEN = exports.NAMED_RADIUS_TOKEN = {
|
|
63
102
|
"x-small": "var(--origam-radius---xs, 2px)",
|
|
64
103
|
"small": "var(--origam-radius---sm, 4px)",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TDirectionBoth } from '../../types/Commons/anchor.type';
|
|
1
|
+
import type { TDirectionBoth, TLogicalCorner, TLogicalSide } from '../../types/Commons/anchor.type';
|
|
2
2
|
import type { TBorderLogicalAxis } from '../../types/Commons/border.type';
|
|
3
3
|
/**
|
|
4
4
|
* Spacing scale steps mirrored by the global utility classes emitted from
|
|
@@ -45,6 +45,33 @@ export declare const PADDING_LOGICAL_AXIS_MAP: ReadonlyArray<{
|
|
|
45
45
|
axis: TBorderLogicalAxis;
|
|
46
46
|
prop: 'paddingBlock' | 'paddingInline';
|
|
47
47
|
}>;
|
|
48
|
+
/*********************************************************
|
|
49
|
+
* Logical-SIDE lookup driving the `paddingInlineStart` / `paddingInlineEnd`
|
|
50
|
+
* / `paddingBlockStart` / `paddingBlockEnd` wiring (issue #1013).
|
|
51
|
+
*
|
|
52
|
+
* This is the third and last grid of the directional surface. The repo
|
|
53
|
+
* already had PHYSICAL-per-side ({@link PADDING_POSITION_MAP}) and
|
|
54
|
+
* LOGICAL-per-axis ({@link PADDING_LOGICAL_AXIS_MAP}); logical-per-side was
|
|
55
|
+
* the half that stayed empty, which forced a consumer who wanted ONE
|
|
56
|
+
* writing-mode-relative edge to fall back on a physical prop and break RTL.
|
|
57
|
+
*
|
|
58
|
+
* Shape is deliberately identical to the two maps around it, so the SAME
|
|
59
|
+
* `forEach` body serves all three: `padding-${side}` yields
|
|
60
|
+
* `padding-inline-start` from `'inline-start'` exactly as it yields
|
|
61
|
+
* `padding-top` from `'top'`. No new grammar, one extra table.
|
|
62
|
+
*
|
|
63
|
+
* ⚠️ PRECEDENCE — these declarations are pushed AFTER the logical-axis rung
|
|
64
|
+
* and BEFORE the physical-per-side rung, so `paddingInlineStart` beats
|
|
65
|
+
* `paddingInline` (more specific: one edge, not two) while `paddingLeft`
|
|
66
|
+
* still beats `paddingInlineStart`. The tiebreak at that last step is not a
|
|
67
|
+
* specificity call — a physical and a logical longhand for the same edge
|
|
68
|
+
* are equally specific — it keeps "physical wins for the same edge" uniform
|
|
69
|
+
* with the rule {@link ROUNDED_CORNER_MAP} already documents below.
|
|
70
|
+
********************************************************/
|
|
71
|
+
export declare const PADDING_LOGICAL_SIDE_MAP: ReadonlyArray<{
|
|
72
|
+
side: TLogicalSide;
|
|
73
|
+
prop: 'paddingBlockStart' | 'paddingBlockEnd' | 'paddingInlineStart' | 'paddingInlineEnd';
|
|
74
|
+
}>;
|
|
48
75
|
/**
|
|
49
76
|
* Physical-side lookup driving the per-side `margin*` wiring.
|
|
50
77
|
* Same contract as {@link PADDING_POSITION_MAP}, one axis over.
|
|
@@ -61,6 +88,20 @@ export declare const MARGIN_LOGICAL_AXIS_MAP: ReadonlyArray<{
|
|
|
61
88
|
axis: TBorderLogicalAxis;
|
|
62
89
|
prop: 'marginBlock' | 'marginInline';
|
|
63
90
|
}>;
|
|
91
|
+
/*********************************************************
|
|
92
|
+
* Logical-SIDE lookup driving the `marginInlineStart` / `marginInlineEnd` /
|
|
93
|
+
* `marginBlockStart` / `marginBlockEnd` wiring (issue #1013).
|
|
94
|
+
* Same contract and same precedence rank as
|
|
95
|
+
* {@link PADDING_LOGICAL_SIDE_MAP}, one axis over.
|
|
96
|
+
*
|
|
97
|
+
* These four also accept the `auto` keyword, like their physical twins —
|
|
98
|
+
* `marginInlineStart="auto"` is the RTL-safe way to push a flex child to
|
|
99
|
+
* the far end, which `marginLeft="auto"` gets wrong under RTL.
|
|
100
|
+
********************************************************/
|
|
101
|
+
export declare const MARGIN_LOGICAL_SIDE_MAP: ReadonlyArray<{
|
|
102
|
+
side: TLogicalSide;
|
|
103
|
+
prop: 'marginBlockStart' | 'marginBlockEnd' | 'marginInlineStart' | 'marginInlineEnd';
|
|
104
|
+
}>;
|
|
64
105
|
/**
|
|
65
106
|
* Per-corner lookup driving the `rounded{Corner}` wiring.
|
|
66
107
|
*
|
|
@@ -77,6 +118,32 @@ export declare const ROUNDED_CORNER_MAP: ReadonlyArray<{
|
|
|
77
118
|
corner: string;
|
|
78
119
|
prop: 'roundedTopLeft' | 'roundedTopRight' | 'roundedBottomLeft' | 'roundedBottomRight';
|
|
79
120
|
}>;
|
|
121
|
+
/*********************************************************
|
|
122
|
+
* Logical-CORNER lookup driving the `roundedStartStart` / `roundedStartEnd`
|
|
123
|
+
* / `roundedEndStart` / `roundedEndEnd` wiring (issue #1013).
|
|
124
|
+
*
|
|
125
|
+
* Emits the native LOGICAL corner longhands
|
|
126
|
+
* (`border-start-start-radius`, …) — the same family the 4-value `rounded`
|
|
127
|
+
* shorthand already emits through `formatRoundedStylesVar`, so these four
|
|
128
|
+
* props address exactly one of its corners instead of all four.
|
|
129
|
+
*
|
|
130
|
+
* ⚠️ CORNER NAME ORDER IS `{block}-{inline}`, per CSS: `start-start` is the
|
|
131
|
+
* block-start inline-start corner (top-left in LTR horizontal-tb),
|
|
132
|
+
* `start-end` is block-start inline-end (top-right in LTR). It is NOT the
|
|
133
|
+
* physical clockwise order, and it is NOT axis-agnostic — swapping the two
|
|
134
|
+
* halves silently addresses the opposite corner.
|
|
135
|
+
*
|
|
136
|
+
* ⚠️ PRECEDENCE — pushed AFTER the `rounded` shorthand and BEFORE
|
|
137
|
+
* {@link ROUNDED_CORNER_MAP}'s physical declarations, so a logical corner
|
|
138
|
+
* beats the shorthand (more specific: one corner, not four) and a physical
|
|
139
|
+
* corner still beats a logical one for the same corner. That last step is
|
|
140
|
+
* the rule the paragraph above already states for the shorthand, applied
|
|
141
|
+
* one rung down; see `useRounded`'s precedence table.
|
|
142
|
+
********************************************************/
|
|
143
|
+
export declare const ROUNDED_LOGICAL_CORNER_MAP: ReadonlyArray<{
|
|
144
|
+
corner: TLogicalCorner;
|
|
145
|
+
prop: 'roundedStartStart' | 'roundedStartEnd' | 'roundedEndStart' | 'roundedEndEnd';
|
|
146
|
+
}>;
|
|
80
147
|
/**
|
|
81
148
|
* Named radius variant → primitive radius token.
|
|
82
149
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BLOCK, BORDER_LOGICAL_AXIS, INLINE } from "../../enums/index.js";
|
|
1
|
+
import { BLOCK, BORDER_LOGICAL_AXIS, INLINE, START_END } from "../../enums/index.js";
|
|
2
2
|
export const SPACING_SCALE_STEPS = [
|
|
3
3
|
"0",
|
|
4
4
|
"1",
|
|
@@ -21,6 +21,12 @@ export const PADDING_LOGICAL_AXIS_MAP = [
|
|
|
21
21
|
{ axis: BORDER_LOGICAL_AXIS.BLOCK, prop: "paddingBlock" },
|
|
22
22
|
{ axis: BORDER_LOGICAL_AXIS.INLINE, prop: "paddingInline" }
|
|
23
23
|
];
|
|
24
|
+
export const PADDING_LOGICAL_SIDE_MAP = [
|
|
25
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.START}`, prop: "paddingBlockStart" },
|
|
26
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.END}`, prop: "paddingBlockEnd" },
|
|
27
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.START}`, prop: "paddingInlineStart" },
|
|
28
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.END}`, prop: "paddingInlineEnd" }
|
|
29
|
+
];
|
|
24
30
|
export const MARGIN_POSITION_MAP = [
|
|
25
31
|
{ side: BLOCK.TOP, prop: "marginTop" },
|
|
26
32
|
{ side: INLINE.RIGHT, prop: "marginRight" },
|
|
@@ -31,12 +37,24 @@ export const MARGIN_LOGICAL_AXIS_MAP = [
|
|
|
31
37
|
{ axis: BORDER_LOGICAL_AXIS.BLOCK, prop: "marginBlock" },
|
|
32
38
|
{ axis: BORDER_LOGICAL_AXIS.INLINE, prop: "marginInline" }
|
|
33
39
|
];
|
|
40
|
+
export const MARGIN_LOGICAL_SIDE_MAP = [
|
|
41
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.START}`, prop: "marginBlockStart" },
|
|
42
|
+
{ side: `${BORDER_LOGICAL_AXIS.BLOCK}-${START_END.END}`, prop: "marginBlockEnd" },
|
|
43
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.START}`, prop: "marginInlineStart" },
|
|
44
|
+
{ side: `${BORDER_LOGICAL_AXIS.INLINE}-${START_END.END}`, prop: "marginInlineEnd" }
|
|
45
|
+
];
|
|
34
46
|
export const ROUNDED_CORNER_MAP = [
|
|
35
47
|
{ corner: "top-left", prop: "roundedTopLeft" },
|
|
36
48
|
{ corner: "top-right", prop: "roundedTopRight" },
|
|
37
49
|
{ corner: "bottom-left", prop: "roundedBottomLeft" },
|
|
38
50
|
{ corner: "bottom-right", prop: "roundedBottomRight" }
|
|
39
51
|
];
|
|
52
|
+
export const ROUNDED_LOGICAL_CORNER_MAP = [
|
|
53
|
+
{ corner: `${START_END.START}-${START_END.START}`, prop: "roundedStartStart" },
|
|
54
|
+
{ corner: `${START_END.START}-${START_END.END}`, prop: "roundedStartEnd" },
|
|
55
|
+
{ corner: `${START_END.END}-${START_END.START}`, prop: "roundedEndStart" },
|
|
56
|
+
{ corner: `${START_END.END}-${START_END.END}`, prop: "roundedEndEnd" }
|
|
57
|
+
];
|
|
40
58
|
export const NAMED_RADIUS_TOKEN = {
|
|
41
59
|
"x-small": "var(--origam-radius---xs, 2px)",
|
|
42
60
|
"small": "var(--origam-radius---sm, 4px)",
|
|
@@ -4,5 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VARIANT_PROP_KEY = exports.VARIANT_PRESETS = void 0;
|
|
7
|
+
var _kbd = require("../Kbd/kbd.const.cjs");
|
|
7
8
|
const VARIANT_PROP_KEY = exports.VARIANT_PROP_KEY = "variant";
|
|
8
|
-
const VARIANT_PRESETS = exports.VARIANT_PRESETS = {
|
|
9
|
+
const VARIANT_PRESETS = exports.VARIANT_PRESETS = {
|
|
10
|
+
"origam-kbd": _kbd.KBD_VARIANT_PRESETS
|
|
11
|
+
};
|
|
@@ -25,20 +25,23 @@ export declare const VARIANT_PROP_KEY = "variant";
|
|
|
25
25
|
* constitue pas.
|
|
26
26
|
*
|
|
27
27
|
* @description
|
|
28
|
-
* ⛔
|
|
28
|
+
* ⛔ UN SEUL COMPOSANT CONVERTI A CE JOUR — `OrigamKbd`, lot 2. Le lot 1
|
|
29
29
|
* d'ADR-005 livre le MECANISME (type partage, rang dans le resolveur,
|
|
30
|
-
* canal `theme.variants`) et aucune conversion
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @description
|
|
35
|
-
* - `OrigamKbd` —
|
|
36
|
-
* `key-surface` consomme sur la racine ET sur les
|
|
37
|
-
* (`&--variant-outlined &__key`).
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
30
|
+
* canal `theme.variants`) et aucune conversion : chaque composant arrive
|
|
31
|
+
* avec son propre lot, parce qu'aucun ne se convertit mecaniquement.
|
|
32
|
+
* Mesure a l'appui (2026-09-30), la taxonomie « famille A » de D5 est
|
|
33
|
+
* optimiste sur trois des quatre composants qu'elle liste :
|
|
34
|
+
* @description
|
|
35
|
+
* - `OrigamKbd` — FAIT (lot 2). Ses regles de variant posaient des
|
|
36
|
+
* PROPRIETES CUSTOM que `key-surface` consomme sur la racine ET sur les
|
|
37
|
+
* descendants `__key` (`&--variant-outlined &__key`). Resolu en rendant
|
|
38
|
+
* explicite ce que la CSS supposait : la surface peinte est la RACINE en
|
|
39
|
+
* forme simple et chaque `__key` en forme combinaison — les deux ne
|
|
40
|
+
* coexistent jamais — donc le composant lie les declarations de surface
|
|
41
|
+
* a cet element-la, et a lui seul. Le second point, la declaration de
|
|
42
|
+
* `key-surface` a (0,2,0) contre une classe utilitaire a (0,1,0), tombe
|
|
43
|
+
* de lui-meme : un preset porte une chaine `var(…)`, qu'`isCssColor`
|
|
44
|
+
* route vers le canal INLINE, lequel passe devant la regle scopee.
|
|
42
45
|
* - `OrigamBtnGroup` — recopie `--origam-btn-group---border-width` dans
|
|
43
46
|
* une propriete custom qui alimente un `calc()` de rayon interieur.
|
|
44
47
|
* Inexprimable en prop de racine.
|
|
@@ -56,5 +59,11 @@ export declare const VARIANT_PROP_KEY = "variant";
|
|
|
56
59
|
* theme de marque ne touche un seul token `origam-kbd` (verifie, zero
|
|
57
60
|
* occurrence sur les 8 themes), donc le zero-changement y est prouvable en
|
|
58
61
|
* isolation. `OrigamBtn` vient au lot 4.
|
|
62
|
+
*
|
|
63
|
+
* @description
|
|
64
|
+
* La mesure d'acceptation se rejoue :
|
|
65
|
+
* `pnpm -F @origam/tests audit:kbd-preset -- --json <fichier>`, puis
|
|
66
|
+
* `-- --compare <avant> <apres>`. Elle monte le composant sous les 8
|
|
67
|
+
* identites x 2 modes et lit chaque surface peinte, `__key` compris.
|
|
59
68
|
********************************************************/
|
|
60
69
|
export declare const VARIANT_PRESETS: TVariantPresetRegistry;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.KBD_VARIANT_PRESETS = void 0;
|
|
7
|
+
const KBD_VARIANT_PRESETS = exports.KBD_VARIANT_PRESETS = {
|
|
8
|
+
outlined: {
|
|
9
|
+
bgColor: "var(--origam-kbd--outlined---background-color, var(--origam-color__surface---raised, #fff))",
|
|
10
|
+
elevation: "0 1px 0 0 color-mix(in srgb, currentColor 12%, transparent), inset 0 1px 0 0 color-mix(in srgb, white 50%, transparent)"
|
|
11
|
+
},
|
|
12
|
+
filled: {
|
|
13
|
+
bgColor: "var(--origam-kbd__filled---background-color, var(--origam-color__surface---overlay, #f5f5f5))",
|
|
14
|
+
elevation: "0 1px 2px 0 color-mix(in srgb, currentColor 18%, transparent), inset 0 1px 0 0 color-mix(in srgb, white 60%, transparent)"
|
|
15
|
+
},
|
|
16
|
+
tonal: {
|
|
17
|
+
bgColor: "var(--origam-kbd__tonal---background-color, color-mix(in srgb, currentColor 8%, transparent))",
|
|
18
|
+
border: "none",
|
|
19
|
+
borderColor: "transparent",
|
|
20
|
+
elevation: "none"
|
|
21
|
+
}
|
|
22
|
+
};
|