@vev/silke 1.1.3 → 1.1.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 (174) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/index.js +40 -38
  3. package/dist/index.js.LEGAL.txt +12 -0
  4. package/dist/styles.css +1596 -1036
  5. package/dist/types/components/index.d.ts +4 -1
  6. package/dist/types/components/silke-autocomplete-field/autocomplete-types.d.ts +4 -0
  7. package/dist/types/components/silke-autocomplete-field/index.d.ts +1 -0
  8. package/dist/types/components/silke-autocomplete-field/silke-autocomplete-field-native.d.ts +60 -0
  9. package/dist/types/components/silke-autocomplete-field/silke-autocomplete-field.d.ts +3 -0
  10. package/dist/types/components/silke-autocomplete-field/silke-autocomplete-popup-native.d.ts +15 -0
  11. package/dist/types/components/silke-button/silke-dropdown-button.d.ts +8 -13
  12. package/dist/types/components/silke-card/silke-card-grid.d.ts +33 -1
  13. package/dist/types/components/silke-command-text-field/image-utils.d.ts +20 -0
  14. package/dist/types/components/silke-command-text-field/index.d.ts +4 -0
  15. package/dist/types/components/silke-command-text-field/silke-command-parser.d.ts +3 -0
  16. package/dist/types/components/silke-command-text-field/silke-command-parser.spec.d.ts +1 -0
  17. package/dist/types/components/silke-command-text-field/silke-command-text-field.d.ts +46 -0
  18. package/dist/types/components/silke-command-text-field/utils.d.ts +61 -0
  19. package/dist/types/components/silke-command-text-field/utils.spec.d.ts +1 -0
  20. package/dist/types/components/silke-conditions-input/utils.d.ts +1 -1
  21. package/dist/types/components/silke-form-schema/silke-schema-fields.d.ts +1 -0
  22. package/dist/types/components/silke-image/silke-image.d.ts +2 -1
  23. package/dist/types/components/silke-list/index.d.ts +1 -0
  24. package/dist/types/components/silke-list/silke-list-item.d.ts +24 -6
  25. package/dist/types/components/silke-list/silke-list.d.ts +9 -9
  26. package/dist/types/components/silke-list/types.d.ts +19 -0
  27. package/dist/types/components/silke-list/utils.d.ts +3 -0
  28. package/dist/types/components/silke-navigation-link/silke-navigation-link.d.ts +1 -0
  29. package/dist/types/components/silke-overflow-menu/silke-overflow-menu.d.ts +6 -1
  30. package/dist/types/components/silke-popover-native/index.d.ts +1 -0
  31. package/dist/types/components/silke-popover-native/silke-popover-native.d.ts +37 -0
  32. package/dist/types/components/silke-popover-native/types.d.ts +6 -0
  33. package/dist/types/components/silke-popover-native/use-popover-positioning.d.ts +9 -0
  34. package/dist/types/components/silke-select-field/index.d.ts +1 -0
  35. package/dist/types/components/silke-select-field/silke-select-field-native.d.ts +4 -0
  36. package/dist/types/components/silke-shortcut-button/index.d.ts +1 -0
  37. package/dist/types/components/silke-shortcut-button/silke-shortcut-button.d.ts +15 -0
  38. package/dist/types/components/silke-tag/silke-tag.d.ts +1 -1
  39. package/dist/types/icons.d.ts +32 -0
  40. package/jest.config.js +2 -3
  41. package/package.json +9 -3
  42. package/src/_variables.scss +125 -129
  43. package/src/components/index.ts +4 -1
  44. package/src/components/silke-action-box/silke-action-box.scss +2 -3
  45. package/src/components/silke-alert-banner/silke-alert-banner.scss +9 -10
  46. package/src/components/silke-autocomplete-field/autocomplete-item.tsx +2 -2
  47. package/src/components/silke-autocomplete-field/autocomplete-types.ts +4 -0
  48. package/src/components/silke-autocomplete-field/index.ts +1 -0
  49. package/src/components/silke-autocomplete-field/silke-autocomplete-field-native.tsx +346 -0
  50. package/src/components/silke-autocomplete-field/silke-autocomplete-field.mdx +39 -0
  51. package/src/components/silke-autocomplete-field/silke-autocomplete-field.scss +18 -12
  52. package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +3 -0
  53. package/src/components/silke-autocomplete-field/silke-autocomplete-popup-native.tsx +542 -0
  54. package/src/components/silke-autocomplete-field/silke-autocomplete-popup.tsx +92 -41
  55. package/src/components/silke-box/silke-box.mdx +321 -21
  56. package/src/components/silke-box/silke-box.scss +5 -5
  57. package/src/components/silke-breadcrumbs/silke-breadcrumb.mdx +147 -9
  58. package/src/components/silke-breadcrumbs/silke-breadcrumb.scss +3 -3
  59. package/src/components/silke-button/silke-big-button.scss +1 -1
  60. package/src/components/silke-button/silke-button.scss +27 -18
  61. package/src/components/silke-button/silke-dropdown-button.mdx +67 -0
  62. package/src/components/silke-button/silke-dropdown-button.tsx +40 -122
  63. package/src/components/silke-card/silke-card-grid.tsx +5 -3
  64. package/src/components/silke-card/silke-card.scss +8 -7
  65. package/src/components/silke-card/silke-card.tsx +7 -1
  66. package/src/components/silke-checkbox/silke-checkbox.mdx +139 -14
  67. package/src/components/silke-checkbox/silke-checkbox.scss +11 -11
  68. package/src/components/silke-color-picker/color-picker.scss +8 -8
  69. package/src/components/silke-color-swatches/silke-color-swatches.mdx +130 -0
  70. package/src/components/silke-command-text-field/image-utils.ts +71 -0
  71. package/src/components/silke-command-text-field/index.ts +12 -0
  72. package/src/components/silke-command-text-field/silke-command-parser.spec.ts +89 -0
  73. package/src/components/silke-command-text-field/silke-command-parser.ts +47 -0
  74. package/src/components/silke-command-text-field/silke-command-text-field.mdx +301 -0
  75. package/src/components/silke-command-text-field/silke-command-text-field.module.scss +119 -0
  76. package/src/components/silke-command-text-field/silke-command-text-field.tsx +665 -0
  77. package/src/components/silke-command-text-field/utils.spec.ts +366 -0
  78. package/src/components/silke-command-text-field/utils.ts +287 -0
  79. package/src/components/silke-conditions-input/silke-conditions-input.scss +4 -4
  80. package/src/components/silke-content-column/silke-content-column.scss +1 -1
  81. package/src/components/silke-context-menu/silke-context-menu.scss +3 -4
  82. package/src/components/silke-context-menu/silke-context-menu.tsx +1 -1
  83. package/src/components/silke-css-number-field/silke-css-number-field.scss +14 -12
  84. package/src/components/silke-divider/silke-divider.mdx +154 -32
  85. package/src/components/silke-divider/silke-divider.scss +3 -2
  86. package/src/components/silke-drawer/silke-drawer.scss +6 -2
  87. package/src/components/silke-form/silke-form.mdx +254 -27
  88. package/src/components/silke-form-schema/fields/array-field-inline.tsx +1 -0
  89. package/src/components/silke-form-schema/fields/array-field-modal.tsx +1 -0
  90. package/src/components/silke-form-schema/fields/styles.scss +34 -35
  91. package/src/components/silke-form-schema/silke-schema-field.tsx +1 -1
  92. package/src/components/silke-form-schema/silke-schema-fields.tsx +4 -3
  93. package/src/components/silke-gradient-picker/silke-gradient-picker.module.scss +2 -2
  94. package/src/components/silke-icon/silke-icon.mdx +212 -8
  95. package/src/components/silke-icon/silke-icon.scss +10 -2
  96. package/src/components/silke-icon/silke-icon.tsx +1 -0
  97. package/src/components/silke-icon/silke-stacked-icon.scss +42 -45
  98. package/src/components/silke-icon-browser/silke-icon-browser.mdx +143 -0
  99. package/src/components/silke-image/silke-image-color-backdrop.scss +6 -6
  100. package/src/components/silke-image/silke-image.mdx +189 -41
  101. package/src/components/silke-image/silke-image.scss +3 -3
  102. package/src/components/silke-image/silke-image.tsx +14 -1
  103. package/src/components/silke-link/silke-link.scss +3 -5
  104. package/src/components/silke-list/index.ts +1 -0
  105. package/src/components/silke-list/silke-list-item.mdx +83 -0
  106. package/src/components/silke-list/silke-list-item.scss +119 -0
  107. package/src/components/silke-list/silke-list-item.tsx +137 -12
  108. package/src/components/silke-list/silke-list.mdx +108 -13
  109. package/src/components/silke-list/silke-list.scss +8 -15
  110. package/src/components/silke-list/silke-list.tsx +63 -9
  111. package/src/components/silke-list/types.ts +22 -0
  112. package/src/components/silke-list/utils.ts +24 -0
  113. package/src/components/silke-loader/silke-loader.mdx +139 -5
  114. package/src/components/silke-loader/silke-loader.scss +1 -1
  115. package/src/components/silke-modal/silke-modal.scss +9 -9
  116. package/src/components/silke-navigation-link/silke-navigation-link.mdx +27 -2
  117. package/src/components/silke-navigation-link/silke-navigation-link.scss +34 -40
  118. package/src/components/silke-navigation-link/silke-navigation-link.tsx +7 -6
  119. package/src/components/silke-overflow-menu/silke-overflow-menu.mdx +228 -31
  120. package/src/components/silke-overflow-menu/silke-overflow-menu.scss +8 -8
  121. package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +14 -8
  122. package/src/components/silke-popover/silke-popover.scss +5 -5
  123. package/src/components/silke-popover-native/index.ts +1 -0
  124. package/src/components/silke-popover-native/silke-popover-native.mdx +207 -0
  125. package/src/components/silke-popover-native/silke-popover-native.scss +127 -0
  126. package/src/components/silke-popover-native/silke-popover-native.tsx +176 -0
  127. package/src/components/silke-popover-native/types.ts +21 -0
  128. package/src/components/silke-popover-native/use-popover-positioning.ts +157 -0
  129. package/src/components/silke-progress-indicator/silke-progress-indicator.scss +1 -1
  130. package/src/components/silke-radio-button/silke-radio-button.scss +18 -11
  131. package/src/components/silke-search-field/silke-search-field.mdx +161 -7
  132. package/src/components/silke-select-field/index.ts +1 -0
  133. package/src/components/silke-select-field/silke-select-field-native.tsx +17 -0
  134. package/src/components/silke-select-field/silke-select-field.mdx +65 -0
  135. package/src/components/silke-shortcut-button/index.ts +1 -0
  136. package/src/components/silke-shortcut-button/silke-shortcut-button.mdx +89 -0
  137. package/src/components/silke-shortcut-button/silke-shortcut-button.scss +145 -0
  138. package/src/components/silke-shortcut-button/silke-shortcut-button.tsx +55 -0
  139. package/src/components/silke-skeleton/silke-skeleton.mdx +109 -0
  140. package/src/components/silke-skeleton/silke-skeleton.scss +1 -1
  141. package/src/components/silke-slider/silke-slider.module.scss +19 -19
  142. package/src/components/silke-sortable-list/silke-nested-sortable-list.scss +3 -3
  143. package/src/components/silke-sortable-list/silke-sortable-list.scss +4 -5
  144. package/src/components/silke-table/silke-table.scss +1 -1
  145. package/src/components/silke-tabs/silke-tabs.scss +3 -3
  146. package/src/components/silke-tag/silke-tag.mdx +179 -43
  147. package/src/components/silke-tag/silke-tag.scss +49 -12
  148. package/src/components/silke-tag/silke-tag.tsx +17 -7
  149. package/src/components/silke-text/silke-text.scss +6 -4
  150. package/src/components/silke-text/silke-title.scss +7 -14
  151. package/src/components/silke-text-field/silke-text-field.scss +9 -9
  152. package/src/components/silke-text-field/silke-text-field.tsx +3 -2
  153. package/src/components/silke-tile/silke-tile.scss +7 -3
  154. package/src/components/silke-toast-notification/silke-toast-notification.scss +4 -5
  155. package/src/components/silke-toggle/silke-toggle.mdx +163 -33
  156. package/src/components/silke-toggle/silke-toggle.scss +4 -4
  157. package/src/components/silke-toolbar/silke-toolbar.scss +1 -1
  158. package/src/components/silke-tooltip/silke-shortcuts.tsx +3 -3
  159. package/src/components/silke-tooltip/silke-tooltip.scss +11 -16
  160. package/src/components/silke-variables-wrapper/silke-variables-wrapper.scss +9 -7
  161. package/src/components/silke-virtual/silke-virtual.mdx +161 -0
  162. package/src/components/silke-virtual/silke-virtual.scss +8 -8
  163. package/src/icons.tsx +45 -1
  164. package/src/styles/core.scss +42 -45
  165. package/src/styles/math.scss +66 -66
  166. package/tsconfig.build.json +2 -6
  167. package/tsconfig.build.tsbuildinfo +1 -1
  168. package/tsconfig.json +3 -14
  169. package/dist/types/components/silke-list-card/index.d.ts +0 -1
  170. package/dist/types/components/silke-list-card/silke-list-card.d.ts +0 -14
  171. package/src/components/silke-list-card/index.ts +0 -1
  172. package/src/components/silke-list-card/silke-list-card.mdx +0 -46
  173. package/src/components/silke-list-card/silke-list-card.scss +0 -57
  174. package/src/components/silke-list-card/silke-list-card.tsx +0 -63
package/tsconfig.json CHANGED
@@ -7,11 +7,7 @@
7
7
  "module": "es2022",
8
8
  "moduleResolution": "Node",
9
9
  "target": "ES2022",
10
- "lib": [
11
- "esnext",
12
- "dom",
13
- "DOM.Iterable"
14
- ],
10
+ "lib": ["esnext", "dom", "DOM.Iterable"],
15
11
  "paths": {
16
12
  "@vev/react": ["../../react-pkg/src"],
17
13
  "@vev/utils": ["../../utils/src"],
@@ -19,13 +15,6 @@
19
15
  },
20
16
  "composite": true
21
17
  },
22
- "include": [
23
- "src/**/*",
24
- "./jest-setup.ts"
25
- ],
26
- "exclude": [
27
- "node_modules",
28
- "**/*/dist",
29
- "__mocks__"
30
- ]
18
+ "include": ["src/**/*", "./jest-setup.ts"],
19
+ "exclude": ["node_modules", "**/*/dist", "__mocks__"]
31
20
  }
@@ -1 +0,0 @@
1
- export * from './silke-list-card';
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { SilkeTagProps } from '../silke-tag';
3
- import { SilkeOverflowMenuItem } from '../silke-overflow-menu';
4
- export type SilkeListItemsProps = {
5
- title: string;
6
- subtitle?: string;
7
- image?: string;
8
- tag?: Omit<SilkeTagProps, 'size'>;
9
- menu?: MenuItems;
10
- state?: 'hover' | 'focus' | 'disabled' | 'selected' | '';
11
- };
12
- type MenuItems = (SilkeOverflowMenuItem | React.ReactElement | 'divider')[] | (() => (SilkeOverflowMenuItem | React.ReactElement | 'divider')[]);
13
- export declare function SilkeListCard({ title, subtitle, image, tag, menu, state, }: SilkeListItemsProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1 +0,0 @@
1
- export * from './silke-list-card';
@@ -1,46 +0,0 @@
1
- ## List Item
2
-
3
- ## Variants
4
-
5
- ```js
6
- const list = [1, 2, 3].map((i) => ({ label: 'Item 1' }));
7
-
8
- <SilkeBox column gap="m">
9
- <SilkeListCard title="Title placeholder" />
10
- <SilkeListCard title="Title placeholder" image={ipsum.image()} />
11
- <SilkeListCard title="Title placeholder" subtitle="Subtitle placeholder" image={ipsum.image()} />
12
- <SilkeListCard
13
- title="Title placeholder"
14
- subtitle="Subtitle placeholder"
15
- image={ipsum.image()}
16
- tag={{
17
- label: 'Tag',
18
- kind: 'green',
19
- }}
20
- />
21
- <SilkeListCard
22
- title="Title placeholder"
23
- subtitle="Subtitle placeholder"
24
- image={ipsum.image()}
25
- tag={{
26
- label: 'Tag',
27
- kind: 'green',
28
- }}
29
- menu={list}
30
- />
31
- </SilkeBox>;
32
- ```
33
-
34
- ## States
35
-
36
- ```js
37
- const list = [1, 2, 3].map((i) => ({ label: 'Item 1' }));
38
-
39
- <SilkeBox gap="m" column>
40
- <SilkeListCard title="Default" image={ipsum.image()} />
41
- <SilkeListCard title="Hover" image={ipsum.image()} state="hover" />
42
- <SilkeListCard title="Focus" image={ipsum.image()} state="focus" />
43
- <SilkeListCard title="Disabled" image={ipsum.image()} state="disabled" />
44
- <SilkeListCard title="Selected" image={ipsum.image()} state="selected" />
45
- </SilkeBox>;
46
- ```
@@ -1,57 +0,0 @@
1
-
2
- .card {
3
- border-radius: var(--border-radius-small);
4
- line-height: 1.25;
5
- justify-content: space-between;
6
- }
7
- .image {
8
- border-radius: var(--border-radius-tiny);
9
- overflow: hidden;
10
- width: 32px;
11
- height: 32px;
12
- }
13
-
14
- // States
15
-
16
- .hover,
17
- .card:hover {
18
- background-color: var(--color-surface-2);
19
- transition: 200ms;
20
- cursor: pointer;
21
- }
22
-
23
- .card:active {
24
- outline: none;
25
- }
26
-
27
- .selected {
28
- outline: 1px solid var(--color-accent-30);
29
- }
30
-
31
- .disabled {
32
- span {
33
- color: var(--color-neutral-60);
34
- }
35
-
36
- img {
37
- opacity: 40%;
38
- }
39
- }
40
-
41
-
42
- .card:focus {
43
- outline: none;
44
- }
45
-
46
- .focus,
47
- .card:focus-visible::before {
48
- border: 1px solid var(--color-neutral-70);
49
- position: absolute;
50
- border-radius: var(--border-radius-small);
51
- top: -4px;
52
- left: -4px;
53
- right: -4px;
54
- bottom: -4px;
55
- content: "";
56
- z-index: 1;
57
- }
@@ -1,63 +0,0 @@
1
- import React from 'react';
2
- import { SilkeBox } from '../silke-box';
3
- import { SilkeTag, SilkeTagProps } from '../silke-tag';
4
- import { SilkeOverflowMenu, SilkeOverflowMenuItem } from '../silke-overflow-menu';
5
- import { SilkeText, SilkeTextSmall } from '../silke-text';
6
- import { SilkeImage } from '../silke-image';
7
-
8
- import styles from './silke-list-card.scss';
9
-
10
- export type SilkeListItemsProps = {
11
- title: string;
12
- subtitle?: string;
13
- image?: string;
14
- tag?: Omit<SilkeTagProps, 'size'>;
15
- menu?: MenuItems;
16
- state?: 'hover' | 'focus' | 'disabled' | 'selected' | '';
17
- };
18
-
19
- type MenuItems =
20
- | (SilkeOverflowMenuItem | React.ReactElement | 'divider')[]
21
- | (() => (SilkeOverflowMenuItem | React.ReactElement | 'divider')[]);
22
-
23
- export function SilkeListCard({
24
- title,
25
- subtitle,
26
- image,
27
- tag,
28
- menu,
29
- state = '',
30
- }: SilkeListItemsProps) {
31
- const tagProps = { ...tag, size: 'tiny' } as SilkeTagProps;
32
-
33
- return (
34
- <SilkeBox
35
- pad="m"
36
- bg="surface-1"
37
- className={[styles.card, styles[state]].join(' ')}
38
- tabIndex={0}
39
- >
40
- <SilkeBox gap="m">
41
- {image && (
42
- <SilkeBox>
43
- <SilkeImage src={image} aspectRatio="1:1" className={styles.image} />
44
- </SilkeBox>
45
- )}
46
- <SilkeBox column gap="none" style={{ justifyContent: 'center' }}>
47
- <SilkeText color="neutral-100" size="base">
48
- {title}
49
- </SilkeText>
50
- {subtitle && <SilkeTextSmall color="neutral-70">{subtitle}</SilkeTextSmall>}
51
- </SilkeBox>
52
- </SilkeBox>
53
- <SilkeBox align="center" gap="m">
54
- {tag?.label && (
55
- <SilkeBox align="center">
56
- <SilkeTag {...tagProps} />{' '}
57
- </SilkeBox>
58
- )}
59
- {menu && <SilkeOverflowMenu items={menu} size="s" />}
60
- </SilkeBox>
61
- </SilkeBox>
62
- );
63
- }