@uva-glass/component-library 1.51.0 → 1.52.1
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/{Lexical.prod-DSsdOWxu.js → Lexical.prod-zUeT_jIr.js} +253 -246
- package/dist/Lexical.prod-zUeT_jIr.js.map +1 -0
- package/dist/LexicalUtils.prod-DtRifALg.js +64 -0
- package/dist/LexicalUtils.prod-DtRifALg.js.map +1 -0
- package/dist/ListPlugin-CxyYg2bv.js +588 -0
- package/dist/ListPlugin-CxyYg2bv.js.map +1 -0
- package/dist/RteEditor.module--4R0Ql6Y.js +26 -0
- package/dist/RteEditor.module--4R0Ql6Y.js.map +1 -0
- package/dist/assets/HorizontalList.css +1 -1
- package/dist/assets/RteEditor.css +1 -1
- package/dist/assets/useFlyout.css +1 -0
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.stories.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +5 -5
- package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +10 -10
- package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.d.ts +3 -2
- package/dist/components/HorizontalList/HorizontalList.js +10 -9
- package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
- package/dist/components/HorizontalList/HorizontalList.stories.d.ts +1 -0
- package/dist/components/HorizontalList/HorizontalList.stories.js +35 -14
- package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.d.ts +6 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +98 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.d.ts +8 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +7 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js.map +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.d.ts +1 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +5 -0
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js.map +1 -0
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/ListPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.d.ts +6 -0
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +33 -28
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +532 -457
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/UvaTheme/UvaTheme.d.ts +1 -0
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js +5 -4
- package/dist/components/RteEditor/UvaTheme/UvaTheme.js.map +1 -1
- package/dist/components/RteEditor/hooks/index.d.ts +1 -0
- package/dist/components/RteEditor/hooks/index.js +5 -0
- package/dist/components/RteEditor/hooks/index.js.map +1 -0
- package/dist/components/RteEditor/hooks/useFlyout.d.ts +12 -0
- package/dist/components/RteEditor/hooks/useFlyout.js +45 -0
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -0
- package/dist/helpers-DpGAANJ8.js +365 -0
- package/dist/helpers-DpGAANJ8.js.map +1 -0
- package/package.json +15 -15
- package/dist/Lexical.prod-DSsdOWxu.js.map +0 -1
- package/dist/ListPlugin-Bu2AbCDB.js +0 -643
- package/dist/ListPlugin-Bu2AbCDB.js.map +0 -1
- package/dist/RteEditor.module-RkKUrkOO.js +0 -21
- package/dist/RteEditor.module-RkKUrkOO.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListPlugin-CxyYg2bv.js","sources":["../node_modules/@lexical/list/LexicalList.prod.mjs","../src/components/RteEditor/Plugins/ListPlugin/ListPlugin.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$getNearestNodeOfType as e,removeClassNamesFromElement as t,addClassNamesToElement as n,isHTMLElement as r,mergeRegister as i}from\"@lexical/utils\";import{$getSelection as s,$isRangeSelection as o,$isRootOrShadowRoot as c,$isElementNode as l,$isLeafNode as a,$createParagraphNode as h,$isParagraphNode as u,ElementNode as g,$applyNodeReplacement as d,$createTextNode as f,createCommand as p,COMMAND_PRIORITY_LOW as _,INSERT_PARAGRAPH_COMMAND as m}from\"lexical\";function v(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var y=v((function(e){const t=new URLSearchParams;t.append(\"code\",e);for(let e=1;e<arguments.length;e++)t.append(\"v\",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function C(e){let t=1,n=e.getParent();for(;null!=n;){if(V(n)){const e=n.getParent();if(H(e)){t++,n=e.getParent();continue}y(40)}return t}return t}function k(e){let t=e.getParent();H(t)||y(40);let n=t;for(;null!==n;)n=n.getParent(),H(n)&&(t=n);return t}function T(e){let t=[];const n=e.getChildren().filter(V);for(let e=0;e<n.length;e++){const r=n[e],i=r.getFirstChild();H(i)?t=t.concat(T(i)):t.push(r)}return t}function b(e){return V(e)&&H(e.getFirstChild())}function S(e){return W().append(e)}function P(e,t){return V(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function A(e,t){e.update((()=>{const e=s();if(null!==e){const n=e.getNodes();if(o(e)){const r=e.getStartEndPoints();null===r&&y(143);const[i]=r,s=i.getNode(),o=s.getParent();if(P(s,n)){const e=q(t);if(c(o)){s.replace(e);const t=W();l(s)&&(t.setFormat(s.getFormatType()),t.setIndent(s.getIndent())),e.append(t)}else if(V(s)){const t=s.getParentOrThrow();N(e,t.getChildren()),t.replace(e)}return}}const r=new Set;for(let e=0;e<n.length;e++){const i=n[e];if(!l(i)||!i.isEmpty()||V(i)||r.has(i.getKey())){if(a(i)){let e=i.getParent();for(;null!=e;){const n=e.getKey();if(H(e)){if(!r.has(n)){const i=q(t);N(i,e.getChildren()),e.replace(i),r.add(n)}break}{const i=e.getParent();if(c(i)&&!r.has(n)){r.add(n),x(e,t);break}e=i}}}}else x(i,t)}}}))}function N(e,t){e.splice(e.getChildrenSize(),0,t)}function x(e,t){if(H(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=W();if(i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),N(i,e.getChildren()),H(n)&&t===n.getListType())return n.append(i),e.remove(),H(r)&&t===r.getListType()&&(N(n,r.getChildren()),r.remove()),n;if(H(r)&&t===r.getListType())return r.getFirstChildOrThrow().insertBefore(i),e.remove(),r;{const n=q(t);return n.append(i),e.replace(n),n}}function L(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&b(n)&&b(r)&&(L(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function O(t){t.update((()=>{const t=s();if(o(t)){const n=new Set,r=t.getNodes(),i=t.anchor.getNode();if(P(i,r))n.add(k(i));else for(let t=0;t<r.length;t++){const i=r[t];if(a(i)){const t=e(i,D);null!=t&&n.add(k(t))}}for(const e of n){let n=e;const r=T(e);for(const e of r){const r=h();N(r,e.getChildren()),n.insertAfter(r),n=r,e.__key===t.anchor.key&&t.anchor.set(r.getKey(),0,\"element\"),e.__key===t.focus.key&&t.focus.set(r.getKey(),0,\"element\"),e.remove()}e.remove()}}}))}function E(e){const t=new Set;if(b(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(b(r)&&b(i)){const n=i.getFirstChild();if(H(n)){n.append(e);const i=r.getFirstChild();if(H(i)){N(n,i.getChildren()),r.remove(),t.add(r.getKey())}}}else if(b(r)){const t=r.getFirstChild();if(H(t)){const n=t.getFirstChild();null!==n&&n.insertBefore(e)}}else if(b(i)){const t=i.getFirstChild();H(t)&&t.append(e)}else if(H(n)){const t=W(),s=q(n.getListType());t.append(s),s.append(e),i?i.insertAfter(t):r?r.insertBefore(t):n.append(t)}}function M(e){if(b(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(H(n?n.getParent():void 0)&&V(n)&&H(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const r=t.getListType(),i=W(),s=q(r);i.append(s),e.getPreviousSiblings().forEach((e=>s.append(e)));const o=W(),c=q(r);o.append(c),N(c,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}}}function F(){const e=s();if(!o(e)||!e.isCollapsed())return!1;const t=e.anchor.getNode();if(!V(t)||0!==t.getChildrenSize())return!1;const n=k(t),r=t.getParent();H(r)||y(40);const i=r.getParent();let l;if(c(i))l=h(),n.insertAfter(l);else{if(!V(i))return!1;l=W(),i.insertAfter(l)}l.select();const a=t.getNextSiblings();if(a.length>0){const e=q(r.getListType());if(u(l))l.insertAfter(e);else{const t=W();t.append(e),l.insertAfter(t)}a.forEach((t=>{t.remove(),e.append(t)}))}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){const e=t.getParent();if(null==e||!V(t)&&!H(t))break;t=e}t.remove()}(t),!0}function w(...e){const t=[];for(const n of e)if(n&&\"string\"==typeof n)for(const[e]of n.matchAll(/\\S+/g))t.push(e);return t}class D extends g{static getType(){return\"listitem\"}static clone(e){return new D(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){const t=document.createElement(\"li\"),n=this.getParent();return H(n)&&\"check\"===n.getListType()&&R(t,this,null),t.value=this.__value,I(t,e.theme,this),t}updateDOM(e,t,n){const r=this.getParent();return H(r)&&\"check\"===r.getListType()&&R(t,this,e),t.value=this.__value,I(t,n.theme,this),!1}static transform(){return e=>{if(V(e)||y(144),null==e.__checked)return;const t=e.getParent();H(t)&&\"check\"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)}}static importDOM(){return{li:()=>({conversion:B,priority:0})}}static importJSON(e){const t=W();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportDOM(e){const t=this.createDOM(e._config);return t.style.textAlign=this.getFormatType(),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:\"listitem\",value:this.getValue(),version:1}}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(l(n)&&this.canMergeWith(n)){const e=n.getChildren();this.append(...e),n.remove()}else super.append(n)}return this}replace(e,t){if(V(e))return super.replace(e);this.setIndent(0);const n=this.getParentOrThrow();if(!H(n))return e;if(n.__first===this.getKey())n.insertBefore(e);else if(n.__last===this.getKey())n.insertAfter(e);else{const t=q(n.getListType());let r=this.getNextSibling();for(;r;){const e=r;r=r.getNextSibling(),t.append(e)}n.insertAfter(e),e.insertAfter(t)}return t&&(l(e)||y(139),this.getChildren().forEach((t=>{e.append(t)}))),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){const n=this.getParentOrThrow();if(H(n)||y(39),V(e))return super.insertAfter(e,t);const r=this.getNextSiblings();if(n.insertAfter(e,t),0!==r.length){const i=q(n.getListType());r.forEach((e=>i.append(e))),e.insertAfter(i,t)}return e}remove(e){const t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&b(t)&&b(n)&&(L(t.getFirstChild(),n.getFirstChild()),n.remove())}insertNewAfter(e,t=!0){const n=W(null==this.__checked&&void 0);return this.insertAfter(n,t),n}collapseAtStart(e){const t=h();this.getChildren().forEach((e=>t.append(e)));const n=this.getParentOrThrow(),r=n.getParentOrThrow(),i=V(r);if(1===n.getChildrenSize())if(i)n.remove(),r.select();else{n.insertBefore(t),n.remove();const r=e.anchor,i=e.focus,s=t.getKey();\"element\"===r.type&&r.getNode().is(this)&&r.set(s,r.offset,\"element\"),\"element\"===i.type&&i.getNode().is(this)&&i.set(s,i.offset,\"element\")}else n.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){const e=this.getLatest();let t;const n=this.getParent();return H(n)&&(t=n.getListType()),\"check\"===t?Boolean(e.__checked):void 0}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){const e=this.getParent();if(null===e)return this.getLatest().__indent;let t=e.getParentOrThrow(),n=0;for(;V(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){\"number\"!=typeof e&&y(117),(e=Math.floor(e))>=0||y(199);let t=this.getIndent();for(;t!==e;)t<e?(E(this),t++):(M(this),t--);return this}canInsertAfter(e){return V(e)}canReplaceWith(e){return V(e)}canMergeWith(e){return u(e)||V(e)}extractWithChild(e,t){if(!o(t))return!1;const n=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(n)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return q(\"bullet\")}canMergeWhenEmpty(){return!0}}function I(e,r,i){const s=[],o=[],c=r.list,l=c?c.listitem:void 0;let a;if(c&&c.nested&&(a=c.nested.listitem),void 0!==l&&s.push(...w(l)),c){const e=i.getParent(),t=H(e)&&\"check\"===e.getListType(),n=i.getChecked();t&&!n||o.push(c.listitemUnchecked),t&&n||o.push(c.listitemChecked),t&&s.push(n?c.listitemChecked:c.listitemUnchecked)}if(void 0!==a){const e=w(a);i.getChildren().some((e=>H(e)))?s.push(...e):o.push(...e)}o.length>0&&t(e,...o),s.length>0&&n(e,...s)}function R(e,t,n,r){H(t.getFirstChild())?(e.removeAttribute(\"role\"),e.removeAttribute(\"tabIndex\"),e.removeAttribute(\"aria-checked\")):(e.setAttribute(\"role\",\"checkbox\"),e.setAttribute(\"tabIndex\",\"-1\"),n&&t.__checked===n.__checked||e.setAttribute(\"aria-checked\",t.getChecked()?\"true\":\"false\"))}function B(e){if(e.classList.contains(\"task-list-item\"))for(const t of e.children)if(\"INPUT\"===t.tagName)return K(t);const t=e.getAttribute(\"aria-checked\");return{node:W(\"true\"===t||\"false\"!==t&&void 0)}}function K(e){if(!(\"checkbox\"===e.getAttribute(\"type\")))return{node:null};return{node:W(e.hasAttribute(\"checked\"))}}function W(e){return d(new D(void 0,e))}function V(e){return e instanceof D}class J extends g{static getType(){return\"list\"}static clone(e){const t=e.__listType||j[e.__tag];return new J(t,e.__start,e.__key)}constructor(e,t,n){super(n);const r=j[e]||e;this.__listType=r,this.__tag=\"number\"===r?\"ol\":\"ul\",this.__start=t}getTag(){return this.__tag}setListType(e){const t=this.getWritable();t.__listType=e,t.__tag=\"number\"===e?\"ol\":\"ul\"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e,t){const n=this.__tag,r=document.createElement(n);return 1!==this.__start&&r.setAttribute(\"start\",String(this.__start)),r.__lexicalListType=this.__listType,z(r,e.theme,this),r}updateDOM(e,t,n){return e.__tag!==this.__tag||(z(t,n.theme,this),!1)}static transform(){return e=>{H(e)||y(163),function(e){const t=e.getNextSibling();H(t)&&e.getListType()===t.getListType()&&L(e,t)}(e),function(e){const t=\"check\"!==e.getListType();let n=e.getStart();for(const r of e.getChildren())V(r)&&(r.getValue()!==n&&r.setValue(n),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),H(r.getFirstChild())||n++)}(e)}}static importDOM(){return{ol:()=>({conversion:$,priority:0}),ul:()=>({conversion:$,priority:0})}}static importJSON(e){const t=q(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){const{element:t}=super.exportDOM(e);return t&&r(t)&&(1!==this.__start&&t.setAttribute(\"start\",String(this.__start)),\"check\"===this.__listType&&t.setAttribute(\"__lexicalListType\",\"check\")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:\"list\",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];if(V(n))super.append(n);else{const e=W();if(H(n))e.append(n);else if(l(n)){const t=f(n.getTextContent());e.append(t)}else e.append(n);super.append(e)}}return this}extractWithChild(e){return V(e)}}function z(e,r,i){const s=[],o=[],c=r.list;if(void 0!==c){const e=c[`${i.__tag}Depth`]||[],t=C(i)-1,n=t%e.length,r=e[n],l=c[i.__tag];let a;const h=c.nested,u=c.checklist;if(void 0!==h&&h.list&&(a=h.list),void 0!==l&&s.push(l),void 0!==u&&\"check\"===i.__listType&&s.push(u),void 0!==r){s.push(...w(r));for(let t=0;t<e.length;t++)t!==n&&o.push(i.__tag+t)}if(void 0!==a){const e=w(a);t>1?s.push(...e):o.push(...e)}}o.length>0&&t(e,...o),s.length>0&&n(e,...s)}function U(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(V(r)){t.push(r);const e=r.getChildren();e.length>1&&e.forEach((e=>{H(e)&&t.push(S(e))}))}else t.push(S(r))}return t}function $(e){const t=e.nodeName.toLowerCase();let n=null;if(\"ol\"===t){n=q(\"number\",e.start)}else\"ul\"===t&&(n=function(e){if(\"check\"===e.getAttribute(\"__lexicallisttype\")||e.classList.contains(\"contains-task-list\"))return!0;for(const t of e.childNodes)if(r(t)&&t.hasAttribute(\"aria-checked\"))return!0;return!1}(e)?q(\"check\"):q(\"bullet\"));return{after:U,node:n}}const j={ol:\"number\",ul:\"bullet\"};function q(e,t=1){return d(new J(e,t))}function H(e){return e instanceof J}const G=p(\"INSERT_UNORDERED_LIST_COMMAND\"),Q=p(\"INSERT_ORDERED_LIST_COMMAND\"),X=p(\"INSERT_CHECK_LIST_COMMAND\"),Y=p(\"REMOVE_LIST_COMMAND\");function Z(e){return i(e.registerCommand(Q,(()=>(A(e,\"number\"),!0)),_),e.registerCommand(G,(()=>(A(e,\"bullet\"),!0)),_),e.registerCommand(Y,(()=>(O(e),!0)),_),e.registerCommand(m,(()=>!!F()),_))}export{W as $createListItemNode,q as $createListNode,C as $getListDepth,F as $handleListInsertParagraph,V as $isListItemNode,H as $isListNode,X as INSERT_CHECK_LIST_COMMAND,Q as INSERT_ORDERED_LIST_COMMAND,G as INSERT_UNORDERED_LIST_COMMAND,D as ListItemNode,J as ListNode,Y as REMOVE_LIST_COMMAND,A as insertList,Z as registerList,O as removeList};\n","import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, REMOVE_LIST_COMMAND } from '@lexical/list';\nimport { useState } from 'react';\nimport clsx from 'clsx';\n\nimport { Icon } from 'components/Icon';\nimport styles from 'components/RteEditor/RteEditor.module.css';\n\ninterface ListPluginProps {\n isOList: boolean;\n isUList: boolean;\n}\n\ntype ListTypesType = 'bullet' | 'number' | 'paragraph';\nconst LIST_TYPE_ICONS = {\n bullet: 'FormatUnorderedList',\n number: 'FormatOrderedLists',\n};\n\nconst ListTypes = ['bullet', 'number'];\n\nexport const ListPlugin = ({ isOList = false, isUList = false }: ListPluginProps) => {\n const [editor] = useLexicalComposerContext();\n const [blockType, setBlockType] = useState<ListTypesType>('paragraph');\n\n const formatList = (listType: ListTypesType): void => {\n if (listType === 'number' && blockType !== 'number') {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined);\n setBlockType('number');\n } else if (listType === 'bullet' && blockType !== 'bullet') {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined);\n setBlockType('bullet');\n } else {\n editor.dispatchCommand(REMOVE_LIST_COMMAND, undefined);\n setBlockType('paragraph');\n }\n };\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n {ListTypes.map((listType) => (\n <button\n onClick={() => formatList(listType as ListTypesType)}\n key={listType}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--${listType}`],\n listType === 'bullet' && isUList && styles['editor__toolbar-button--active'],\n listType === 'number' && isOList && styles['editor__toolbar-button--active']\n )}\n aria-label={`Format ${listType}`}\n >\n <Icon name={LIST_TYPE_ICONS[listType as keyof typeof Icon]} size={20} />\n </button>\n ))}\n </div>\n );\n};\n"],"names":["v","e","y","C","n","V","H","k","T","r","i","b","S","W","P","A","s","o","q","c","t","l","N","a","x","L","O","D","h","E","M","F","u","w","g","R","I","B","K","d","J","j","z","$","f","U","G","p","Q","Y","Z","_","m","LIST_TYPE_ICONS","ListTypes","ListPlugin","isOList","isUList","editor","useLexicalComposerContext","blockType","setBlockType","useState","formatList","listType","INSERT_ORDERED_LIST_COMMAND","INSERT_UNORDERED_LIST_COMMAND","REMOVE_LIST_COMMAND","jsx","styles","clsx","Icon"],"mappings":";;;;;;;AAQmd,SAASA,GAAEC,GAAE;AAAC,SAAOA,KAAGA,EAAE,cAAY,OAAO,UAAU,eAAe,KAAKA,GAAE,SAAS,IAAEA,EAAE,UAAQA;AAAC;AAAC,IAAIC,IAAEF,GAAG,SAASC,GAAE;AAAC,QAAM,IAAE,IAAI;AAAgB,IAAE,OAAO,QAAOA,CAAC;AAAE,WAAQ,IAAE,GAAE,IAAE,UAAU,QAAO,IAAI,GAAE,OAAO,KAAI,UAAU,CAAC,CAAC;AAAE,QAAM,MAAM,2BAA2BA,CAAC,0CAA0C,CAAC,gHAAgH;AAAC;AAAI,SAASE,GAAEF,GAAE;AAAC,MAAI,IAAE,GAAEG,IAAEH,EAAE;AAAY,SAAWG,KAAN,QAAS;AAAC,QAAGC,EAAED,CAAC,GAAE;AAAC,YAAMH,IAAEG,EAAE;AAAY,UAAGE,EAAEL,CAAC,GAAE;AAAC,aAA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ACC,CAAM,IAAIC,MACX,CAACC,GAAWC,CAAY,IAAIC,GAAwB,WAAW,GAE/DC,IAAa,CAACC,MAAkC;AAChD,IAAAA,MAAa,YAAYJ,MAAc,YAClCF,EAAA,gBAAgBO,IAA6B,MAAS,GAC7DJ,EAAa,QAAQ,KACZG,MAAa,YAAYJ,MAAc,YACzCF,EAAA,gBAAgBQ,GAA+B,MAAS,GAC/DL,EAAa,QAAQ,MAEdH,EAAA,gBAAgBS,IAAqB,MAAS,GACrDN,EAAa,WAAW;AAAA,EAC1B;AAIA,SAAA,gBAAAO,EAAC,SAAI,WAAWC,EAAO,8BAA8B,GAClD,UAAAf,GAAU,IAAI,CAACU,MACd,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,MAAML,EAAWC,CAAyB;AAAA,MAEnD,WAAWM;AAAA,QACTD,EAAO,wBAAwB;AAAA,QAC/BA,EAAO,2BAA2BL,CAAQ,EAAE;AAAA,QAC5CA,MAAa,YAAYP,KAAWY,EAAO,gCAAgC;AAAA,QAC3EL,MAAa,YAAYR,KAAWa,EAAO,gCAAgC;AAAA,MAC7E;AAAA,MACA,cAAY,UAAUL,CAAQ;AAAA,MAE9B,4BAACO,IAAK,EAAA,MAAMlB,GAAgBW,CAA6B,GAAG,MAAM,IAAI;AAAA,IAAA;AAAA,IATjEA;AAAA,EAWR,CAAA,EACH,CAAA;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import './assets/RteEditor.css';const _ = "_editor__wrapper_vdtbx_1", t = "_editor__toolbar_vdtbx_6", o = "_editor__field_vdtbx_66", r = "_editor__placeholder_vdtbx_82", i = "_editor__linkform_vdtbx_91", d = "_editor__listitem_vdtbx_132", e = "_editor__link_vdtbx_91", l = {
|
|
2
|
+
editor__wrapper: _,
|
|
3
|
+
editor__toolbar: t,
|
|
4
|
+
"editor__toolbar-button-group": "_editor__toolbar-button-group_vdtbx_14",
|
|
5
|
+
"editor__toolbar-button": "_editor__toolbar-button_vdtbx_14",
|
|
6
|
+
"editor__toolbar-button--bold": "_editor__toolbar-button--bold_vdtbx_44",
|
|
7
|
+
"editor__toolbar-button--italic": "_editor__toolbar-button--italic_vdtbx_48",
|
|
8
|
+
"editor__toolbar-button--active": "_editor__toolbar-button--active_vdtbx_52",
|
|
9
|
+
"editor__toolbar-button-flyoutwrapper": "_editor__toolbar-button-flyoutwrapper_vdtbx_62",
|
|
10
|
+
"editor__field-wrapper": "_editor__field-wrapper_vdtbx_66",
|
|
11
|
+
editor__field: o,
|
|
12
|
+
editor__placeholder: r,
|
|
13
|
+
editor__linkform: i,
|
|
14
|
+
"editor__linkform-input-field": "_editor__linkform-input-field_vdtbx_95",
|
|
15
|
+
"editor__linkform-footer": "_editor__linkform-footer_vdtbx_102",
|
|
16
|
+
"editor__text--bold": "_editor__text--bold_vdtbx_114",
|
|
17
|
+
"editor__text--italic": "_editor__text--italic_vdtbx_118",
|
|
18
|
+
"editor__list--ul": "_editor__list--ul_vdtbx_122",
|
|
19
|
+
"editor__list--ol": "_editor__list--ol_vdtbx_127",
|
|
20
|
+
editor__listitem: d,
|
|
21
|
+
editor__link: e
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
l as s
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=RteEditor.module--4R0Ql6Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RteEditor.module--4R0Ql6Y.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._horizontal-list-
|
|
1
|
+
._horizontal-list-wrapper_oivby_1{display:flex;margin:0}._horizontal-list-value_oivby_6{align-items:center;display:flex}._horizontal-list-separator_oivby_11{align-items:center;display:flex;margin:0 .5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._editor__wrapper_vdtbx_1{border-radius:4px;padding:.75rem}._editor__toolbar_vdtbx_6{align-items:center;display:flex;gap:.75rem;justify-content:flex-start;margin-bottom:.5rem}._editor__toolbar-button-group_vdtbx_14{align-items:center;display:flex;gap:.25rem;justify-content:center}._editor__toolbar-button_vdtbx_14{align-items:center;background-color:var(--color-white);border:1px solid var(--color-grey-300);border-radius:.25rem;cursor:pointer;display:flex;font-size:1.1rem;height:2.5rem;justify-content:center;width:2.5rem}._editor__toolbar-button_vdtbx_14:hover{background-color:var(--color-grey-200)}._editor__toolbar-button_vdtbx_14:focus-visible{outline:.125rem dotted var(--color-cobalt);outline-offset:.125rem;z-index:1}._editor__toolbar-button--bold_vdtbx_44{font-weight:700}._editor__toolbar-button--italic_vdtbx_48{font-style:italic}._editor__toolbar-button--active_vdtbx_52{background-color:var(--color-black);border-color:var(--color-black);color:var(--color-white)}._editor__toolbar-button--active_vdtbx_52:hover{color:var(--color-black)}._editor__toolbar-button-flyoutwrapper_vdtbx_62,._editor__field-wrapper_vdtbx_66{position:relative}._editor__field_vdtbx_66{background-color:var(--color-white);border:1px solid var(--color-grey-300);min-height:8rem;padding:.25rem}._editor__field_vdtbx_66:focus-visible{outline:1px solid var(--color-cobalt);z-index:1}._editor__placeholder_vdtbx_82{color:var(--color-grey-300);left:0;padding:.25rem;pointer-events:none;position:absolute;top:0}._editor__linkform_vdtbx_91{width:18rem}._editor__linkform-input-field_vdtbx_95{display:flex;flex-direction:column;gap:.5rem;margin-bottom:.75rem}._editor__linkform-footer_vdtbx_102{display:flex;gap:.5rem;justify-content:flex-end;margin-top:1rem}._editor__field_vdtbx_66 p{margin:0}._editor__text--bold_vdtbx_114{font-weight:700}._editor__text--italic_vdtbx_118{font-style:italic}._editor__list--ul_vdtbx_122,._editor__list--ol_vdtbx_127{margin:0;padding:0}._editor__list--ul_vdtbx_122>._editor__listitem_vdtbx_132{list-style-type:disc;margin-left:1rem}._editor__list--ol_vdtbx_127>._editor__listitem_vdtbx_132{list-style-type:decimal;margin-left:1rem}._editor__link_vdtbx_91{color:var(--color-uva-blue);cursor:pointer;text-decoration:underline}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._flyout__wrapper_1ukki_1{background-color:var(--color-white);border-radius:.25rem;box-shadow:0 3px 6px #0006;display:none;flex-direction:column;left:0;max-width:20rem;min-width:15rem;padding:1rem;position:absolute;top:calc(100% + .25rem);z-index:100}._flyout__open_1ukki_16{display:flex}._flyout__header_1ukki_20{display:flex;justify-content:flex-end;margin-bottom:.5rem;width:100%}
|
|
@@ -2,7 +2,7 @@ import { jsxs as a, Fragment as s, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { fn as l } from "../../index-MQ0yPLdl.js";
|
|
3
3
|
import { Button as n } from "./Button.js";
|
|
4
4
|
const c = "<Button variant={variant} onClick={onClictFunction}>{children}</Button>", h = {
|
|
5
|
-
title: "Atoms/Button",
|
|
5
|
+
title: "Atoms/Buttons/Button",
|
|
6
6
|
component: n,
|
|
7
7
|
argTypes: {
|
|
8
8
|
variant: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.js","sources":["../../../src/components/Buttons/Button.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ButtonProps } from './Button';\n\nimport { Button } from './Button';\n\nconst codeString = '<Button variant={variant} onClick={onClictFunction}>{children}</Button>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Button',\n component: Button,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: Button,\n codeString: codeString,\n },\n} as Meta<ButtonProps>;\n\nconst Template: StoryFn<ButtonProps> = (args) => <Button {...args} />;\n\nconst defaultArgs: Partial<ButtonProps> = {\n variant: 'primary',\n disabled: false,\n displayColumn: false,\n onClick: fn(),\n};\n\nexport const ButtonExample = Template.bind({});\nButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","Button_stories","Button","Template","args","jsx","defaultArgs","fn","ButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa,2EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,OAAO;AAAA,MACzF,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAiC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAQ,GAAGE,EAAM,CAAA,GAE7DE,IAAoC;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,SAASC,EAAG;AACd,GAEaC,IAAgBL,EAAS,KAAK,EAAE;AAC7CK,EAAc,OAAO;AAAA,EACnB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAuBN,EAAS,KAAK,EAAE;AACpDM,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,UAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AACAI,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sources":["../../../src/components/Buttons/Button.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { ButtonProps } from './Button';\n\nimport { Button } from './Button';\n\nconst codeString = '<Button variant={variant} onClick={onClictFunction}>{children}</Button>';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Buttons/Button',\n component: Button,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: Button,\n codeString: codeString,\n },\n} as Meta<ButtonProps>;\n\nconst Template: StoryFn<ButtonProps> = (args) => <Button {...args} />;\n\nconst defaultArgs: Partial<ButtonProps> = {\n variant: 'primary',\n disabled: false,\n displayColumn: false,\n onClick: fn(),\n};\n\nexport const ButtonExample = Template.bind({});\nButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","Button_stories","Button","Template","args","jsx","defaultArgs","fn","ButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa,2EAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,OAAO;AAAA,MACzF,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAiC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAQ,GAAGE,EAAM,CAAA,GAE7DE,IAAoC;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,eAAe;AAAA,EACf,SAASC,EAAG;AACd,GAEaC,IAAgBL,EAAS,KAAK,EAAE;AAC7CK,EAAc,OAAO;AAAA,EACnB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAuBN,EAAS,KAAK,EAAE;AACpDM,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,UAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AACAI,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
2
|
-
import { fn as
|
|
1
|
+
import { jsxs as a, Fragment as s, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { fn as l } from "../../index-MQ0yPLdl.js";
|
|
3
3
|
import { BrowserRouter as c } from "react-router-dom";
|
|
4
4
|
import { LinkButton as n } from "./LinkButton.js";
|
|
5
5
|
const d = `
|
|
6
6
|
// Has all HTMLAnchorElement props available except "className" and "style"
|
|
7
7
|
<LinkButton variant={variant} to={to} replace={replace} buttonRef={buttonRef}>{children}</LinkButton>
|
|
8
8
|
`, k = {
|
|
9
|
-
title: "Atoms/LinkButton",
|
|
9
|
+
title: "Atoms/Buttons/LinkButton",
|
|
10
10
|
component: n,
|
|
11
11
|
argTypes: {
|
|
12
12
|
variant: {
|
|
@@ -20,7 +20,7 @@ const d = `
|
|
|
20
20
|
}
|
|
21
21
|
}, r = (o) => /* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(n, { ...o }) }), i = {
|
|
22
22
|
variant: "primary",
|
|
23
|
-
onClick:
|
|
23
|
+
onClick: l()
|
|
24
24
|
}, p = r.bind({});
|
|
25
25
|
p.args = {
|
|
26
26
|
children: "Click me!",
|
|
@@ -29,7 +29,7 @@ p.args = {
|
|
|
29
29
|
const e = r.bind({});
|
|
30
30
|
e.args = {
|
|
31
31
|
...i,
|
|
32
|
-
children: /* @__PURE__ */ a(
|
|
32
|
+
children: /* @__PURE__ */ a(s, { children: [
|
|
33
33
|
/* @__PURE__ */ t("div", { children: "Child 1" }),
|
|
34
34
|
/* @__PURE__ */ t("div", { children: "Child 2" })
|
|
35
35
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.stories.js","sources":["../../../src/components/Buttons/LinkButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\nimport { BrowserRouter } from 'react-router-dom';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { LinkButtonProps } from './LinkButton';\n\nimport { LinkButton } from './LinkButton';\n\nconst codeString = `\n// Has all HTMLAnchorElement props available except \"className\" and \"style\" \n <LinkButton variant={variant} to={to} replace={replace} buttonRef={buttonRef}>{children}</LinkButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/LinkButton',\n component: LinkButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: LinkButton,\n codeString: codeString,\n },\n} as Meta<LinkButtonProps>;\n\nconst Template: StoryFn<LinkButtonProps> = (args) => (\n <BrowserRouter>\n <LinkButton {...args} />\n </BrowserRouter>\n);\n\nconst defaultArgs: Partial<LinkButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const LinkButtonExample = Template.bind({});\nLinkButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","LinkButton_stories","LinkButton","Template","args","jsx","BrowserRouter","defaultArgs","fn","LinkButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;;AAQA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAC1C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,EACxB,CAAA,GAGIG,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBN,EAAS,KAAK,EAAE;AACjDM,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,UAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
1
|
+
{"version":3,"file":"LinkButton.stories.js","sources":["../../../src/components/Buttons/LinkButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\nimport { BrowserRouter } from 'react-router-dom';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { LinkButtonProps } from './LinkButton';\n\nimport { LinkButton } from './LinkButton';\n\nconst codeString = `\n// Has all HTMLAnchorElement props available except \"className\" and \"style\" \n <LinkButton variant={variant} to={to} replace={replace} buttonRef={buttonRef}>{children}</LinkButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Buttons/LinkButton',\n component: LinkButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: LinkButton,\n codeString: codeString,\n },\n} as Meta<LinkButtonProps>;\n\nconst Template: StoryFn<LinkButtonProps> = (args) => (\n <BrowserRouter>\n <LinkButton {...args} />\n </BrowserRouter>\n);\n\nconst defaultArgs: Partial<LinkButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const LinkButtonExample = Template.bind({});\nLinkButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","LinkButton_stories","LinkButton","Template","args","jsx","BrowserRouter","defaultArgs","fn","LinkButtonExample","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;;AAQA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAC1C,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,EACxB,CAAA,GAGIG,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBN,EAAS,KAAK,EAAE;AACjDM,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGH;AAAA,EACH,UAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as s, Fragment as l, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { fn as c } from "../../index-MQ0yPLdl.js";
|
|
3
|
-
import { MenuButton as
|
|
3
|
+
import { MenuButton as t } from "./MenuButton.js";
|
|
4
4
|
const d = `
|
|
5
5
|
// Has all LabelHTMLAttributes props available except "className" and "style"
|
|
6
6
|
<MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>
|
|
7
7
|
`, b = {
|
|
8
|
-
title: "Atoms/MenuButton",
|
|
9
|
-
component:
|
|
8
|
+
title: "Atoms/Buttons/MenuButton",
|
|
9
|
+
component: t,
|
|
10
10
|
argTypes: {
|
|
11
11
|
variant: {
|
|
12
12
|
options: ["primary", "secondary", "destructive-primary", "destructive-secondary", "blank", "blank-icon"],
|
|
@@ -14,10 +14,10 @@ const d = `
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
parameters: {
|
|
17
|
-
inspectComponent:
|
|
17
|
+
inspectComponent: t,
|
|
18
18
|
codeString: d
|
|
19
19
|
}
|
|
20
|
-
}, r = (a) => /* @__PURE__ */ n(
|
|
20
|
+
}, r = (a) => /* @__PURE__ */ n(t, { ...a }), o = {
|
|
21
21
|
variant: "primary",
|
|
22
22
|
onClick: c()
|
|
23
23
|
}, p = r.bind({});
|
|
@@ -25,13 +25,13 @@ p.args = {
|
|
|
25
25
|
children: "Click me!",
|
|
26
26
|
...o
|
|
27
27
|
};
|
|
28
|
-
const
|
|
29
|
-
|
|
28
|
+
const e = r.bind({});
|
|
29
|
+
e.args = {
|
|
30
30
|
...o,
|
|
31
31
|
iconName: "EllipsisVertical"
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
...
|
|
33
|
+
e.argTypes = {
|
|
34
|
+
...e.argTypes,
|
|
35
35
|
children: {
|
|
36
36
|
table: {
|
|
37
37
|
disable: !0
|
|
@@ -58,7 +58,7 @@ i.argTypes = {
|
|
|
58
58
|
};
|
|
59
59
|
export {
|
|
60
60
|
p as MenuButtonExample,
|
|
61
|
-
|
|
61
|
+
e as WithIconChildren,
|
|
62
62
|
i as WithMultipleChildren,
|
|
63
63
|
b as default
|
|
64
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuButton.stories.js","sources":["../../../src/components/Buttons/MenuButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MenuButtonProps } from './MenuButton';\n\nimport { MenuButton } from './MenuButton';\n\nconst codeString = `\n// Has all LabelHTMLAttributes props available except \"className\" and \"style\" \n <MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/MenuButton',\n component: MenuButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: MenuButton,\n codeString: codeString,\n },\n} as Meta<MenuButtonProps>;\n\nconst Template: StoryFn<MenuButtonProps> = (args) => <MenuButton {...args} />;\n\nconst defaultArgs: Partial<MenuButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const MenuButtonExample = Template.bind({});\nMenuButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithIconChildren = Template.bind({});\nWithIconChildren.args = {\n ...defaultArgs,\n iconName: 'EllipsisVertical',\n};\n\nWithIconChildren.argTypes = {\n ...WithIconChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","MenuButton_stories","MenuButton","Template","args","jsx","defaultArgs","fn","MenuButtonExample","WithIconChildren","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,GAErEE,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAmBN,EAAS,KAAK,EAAE;AAChDM,EAAiB,OAAO;AAAA,EACtB,GAAGH;AAAA,EACH,UAAU;AACZ;AAEAG,EAAiB,WAAW;AAAA,EAC1B,GAAGA,EAAiB;AAAA,EACpB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAMC,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGJ;AAAA,EACH,UAEI,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
1
|
+
{"version":3,"file":"MenuButton.stories.js","sources":["../../../src/components/Buttons/MenuButton.stories.tsx"],"sourcesContent":["import { fn } from '@storybook/test';\n\nimport type { Meta, StoryFn } from '@storybook/react';\nimport type { MenuButtonProps } from './MenuButton';\n\nimport { MenuButton } from './MenuButton';\n\nconst codeString = `\n// Has all LabelHTMLAttributes props available except \"className\" and \"style\" \n <MenuButton variant={variant} onClick={onClickFunction} onKeyDown={onKeyDown} onKeyUp={onKeyUp} buttonRef={buttonRef}>{children}</MenuButton>\n`;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Buttons/MenuButton',\n component: MenuButton,\n argTypes: {\n variant: {\n options: ['primary', 'secondary', 'destructive-primary', 'destructive-secondary', 'blank', 'blank-icon'],\n control: { type: 'radio' },\n },\n },\n parameters: {\n inspectComponent: MenuButton,\n codeString: codeString,\n },\n} as Meta<MenuButtonProps>;\n\nconst Template: StoryFn<MenuButtonProps> = (args) => <MenuButton {...args} />;\n\nconst defaultArgs: Partial<MenuButtonProps> = {\n variant: 'primary',\n onClick: fn(),\n};\n\nexport const MenuButtonExample = Template.bind({});\nMenuButtonExample.args = {\n children: 'Click me!',\n ...defaultArgs,\n};\n\nexport const WithIconChildren = Template.bind({});\nWithIconChildren.args = {\n ...defaultArgs,\n iconName: 'EllipsisVertical',\n};\n\nWithIconChildren.argTypes = {\n ...WithIconChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n\nexport const WithMultipleChildren = Template.bind({});\nWithMultipleChildren.args = {\n ...defaultArgs,\n children: (\n <>\n <div>Child 1</div>\n <div>Child 2</div>\n </>\n ),\n};\n\nWithMultipleChildren.argTypes = {\n ...WithMultipleChildren.argTypes,\n children: {\n table: {\n disable: true, // Disable children controls for this specific story\n },\n },\n};\n"],"names":["codeString","MenuButton_stories","MenuButton","Template","args","jsx","defaultArgs","fn","MenuButtonExample","WithIconChildren","WithMultipleChildren","jsxs","Fragment"],"mappings":";;;AAOA,MAAMA,IAAa;AAAA;AAAA;AAAA,GAMJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,CAAC,WAAW,aAAa,uBAAuB,yBAAyB,SAAS,YAAY;AAAA,MACvG,SAAS,EAAE,MAAM,QAAQ;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAqC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAY,GAAGE,EAAM,CAAA,GAErEE,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,SAASC,EAAG;AACd,GAEaC,IAAoBL,EAAS,KAAK,EAAE;AACjDK,EAAkB,OAAO;AAAA,EACvB,UAAU;AAAA,EACV,GAAGF;AACL;AAEO,MAAMG,IAAmBN,EAAS,KAAK,EAAE;AAChDM,EAAiB,OAAO;AAAA,EACtB,GAAGH;AAAA,EACH,UAAU;AACZ;AAEAG,EAAiB,WAAW;AAAA,EAC1B,GAAGA,EAAiB;AAAA,EACpB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;AAEO,MAAMC,IAAuBP,EAAS,KAAK,EAAE;AACpDO,EAAqB,OAAO;AAAA,EAC1B,GAAGJ;AAAA,EACH,UAEI,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAP,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,IACZ,gBAAAA,EAAC,SAAI,UAAO,UAAA,CAAA;AAAA,EAAA,GACd;AAEJ;AAEAK,EAAqB,WAAW;AAAA,EAC9B,GAAGA,EAAqB;AAAA,EACxB,UAAU;AAAA,IACR,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface HorizontalListProps {
|
|
2
3
|
/** The items to display. */
|
|
3
|
-
values:
|
|
4
|
+
values: ReactNode[];
|
|
4
5
|
/** The separator to use. */
|
|
5
|
-
separator?:
|
|
6
|
+
separator?: ReactNode;
|
|
6
7
|
}
|
|
7
8
|
/** Represents a component to show text separated by a given separator in a horizontal direction. */
|
|
8
9
|
export declare const HorizontalList: ({ values, separator }: HorizontalListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import '../../assets/HorizontalList.css';const
|
|
3
|
-
"horizontal-list-wrapper": "_horizontal-list-
|
|
4
|
-
"horizontal-list-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/HorizontalList.css';const t = {
|
|
3
|
+
"horizontal-list-wrapper": "_horizontal-list-wrapper_oivby_1",
|
|
4
|
+
"horizontal-list-value": "_horizontal-list-value_oivby_6",
|
|
5
|
+
"horizontal-list-separator": "_horizontal-list-separator_oivby_11"
|
|
6
|
+
}, p = ({ values: r, separator: a = "•" }) => /* @__PURE__ */ s("div", { className: t["horizontal-list-wrapper"], children: r.map((o, i) => /* @__PURE__ */ l("span", { className: t["horizontal-list-value"], children: [
|
|
7
|
+
o,
|
|
8
|
+
i < r.length - 1 && /* @__PURE__ */ s("span", { className: t["horizontal-list-separator"], children: a })
|
|
9
|
+
] }, `${o == null ? void 0 : o.toString()}-${i}`)) });
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
p as HorizontalList
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=HorizontalList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values:
|
|
1
|
+
{"version":3,"file":"HorizontalList.js","sources":["../../../src/components/HorizontalList/HorizontalList.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport styles from './HorizontalList.module.css';\n\nexport interface HorizontalListProps {\n /** The items to display. */\n values: ReactNode[];\n /** The separator to use. */\n separator?: ReactNode;\n}\n\n/** Represents a component to show text separated by a given separator in a horizontal direction. */\nexport const HorizontalList = ({ values, separator = '•' }: HorizontalListProps) => {\n return (\n <div className={styles['horizontal-list-wrapper']}>\n {values.map((value, index) => (\n <span className={styles['horizontal-list-value']} key={`${value?.toString()}-${index}`}>\n {value}\n {index < values.length - 1 && <span className={styles['horizontal-list-separator']}>{separator}</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"names":["HorizontalList","values","separator","styles","value","index","jsxs","jsx"],"mappings":";;;;;GAYaA,IAAiB,CAAC,EAAE,QAAAC,GAAQ,WAAAC,IAAY,4BAEhD,OAAI,EAAA,WAAWC,EAAO,yBAAyB,GAC7C,UAAOF,EAAA,IAAI,CAACG,GAAOC,MACjB,gBAAAC,EAAA,QAAA,EAAK,WAAWH,EAAO,uBAAuB,GAC5C,UAAA;AAAA,EAAAC;AAAA,EACAC,IAAQJ,EAAO,SAAS,KAAK,gBAAAM,EAAC,UAAK,WAAWJ,EAAO,2BAA2B,GAAI,UAAUD,EAAA,CAAA;AAAA,KAF1C,GAAGE,KAAA,gBAAAA,EAAO,UAAU,IAAIC,CAAK,EAGpF,CACD,EACH,CAAA;"}
|
|
@@ -3,3 +3,4 @@ import { HorizontalListProps } from './HorizontalList';
|
|
|
3
3
|
declare const _default: Meta<HorizontalListProps>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const HorizontalListExample: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, HorizontalListProps>;
|
|
6
|
+
export declare const WithComplexContent: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, HorizontalListProps>;
|
|
@@ -1,26 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { HorizontalList as
|
|
3
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { HorizontalList as o } from "./HorizontalList.js";
|
|
3
|
+
import { Button as i } from "../Buttons/Button.js";
|
|
4
|
+
import "../Buttons/LinkButton.js";
|
|
5
|
+
import "@react-aria/button";
|
|
6
|
+
import { Icon as r } from "../Icon/Icon.js";
|
|
7
|
+
const n = '<HorizontalList values={values} separator="•" />', g = {
|
|
4
8
|
title: "Atoms/HorizontalList",
|
|
5
|
-
component:
|
|
9
|
+
component: o,
|
|
6
10
|
argTypes: {
|
|
7
11
|
separator: {
|
|
8
12
|
control: "text"
|
|
9
13
|
}
|
|
10
14
|
},
|
|
11
15
|
parameters: {
|
|
12
|
-
inspectComponent:
|
|
13
|
-
codeString:
|
|
16
|
+
inspectComponent: o,
|
|
17
|
+
codeString: n
|
|
18
|
+
}
|
|
19
|
+
}, s = (a) => /* @__PURE__ */ t(o, { ...a }), l = s.bind({});
|
|
20
|
+
l.args = {
|
|
21
|
+
values: ["Curabitur consequat", "Lectus sit amet luctus vulputate", "Nisi semi mattis"]
|
|
22
|
+
};
|
|
23
|
+
const e = s.bind({});
|
|
24
|
+
e.args = {
|
|
25
|
+
values: [
|
|
26
|
+
/* @__PURE__ */ t("a", { href: "/?path=/story/atoms-horizontallist--with-complex-content", children: "Curabitur consequat" }, "1"),
|
|
27
|
+
/* @__PURE__ */ t(i, { type: "button", variant: "primary", children: "Lectus sit amet luctus vulputate" }, "2"),
|
|
28
|
+
/* @__PURE__ */ t(r, { name: "Sparkles" }, "3"),
|
|
29
|
+
/* @__PURE__ */ t("strong", { children: "Nisi semi mattis" }, "4")
|
|
30
|
+
],
|
|
31
|
+
separator: /* @__PURE__ */ t(r, { name: "CheveronRight", size: 16 })
|
|
32
|
+
};
|
|
33
|
+
e.argTypes = {
|
|
34
|
+
...e.argTypes,
|
|
35
|
+
separator: {
|
|
36
|
+
table: {
|
|
37
|
+
disable: !0
|
|
38
|
+
// Disable separator controls for this specific story
|
|
39
|
+
}
|
|
14
40
|
}
|
|
15
|
-
}, e = (o) => /* @__PURE__ */ s(t, { ...o }), r = {
|
|
16
|
-
values: ["Curabitur consequat", "Lectus sit amet luctus vulputate", "Nisi semi mattis"],
|
|
17
|
-
separator: "•"
|
|
18
|
-
}, i = e.bind({});
|
|
19
|
-
i.args = {
|
|
20
|
-
...r
|
|
21
41
|
};
|
|
22
42
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
43
|
+
l as HorizontalListExample,
|
|
44
|
+
e as WithComplexContent,
|
|
45
|
+
g as default
|
|
25
46
|
};
|
|
26
47
|
//# sourceMappingURL=HorizontalList.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\nconst codeString = '<HorizontalList values={values} separator=\"•\" />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: HorizontalList,\n codeString: codeString,\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\
|
|
1
|
+
{"version":3,"file":"HorizontalList.stories.js","sources":["../../../src/components/HorizontalList/HorizontalList.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { HorizontalListProps } from './HorizontalList';\n\nimport { HorizontalList } from './HorizontalList';\n\nimport { Button } from 'components/Buttons';\nimport { Icon } from 'components/Icon';\n\nconst codeString = '<HorizontalList values={values} separator=\"•\" />';\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/HorizontalList',\n component: HorizontalList,\n argTypes: {\n separator: {\n control: 'text',\n },\n },\n parameters: {\n inspectComponent: HorizontalList,\n codeString: codeString,\n },\n} as Meta<HorizontalListProps>;\n\nconst Template: StoryFn<HorizontalListProps> = (args) => <HorizontalList {...args} />;\n\nexport const HorizontalListExample = Template.bind({});\nHorizontalListExample.args = {\n values: ['Curabitur consequat', 'Lectus sit amet luctus vulputate', 'Nisi semi mattis'],\n};\n\nexport const WithComplexContent = Template.bind({});\nWithComplexContent.args = {\n values: [\n <a href=\"/?path=/story/atoms-horizontallist--with-complex-content\" key=\"1\">\n Curabitur consequat\n </a>,\n <Button type=\"button\" variant=\"primary\" key=\"2\">\n Lectus sit amet luctus vulputate\n </Button>,\n <Icon name=\"Sparkles\" key=\"3\" />,\n <strong key=\"4\">Nisi semi mattis</strong>,\n ],\n separator: <Icon name=\"CheveronRight\" size={16} />,\n};\n\nWithComplexContent.argTypes = {\n ...WithComplexContent.argTypes,\n separator: {\n table: {\n disable: true, // Disable separator controls for this specific story\n },\n },\n};\n"],"names":["codeString","HorizontalList_stories","HorizontalList","Template","args","jsx","HorizontalListExample","WithComplexContent","Button","Icon"],"mappings":";;;;;;AAQA,MAAMA,IAAa,oDAGJC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,WAAW;AAAA,MACT,SAAS;AAAA,IACX;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAF;AAAA,EACF;AACF,GAEMG,IAAyC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAgB,GAAGE,EAAM,CAAA,GAEtEE,IAAwBH,EAAS,KAAK,EAAE;AACrDG,EAAsB,OAAO;AAAA,EAC3B,QAAQ,CAAC,uBAAuB,oCAAoC,kBAAkB;AACxF;AAEO,MAAMC,IAAqBJ,EAAS,KAAK,EAAE;AAClDI,EAAmB,OAAO;AAAA,EACxB,QAAQ;AAAA,IACL,gBAAAF,EAAA,KAAA,EAAE,MAAK,4DAAmE,mCAAJ,GAEvE;AAAA,sBACCG,GAAO,EAAA,MAAK,UAAS,SAAQ,WAAkB,gDAAJ,GAE5C;AAAA,IACC,gBAAAH,EAAAI,GAAA,EAAK,MAAK,WAAA,GAAe,GAAI;AAAA,IAC9B,gBAAAJ,EAAC,UAAe,EAAA,UAAA,mBAAA,GAAJ,GAAoB;AAAA,EAClC;AAAA,EACA,WAAY,gBAAAA,EAAAI,GAAA,EAAK,MAAK,iBAAgB,MAAM,IAAI;AAClD;AAEAF,EAAmB,WAAW;AAAA,EAC5B,GAAGA,EAAmB;AAAA,EACtB,WAAW;AAAA,IACT,OAAO;AAAA,MACL,SAAS;AAAA;AAAA,IACX;AAAA,EACF;AACF;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { u as m, d as n } from "../../../../Lexical.prod-
|
|
2
|
+
import { u as m, d as n } from "../../../../Lexical.prod-zUeT_jIr.js";
|
|
3
3
|
import { c as s } from "../../../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { Icon as d } from "../../../Icon/Icon.js";
|
|
5
|
-
import { s as t } from "../../../../RteEditor.module
|
|
5
|
+
import { s as t } from "../../../../RteEditor.module--4R0Ql6Y.js";
|
|
6
6
|
const b = {
|
|
7
7
|
bold: "FormatBold",
|
|
8
8
|
italic: "FormatItalic"
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { u as S } from "../../../../Lexical.prod-zUeT_jIr.js";
|
|
3
|
+
import { c as _ } from "../../../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { U as k, v as E } from "../../../../helpers-DpGAANJ8.js";
|
|
5
|
+
import { useState as g, useRef as R, useEffect as f } from "react";
|
|
6
|
+
import { useFlyout as T } from "../../hooks/useFlyout.js";
|
|
7
|
+
import { Icon as v } from "../../../Icon/Icon.js";
|
|
8
|
+
import { Button as F } from "../../../Buttons/Button.js";
|
|
9
|
+
import "../../../Buttons/LinkButton.js";
|
|
10
|
+
import "@react-aria/button";
|
|
11
|
+
import { Checkbox as V } from "../../../Checkbox/Checkbox.js";
|
|
12
|
+
import { Label as y } from "../../../Label/Label.js";
|
|
13
|
+
import "@react-aria/dialog";
|
|
14
|
+
import "@react-aria/focus";
|
|
15
|
+
import "@react-aria/overlays";
|
|
16
|
+
import "../../../OverlayCloseButton/OverlayCloseButton.js";
|
|
17
|
+
import { FeedbackBox as j } from "../../../FeedbackBox/FeedbackBox.js";
|
|
18
|
+
import { FormField as C } from "../../../FormField/FormField.js";
|
|
19
|
+
import "../../../GridRow/GridRow.js";
|
|
20
|
+
import "../../../IconButton/IconButton.js";
|
|
21
|
+
import "../../../Input/Input.js";
|
|
22
|
+
import { InputField as z } from "../../../InputField/InputField.js";
|
|
23
|
+
import "react-router-dom";
|
|
24
|
+
import "../../../../MultiSelect-D1FnMER4.js";
|
|
25
|
+
import { s as t } from "../../../../RteEditor.module--4R0Ql6Y.js";
|
|
26
|
+
import "../../../SelectListbox/SelectListbox.js";
|
|
27
|
+
import "../../../SelectListbox/SelectProvider.js";
|
|
28
|
+
const cr = ({ isLink: o = { active: !1, url: "", target: "_self" } }) => {
|
|
29
|
+
const [c, m] = g(o.target === "_blank"), e = R(null), [p] = S(), { flyout: N, showFlyout: s, closeFlyout: u, isVisible: n } = T(), [a, h] = g(null), x = () => {
|
|
30
|
+
m((l) => !l);
|
|
31
|
+
}, w = () => {
|
|
32
|
+
var b;
|
|
33
|
+
const l = (b = e.current) == null ? void 0 : b.value;
|
|
34
|
+
if (!l && l.trim() === "" || E(l) === !1) {
|
|
35
|
+
h("Geen of geen geldige url ingevoerd");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
p.dispatchCommand(k, {
|
|
39
|
+
url: l,
|
|
40
|
+
target: c ? "_blank" : "_self"
|
|
41
|
+
}), u();
|
|
42
|
+
}, U = () => {
|
|
43
|
+
p.dispatchCommand(k, null);
|
|
44
|
+
}, d = {
|
|
45
|
+
children: /* @__PURE__ */ i("div", { className: t.editor__linkform, children: [
|
|
46
|
+
/* @__PURE__ */ i(C, { className: t["editor__linkform-input-field"], children: [
|
|
47
|
+
/* @__PURE__ */ r(y, { htmlFor: "lnikUrl", children: "Link" }),
|
|
48
|
+
/* @__PURE__ */ r(z, { id: "lnikUrl", ref: e, placeholder: "http(s)://" }),
|
|
49
|
+
a && /* @__PURE__ */ r(j, { level: "error", feedback: a })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ i(C, { inline: !0, children: [
|
|
52
|
+
/* @__PURE__ */ r(V, { id: "linkTarget", onChange: x, checked: c }),
|
|
53
|
+
/* @__PURE__ */ r(y, { htmlFor: "linkTarget", children: "Open in nieuwe window" })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ i("div", { className: t["editor__linkform-footer"], children: [
|
|
56
|
+
/* @__PURE__ */ r(F, { variant: "secondary", onClick: u, children: "Annuleer" }),
|
|
57
|
+
/* @__PURE__ */ r(F, { variant: "primary", onClick: w, children: "Link" })
|
|
58
|
+
] })
|
|
59
|
+
] })
|
|
60
|
+
};
|
|
61
|
+
return f(() => {
|
|
62
|
+
a && s(d);
|
|
63
|
+
}, [a]), f(() => {
|
|
64
|
+
n && s(d);
|
|
65
|
+
}, [c]), f(() => {
|
|
66
|
+
!n && e.current ? (h(null), e.current.value = "", m(!1)) : e.current && o.url && (e.current.value = o.url || "", m(o.target === "_blank"), console.log("focus", e.current), e.current.focus());
|
|
67
|
+
}, [n, o.url, o.target]), /* @__PURE__ */ i("div", { className: t["editor__toolbar-button-group"], children: [
|
|
68
|
+
/* @__PURE__ */ i("div", { className: t["editor__toolbar-button-flyoutwrapper"], children: [
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
onClick: () => n ? u() : s(d),
|
|
73
|
+
className: _(
|
|
74
|
+
t["editor__toolbar-button"],
|
|
75
|
+
t["editor__toolbar-button--link"],
|
|
76
|
+
o.active && t["editor__toolbar-button--active"]
|
|
77
|
+
),
|
|
78
|
+
"aria-label": "Format link",
|
|
79
|
+
children: /* @__PURE__ */ r(v, { name: "Link", size: 20 })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
N
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ r(
|
|
85
|
+
"button",
|
|
86
|
+
{
|
|
87
|
+
onClick: U,
|
|
88
|
+
className: _(t["editor__toolbar-button"], t["editor__toolbar-button--link"]),
|
|
89
|
+
"aria-label": "Remove link",
|
|
90
|
+
children: /* @__PURE__ */ r(v, { name: "LinkSlash", size: 20 })
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] });
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
cr as LinkPlugin
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=LinkPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinkPlugin.js","sources":["../../../../../src/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.tsx"],"sourcesContent":["import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';\nimport clsx from 'clsx';\nimport { TOGGLE_LINK_COMMAND } from '@lexical/link';\nimport { useEffect, useRef, useState } from 'react';\n\nimport type { LinkType } from 'components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin';\n\nimport { validateUrlWithProtocol } from './helpers';\n\nimport { useFlyout } from 'components/RteEditor/hooks';\nimport { Button, InputField, Icon, Label, FormField, Checkbox, FeedbackBox } from 'components';\nimport styles from 'components/RteEditor/RteEditor.module.css';\ninterface LinkPluginProps {\n isLink: LinkType;\n}\n\nexport const LinkPlugin = ({ isLink = { active: false, url: '', target: '_self' } }: LinkPluginProps) => {\n const [targetSelectedValue, setTargetSelectedValue] = useState<boolean>(isLink.target === '_blank');\n const urlRef = useRef<HTMLInputElement>(null);\n const [editor] = useLexicalComposerContext();\n const { flyout, showFlyout, closeFlyout, isVisible } = useFlyout();\n const [urlError, setUrlError] = useState<string | null>(null);\n\n const handleChange = () => {\n setTargetSelectedValue((prev) => !prev);\n };\n\n const insertLink = () => {\n const url = urlRef.current?.value as string;\n if ((!url && url.trim() === '') || validateUrlWithProtocol(url) === false) {\n setUrlError('Geen of geen geldige url ingevoerd');\n return;\n }\n\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n url,\n target: targetSelectedValue ? '_blank' : '_self',\n });\n\n closeFlyout();\n };\n\n const removeLink = (): void => {\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, null);\n };\n\n const flyoutOptions = {\n children: (\n <div className={styles['editor__linkform']}>\n <FormField className={styles['editor__linkform-input-field']}>\n <Label htmlFor=\"lnikUrl\">Link</Label>\n <InputField id=\"lnikUrl\" ref={urlRef} placeholder=\"http(s)://\" />\n {urlError && <FeedbackBox level=\"error\" feedback={urlError} />}\n </FormField>\n <FormField inline>\n <Checkbox id=\"linkTarget\" onChange={handleChange} checked={targetSelectedValue} />\n <Label htmlFor=\"linkTarget\">Open in nieuwe window</Label>\n </FormField>\n <div className={styles['editor__linkform-footer']}>\n <Button variant={'secondary'} onClick={closeFlyout}>\n Annuleer\n </Button>\n <Button variant={'primary'} onClick={insertLink}>\n Link\n </Button>\n </div>\n </div>\n ),\n };\n\n useEffect(() => {\n if (urlError) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [urlError]);\n\n useEffect(() => {\n if (isVisible) {\n showFlyout(flyoutOptions);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [targetSelectedValue]);\n\n useEffect(() => {\n if (!isVisible && urlRef.current) {\n setUrlError(null);\n urlRef.current.value = '';\n setTargetSelectedValue(false);\n } else if (urlRef.current && isLink.url) {\n urlRef.current.value = isLink.url || '';\n setTargetSelectedValue(isLink.target === '_blank');\n console.log('focus', urlRef.current);\n urlRef.current.focus();\n }\n }, [isVisible, isLink.url, isLink.target]);\n\n return (\n <div className={styles['editor__toolbar-button-group']}>\n <div className={styles['editor__toolbar-button-flyoutwrapper']}>\n <button\n onClick={() => (isVisible ? closeFlyout() : showFlyout(flyoutOptions))}\n className={clsx(\n styles['editor__toolbar-button'],\n styles[`editor__toolbar-button--link`],\n isLink.active && styles['editor__toolbar-button--active']\n )}\n aria-label={`Format link`}\n >\n <Icon name=\"Link\" size={20} />\n </button>\n {flyout}\n </div>\n <button\n onClick={removeLink}\n className={clsx(styles['editor__toolbar-button'], styles[`editor__toolbar-button--link`])}\n aria-label={`Remove link`}\n >\n <Icon name=\"LinkSlash\" size={20} />\n </button>\n </div>\n );\n};\n"],"names":["LinkPlugin","isLink","targetSelectedValue","setTargetSelectedValue","useState","urlRef","useRef","editor","useLexicalComposerContext","flyout","showFlyout","closeFlyout","isVisible","useFlyout","urlError","setUrlError","handleChange","prev","insertLink","url","_a","validateUrlWithProtocol","TOGGLE_LINK_COMMAND","removeLink","flyoutOptions","jsxs","styles","FormField","jsx","Label","InputField","FeedbackBox","Checkbox","Button","useEffect","clsx","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAMA,KAAa,CAAC,EAAE,QAAAC,IAAS,EAAE,QAAQ,IAAO,KAAK,IAAI,QAAQ,QAAQ,QAAyB;AACvG,QAAM,CAACC,GAAqBC,CAAsB,IAAIC,EAAkBH,EAAO,WAAW,QAAQ,GAC5FI,IAASC,EAAyB,IAAI,GACtC,CAACC,CAAM,IAAIC,KACX,EAAE,QAAAC,GAAQ,YAAAC,GAAY,aAAAC,GAAa,WAAAC,EAAA,IAAcC,KACjD,CAACC,GAAUC,CAAW,IAAIX,EAAwB,IAAI,GAEtDY,IAAe,MAAM;AACF,IAAAb,EAAA,CAACc,MAAS,CAACA,CAAI;AAAA,EAAA,GAGlCC,IAAa,MAAM;;AACjB,UAAAC,KAAMC,IAAAf,EAAO,YAAP,gBAAAe,EAAgB;AACvB,QAAA,CAACD,KAAOA,EAAI,KAAA,MAAW,MAAOE,EAAwBF,CAAG,MAAM,IAAO;AACzE,MAAAJ,EAAY,oCAAoC;AAChD;AAAA,IACF;AAEA,IAAAR,EAAO,gBAAgBe,GAAqB;AAAA,MAC1C,KAAAH;AAAA,MACA,QAA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,EAAY,IAAI,GAChBV,EAAO,QAAQ,QAAQ,IACvBF,EAAuB,EAAK,KACnBE,EAAO,WAAWJ,EAAO,QAC3BI,EAAA,QAAQ,QAAQJ,EAAO,OAAO,IACdE,EAAAF,EAAO,WAAW,QAAQ,GACzC,QAAA,IAAI,SAASI,EAAO,OAAO,GACnCA,EAAO,QAAQ;EACjB,GACC,CAACO,GAAWX,EAAO,KAAKA,EAAO,MAAM,CAAC,GAGtC,gBAAAwB,EAAA,OAAA,EAAI,WAAWC,EAAO,8BAA8B,GACnD,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAI,EAAA,WAAWC,EAAO,sCAAsC,GAC3D,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAS,MAAOhB,IAAYD,EAAY,IAAID,EAAWc,CAAa;AAAA,UACpE,WAAWW;AAAA,YACTT,EAAO,wBAAwB;AAAA,YAC/BA,EAAO,8BAA8B;AAAA,YACrCzB,EAAO,UAAUyB,EAAO,gCAAgC;AAAA,UAC1D;AAAA,UACA,cAAY;AAAA,UAEZ,UAAC,gBAAAE,EAAAQ,GAAA,EAAK,MAAK,QAAO,MAAM,IAAI;AAAA,QAAA;AAAA,MAC9B;AAAA,MACC3B;AAAA,IAAA,GACH;AAAA,IACA,gBAAAmB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,SAASL;AAAA,QACT,WAAWY,EAAKT,EAAO,wBAAwB,GAAGA,EAAO,8BAA8B,CAAC;AAAA,QACxF,cAAY;AAAA,QAEZ,UAAC,gBAAAE,EAAAQ,GAAA,EAAK,MAAK,aAAY,MAAM,IAAI;AAAA,MAAA;AAAA,IACnC;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const validateUrl: (url: string) => boolean;
|
|
2
|
+
export declare const validateUrlWithProtocol: (url: string) => boolean;
|
|
3
|
+
export declare const MATCHERS: ((text: string) => {
|
|
4
|
+
index: number;
|
|
5
|
+
length: number;
|
|
6
|
+
text: string;
|
|
7
|
+
url: string;
|
|
8
|
+
} | null)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LinkPlugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|