@kaizen/components 1.79.6 → 1.79.7

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.
Files changed (96) hide show
  1. package/dist/cjs/alpha.cjs +4 -0
  2. package/dist/cjs/src/Button/Button/Button.cjs +5 -0
  3. package/dist/cjs/src/Button/IconButton/IconButton.cjs +5 -0
  4. package/dist/cjs/src/LikertScaleLegacy/LikertScaleLegacy.cjs +3 -0
  5. package/dist/cjs/src/Skirt/Skirt.cjs +3 -0
  6. package/dist/cjs/src/Skirt/subcomponents/SkirtCard/SkirtCard.cjs +4 -0
  7. package/dist/cjs/src/SplitButton/SplitButton.cjs +2 -0
  8. package/dist/cjs/src/TitleBlockZen/TitleBlockZen.cjs +3 -0
  9. package/dist/cjs/src/__alpha__/SingleSelect/SingleSelect.cjs +32 -0
  10. package/dist/cjs/src/__alpha__/SingleSelect/SingleSelect.module.css.cjs +6 -0
  11. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/List/List.cjs +24 -0
  12. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/List/List.module.css.cjs +6 -0
  13. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.cjs +24 -0
  14. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css.cjs +6 -0
  15. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.cjs +25 -0
  16. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css.cjs +6 -0
  17. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.cjs +21 -0
  18. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css.cjs +6 -0
  19. package/dist/esm/alpha.mjs +1 -0
  20. package/dist/esm/src/Button/Button/Button.mjs +5 -0
  21. package/dist/esm/src/Button/IconButton/IconButton.mjs +5 -0
  22. package/dist/esm/src/LikertScaleLegacy/LikertScaleLegacy.mjs +3 -0
  23. package/dist/esm/src/Skirt/Skirt.mjs +3 -0
  24. package/dist/esm/src/Skirt/subcomponents/SkirtCard/SkirtCard.mjs +4 -0
  25. package/dist/esm/src/SplitButton/SplitButton.mjs +2 -0
  26. package/dist/esm/src/TitleBlockZen/TitleBlockZen.mjs +3 -0
  27. package/dist/esm/src/__alpha__/SingleSelect/SingleSelect.mjs +27 -0
  28. package/dist/esm/src/__alpha__/SingleSelect/SingleSelect.module.css.mjs +4 -0
  29. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/List/List.mjs +18 -0
  30. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/List/List.module.css.mjs +4 -0
  31. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.mjs +18 -0
  32. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css.mjs +4 -0
  33. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.mjs +19 -0
  34. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css.mjs +4 -0
  35. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.mjs +13 -0
  36. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css.mjs +4 -0
  37. package/dist/styles.css +57 -0
  38. package/dist/types/Button/Button/Button.d.ts +5 -0
  39. package/dist/types/Button/IconButton/IconButton.d.ts +5 -0
  40. package/dist/types/LikertScaleLegacy/LikertScaleLegacy.d.ts +3 -0
  41. package/dist/types/Skirt/Skirt.d.ts +3 -0
  42. package/dist/types/Skirt/subcomponents/SkirtCard/SkirtCard.d.ts +3 -0
  43. package/dist/types/SplitButton/SplitButton.d.ts +2 -0
  44. package/dist/types/TitleBlockZen/TitleBlockZen.d.ts +3 -0
  45. package/dist/types/__alpha__/SingleSelect/SingleSelect.d.ts +23 -0
  46. package/dist/types/__alpha__/SingleSelect/_docs/mockData.d.ts +59 -0
  47. package/dist/types/__alpha__/SingleSelect/index.d.ts +1 -0
  48. package/dist/types/__alpha__/SingleSelect/subcomponents/List/List.d.ts +6 -0
  49. package/dist/types/__alpha__/SingleSelect/subcomponents/List/index.d.ts +1 -0
  50. package/dist/types/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.d.ts +6 -0
  51. package/dist/types/__alpha__/SingleSelect/subcomponents/ListItem/index.d.ts +1 -0
  52. package/dist/types/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.d.ts +8 -0
  53. package/dist/types/__alpha__/SingleSelect/subcomponents/ListSection/index.d.ts +1 -0
  54. package/dist/types/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.d.ts +1 -0
  55. package/dist/types/__alpha__/SingleSelect/subcomponents/Trigger/index.d.ts +1 -0
  56. package/dist/types/__alpha__/SingleSelect/subcomponents/index.d.ts +4 -0
  57. package/dist/types/__alpha__/index.d.ts +1 -0
  58. package/package.json +1 -1
  59. package/src/Button/Button/Button.tsx +5 -0
  60. package/src/Button/IconButton/IconButton.tsx +5 -0
  61. package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +3 -0
  62. package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +3 -2
  63. package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.stickersheet.stories.tsx +1 -1
  64. package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.stories.tsx +1 -1
  65. package/src/Skirt/Skirt.tsx +4 -0
  66. package/src/Skirt/_docs/Skirt.mdx +3 -1
  67. package/src/Skirt/_docs/Skirt.stories.tsx +1 -1
  68. package/src/Skirt/subcomponents/SkirtCard/SkirtCard.tsx +4 -0
  69. package/src/SplitButton/SplitButton.tsx +2 -0
  70. package/src/SplitButton/_docs/SplitButton.mdx +3 -1
  71. package/src/SplitButton/_docs/SplitButton.stickersheet.stories.tsx +1 -1
  72. package/src/SplitButton/_docs/SplitButton.stories.tsx +1 -1
  73. package/src/TitleBlockZen/TitleBlockZen.tsx +3 -0
  74. package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +3 -2
  75. package/src/__alpha__/SingleSelect/SingleSelect.module.css +9 -0
  76. package/src/__alpha__/SingleSelect/SingleSelect.spec.tsx +26 -0
  77. package/src/__alpha__/SingleSelect/SingleSelect.tsx +27 -0
  78. package/src/__alpha__/SingleSelect/_docs/SingleSelect.mdx +27 -0
  79. package/src/__alpha__/SingleSelect/_docs/SingleSelect.stickersheet.stories.tsx +83 -0
  80. package/src/__alpha__/SingleSelect/_docs/SingleSelect.stories.tsx +23 -0
  81. package/src/__alpha__/SingleSelect/_docs/mockData.ts +92 -0
  82. package/src/__alpha__/SingleSelect/index.ts +1 -0
  83. package/src/__alpha__/SingleSelect/subcomponents/List/List.module.css +7 -0
  84. package/src/__alpha__/SingleSelect/subcomponents/List/List.tsx +17 -0
  85. package/src/__alpha__/SingleSelect/subcomponents/List/index.ts +1 -0
  86. package/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css +9 -0
  87. package/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.tsx +17 -0
  88. package/src/__alpha__/SingleSelect/subcomponents/ListItem/index.ts +1 -0
  89. package/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.module.css +9 -0
  90. package/src/__alpha__/SingleSelect/subcomponents/ListSection/ListSection.tsx +23 -0
  91. package/src/__alpha__/SingleSelect/subcomponents/ListSection/index.ts +1 -0
  92. package/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.module.css +18 -0
  93. package/src/__alpha__/SingleSelect/subcomponents/Trigger/Trigger.tsx +13 -0
  94. package/src/__alpha__/SingleSelect/subcomponents/Trigger/index.ts +1 -0
  95. package/src/__alpha__/SingleSelect/subcomponents/index.ts +4 -0
  96. package/src/__alpha__/index.ts +1 -0
@@ -0,0 +1,92 @@
1
+ export const singleMockItems = [
2
+ { label: 'Short black', value: 'short-black' },
3
+ { label: 'Long black', value: 'long-black' },
4
+ { label: 'Batch brew', value: 'batch-brew' },
5
+ { label: 'Latte', value: 'latte' },
6
+ { label: 'Flat white', value: 'flat-white' },
7
+ { label: 'Mocha', value: 'mocha' },
8
+ { label: 'Cappuccino', value: 'cappuccino' },
9
+ { label: 'Magic', value: 'magic' },
10
+ ]
11
+
12
+ export const groupedMockItems = [
13
+ {
14
+ label: 'Colours',
15
+ options: [
16
+ { label: 'Blue', value: 'blue' },
17
+ { label: 'Red', value: 'red' },
18
+ { label: 'Green', value: 'green' },
19
+ ],
20
+ },
21
+ {
22
+ label: 'Flavours',
23
+ options: [
24
+ { label: 'Vanilla', value: 'vanilla' },
25
+ { label: 'Chocolate', value: 'chocolate' },
26
+ { label: 'Strawberry', value: 'strawberry' },
27
+ ],
28
+ },
29
+ ]
30
+
31
+ export const mixedMockItemsDisabled = [
32
+ { label: 'Short black', value: 'short-black', disabled: true },
33
+ { label: 'Long black', value: 'long-black' },
34
+ { label: 'Batch brew', value: 'batch-brew', disabled: true },
35
+ {
36
+ label: 'Size',
37
+ options: [
38
+ { label: 'Regular', value: 'regular' },
39
+ { label: 'Large', value: 'large', disabled: true },
40
+ ],
41
+ },
42
+ {
43
+ label: 'Syrup',
44
+ options: [
45
+ { label: 'Vanilla', value: 'vanilla', disabled: true },
46
+ { label: 'Caramel', value: 'caramel' },
47
+ { label: 'Hazelnut', value: 'hazelnut' },
48
+ ],
49
+ },
50
+ ]
51
+
52
+ export const mixedMockItemsUngroupedFirst = [
53
+ { label: 'Batch brew', value: 'batch-brew' },
54
+ { label: 'Latte', value: 'latte' },
55
+ { label: 'Magic', value: 'magic' },
56
+ {
57
+ label: 'Size',
58
+ options: [
59
+ { label: 'Regular', value: 'regular' },
60
+ { label: 'Large', value: 'large' },
61
+ ],
62
+ },
63
+ {
64
+ label: 'Syrup',
65
+ options: [
66
+ { label: 'Vanilla', value: 'vanilla' },
67
+ { label: 'Caramel', value: 'caramel' },
68
+ { label: 'Hazelnut', value: 'hazelnut' },
69
+ ],
70
+ },
71
+ ]
72
+
73
+ export const mixedMockItemsUnordered = [
74
+ {
75
+ label: 'Size',
76
+ options: [
77
+ { label: 'Regular', value: 'regular' },
78
+ { label: 'Large', value: 'large' },
79
+ ],
80
+ },
81
+ { label: 'Batch brew', value: 'batch-brew' },
82
+ { label: 'Latte', value: 'latte' },
83
+ { label: 'Magic', value: 'magic' },
84
+ {
85
+ label: 'Syrup',
86
+ options: [
87
+ { label: 'Vanilla', value: 'vanilla' },
88
+ { label: 'Caramel', value: 'caramel' },
89
+ { label: 'Hazelnut', value: 'hazelnut' },
90
+ ],
91
+ },
92
+ ]
@@ -0,0 +1 @@
1
+ export * from './SingleSelect'
@@ -0,0 +1,7 @@
1
+ @layer kz-components {
2
+ .list {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--spacing-16);
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ import React, { type PropsWithChildren } from 'react'
2
+ import classNames from 'classnames'
3
+ import { ListBox as RACListBox, type ListBoxProps } from 'react-aria-components'
4
+ import styles from './List.module.css'
5
+
6
+ export const List = ({
7
+ children,
8
+ className,
9
+ ...props
10
+ }: ListBoxProps<object> & PropsWithChildren): React.ReactElement => {
11
+ return (
12
+ <RACListBox className={classNames(styles.list, className)} {...props}>
13
+ {children}
14
+ </RACListBox>
15
+ )
16
+ }
17
+ List.displayName = 'SingleSelect.List'
@@ -0,0 +1 @@
1
+ export * from './List'
@@ -0,0 +1,9 @@
1
+ @layer kz-components {
2
+ .listItem {
3
+ font-family: var(--typography-paragraph-body-font-family);
4
+ font-weight: var(--typography-paragraph-body-font-weight);
5
+ font-size: var(--typography-paragraph-body-font-size);
6
+ line-height: var(--typography-paragraph-body-line-height);
7
+ letter-spacing: var(--typography-paragraph-body-letter-spacing);
8
+ }
9
+ }
@@ -0,0 +1,17 @@
1
+ import React, { type PropsWithChildren } from 'react'
2
+ import classNames from 'classnames'
3
+ import { ListBoxItem as RACListBoxItem, type ListBoxItemProps } from 'react-aria-components'
4
+ import styles from './ListItem.module.css'
5
+
6
+ export const ListItem = ({
7
+ children,
8
+ className,
9
+ ...props
10
+ }: ListBoxItemProps<object> & PropsWithChildren): React.ReactElement => {
11
+ return (
12
+ <RACListBoxItem className={classNames(styles.listItem, className)} {...props}>
13
+ {children}
14
+ </RACListBoxItem>
15
+ )
16
+ }
17
+ ListItem.displayName = 'SingleSelect.ListItem'
@@ -0,0 +1 @@
1
+ export * from './ListItem'
@@ -0,0 +1,9 @@
1
+ @layer kz-components {
2
+ .listSectionHeader {
3
+ font-family: var(--typography-heading-5-font-family);
4
+ font-weight: var(--typography-heading-5-font-weight);
5
+ font-size: var(--typography-heading-5-font-size);
6
+ line-height: var(--typography-heading-5-line-height);
7
+ letter-spacing: var(--typography-heading-5-letter-spacing);
8
+ }
9
+ }
@@ -0,0 +1,23 @@
1
+ import React, { type PropsWithChildren } from 'react'
2
+ import classNames from 'classnames'
3
+ import {
4
+ Header as RACHeader,
5
+ ListBoxSection as RACListBoxSection,
6
+ type ListBoxSectionProps,
7
+ } from 'react-aria-components'
8
+ import styles from './ListSection.module.css'
9
+
10
+ export const ListSection = ({
11
+ name,
12
+ className,
13
+ children,
14
+ ...props
15
+ }: ListBoxSectionProps<object> & PropsWithChildren & { name: string }): React.ReactElement => {
16
+ return (
17
+ <RACListBoxSection {...props}>
18
+ <RACHeader className={classNames(styles.listSectionHeader, className)}>{name}</RACHeader>
19
+ {children}
20
+ </RACListBoxSection>
21
+ )
22
+ }
23
+ ListSection.displayName = 'SingleSelect.ListSection'
@@ -0,0 +1 @@
1
+ export * from './ListSection'
@@ -0,0 +1,18 @@
1
+ @layer kz-components {
2
+ .button {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: space-between;
6
+ font-family: var(--typography-paragraph-body-font-family);
7
+ font-weight: var(--typography-paragraph-body-font-weight);
8
+ font-size: var(--typography-paragraph-body-font-size);
9
+ line-height: var(--typography-paragraph-body-line-height);
10
+ letter-spacing: var(--typography-paragraph-body-letter-spacing);
11
+ padding: var(--spacing-12);
12
+ min-height: var(--spacing-48);
13
+ min-width: var(--spacing-200);
14
+ background-color: var(--color-white);
15
+ border-radius: var(--spacing-8);
16
+ border: 1px solid var(--color-gray-500);
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react'
2
+ import { Button as RACButton, SelectValue } from 'react-aria-components'
3
+ import { Icon } from '~components/__next__/Icon'
4
+ import styles from './Trigger.module.css'
5
+
6
+ export const Trigger = (): JSX.Element => {
7
+ return (
8
+ <RACButton className={styles.button}>
9
+ <SelectValue />
10
+ <Icon name="keyboard_arrow_down" isPresentational />
11
+ </RACButton>
12
+ )
13
+ }
@@ -0,0 +1 @@
1
+ export * from './Trigger'
@@ -0,0 +1,4 @@
1
+ export * from './List'
2
+ export * from './ListSection'
3
+ export * from './ListItem'
4
+ export * from './Trigger'
@@ -0,0 +1 @@
1
+ export * from './SingleSelect'