origam 2.19.0 → 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 +73 -0
- 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 +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/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/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/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
|
@@ -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)",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IActiveEmits, IActiveProps } from '../Commons/active.interface';
|
|
2
2
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TBracketBorderProps } from '../../types/Bracket/bracket.type';
|
|
4
4
|
import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.interface';
|
|
5
5
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
6
6
|
import type { IDimensionProps } from '../Commons/dimension.interface';
|
|
@@ -20,7 +20,7 @@ import type { IBracketMatch } from './bracket-match.interface';
|
|
|
20
20
|
* border, density, dimension, padding, margin) so a standalone card
|
|
21
21
|
* behaves like any other origam component.
|
|
22
22
|
*/
|
|
23
|
-
export interface IBracketMatchProps extends ICommonsComponentProps, ITagProps, IColorProps, IBgColorProps, IHoverProps, IActiveProps, IRoundedProps, IElevationProps,
|
|
23
|
+
export interface IBracketMatchProps extends ICommonsComponentProps, ITagProps, IColorProps, IBgColorProps, IHoverProps, IActiveProps, IRoundedProps, IElevationProps, TBracketBorderProps, IDensityProps, IDimensionProps, IPaddingProps, IMarginProps {
|
|
24
24
|
/** The match payload to render. */
|
|
25
25
|
match: IBracketMatch;
|
|
26
26
|
/**
|
|
@@ -53,4 +53,43 @@ export interface IBracketSurfaceInput {
|
|
|
53
53
|
borderRightColor?: TBracketColor;
|
|
54
54
|
borderBottomColor?: TBracketColor;
|
|
55
55
|
borderLeftColor?: TBracketColor;
|
|
56
|
+
/*********************************************************
|
|
57
|
+
* LES DEUX ARETES LOGIQUES DE BLOC — ET POURQUOI PAS LES INLINE
|
|
58
|
+
*
|
|
59
|
+
* @description
|
|
60
|
+
* `borderBlockStart` / `borderBlockEnd` (+ `*Color`), issue #1013. Ce
|
|
61
|
+
* sont les SEULES des quatre aretes logiques que cette couche peut
|
|
62
|
+
* honorer, et l'asymetrie est mesuree, pas arbitraire.
|
|
63
|
+
*
|
|
64
|
+
* @description
|
|
65
|
+
* Cette couche peint via des custom properties
|
|
66
|
+
* `--origam-bracket-match---*` que la SCSS d'`OrigamBracketMatch` lit
|
|
67
|
+
* dans des declarations PHYSIQUES. Mapper une arete logique sur une
|
|
68
|
+
* arete physique a l'ecriture de la feuille demande donc de connaitre
|
|
69
|
+
* le mode d'ecriture.
|
|
70
|
+
* @description
|
|
71
|
+
* • AXE DE BLOC — `block-start` vaut `top` et `block-end` vaut `bottom`
|
|
72
|
+
* en `horizontal-tb`, invariablement. Bracket ne declare jamais
|
|
73
|
+
* `writing-mode` (verifie : 0 occurrence) et sa feuille fait DEJA
|
|
74
|
+
* cette hypothese pour `borderBlock`, dont la var alimente
|
|
75
|
+
* `border-top-width` et `border-bottom-width`. Ces deux aretes
|
|
76
|
+
* n'ajoutent donc aucune hypothese nouvelle.
|
|
77
|
+
* @description
|
|
78
|
+
* • AXE INLINE — `inline-start` vaut `left` en LTR mais `right` en RTL.
|
|
79
|
+
* Aucune chaine de repli ne peut exprimer ca : la substitution
|
|
80
|
+
* `var()` est aveugle au mode d'ecriture alors que le mapping de la
|
|
81
|
+
* propriete ne l'est pas. Les 4 props inline sont donc RETIREES de la
|
|
82
|
+
* surface de Bracket par `Omit<>` (`bracket.interface.ts`) plutot que
|
|
83
|
+
* declarees et ignorees — une prop typee et inerte est pire qu'une
|
|
84
|
+
* prop absente.
|
|
85
|
+
*
|
|
86
|
+
* @description
|
|
87
|
+
* La completude de Bracket sur l'axe inline part dans son propre
|
|
88
|
+
* ticket ; elle demande de convertir la cascade en longhands logiques,
|
|
89
|
+
* ce qui change le comportement RTL des props physiques existantes.
|
|
90
|
+
********************************************************/
|
|
91
|
+
borderBlockStart?: TBracketBorder;
|
|
92
|
+
borderBlockEnd?: TBracketBorder;
|
|
93
|
+
borderBlockStartColor?: TBracketColor;
|
|
94
|
+
borderBlockEndColor?: TBracketColor;
|
|
56
95
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
2
|
-
import type { IBorderProps } from '../Commons/border.interface';
|
|
3
2
|
import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.interface';
|
|
4
3
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
5
4
|
import type { IDimensionProps } from '../Commons/dimension.interface';
|
|
6
5
|
import type { IElevationProps } from '../Commons/elevation.interface';
|
|
7
6
|
import type { IMarginProps } from '../Commons/margin.interface';
|
|
8
7
|
import type { IPaddingProps } from '../Commons/padding.interface';
|
|
9
|
-
import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
10
8
|
import type { ITypographyProps } from '../Commons/typography.interface';
|
|
11
|
-
import type { TBracketConnectorPath, TBracketVariant } from '../../types/Bracket/bracket.type';
|
|
9
|
+
import type { TBracketBorderProps, TBracketRoundedProps, TBracketConnectorPath, TBracketVariant } from '../../types/Bracket/bracket.type';
|
|
12
10
|
import type { IBracketCompetitor } from './bracket-competitor.interface';
|
|
13
11
|
import type { IBracketMatchCompetitorSlot } from './bracket-match-component.interface';
|
|
14
12
|
import type { IBracketMatch } from './bracket-match.interface';
|
|
@@ -24,7 +22,30 @@ import type { IBracketRound } from './bracket-round.interface';
|
|
|
24
22
|
* data and re-render. No internal state is held about scores or
|
|
25
23
|
* winners — the data passed in is the source of truth.
|
|
26
24
|
*/
|
|
27
|
-
|
|
25
|
+
/*********************************************************
|
|
26
|
+
* Pourquoi les surfaces `border` ET `rounded` sont RESTREINTES ici — #1013
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* `OrigamBracket` n'appelle ni `useBorder` ni `useRounded` : il passe
|
|
30
|
+
* `props` en bloc a `utils/Bracket/bracket-surface.util.ts`, qui emet des
|
|
31
|
+
* custom properties relues par un SCSS PHYSIQUE. Les props logiques par
|
|
32
|
+
* cote y sont donc structurellement incablables, et une prop typee,
|
|
33
|
+
* editable dans Histoire, mais inerte est pire qu'une prop absente.
|
|
34
|
+
*
|
|
35
|
+
* @description
|
|
36
|
+
* Les deux restrictions vivent dans `types/Bracket/bracket.type.ts`, un
|
|
37
|
+
* type nomme chacune, et portent la mesure qui les justifie :
|
|
38
|
+
* {@link TBracketBorderProps} retire les 4 aretes INLINE et garde les 2
|
|
39
|
+
* aretes de bloc (invariantes en `horizontal-tb`, donc cablees) ;
|
|
40
|
+
* {@link TBracketRoundedProps} retire les 4 coins logiques, car tout nom de
|
|
41
|
+
* coin est `{bloc}-{inline}` et porte donc une composante inline — le
|
|
42
|
+
* sursis de l'axe bloc n'existe pas pour un coin.
|
|
43
|
+
*
|
|
44
|
+
* @description
|
|
45
|
+
* Un seul idiome pour les deux moities du lot, volontairement : la
|
|
46
|
+
* directive du ticket est « si un format existe, il existe partout ».
|
|
47
|
+
********************************************************/
|
|
48
|
+
export interface IBracketProps extends ICommonsComponentProps, ITagProps, IDensityProps, TBracketRoundedProps, IColorProps, IBgColorProps, TBracketBorderProps, IDimensionProps, IElevationProps, IMarginProps, IPaddingProps, Pick<ITypographyProps, 'fontSize' | 'fontWeight' | 'letterSpacing'> {
|
|
28
49
|
/**
|
|
29
50
|
* Required. Pre-ordered list of rounds. For single-elimination,
|
|
30
51
|
* the rounds are laid out from earliest (e.g. round-of-16) to
|
|
@@ -24,6 +24,72 @@ export interface IBorderProps {
|
|
|
24
24
|
* mapped onto `border-inline-{width,style,color}`.
|
|
25
25
|
*/
|
|
26
26
|
borderInline?: boolean | number | string;
|
|
27
|
+
/*********************************************************
|
|
28
|
+
* borderInlineStart
|
|
29
|
+
*
|
|
30
|
+
* @description
|
|
31
|
+
* Largeur/style/couleur LOGIQUE PAR COTE pour l'arete inline-start —
|
|
32
|
+
* gauche en LTR, droite en RTL (#1013). Le jumeau relatif au mode
|
|
33
|
+
* d'ecriture de `borderLeft`, resolu vers les longhands natifs
|
|
34
|
+
* `border-inline-start-{width,style,color}`, que le navigateur mappe
|
|
35
|
+
* lui-meme sur la bonne arete physique.
|
|
36
|
+
*
|
|
37
|
+
* @description
|
|
38
|
+
* A preferer a `borderLeft` des que l'intention de design est « l'arete
|
|
39
|
+
* ou le texte commence » (filet d'accent d'une citation, indicateur de
|
|
40
|
+
* nav, guide d'arborescence) : `borderLeft` epingle la peinture a la
|
|
41
|
+
* gauche physique et inverse silencieusement le design en RTL.
|
|
42
|
+
*
|
|
43
|
+
* @description
|
|
44
|
+
* Meme grammaire de valeur que toute autre prop directionnelle de
|
|
45
|
+
* bordure — opt-in booleen (token `thin`), largeur numerique nue, ou
|
|
46
|
+
* chaine libre `"width style color"`.
|
|
47
|
+
*
|
|
48
|
+
* @description
|
|
49
|
+
* Precedence : bat `borderInline` et le `border` global pour cette
|
|
50
|
+
* seule arete, mais un `borderLeft` PHYSIQUE l'emporte encore en LTR
|
|
51
|
+
* (les deux orthographes visent la meme arete a specificite egale,
|
|
52
|
+
* donc le dernier push gagne — voir la table de precedence de
|
|
53
|
+
* `useBorder`).
|
|
54
|
+
*
|
|
55
|
+
* @description
|
|
56
|
+
* ⚠️ Herite des limites partagees de `BORDER_REGEX` : un `calc()` ou
|
|
57
|
+
* une largeur fractionnaire (`"0.5rem solid red"`) ne parse pas et
|
|
58
|
+
* n'emet RIEN — mesure dans `BORDER_LOGICAL_SIDE_MAP`.
|
|
59
|
+
********************************************************/
|
|
60
|
+
borderInlineStart?: boolean | number | string;
|
|
61
|
+
/*********************************************************
|
|
62
|
+
* borderInlineEnd
|
|
63
|
+
*
|
|
64
|
+
* @description
|
|
65
|
+
* Jumeau logique par cote de `borderInlineStart` pour l'arete
|
|
66
|
+
* inline-end — droite en LTR, gauche en RTL. Mappe sur
|
|
67
|
+
* `border-inline-end-{width,style,color}`. Meme grammaire, memes
|
|
68
|
+
* regles de precedence (un `borderRight` physique l'emporte en LTR).
|
|
69
|
+
********************************************************/
|
|
70
|
+
borderInlineEnd?: boolean | number | string;
|
|
71
|
+
/*********************************************************
|
|
72
|
+
* borderBlockStart
|
|
73
|
+
*
|
|
74
|
+
* @description
|
|
75
|
+
* Jumeau logique par cote de `borderInlineStart` pour l'arete
|
|
76
|
+
* block-start — le haut dans le mode d'ecriture `horizontal-tb` par
|
|
77
|
+
* defaut. Mappe sur `border-block-start-{width,style,color}`. Meme
|
|
78
|
+
* grammaire, memes regles de precedence (un `borderTop` physique
|
|
79
|
+
* l'emporte).
|
|
80
|
+
********************************************************/
|
|
81
|
+
borderBlockStart?: boolean | number | string;
|
|
82
|
+
/*********************************************************
|
|
83
|
+
* borderBlockEnd
|
|
84
|
+
*
|
|
85
|
+
* @description
|
|
86
|
+
* Jumeau logique par cote de `borderInlineStart` pour l'arete
|
|
87
|
+
* block-end — le bas dans le mode d'ecriture `horizontal-tb` par
|
|
88
|
+
* defaut. Mappe sur `border-block-end-{width,style,color}`. Meme
|
|
89
|
+
* grammaire, memes regles de precedence (un `borderBottom` physique
|
|
90
|
+
* l'emporte).
|
|
91
|
+
********************************************************/
|
|
92
|
+
borderBlockEnd?: boolean | number | string;
|
|
27
93
|
borderColor?: string;
|
|
28
94
|
borderStyle?: string;
|
|
29
95
|
/**
|
|
@@ -45,4 +111,61 @@ export interface IBorderProps {
|
|
|
45
111
|
borderRightColor?: TColor;
|
|
46
112
|
borderBottomColor?: TColor;
|
|
47
113
|
borderLeftColor?: TColor;
|
|
114
|
+
/*********************************************************
|
|
115
|
+
* borderInlineStartColor
|
|
116
|
+
*
|
|
117
|
+
* @description
|
|
118
|
+
* Surcharge de couleur PAR ARETE pour l'arete inline-start (#1013) —
|
|
119
|
+
* le jumeau logique de `borderLeftColor`, emis en
|
|
120
|
+
* `border-inline-start-color`.
|
|
121
|
+
*
|
|
122
|
+
* @description
|
|
123
|
+
* Memes semantiques que la famille `*Color` physique : additive, bat
|
|
124
|
+
* toute couleur impliquee par `borderInlineStart` lui-meme (ex.
|
|
125
|
+
* `borderInlineStart="2px dashed red"`), la couleur d'axe de
|
|
126
|
+
* `borderInline`, et le `borderColor` / `border` global — pour cette
|
|
127
|
+
* arete seulement. Un `borderLeftColor` PHYSIQUE l'emporte encore en
|
|
128
|
+
* LTR, meme sens que pour les props de largeur.
|
|
129
|
+
*
|
|
130
|
+
* @description
|
|
131
|
+
* Accepte un {@link TColor} (intent semantique, couleur CSS brute, ou
|
|
132
|
+
* valeur fausse pour se desengager). Une bordure est un TRAIT, donc un
|
|
133
|
+
* intent se resout via la famille de tokens de PREMIER PLAN (comme la
|
|
134
|
+
* prop `color`), jamais un token de fond.
|
|
135
|
+
*
|
|
136
|
+
* @description
|
|
137
|
+
* Les degrades ne sont PAS supportes — `border-color` en CSS n'a pas de
|
|
138
|
+
* forme degradee — et sont ignores silencieusement.
|
|
139
|
+
********************************************************/
|
|
140
|
+
borderInlineStartColor?: TColor;
|
|
141
|
+
/*********************************************************
|
|
142
|
+
* borderInlineEndColor
|
|
143
|
+
*
|
|
144
|
+
* @description
|
|
145
|
+
* Surcharge de couleur par arete pour l'arete inline-end — jumeau
|
|
146
|
+
* logique de `borderRightColor`, emis en `border-inline-end-color`.
|
|
147
|
+
* Meme grammaire {@link TColor} et meme precedence que
|
|
148
|
+
* `borderInlineStartColor`.
|
|
149
|
+
********************************************************/
|
|
150
|
+
borderInlineEndColor?: TColor;
|
|
151
|
+
/*********************************************************
|
|
152
|
+
* borderBlockStartColor
|
|
153
|
+
*
|
|
154
|
+
* @description
|
|
155
|
+
* Surcharge de couleur par arete pour l'arete block-start — jumeau
|
|
156
|
+
* logique de `borderTopColor`, emis en `border-block-start-color`.
|
|
157
|
+
* Meme grammaire {@link TColor} et meme precedence que
|
|
158
|
+
* `borderInlineStartColor`.
|
|
159
|
+
********************************************************/
|
|
160
|
+
borderBlockStartColor?: TColor;
|
|
161
|
+
/*********************************************************
|
|
162
|
+
* borderBlockEndColor
|
|
163
|
+
*
|
|
164
|
+
* @description
|
|
165
|
+
* Surcharge de couleur par arete pour l'arete block-end — jumeau
|
|
166
|
+
* logique de `borderBottomColor`, emis en `border-block-end-color`.
|
|
167
|
+
* Meme grammaire {@link TColor} et meme precedence que
|
|
168
|
+
* `borderInlineStartColor`.
|
|
169
|
+
********************************************************/
|
|
170
|
+
borderBlockEndColor?: TColor;
|
|
48
171
|
}
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 1. `margin` — global shorthand
|
|
8
8
|
* 2. `marginBlock` / `marginInline` — logical axis
|
|
9
|
-
* 3. `
|
|
9
|
+
* 3. `marginInlineStart` / `marginInlineEnd` /
|
|
10
|
+
* `marginBlockStart` / `marginBlockEnd` — logical side
|
|
11
|
+
* 4. `marginTop` / `marginRight` / `marginBottom` / `marginLeft`
|
|
12
|
+
* — physical side
|
|
10
13
|
*
|
|
11
14
|
* Each rung only overrides the edge(s) it targets. See
|
|
12
15
|
* `resolveSpacingValue` for the accepted value forms (the directionals
|
|
@@ -16,6 +19,9 @@
|
|
|
16
19
|
* ⚠️ The 4-value `margin` shorthand distributes as
|
|
17
20
|
* **Haut/Gauche/Bas/Droite**, NOT the CSS clockwise order (issue #216).
|
|
18
21
|
* The per-side props exist so you never have to know that.
|
|
22
|
+
*
|
|
23
|
+
* ⚠️ Rungs 3 and 4 are EQUALLY specific — see the same note on
|
|
24
|
+
* `IPaddingProps`. The physical spelling wins for a given edge.
|
|
19
25
|
*/
|
|
20
26
|
export interface IMarginProps {
|
|
21
27
|
/**
|
|
@@ -36,4 +42,32 @@ export interface IMarginProps {
|
|
|
36
42
|
marginBlock?: boolean | number | string;
|
|
37
43
|
/** Left + right. Overrides `margin`; beaten by `marginLeft` / `marginRight`. */
|
|
38
44
|
marginInline?: boolean | number | string;
|
|
45
|
+
/*********************************************************
|
|
46
|
+
* Logical per-side margin — rung 3 (issue #1013)
|
|
47
|
+
*
|
|
48
|
+
* @description
|
|
49
|
+
* One WRITING-MODE-RELATIVE edge each, emitted as the native logical
|
|
50
|
+
* longhands (`margin-inline-start`, …) so the browser flips them under
|
|
51
|
+
* RTL and in vertical writing modes.
|
|
52
|
+
*
|
|
53
|
+
* @description
|
|
54
|
+
* `marginInlineStart` — left in LTR, **right in RTL**.
|
|
55
|
+
* `marginInlineEnd` — right in LTR, **left in RTL**.
|
|
56
|
+
* `marginBlockStart` — top in horizontal-tb.
|
|
57
|
+
* `marginBlockEnd` — bottom in horizontal-tb.
|
|
58
|
+
*
|
|
59
|
+
* @description
|
|
60
|
+
* Same vocabulary as `margin`, the `auto` keyword included — and that
|
|
61
|
+
* is their best argument: `marginInlineStart="auto"` pushes an element
|
|
62
|
+
* to the far end of its line in BOTH reading directions, where
|
|
63
|
+
* `marginLeft="auto"` pushes it the wrong way under RTL.
|
|
64
|
+
*
|
|
65
|
+
* @description
|
|
66
|
+
* Each overrides `margin` and its axis prop for the one edge it
|
|
67
|
+
* targets, and is beaten by the matching PHYSICAL prop.
|
|
68
|
+
********************************************************/
|
|
69
|
+
marginInlineStart?: boolean | number | string;
|
|
70
|
+
marginInlineEnd?: boolean | number | string;
|
|
71
|
+
marginBlockStart?: boolean | number | string;
|
|
72
|
+
marginBlockEnd?: boolean | number | string;
|
|
39
73
|
}
|