deepsea-components 5.7.9 → 5.7.10
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/FormLabel.tsx"],
|
|
4
|
-
"sourcesContent": ["\"use client\"\n\nimport { ComponentPropsWithoutRef, FC, Fragment, ReactNode, createContext, useContext } from \"react\"\n\nexport type FormLabelConfig = {\n /**\n * Label 的宽度.\n */\n width
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport { ComponentPropsWithoutRef, FC, Fragment, ReactNode, createContext, useContext } from \"react\"\n\nexport type FormLabelConfig = {\n /**\n * Label 的宽度.\n */\n width?: number\n /**\n * 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启\n */\n before?: boolean | number\n}\n\nexport type FormLabelProps = ComponentPropsWithoutRef<\"div\"> & FormLabelConfig\n\nexport const FormLabelConfigContext = createContext<Partial<FormLabelConfig>>({})\n\nexport type FormLabelConfigProviderProps = FormLabelConfig & {\n children?: ReactNode\n}\n\nexport const FormLabelConfigProvider: FC<FormLabelConfigProviderProps> = ({ width, before, children }) => (\n <FormLabelConfigContext.Provider value={{ width, before }}>{children}</FormLabelConfigContext.Provider>\n)\n\n/**\n * 为 Ant Design 的 FormItem 设计的 Label 组件\n */\nexport const FormLabel: FC<FormLabelProps> = props => {\n const { width: _width, before: _before } = useContext(FormLabelConfigContext)\n const { style, width = _width, before = _before, ...rest } = props\n\n return (\n <Fragment>\n {!!before && <div style={{ width: 11, color: \"transparent\" }}> </div>}\n <div style={{ width, textAlign: \"justify\", textAlignLast: \"justify\", ...style }} {...rest} />\n </Fragment>\n )\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA6F;AAetF,IAAM,6BAAyB,4BAAwC,CAAC,CAAC;AAMzE,IAAM,0BAA4D,CAAC,EAAE,OAAO,QAAQ,SAAS,MAChG,oCAAC,uBAAuB,UAAvB,EAAgC,OAAO,EAAE,OAAO,OAAO,KAAI,QAAS;AAMlE,IAAM,YAAgC,WAAS;AAClD,QAAM,EAAE,OAAO,QAAQ,QAAQ,QAAQ,QAAI,yBAAW,sBAAsB;AAC5E,QAAM,EAAE,OAAO,QAAQ,QAAQ,SAAS,SAAS,GAAG,KAAK,IAAI;AAE7D,SACI,oCAAC,6BACI,CAAC,CAAC,UAAU,oCAAC,SAAI,OAAO,EAAE,OAAO,IAAI,OAAO,cAAc,KAAG,GAAM,GACpE,oCAAC,SAAI,OAAO,EAAE,OAAO,WAAW,WAAW,eAAe,WAAW,GAAG,MAAM,GAAI,GAAG,MAAM,CAC/F;AAER;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Fragment","createContext","useContext","jsx","_jsx","jsxs","_jsxs","FormLabelConfigContext","FormLabelConfigProvider","width","before","children","Provider","value","FormLabel","props","_width","_before","style","rest","color","textAlign","textAlignLast"],"sources":["../../../src/components/FormLabel.tsx"],"sourcesContent":["\"use client\"\n\nimport { ComponentPropsWithoutRef, FC, Fragment, ReactNode, createContext, useContext } from \"react\"\n\nexport type FormLabelConfig = {\n /**\n * Label 的宽度.\n */\n width
|
|
1
|
+
{"version":3,"names":["Fragment","createContext","useContext","jsx","_jsx","jsxs","_jsxs","FormLabelConfigContext","FormLabelConfigProvider","width","before","children","Provider","value","FormLabel","props","_width","_before","style","rest","color","textAlign","textAlignLast"],"sources":["../../../src/components/FormLabel.tsx"],"sourcesContent":["\"use client\"\n\nimport { ComponentPropsWithoutRef, FC, Fragment, ReactNode, createContext, useContext } from \"react\"\n\nexport type FormLabelConfig = {\n /**\n * Label 的宽度.\n */\n width?: number\n /**\n * 是否在 Label 前面添加一个空白区域,只有当前 Label 为非必选,而存在其他 Label 为必选的时候开启\n */\n before?: boolean | number\n}\n\nexport type FormLabelProps = ComponentPropsWithoutRef<\"div\"> & FormLabelConfig\n\nexport const FormLabelConfigContext = createContext<Partial<FormLabelConfig>>({})\n\nexport type FormLabelConfigProviderProps = FormLabelConfig & {\n children?: ReactNode\n}\n\nexport const FormLabelConfigProvider: FC<FormLabelConfigProviderProps> = ({ width, before, children }) => (\n <FormLabelConfigContext.Provider value={{ width, before }}>{children}</FormLabelConfigContext.Provider>\n)\n\n/**\n * 为 Ant Design 的 FormItem 设计的 Label 组件\n */\nexport const FormLabel: FC<FormLabelProps> = props => {\n const { width: _width, before: _before } = useContext(FormLabelConfigContext)\n const { style, width = _width, before = _before, ...rest } = props\n\n return (\n <Fragment>\n {!!before && <div style={{ width: 11, color: \"transparent\" }}> </div>}\n <div style={{ width, textAlign: \"justify\", textAlignLast: \"justify\", ...style }} {...rest} />\n </Fragment>\n )\n}\n"],"mappings":"AAAA,YAAY;;AAEZ,SAAuCA,QAAQ,EAAaC,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAepG,OAAO,MAAMC,sBAAsB,gBAAGN,aAAa,CAA2B,CAAC,CAAC,CAAC;AAMjF,OAAO,MAAMO,uBAAyD,GAAGA,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAEC;AAAS,CAAC,kBACjGP,IAAA,CAACG,sBAAsB,CAACK,QAAQ;EAACC,KAAK,EAAE;IAAEJ,KAAK;IAAEC;EAAO,CAAE;EAAAC,QAAA,EAAEA;AAAQ,CAAkC,CACzG;;AAED;AACA;AACA;AACA,OAAO,MAAMG,SAA6B,GAAGC,KAAK,IAAI;EAClD,MAAM;IAAEN,KAAK,EAAEO,MAAM;IAAEN,MAAM,EAAEO;EAAQ,CAAC,GAAGf,UAAU,CAACK,sBAAsB,CAAC;EAC7E,MAAM;IAAEW,KAAK;IAAET,KAAK,GAAGO,MAAM;IAAEN,MAAM,GAAGO,OAAO;IAAE,GAAGE;EAAK,CAAC,GAAGJ,KAAK;EAElE,oBACIT,KAAA,CAACN,QAAQ;IAAAW,QAAA,GACJ,CAAC,CAACD,MAAM,iBAAIN,IAAA;MAAKc,KAAK,EAAE;QAAET,KAAK,EAAE,EAAE;QAAEW,KAAK,EAAE;MAAc,CAAE;MAAAT,QAAA,EAAC;IAAM,CAAK,CAAC,eAC1EP,IAAA;MAAKc,KAAK,EAAE;QAAET,KAAK;QAAEY,SAAS,EAAE,SAAS;QAAEC,aAAa,EAAE,SAAS;QAAE,GAAGJ;MAAM,CAAE;MAAA,GAAKC;IAAI,CAAG,CAAC;EAAA,CACvF,CAAC;AAEnB,CAAC"}
|
package/package.json
CHANGED