@gem-sdk/core 1.14.0-dev.397 → 1.14.0-dev.398
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var constant=require("../web-components/src/helpers/styles/constant.js");const TEXT_TOTAL_SPACING=3,composePostionIconList=(e,o
|
|
1
|
+
"use strict";var constant=require("../web-components/src/helpers/styles/constant.js");const TEXT_TOTAL_SPACING=3,composePostionIconList=(e,t,o)=>{let i={};return composePositionLineHeight({compose:i,lineHeight:e,device:"desktop",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"tablet",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"mobile",position:t,iconWidth:o}),i},composePositionLineHeight=({compose:e,lineHeight:t,device:o,position:i,iconWidth:s})=>{let n=i?.[o],c=s?.[o];if(n){let i=constant.devicesMapping[o]??"";if("center"===n)e.wrapper={...e.wrapper,[`--ai${i}`]:"center"},e.content={...e.content,[`--pos${i}`]:"static"};else if(c){let o=parseFloat(t.replaceAll(/[a-zA-Z]/g,""))/2+3-c/2;e.wrapper={...e.wrapper,[`--ai${i}`]:"flex-start"},e.content={...e.content,[`--top${i}`]:`${Math.max(0,Math.ceil(o))}px`,[`--pos${i}`]:"relative"}}}};exports.composePositionLineHeight=composePositionLineHeight,exports.composePostionIconList=composePostionIconList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devicesMapping as e}from"../web-components/src/helpers/styles/constant.js";let TEXT_TOTAL_SPACING=3,composePostionIconList=(e,t,o)=>{let i={};return composePositionLineHeight({compose:i,lineHeight:e,device:"desktop",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"tablet",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"mobile",position:t,iconWidth:o}),i},composePositionLineHeight=({compose:t,lineHeight:o,device:i,position:
|
|
1
|
+
import{devicesMapping as e}from"../web-components/src/helpers/styles/constant.js";let TEXT_TOTAL_SPACING=3,composePostionIconList=(e,t,o)=>{let i={};return composePositionLineHeight({compose:i,lineHeight:e,device:"desktop",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"tablet",position:t,iconWidth:o}),composePositionLineHeight({compose:i,lineHeight:e,device:"mobile",position:t,iconWidth:o}),i},composePositionLineHeight=({compose:t,lineHeight:o,device:i,position:s,iconWidth:n})=>{let p=s?.[i],c=n?.[i];if(p){let s=e[i]??"";if("center"===p)t.wrapper={...t.wrapper,[`--ai${s}`]:"center"},t.content={...t.content,[`--pos${s}`]:"static"};else if(c){let e=parseFloat(o.replaceAll(/[a-zA-Z]/g,""))/2+3-c/2;t.wrapper={...t.wrapper,[`--ai${s}`]:"flex-start"},t.content={...t.content,[`--top${s}`]:`${Math.max(0,Math.ceil(e))}px`,[`--pos${s}`]:"relative"}}}};export{composePositionLineHeight,composePostionIconList};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -960,7 +960,17 @@ type DropdownInput<T> = SharedControlType<T> & {
|
|
|
960
960
|
}[];
|
|
961
961
|
};
|
|
962
962
|
|
|
963
|
-
type
|
|
963
|
+
type Dropdown<T> = SharedControlType<T> & {
|
|
964
|
+
type: 'dropdown';
|
|
965
|
+
inputType?: 'text';
|
|
966
|
+
displayOptions?: {
|
|
967
|
+
label: string;
|
|
968
|
+
value: string;
|
|
969
|
+
icon?: string;
|
|
970
|
+
}[];
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T>;
|
|
964
974
|
type Setting<P extends BaseProps> = {
|
|
965
975
|
id: 'setting';
|
|
966
976
|
note?: string;
|