origam 2.19.0 → 2.21.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 +118 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +0 -16
- package/dist/src/assets/css/tokens/light.css +0 -8
- package/dist/src/assets/scss/tokens/_dark.scss +0 -16
- package/dist/src/assets/scss/tokens/_light.scss +0 -8
- 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 +35 -65
- 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 +12 -0
- 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/Blockquote/blockquote.const.cjs +38 -1
- package/dist/src/consts/Blockquote/blockquote.const.d.ts +113 -0
- package/dist/src/consts/Blockquote/blockquote.const.js +37 -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 +2 -0
- package/dist/src/consts/Commons/variant-preset.const.d.ts +19 -8
- package/dist/src/consts/Commons/variant-preset.const.js +2 -0
- package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +59 -4
- 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/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.QUOTE_MARKS_BY_LANG = exports.BLOCKQUOTE_VARIANTS = exports.BLOCKQUOTE_LANGS = exports.BLOCKQUOTE_DEFAULTS = exports.BLOCKQUOTE_ALIGNS = void 0;
|
|
6
|
+
exports.QUOTE_MARKS_BY_LANG = exports.BLOCKQUOTE_VARIANT_PRESETS = exports.BLOCKQUOTE_VARIANTS = exports.BLOCKQUOTE_LANGS = exports.BLOCKQUOTE_DEFAULTS = exports.BLOCKQUOTE_ALIGNS = void 0;
|
|
7
7
|
var _enums = require("../../enums/index.cjs");
|
|
8
8
|
const BLOCKQUOTE_VARIANTS = exports.BLOCKQUOTE_VARIANTS = Object.values(_enums.BLOCKQUOTE_VARIANT);
|
|
9
9
|
const BLOCKQUOTE_LANGS = exports.BLOCKQUOTE_LANGS = Object.values(_enums.BLOCKQUOTE_LANG);
|
|
@@ -29,5 +29,42 @@ const QUOTE_MARKS_BY_LANG = exports.QUOTE_MARKS_BY_LANG = {
|
|
|
29
29
|
const BLOCKQUOTE_DEFAULTS = exports.BLOCKQUOTE_DEFAULTS = {
|
|
30
30
|
variant: "default",
|
|
31
31
|
lang: "auto",
|
|
32
|
+
align: "left",
|
|
32
33
|
tag: "blockquote"
|
|
34
|
+
};
|
|
35
|
+
const BLOCKQUOTE_VARIANT_PRESETS = exports.BLOCKQUOTE_VARIANT_PRESETS = {
|
|
36
|
+
default: {
|
|
37
|
+
borderInlineStart: "var(--origam-blockquote__accent---width, 4px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
38
|
+
paddingInlineStart: "calc(var(--origam-blockquote---padding-inline, 24px) + var(--origam-blockquote__accent---width, 4px))"
|
|
39
|
+
},
|
|
40
|
+
elegant: {
|
|
41
|
+
fontFamily: "serif",
|
|
42
|
+
fontSize: "xl",
|
|
43
|
+
fontStyle: "var(--origam-blockquote__elegant---font-style, italic)",
|
|
44
|
+
lineHeight: "loose",
|
|
45
|
+
paddingBlock: "var(--origam-blockquote__elegant---padding-block, 24px)",
|
|
46
|
+
borderInlineStart: "var(--origam-blockquote__accent---width, 4px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
47
|
+
paddingInlineStart: "calc(var(--origam-blockquote---padding-inline, 24px) + var(--origam-blockquote__accent---width, 4px))"
|
|
48
|
+
},
|
|
49
|
+
quoted: {
|
|
50
|
+
quoteMark: true,
|
|
51
|
+
paddingTop: "calc(var(--origam-blockquote---padding-block, 16px) + var(--origam-blockquote--quoted---glyph-padding-extra, 1rem))"
|
|
52
|
+
},
|
|
53
|
+
minimal: {
|
|
54
|
+
fontSize: "md",
|
|
55
|
+
fontStyle: "var(--origam-blockquote__minimal---font-style, italic)",
|
|
56
|
+
paddingBlock: 0,
|
|
57
|
+
paddingInline: "var(--origam-blockquote__minimal---padding-inline, 12px)",
|
|
58
|
+
borderInlineStart: "var(--origam-blockquote--minimal---accent-width, 2px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
59
|
+
paddingInlineStart: "calc(var(--origam-blockquote__minimal---padding-inline, 12px) + var(--origam-blockquote--minimal---accent-width, 2px))"
|
|
60
|
+
},
|
|
61
|
+
pull: {
|
|
62
|
+
fontFamily: "serif",
|
|
63
|
+
fontSize: "3xl",
|
|
64
|
+
fontWeight: "medium",
|
|
65
|
+
lineHeight: "snug",
|
|
66
|
+
align: "center",
|
|
67
|
+
paddingBlock: "var(--origam-blockquote__pull---padding-block, 24px)",
|
|
68
|
+
borderBlock: "var(--origam-blockquote__pull---rule-width, 2px) solid var(--origam-blockquote---resolved-accent-color, currentColor)"
|
|
69
|
+
}
|
|
33
70
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { IBlockquoteProps } from '../../interfaces/Blockquote/blockquote.interface';
|
|
1
2
|
import type { TBlockquoteAlign, TBlockquoteLang, TBlockquoteVariant } from '../../types/Blockquote/blockquote.type';
|
|
3
|
+
import type { TVariantPresets } from '../../types/Commons/variant-preset.type';
|
|
2
4
|
/**
|
|
3
5
|
* Closed list of valid `variant` values for `<OrigamBlockquote>`.
|
|
4
6
|
* Exposed so stories / consumers can iterate the matrix without
|
|
@@ -33,5 +35,116 @@ export declare const QUOTE_MARKS_BY_LANG: Record<Exclude<TBlockquoteLang, 'auto'
|
|
|
33
35
|
export declare const BLOCKQUOTE_DEFAULTS: {
|
|
34
36
|
readonly variant: TBlockquoteVariant;
|
|
35
37
|
readonly lang: TBlockquoteLang;
|
|
38
|
+
readonly align: TBlockquoteAlign;
|
|
36
39
|
readonly tag: "blockquote";
|
|
37
40
|
};
|
|
41
|
+
/*********************************************************
|
|
42
|
+
* BLOCKQUOTE_VARIANT_PRESETS
|
|
43
|
+
*
|
|
44
|
+
* @description
|
|
45
|
+
* ADR-005 D7, lot #1015 — le deuxieme composant converti, apres le pilote
|
|
46
|
+
* `OrigamKbd`. Un variant de Blockquote n'est plus un bloc SCSS : c'est ce
|
|
47
|
+
* sac de props, resolu au rang le plus faible de la chaine (prop du site
|
|
48
|
+
* d'appel > defaut de theme > PRESET > `withDefaults`).
|
|
49
|
+
*
|
|
50
|
+
* @description
|
|
51
|
+
* ⛔ CE QUE LA CONVERSION REPARE, ET C'EST SA JUSTIFICATION. Les regles
|
|
52
|
+
* `--variant-elegant` / `--variant-minimal` / `--variant-pull` declaraient
|
|
53
|
+
* `font-size` / `font-family` / `font-weight` / `line-height`
|
|
54
|
+
* DIRECTEMENT, a specificite (0,2,0) — identique a celle de la regle de
|
|
55
|
+
* base — et plus loin dans l'ordre source. Or `useTypography` n'ecrit pas
|
|
56
|
+
* ces proprietes : il ecrit la propriete custom
|
|
57
|
+
* `--origam-blockquote---{propriete}` que la regle de base consomme via
|
|
58
|
+
* `--resolved-{propriete}`. Les cinq props typographiques etaient donc
|
|
59
|
+
* VIVANTES sur `default` et `quoted` et MORTES sur les trois autres, sans
|
|
60
|
+
* aucun diagnostic — alors que la story exposait les cinq controles et que
|
|
61
|
+
* la doc les documentait.
|
|
62
|
+
* @description
|
|
63
|
+
* Verdict navigateur, chromium, Histoire statique, lot #1015 :
|
|
64
|
+
* `variant="elegant" font-size="sm"` rendait **18px**, exactement comme
|
|
65
|
+
* `variant="elegant"` nu. Apres conversion la prop gagne. C'est l'une des
|
|
66
|
+
* deux assertions ROUGE-avant / VERT-apres de `e2e/blockquote.spec.ts`.
|
|
67
|
+
*
|
|
68
|
+
* @description
|
|
69
|
+
* ⛔ CHAQUE VALEUR PORTE LA CHAINE `var()` QUE LA REGLE PORTAIT, partout ou
|
|
70
|
+
* le canal peut la transporter. `resolveSpacingValue` rend verbatim toute
|
|
71
|
+
* valeur qui n'est pas un echelon de l'echelle, et
|
|
72
|
+
* `parseBorderPositionValue` prend `match.width` EN ENTIER — donc les
|
|
73
|
+
* `calc()` et les largeurs `var(--…, repli)` voyagent telles quelles, et le
|
|
74
|
+
* canal d'override des themes survit.
|
|
75
|
+
*
|
|
76
|
+
* @description
|
|
77
|
+
* ⛔ LES CINQ VALEURS TYPOGRAPHIQUES SONT L'EXCEPTION, ET ELLE EST
|
|
78
|
+
* STRUCTURELLE. `useTypography` n'a AUCUNE echappatoire pour une valeur
|
|
79
|
+
* custom (`typography.composable.ts:210-216`) : il enveloppe toujours en
|
|
80
|
+
* `var(--origam-font__{groupe}---{valeur})`. Poser
|
|
81
|
+
* `fontSize: 'var(--origam-blockquote__elegant---font-size, 1.125rem)'`
|
|
82
|
+
* produirait le nom imbrique
|
|
83
|
+
* `var(--origam-font__size---var(--origam-blockquote__elegant---font-size, 1.125rem))`,
|
|
84
|
+
* qu'aucune feuille ne declare, et la declaration serait jetee. La ruse du
|
|
85
|
+
* pilote Kbd est donc indisponible ici — c'est **#1018**, ouvert, et il
|
|
86
|
+
* n'est PAS corrige dans ce lot. Seul `fontStyle` echappe, via
|
|
87
|
+
* `TYPOGRAPHY_PASSTHROUGH_MAP`, et son preset porte donc bien la chaine.
|
|
88
|
+
* @description
|
|
89
|
+
* Le cout de cette exception est NUL, et c'est mesure, pas suppose : chacun
|
|
90
|
+
* des 8 tokens concernes etait un ALIAS byte-pour-byte de l'echelon
|
|
91
|
+
* semantique que le preset pose a sa place (`__elegant---font-size:
|
|
92
|
+
* var(--origam-font__size---xl)` -> `fontSize: 'xl'`, et ainsi de suite),
|
|
93
|
+
* et aucun des 8 themes n'en lisait un seul. Les 8 tokens sortent donc des
|
|
94
|
+
* 4 feuilles et de `tokens.type.ts`, ce que `token-var-channels` prescrit
|
|
95
|
+
* lui-meme pour un token que plus rien ne lit.
|
|
96
|
+
*
|
|
97
|
+
* @description
|
|
98
|
+
* ⛔ CE QUE LA TABLE NE POSE PAS EST AUSSI IMPORTANT QUE CE QU'ELLE POSE.
|
|
99
|
+
* `pull` declarait `padding-inline:
|
|
100
|
+
* var(--origam-blockquote---resolved-padding-inline)` — une REDONDANCE avec
|
|
101
|
+
* la regle de base, qui pose exactement la meme valeur. L'inscrire ici
|
|
102
|
+
* emettrait une declaration INLINE, qui passerait devant la classe
|
|
103
|
+
* utilitaire qu'un `padding` du consommateur produit : la table
|
|
104
|
+
* confisquerait le canal qu'elle est censee servir. Valeur calculee
|
|
105
|
+
* identique des deux cotes tant qu'aucun `padding` n'est passe ; quand il
|
|
106
|
+
* l'est, l'axe inline de `pull` lui OBEIT desormais, ce qui va dans le sens
|
|
107
|
+
* du lot.
|
|
108
|
+
*
|
|
109
|
+
* @description
|
|
110
|
+
* ⛔ LES INDIRECTIONS `---resolved-*` NE SORTENT PAS D'ICI quand le token
|
|
111
|
+
* PUBLIC suffit. Les regles supprimees lisaient
|
|
112
|
+
* `var(--origam-blockquote---resolved-padding-inline)` et
|
|
113
|
+
* `var(--origam-blockquote---resolved-padding-block)`, deux proprietes
|
|
114
|
+
* custom que le bloc `<style scoped>` du composant synthetise lui-meme
|
|
115
|
+
* (`OrigamBlockquote.vue`, regle `.origam-blockquote`) et qu'AUCUNE feuille
|
|
116
|
+
* ne declare. Le preset nomme donc directement le token public que ces
|
|
117
|
+
* indirections resolvent — `--origam-blockquote---padding-inline, 24px` et
|
|
118
|
+
* `---padding-block, 16px` — ce qui est strictement equivalent par
|
|
119
|
+
* substitution (verifie : une seule declaration de chacune des deux
|
|
120
|
+
* indirections dans tout `packages/ds/src`, aucun modificateur ne les
|
|
121
|
+
* redeclare) et met le preset sur le canal de theme PUBLIC plutot que sur
|
|
122
|
+
* un detail interne. Le garde `ts-token-refs` cesse par la meme de
|
|
123
|
+
* rougir sur deux des quatre noms.
|
|
124
|
+
* @description
|
|
125
|
+
* ⚠️ `--origam-blockquote---resolved-accent-color` ne PEUT PAS subir le
|
|
126
|
+
* meme traitement, et c'est la seule entree de baseline que ce lot ajoute :
|
|
127
|
+
* les huit modificateurs `.origam-blockquote--accent-{intent}` REDECLARENT
|
|
128
|
+
* cette indirection. Nommer le token sous-jacent
|
|
129
|
+
* (`--origam-blockquote__accent---color`) rendrait `accent-color="primary"`
|
|
130
|
+
* inoperant sur le filet — une regression reelle. L'indirection est le
|
|
131
|
+
* mecanisme meme de l'axe `accentColor`, donc elle reste, avec un repli
|
|
132
|
+
* `currentColor` plat. ⛔ Un repli IMBRIQUE est exclu : le groupe `color`
|
|
133
|
+
* de `BORDER_REGEX` s'arrete a la premiere parenthese fermante, donc une
|
|
134
|
+
* valeur a repli imbrique ne matche pas DU TOUT et rien ne serait emis.
|
|
135
|
+
*
|
|
136
|
+
* @description
|
|
137
|
+
* ⚠️ `--origam-blockquote--minimal---accent-width` n'est declare par AUCUNE
|
|
138
|
+
* feuille — grammaire divergente, double tiret la ou le reste du composant
|
|
139
|
+
* ecrit `__`. `minimal` tombe donc toujours sur son repli `2px`. Le preset
|
|
140
|
+
* porte la chaine TELLE QUELLE : la fidelite est le travail, pas la
|
|
141
|
+
* correction. C'est **#1014**, et il n'est PAS corrige ici.
|
|
142
|
+
*
|
|
143
|
+
* @description
|
|
144
|
+
* ⚠️ `quoteMark` et `align` sont les deux moities « famille B » de ce
|
|
145
|
+
* composant — un element monte et un defaut d'alignement. D7 exige qu'elles
|
|
146
|
+
* passent par une prop COMPORTEMENTALE et que l'exemption soit documentee
|
|
147
|
+
* SUR la prop : voir leurs JSDoc dans
|
|
148
|
+
* `interfaces/Blockquote/blockquote.interface.ts`.
|
|
149
|
+
********************************************************/
|
|
150
|
+
export declare const BLOCKQUOTE_VARIANT_PRESETS: TVariantPresets<TBlockquoteVariant, IBlockquoteProps>;
|
|
@@ -15,5 +15,42 @@ export const QUOTE_MARKS_BY_LANG = {
|
|
|
15
15
|
export const BLOCKQUOTE_DEFAULTS = {
|
|
16
16
|
variant: "default",
|
|
17
17
|
lang: "auto",
|
|
18
|
+
align: "left",
|
|
18
19
|
tag: "blockquote"
|
|
19
20
|
};
|
|
21
|
+
export const BLOCKQUOTE_VARIANT_PRESETS = {
|
|
22
|
+
default: {
|
|
23
|
+
borderInlineStart: "var(--origam-blockquote__accent---width, 4px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
24
|
+
paddingInlineStart: "calc(var(--origam-blockquote---padding-inline, 24px) + var(--origam-blockquote__accent---width, 4px))"
|
|
25
|
+
},
|
|
26
|
+
elegant: {
|
|
27
|
+
fontFamily: "serif",
|
|
28
|
+
fontSize: "xl",
|
|
29
|
+
fontStyle: "var(--origam-blockquote__elegant---font-style, italic)",
|
|
30
|
+
lineHeight: "loose",
|
|
31
|
+
paddingBlock: "var(--origam-blockquote__elegant---padding-block, 24px)",
|
|
32
|
+
borderInlineStart: "var(--origam-blockquote__accent---width, 4px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
33
|
+
paddingInlineStart: "calc(var(--origam-blockquote---padding-inline, 24px) + var(--origam-blockquote__accent---width, 4px))"
|
|
34
|
+
},
|
|
35
|
+
quoted: {
|
|
36
|
+
quoteMark: true,
|
|
37
|
+
paddingTop: "calc(var(--origam-blockquote---padding-block, 16px) + var(--origam-blockquote--quoted---glyph-padding-extra, 1rem))"
|
|
38
|
+
},
|
|
39
|
+
minimal: {
|
|
40
|
+
fontSize: "md",
|
|
41
|
+
fontStyle: "var(--origam-blockquote__minimal---font-style, italic)",
|
|
42
|
+
paddingBlock: 0,
|
|
43
|
+
paddingInline: "var(--origam-blockquote__minimal---padding-inline, 12px)",
|
|
44
|
+
borderInlineStart: "var(--origam-blockquote--minimal---accent-width, 2px) solid var(--origam-blockquote---resolved-accent-color, currentColor)",
|
|
45
|
+
paddingInlineStart: "calc(var(--origam-blockquote__minimal---padding-inline, 12px) + var(--origam-blockquote--minimal---accent-width, 2px))"
|
|
46
|
+
},
|
|
47
|
+
pull: {
|
|
48
|
+
fontFamily: "serif",
|
|
49
|
+
fontSize: "3xl",
|
|
50
|
+
fontWeight: "medium",
|
|
51
|
+
lineHeight: "snug",
|
|
52
|
+
align: "center",
|
|
53
|
+
paddingBlock: "var(--origam-blockquote__pull---padding-block, 24px)",
|
|
54
|
+
borderBlock: "var(--origam-blockquote__pull---rule-width, 2px) solid var(--origam-blockquote---resolved-accent-color, currentColor)"
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -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
|
*
|