Skip to content

Commit

Permalink
Merge branch 'master' of github.com:xola/ui-kit into X2-6577
Browse files Browse the repository at this point in the history
# By Manoj Vaibhav (3) and others
# Via Manoj Vaibhav
* 'master' of github.com:xola/ui-kit:
  2.1.17
  X2-6043: Quick Search Enhancements (xola#239)
  2.1.16
  Dumb Bell, Mobile icons + Fix missing attribute for Submit Button (xola#254)
  Fix drawer close button (xola#260)
  Fix warnings from Tailwind (xola#259)
  2.1.15

# Conflicts:
#	src/index.js
  • Loading branch information
rushi committed Sep 14, 2023
2 parents ac73681 + 3977b33 commit 7da5a96
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 36 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/theme.js
package-lock.json
node_modules
4 changes: 3 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
stories: ["../src/**/*.stories.@(js|jsx|mdx)"],

core: {
disableTelemetry: true,
},
addons: [
"@storybook/addon-postcss",
"@storybook/addon-links",
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xola/ui-kit",
"version": "2.1.14",
"version": "2.1.17",
"description": "Xola UI Kit",
"license": "MIT",
"files": [
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@headlessui/react": "^1.4.0",
"@tailwindcss/forms": "^0.4.0",
"@tailwindcss/forms": "^0.5.6",
"@tailwindcss/line-clamp": "^0.3.1",
"@tippyjs/react": "^4.2.6",
"clsx": "^1.1.1",
Expand Down
1 change: 1 addition & 0 deletions src/components/Buttons/ButtonGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const Button = ({
as: Tag = "button",
isActive,
shouldShowText = true,
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
isHidden = false,
size = "medium",
icon,
Expand Down
8 changes: 4 additions & 4 deletions src/components/Modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import React, { Fragment } from "react";
import { CloseIcon } from "../icons/CloseIcon";

const sizes = {
small: "max-w-100",
medium: "max-w-125",
large: "max-w-150",
huge: "max-w-200",
small: "max-w-100", // 400px
medium: "max-w-125", // 500px
large: "max-w-150", // 600px
huge: "max-w-200", // 800px
};

const positions = {
Expand Down
30 changes: 11 additions & 19 deletions src/components/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const Search = ({
id: menuId,
className: clsx(
"ui-search-menu",
"absolute top-10 divide-y divide-gray-light w-full xl:w-2/3 max-h-[75vh] border border-blue-light mt-1 rounded overflow-auto z-10 bg-white",
"absolute top-10 divide-y divide-gray-light w-full xl:w-[590px] max-h-[75vh] border border-secondary-lighter shadow-xl mt-1 rounded overflow-auto z-10 bg-white",
{ hidden: !open },
),
})}
Expand All @@ -184,28 +184,20 @@ export const Search = ({
? itemList.map((item, index) => (
<li key={item} {...getItemProps({ key: index, item, index, className: "ui-search-item" })}>
{item === submitValueItem ? (
<>
isLoading ? (
<div className="p-3 text-center">
<Spinner size="small" />
</div>
) : inputValue.length < minChars ? (
<div
className={clsx(
"cursor-pointer p-2",
highlightedIndex === index ? "bg-blue-light text-white" : "",
)}
>
{inputValue.length >= minChars ? (
<>
Show all results for <strong>{inputValue}</strong>
</>
) : (
`Enter at least ${minChars} characters to begin search`
)}
{`Enter at least ${minChars} characters to begin search`}
</div>

{isLoading ? (
<div className="p-3 text-center">
<Spinner size="small" />
</div>
) : null}
</>
) : null
) : (
children?.(item, highlightedIndex === index)
)}
Expand All @@ -219,15 +211,15 @@ export const Search = ({
<li className="search-footer pointer-events sticky bottom-0 flex space-x-5 p-2 text-sm text-gray-dark">
<span className="flex items-center">
<Key char="up" className="mr-0.5" />
<Key char="down" className="mr-2" /> to navigate
<Key char="down" className="mr-2" /> navigate results
</span>

<span className="flex items-center">
<Key char="enter" className="mr-2" /> to submit
<Key char="enter" className="mr-2" /> submit
</span>

<span className="flex items-center">
<Key char="esc" className="mr-2" /> to close
<Key char="esc" className="mr-2" /> close search
</span>
</li>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion src/icons/ClockManualIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const ClockManualIcon = createIcon((props) => {
);
});

ClockManualIcon.tags = ["clock", "manual", "watch"];
ClockManualIcon.tags = ["clock", "manual", "watch", "fly", "on the fly"];
39 changes: 39 additions & 0 deletions src/icons/DumbbellIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { createIcon } from "../helpers/icon";

export const DumbbellIcon = createIcon((props) => {
return (
<svg viewBox="0 0 14 14" width={14} height={14} fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.8"
d="M9.745 2.203a.687.687 0 000 .972l2.004 2.003a.687.687 0 10.972-.972l-2.004-2.003a.688.688 0 00-.972 0z"
/>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.8"
d="M7.801 2.202a.687.687 0 000 .973l3.949 3.948a.687.687 0 10.972-.974L8.775 2.202a.688.688 0 00-.974 0zM2.812 9.137a.688.688 0 01.972 0l2.004 2.003a.688.688 0 01-.973.972L2.812 10.11a.687.687 0 010-.972z"
/>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.8"
d="M2.812 7.192a.688.688 0 01.972 0l3.948 3.948a.688.688 0 11-.973.973L2.812 8.166a.688.688 0 010-.974z"
/>
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.8"
d="M9.289 4.663L5.27 8.68l.973.972 4.017-4.017-.972-.972z"
/>
</svg>
);
});

DumbbellIcon.tags = ["weight", "exercise", "gym"];
26 changes: 26 additions & 0 deletions src/icons/MobileIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import { createIcon } from "../helpers/icon";

export const MobileIcon = createIcon((props) => {
return (
<svg width={18} height={18} viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<g
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.3"
clipPath="url(#clip0_9896_373783)"
>
<path d="M13.5 14.25a1.5 1.5 0 01-1.5 1.5H6a1.5 1.5 0 01-1.5-1.5V3.75A1.5 1.5 0 016 2.25h6a1.5 1.5 0 011.5 1.5v10.5z" />
<path d="M10.877 2.25v1.5a.375.375 0 01-.375.375h-3a.375.375 0 01-.375-.375v-1.5" />
</g>
<defs>
<clipPath id="clip0_9896_373783">
<path fill="#fff" d="M0 0H18V18H0z" />
</clipPath>
</defs>
</svg>
);
});

MobileIcon.tags = ["mobile", "phone", "iphone", "android", "ios"];
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export { DoubleCheckIcon } from "./icons/DoubleCheckIcon";
export { DownArrowIcon } from "./icons/DownArrowIcon";
export { DownloadIcon } from "./icons/DownloadIcon";
export { DropdownIcon } from "./icons/DropdownIcon";
export { DumbbellIcon } from "./icons/DumbbellIcon";
export { DuplicateIcon } from "./icons/DuplicateIcon";
export { DurationIcon } from "./icons/DurationIcon";
export { EditIcon } from "./icons/EditIcon";
Expand Down Expand Up @@ -190,10 +191,12 @@ export { MegaphoneIcon } from "./icons/MegaphoneIcon";
export { MenuIcon } from "./icons/MenuIcon";
export { MinusIcon } from "./icons/MinusIcon";
export { MixedChecklistIcon } from "./icons/MixedChecklistIcon";
export { MobileIcon } from "./icons/MobileIcon";
export { MoneyAddIcon } from "./icons/MoneyAddIcon";
export { MoneyBackIcon } from "./icons/MoneyBackIcon";
export { MoneyIcon } from "./icons/MoneyIcon";
export { MountainIcon } from "./icons/MountainIcon";
export { MountainIcon } from "./icons/MountainIcon";
export { MouseIcon } from "./icons/MouseIcon";
export { PassIcon } from "./icons/PassIcon";
export { PenIcon } from "./icons/PenIcon";
Expand Down

0 comments on commit 7da5a96

Please sign in to comment.