From 7b965ec219bcd95515045578549279dad2e251d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariana=20N=C3=BA=C3=B1ez?= <48533432+mariannuar@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:32:29 -0600 Subject: [PATCH 01/44] Design tokens for Utility Menu --- src/tokens/figma.tokens.json | 102 ++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 37 deletions(-) diff --git a/src/tokens/figma.tokens.json b/src/tokens/figma.tokens.json index a358402..0af6df5 100644 --- a/src/tokens/figma.tokens.json +++ b/src/tokens/figma.tokens.json @@ -2176,6 +2176,26 @@ } } }, + "components/utilityMenu": { + "utilityMenu": { + "color": { + "bg": { + "value": "{color.white}", + "type": "color" + }, + "link": { + "default": { + "value": "{color.primary.darker}", + "type": "color" + }, + "hover": { + "value": "{color.primary.dark}", + "type": "color" + } + } + } + } + }, "components/pager": { "pager": { "color": { @@ -2620,15 +2640,6 @@ "pager.text.hover": "S:d5268cc95f0ca68a28f35d87395f9ce37893fe23,", "pager.text.focus": "S:d03b986e8d65e0c71a1837ec7325ffbce6d6aaa7,", "pager.fill.hover": "S:5bdc99f7ec11756cdef48ec3e13c9b4dd6f4ea81,", - "mainMenu.color.bg": "S:bf2522b49aa417ce534b5208e0f6beef55486cf3,", - "mainMenu.color.link.bg": "S:b11ab65866a7661d8fc26a7a62b099ef30061f50,", - "mainMenu.color.link.bg-hover": "S:af6ac50c749eaa990fbd9ffed40c1b9674a723a4,", - "mainMenu.color.link.label": "S:743bcf21f9c07a7963a7edb4225d95bca9b41703,", - "mainMenu.color.link.label-hover": "S:93bfd2e3b7bbd01dc37c4f80afe8e75e9924fdaf,", - "mainMenu.color.dropdown.bg": "S:79daec1641db62001cff89e93435729c39710614,", - "mainMenu.color.dropdown.bg-hover": "S:badcf257ef0a5a278b895483c36799c19afa98a4,", - "mainMenu.color.dropdown.label": "S:77771443996903bcb2c28595214f9e3a0c71d7e9,", - "mainMenu.color.dropdown.label-hover": "S:c3a0a9d457ae44f6f0e45c6a5c57e3bd57467383,", "link.default": "S:9fd4db376033a945bbc2bf5bfe8a698e68bd6f1a,", "link.hover": "S:e6b1afc9022d41b4217e773a9ab4abf90329cf46,", "color.fieldset.bg": "S:bfe975e6026fa7f0aa7fd11985d9ebaeb6565d17,", @@ -2731,7 +2742,16 @@ "color.grays.900": "S:d14dafeba041e023bd5c5d2c458c10f88801e824,", "color.grays.1000": "S:588f6731fa9753788b0b48bb7c575f3b94991a69,", "checkbox.color.label": "S:dd27f922df752738d999c185f11b67e77134feac,", - "checkbox.color.label-disabled": "S:72b6ef5a238e1bf6f232f7f0dc8f27095a075e3f," + "checkbox.color.label-disabled": "S:72b6ef5a238e1bf6f232f7f0dc8f27095a075e3f,", + "utilityMenu.color.bg": "S:bf2522b49aa417ce534b5208e0f6beef55486cf3,", + "utilityMenu.color.link.bg": "S:b11ab65866a7661d8fc26a7a62b099ef30061f50,", + "utilityMenu.color.link.label-hover": "S:93bfd2e3b7bbd01dc37c4f80afe8e75e9924fdaf,", + "utilityMenu.color.dropdown.bg": "S:79daec1641db62001cff89e93435729c39710614,", + "utilityMenu.color.dropdown.bg-hover": "S:badcf257ef0a5a278b895483c36799c19afa98a4,", + "utilityMenu.color.dropdown.label": "S:77771443996903bcb2c28595214f9e3a0c71d7e9,", + "utilityMenu.color.dropdown.label-hover": "S:c3a0a9d457ae44f6f0e45c6a5c57e3bd57467383,", + "utilityMenu.color.link.default": "S:af6ac50c749eaa990fbd9ffed40c1b9674a723a4,", + "utilityMenu.color.link.hover": "S:743bcf21f9c07a7963a7edb4225d95bca9b41703," }, "selectedTokenSets": { "global": "enabled", @@ -2758,7 +2778,8 @@ "components/announcement": "enabled", "components/banner": "enabled", "components/footer": "enabled", - "components/header": "enabled" + "components/header": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:16908", "$figmaModeId": "23237:10", @@ -2808,15 +2829,6 @@ "pager.text.hover": "2e1149296e028f68d0590547182eb3fa046b0799", "pager.text.focus": "f597287eb8465595918f5af8c56a3f803417cf81", "pager.fill.hover": "e7c4c208bc4d7ed93b94794070642830984f1687", - "mainMenu.color.bg": "9b1706999c4ef658c6b885428bf9f6a3058eba23", - "mainMenu.color.link.bg": "9fe948d4cb455eec777d28db8baa8046d75174c2", - "mainMenu.color.link.bg-hover": "29ea5911b9675ae3920cf9f26602f612fe9e33d5", - "mainMenu.color.link.label": "a28d88530a052b75025ad58244a622f52538ffdb", - "mainMenu.color.link.label-hover": "cd95962e180170545de51bf2995158682ea61805", - "mainMenu.color.dropdown.bg": "4fcd08018cb0ac6de9ae851dfdb35da945fc9128", - "mainMenu.color.dropdown.bg-hover": "25fdd7d0cc2e181e8290710f0f489248ad541477", - "mainMenu.color.dropdown.label": "1ab6130383e91011e698dd88b0fc4fce93f24d83", - "mainMenu.color.dropdown.label-hover": "2b680d5fc3c7c9c9b5e245400274c58f66cc6268", "link.default": "52f2a6ae3ef87bb2b4c96e2b8316e609a1f3e4e0", "link.hover": "602f312f7c40299996ccaf31cd8340e88ddcd6a8", "input.color.label": "40806b82869b549ff22858fd677df5c1c6d22cad", @@ -2938,7 +2950,16 @@ "checkbox.spacing.gap": "59fbad63c0994ee956f8790e994534f9f5f5e922", "checkbox.color.label": "4db65c0b61319b6c85cdb9c1b683d84e2f65ff52", "checkbox.color.label-disabled": "3a5dec39f06f92904d80c2096f9c439ae0b5d09a", - "color.link-hover": "74d0f74b830a9dd07279967cea7c9f662178e310" + "color.link-hover": "74d0f74b830a9dd07279967cea7c9f662178e310", + "utilityMenu.color.bg": "9b1706999c4ef658c6b885428bf9f6a3058eba23", + "utilityMenu.color.link.bg": "9fe948d4cb455eec777d28db8baa8046d75174c2", + "utilityMenu.color.link.label-hover": "cd95962e180170545de51bf2995158682ea61805", + "utilityMenu.color.dropdown.bg": "4fcd08018cb0ac6de9ae851dfdb35da945fc9128", + "utilityMenu.color.dropdown.bg-hover": "25fdd7d0cc2e181e8290710f0f489248ad541477", + "utilityMenu.color.dropdown.label": "1ab6130383e91011e698dd88b0fc4fce93f24d83", + "utilityMenu.color.dropdown.label-hover": "2b680d5fc3c7c9c9b5e245400274c58f66cc6268", + "utilityMenu.color.link.default": "29ea5911b9675ae3920cf9f26602f612fe9e33d5", + "utilityMenu.color.link.hover": "a28d88530a052b75025ad58244a622f52538ffdb" } }, { @@ -2946,7 +2967,8 @@ "name": "Emulsify Global", "$figmaStyleReferences": {}, "selectedTokenSets": { - "global": "enabled" + "global": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17089", "$figmaModeId": "23237:11", @@ -2998,7 +3020,8 @@ "name": "Emulsify Semantic", "$figmaStyleReferences": {}, "selectedTokenSets": { - "semantic": "enabled" + "semantic": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17133", "$figmaModeId": "23237:12", @@ -3020,7 +3043,8 @@ "name": "Emulsify Storybook only", "$figmaStyleReferences": {}, "selectedTokenSets": { - "storybook": "source" + "storybook": "source", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17144", "$figmaModeId": "23237:13", @@ -3048,7 +3072,8 @@ "components/status": "enabled", "components/table": "enabled", "components/tabs": "enabled", - "components/textField": "enabled" + "components/textField": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17145", "$figmaModeId": "23237:14", @@ -3094,15 +3119,6 @@ "pager.text.hover": "067e5560a9bcaee73e961d449ec580cabede8a17", "pager.text.focus": "039853336af697ea5a3d09db6b64f78e7c45c35d", "pager.fill.hover": "64071b977256beb9e45651dbbe696ac3dfb389d3", - "mainMenu.color.bg": "a51943758f0fa8a2af6ca92227fd91c67560e4b8", - "mainMenu.color.link.bg": "87170e49f0fdf73cfd66128db96c4441e700f071", - "mainMenu.color.link.bg-hover": "d2185c2db3e4a1b77be017df0fb5f3376c756f50", - "mainMenu.color.link.label": "4c190c6dffed1c15773123f079e53c195ae53054", - "mainMenu.color.link.label-hover": "7083b097eec3b0e13eb3c41105a6042afe4c575d", - "mainMenu.color.dropdown.bg": "f2bdc10d3b611073f278ef6b93be2d1d62720592", - "mainMenu.color.dropdown.bg-hover": "e7d24ba7865567a9e30d745dbcd34d8c4a196ddb", - "mainMenu.color.dropdown.label": "112a53e4cb87a782a992a38da3249f82d639e0d1", - "mainMenu.color.dropdown.label-hover": "3f9cb0ba9099ae87f86474c5c827f4e03f60da91", "link.default": "3faaab82a9c834600aaa7ad75621d14583bd9974", "link.hover": "e44dbb7433cdb45720e896b1126e28c9bff490e4", "input.color.label": "1b07b68bbc2c3339a39e57980e5b0dd66e848174", @@ -3174,7 +3190,16 @@ "blockQuote.padding.y": "398508657cd7d1bbd686f838a27db3f0c3ee3f74", "checkbox.spacing.gap": "e4d2049d0ee84eceee61f25e3264c2526cfe746a", "checkbox.color.label": "d2a0283754f673d1b92c74eef12f3bbe06845d3b", - "checkbox.color.label-disabled": "5cd5bb5326d33a62412e7579c0abd8c0bea97838" + "checkbox.color.label-disabled": "5cd5bb5326d33a62412e7579c0abd8c0bea97838", + "utilityMenu.color.bg": "a51943758f0fa8a2af6ca92227fd91c67560e4b8", + "utilityMenu.color.link.bg": "87170e49f0fdf73cfd66128db96c4441e700f071", + "utilityMenu.color.link.label-hover": "7083b097eec3b0e13eb3c41105a6042afe4c575d", + "utilityMenu.color.dropdown.bg": "f2bdc10d3b611073f278ef6b93be2d1d62720592", + "utilityMenu.color.dropdown.bg-hover": "e7d24ba7865567a9e30d745dbcd34d8c4a196ddb", + "utilityMenu.color.dropdown.label": "112a53e4cb87a782a992a38da3249f82d639e0d1", + "utilityMenu.color.dropdown.label-hover": "3f9cb0ba9099ae87f86474c5c827f4e03f60da91", + "utilityMenu.color.link.default": "d2185c2db3e4a1b77be017df0fb5f3376c756f50", + "utilityMenu.color.link.hover": "4c190c6dffed1c15773123f079e53c195ae53054" } }, { @@ -3201,7 +3226,8 @@ "components/table": "enabled", "components/tabs": "enabled", "components/textField": "enabled", - "semantic": "enabled" + "semantic": "enabled", + "components/utilityMenu": "disabled" }, "group": "WUP" }, @@ -3228,7 +3254,8 @@ "components/status": "enabled", "components/table": "enabled", "components/tabs": "enabled", - "components/textField": "enabled" + "components/textField": "enabled", + "components/utilityMenu": "disabled" }, "group": "WUP" } @@ -3252,6 +3279,7 @@ "components/input", "components/link", "components/mainMenu", + "components/utilityMenu", "components/pager", "components/radioButton", "components/selectdropdown", From f772281545a3a1af193d0bd72507f93c5e470060 Mon Sep 17 00:00:00 2001 From: mariannuar Date: Thu, 5 Sep 2024 22:34:32 +0000 Subject: [PATCH 02/44] feat: create tokens --- src/components/tokens/_tokens.scss | 22 +++--- src/tokens/transformed.tokens.json | 121 ++++++++++++++++++----------- 2 files changed, 90 insertions(+), 53 deletions(-) diff --git a/src/components/tokens/_tokens.scss b/src/components/tokens/_tokens.scss index 9aef387..6d43991 100644 --- a/src/components/tokens/_tokens.scss +++ b/src/components/tokens/_tokens.scss @@ -1,6 +1,6 @@ /** * Do not edit directly - * Generated on Thu, 22 Aug 2024 18:22:46 GMT + * Generated on Thu, 05 Sep 2024 22:34:29 GMT */ :root { @@ -66,6 +66,9 @@ --pager-padding-y: 0.5rem; --pager-padding-y-hover: 0.5rem; --pager-padding-y-focus: 0.5rem; + --utility-menu-color-bg: #ffffff; + --utility-menu-color-link-default: #006089; + --utility-menu-color-link-hover: #0080b7; --main-menu-color-bg: #ffffff; --main-menu-color-link-bg: #ffffff; --main-menu-color-link-bg-hover: #9ce1ff; @@ -399,14 +402,15 @@ --token-set-order-14: components/input; --token-set-order-15: components/link; --token-set-order-16: components/mainMenu; - --token-set-order-17: components/pager; - --token-set-order-18: components/radioButton; - --token-set-order-19: components/selectdropdown; - --token-set-order-20: components/status; - --token-set-order-21: components/table; - --token-set-order-22: components/tabs; - --token-set-order-23: components/textField; - --token-set-order-24: storybook; + --token-set-order-17: components/utilityMenu; + --token-set-order-18: components/pager; + --token-set-order-19: components/radioButton; + --token-set-order-20: components/selectdropdown; + --token-set-order-21: components/status; + --token-set-order-22: components/table; + --token-set-order-23: components/tabs; + --token-set-order-24: components/textField; + --token-set-order-25: storybook; --emulsify-ui-kit-full: [object Object]; --emulsify-global: [object Object]; --emulsify-semantic: [object Object]; diff --git a/src/tokens/transformed.tokens.json b/src/tokens/transformed.tokens.json index 228b773..b46e49d 100644 --- a/src/tokens/transformed.tokens.json +++ b/src/tokens/transformed.tokens.json @@ -323,6 +323,24 @@ } } }, + "utilityMenu": { + "color": { + "bg": { + "value": "#ffffff", + "type": "color" + }, + "link": { + "default": { + "value": "#006089", + "type": "color" + }, + "hover": { + "value": "#0080b7", + "type": "color" + } + } + } + }, "mainMenu": { "color": { "bg": { @@ -2496,34 +2514,38 @@ "type": "other" }, "17": { - "value": "components/pager", + "value": "components/utilityMenu", "type": "other" }, "18": { - "value": "components/radioButton", + "value": "components/pager", "type": "other" }, "19": { - "value": "components/selectdropdown", + "value": "components/radioButton", "type": "other" }, "20": { - "value": "components/status", + "value": "components/selectdropdown", "type": "other" }, "21": { - "value": "components/table", + "value": "components/status", "type": "other" }, "22": { - "value": "components/tabs", + "value": "components/table", "type": "other" }, "23": { - "value": "components/textField", + "value": "components/tabs", "type": "other" }, "24": { + "value": "components/textField", + "type": "other" + }, + "25": { "value": "storybook", "type": "other" } @@ -2630,15 +2652,6 @@ "pager.text.hover": "S:d5268cc95f0ca68a28f35d87395f9ce37893fe23,", "pager.text.focus": "S:d03b986e8d65e0c71a1837ec7325ffbce6d6aaa7,", "pager.fill.hover": "S:5bdc99f7ec11756cdef48ec3e13c9b4dd6f4ea81,", - "mainMenu.color.bg": "S:bf2522b49aa417ce534b5208e0f6beef55486cf3,", - "mainMenu.color.link.bg": "S:b11ab65866a7661d8fc26a7a62b099ef30061f50,", - "mainMenu.color.link.bg-hover": "S:af6ac50c749eaa990fbd9ffed40c1b9674a723a4,", - "mainMenu.color.link.label": "S:743bcf21f9c07a7963a7edb4225d95bca9b41703,", - "mainMenu.color.link.label-hover": "S:93bfd2e3b7bbd01dc37c4f80afe8e75e9924fdaf,", - "mainMenu.color.dropdown.bg": "S:79daec1641db62001cff89e93435729c39710614,", - "mainMenu.color.dropdown.bg-hover": "S:badcf257ef0a5a278b895483c36799c19afa98a4,", - "mainMenu.color.dropdown.label": "S:77771443996903bcb2c28595214f9e3a0c71d7e9,", - "mainMenu.color.dropdown.label-hover": "S:c3a0a9d457ae44f6f0e45c6a5c57e3bd57467383,", "link.default": "S:9fd4db376033a945bbc2bf5bfe8a698e68bd6f1a,", "link.hover": "S:e6b1afc9022d41b4217e773a9ab4abf90329cf46,", "color.fieldset.bg": "S:bfe975e6026fa7f0aa7fd11985d9ebaeb6565d17,", @@ -2741,7 +2754,16 @@ "color.grays.900": "S:d14dafeba041e023bd5c5d2c458c10f88801e824,", "color.grays.1000": "S:588f6731fa9753788b0b48bb7c575f3b94991a69,", "checkbox.color.label": "S:dd27f922df752738d999c185f11b67e77134feac,", - "checkbox.color.label-disabled": "S:72b6ef5a238e1bf6f232f7f0dc8f27095a075e3f," + "checkbox.color.label-disabled": "S:72b6ef5a238e1bf6f232f7f0dc8f27095a075e3f,", + "utilityMenu.color.bg": "S:bf2522b49aa417ce534b5208e0f6beef55486cf3,", + "utilityMenu.color.link.bg": "S:b11ab65866a7661d8fc26a7a62b099ef30061f50,", + "utilityMenu.color.link.label-hover": "S:93bfd2e3b7bbd01dc37c4f80afe8e75e9924fdaf,", + "utilityMenu.color.dropdown.bg": "S:79daec1641db62001cff89e93435729c39710614,", + "utilityMenu.color.dropdown.bg-hover": "S:badcf257ef0a5a278b895483c36799c19afa98a4,", + "utilityMenu.color.dropdown.label": "S:77771443996903bcb2c28595214f9e3a0c71d7e9,", + "utilityMenu.color.dropdown.label-hover": "S:c3a0a9d457ae44f6f0e45c6a5c57e3bd57467383,", + "utilityMenu.color.link.default": "S:af6ac50c749eaa990fbd9ffed40c1b9674a723a4,", + "utilityMenu.color.link.hover": "S:743bcf21f9c07a7963a7edb4225d95bca9b41703," }, "selectedTokenSets": { "global": "enabled", @@ -2764,7 +2786,12 @@ "components/table": "enabled", "components/tabs": "enabled", "components/textField": "enabled", - "semantic": "enabled" + "semantic": "enabled", + "components/announcement": "enabled", + "components/banner": "enabled", + "components/footer": "enabled", + "components/header": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:16908", "$figmaModeId": "23237:10", @@ -2814,15 +2841,6 @@ "pager.text.hover": "2e1149296e028f68d0590547182eb3fa046b0799", "pager.text.focus": "f597287eb8465595918f5af8c56a3f803417cf81", "pager.fill.hover": "e7c4c208bc4d7ed93b94794070642830984f1687", - "mainMenu.color.bg": "9b1706999c4ef658c6b885428bf9f6a3058eba23", - "mainMenu.color.link.bg": "9fe948d4cb455eec777d28db8baa8046d75174c2", - "mainMenu.color.link.bg-hover": "29ea5911b9675ae3920cf9f26602f612fe9e33d5", - "mainMenu.color.link.label": "a28d88530a052b75025ad58244a622f52538ffdb", - "mainMenu.color.link.label-hover": "cd95962e180170545de51bf2995158682ea61805", - "mainMenu.color.dropdown.bg": "4fcd08018cb0ac6de9ae851dfdb35da945fc9128", - "mainMenu.color.dropdown.bg-hover": "25fdd7d0cc2e181e8290710f0f489248ad541477", - "mainMenu.color.dropdown.label": "1ab6130383e91011e698dd88b0fc4fce93f24d83", - "mainMenu.color.dropdown.label-hover": "2b680d5fc3c7c9c9b5e245400274c58f66cc6268", "link.default": "52f2a6ae3ef87bb2b4c96e2b8316e609a1f3e4e0", "link.hover": "602f312f7c40299996ccaf31cd8340e88ddcd6a8", "input.color.label": "40806b82869b549ff22858fd677df5c1c6d22cad", @@ -2944,7 +2962,16 @@ "checkbox.spacing.gap": "59fbad63c0994ee956f8790e994534f9f5f5e922", "checkbox.color.label": "4db65c0b61319b6c85cdb9c1b683d84e2f65ff52", "checkbox.color.label-disabled": "3a5dec39f06f92904d80c2096f9c439ae0b5d09a", - "color.link-hover": "74d0f74b830a9dd07279967cea7c9f662178e310" + "color.link-hover": "74d0f74b830a9dd07279967cea7c9f662178e310", + "utilityMenu.color.bg": "9b1706999c4ef658c6b885428bf9f6a3058eba23", + "utilityMenu.color.link.bg": "9fe948d4cb455eec777d28db8baa8046d75174c2", + "utilityMenu.color.link.label-hover": "cd95962e180170545de51bf2995158682ea61805", + "utilityMenu.color.dropdown.bg": "4fcd08018cb0ac6de9ae851dfdb35da945fc9128", + "utilityMenu.color.dropdown.bg-hover": "25fdd7d0cc2e181e8290710f0f489248ad541477", + "utilityMenu.color.dropdown.label": "1ab6130383e91011e698dd88b0fc4fce93f24d83", + "utilityMenu.color.dropdown.label-hover": "2b680d5fc3c7c9c9b5e245400274c58f66cc6268", + "utilityMenu.color.link.default": "29ea5911b9675ae3920cf9f26602f612fe9e33d5", + "utilityMenu.color.link.hover": "a28d88530a052b75025ad58244a622f52538ffdb" }, "type": "other", "value": "[object Object]" @@ -2953,7 +2980,8 @@ "id": "0a5c4562bd35f00ce8a339239980a3842147c0bd", "$figmaStyleReferences": {}, "selectedTokenSets": { - "global": "enabled" + "global": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17089", "$figmaModeId": "23237:11", @@ -3006,7 +3034,8 @@ "id": "ca91148967a5dcc80f7e50f6ccfe35b30efd5f2f", "$figmaStyleReferences": {}, "selectedTokenSets": { - "semantic": "enabled" + "semantic": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17133", "$figmaModeId": "23237:12", @@ -3029,7 +3058,8 @@ "id": "16a10d373d39988a75c7d612cd449a633f373c44", "$figmaStyleReferences": {}, "selectedTokenSets": { - "storybook": "source" + "storybook": "source", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17144", "$figmaModeId": "23237:13", @@ -3058,7 +3088,8 @@ "components/status": "enabled", "components/table": "enabled", "components/tabs": "enabled", - "components/textField": "enabled" + "components/textField": "enabled", + "components/utilityMenu": "disabled" }, "$figmaCollectionId": "VariableCollectionId:23237:17145", "$figmaModeId": "23237:14", @@ -3104,15 +3135,6 @@ "pager.text.hover": "067e5560a9bcaee73e961d449ec580cabede8a17", "pager.text.focus": "039853336af697ea5a3d09db6b64f78e7c45c35d", "pager.fill.hover": "64071b977256beb9e45651dbbe696ac3dfb389d3", - "mainMenu.color.bg": "a51943758f0fa8a2af6ca92227fd91c67560e4b8", - "mainMenu.color.link.bg": "87170e49f0fdf73cfd66128db96c4441e700f071", - "mainMenu.color.link.bg-hover": "d2185c2db3e4a1b77be017df0fb5f3376c756f50", - "mainMenu.color.link.label": "4c190c6dffed1c15773123f079e53c195ae53054", - "mainMenu.color.link.label-hover": "7083b097eec3b0e13eb3c41105a6042afe4c575d", - "mainMenu.color.dropdown.bg": "f2bdc10d3b611073f278ef6b93be2d1d62720592", - "mainMenu.color.dropdown.bg-hover": "e7d24ba7865567a9e30d745dbcd34d8c4a196ddb", - "mainMenu.color.dropdown.label": "112a53e4cb87a782a992a38da3249f82d639e0d1", - "mainMenu.color.dropdown.label-hover": "3f9cb0ba9099ae87f86474c5c827f4e03f60da91", "link.default": "3faaab82a9c834600aaa7ad75621d14583bd9974", "link.hover": "e44dbb7433cdb45720e896b1126e28c9bff490e4", "input.color.label": "1b07b68bbc2c3339a39e57980e5b0dd66e848174", @@ -3184,7 +3206,16 @@ "blockQuote.padding.y": "398508657cd7d1bbd686f838a27db3f0c3ee3f74", "checkbox.spacing.gap": "e4d2049d0ee84eceee61f25e3264c2526cfe746a", "checkbox.color.label": "d2a0283754f673d1b92c74eef12f3bbe06845d3b", - "checkbox.color.label-disabled": "5cd5bb5326d33a62412e7579c0abd8c0bea97838" + "checkbox.color.label-disabled": "5cd5bb5326d33a62412e7579c0abd8c0bea97838", + "utilityMenu.color.bg": "a51943758f0fa8a2af6ca92227fd91c67560e4b8", + "utilityMenu.color.link.bg": "87170e49f0fdf73cfd66128db96c4441e700f071", + "utilityMenu.color.link.label-hover": "7083b097eec3b0e13eb3c41105a6042afe4c575d", + "utilityMenu.color.dropdown.bg": "f2bdc10d3b611073f278ef6b93be2d1d62720592", + "utilityMenu.color.dropdown.bg-hover": "e7d24ba7865567a9e30d745dbcd34d8c4a196ddb", + "utilityMenu.color.dropdown.label": "112a53e4cb87a782a992a38da3249f82d639e0d1", + "utilityMenu.color.dropdown.label-hover": "3f9cb0ba9099ae87f86474c5c827f4e03f60da91", + "utilityMenu.color.link.default": "d2185c2db3e4a1b77be017df0fb5f3376c756f50", + "utilityMenu.color.link.hover": "4c190c6dffed1c15773123f079e53c195ae53054" }, "type": "other", "value": "[object Object]" @@ -3212,7 +3243,8 @@ "components/table": "enabled", "components/tabs": "enabled", "components/textField": "enabled", - "semantic": "enabled" + "semantic": "enabled", + "components/utilityMenu": "disabled" }, "group": "WUP", "type": "other", @@ -3240,7 +3272,8 @@ "components/status": "enabled", "components/table": "enabled", "components/tabs": "enabled", - "components/textField": "enabled" + "components/textField": "enabled", + "components/utilityMenu": "disabled" }, "group": "WUP", "type": "other", From 0c1283fd4964299622ac7953043cfbacf2615088 Mon Sep 17 00:00:00 2001 From: Callin Mullaney <57088-callinmullaney@users.noreply.drupalcode.org> Date: Mon, 16 Sep 2024 12:37:08 -0500 Subject: [PATCH 03/44] feat: add social navigation --- .../breadcrumbs/breadcrumbs.component.yml | 2 +- .../navigation/breadcrumbs/breadcrumbs.scss | 40 +++++++----- .../navigation/breadcrumbs/breadcrumbs.twig | 4 ++ .../navigation/main/main.component.yml | 2 +- .../navigation/social/_social-item.twig | 63 +++++++++++++++++++ .../navigation/social/_social-list.twig | 20 ++++++ .../navigation/social/social.component.yml | 27 ++++++++ src/components/navigation/social/social.scss | 35 +++++++++++ .../navigation/social/social.stories.js | 13 ++++ src/components/navigation/social/social.twig | 8 +++ 10 files changed, 198 insertions(+), 16 deletions(-) create mode 100644 src/components/navigation/social/_social-item.twig create mode 100644 src/components/navigation/social/_social-list.twig create mode 100644 src/components/navigation/social/social.component.yml create mode 100644 src/components/navigation/social/social.scss create mode 100644 src/components/navigation/social/social.stories.js create mode 100644 src/components/navigation/social/social.twig diff --git a/src/components/navigation/breadcrumbs/breadcrumbs.component.yml b/src/components/navigation/breadcrumbs/breadcrumbs.component.yml index 6c4e853..513311b 100644 --- a/src/components/navigation/breadcrumbs/breadcrumbs.component.yml +++ b/src/components/navigation/breadcrumbs/breadcrumbs.component.yml @@ -1,7 +1,7 @@ $schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json name: Breadcrumbs -group: Components/Menus +group: Components/Navigation status: stable props: type: object diff --git a/src/components/navigation/breadcrumbs/breadcrumbs.scss b/src/components/navigation/breadcrumbs/breadcrumbs.scss index 3cbbabe..a840f5f 100644 --- a/src/components/navigation/breadcrumbs/breadcrumbs.scss +++ b/src/components/navigation/breadcrumbs/breadcrumbs.scss @@ -35,7 +35,7 @@ flex-flow: row nowrap; position: relative; margin: 0; - padding: var(--spacing-md); + padding: 0; max-width: 100%; display: none; @@ -115,8 +115,7 @@ display: flex; align-items: center; justify-content: center; - height: space(3); - width: space(3); + border: 0; z-index: 1; opacity: 0; visibility: hidden; @@ -126,10 +125,10 @@ left: 0; background: linear-gradient( 90deg, - #{clr(background)} 75%, - #{clr(background, 0)} 100% + var(--button-color-bkg) 75%, + transparent 100% ); - border-radius: space(2) 0 0 space(2); + border-radius: var(--button-radius) 0 0 var(--button-radius); [data-scroll-indicator='left'] &, [data-scroll-indicator='both'] & { @@ -146,10 +145,10 @@ right: 0; background: linear-gradient( 90deg, - #{clr(background, 0)} 0%, - #{clr(background)} 25% + transparent 0%, + var(--button-color-bkg) 25% ); - border-radius: 0 space(2) space(2) 0; + border-radius: 0 var(--button-radius) var(--button-radius) 0; [data-scroll-indicator='right'] &, [data-scroll-indicator='both'] & { @@ -164,6 +163,12 @@ .scroll__icon { display: flex; + height: var(--size-xl); + width: var(--size-xl); + } + + .icon { + fill: var(--button-color-label); } } @@ -173,11 +178,18 @@ & { display: flex; white-space: nowrap; - background-color: clr(full-white); - border-radius: space(2); - margin-top: space(1.5); - margin-bottom: space(1.5) * -1; - padding: space(0.75) (space(1) + space(0.25)) space(0.75) space(2); + margin: 0; + } + + // Main breadcrumb toggle. + .breadcrumbs__wrapper > & { + padding-left: var(--size-xl); + font-size: var(--font-size-x-small); + font-weight: var(--font-weight-primary-regular); + } + + .icon { + fill: var(--button-color-label); } [data-breadcrumbs-overflow='expanded'] & { diff --git a/src/components/navigation/breadcrumbs/breadcrumbs.twig b/src/components/navigation/breadcrumbs/breadcrumbs.twig index 1537476..0217a00 100644 --- a/src/components/navigation/breadcrumbs/breadcrumbs.twig +++ b/src/components/navigation/breadcrumbs/breadcrumbs.twig @@ -18,6 +18,7 @@ button__content: true, button__base_class: 'scroll', button__blockname: breadcrumbs__base_class, + button__style: 'primary', button__modifiers: ['left'], button__attributes: { 'aria-hidden': 'true', @@ -40,6 +41,7 @@ button__content: true, button__base_class: 'scroll', button__blockname: breadcrumbs__base_class, + button__style: 'primary', button__type: 'filled', button__modifiers: ['right'], button__attributes: { @@ -91,6 +93,8 @@ button__content: true, button__base_class: 'toggle', button__blockname: breadcrumbs__base_class, + button__additional_classes: ['button'], + button__style: 'primary', button__attributes: { 'aria-hidden': 'true', 'tabindex': '-1', diff --git a/src/components/navigation/main/main.component.yml b/src/components/navigation/main/main.component.yml index 4290fff..1377614 100644 --- a/src/components/navigation/main/main.component.yml +++ b/src/components/navigation/main/main.component.yml @@ -1,7 +1,7 @@ $schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json name: Main Menu -group: Components/Menus +group: Components/Navigation status: stable props: type: object diff --git a/src/components/navigation/social/_social-item.twig b/src/components/navigation/social/_social-item.twig new file mode 100644 index 0000000..3ed1196 --- /dev/null +++ b/src/components/navigation/social/_social-item.twig @@ -0,0 +1,63 @@ +{% set item__modifiers = item__modifiers|default([]) %} +{% set item__modifiers = item__modifiers|default([]) %} +{% set item__attributes = item__attributes|default({}) %} + +{# Set link component as default #} +{% set list__item %} +{% if item.title %} + {% set link__content = item.title %} +{% endif %} + +{% if item.text %} + {% set link__content = item.text %} +{% endif %} + +{% if not item.url and not item.href %} + {% set link__attributes = link__attributes|merge({ + 'class': bem('placeholder', item__modifiers, menu__base_class), + }) %} + {{- link__content -}} +{% else %} + {# If drupal stringify the url object #} + {# See variable passed to menu_links macro #} + {% if directory %} + {% if item.url %} + {% set link__url = item.url|render %} + {% endif %} + {% if item.href %} + {% set link__url = item.href %} + {% endif %} + {% else %} + {% set link__url = item.url %} + {% endif %} + + {% if link__url is empty %} + {% set link__base_class = 'placeholder' %} + {% set link__url = '#' %} + {% else %} + {% set link__blockname = menu__base_class %} + {% endif %} + {% embed "@components/link/link.twig" with { + link__style: 'icon', + } %} + {% block link__content %} + {% include "@components/icons/_icon.twig" with { + icon__name: item.title|lower, + icon__blockname: menu__base_class, + } %} + {{ item.title }} + {% endblock %} + {% endembed %} +{% endif %} +{% endset %} + +{% embed "@components/lists/_list-item.twig" with { + list__item__base_class: 'item', + list__item__modifiers: item__modifiers, + list__item__blockname: item__blockname, + list__item__attributes: item__attributes, +} %} + {% block list__item__content %} + {{- list__item -}} + {% endblock %} +{% endembed %} diff --git a/src/components/navigation/social/_social-list.twig b/src/components/navigation/social/_social-list.twig new file mode 100644 index 0000000..ae543d1 --- /dev/null +++ b/src/components/navigation/social/_social-list.twig @@ -0,0 +1,20 @@ +{% set item__blockname = menu__base_class %} + +{% set menu__item %} +{% block menu__item__content %} + {% for item in items %} + {% include "@components/navigation/social/_social-item.twig" %} + {% endfor %} +{% endblock %} +{% endset %} + +{# List #} +{% embed "@components/lists/list.twig" with { + list__base_class: 'menu-list', + list__blockname: menu__base_class, + list__type: menu__list__type, +}%} + {% block list__content %} + {{ menu__item }} + {% endblock %} +{% endembed %} diff --git a/src/components/navigation/social/social.component.yml b/src/components/navigation/social/social.component.yml new file mode 100644 index 0000000..df17890 --- /dev/null +++ b/src/components/navigation/social/social.component.yml @@ -0,0 +1,27 @@ +$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json + +name: Social Menu +group: Components/Navigation +status: stable +props: + type: object + required: + - items + properties: + items: + type: array + title: Social menu items + description: The items of the social menu. + data: + - title: 'Twitter' + url: '#' + icon: 'twitter' + - title: 'Facebook' + url: '#' + icon: 'facebook' + - title: 'Instagram' + url: '#' + icon: 'instagram' + - title: 'LinkedIn' + url: '#' + icon: 'linkedin' diff --git a/src/components/navigation/social/social.scss b/src/components/navigation/social/social.scss new file mode 100644 index 0000000..7284a93 --- /dev/null +++ b/src/components/navigation/social/social.scss @@ -0,0 +1,35 @@ +@use '../../../foundation/utility/utility' as *; +@use '../../link/link.scss' as *; + +.social-nav__menu-list { + @include list-reset; + + & { + display: flex; + flex-flow: row nowrap; + gap: var(--spacing-md); + } +} + +.social-nav__link { + @include link; + + & { + display: flex; + flex-flow: row nowrap; + align-items: center; + gap: var(--spacing-sm); + text-decoration: none; + } + + &:focus, + &:hover { + text-decoration: underline; + } +} + +.social-nav__icon { + height: var(--size-xl); + width: var(--size-xl); + fill: currentColor; +} diff --git a/src/components/navigation/social/social.stories.js b/src/components/navigation/social/social.stories.js new file mode 100644 index 0000000..8f1c054 --- /dev/null +++ b/src/components/navigation/social/social.stories.js @@ -0,0 +1,13 @@ +// Markup. +import socialNavTwig from './social.twig'; +import socialNavDataProps from './social.component.yml'; + +// Data. +const socialNavData = socialNavDataProps.props.properties.items.data; + +/** + * Storybook Definition. + */ +export default { title: 'Components/Navigation/Social' }; + +export const social = () => socialNavTwig({ items: socialNavData }); diff --git a/src/components/navigation/social/social.twig b/src/components/navigation/social/social.twig new file mode 100644 index 0000000..bd3648e --- /dev/null +++ b/src/components/navigation/social/social.twig @@ -0,0 +1,8 @@ +{% embed "@components/navigation/base/menu.twig" with { + menu__name: 'Social Navigation', + menu__base_class: 'social-nav', +} %} + {% block menu_list__content %} + {% include "@components/navigation/social/_social-list.twig" %} + {% endblock %} +{% endembed %} From 637322bb226107c62384641aaf747dd2c6f98b8f Mon Sep 17 00:00:00 2001 From: Callin Mullaney <57088-callinmullaney@users.noreply.drupalcode.org> Date: Mon, 16 Sep 2024 12:47:47 -0500 Subject: [PATCH 04/44] feat: resort pager navigation --- src/components/docs/cover/cover.twig | 1 - .../docs/examples/assets/_footer.twig | 4 +- .../docs/examples/assets/_header.twig | 2 +- src/components/menus/_menu-item.twig | 44 --------- src/components/menus/_menu-list.twig | 15 --- src/components/menus/_menu.twig | 45 --------- .../breadcrumbs/breadcrumbs.component.yml | 20 ---- .../menus/breadcrumbs/breadcrumbs.scss | 39 -------- .../menus/breadcrumbs/breadcrumbs.twig | 27 ------ .../menus/inline/inline-menu.component.yml | 21 ----- src/components/menus/inline/inline-menu.scss | 21 ----- src/components/menus/inline/inline-menu.twig | 4 - .../menus/main-menu/_00-main-menu.scss | 91 ------------------- .../menus/main-menu/_01-main-menu-item.scss | 73 --------------- .../menus/main-menu/_02-main-menu-link.scss | 56 ------------ .../menus/main-menu/_03-main-menu-toggle.scss | 68 -------------- .../menus/main-menu/main-menu.component.yml | 53 ----------- src/components/menus/main-menu/main-menu.js | 27 ------ src/components/menus/main-menu/main-menu.scss | 4 - src/components/menus/main-menu/main-menu.twig | 23 ----- src/components/menus/menus.stories.js | 31 ------- .../menus/social-menu/_social-menu-item.twig | 8 -- .../menus/social-menu/_social-menu-link.twig | 13 --- .../social-menu/social-menu.component.yml | 27 ------ .../menus/social-menu/social-menu.scss | 35 ------- .../menus/social-menu/social-menu.twig | 13 --- .../pager/pager-both-ellipses.component.yml | 0 .../pager/pager-first-last.component.yml | 0 .../pager/pager-next-ellipses.component.yml | 0 .../pager/pager-prev-ellipses.component.yml | 0 .../pager/pager.component.yml | 0 .../{ => navigation}/pager/pager.scss | 4 +- .../{ => navigation}/pager/pager.stories.js | 4 +- .../{ => navigation}/pager/pager.twig | 0 34 files changed, 7 insertions(+), 766 deletions(-) delete mode 100644 src/components/menus/_menu-item.twig delete mode 100644 src/components/menus/_menu-list.twig delete mode 100644 src/components/menus/_menu.twig delete mode 100644 src/components/menus/breadcrumbs/breadcrumbs.component.yml delete mode 100644 src/components/menus/breadcrumbs/breadcrumbs.scss delete mode 100644 src/components/menus/breadcrumbs/breadcrumbs.twig delete mode 100644 src/components/menus/inline/inline-menu.component.yml delete mode 100644 src/components/menus/inline/inline-menu.scss delete mode 100644 src/components/menus/inline/inline-menu.twig delete mode 100644 src/components/menus/main-menu/_00-main-menu.scss delete mode 100644 src/components/menus/main-menu/_01-main-menu-item.scss delete mode 100644 src/components/menus/main-menu/_02-main-menu-link.scss delete mode 100644 src/components/menus/main-menu/_03-main-menu-toggle.scss delete mode 100644 src/components/menus/main-menu/main-menu.component.yml delete mode 100644 src/components/menus/main-menu/main-menu.js delete mode 100644 src/components/menus/main-menu/main-menu.scss delete mode 100644 src/components/menus/main-menu/main-menu.twig delete mode 100644 src/components/menus/menus.stories.js delete mode 100644 src/components/menus/social-menu/_social-menu-item.twig delete mode 100644 src/components/menus/social-menu/_social-menu-link.twig delete mode 100644 src/components/menus/social-menu/social-menu.component.yml delete mode 100644 src/components/menus/social-menu/social-menu.scss delete mode 100644 src/components/menus/social-menu/social-menu.twig rename src/components/{ => navigation}/pager/pager-both-ellipses.component.yml (100%) rename src/components/{ => navigation}/pager/pager-first-last.component.yml (100%) rename src/components/{ => navigation}/pager/pager-next-ellipses.component.yml (100%) rename src/components/{ => navigation}/pager/pager-prev-ellipses.component.yml (100%) rename src/components/{ => navigation}/pager/pager.component.yml (100%) rename src/components/{ => navigation}/pager/pager.scss (87%) rename src/components/{ => navigation}/pager/pager.stories.js (90%) rename src/components/{ => navigation}/pager/pager.twig (100%) diff --git a/src/components/docs/cover/cover.twig b/src/components/docs/cover/cover.twig index 1274348..74f07cb 100644 --- a/src/components/docs/cover/cover.twig +++ b/src/components/docs/cover/cover.twig @@ -1,7 +1,6 @@

- BETA Emulsify UI Kit

diff --git a/src/components/docs/examples/assets/_footer.twig b/src/components/docs/examples/assets/_footer.twig index 97850d6..8b780a4 100644 --- a/src/components/docs/examples/assets/_footer.twig +++ b/src/components/docs/examples/assets/_footer.twig @@ -1,12 +1,12 @@