@hyphen/hyphen-components 2.23.0 → 2.24.0
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/components/DropdownMenu/DropdownMenu.d.ts +25 -0
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +9 -0
- package/dist/css/utilities.css +62 -1
- package/dist/css/variables.css +15 -2
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/lib/tokens.d.ts +1 -1
- package/package.json +3 -2
- package/src/components/Collapsible/Collapsible.mdx +1 -1
- package/src/components/Collapsible/Collapsible.tsx +0 -2
- package/src/components/DropdownMenu/DropdownMenu.mdx +21 -0
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +150 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +164 -0
- package/src/styles/utilities.scss +4 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
+
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
+
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean | undefined;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
14
|
+
inset?: boolean | undefined;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuShortcut: {
|
|
18
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
|
+
inset?: boolean | undefined;
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuRadioGroup, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { DropdownMenu } from './DropdownMenu';
|
|
4
|
+
declare const meta: Meta<typeof DropdownMenu>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof DropdownMenu>;
|
|
7
|
+
export declare const Uncontrolled: () => React.JSX.Element;
|
|
8
|
+
export declare const Controlled: () => React.JSX.Element;
|
|
9
|
+
export declare const ClickOpenDropdown: Story;
|
package/dist/css/utilities.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
\***************************************************************************************************************************/
|
|
4
4
|
/**
|
|
5
5
|
* Do not edit directly
|
|
6
|
-
* Generated on
|
|
6
|
+
* Generated on Wed, 13 Nov 2024 18:41:41 GMT
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
.font-family-monospace { font-family: var(--assets-font-family-monospace); }
|
|
@@ -732,6 +732,42 @@
|
|
|
732
732
|
|
|
733
733
|
.focus\:font-color-brand-dark-purple:focus { color: var(--color-font-brand-dark-purple); }
|
|
734
734
|
|
|
735
|
+
.tdl-none { text-decoration-line: var(--font-text-decoration-line-none); }
|
|
736
|
+
|
|
737
|
+
.hover\:tdl-none:hover { text-decoration-line: var(--font-text-decoration-line-none); }
|
|
738
|
+
|
|
739
|
+
.focus\:tdl-none:focus { text-decoration-line: var(--font-text-decoration-line-none); }
|
|
740
|
+
|
|
741
|
+
.tdl-underline { text-decoration-line: var(--font-text-decoration-line-underline); }
|
|
742
|
+
|
|
743
|
+
.hover\:tdl-underline:hover { text-decoration-line: var(--font-text-decoration-line-underline); }
|
|
744
|
+
|
|
745
|
+
.focus\:tdl-underline:focus { text-decoration-line: var(--font-text-decoration-line-underline); }
|
|
746
|
+
|
|
747
|
+
.tdl-line-through { text-decoration-line: var(--font-text-decoration-line-line-through); }
|
|
748
|
+
|
|
749
|
+
.hover\:tdl-line-through:hover { text-decoration-line: var(--font-text-decoration-line-line-through); }
|
|
750
|
+
|
|
751
|
+
.focus\:tdl-line-through:focus { text-decoration-line: var(--font-text-decoration-line-line-through); }
|
|
752
|
+
|
|
753
|
+
.tds-solid { text-decoration-style: var(--font-text-decoration-style-solid); }
|
|
754
|
+
|
|
755
|
+
.tds-double { text-decoration-style: var(--font-text-decoration-style-double); }
|
|
756
|
+
|
|
757
|
+
.tds-dotted { text-decoration-style: var(--font-text-decoration-style-dotted); }
|
|
758
|
+
|
|
759
|
+
.tds-dashed { text-decoration-style: var(--font-text-decoration-style-dashed); }
|
|
760
|
+
|
|
761
|
+
.tds-wavy { text-decoration-style: var(--font-text-decoration-style-wavy); }
|
|
762
|
+
|
|
763
|
+
.transform-uppercase { text-transform: var(--font-text-transform-uppercase); }
|
|
764
|
+
|
|
765
|
+
.transform-lowercase { text-transform: var(--font-text-transform-lowercase); }
|
|
766
|
+
|
|
767
|
+
.transform-capitalize { text-transform: var(--font-text-transform-capitalize); }
|
|
768
|
+
|
|
769
|
+
.transform-normal-case { text-transform: var(--font-text-transform-normal-case); }
|
|
770
|
+
|
|
735
771
|
.bw-0 { border-width: var(--size-border-width-0); border-style: solid; }
|
|
736
772
|
|
|
737
773
|
.bw-top-0 { border-top-width: var(--size-border-width-0); border-top-style: solid; }
|
|
@@ -1426,6 +1462,16 @@
|
|
|
1426
1462
|
|
|
1427
1463
|
.focus\:heading-6xl:focus { font-size: var(--size-heading-6xl); }
|
|
1428
1464
|
|
|
1465
|
+
.lh-none { line-height: var(--size-line-height-none); }
|
|
1466
|
+
|
|
1467
|
+
.lh-base { line-height: var(--size-line-height-base); }
|
|
1468
|
+
|
|
1469
|
+
.lh-input { line-height: var(--size-line-height-input); }
|
|
1470
|
+
|
|
1471
|
+
.lh-heading { line-height: var(--size-line-height-heading); }
|
|
1472
|
+
|
|
1473
|
+
.lh-text { line-height: var(--size-line-height-text); }
|
|
1474
|
+
|
|
1429
1475
|
.m-0 { margin: var(--size-spacing-0); }
|
|
1430
1476
|
|
|
1431
1477
|
.m-top-0 { margin-top: var(--size-spacing-0); }
|
|
@@ -1816,16 +1862,28 @@
|
|
|
1816
1862
|
|
|
1817
1863
|
.z-index-0 { z-index: var(--size-z-index-0); }
|
|
1818
1864
|
|
|
1865
|
+
.z-0 { z-index: var(--size-z-index-0); }
|
|
1866
|
+
|
|
1819
1867
|
.z-index-popover { z-index: var(--size-z-index-popover); }
|
|
1820
1868
|
|
|
1869
|
+
.z-popover { z-index: var(--size-z-index-popover); }
|
|
1870
|
+
|
|
1821
1871
|
.z-index-modal { z-index: var(--size-z-index-modal); }
|
|
1822
1872
|
|
|
1873
|
+
.z-modal { z-index: var(--size-z-index-modal); }
|
|
1874
|
+
|
|
1823
1875
|
.z-index-overlay { z-index: var(--size-z-index-overlay); }
|
|
1824
1876
|
|
|
1877
|
+
.z-overlay { z-index: var(--size-z-index-overlay); }
|
|
1878
|
+
|
|
1825
1879
|
.z-index-drawer { z-index: var(--size-z-index-drawer); }
|
|
1826
1880
|
|
|
1881
|
+
.z-drawer { z-index: var(--size-z-index-drawer); }
|
|
1882
|
+
|
|
1827
1883
|
.z-index-sticky { z-index: var(--size-z-index-sticky); }
|
|
1828
1884
|
|
|
1885
|
+
.z-sticky { z-index: var(--size-z-index-sticky); }
|
|
1886
|
+
|
|
1829
1887
|
@media (min-width: 680px) {
|
|
1830
1888
|
.bw-0-tablet { border-width: var(--size-border-width-0); border-style: solid; }
|
|
1831
1889
|
|
|
@@ -6174,3 +6232,6 @@
|
|
|
6174
6232
|
position: initial;
|
|
6175
6233
|
}
|
|
6176
6234
|
}
|
|
6235
|
+
.outline-none {
|
|
6236
|
+
outline: none;
|
|
6237
|
+
}
|
package/dist/css/variables.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
\*********************************************************************************************************************/
|
|
4
4
|
/**
|
|
5
5
|
* Do not edit directly
|
|
6
|
-
* Generated on
|
|
6
|
+
* Generated on Wed, 13 Nov 2024 18:41:41 GMT
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
:root {
|
|
@@ -203,6 +203,18 @@
|
|
|
203
203
|
--color-font-brand-light-purple: #b47dff;
|
|
204
204
|
--color-font-brand-medium-purple: #4b32aa;
|
|
205
205
|
--color-font-brand-dark-purple: #1e1e5a;
|
|
206
|
+
--font-text-decoration-line-none: none;
|
|
207
|
+
--font-text-decoration-line-underline: underline;
|
|
208
|
+
--font-text-decoration-line-line-through: line-through;
|
|
209
|
+
--font-text-decoration-style-solid: solid;
|
|
210
|
+
--font-text-decoration-style-double: double;
|
|
211
|
+
--font-text-decoration-style-dotted: dotted;
|
|
212
|
+
--font-text-decoration-style-dashed: dashed;
|
|
213
|
+
--font-text-decoration-style-wavy: wavy;
|
|
214
|
+
--font-text-transform-uppercase: uppercase;
|
|
215
|
+
--font-text-transform-lowercase: lowercase;
|
|
216
|
+
--font-text-transform-capitalize: capitalize;
|
|
217
|
+
--font-text-transform-normal-case: normal-case;
|
|
206
218
|
--size-border-width-0: 0rem;
|
|
207
219
|
--size-border-width-sm: 0.0625rem;
|
|
208
220
|
--size-border-width-md: 0.125rem;
|
|
@@ -285,6 +297,7 @@
|
|
|
285
297
|
--size-heading-4xl: 3.5rem;
|
|
286
298
|
--size-heading-5xl: 4rem;
|
|
287
299
|
--size-heading-6xl: 4.5rem;
|
|
300
|
+
--size-line-height-none: 1;
|
|
288
301
|
--size-line-height-base: 1.25;
|
|
289
302
|
--size-line-height-input: 1.15; /* for use by form inputs */
|
|
290
303
|
--size-line-height-heading: 1.25; /* the line-height for headings */
|
|
@@ -314,7 +327,7 @@
|
|
|
314
327
|
\*******************************************************************************************************************************/
|
|
315
328
|
/**
|
|
316
329
|
* Do not edit directly
|
|
317
|
-
* Generated on
|
|
330
|
+
* Generated on Wed, 13 Nov 2024 18:41:41 GMT
|
|
318
331
|
*/
|
|
319
332
|
|
|
320
333
|
:root.dark {
|