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
|
@@ -68,17 +68,29 @@ const props = defineProps({
|
|
|
68
68
|
borderRight: { type: [Boolean, Number, String], required: false },
|
|
69
69
|
borderBlock: { type: [Boolean, Number, String], required: false },
|
|
70
70
|
borderInline: { type: [Boolean, Number, String], required: false },
|
|
71
|
+
borderInlineStart: { type: [Boolean, Number, String], required: false },
|
|
72
|
+
borderInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
73
|
+
borderBlockStart: { type: [Boolean, Number, String], required: false },
|
|
74
|
+
borderBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
71
75
|
borderColor: { type: String, required: false },
|
|
72
76
|
borderStyle: { type: String, required: false },
|
|
73
77
|
borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
74
78
|
borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
75
79
|
borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
76
80
|
borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
81
|
+
borderInlineStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
82
|
+
borderInlineEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
83
|
+
borderBlockStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
84
|
+
borderBlockEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
77
85
|
rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true },
|
|
78
86
|
roundedTopRight: { type: [Boolean, Number, String], required: false },
|
|
79
87
|
roundedTopLeft: { type: [Boolean, Number, String], required: false },
|
|
80
88
|
roundedBottomLeft: { type: [Boolean, Number, String], required: false },
|
|
81
89
|
roundedBottomRight: { type: [Boolean, Number, String], required: false },
|
|
90
|
+
roundedStartStart: { type: [Boolean, Number, String], required: false },
|
|
91
|
+
roundedStartEnd: { type: [Boolean, Number, String], required: false },
|
|
92
|
+
roundedEndStart: { type: [Boolean, Number, String], required: false },
|
|
93
|
+
roundedEndEnd: { type: [Boolean, Number, String], required: false },
|
|
82
94
|
elevation: { type: [Number, String], required: false },
|
|
83
95
|
density: { type: null, required: false, default: DENSITY.DEFAULT },
|
|
84
96
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
@@ -90,6 +102,10 @@ const props = defineProps({
|
|
|
90
102
|
paddingRight: { type: [Boolean, Number, String], required: false },
|
|
91
103
|
paddingBlock: { type: [Boolean, Number, String], required: false },
|
|
92
104
|
paddingInline: { type: [Boolean, Number, String], required: false },
|
|
105
|
+
paddingInlineStart: { type: [Boolean, Number, String], required: false },
|
|
106
|
+
paddingInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
107
|
+
paddingBlockStart: { type: [Boolean, Number, String], required: false },
|
|
108
|
+
paddingBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
93
109
|
margin: { type: [Boolean, Number, String], required: false },
|
|
94
110
|
marginTop: { type: [Boolean, Number, String], required: false },
|
|
95
111
|
marginLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -97,6 +113,10 @@ const props = defineProps({
|
|
|
97
113
|
marginRight: { type: [Boolean, Number, String], required: false },
|
|
98
114
|
marginBlock: { type: [Boolean, Number, String], required: false },
|
|
99
115
|
marginInline: { type: [Boolean, Number, String], required: false },
|
|
116
|
+
marginInlineStart: { type: [Boolean, Number, String], required: false },
|
|
117
|
+
marginInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
118
|
+
marginBlockStart: { type: [Boolean, Number, String], required: false },
|
|
119
|
+
marginBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
100
120
|
position: { type: null, required: false },
|
|
101
121
|
top: { type: [Number, String], required: false },
|
|
102
122
|
bottom: { type: [Number, String], required: false },
|
|
@@ -283,6 +283,10 @@ const props = defineProps({
|
|
|
283
283
|
roundedTopLeft: { type: [Boolean, Number, String], required: false },
|
|
284
284
|
roundedBottomLeft: { type: [Boolean, Number, String], required: false },
|
|
285
285
|
roundedBottomRight: { type: [Boolean, Number, String], required: false },
|
|
286
|
+
roundedStartStart: { type: [Boolean, Number, String], required: false },
|
|
287
|
+
roundedStartEnd: { type: [Boolean, Number, String], required: false },
|
|
288
|
+
roundedEndStart: { type: [Boolean, Number, String], required: false },
|
|
289
|
+
roundedEndEnd: { type: [Boolean, Number, String], required: false },
|
|
286
290
|
border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true },
|
|
287
291
|
borderTop: { type: [Boolean, Number, String], required: false },
|
|
288
292
|
borderLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -290,12 +294,20 @@ const props = defineProps({
|
|
|
290
294
|
borderRight: { type: [Boolean, Number, String], required: false },
|
|
291
295
|
borderBlock: { type: [Boolean, Number, String], required: false },
|
|
292
296
|
borderInline: { type: [Boolean, Number, String], required: false },
|
|
297
|
+
borderInlineStart: { type: [Boolean, Number, String], required: false },
|
|
298
|
+
borderInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
299
|
+
borderBlockStart: { type: [Boolean, Number, String], required: false },
|
|
300
|
+
borderBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
293
301
|
borderColor: { type: String, required: false },
|
|
294
302
|
borderStyle: { type: String, required: false },
|
|
295
303
|
borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
296
304
|
borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
297
305
|
borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
298
306
|
borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
307
|
+
borderInlineStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
308
|
+
borderInlineEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
309
|
+
borderBlockStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
310
|
+
borderBlockEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
299
311
|
margin: { type: [Boolean, Number, String], required: false },
|
|
300
312
|
marginTop: { type: [Boolean, Number, String], required: false },
|
|
301
313
|
marginLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -303,6 +315,10 @@ const props = defineProps({
|
|
|
303
315
|
marginRight: { type: [Boolean, Number, String], required: false },
|
|
304
316
|
marginBlock: { type: [Boolean, Number, String], required: false },
|
|
305
317
|
marginInline: { type: [Boolean, Number, String], required: false },
|
|
318
|
+
marginInlineStart: { type: [Boolean, Number, String], required: false },
|
|
319
|
+
marginInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
320
|
+
marginBlockStart: { type: [Boolean, Number, String], required: false },
|
|
321
|
+
marginBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
306
322
|
padding: { type: [Boolean, Number, String], required: false },
|
|
307
323
|
paddingTop: { type: [Boolean, Number, String], required: false },
|
|
308
324
|
paddingLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -310,6 +326,10 @@ const props = defineProps({
|
|
|
310
326
|
paddingRight: { type: [Boolean, Number, String], required: false },
|
|
311
327
|
paddingBlock: { type: [Boolean, Number, String], required: false },
|
|
312
328
|
paddingInline: { type: [Boolean, Number, String], required: false },
|
|
329
|
+
paddingInlineStart: { type: [Boolean, Number, String], required: false },
|
|
330
|
+
paddingInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
331
|
+
paddingBlockStart: { type: [Boolean, Number, String], required: false },
|
|
332
|
+
paddingBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
313
333
|
elevation: { type: [Number, String], required: false },
|
|
314
334
|
fontSize: { type: null, required: false }
|
|
315
335
|
});
|
|
@@ -118,12 +118,20 @@ const props = defineProps({
|
|
|
118
118
|
borderRight: { type: [Boolean, Number, String], required: false },
|
|
119
119
|
borderBlock: { type: [Boolean, Number, String], required: false },
|
|
120
120
|
borderInline: { type: [Boolean, Number, String], required: false },
|
|
121
|
+
borderInlineStart: { type: [Boolean, Number, String], required: false },
|
|
122
|
+
borderInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
123
|
+
borderBlockStart: { type: [Boolean, Number, String], required: false },
|
|
124
|
+
borderBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
121
125
|
borderColor: { type: String, required: false },
|
|
122
126
|
borderStyle: { type: String, required: false },
|
|
123
127
|
borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
124
128
|
borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
125
129
|
borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
126
130
|
borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
131
|
+
borderInlineStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
132
|
+
borderInlineEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
133
|
+
borderBlockStartColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
134
|
+
borderBlockEndColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
127
135
|
padding: { type: [Boolean, Number, String], required: false },
|
|
128
136
|
paddingTop: { type: [Boolean, Number, String], required: false },
|
|
129
137
|
paddingLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -131,6 +139,10 @@ const props = defineProps({
|
|
|
131
139
|
paddingRight: { type: [Boolean, Number, String], required: false },
|
|
132
140
|
paddingBlock: { type: [Boolean, Number, String], required: false },
|
|
133
141
|
paddingInline: { type: [Boolean, Number, String], required: false },
|
|
142
|
+
paddingInlineStart: { type: [Boolean, Number, String], required: false },
|
|
143
|
+
paddingInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
144
|
+
paddingBlockStart: { type: [Boolean, Number, String], required: false },
|
|
145
|
+
paddingBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
134
146
|
margin: { type: [Boolean, Number, String], required: false },
|
|
135
147
|
marginTop: { type: [Boolean, Number, String], required: false },
|
|
136
148
|
marginLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -138,11 +150,19 @@ const props = defineProps({
|
|
|
138
150
|
marginRight: { type: [Boolean, Number, String], required: false },
|
|
139
151
|
marginBlock: { type: [Boolean, Number, String], required: false },
|
|
140
152
|
marginInline: { type: [Boolean, Number, String], required: false },
|
|
153
|
+
marginInlineStart: { type: [Boolean, Number, String], required: false },
|
|
154
|
+
marginInlineEnd: { type: [Boolean, Number, String], required: false },
|
|
155
|
+
marginBlockStart: { type: [Boolean, Number, String], required: false },
|
|
156
|
+
marginBlockEnd: { type: [Boolean, Number, String], required: false },
|
|
141
157
|
rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true },
|
|
142
158
|
roundedTopRight: { type: [Boolean, Number, String], required: false },
|
|
143
159
|
roundedTopLeft: { type: [Boolean, Number, String], required: false },
|
|
144
160
|
roundedBottomLeft: { type: [Boolean, Number, String], required: false },
|
|
145
161
|
roundedBottomRight: { type: [Boolean, Number, String], required: false },
|
|
162
|
+
roundedStartStart: { type: [Boolean, Number, String], required: false },
|
|
163
|
+
roundedStartEnd: { type: [Boolean, Number, String], required: false },
|
|
164
|
+
roundedEndStart: { type: [Boolean, Number, String], required: false },
|
|
165
|
+
roundedEndEnd: { type: [Boolean, Number, String], required: false },
|
|
146
166
|
elevation: { type: [Number, String], required: false },
|
|
147
167
|
bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
148
168
|
hover: { type: [Boolean, Object], required: false },
|
|
@@ -17,6 +17,22 @@ function isUtilityBorder(value) {
|
|
|
17
17
|
function isDirectionBorder(value) {
|
|
18
18
|
return typeof value === "string" && _anchor.DIRECTION_ARRAY.includes(value);
|
|
19
19
|
}
|
|
20
|
+
function pushEdgeDeclarations(styles, edge, edgeValue, edgeColor) {
|
|
21
|
+
if (typeof edgeValue === "number") {
|
|
22
|
+
styles.push(`border-${edge}-width: ${(0, _commons.convertToUnit)(edgeValue)}`);
|
|
23
|
+
styles.push(`border-${edge}-style: solid`);
|
|
24
|
+
styles.push(`border-${edge}-color: currentColor`);
|
|
25
|
+
} else if (edgeValue === true) {
|
|
26
|
+
styles.push(`border-${edge}-width: var(--origam-border__width---thin)`);
|
|
27
|
+
styles.push(`border-${edge}-style: solid`);
|
|
28
|
+
styles.push(`border-${edge}-color: currentColor`);
|
|
29
|
+
} else if (typeof edgeValue === "string" && edgeValue !== "") {
|
|
30
|
+
const parsed = (0, _border2.parseBorderPositionValue)(edgeValue);
|
|
31
|
+
if (parsed) styles.push(...(0, _border2.formatBorderPositionStylesVar)(edge, parsed));
|
|
32
|
+
}
|
|
33
|
+
const resolvedEdgeColor = (0, _border2.resolveBorderSideColor)(edgeColor);
|
|
34
|
+
if (resolvedEdgeColor) styles.push(`border-${edge}-color: ${resolvedEdgeColor}`);
|
|
35
|
+
}
|
|
20
36
|
function useBorder(props, name = (0, _getCurrentInstance.getCurrentInstanceName)()) {
|
|
21
37
|
const borderClasses = (0, _vue.computed)(() => {
|
|
22
38
|
const border = (0, _vue.isRef)(props) ? props.value : props.border;
|
|
@@ -88,27 +104,19 @@ function useBorder(props, name = (0, _getCurrentInstance.getCurrentInstanceName)
|
|
|
88
104
|
if (parsed) styles.push(...(0, _border2.formatBorderPositionStylesVar)(axis, parsed));
|
|
89
105
|
}
|
|
90
106
|
});
|
|
107
|
+
_border.BORDER_LOGICAL_SIDE_MAP.forEach(({
|
|
108
|
+
side,
|
|
109
|
+
widthProp,
|
|
110
|
+
colorProp
|
|
111
|
+
}) => {
|
|
112
|
+
pushEdgeDeclarations(styles, side, props[widthProp], props[colorProp]);
|
|
113
|
+
});
|
|
91
114
|
_border.BORDER_POSITION_MAP.forEach(({
|
|
92
115
|
side,
|
|
93
116
|
widthProp,
|
|
94
117
|
colorProp
|
|
95
118
|
}) => {
|
|
96
|
-
|
|
97
|
-
const sideColor = props[colorProp];
|
|
98
|
-
if (typeof sideValue === "number") {
|
|
99
|
-
styles.push(`border-${side}-width: ${(0, _commons.convertToUnit)(sideValue)}`);
|
|
100
|
-
styles.push(`border-${side}-style: solid`);
|
|
101
|
-
styles.push(`border-${side}-color: currentColor`);
|
|
102
|
-
} else if (sideValue === true) {
|
|
103
|
-
styles.push(`border-${side}-width: var(--origam-border__width---thin)`);
|
|
104
|
-
styles.push(`border-${side}-style: solid`);
|
|
105
|
-
styles.push(`border-${side}-color: currentColor`);
|
|
106
|
-
} else if (typeof sideValue === "string" && sideValue !== "") {
|
|
107
|
-
const parsed = (0, _border2.parseBorderPositionValue)(sideValue);
|
|
108
|
-
if (parsed) styles.push(...(0, _border2.formatBorderPositionStylesVar)(side, parsed));
|
|
109
|
-
}
|
|
110
|
-
const resolvedSideColor = (0, _border2.resolveBorderSideColor)(sideColor);
|
|
111
|
-
if (resolvedSideColor) styles.push(`border-${side}-color: ${resolvedSideColor}`);
|
|
119
|
+
pushEdgeDeclarations(styles, side, props[widthProp], props[colorProp]);
|
|
112
120
|
});
|
|
113
121
|
}
|
|
114
122
|
return styles;
|
|
@@ -12,22 +12,43 @@ import { TDirectionBoth } from '../../types/Commons/anchor.type';
|
|
|
12
12
|
*
|
|
13
13
|
* 1. global `border` shorthand (1/2/4-value, logical properties)
|
|
14
14
|
* 2. global standalone `borderColor` / `borderStyle`
|
|
15
|
-
* 3. logical-
|
|
15
|
+
* 3. logical-AXIS `borderBlock` / `borderInline` (width, and
|
|
16
16
|
* style/color when a full string like `"2px dashed red"` is given)
|
|
17
|
-
* 4.
|
|
18
|
-
*
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
21
|
-
* `
|
|
17
|
+
* 4. logical-PER-SIDE `borderInlineStart` / `borderInlineEnd` /
|
|
18
|
+
* `borderBlockStart` / `borderBlockEnd` — plus their
|
|
19
|
+
* `borderInlineStartColor` / … twins, each pushed immediately after
|
|
20
|
+
* its own edge's width/style (issue #1013). More specific than the
|
|
21
|
+
* axis rung above: `borderInlineStart` overrides whatever
|
|
22
|
+
* `borderInline` set for that one edge.
|
|
23
|
+
* 5. physical-PER-SIDE `borderTop` / `borderRight` / `borderBottom` /
|
|
24
|
+
* `borderLeft` — plus their `borderTopColor` / … twins, same
|
|
25
|
+
* per-edge pairing (issue #215).
|
|
22
26
|
*
|
|
23
|
-
* So `borderBlock` beats `border` for the top+bottom edges,
|
|
24
|
-
*
|
|
25
|
-
*
|
|
27
|
+
* So `borderBlock` beats `border` for the top+bottom edges,
|
|
28
|
+
* `borderBlockStart` beats both for the top edge specifically,
|
|
29
|
+
* `borderTop` beats all three for that same edge, and each `*Color`
|
|
30
|
+
* beats the color embedded in its own edge's width string, the
|
|
26
31
|
* axis-level color, and the global `borderColor` — each rung only
|
|
27
|
-
* overrides the
|
|
32
|
+
* overrides the edge(s)/axis it actually targets, everything else keeps
|
|
28
33
|
* cascading from the rung below.
|
|
29
34
|
*
|
|
30
35
|
* @description
|
|
36
|
+
* ⛔ WHY PHYSICAL BEATS LOGICAL FOR THE SAME EDGE (rungs 4 vs 5, #1013).
|
|
37
|
+
* `borderLeft` and `borderInlineStart` are two SPELLINGS of one edge in
|
|
38
|
+
* LTR, not two edges, and CSS gives them equal specificity — so neither
|
|
39
|
+
* wins on its own merits and declaration order is the entire mechanism.
|
|
40
|
+
* The tie is broken in favour of PHYSICAL to match the repo's only
|
|
41
|
+
* pre-existing physical-vs-logical tiebreak, recorded on
|
|
42
|
+
* `ROUNDED_CORNER_MAP` (`consts/Commons/spacing.const.ts:85-88`), where
|
|
43
|
+
* the per-corner PHYSICAL declarations are pushed last for exactly this
|
|
44
|
+
* reason. Settling it the same way across all four directional grids —
|
|
45
|
+
* border here, padding/margin/rounded in the other half of #1013 — is
|
|
46
|
+
* the point: a user who learns the rule once should not have to relearn
|
|
47
|
+
* it per prop family. Passing BOTH spellings for the same edge is
|
|
48
|
+
* nonetheless a code smell; pick the vocabulary that matches the intent
|
|
49
|
+
* (logical when the design follows the reading direction).
|
|
50
|
+
*
|
|
51
|
+
* @description
|
|
31
52
|
* WIDTH KEYWORDS AND DIRECTIONS ARE EMITTED INLINE (#391). 'none' | 'thin'
|
|
32
53
|
* | 'thick' and 'top' | 'right' | 'bottom' | 'left' resolve to a WIDTH, so
|
|
33
54
|
* they take the same inline path the numeric `:border="4"` form already
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, isRef } from "vue";
|
|
2
2
|
import { DIRECTION_ARRAY } from "../../consts/Commons/anchor.const.js";
|
|
3
|
-
import { BORDER_KEYWORD_WIDTH, BORDER_LOGICAL_AXIS_MAP, BORDER_POSITION_MAP, BORDER_REGEX } from "../../consts/Commons/border.const.js";
|
|
3
|
+
import { BORDER_KEYWORD_WIDTH, BORDER_LOGICAL_AXIS_MAP, BORDER_LOGICAL_SIDE_MAP, BORDER_POSITION_MAP, BORDER_REGEX } from "../../consts/Commons/border.const.js";
|
|
4
4
|
import { formatBorderPositionStylesVar, formatBorderStylesVar, parseBorderPositionValue, resolveBorderSideColor } from "../../utils/Commons/border.util.js";
|
|
5
5
|
import { convertToUnit, isEmpty } from "../../utils/Commons/commons.util.js";
|
|
6
6
|
import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
|
|
@@ -15,6 +15,22 @@ function isUtilityBorder(value) {
|
|
|
15
15
|
function isDirectionBorder(value) {
|
|
16
16
|
return typeof value === "string" && DIRECTION_ARRAY.includes(value);
|
|
17
17
|
}
|
|
18
|
+
function pushEdgeDeclarations(styles, edge, edgeValue, edgeColor) {
|
|
19
|
+
if (typeof edgeValue === "number") {
|
|
20
|
+
styles.push(`border-${edge}-width: ${convertToUnit(edgeValue)}`);
|
|
21
|
+
styles.push(`border-${edge}-style: solid`);
|
|
22
|
+
styles.push(`border-${edge}-color: currentColor`);
|
|
23
|
+
} else if (edgeValue === true) {
|
|
24
|
+
styles.push(`border-${edge}-width: var(--origam-border__width---thin)`);
|
|
25
|
+
styles.push(`border-${edge}-style: solid`);
|
|
26
|
+
styles.push(`border-${edge}-color: currentColor`);
|
|
27
|
+
} else if (typeof edgeValue === "string" && edgeValue !== "") {
|
|
28
|
+
const parsed = parseBorderPositionValue(edgeValue);
|
|
29
|
+
if (parsed) styles.push(...formatBorderPositionStylesVar(edge, parsed));
|
|
30
|
+
}
|
|
31
|
+
const resolvedEdgeColor = resolveBorderSideColor(edgeColor);
|
|
32
|
+
if (resolvedEdgeColor) styles.push(`border-${edge}-color: ${resolvedEdgeColor}`);
|
|
33
|
+
}
|
|
18
34
|
export function useBorder(props, name = getCurrentInstanceName()) {
|
|
19
35
|
const borderClasses = computed(() => {
|
|
20
36
|
const border = isRef(props) ? props.value : props.border;
|
|
@@ -80,23 +96,11 @@ export function useBorder(props, name = getCurrentInstanceName()) {
|
|
|
80
96
|
if (parsed) styles.push(...formatBorderPositionStylesVar(axis, parsed));
|
|
81
97
|
}
|
|
82
98
|
});
|
|
99
|
+
BORDER_LOGICAL_SIDE_MAP.forEach(({ side, widthProp, colorProp }) => {
|
|
100
|
+
pushEdgeDeclarations(styles, side, props[widthProp], props[colorProp]);
|
|
101
|
+
});
|
|
83
102
|
BORDER_POSITION_MAP.forEach(({ side, widthProp, colorProp }) => {
|
|
84
|
-
|
|
85
|
-
const sideColor = props[colorProp];
|
|
86
|
-
if (typeof sideValue === "number") {
|
|
87
|
-
styles.push(`border-${side}-width: ${convertToUnit(sideValue)}`);
|
|
88
|
-
styles.push(`border-${side}-style: solid`);
|
|
89
|
-
styles.push(`border-${side}-color: currentColor`);
|
|
90
|
-
} else if (sideValue === true) {
|
|
91
|
-
styles.push(`border-${side}-width: var(--origam-border__width---thin)`);
|
|
92
|
-
styles.push(`border-${side}-style: solid`);
|
|
93
|
-
styles.push(`border-${side}-color: currentColor`);
|
|
94
|
-
} else if (typeof sideValue === "string" && sideValue !== "") {
|
|
95
|
-
const parsed = parseBorderPositionValue(sideValue);
|
|
96
|
-
if (parsed) styles.push(...formatBorderPositionStylesVar(side, parsed));
|
|
97
|
-
}
|
|
98
|
-
const resolvedSideColor = resolveBorderSideColor(sideColor);
|
|
99
|
-
if (resolvedSideColor) styles.push(`border-${side}-color: ${resolvedSideColor}`);
|
|
103
|
+
pushEdgeDeclarations(styles, side, props[widthProp], props[colorProp]);
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
return styles;
|
|
@@ -49,6 +49,13 @@ function useMargin(props, name = (0, _getCurrentInstance.getCurrentInstanceName)
|
|
|
49
49
|
const resolved = (0, _spacing2.resolveSpacingValue)(props[prop]);
|
|
50
50
|
if (resolved) styles.push(`margin-${axis}: ${resolved}`);
|
|
51
51
|
});
|
|
52
|
+
_spacing.MARGIN_LOGICAL_SIDE_MAP.forEach(({
|
|
53
|
+
side,
|
|
54
|
+
prop
|
|
55
|
+
}) => {
|
|
56
|
+
const resolved = (0, _spacing2.resolveSpacingValue)(props[prop]);
|
|
57
|
+
if (resolved) styles.push(`margin-${side}: ${resolved}`);
|
|
58
|
+
});
|
|
52
59
|
_spacing.MARGIN_POSITION_MAP.forEach(({
|
|
53
60
|
side,
|
|
54
61
|
prop
|
|
@@ -11,13 +11,19 @@ import type { IMarginProps } from '../../interfaces/Commons/margin.interface';
|
|
|
11
11
|
*
|
|
12
12
|
* 1. global `margin` shorthand (1/2/4-value, logical properties)
|
|
13
13
|
* 2. logical-axis `marginBlock` / `marginInline`
|
|
14
|
-
* 3.
|
|
14
|
+
* 3. logical per-side `marginInlineStart` / `marginInlineEnd` /
|
|
15
|
+
* `marginBlockStart` / `marginBlockEnd` (issue #1013)
|
|
16
|
+
* 4. physical per-side `marginTop` / `marginRight` / `marginBottom` /
|
|
15
17
|
* `marginLeft`
|
|
16
18
|
*
|
|
17
19
|
* So `marginBlock` beats `margin` for the top+bottom edges, and
|
|
18
20
|
* `marginTop` beats both `margin` and `marginBlock` for the top edge
|
|
19
21
|
* specifically.
|
|
20
22
|
*
|
|
23
|
+
* ⚠️ RUNGS 3 AND 4 ARE EQUALLY SPECIFIC — the physical spelling wins for
|
|
24
|
+
* the edge they share, by push order. Same decision and same reasoning as
|
|
25
|
+
* `usePadding`'s table, which carries the full rationale.
|
|
26
|
+
*
|
|
21
27
|
* ⚠️ The 4-value `margin` shorthand distributes in the DS's
|
|
22
28
|
* **Haut/Gauche/Bas/Droite** order, NOT the CSS clockwise order — an
|
|
23
29
|
* intentional convention arbitrated in issue #216 (see
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import { MARGIN_REGEX } from "../../consts/Commons/margin.const.js";
|
|
3
|
-
import { MARGIN_LOGICAL_AXIS_MAP, MARGIN_POSITION_MAP, SPACING_SCALE_STEPS } from "../../consts/Commons/spacing.const.js";
|
|
3
|
+
import { MARGIN_LOGICAL_AXIS_MAP, MARGIN_LOGICAL_SIDE_MAP, MARGIN_POSITION_MAP, SPACING_SCALE_STEPS } from "../../consts/Commons/spacing.const.js";
|
|
4
4
|
import { convertToUnit } from "../../utils/Commons/commons.util.js";
|
|
5
5
|
import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
|
|
6
6
|
import { formatMarginStylesVar } from "../../utils/Commons/margin.util.js";
|
|
@@ -40,6 +40,10 @@ export function useMargin(props, name = getCurrentInstanceName()) {
|
|
|
40
40
|
const resolved = resolveSpacingValue(props[prop]);
|
|
41
41
|
if (resolved) styles.push(`margin-${axis}: ${resolved}`);
|
|
42
42
|
});
|
|
43
|
+
MARGIN_LOGICAL_SIDE_MAP.forEach(({ side, prop }) => {
|
|
44
|
+
const resolved = resolveSpacingValue(props[prop]);
|
|
45
|
+
if (resolved) styles.push(`margin-${side}: ${resolved}`);
|
|
46
|
+
});
|
|
43
47
|
MARGIN_POSITION_MAP.forEach(({ side, prop }) => {
|
|
44
48
|
const resolved = resolveSpacingValue(props[prop]);
|
|
45
49
|
if (resolved) styles.push(`margin-${side}: ${resolved}`);
|
|
@@ -49,6 +49,13 @@ function usePadding(props, name = (0, _getCurrentInstance.getCurrentInstanceName
|
|
|
49
49
|
const resolved = (0, _spacing2.resolveSpacingValue)(props[prop]);
|
|
50
50
|
if (resolved) styles.push(`padding-${axis}: ${resolved}`);
|
|
51
51
|
});
|
|
52
|
+
_spacing.PADDING_LOGICAL_SIDE_MAP.forEach(({
|
|
53
|
+
side,
|
|
54
|
+
prop
|
|
55
|
+
}) => {
|
|
56
|
+
const resolved = (0, _spacing2.resolveSpacingValue)(props[prop]);
|
|
57
|
+
if (resolved) styles.push(`padding-${side}: ${resolved}`);
|
|
58
|
+
});
|
|
52
59
|
_spacing.PADDING_POSITION_MAP.forEach(({
|
|
53
60
|
side,
|
|
54
61
|
prop
|
|
@@ -12,7 +12,9 @@ import type { IPaddingProps } from '../../interfaces/Commons/padding.interface';
|
|
|
12
12
|
*
|
|
13
13
|
* 1. global `padding` shorthand (1/2/4-value, logical properties)
|
|
14
14
|
* 2. logical-axis `paddingBlock` / `paddingInline`
|
|
15
|
-
* 3.
|
|
15
|
+
* 3. logical per-side `paddingInlineStart` / `paddingInlineEnd` /
|
|
16
|
+
* `paddingBlockStart` / `paddingBlockEnd` (issue #1013)
|
|
17
|
+
* 4. physical per-side `paddingTop` / `paddingRight` / `paddingBottom` /
|
|
16
18
|
* `paddingLeft`
|
|
17
19
|
*
|
|
18
20
|
* So `paddingBlock` beats `padding` for the top+bottom edges, and
|
|
@@ -20,6 +22,18 @@ import type { IPaddingProps } from '../../interfaces/Commons/padding.interface';
|
|
|
20
22
|
* specifically — each rung only overrides the edge(s) it actually
|
|
21
23
|
* targets, everything else keeps cascading from the rung below.
|
|
22
24
|
*
|
|
25
|
+
* ⚠️ RUNGS 3 AND 4 ARE EQUALLY SPECIFIC, and that is the one rank in this
|
|
26
|
+
* table that is a decision rather than a deduction. `paddingInlineStart`
|
|
27
|
+
* and `paddingLeft` name the SAME edge under LTR horizontal-tb, so neither
|
|
28
|
+
* is narrower than the other; push order alone decides, and we put the
|
|
29
|
+
* physical one last. The reason is uniformity, not a claim that physical
|
|
30
|
+
* is better: `ROUNDED_CORNER_MAP`'s header already documents the repo's
|
|
31
|
+
* only other physical-vs-logical tiebreak resolving the same way, and two
|
|
32
|
+
* opposite conventions across one prop surface is exactly the "half a
|
|
33
|
+
* grid" that issue #1013 exists to remove. Settling it here rather than
|
|
34
|
+
* leaving it emergent also matters because `useBorder` has to make the
|
|
35
|
+
* identical call for `borderInlineStart` vs `borderLeft`.
|
|
36
|
+
*
|
|
23
37
|
* ⚠️ The 4-value `padding` shorthand distributes in the DS's
|
|
24
38
|
* **Haut/Gauche/Bas/Droite** order, NOT the CSS clockwise order — an
|
|
25
39
|
* intentional convention arbitrated in issue #216 (see
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import { PADDING_REGEX } from "../../consts/Commons/padding.const.js";
|
|
3
|
-
import { PADDING_LOGICAL_AXIS_MAP, PADDING_POSITION_MAP, SPACING_SCALE_STEPS } from "../../consts/Commons/spacing.const.js";
|
|
3
|
+
import { PADDING_LOGICAL_AXIS_MAP, PADDING_LOGICAL_SIDE_MAP, PADDING_POSITION_MAP, SPACING_SCALE_STEPS } from "../../consts/Commons/spacing.const.js";
|
|
4
4
|
import { convertToUnit } from "../../utils/Commons/commons.util.js";
|
|
5
5
|
import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
|
|
6
6
|
import { formatPaddingStylesVar } from "../../utils/Commons/padding.util.js";
|
|
@@ -40,6 +40,10 @@ export function usePadding(props, name = getCurrentInstanceName()) {
|
|
|
40
40
|
const resolved = resolveSpacingValue(props[prop]);
|
|
41
41
|
if (resolved) styles.push(`padding-${axis}: ${resolved}`);
|
|
42
42
|
});
|
|
43
|
+
PADDING_LOGICAL_SIDE_MAP.forEach(({ side, prop }) => {
|
|
44
|
+
const resolved = resolveSpacingValue(props[prop]);
|
|
45
|
+
if (resolved) styles.push(`padding-${side}: ${resolved}`);
|
|
46
|
+
});
|
|
43
47
|
PADDING_POSITION_MAP.forEach(({ side, prop }) => {
|
|
44
48
|
const resolved = resolveSpacingValue(props[prop]);
|
|
45
49
|
if (resolved) styles.push(`padding-${side}: ${resolved}`);
|
|
@@ -68,6 +68,13 @@ function useRounded(props, name = (0, _getCurrentInstance.getCurrentInstanceName
|
|
|
68
68
|
const rounded = (0, _vue.isRef)(props) ? props.value : props.rounded;
|
|
69
69
|
const styles = shorthandStyles(rounded);
|
|
70
70
|
if (!(0, _vue.isRef)(props)) {
|
|
71
|
+
_spacing.ROUNDED_LOGICAL_CORNER_MAP.forEach(({
|
|
72
|
+
corner,
|
|
73
|
+
prop
|
|
74
|
+
}) => {
|
|
75
|
+
const resolved = (0, _spacing2.resolveRoundedCornerValue)(props[prop]);
|
|
76
|
+
if (resolved) styles.push(`border-${corner}-radius: ${resolved}`);
|
|
77
|
+
});
|
|
71
78
|
_spacing.ROUNDED_CORNER_MAP.forEach(({
|
|
72
79
|
corner,
|
|
73
80
|
prop
|
|
@@ -16,12 +16,25 @@ import type { TRounded } from '../../types/Commons/rounded.type';
|
|
|
16
16
|
*
|
|
17
17
|
* 1. global `rounded` (utility rung, named variant, legacy boolean, or
|
|
18
18
|
* free-form 1/4-value CSS)
|
|
19
|
-
* 2. per-corner `
|
|
19
|
+
* 2. LOGICAL per-corner `roundedStartStart` / `roundedStartEnd` /
|
|
20
|
+
* `roundedEndStart` / `roundedEndEnd` (issue #1013)
|
|
21
|
+
* 3. PHYSICAL per-corner `roundedTopLeft` / `roundedTopRight` /
|
|
20
22
|
* `roundedBottomLeft` / `roundedBottomRight`
|
|
21
23
|
*
|
|
22
24
|
* So `roundedTopLeft="0px"` beats `rounded="lg"` for the top-left corner
|
|
23
25
|
* only; the other three keep the `lg` rung.
|
|
24
26
|
*
|
|
27
|
+
* ⚠️ RUNGS 2 AND 3 ARE EQUALLY SPECIFIC — `roundedStartStart` and
|
|
28
|
+
* `roundedTopLeft` are the same corner under LTR horizontal-tb, so push
|
|
29
|
+
* order alone decides and the physical one is last. Same decision, same
|
|
30
|
+
* reasoning as `usePadding`'s rungs 3/4, which carries the full rationale;
|
|
31
|
+
* it also matches what `ROUNDED_CORNER_MAP`'s own header already said
|
|
32
|
+
* about the physical corners beating the shorthand's logical output.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ The logical corner names read `{block}-{inline}`: `startEnd` is
|
|
35
|
+
* block-start inline-end — top-RIGHT in LTR. They are NOT the physical
|
|
36
|
+
* clockwise order, and the two halves are not interchangeable.
|
|
37
|
+
*
|
|
25
38
|
* ⚠️ This example used to read `roundedTopLeft="0"`, and that form does
|
|
26
39
|
* NOT work — measured: `{rounded:'lg', roundedTopLeft:'0'}` emits the
|
|
27
40
|
* shorthand declaration ALONE. The bare string `"0"` is neither a utility
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, isRef } from "vue";
|
|
2
2
|
import { BORDER_RADIUS_REGEX, PREDEFINED_ROUNDED } from "../../consts/Commons/rounded.const.js";
|
|
3
|
-
import { NAMED_RADIUS_TOKEN, ROUNDED_CORNER_MAP, UTILITY_RADIUS_FALLBACK } from "../../consts/Commons/spacing.const.js";
|
|
3
|
+
import { NAMED_RADIUS_TOKEN, ROUNDED_CORNER_MAP, ROUNDED_LOGICAL_CORNER_MAP, UTILITY_RADIUS_FALLBACK } from "../../consts/Commons/spacing.const.js";
|
|
4
4
|
import { convertToUnit } from "../../utils/Commons/commons.util.js";
|
|
5
5
|
import { getCurrentInstanceName } from "../../utils/Commons/getCurrentInstance.util.js";
|
|
6
6
|
import { formatRoundedStylesVar, isCustomBorderRadius } from "../../utils/Commons/rounded.util.js";
|
|
@@ -62,6 +62,10 @@ export function useRounded(props, name = getCurrentInstanceName()) {
|
|
|
62
62
|
const rounded = isRef(props) ? props.value : props.rounded;
|
|
63
63
|
const styles = shorthandStyles(rounded);
|
|
64
64
|
if (!isRef(props)) {
|
|
65
|
+
ROUNDED_LOGICAL_CORNER_MAP.forEach(({ corner, prop }) => {
|
|
66
|
+
const resolved = resolveRoundedCornerValue(props[prop]);
|
|
67
|
+
if (resolved) styles.push(`border-${corner}-radius: ${resolved}`);
|
|
68
|
+
});
|
|
65
69
|
ROUNDED_CORNER_MAP.forEach(({ corner, prop }) => {
|
|
66
70
|
const resolved = resolveRoundedCornerValue(props[prop]);
|
|
67
71
|
if (resolved) styles.push(`border-${corner}-radius: ${resolved}`);
|
|
@@ -119,6 +119,18 @@ function useStateEffect(props, isHover = noopRef, isActive = noopRef, hoverState
|
|
|
119
119
|
get borderInline() {
|
|
120
120
|
return props.borderInline;
|
|
121
121
|
},
|
|
122
|
+
get borderBlockStart() {
|
|
123
|
+
return props.borderBlockStart;
|
|
124
|
+
},
|
|
125
|
+
get borderBlockEnd() {
|
|
126
|
+
return props.borderBlockEnd;
|
|
127
|
+
},
|
|
128
|
+
get borderInlineStart() {
|
|
129
|
+
return props.borderInlineStart;
|
|
130
|
+
},
|
|
131
|
+
get borderInlineEnd() {
|
|
132
|
+
return props.borderInlineEnd;
|
|
133
|
+
},
|
|
122
134
|
get borderTop() {
|
|
123
135
|
return props.borderTop;
|
|
124
136
|
},
|
|
@@ -142,6 +154,18 @@ function useStateEffect(props, isHover = noopRef, isActive = noopRef, hoverState
|
|
|
142
154
|
},
|
|
143
155
|
get borderLeftColor() {
|
|
144
156
|
return props.borderLeftColor;
|
|
157
|
+
},
|
|
158
|
+
get borderBlockStartColor() {
|
|
159
|
+
return props.borderBlockStartColor;
|
|
160
|
+
},
|
|
161
|
+
get borderBlockEndColor() {
|
|
162
|
+
return props.borderBlockEndColor;
|
|
163
|
+
},
|
|
164
|
+
get borderInlineStartColor() {
|
|
165
|
+
return props.borderInlineStartColor;
|
|
166
|
+
},
|
|
167
|
+
get borderInlineEndColor() {
|
|
168
|
+
return props.borderInlineEndColor;
|
|
145
169
|
}
|
|
146
170
|
}));
|
|
147
171
|
const {
|
|
@@ -162,6 +186,18 @@ function useStateEffect(props, isHover = noopRef, isActive = noopRef, hoverState
|
|
|
162
186
|
},
|
|
163
187
|
get roundedBottomRight() {
|
|
164
188
|
return props.roundedBottomRight;
|
|
189
|
+
},
|
|
190
|
+
get roundedStartStart() {
|
|
191
|
+
return props.roundedStartStart;
|
|
192
|
+
},
|
|
193
|
+
get roundedStartEnd() {
|
|
194
|
+
return props.roundedStartEnd;
|
|
195
|
+
},
|
|
196
|
+
get roundedEndStart() {
|
|
197
|
+
return props.roundedEndStart;
|
|
198
|
+
},
|
|
199
|
+
get roundedEndEnd() {
|
|
200
|
+
return props.roundedEndEnd;
|
|
165
201
|
}
|
|
166
202
|
}));
|
|
167
203
|
const {
|
|
@@ -192,6 +228,18 @@ function useStateEffect(props, isHover = noopRef, isActive = noopRef, hoverState
|
|
|
192
228
|
},
|
|
193
229
|
get paddingInline() {
|
|
194
230
|
return props.paddingInline;
|
|
231
|
+
},
|
|
232
|
+
get paddingInlineStart() {
|
|
233
|
+
return props.paddingInlineStart;
|
|
234
|
+
},
|
|
235
|
+
get paddingInlineEnd() {
|
|
236
|
+
return props.paddingInlineEnd;
|
|
237
|
+
},
|
|
238
|
+
get paddingBlockStart() {
|
|
239
|
+
return props.paddingBlockStart;
|
|
240
|
+
},
|
|
241
|
+
get paddingBlockEnd() {
|
|
242
|
+
return props.paddingBlockEnd;
|
|
195
243
|
}
|
|
196
244
|
}));
|
|
197
245
|
const {
|
|
@@ -218,6 +266,18 @@ function useStateEffect(props, isHover = noopRef, isActive = noopRef, hoverState
|
|
|
218
266
|
},
|
|
219
267
|
get marginInline() {
|
|
220
268
|
return props.marginInline;
|
|
269
|
+
},
|
|
270
|
+
get marginInlineStart() {
|
|
271
|
+
return props.marginInlineStart;
|
|
272
|
+
},
|
|
273
|
+
get marginInlineEnd() {
|
|
274
|
+
return props.marginInlineEnd;
|
|
275
|
+
},
|
|
276
|
+
get marginBlockStart() {
|
|
277
|
+
return props.marginBlockStart;
|
|
278
|
+
},
|
|
279
|
+
get marginBlockEnd() {
|
|
280
|
+
return props.marginBlockEnd;
|
|
221
281
|
}
|
|
222
282
|
}));
|
|
223
283
|
const gapStyles = (0, _vue.computed)(() => {
|