Skip to content

Commit

Permalink
Adding code-block, placeholder line and cleanup some plugins from ana…
Browse files Browse the repository at this point in the history
…lytics
  • Loading branch information
apuntovanini committed Nov 5, 2024
1 parent f815c14 commit 12f8ac5
Show file tree
Hide file tree
Showing 193 changed files with 3,811 additions and 3,403 deletions.
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
"@uidu/field-base": "4.11.8",
"@uidu/field-time": "2.8.8",
"@uidu/form": "3.3.2",
"@uidu/popup": "workspace:^",
"@uidu/profilecard": "^0.12.0",
"@uifabric/file-type-icons": "^7.10.11",
"@uppy/aws-s3": "^3.6.2",
Expand Down Expand Up @@ -317,19 +318,19 @@
"process": "^0.11.10",
"prop-types": "^15.8.1",
"prosemirror-collab": "^1.3.1",
"prosemirror-commands": "^1.5.2",
"prosemirror-dev-tools": "^4.0.0",
"prosemirror-history": "^1.3.2",
"prosemirror-inputrules": "^1.3.0",
"prosemirror-commands": "^1.6.2",
"prosemirror-dev-tools": "^4.1.0",
"prosemirror-history": "^1.4.1",
"prosemirror-inputrules": "^1.4.0",
"prosemirror-keymap": "^1.2.2",
"prosemirror-markdown": "^1.12.0",
"prosemirror-model": "^1.19.4",
"prosemirror-schema-list": "^1.3.0",
"prosemirror-markdown": "^1.13.1",
"prosemirror-model": "^1.23.0",
"prosemirror-schema-list": "^1.4.1",
"prosemirror-state": "^1.4.3",
"prosemirror-tables": "^1.3.5",
"prosemirror-transform": "^1.8.0",
"prosemirror-tables": "^1.6.1",
"prosemirror-transform": "^1.10.2",
"prosemirror-utils": "^0.9.6",
"prosemirror-view": "^1.32.7",
"prosemirror-view": "^1.35.0",
"query-string": "^7.1.3",
"raf-schd": "^4.0.3",
"raw-loader": "^4.0.2",
Expand Down Expand Up @@ -407,7 +408,7 @@
"svg-inline-react": "^3.2.1",
"svg-url-loader": "^8.0.0",
"swiper": "^9.4.1",
"tailwindcss": "3.4.10",
"tailwindcss": "3.4.14",
"terser-webpack-plugin": "^5.3.10",
"thread-loader": "^4.0.2",
"tiny-invariant": "^1.3.3",
Expand Down
17 changes: 1 addition & 16 deletions packages/core/drawer/examples/20-drawer-with-fixed-contents.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import Button from '@uidu/button';
import DropdownMenu, {
DropdownItem,
DropdownItemGroup,
} from '@uidu/dropdown-menu';
import React, { Component } from 'react';
import Drawer from '../src';

type State = {
isDrawerOpen: boolean,
isDrawerOpen: boolean;
};

export default class DrawersExample extends Component<{}, State> {
Expand Down Expand Up @@ -40,17 +36,6 @@ export default class DrawersExample extends Component<{}, State> {
elements such as @uidu/dropdown-menu.
</p>
{/* The position here is used by the withDropdown integration test. */}
<div style={{ position: 'fixed', left: 100, top: 200 }}>
<DropdownMenu
trigger={<div id="trigger">Choices</div>}
triggerType="button"
>
<DropdownItemGroup>
<DropdownItem>Sydney</DropdownItem>
<DropdownItem>Melbourne</DropdownItem>
</DropdownItemGroup>
</DropdownMenu>
</div>
</div>
</Drawer>
<Button type="button" onClick={this.openDrawer}>
Expand Down
1 change: 0 additions & 1 deletion packages/core/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"devDependencies": {
"@uidu/button": "^1.9.4",
"@uidu/dropdown-menu": "^0.12.4",
"@uidu/shell": "^2.10.4",
"react": "^18.3.1",
"react-lorem-component": "^0.13.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/modal-dialog/src/modal-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function ModalWrapper(props: ModalDialogProps) {
);

return (
<Portal zIndex={510}>
<Portal zIndex={710}>
<FadeIn>
{(fadeInProps) => (
<div
Expand Down
24 changes: 15 additions & 9 deletions packages/core/popup/examples/13-setting-focus.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/** @jsxImportSource @emotion/react */
import Button from '@uidu/button';
import Form, { useForm } from '@uidu/form';
import { RadioGroup } from '@uidu/radio';
import React, { FC, useState } from 'react';
import Popup from '../src';

const radioValues = [
{ name: 'None', value: '-1', label: 'None' },
{ name: 'Button 0', value: '0', label: 'Button 0' },
{ name: 'Button 1', value: '1', label: 'Button 1' },
{ name: 'Button 2', value: '2', label: 'Button 2' },
{ name: 'None', id: '-1', label: 'None' },
{ name: 'Button 0', id: '0', label: 'Button 0' },
{ name: 'Button 1', id: '1', label: 'Button 1' },
{ name: 'Button 2', id: '2', label: 'Button 2' },
];

const spacerCSS = {
Expand Down Expand Up @@ -54,16 +55,21 @@ export default () => {
const [isOpen, setIsOpen] = useState(false);
const [buttonToFocus, setButtonToFocus] = useState('-1');

const form = useForm({});

return (
<div css={spacerCSS}>
<p>
<strong>Choose a button to focus initially:</strong>
</p>
<RadioGroup
onChange={({ currentTarget: { value } }) => setButtonToFocus(value)}
defaultValue={radioValues[0].value}
options={radioValues}
/>
<Form form={form}>
<RadioGroup
name="buttonToFocus"
onChange={(name, value) => setButtonToFocus(value)}
defaultValue={radioValues[0].value}
options={radioValues}
/>
</Form>
<Popup
isOpen={isOpen}
onClose={() => setIsOpen(false)}
Expand Down
36 changes: 20 additions & 16 deletions packages/core/popup/examples/15-popup-with-select.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @jsxImportSource @emotion/react */
import MediaServicesAddCommentIcon from '@atlaskit/icon/glyph/media-services/add-comment';
import Button from '@uidu/button';
import Form, { useForm } from '@uidu/form';
import Select from '@uidu/select';
import React, { Fragment, useState } from 'react';
import Popup from '../src';
Expand All @@ -23,22 +24,25 @@ export default () => {
minHeight: 250,
}}
>
<Select
defaultValue={{ label: 'Brisbane', value: 'brisbane' }}
options={[
{ label: 'Adelaide', value: 'adelaide', extra: 'extra' },
{ label: 'Brisbane', value: 'brisbane' },
{ label: 'Canberra', value: 'canberra' },
{ label: 'Darwin', value: 'darwin' },
{ label: 'Hobart', value: 'hobart' },
{ label: 'Melbourne', value: 'melbourne' },
{ label: 'Perth', value: 'perth' },
{ label: 'Sydney', value: 'sydney' },
]}
isMulti
isSearchable={false}
placeholder="Choose a City"
/>
<Form form={useForm({})}>
<Select
name="city"
defaultValue={{ label: 'Brisbane', value: 'brisbane' }}
options={[
{ label: 'Adelaide', value: 'adelaide', extra: 'extra' },
{ label: 'Brisbane', value: 'brisbane' },
{ label: 'Canberra', value: 'canberra' },
{ label: 'Darwin', value: 'darwin' },
{ label: 'Hobart', value: 'hobart' },
{ label: 'Melbourne', value: 'melbourne' },
{ label: 'Perth', value: 'perth' },
{ label: 'Sydney', value: 'sydney' },
]}
isMulti
isSearchable={false}
placeholder="Choose a City"
/>
</Form>
</div>
)}
trigger={(triggerProps) => (
Expand Down
68 changes: 68 additions & 0 deletions packages/core/popup/examples/16-popup-with-modal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { PlusIcon } from '@heroicons/react/24/solid';
import Button from '@uidu/button';
import { ButtonItem, MenuGroup } from '@uidu/menu';
import Modal, { ModalBody } from '@uidu/modal-dialog';
import { ShellBody, ShellMain } from '@uidu/shell';
import React, { useCallback, useState } from 'react';
import Popup, { ContentProps } from '../src';

function Content({ onClose }: ContentProps) {
const [isOpen, setIsOpen] = useState(false);
return (
<>
<MenuGroup>
<ButtonItem
onClick={() => {
// onClose();
setIsOpen((prev) => !prev);
// setTimeout(() => {
// onClose();
// }, 100);
}}
>
Item 1
</ButtonItem>
</MenuGroup>
{isOpen && (
<Modal autoFocus>
<ModalBody>
If i select text here I should not close the popup
</ModalBody>
</Modal>
)}
</>
);
}

export default function PopupWithModal() {
const [isOpen, setIsOpen] = useState(false);

const Trigger = useCallback(
(triggerProps) => (
<Button
{...triggerProps}
onClick={() => setIsOpen((prev) => !prev)}
value="Add"
iconBefore={<PlusIcon tw="h-5 w-5" />}
/>
),
[],
);

return (
<ShellMain>
<ShellBody>
<div>
<Popup
trigger={Trigger}
content={Content}
isOpen={isOpen}
onClose={() => setIsOpen(false)}
placement="bottom"
autoFocus={false}
/>
</div>
</ShellBody>
</ShellMain>
);
}
2 changes: 1 addition & 1 deletion packages/core/tailwind-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function withOpacity(variableName) {
}

module.exports = {
darkMode: 'media',
darkMode: 'class',
theme: {
fontFamily: {
sans: ['"Inter var"', ...defaultTheme.fontFamily.sans],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tailwind-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"postcss": "^8.4.44",
"tailwindcss": "3.4.10"
"tailwindcss": "3.4.14"
},
"peerDependencies": {
"postcss": "^8.2.6",
Expand Down
69 changes: 0 additions & 69 deletions packages/data/dashboard-controls/src/components/More/index.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions packages/data/dashboard-controls/src/components/More/types.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/data/dashboard-controls/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { default as Members } from './components/Members';
export { default as More } from './components/More';
export { default as Navigator } from './components/Navigator';
export { default as Shuffle } from './components/Shuffle';
export * from './types';
3 changes: 2 additions & 1 deletion packages/data/dashboard-manager/examples/Basic.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cubejs from '@cubejs-client/core';
import { CubeProvider } from '@cubejs-client/react';
import { More, Shuffle } from '@uidu/dashboard-controls';
import { Shuffle } from '@uidu/dashboard-controls';
import { More } from '@uidu/data-controls';
import {
ScrollableContainer,
ShellBody,
Expand Down
2 changes: 1 addition & 1 deletion packages/data/dashboard-manager/examples/Condensed.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { More, Shuffle } from '@uidu/dashboard-controls';
import { Shuffle } from '@uidu/dashboard-controls';
import {
ScrollableContainer,
ShellBody,
Expand Down
Loading

0 comments on commit 12f8ac5

Please sign in to comment.