@openedx/paragon 22.3.0 → 22.3.2
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/dist/SearchField/SearchFieldAdvanced.js +2 -2
- package/dist/SearchField/SearchFieldAdvanced.js.map +1 -1
- package/dist/SearchField/index.js +2 -2
- package/dist/SearchField/index.js.map +1 -1
- package/package.json +1 -1
- package/src/SearchField/SearchFieldAdvanced.jsx +2 -2
- package/src/SearchField/index.jsx +2 -2
- package/icons/es5/LmsEditsquare.js +0 -15
- package/icons/es5/LmsEditsquareComplete.js +0 -27
- package/icons/jsx/LmsEditsquare.jsx +0 -17
- package/icons/jsx/LmsEditsquareComplete.jsx +0 -27
|
@@ -151,8 +151,8 @@ SearchFieldAdvanced.propTypes = {
|
|
|
151
151
|
value: PropTypes.string,
|
|
152
152
|
/** specifies the icon element(s) to use for the clear and submit buttons. */
|
|
153
153
|
icons: PropTypes.shape({
|
|
154
|
-
submit: PropTypes.
|
|
155
|
-
clear: PropTypes.
|
|
154
|
+
submit: PropTypes.elementType.isRequired,
|
|
155
|
+
clear: PropTypes.elementType
|
|
156
156
|
}),
|
|
157
157
|
/** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component
|
|
158
158
|
* more than once on a page. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFieldAdvanced.js","names":["React","useRef","createContext","useState","useEffect","PropTypes","classNames","Search","Close","newId","SearchFieldContext","BUTTON_LOCATION_VARIANTS","SearchFieldAdvanced","props","children","className","screenReaderText","icons","onSubmit","onClear","onChange","onBlur","onFocus","initialValue","value","formAriaLabel","disabled","submitButtonLocation","rest","_objectWithoutProperties","_excluded","_useState","_useState2","_slicedToArray","hasFocus","setHasFocus","_useState3","_useState4","setValue","isInitialMount","inputId","concat","inputRef","submitButtonRef","current","handleSubmit","event","preventDefault","focus","handleClear","handleFocus","handleBlur","handleChange","target","createElement","_extends","role","onReset","Provider","refs","input","submitButton","propTypes","node","isRequired","func","string","shape","label","oneOfType","element","clearButton","submit","clear","bool","oneOf","defaultProps","undefined"],"sources":["../../src/SearchField/SearchFieldAdvanced.jsx"],"sourcesContent":["import React, {\n useRef, createContext, useState, useEffect,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Search, Close } from '../../icons';\nimport newId from '../utils/newId';\n\nexport const SearchFieldContext = createContext();\n\nconst BUTTON_LOCATION_VARIANTS = [\n 'internal',\n 'external',\n];\n\nfunction SearchFieldAdvanced(props) {\n const {\n children,\n className,\n screenReaderText,\n icons,\n onSubmit,\n onClear,\n onChange,\n onBlur,\n onFocus,\n value: initialValue,\n formAriaLabel,\n disabled,\n submitButtonLocation,\n ...rest\n } = props;\n\n const [hasFocus, setHasFocus] = useState(false);\n const [value, setValue] = useState(initialValue);\n\n const isInitialMount = useRef(true);\n const inputId = useRef(`${newId('pgn-searchfield-input-')}`);\n const inputRef = useRef();\n const submitButtonRef = useRef();\n\n useEffect(() => {\n setValue(initialValue);\n }, [initialValue]);\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n } else {\n onChange(value);\n }\n }, [value, onChange]);\n\n const handleSubmit = (event) => {\n event.preventDefault();\n onSubmit(value);\n if (submitButtonRef && submitButtonRef.current) {\n submitButtonRef.current.focus();\n }\n };\n\n const handleClear = () => {\n setValue('');\n onClear();\n if (inputRef && inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n const handleFocus = (event) => {\n setHasFocus(true);\n onFocus(event);\n };\n\n const handleBlur = (event) => {\n setHasFocus(false);\n onBlur(event);\n };\n\n const handleChange = (event) => {\n setValue(event.target.value);\n };\n\n return (\n <div\n className={classNames(\n 'pgn__searchfield',\n 'd-flex',\n {\n 'has-focus': hasFocus,\n disabled,\n 'pgn__searchfield--external': submitButtonLocation === 'external',\n },\n className,\n )}\n {...rest}\n >\n <form\n role=\"search\"\n onSubmit={handleSubmit}\n onReset={handleClear}\n className=\"pgn__searchfield-form\"\n aria-label={formAriaLabel}\n >\n <SearchFieldContext.Provider\n value={{\n inputId,\n screenReaderText,\n icons,\n value,\n disabled,\n handleFocus,\n handleBlur,\n handleChange,\n refs: {\n input: inputRef,\n submitButton: submitButtonRef,\n },\n }}\n >\n {children}\n </SearchFieldContext.Provider>\n </form>\n </div>\n );\n}\n\nSearchFieldAdvanced.propTypes = {\n /** specifies the nested child elements. At a minimum, `SearchField.Label` and `SearchField.Input` are required. */\n children: PropTypes.node.isRequired,\n /** specifies a callback function for when the `SearchField` is submitted by the user. For example:\n ```jsx\n <SearchField onSubmit={(value) => { console.log(value); } />\n ``` */\n onSubmit: PropTypes.func.isRequired,\n /** specifies a custom class name. */\n className: PropTypes.string,\n /** specifies a callback function for when the user loses focus in the `SearchField` component.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onBlur={event => console.log(event)} />\n ``` */\n onBlur: PropTypes.func,\n /** specifies a callback function for when the value in `SearchField` is changed by the user.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onChange={value => console.log(value)} />\n ``` */\n onChange: PropTypes.func,\n /** specifies a callback function for when the value in `SearchField` is cleared by the user.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onClear={() => console.log('search cleared')} />\n ``` */\n onClear: PropTypes.func,\n /** specifies a callback function for when the user focuses in the `SearchField` component.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onFocus={event => console.log(event)} />\n ``` */\n onFocus: PropTypes.func,\n /** specifies the screenreader text for both the clear and submit buttons (e.g., for i18n translations).\n * The default is `{ label: 'search', clearButton: 'clear search', searchButton: 'submit search' }`. */\n screenReaderText: PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n submitButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n clearButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n }),\n /** specifies the initial value for the input. The default is an empty string. */\n value: PropTypes.string,\n /** specifies the icon element(s) to use for the clear and submit buttons. */\n icons: PropTypes.shape({\n submit: PropTypes.element.isRequired,\n clear: PropTypes.element,\n }),\n /** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component\n * more than once on a page. */\n formAriaLabel: PropTypes.string,\n /** Specifies whether the `SearchField` is disabled. */\n disabled: PropTypes.bool,\n /** Controls whether the search button is internal as an icon or external as a button. */\n submitButtonLocation: PropTypes.oneOf(BUTTON_LOCATION_VARIANTS),\n};\n\nSearchFieldAdvanced.defaultProps = {\n className: undefined,\n formAriaLabel: undefined,\n value: '',\n screenReaderText: {\n label: 'search',\n submitButton: 'submit search',\n clearButton: 'clear search',\n },\n icons: {\n clear: Close,\n submit: Search,\n },\n onBlur: () => {},\n onChange: () => {},\n onFocus: () => {},\n onClear: () => {},\n disabled: false,\n submitButtonLocation: 'internal',\n};\n\nexport default SearchFieldAdvanced;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,IACVC,MAAM,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,SAAS,QACrC,OAAO;AACd,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,MAAM,EAAEC,KAAK,QAAQ,aAAa;AAC3C,OAAOC,KAAK,MAAM,gBAAgB;AAElC,OAAO,IAAMC,kBAAkB,gBAAGR,aAAa,CAAC,CAAC;AAEjD,IAAMS,wBAAwB,GAAG,CAC/B,UAAU,EACV,UAAU,CACX;AAED,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAClC,IACEC,QAAQ,GAcND,KAAK,CAdPC,QAAQ;IACRC,SAAS,GAaPF,KAAK,CAbPE,SAAS;IACTC,gBAAgB,GAYdH,KAAK,CAZPG,gBAAgB;IAChBC,KAAK,GAWHJ,KAAK,CAXPI,KAAK;IACLC,QAAQ,GAUNL,KAAK,CAVPK,QAAQ;IACRC,OAAO,GASLN,KAAK,CATPM,OAAO;IACPC,QAAQ,GAQNP,KAAK,CARPO,QAAQ;IACRC,MAAM,GAOJR,KAAK,CAPPQ,MAA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E,OAAO,CAAC;EACxE,CAAC,CAAC;EACF;EACA9C,KAAK,EAAEnB,SAAS,CAAC6D,MAAM;EACvB;EACAjD,KAAK,EAAEZ,SAAS,CAAC8D,KAAK,CAAC;IACrBK,MAAM,EAAEnE,SAAS,CAACiE,OAAO,CAACN,UAAU;IACpCS,KAAK,EAAEpE,SAAS,CAACiE;EACnB,CAAC,CAAC;EACF;AACF;EACE7C,aAAa,EAAEpB,SAAS,CAAC6D,MAAM;EAC/B;EACAxC,QAAQ,EAAErB,SAAS,CAACqE,IAAI;EACxB;EACA/C,oBAAoB,EAAEtB,SAAS,CAACsE,KAAK,CAAChE,wBAAwB;AAChE,CAAC;AAEDC,mBAAmB,CAACgE,YAAY,GAAG;EACjC7D,SAAS,EAAE8D,SAAS;EACpBpD,aAAa,EAAEoD,SAAS;EACxBrD,KAAK,EAAE,EAAE;EACTR,gBAAgB,EAAE;IAChBoD,KAAK,EAAE,QAAQ;IACfP,YAAY,EAAE,eAAe;IAC7BU,WAAW,EAAE;EACf,CAAC;EACDtD,KAAK,EAAE;IACLwD,KAAK,EAAEjE,KAAK;IACZgE,MAAM,EAAEjE;EACV,CAAC;EACDc,MAAM,EAAE,SAAAA,OAAA,EAAM,CAAC,CAAC;EAChBD,QAAQ,EAAE,SAAAA,SAAA,EAAM,CAAC,CAAC;EAClBE,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjBH,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjBO,QAAQ,EAAE,KAAK;EACfC,oBAAoB,EAAE;AACxB,CAAC;AAED,eAAef,mBAAmB"}
|
|
1
|
+
{"version":3,"file":"SearchFieldAdvanced.js","names":["React","useRef","createContext","useState","useEffect","PropTypes","classNames","Search","Close","newId","SearchFieldContext","BUTTON_LOCATION_VARIANTS","SearchFieldAdvanced","props","children","className","screenReaderText","icons","onSubmit","onClear","onChange","onBlur","onFocus","initialValue","value","formAriaLabel","disabled","submitButtonLocation","rest","_objectWithoutProperties","_excluded","_useState","_useState2","_slicedToArray","hasFocus","setHasFocus","_useState3","_useState4","setValue","isInitialMount","inputId","concat","inputRef","submitButtonRef","current","handleSubmit","event","preventDefault","focus","handleClear","handleFocus","handleBlur","handleChange","target","createElement","_extends","role","onReset","Provider","refs","input","submitButton","propTypes","node","isRequired","func","string","shape","label","oneOfType","element","clearButton","submit","elementType","clear","bool","oneOf","defaultProps","undefined"],"sources":["../../src/SearchField/SearchFieldAdvanced.jsx"],"sourcesContent":["import React, {\n useRef, createContext, useState, useEffect,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { Search, Close } from '../../icons';\nimport newId from '../utils/newId';\n\nexport const SearchFieldContext = createContext();\n\nconst BUTTON_LOCATION_VARIANTS = [\n 'internal',\n 'external',\n];\n\nfunction SearchFieldAdvanced(props) {\n const {\n children,\n className,\n screenReaderText,\n icons,\n onSubmit,\n onClear,\n onChange,\n onBlur,\n onFocus,\n value: initialValue,\n formAriaLabel,\n disabled,\n submitButtonLocation,\n ...rest\n } = props;\n\n const [hasFocus, setHasFocus] = useState(false);\n const [value, setValue] = useState(initialValue);\n\n const isInitialMount = useRef(true);\n const inputId = useRef(`${newId('pgn-searchfield-input-')}`);\n const inputRef = useRef();\n const submitButtonRef = useRef();\n\n useEffect(() => {\n setValue(initialValue);\n }, [initialValue]);\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n } else {\n onChange(value);\n }\n }, [value, onChange]);\n\n const handleSubmit = (event) => {\n event.preventDefault();\n onSubmit(value);\n if (submitButtonRef && submitButtonRef.current) {\n submitButtonRef.current.focus();\n }\n };\n\n const handleClear = () => {\n setValue('');\n onClear();\n if (inputRef && inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n const handleFocus = (event) => {\n setHasFocus(true);\n onFocus(event);\n };\n\n const handleBlur = (event) => {\n setHasFocus(false);\n onBlur(event);\n };\n\n const handleChange = (event) => {\n setValue(event.target.value);\n };\n\n return (\n <div\n className={classNames(\n 'pgn__searchfield',\n 'd-flex',\n {\n 'has-focus': hasFocus,\n disabled,\n 'pgn__searchfield--external': submitButtonLocation === 'external',\n },\n className,\n )}\n {...rest}\n >\n <form\n role=\"search\"\n onSubmit={handleSubmit}\n onReset={handleClear}\n className=\"pgn__searchfield-form\"\n aria-label={formAriaLabel}\n >\n <SearchFieldContext.Provider\n value={{\n inputId,\n screenReaderText,\n icons,\n value,\n disabled,\n handleFocus,\n handleBlur,\n handleChange,\n refs: {\n input: inputRef,\n submitButton: submitButtonRef,\n },\n }}\n >\n {children}\n </SearchFieldContext.Provider>\n </form>\n </div>\n );\n}\n\nSearchFieldAdvanced.propTypes = {\n /** specifies the nested child elements. At a minimum, `SearchField.Label` and `SearchField.Input` are required. */\n children: PropTypes.node.isRequired,\n /** specifies a callback function for when the `SearchField` is submitted by the user. For example:\n ```jsx\n <SearchField onSubmit={(value) => { console.log(value); } />\n ``` */\n onSubmit: PropTypes.func.isRequired,\n /** specifies a custom class name. */\n className: PropTypes.string,\n /** specifies a callback function for when the user loses focus in the `SearchField` component.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onBlur={event => console.log(event)} />\n ``` */\n onBlur: PropTypes.func,\n /** specifies a callback function for when the value in `SearchField` is changed by the user.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onChange={value => console.log(value)} />\n ``` */\n onChange: PropTypes.func,\n /** specifies a callback function for when the value in `SearchField` is cleared by the user.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onClear={() => console.log('search cleared')} />\n ``` */\n onClear: PropTypes.func,\n /** specifies a callback function for when the user focuses in the `SearchField` component.\n * The default is an empty function. For example:\n ```jsx\n <SearchField onFocus={event => console.log(event)} />\n ``` */\n onFocus: PropTypes.func,\n /** specifies the screenreader text for both the clear and submit buttons (e.g., for i18n translations).\n * The default is `{ label: 'search', clearButton: 'clear search', searchButton: 'submit search' }`. */\n screenReaderText: PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n submitButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n clearButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n }),\n /** specifies the initial value for the input. The default is an empty string. */\n value: PropTypes.string,\n /** specifies the icon element(s) to use for the clear and submit buttons. */\n icons: PropTypes.shape({\n submit: PropTypes.elementType.isRequired,\n clear: PropTypes.elementType,\n }),\n /** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component\n * more than once on a page. */\n formAriaLabel: PropTypes.string,\n /** Specifies whether the `SearchField` is disabled. */\n disabled: PropTypes.bool,\n /** Controls whether the search button is internal as an icon or external as a button. */\n submitButtonLocation: PropTypes.oneOf(BUTTON_LOCATION_VARIANTS),\n};\n\nSearchFieldAdvanced.defaultProps = {\n className: undefined,\n formAriaLabel: undefined,\n value: '',\n screenReaderText: {\n label: 'search',\n submitButton: 'submit search',\n clearButton: 'clear search',\n },\n icons: {\n clear: Close,\n submit: Search,\n },\n onBlur: () => {},\n onChange: () => {},\n onFocus: () => {},\n onClear: () => {},\n disabled: false,\n submitButtonLocation: 'internal',\n};\n\nexport default SearchFieldAdvanced;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,IACVC,MAAM,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,SAAS,QACrC,OAAO;AACd,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,MAAM,EAAEC,KAAK,QAAQ,aAAa;AAC3C,OAAOC,KAAK,MAAM,gBAAgB;AAElC,OAAO,IAAMC,kBAAkB,gBAAGR,aAAa,CAAC,CAAC;AAEjD,IAAMS,wBAAwB,GAAG,CAC/B,UAAU,EACV,UAAU,CACX;AAED,SAASC,mBAAmBA,CAACC,KAAK,EAAE;EAClC,IACEC,QAAQ,GAcND,KAAK,CAdPC,QAAQ;IACRC,SAAS,GAaPF,KAAK,CAbPE,SAAS;IACTC,gBAAgB,GAYdH,KAAK,CAZPG,gBAAgB;I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
|
|
114
114
|
* ```
|
|
115
115
|
*/
|
|
116
116
|
icons: PropTypes.shape({
|
|
117
|
-
submit: PropTypes.
|
|
118
|
-
clear: PropTypes.
|
|
117
|
+
submit: PropTypes.elementType.isRequired,
|
|
118
|
+
clear: PropTypes.elementType
|
|
119
119
|
}),
|
|
120
120
|
/**
|
|
121
121
|
* Specifies the aria-label attribute on the form element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","Search","Close","SearchFieldAdvanced","SearchFieldContext","SearchFieldLabel","SearchFieldInput","SearchFieldClearButton","SearchFieldSubmitButton","SEARCH_FIELD_SCREEN_READER_TEXT_LABEL","SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON","SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON","SEARCH_FIELD_BUTTON_TEXT","STYLE_VARIANTS","BUTTON_LOCATION_VARIANTS","SearchField","props","label","placeholder","inputProps","variant","submitButtonLocation","buttonText","others","_objectWithoutProperties","_excluded","Wrapper","wrapperProps","createElement","className","children","Advanced","_extends","Label","Input","ClearButton","SubmitButton","propTypes","onSubmit","func","isRequired","oneOfType","string","element","onBlur","onChange","onClear","onFocus","screenReaderText","shape","submitButton","clearButton","value","icons","submit","clear","formAriaLabel","oneOf","disabled","bool","defaultProps","undefined","Context"],"sources":["../../src/SearchField/index.jsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Search, Close } from '../../icons';\nimport SearchFieldAdvanced, { SearchFieldContext } from './SearchFieldAdvanced';\nimport SearchFieldLabel from './SearchFieldLabel';\nimport SearchFieldInput from './SearchFieldInput';\nimport SearchFieldClearButton from './SearchFieldClearButton';\nimport SearchFieldSubmitButton from './SearchFieldSubmitButton';\n\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_LABEL = 'search';\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON = 'submit search';\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON = 'clear search';\nexport const SEARCH_FIELD_BUTTON_TEXT = 'search';\n\nconst STYLE_VARIANTS = [\n 'light',\n 'dark',\n];\n\nconst BUTTON_LOCATION_VARIANTS = [\n 'internal',\n 'external',\n];\n\nfunction SearchField(props) {\n const {\n label,\n placeholder,\n inputProps,\n variant,\n submitButtonLocation,\n buttonText,\n ...others\n } = props;\n\n const Wrapper = useCallback(\n (wrapperProps) => (submitButtonLocation === 'external'\n ? <div className=\"pgn__searchfield_wrapper\">{wrapperProps.children}</div>\n : wrapperProps.children),\n [submitButtonLocation],\n );\n\n return (\n <SearchField.Advanced {...others} submitButtonLocation={submitButtonLocation}>\n <Wrapper>\n <SearchField.Label>{label}</SearchField.Label>\n <SearchField.Input placeholder={placeholder} {...inputProps} />\n <SearchField.ClearButton />\n </Wrapper>\n <SearchField.SubmitButton\n variant={variant}\n submitButtonLocation={submitButtonLocation}\n buttonText={buttonText}\n />\n </SearchField.Advanced>\n );\n}\n\nSearchField.propTypes = {\n /**\n * Specifies a callback function for when the `SearchField` is submitted by the user. For example:\n *\n *```jsx\n * <SearchField onSubmit={(value) => { console.log(value); } />\n * ```\n */\n onSubmit: PropTypes.func.isRequired,\n /** Specifies the label to use for the input field (e.g., for i18n translations). */\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /** Specifies a custom class name. */\n className: PropTypes.string,\n /**\n * Specifies a callback function for when the user loses focus in the\n * `SearchField` component. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onBlur={event => console.log(event)} />\n * ```\n */\n onBlur: PropTypes.func,\n /**\n * Specifies a callback function for when the value in `SearchField`\n * is changed by the user. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onChange={value => console.log(value)} />\n * ```\n */\n onChange: PropTypes.func,\n /**\n * Specifies a callback function for when the value in `SearchField`\n * is cleared by the user. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onClear={() => console.log('search cleared')} />\n * ```\n */\n onClear: PropTypes.func,\n /**\n * Specifies a callback function for when the user focuses in the `SearchField`\n * component. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onFocus={event => console.log(event)} />\n * ```\n */\n onFocus: PropTypes.func,\n /** Specifies the placeholder text for the input. */\n placeholder: PropTypes.string,\n /**\n * Specifies the screenreader text for both the clear and submit buttons\n * (e.g., for i18n translations). The default is `{ label: 'search',\n * clearButton: 'clear search', searchButton: 'submit search' }`.\n */\n screenReaderText: PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n submitButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n clearButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n }),\n /** Specifies the initial value for the input. The default is an empty string. */\n value: PropTypes.string,\n /**\n * Specifies the icon element(s) to use for the clear and submit buttons.\n * The default is:\n *\n * ```jsx\n * {\n * submit: import {Search} from '@openedx/paragon/icons';,\n * clear: import {Close} from '@openedx/paragon/icons'.\n * }\n * ```\n */\n icons: PropTypes.shape({\n submit: PropTypes.element.isRequired,\n clear: PropTypes.element,\n }),\n /**\n * Specifies the aria-label attribute on the form element.\n * This is useful if you use the `SearchField` component more than once on a page.\n */\n formAriaLabel: PropTypes.string,\n /** Props to be passed to the form input */\n inputProps: PropTypes.shape({}),\n /** The button style variant to use. */\n variant: PropTypes.oneOf(STYLE_VARIANTS),\n /** Specifies whether the `SearchField` is disabled. */\n disabled: PropTypes.bool,\n /** Controls whether the search button is internal as an icon or external as a button. */\n submitButtonLocation: PropTypes.oneOf(BUTTON_LOCATION_VARIANTS),\n /**\n * Specifies a text that is displayed on the button.\n * The `submitButtonLocation` prop should be set to `external`.\n */\n buttonText: PropTypes.string,\n};\n\nSearchField.defaultProps = {\n label: undefined,\n placeholder: undefined,\n className: undefined,\n formAriaLabel: undefined,\n value: '',\n screenReaderText: {\n label: SEARCH_FIELD_SCREEN_READER_TEXT_LABEL,\n submitButton: SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON,\n clearButton: SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON,\n },\n icons: {\n clear: Close,\n submit: Search,\n },\n onBlur: () => {},\n onChange: () => {},\n onFocus: () => {},\n onClear: () => {},\n inputProps: {},\n variant: 'light',\n disabled: false,\n submitButtonLocation: 'internal',\n buttonText: SEARCH_FIELD_BUTTON_TEXT,\n};\n\nSearchField.Advanced = SearchFieldAdvanced;\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\nSearchField.SubmitButton = SearchFieldSubmitButton;\nSearchField.Context = SearchFieldContext;\n\nexport default SearchField;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,SAAS,MAAM,YAAY;AAElC,SAASC,MAAM,EAAEC,KAAK,QAAQ,aAAa;AAC3C,OAAOC,mBAAmB,IAAIC,kBAAkB,QAAQ,uBAAuB;AAC/E,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,uBAAuB,MAAM,2BAA2B;AAE/D,OAAO,IAAMC,qCAAqC,GAAG,QAAQ;AAC7D,OAAO,IAAMC,6CAA6C,GAAG,eAAe;AAC5E,OAAO,IAAMC,4CAA4C,GAAG,cAAc;AAC1E,OAAO,IAAMC,wBAAwB,GAAG,QAAQ;AAEhD,IAAMC,cAAc,GAAG,CACrB,OAAO,EACP,MAAM,CACP;AAED,IAAMC,wBAAwB,GAAG,CAC/B,UAAU,EACV,UAAU,CACX;AAED,SAASC,WAAWA,CAACC,KAAK,EAAE;EAC1B,IACEC,KAAK,GAOHD,KAAK,CAPPC,KAAK;IACLC,WAAW,GAMTF,KAAK,CANPE,WAAW;IACXC,UAAU,GAKRH,KAAK,CALPG,UAAU;IACVC,OAAO,GAILJ,KAAK,CAJ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O,GAAG1D,kBAAkB;AAExC,eAAeW,WAAW"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","Search","Close","SearchFieldAdvanced","SearchFieldContext","SearchFieldLabel","SearchFieldInput","SearchFieldClearButton","SearchFieldSubmitButton","SEARCH_FIELD_SCREEN_READER_TEXT_LABEL","SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON","SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON","SEARCH_FIELD_BUTTON_TEXT","STYLE_VARIANTS","BUTTON_LOCATION_VARIANTS","SearchField","props","label","placeholder","inputProps","variant","submitButtonLocation","buttonText","others","_objectWithoutProperties","_excluded","Wrapper","wrapperProps","createElement","className","children","Advanced","_extends","Label","Input","ClearButton","SubmitButton","propTypes","onSubmit","func","isRequired","oneOfType","string","element","onBlur","onChange","onClear","onFocus","screenReaderText","shape","submitButton","clearButton","value","icons","submit","elementType","clear","formAriaLabel","oneOf","disabled","bool","defaultProps","undefined","Context"],"sources":["../../src/SearchField/index.jsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Search, Close } from '../../icons';\nimport SearchFieldAdvanced, { SearchFieldContext } from './SearchFieldAdvanced';\nimport SearchFieldLabel from './SearchFieldLabel';\nimport SearchFieldInput from './SearchFieldInput';\nimport SearchFieldClearButton from './SearchFieldClearButton';\nimport SearchFieldSubmitButton from './SearchFieldSubmitButton';\n\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_LABEL = 'search';\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON = 'submit search';\nexport const SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON = 'clear search';\nexport const SEARCH_FIELD_BUTTON_TEXT = 'search';\n\nconst STYLE_VARIANTS = [\n 'light',\n 'dark',\n];\n\nconst BUTTON_LOCATION_VARIANTS = [\n 'internal',\n 'external',\n];\n\nfunction SearchField(props) {\n const {\n label,\n placeholder,\n inputProps,\n variant,\n submitButtonLocation,\n buttonText,\n ...others\n } = props;\n\n const Wrapper = useCallback(\n (wrapperProps) => (submitButtonLocation === 'external'\n ? <div className=\"pgn__searchfield_wrapper\">{wrapperProps.children}</div>\n : wrapperProps.children),\n [submitButtonLocation],\n );\n\n return (\n <SearchField.Advanced {...others} submitButtonLocation={submitButtonLocation}>\n <Wrapper>\n <SearchField.Label>{label}</SearchField.Label>\n <SearchField.Input placeholder={placeholder} {...inputProps} />\n <SearchField.ClearButton />\n </Wrapper>\n <SearchField.SubmitButton\n variant={variant}\n submitButtonLocation={submitButtonLocation}\n buttonText={buttonText}\n />\n </SearchField.Advanced>\n );\n}\n\nSearchField.propTypes = {\n /**\n * Specifies a callback function for when the `SearchField` is submitted by the user. For example:\n *\n *```jsx\n * <SearchField onSubmit={(value) => { console.log(value); } />\n * ```\n */\n onSubmit: PropTypes.func.isRequired,\n /** Specifies the label to use for the input field (e.g., for i18n translations). */\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /** Specifies a custom class name. */\n className: PropTypes.string,\n /**\n * Specifies a callback function for when the user loses focus in the\n * `SearchField` component. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onBlur={event => console.log(event)} />\n * ```\n */\n onBlur: PropTypes.func,\n /**\n * Specifies a callback function for when the value in `SearchField`\n * is changed by the user. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onChange={value => console.log(value)} />\n * ```\n */\n onChange: PropTypes.func,\n /**\n * Specifies a callback function for when the value in `SearchField`\n * is cleared by the user. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onClear={() => console.log('search cleared')} />\n * ```\n */\n onClear: PropTypes.func,\n /**\n * Specifies a callback function for when the user focuses in the `SearchField`\n * component. The default is an empty function. For example:\n *\n * ```jsx\n * <SearchField onFocus={event => console.log(event)} />\n * ```\n */\n onFocus: PropTypes.func,\n /** Specifies the placeholder text for the input. */\n placeholder: PropTypes.string,\n /**\n * Specifies the screenreader text for both the clear and submit buttons\n * (e.g., for i18n translations). The default is `{ label: 'search',\n * clearButton: 'clear search', searchButton: 'submit search' }`.\n */\n screenReaderText: PropTypes.shape({\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n submitButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,\n clearButton: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n }),\n /** Specifies the initial value for the input. The default is an empty string. */\n value: PropTypes.string,\n /**\n * Specifies the icon element(s) to use for the clear and submit buttons.\n * The default is:\n *\n * ```jsx\n * {\n * submit: import {Search} from '@openedx/paragon/icons';,\n * clear: import {Close} from '@openedx/paragon/icons'.\n * }\n * ```\n */\n icons: PropTypes.shape({\n submit: PropTypes.elementType.isRequired,\n clear: PropTypes.elementType,\n }),\n /**\n * Specifies the aria-label attribute on the form element.\n * This is useful if you use the `SearchField` component more than once on a page.\n */\n formAriaLabel: PropTypes.string,\n /** Props to be passed to the form input */\n inputProps: PropTypes.shape({}),\n /** The button style variant to use. */\n variant: PropTypes.oneOf(STYLE_VARIANTS),\n /** Specifies whether the `SearchField` is disabled. */\n disabled: PropTypes.bool,\n /** Controls whether the search button is internal as an icon or external as a button. */\n submitButtonLocation: PropTypes.oneOf(BUTTON_LOCATION_VARIANTS),\n /**\n * Specifies a text that is displayed on the button.\n * The `submitButtonLocation` prop should be set to `external`.\n */\n buttonText: PropTypes.string,\n};\n\nSearchField.defaultProps = {\n label: undefined,\n placeholder: undefined,\n className: undefined,\n formAriaLabel: undefined,\n value: '',\n screenReaderText: {\n label: SEARCH_FIELD_SCREEN_READER_TEXT_LABEL,\n submitButton: SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON,\n clearButton: SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON,\n },\n icons: {\n clear: Close,\n submit: Search,\n },\n onBlur: () => {},\n onChange: () => {},\n onFocus: () => {},\n onClear: () => {},\n inputProps: {},\n variant: 'light',\n disabled: false,\n submitButtonLocation: 'internal',\n buttonText: SEARCH_FIELD_BUTTON_TEXT,\n};\n\nSearchField.Advanced = SearchFieldAdvanced;\nSearchField.Label = SearchFieldLabel;\nSearchField.Input = SearchFieldInput;\nSearchField.ClearButton = SearchFieldClearButton;\nSearchField.SubmitButton = SearchFieldSubmitButton;\nSearchField.Context = SearchFieldContext;\n\nexport default SearchField;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,OAAOC,SAAS,MAAM,YAAY;AAElC,SAASC,MAAM,EAAEC,KAAK,QAAQ,aAAa;AAC3C,OAAOC,mBAAmB,IAAIC,kBAAkB,QAAQ,uBAAuB;AAC/E,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,gBAAgB,MAAM,oBAAoB;AACjD,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,OAAOC,uBAAuB,MAAM,2BAA2B;AAE/D,OAAO,IAAMC,qCAAqC,GAAG,QAAQ;AAC7D,OAAO,IAAMC,6CAA6C,GAAG,eAAe;AAC5E,OAAO,IAAMC,4CAA4C,GAAG,cAAc;AAC1E,OAAO,IAAMC,wBAAwB,GAAG,QAAQ;AAEhD,IAAMC,cAAc,GAAG,CACrB,OAAO,EACP,MAAM,CACP;AAED,IAAMC,wBAAwB,GAAG,CAC/B,UAAU,EACV,UAAU,CACX;AAED,SAASC,WAAWA,CAACC,KAAK,EAAE;EAC1B,IACEC,KAAK,GAOHD,KAAK,CAPPC,KAAK;IACLC,WAAW,GAMTF,KAAK,CANPE,WAAW;IACXC,UAAU,GAKRH,KAAK,CALPG,UAAU;IACVC,OAAO,GAILJ,KAAK,CAJPI,OAAO;IACPC,oBAAoB,GAGlBL,KAAK,CAHPK,oBAAoB;IACpBC,UAAU,GAERN,KAAK,CAFPM,UAAU;IACPC,MAAM,GAAAC,wBAAA,CACPR,KAAK,EAAAS,SAAA;EAET,IAAMC,OAAO,GAAG3B,WAAW,CACzB,UAAC4B,YAAY;IAAA,OAAMN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AC/D;AACF;AACA;AACA;EACEQ,UAAU,EAAEtB,SAAS,CAAC0C;AACxB,CAAC;AAED3B,WAAW,CAAC8C,YAAY,GAAG;EACzB5C,KAAK,EAAE6C,SAAS;EAChB5C,WAAW,EAAE4C,SAAS;EACtBjC,SAAS,EAAEiC,SAAS;EACpBL,aAAa,EAAEK,SAAS;EACxBV,KAAK,EAAE,EAAE;EACTJ,gBAAgB,EAAE;IAChB/B,KAAK,EAAER,qCAAqC;IAC5CyC,YAAY,EAAExC,6CAA6C;IAC3DyC,WAAW,EAAExC;EACf,CAAC;EACD0C,KAAK,EAAE;IACLG,KAAK,EAAEtD,KAAK;IACZoD,MAAM,EAAErD;EACV,CAAC;EACD2C,MAAM,EAAE,SAAAA,OAAA,EAAM,CAAC,CAAC;EAChBC,QAAQ,EAAE,SAAAA,SAAA,EAAM,CAAC,CAAC;EAClBE,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjBD,OAAO,EAAE,SAAAA,QAAA,EAAM,CAAC,CAAC;EACjB3B,UAAU,EAAE,CAAC,CAAC;EACdC,OAAO,EAAE,OAAO;EAChBuC,QAAQ,EAAE,KAAK;EACftC,oBAAoB,EAAE,UAAU;EAChCC,UAAU,EAAEV;AACd,CAAC;AAEDG,WAAW,CAACgB,QAAQ,GAAG5B,mBAAmB;AAC1CY,WAAW,CAACkB,KAAK,GAAG5B,gBAAgB;AACpCU,WAAW,CAACmB,KAAK,GAAG5B,gBAAgB;AACpCS,WAAW,CAACoB,WAAW,GAAG5B,sBAAsB;AAChDQ,WAAW,CAACqB,YAAY,GAAG5B,uBAAuB;AAClDO,WAAW,CAACgD,OAAO,GAAG3D,kBAAkB;AAExC,eAAeW,WAAW"}
|
package/package.json
CHANGED
|
@@ -170,8 +170,8 @@ SearchFieldAdvanced.propTypes = {
|
|
|
170
170
|
value: PropTypes.string,
|
|
171
171
|
/** specifies the icon element(s) to use for the clear and submit buttons. */
|
|
172
172
|
icons: PropTypes.shape({
|
|
173
|
-
submit: PropTypes.
|
|
174
|
-
clear: PropTypes.
|
|
173
|
+
submit: PropTypes.elementType.isRequired,
|
|
174
|
+
clear: PropTypes.elementType,
|
|
175
175
|
}),
|
|
176
176
|
/** specifies the aria-label attribute on the form element. This is useful if you use the `SearchField` component
|
|
177
177
|
* more than once on a page. */
|
|
@@ -132,8 +132,8 @@ SearchField.propTypes = {
|
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
134
|
icons: PropTypes.shape({
|
|
135
|
-
submit: PropTypes.
|
|
136
|
-
clear: PropTypes.
|
|
135
|
+
submit: PropTypes.elementType.isRequired,
|
|
136
|
+
clear: PropTypes.elementType,
|
|
137
137
|
}),
|
|
138
138
|
/**
|
|
139
139
|
* Specifies the aria-label attribute on the form element.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
var SvgLmsEditsquare = function SvgLmsEditsquare(props) {
|
|
4
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
-
width: 24,
|
|
6
|
-
height: 24,
|
|
7
|
-
viewBox: "0 0 24 24",
|
|
8
|
-
fill: "none",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
d: "M3.951 22a1.88 1.88 0 0 1-1.378-.573A1.874 1.874 0 0 1 2 20.051V6.41c0-.536.19-.995.573-1.377A1.882 1.882 0 0 1 3.95 4.46h8.708l-1.952 1.95H3.951V20.05H17.61V13.28l1.951-1.949v8.721c0 .536-.19.995-.573 1.376A1.88 1.88 0 0 1 17.61 22H3.95ZM14.854 5.02l1.39 1.365-6.44 6.431v1.389h1.367l6.463-6.456 1.39 1.364L12 16.153H7.854v-4.14l7-6.992Zm4.17 4.093-4.17-4.092 2.439-2.436c.39-.39.858-.585 1.403-.585.544 0 1.003.195 1.377.585l1.366 1.388c.374.374.561.828.561 1.364 0 .536-.187.991-.561 1.365l-2.415 2.411Z",
|
|
12
|
-
fill: "currentColor"
|
|
13
|
-
}));
|
|
14
|
-
};
|
|
15
|
-
export default SvgLmsEditsquare;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
var SvgLmsEditsquareComplete = function SvgLmsEditsquareComplete(props) {
|
|
4
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
5
|
-
width: 24,
|
|
6
|
-
height: 24,
|
|
7
|
-
viewBox: "0 0 24 24",
|
|
8
|
-
fill: "none",
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
11
|
-
d: "M5.902 18.1v-6.896l6.76-6.76H3.951A1.957 1.957 0 0 0 2 6.393v13.657c0 1.073.878 1.951 1.951 1.951h13.657c1.073 0 1.95-.878 1.95-1.95V11.34l-6.76 6.76H5.903Z",
|
|
12
|
-
fill: "currentColor"
|
|
13
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
14
|
-
d: "M7.853 16.15h4.136l7.024-7.024-4.137-4.136-7.023 7.023v4.136ZM21.422 3.946l-1.375-1.375c-.761-.761-2-.761-2.761 0l-1.034 1.034 4.136 4.136 1.034-1.034c.77-.761.77-2 0-2.76Z",
|
|
15
|
-
fill: "currentColor"
|
|
16
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
17
|
-
cx: 6,
|
|
18
|
-
cy: 18,
|
|
19
|
-
r: 4.8,
|
|
20
|
-
fill: "currentColor"
|
|
21
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
22
|
-
d: "m4.447 19.656.353.353.354-.353 4.199-4.2.141.143L4.8 20.293 2.507 18l.14-.14 1.8 1.796ZM6 11.5A6.502 6.502 0 0 0-.5 18c0 3.588 2.912 6.5 6.5 6.5s6.5-2.912 6.5-6.5-2.912-6.5-6.5-6.5Z",
|
|
23
|
-
fill: "currentColor",
|
|
24
|
-
stroke: "#fff"
|
|
25
|
-
}));
|
|
26
|
-
};
|
|
27
|
-
export default SvgLmsEditsquareComplete;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const SvgLmsEditsquare = (props) => (
|
|
3
|
-
<svg
|
|
4
|
-
width={24}
|
|
5
|
-
height={24}
|
|
6
|
-
viewBox="0 0 24 24"
|
|
7
|
-
fill="none"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
{...props}
|
|
10
|
-
>
|
|
11
|
-
<path
|
|
12
|
-
d="M3.951 22a1.88 1.88 0 0 1-1.378-.573A1.874 1.874 0 0 1 2 20.051V6.41c0-.536.19-.995.573-1.377A1.882 1.882 0 0 1 3.95 4.46h8.708l-1.952 1.95H3.951V20.05H17.61V13.28l1.951-1.949v8.721c0 .536-.19.995-.573 1.376A1.88 1.88 0 0 1 17.61 22H3.95ZM14.854 5.02l1.39 1.365-6.44 6.431v1.389h1.367l6.463-6.456 1.39 1.364L12 16.153H7.854v-4.14l7-6.992Zm4.17 4.093-4.17-4.092 2.439-2.436c.39-.39.858-.585 1.403-.585.544 0 1.003.195 1.377.585l1.366 1.388c.374.374.561.828.561 1.364 0 .536-.187.991-.561 1.365l-2.415 2.411Z"
|
|
13
|
-
fill="currentColor"
|
|
14
|
-
/>
|
|
15
|
-
</svg>
|
|
16
|
-
);
|
|
17
|
-
export default SvgLmsEditsquare;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const SvgLmsEditsquareComplete = (props) => (
|
|
3
|
-
<svg
|
|
4
|
-
width={24}
|
|
5
|
-
height={24}
|
|
6
|
-
viewBox="0 0 24 24"
|
|
7
|
-
fill="none"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
{...props}
|
|
10
|
-
>
|
|
11
|
-
<path
|
|
12
|
-
d="M5.902 18.1v-6.896l6.76-6.76H3.951A1.957 1.957 0 0 0 2 6.393v13.657c0 1.073.878 1.951 1.951 1.951h13.657c1.073 0 1.95-.878 1.95-1.95V11.34l-6.76 6.76H5.903Z"
|
|
13
|
-
fill="currentColor"
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
d="M7.853 16.15h4.136l7.024-7.024-4.137-4.136-7.023 7.023v4.136ZM21.422 3.946l-1.375-1.375c-.761-.761-2-.761-2.761 0l-1.034 1.034 4.136 4.136 1.034-1.034c.77-.761.77-2 0-2.76Z"
|
|
17
|
-
fill="currentColor"
|
|
18
|
-
/>
|
|
19
|
-
<circle cx={6} cy={18} r={4.8} fill="currentColor" />
|
|
20
|
-
<path
|
|
21
|
-
d="m4.447 19.656.353.353.354-.353 4.199-4.2.141.143L4.8 20.293 2.507 18l.14-.14 1.8 1.796ZM6 11.5A6.502 6.502 0 0 0-.5 18c0 3.588 2.912 6.5 6.5 6.5s6.5-2.912 6.5-6.5-2.912-6.5-6.5-6.5Z"
|
|
22
|
-
fill="currentColor"
|
|
23
|
-
stroke="#fff"
|
|
24
|
-
/>
|
|
25
|
-
</svg>
|
|
26
|
-
);
|
|
27
|
-
export default SvgLmsEditsquareComplete;
|