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
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
* 1. `padding` — global shorthand
|
|
8
8
|
* 2. `paddingBlock` / `paddingInline` — logical axis
|
|
9
|
-
* 3. `
|
|
9
|
+
* 3. `paddingInlineStart` / `paddingInlineEnd` /
|
|
10
|
+
* `paddingBlockStart` / `paddingBlockEnd` — logical side
|
|
11
|
+
* 4. `paddingTop` / `paddingRight` / `paddingBottom` / `paddingLeft`
|
|
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, and
|
|
@@ -15,6 +18,14 @@
|
|
|
15
18
|
* ⚠️ The 4-value `padding` shorthand distributes as
|
|
16
19
|
* **Haut/Gauche/Bas/Droite**, NOT the CSS clockwise order (issue #216).
|
|
17
20
|
* The per-side props exist so you never have to know that.
|
|
21
|
+
*
|
|
22
|
+
* ⚠️ Rungs 3 and 4 are EQUALLY specific — `paddingInlineStart` and
|
|
23
|
+
* `paddingLeft` are two spellings of the same edge in LTR horizontal-tb, so
|
|
24
|
+
* neither is "more specific" than the other and the tiebreak is a choice,
|
|
25
|
+
* not a derivation. The physical one wins, which keeps the direction the
|
|
26
|
+
* repo's only other physical-vs-logical tiebreak already takes (see
|
|
27
|
+
* `ROUNDED_CORNER_MAP` in `consts/Commons/spacing.const.ts`). Setting both
|
|
28
|
+
* for one edge is a consumer mistake either way; pick one grid.
|
|
18
29
|
*/
|
|
19
30
|
export interface IPaddingProps {
|
|
20
31
|
/**
|
|
@@ -35,4 +46,33 @@ export interface IPaddingProps {
|
|
|
35
46
|
paddingBlock?: boolean | number | string;
|
|
36
47
|
/** Left + right. Overrides `padding`; beaten by `paddingLeft` / `paddingRight`. */
|
|
37
48
|
paddingInline?: boolean | number | string;
|
|
49
|
+
/*********************************************************
|
|
50
|
+
* Logical per-side padding — rung 3 (issue #1013)
|
|
51
|
+
*
|
|
52
|
+
* @description
|
|
53
|
+
* One WRITING-MODE-RELATIVE edge each. They emit the native logical
|
|
54
|
+
* longhands (`padding-inline-start`, …), so the browser flips them
|
|
55
|
+
* under RTL and in vertical writing modes for you.
|
|
56
|
+
*
|
|
57
|
+
* @description
|
|
58
|
+
* `paddingInlineStart` — left in LTR, **right in RTL**.
|
|
59
|
+
* `paddingInlineEnd` — right in LTR, **left in RTL**.
|
|
60
|
+
* `paddingBlockStart` — top in horizontal-tb.
|
|
61
|
+
* `paddingBlockEnd` — bottom in horizontal-tb.
|
|
62
|
+
*
|
|
63
|
+
* @description
|
|
64
|
+
* Same vocabulary as `padding` (`16`, `"4"`, `"8px"`, `"var(…)"`,
|
|
65
|
+
* `"calc(…)"`). Each overrides `padding` and its axis prop for the one
|
|
66
|
+
* edge it targets, and is in turn beaten by the matching PHYSICAL prop
|
|
67
|
+
* (`paddingLeft` & co) — see the precedence note above.
|
|
68
|
+
*
|
|
69
|
+
* @description
|
|
70
|
+
* Prefer these over the physical four whenever the value is a
|
|
71
|
+
* reading-order offset — an indent, a gutter beside an accent rule —
|
|
72
|
+
* rather than a genuinely physical one.
|
|
73
|
+
********************************************************/
|
|
74
|
+
paddingInlineStart?: boolean | number | string;
|
|
75
|
+
paddingInlineEnd?: boolean | number | string;
|
|
76
|
+
paddingBlockStart?: boolean | number | string;
|
|
77
|
+
paddingBlockEnd?: boolean | number | string;
|
|
38
78
|
}
|
|
@@ -3,17 +3,26 @@ import type { TRounded } from '../../types/Commons/rounded.type';
|
|
|
3
3
|
* Corner-radius surface.
|
|
4
4
|
*
|
|
5
5
|
* Precedence — SPECIFIC beats GLOBAL, same grammar as `IPaddingProps` /
|
|
6
|
-
* `IMarginProps` / `IBorderProps`, with
|
|
7
|
-
* is no logical-
|
|
6
|
+
* `IMarginProps` / `IBorderProps`, with three rungs instead of four (there
|
|
7
|
+
* is no logical-AXIS form for corners — a corner belongs to both axes at
|
|
8
|
+
* once):
|
|
8
9
|
*
|
|
9
10
|
* 1. `rounded` — global shorthand
|
|
10
|
-
* 2. `
|
|
11
|
-
* `
|
|
11
|
+
* 2. `roundedStartStart` / `roundedStartEnd` /
|
|
12
|
+
* `roundedEndStart` / `roundedEndEnd` — logical corner
|
|
13
|
+
* 3. `roundedTopLeft` / `roundedTopRight` /
|
|
14
|
+
* `roundedBottomLeft` / `roundedBottomRight` — physical corner
|
|
12
15
|
*
|
|
13
16
|
* A corner prop only overrides the corner it targets — `rounded="lg"` plus
|
|
14
17
|
* `roundedTopLeft="0px"` flattens one corner and leaves the other three at
|
|
15
18
|
* `lg`. See `resolveRoundedCornerValue` for the accepted value forms and
|
|
16
19
|
* `packages/docs/guide/spacing-and-corners.md` for the full reference.
|
|
20
|
+
*
|
|
21
|
+
* ⚠️ Rungs 2 and 3 are EQUALLY specific — `roundedStartStart` and
|
|
22
|
+
* `roundedTopLeft` are the same corner in LTR horizontal-tb, so the
|
|
23
|
+
* tiebreak is a choice, not a derivation. The physical one wins, the same
|
|
24
|
+
* direction `ROUNDED_CORNER_MAP` already documents against the shorthand's
|
|
25
|
+
* logical output. Pick one grid per component.
|
|
17
26
|
*/
|
|
18
27
|
export interface IRoundedProps {
|
|
19
28
|
/**
|
|
@@ -40,4 +49,38 @@ export interface IRoundedProps {
|
|
|
40
49
|
roundedBottomLeft?: boolean | number | string;
|
|
41
50
|
/** Bottom-right corner only. Same vocabulary as `roundedTopRight`. */
|
|
42
51
|
roundedBottomRight?: boolean | number | string;
|
|
52
|
+
/*********************************************************
|
|
53
|
+
* Logical per-corner radius — rung 2 (issue #1013)
|
|
54
|
+
*
|
|
55
|
+
* @description
|
|
56
|
+
* One WRITING-MODE-RELATIVE corner each, emitted as the native logical
|
|
57
|
+
* longhands (`border-start-start-radius`, …) — the same family the
|
|
58
|
+
* 4-value `rounded` shorthand already emits, so these four address one
|
|
59
|
+
* of its corners instead of all four.
|
|
60
|
+
*
|
|
61
|
+
* @description
|
|
62
|
+
* ⚠️ THE NAME READS `{block}-{inline}`, per CSS. The first half is the
|
|
63
|
+
* block end, the second the inline end — it is NOT a clockwise walk,
|
|
64
|
+
* and the two halves are not interchangeable:
|
|
65
|
+
*
|
|
66
|
+
* @description
|
|
67
|
+
* `roundedStartStart` — block-start inline-start = top-LEFT in LTR.
|
|
68
|
+
* `roundedStartEnd` — block-start inline-end = top-RIGHT in LTR.
|
|
69
|
+
* `roundedEndStart` — block-end inline-start = bottom-LEFT in LTR.
|
|
70
|
+
* `roundedEndEnd` — block-end inline-end = bottom-RIGHT in LTR.
|
|
71
|
+
*
|
|
72
|
+
* @description
|
|
73
|
+
* Swapping the halves silently rounds the opposite corner — nothing
|
|
74
|
+
* warns, and the result looks deliberate.
|
|
75
|
+
*
|
|
76
|
+
* @description
|
|
77
|
+
* Same vocabulary as `roundedTopRight` (`8`, `'8px'`, `'md'`,
|
|
78
|
+
* `'large'`, `'var(…)'`), minus `shaped` / `shaped-invert`. Each
|
|
79
|
+
* overrides `rounded` for its corner and is beaten by the matching
|
|
80
|
+
* PHYSICAL corner prop.
|
|
81
|
+
********************************************************/
|
|
82
|
+
roundedStartStart?: boolean | number | string;
|
|
83
|
+
roundedStartEnd?: boolean | number | string;
|
|
84
|
+
roundedEndStart?: boolean | number | string;
|
|
85
|
+
roundedEndEnd?: boolean | number | string;
|
|
43
86
|
}
|
|
@@ -103,3 +103,85 @@ export type TBracketElevation = TElevation | boolean | null | undefined;
|
|
|
103
103
|
* layer.
|
|
104
104
|
*/
|
|
105
105
|
export type TBracketBorder = IBorderProps['borderTop'] | null | undefined;
|
|
106
|
+
/*********************************************************
|
|
107
|
+
* TBracketBorderProps
|
|
108
|
+
*
|
|
109
|
+
* @description
|
|
110
|
+
* `IBorderProps` MOINS les quatre aretes logiques INLINE (#1013). Partage
|
|
111
|
+
* par les interfaces Bracket dont les props de bordure sont resolues par
|
|
112
|
+
* `bracketSurfaceVars` — `IBracketProps` (la racine) et `IBracketMatchProps`
|
|
113
|
+
* (la carte). Declare UNE fois ici plutot que deux `Omit<>` recopies.
|
|
114
|
+
*
|
|
115
|
+
* @description
|
|
116
|
+
* ⛔ `IBracketCompetitorProps` n'utilise PAS ce type, a dessein :
|
|
117
|
+
* `OrigamBracketCompetitor` appelle `useStateEffect` pour de vrai
|
|
118
|
+
* (`OrigamBracketCompetitor.vue:209`), donc ses quatre aretes logiques
|
|
119
|
+
* atteignent `useBorder` et peignent. Restreindre par FAMILLE de composant
|
|
120
|
+
* au lieu de par consommation mesuree y retirerait quatre props qui
|
|
121
|
+
* marchent.
|
|
122
|
+
*
|
|
123
|
+
* @description
|
|
124
|
+
* Pourquoi les deux autres sont restreintes : elles ne peignent pas via
|
|
125
|
+
* `useBorder` mais via des custom properties `--origam-bracket-match---*`
|
|
126
|
+
* lues dans des declarations PHYSIQUES. Mapper une arete logique sur une
|
|
127
|
+
* arete physique au moment d'ecrire la feuille exige de connaitre le mode
|
|
128
|
+
* d'ecriture, et `inline-start` vaut `left` en LTR mais `right` en RTL.
|
|
129
|
+
* Aucune chaine de repli `var()` ne peut l'exprimer : la substitution est
|
|
130
|
+
* AVEUGLE au mode d'ecriture alors que le mapping de la propriete ne l'est
|
|
131
|
+
* pas.
|
|
132
|
+
*
|
|
133
|
+
* @description
|
|
134
|
+
* Les deux aretes de BLOC restent declarees et sont honorees :
|
|
135
|
+
* `block-start`/`block-end` valent invariablement `top`/`bottom` en
|
|
136
|
+
* `horizontal-tb`, hypothese que la feuille faisait deja pour `borderBlock`.
|
|
137
|
+
* Confirme par sonde navigateur sur l'axe logique (Chromium, LTR vs RTL) :
|
|
138
|
+
* les noms porteurs d'une composante INLINE changent d'arete, le controle
|
|
139
|
+
* negatif `padding-block-start` ne bouge pas.
|
|
140
|
+
*
|
|
141
|
+
* @description
|
|
142
|
+
* ⛔ Retirer plutot que declarer-et-ignorer est la regle que
|
|
143
|
+
* `bracket-surface.interface.ts` enonce deja pour cette couche : une prop
|
|
144
|
+
* typee, editable dans Histoire, et inerte est pire qu'une prop absente.
|
|
145
|
+
* Arbitre par le proprietaire le 2026-10-01. La completude de l'axe inline
|
|
146
|
+
* part dans son propre ticket (elle demande de convertir la cascade en
|
|
147
|
+
* longhands logiques, ce qui change le comportement RTL des props physiques
|
|
148
|
+
* existantes).
|
|
149
|
+
********************************************************/
|
|
150
|
+
export type TBracketBorderProps = Omit<IBorderProps, 'borderInlineStart' | 'borderInlineEnd' | 'borderInlineStartColor' | 'borderInlineEndColor'>;
|
|
151
|
+
/*********************************************************
|
|
152
|
+
* TBracketRoundedProps — le pendant « coins » de {@link TBracketBorderProps}
|
|
153
|
+
*
|
|
154
|
+
* @description
|
|
155
|
+
* Même couche, même cause, même arbitrage (#1013, tranché par le
|
|
156
|
+
* propriétaire le 2026-10-01) : `OrigamBracket` n'appelle pas `useRounded`,
|
|
157
|
+
* il passe `props` en bloc à `utils/Bracket/bracket-surface.util.ts`, qui
|
|
158
|
+
* émet des custom properties relues par le SCSS d'`OrigamBracketMatch` dans
|
|
159
|
+
* des déclarations PHYSIQUES par coin. La substitution `var()` est AVEUGLE
|
|
160
|
+
* au mode d'écriture alors que le mapping de la propriété ne l'est pas,
|
|
161
|
+
* donc aucune chaîne de repli ne peut encoder « le physique gagne » ET « le
|
|
162
|
+
* logique se retourne en RTL » simultanément.
|
|
163
|
+
*
|
|
164
|
+
* @description
|
|
165
|
+
* ⛔ MAIS LES QUATRE SORTENT, là où le côté border n'en retire que deux. Le
|
|
166
|
+
* sursis des arêtes de BLOC ne s'applique pas à un coin : tout nom de coin
|
|
167
|
+
* logique est `{bloc}-{inline}` et porte donc une composante inline. Mesuré
|
|
168
|
+
* dans Chromium (sonde Playwright, LTR vs RTL) plutôt que déduit —
|
|
169
|
+
* `start-start` top-left -> top-RIGHT, `start-end` top-right -> top-LEFT,
|
|
170
|
+
* `end-start` bottom-left -> bottom-RIGHT, `end-end` bottom-right ->
|
|
171
|
+
* bottom-LEFT. Contrôle négatif `padding-block-start` -> `padding-top` :
|
|
172
|
+
* 40px dans les deux sens, il ne bouge pas, ce qui prouve que la sonde sait
|
|
173
|
+
* distinguer l'immobilité et que les quatre déplacements sont réels.
|
|
174
|
+
*
|
|
175
|
+
* @description
|
|
176
|
+
* PORTÉE VÉRIFIÉE — seul `IBracketProps` est restreint. Les deux autres
|
|
177
|
+
* interfaces Bracket qui étendent `IRoundedProps` consomment réellement
|
|
178
|
+
* leurs coins : `OrigamBracketMatch` et `OrigamBracketCompetitor` appellent
|
|
179
|
+
* `useRounded` / `useStateEffect`, et gardent donc la surface complète.
|
|
180
|
+
* `OrigamBracket` est le seul à n'avoir aucun de ces appels.
|
|
181
|
+
*
|
|
182
|
+
* @description
|
|
183
|
+
* Retirer plutôt que déclarer-et-ignorer, même règle que ci-dessus. La
|
|
184
|
+
* complétude de l'axe inline pour les coins suit le même ticket que pour
|
|
185
|
+
* les arêtes : il faut convertir la cascade en longhands logiques.
|
|
186
|
+
********************************************************/
|
|
187
|
+
export type TBracketRoundedProps = Omit<IRoundedProps, 'roundedStartStart' | 'roundedStartEnd' | 'roundedEndStart' | 'roundedEndEnd'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BORDER_LOGICAL_AXIS } from '../../enums/Commons/border.enum';
|
|
1
2
|
import { BLOCK, INLINE, START_END } from '../../enums/Commons/anchor.enum';
|
|
2
3
|
export type TStartEnd = `${START_END}`;
|
|
3
4
|
export type TBlock = `${BLOCK}`;
|
|
@@ -5,6 +6,53 @@ export type TBlockStartEnd = TBlock | TStartEnd;
|
|
|
5
6
|
export type TInline = `${INLINE}`;
|
|
6
7
|
export type TInlineStartEnd = TInline | TStartEnd;
|
|
7
8
|
export type TDirectionBoth = TBlock | TInline;
|
|
9
|
+
/*********************************************************
|
|
10
|
+
* TLogicalSide
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
* One LOGICAL box edge — `block-start` | `block-end` | `inline-start` |
|
|
14
|
+
* `inline-end`. The writing-mode-relative twin of {@link TDirectionBoth},
|
|
15
|
+
* which names the four PHYSICAL edges.
|
|
16
|
+
*
|
|
17
|
+
* @description
|
|
18
|
+
* Composed from the two enums that already carry this vocabulary rather
|
|
19
|
+
* than spelling a fifth literal union : `BORDER_LOGICAL_AXIS` fournit
|
|
20
|
+
* l'axe, `START_END` son extremite. Rien de neuf n'est declare, donc les
|
|
21
|
+
* cotes logiques ne peuvent pas deriver des props d'axe (`paddingInline`,
|
|
22
|
+
* `borderBlock`, …) qui lisent les memes membres.
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* ⚠️ `BORDER_LOGICAL_AXIS` est border-NOMME mais pas border-PORTE — c'est
|
|
26
|
+
* deja le vocabulaire d'axe de padding et margin
|
|
27
|
+
* (`consts/Commons/spacing.const.ts` l'importe pour
|
|
28
|
+
* `PADDING_LOGICAL_AXIS_MAP` / `MARGIN_LOGICAL_AXIS_MAP`). Le reutiliser
|
|
29
|
+
* ici suit ce precedent au lieu d'ajouter un enum quasi identique.
|
|
30
|
+
*
|
|
31
|
+
* @description
|
|
32
|
+
* Consomme par les familles `*InlineStart` / `*InlineEnd` / `*BlockStart`
|
|
33
|
+
* / `*BlockEnd` de `IPaddingProps`, `IMarginProps` et `IBorderProps`
|
|
34
|
+
* (#1013), et par les tables qui les cablent.
|
|
35
|
+
********************************************************/
|
|
36
|
+
export type TLogicalSide = `${BORDER_LOGICAL_AXIS}-${START_END}`;
|
|
37
|
+
/*********************************************************
|
|
38
|
+
* TLogicalCorner
|
|
39
|
+
*
|
|
40
|
+
* @description
|
|
41
|
+
* One LOGICAL box CORNER — `start-start` | `start-end` | `end-start` |
|
|
42
|
+
* `end-end`, dans l'ordre natif `border-{block}-{inline}-radius` (fin de
|
|
43
|
+
* bloc d'abord, fin d'inline ensuite). Le jumeau relatif au mode
|
|
44
|
+
* d'ecriture des noms physiques `top-left` / ….
|
|
45
|
+
*
|
|
46
|
+
* @description
|
|
47
|
+
* Compose depuis `START_END` seul, pour la meme raison anti-duplication
|
|
48
|
+
* que {@link TLogicalSide} : un coin est l'intersection d'une fin de bloc
|
|
49
|
+
* et d'une fin d'inline, donc le vocabulaire est `START_END` au carre.
|
|
50
|
+
*
|
|
51
|
+
* @description
|
|
52
|
+
* Consomme par les props `roundedStartStart` / `roundedStartEnd` /
|
|
53
|
+
* `roundedEndStart` / `roundedEndEnd` de `IRoundedProps` (#1013).
|
|
54
|
+
********************************************************/
|
|
55
|
+
export type TLogicalCorner = `${START_END}-${START_END}`;
|
|
8
56
|
export type TAnchor = TBlock | TInline | 'center' | 'center center' | `${TBlock} ${TInline | 'center'}` | `${TInline} ${TBlock | 'center'}`;
|
|
9
57
|
export type TParsedAnchor = {
|
|
10
58
|
side: 'center';
|
|
@@ -6,10 +6,28 @@
|
|
|
6
6
|
* pas une couche CSS : `Record<valeur du variant, Partial<props>>`.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
* C'est le type d'AUTORAT, celui qu'une table
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* C'est le type d'AUTORAT, celui qu'une table annote pour que le compilateur
|
|
10
|
+
* refuse une valeur de variant inconnue ou un nom de prop que le composant ne
|
|
11
|
+
* declare pas.
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* La table vit dans le fichier de consts EXISTANT du composant —
|
|
15
|
+
* `consts/{Composant}/{composant}.const.ts` — jamais dans un second fichier
|
|
16
|
+
* cree pour elle. Arbitrage du proprietaire, 2026-10-01 : la regle
|
|
17
|
+
* anti-duplication du `CLAUDE.md` global commande de reutiliser le fichier de
|
|
18
|
+
* consts deja en place plutot que d'en ouvrir un parallele. Le pilote
|
|
19
|
+
* `KBD_VARIANT_PRESETS` est dans `consts/Kbd/kbd.const.ts`, et c'est la forme
|
|
20
|
+
* a copier.
|
|
21
|
+
*
|
|
22
|
+
* @description
|
|
23
|
+
* ⚠️ Cet en-tete prescrivait `{composant}-variant.const.ts`. C'etait FAUX —
|
|
24
|
+
* aucune table n'a jamais ete ecrite a ce chemin, et le `fixHint` de la garde
|
|
25
|
+
* `no-variant-css` portait la meme erreur. Les deux sont corriges ; voir la
|
|
26
|
+
* section « `variant` = a props PRESET » du `CLAUDE.md` a la racine, qui fait
|
|
27
|
+
* foi.
|
|
28
|
+
*
|
|
29
|
+
* @description
|
|
30
|
+
* La forme, telle que le pilote la pose :
|
|
13
31
|
*
|
|
14
32
|
* export const KBD_VARIANT_PRESETS: TVariantPresets<TKbdVariant, IKbdProps> = {
|
|
15
33
|
* outlined: { bgColor: '...', border: 1 },
|
|
@@ -129,5 +129,24 @@ function bracketSurfaceVars(input) {
|
|
|
129
129
|
const width = resolveBracketBorderWidth(input[widthProp]);
|
|
130
130
|
if (width) vars[`--origam-bracket-match---border-${axis}-width`] = width;
|
|
131
131
|
});
|
|
132
|
+
const BLOCK_EDGES = [{
|
|
133
|
+
edge: "block-start",
|
|
134
|
+
widthProp: "borderBlockStart",
|
|
135
|
+
colorProp: "borderBlockStartColor"
|
|
136
|
+
}, {
|
|
137
|
+
edge: "block-end",
|
|
138
|
+
widthProp: "borderBlockEnd",
|
|
139
|
+
colorProp: "borderBlockEndColor"
|
|
140
|
+
}];
|
|
141
|
+
BLOCK_EDGES.forEach(({
|
|
142
|
+
edge,
|
|
143
|
+
widthProp,
|
|
144
|
+
colorProp
|
|
145
|
+
}) => {
|
|
146
|
+
const width = resolveBracketBorderWidth(input[widthProp]);
|
|
147
|
+
if (width) vars[`--origam-bracket-match---border-${edge}-width`] = width;
|
|
148
|
+
const edgeColor = resolveBracketBorderColor(input[colorProp]);
|
|
149
|
+
if (edgeColor) vars[`--origam-bracket-match---border-${edge}-color`] = edgeColor;
|
|
150
|
+
});
|
|
132
151
|
return vars;
|
|
133
152
|
}
|
|
@@ -101,5 +101,15 @@ export function bracketSurfaceVars(input) {
|
|
|
101
101
|
const width = resolveBracketBorderWidth(input[widthProp]);
|
|
102
102
|
if (width) vars[`--origam-bracket-match---border-${axis}-width`] = width;
|
|
103
103
|
});
|
|
104
|
+
const BLOCK_EDGES = [
|
|
105
|
+
{ edge: "block-start", widthProp: "borderBlockStart", colorProp: "borderBlockStartColor" },
|
|
106
|
+
{ edge: "block-end", widthProp: "borderBlockEnd", colorProp: "borderBlockEndColor" }
|
|
107
|
+
];
|
|
108
|
+
BLOCK_EDGES.forEach(({ edge, widthProp, colorProp }) => {
|
|
109
|
+
const width = resolveBracketBorderWidth(input[widthProp]);
|
|
110
|
+
if (width) vars[`--origam-bracket-match---border-${edge}-width`] = width;
|
|
111
|
+
const edgeColor = resolveBracketBorderColor(input[colorProp]);
|
|
112
|
+
if (edgeColor) vars[`--origam-bracket-match---border-${edge}-color`] = edgeColor;
|
|
113
|
+
});
|
|
104
114
|
return vars;
|
|
105
115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TDirectionBoth } from '../../types/Commons/anchor.type';
|
|
1
|
+
import type { TDirectionBoth, TLogicalSide } from '../../types/Commons/anchor.type';
|
|
2
2
|
import type { TBorderLogicalAxis } from '../../types/Commons/border.type';
|
|
3
3
|
import type { TColor } from '../../types/Commons/color.type';
|
|
4
4
|
/**
|
|
@@ -43,14 +43,22 @@ export declare function parseBorderPositionValue(value: string): {
|
|
|
43
43
|
* physical too: no logical/physical mismatch for the consumer to
|
|
44
44
|
* mentally translate) or a LOGICAL axis (`TBorderLogicalAxis` —
|
|
45
45
|
* `borderBlock` / `borderInline`, which map onto the native CSS logical
|
|
46
|
-
* properties `border-block-*` / `border-inline-*` verbatim)
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* `border`
|
|
51
|
-
*
|
|
46
|
+
* properties `border-block-*` / `border-inline-*` verbatim) or a LOGICAL
|
|
47
|
+
* SIDE (`TLogicalSide` — `borderInlineStart` / `borderInlineEnd` /
|
|
48
|
+
* `borderBlockStart` / `borderBlockEnd`, issue #1013, mapping onto
|
|
49
|
+
* `border-inline-start-*` and friends). All three share the exact same
|
|
50
|
+
* `border-{position}-{width,style,color}` template, so one function
|
|
51
|
+
* covers all of them without duplicating the formatting logic (unlike
|
|
52
|
+
* `formatBorderStylesVar`'s 2/4-value output for the global `border`
|
|
53
|
+
* shorthand, which distributes ACROSS axes from a single value list — a
|
|
54
|
+
* different concern).
|
|
55
|
+
*
|
|
56
|
+
* #1013 widened the `position` union by one member and changed NOTHING
|
|
57
|
+
* else here: `'inline-start'` interpolates into the same template and
|
|
58
|
+
* yields the correct native longhands. That is the whole reason the
|
|
59
|
+
* logical-per-side grid needed no new formatter.
|
|
52
60
|
*/
|
|
53
|
-
export declare function formatBorderPositionStylesVar(position: TDirectionBoth | TBorderLogicalAxis, facets: {
|
|
61
|
+
export declare function formatBorderPositionStylesVar(position: TDirectionBoth | TBorderLogicalAxis | TLogicalSide, facets: {
|
|
54
62
|
width?: string;
|
|
55
63
|
style?: string;
|
|
56
64
|
color?: string;
|