@vev/silke 1.0.28 → 1.0.29
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/CHANGELOG.md +8 -0
- package/dist/index.js +49 -48
- package/dist/silke/src/components/index.d.ts +1 -1
- package/dist/silke/src/components/silke-autocomplete-field/autocomplete-item.d.ts +2 -1
- package/dist/silke/src/components/silke-autocomplete-field/autocomplete-tags.d.ts +2 -1
- package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-field.d.ts +3 -1
- package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-popup.d.ts +1 -0
- package/dist/silke/src/components/silke-box/silke-box.d.ts +3 -2
- package/dist/silke/src/components/silke-breadcrumbs/silke-breadcrumb.d.ts +1 -1
- package/dist/silke/src/components/silke-button/silke-big-button.d.ts +4 -1
- package/dist/silke/src/components/silke-button/silke-button.d.ts +1 -1
- package/dist/silke/src/components/silke-button/silke-dropdown-button.d.ts +2 -1
- package/dist/silke/src/components/silke-color-picker/color.d.ts +5 -0
- package/dist/silke/src/components/silke-color-picker/silke-color-info.d.ts +3 -1
- package/dist/silke/src/components/silke-color-swatches/silke-swatches.d.ts +2 -1
- package/dist/silke/src/components/silke-conditions-input/index.d.ts +2 -0
- package/dist/silke/src/components/silke-conditions-input/silke-conditions-input-options.d.ts +8 -0
- package/dist/silke/src/components/silke-conditions-input/silke-conditions-input.d.ts +19 -0
- package/dist/silke/src/components/silke-conditions-input/silke-conditions-tag.d.ts +11 -0
- package/dist/silke/src/components/silke-conditions-input/types.d.ts +13 -0
- package/dist/silke/src/components/silke-conditions-input/utils.d.ts +11 -0
- package/dist/silke/src/components/silke-context-menu/silke-context-menu-item.d.ts +1 -1
- package/dist/silke/src/components/silke-css-number-field/silke-css-context.d.ts +5 -1
- package/dist/silke/src/components/silke-css-number-field/silke-css-number-field.d.ts +3 -1
- package/dist/silke/src/components/silke-form/form-types.d.ts +3 -3
- package/dist/silke/src/components/silke-form-schema/fields/array-field-inline.d.ts +2 -1
- package/dist/silke/src/components/silke-form-schema/fields/array-field-modal.d.ts +3 -2
- package/dist/silke/src/components/silke-form-schema/fields/array-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/event-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/icon-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/image-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/layout-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/object-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/string-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/toggle-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/utils/generate-image.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/utils/generate-title.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/video-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/silke-form-schema.d.ts +5 -0
- package/dist/silke/src/components/silke-form-schema/silke-schema-field.d.ts +3 -1
- package/dist/silke/src/components/silke-form-schema/silke-schema-fields.d.ts +2 -0
- package/dist/silke/src/components/silke-modal/silke-modal.d.ts +2 -1
- package/dist/silke/src/components/silke-notification/silke-notification.d.ts +1 -1
- package/dist/silke/src/components/silke-radio-button/silke-radio-button-group.d.ts +1 -1
- package/dist/silke/src/components/silke-slider/silke-slider.d.ts +1 -0
- package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-utils.d.ts +1 -0
- package/dist/silke/src/components/silke-sortable-list/silke-sortable-item-wrapper.d.ts +2 -1
- package/dist/silke/src/components/silke-sortable-list/silke-sortable-list.d.ts +2 -1
- package/dist/silke/src/components/silke-table/silke-table.d.ts +2 -1
- package/dist/silke/src/components/silke-table/table-row.d.ts +3 -1
- package/dist/silke/src/components/silke-table/table-types.d.ts +1 -1
- package/dist/silke/src/components/silke-tag/silke-tag.d.ts +1 -1
- package/dist/silke/src/components/silke-text-field/silke-text-field-outline.d.ts +3 -1
- package/dist/silke/src/components/silke-text-field/text-field-context.d.ts +4 -1
- package/dist/silke/src/components/silke-tile/index.d.ts +0 -1
- package/dist/silke/src/components/silke-tooltip/silke-definition-tooltip.d.ts +2 -1
- package/dist/silke/src/components/silke-tooltip/silke-icon-tooltip.d.ts +2 -1
- package/dist/silke/src/components/silke-tooltip/silke-tooltip.d.ts +6 -1
- package/dist/silke/src/components/silke-variables-wrapper/silke-variables-wrapper-form.d.ts +4 -3
- package/dist/silke/src/components/silke-variables-wrapper/silke-variables-wrapper.d.ts +5 -1
- package/dist/silke/src/icons.d.ts +74 -2
- package/dist/silke/src/silke-theme-provider.d.ts +1 -1
- package/dist/styles.css +1419 -1157
- package/dist/utils/src/types/context.d.ts +1 -0
- package/dist/utils/src/types/index.d.ts +1 -0
- package/dist/utils/src/types/manifest.d.ts +2 -0
- package/dist/utils/src/types/qwiker.d.ts +46 -0
- package/dist/utils/src/types/vev-plugin.d.ts +12 -0
- package/dist/utils/src/types/vev-props.d.ts +23 -2
- package/dist/utils/src/types/widget-manifest.d.ts +1 -0
- package/dist/utils/src/utils/index.d.ts +1 -0
- package/dist/utils/src/utils/variable.d.ts +3 -0
- package/package.json +15 -8
- package/project.json +21 -0
- package/public/index.html +2 -2
- package/src/_variables.scss +19 -5
- package/src/components/index.ts +1 -1
- package/src/components/silke-autocomplete-field/autocomplete-item.tsx +18 -12
- package/src/components/silke-autocomplete-field/autocomplete-tags.tsx +3 -0
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.mdx +15 -15
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +33 -25
- package/src/components/silke-autocomplete-field/silke-autocomplete-popup.tsx +40 -20
- package/src/components/silke-box/silke-box.mdx +13 -9
- package/src/components/silke-box/silke-box.scss +12 -3
- package/src/components/silke-box/silke-box.tsx +18 -2
- package/src/components/silke-breadcrumbs/silke-breadcrumb.tsx +2 -2
- package/src/components/silke-button/silke-big-button.scss +0 -5
- package/src/components/silke-button/silke-big-button.tsx +15 -4
- package/src/components/silke-button/silke-button.mdx +34 -17
- package/src/components/silke-button/silke-button.scss +28 -31
- package/src/components/silke-button/silke-button.tsx +2 -2
- package/src/components/silke-button/silke-dropdown-button.tsx +7 -3
- package/src/components/silke-button/silke-file-select-button.tsx +1 -0
- package/src/components/silke-card/silke-card-grid.tsx +1 -1
- package/src/components/silke-card/silke-card.mdx +16 -26
- package/src/components/silke-card/silke-card.scss +10 -3
- package/src/components/silke-card/silke-card.tsx +7 -4
- package/src/components/silke-checkbox/silke-checkbox.mdx +2 -11
- package/src/components/silke-code-snippet/silke-code-snippet.mdx +27 -22
- package/src/components/silke-color-palettes/silke-color-palette.mdx +2 -2
- package/src/components/silke-color-picker/color.ts +12 -0
- package/src/components/silke-color-picker/silke-color-info.tsx +27 -8
- package/src/components/silke-color-picker/silke-color-picker-button.tsx +1 -1
- package/src/components/silke-color-picker/silke-color-picker.mdx +9 -13
- package/src/components/silke-color-picker/silke-color-picker.tsx +23 -6
- package/src/components/silke-color-swatches/silke-color-swatch-button.tsx +1 -1
- package/src/components/silke-color-swatches/silke-swatches.tsx +10 -7
- package/src/components/silke-conditions-input/index.ts +2 -0
- package/src/components/silke-conditions-input/silke-conditions-input-options.tsx +87 -0
- package/src/components/silke-conditions-input/silke-conditions-input.mdx +88 -0
- package/src/components/silke-conditions-input/silke-conditions-input.scss +29 -0
- package/src/components/silke-conditions-input/silke-conditions-input.tsx +290 -0
- package/src/components/silke-conditions-input/silke-conditions-tag.tsx +80 -0
- package/src/components/silke-conditions-input/types.ts +23 -0
- package/src/components/silke-conditions-input/utils.ts +181 -0
- package/src/components/silke-content-column/silke-content-column.scss +1 -1
- package/src/components/silke-context-menu/silke-context-menu-item.tsx +3 -0
- package/src/components/silke-context-menu/silke-context-menu.mdx +4 -4
- package/src/components/silke-context-menu/silke-context-menu.scss +9 -7
- package/src/components/silke-context-menu/silke-context-menu.tsx +1 -1
- package/src/components/silke-css-number-field/silke-css-context.tsx +6 -1
- package/src/components/silke-css-number-field/silke-css-number-field.mdx +221 -91
- package/src/components/silke-css-number-field/silke-css-number-field.scss +10 -3
- package/src/components/silke-css-number-field/silke-css-number-field.tsx +52 -8
- package/src/components/silke-css-number-field/utils.ts +2 -1
- package/src/components/silke-divider/silke-divider.mdx +1 -2
- package/src/components/silke-drawer/silke-drawer.mdx +4 -11
- package/src/components/silke-form/form-types.ts +5 -3
- package/src/components/silke-form/silke-form.mdx +4 -16
- package/src/components/silke-form-schema/fields/array-field-inline.tsx +12 -2
- package/src/components/silke-form-schema/fields/array-field-modal.tsx +10 -6
- package/src/components/silke-form-schema/fields/array-field.tsx +25 -6
- package/src/components/silke-form-schema/fields/event-field.tsx +18 -7
- package/src/components/silke-form-schema/fields/icon-field.tsx +21 -3
- package/src/components/silke-form-schema/fields/image-field.tsx +21 -3
- package/src/components/silke-form-schema/fields/layout-field.tsx +8 -1
- package/src/components/silke-form-schema/fields/link-field.tsx +5 -1
- package/src/components/silke-form-schema/fields/number-field.tsx +144 -13
- package/src/components/silke-form-schema/fields/object-field.tsx +10 -1
- package/src/components/silke-form-schema/fields/select-field.tsx +15 -1
- package/src/components/silke-form-schema/fields/string-field.tsx +115 -20
- package/src/components/silke-form-schema/fields/toggle-field.tsx +14 -2
- package/src/components/silke-form-schema/fields/upload-field.tsx +3 -1
- package/src/components/silke-form-schema/fields/utils/generate-image.ts +4 -1
- package/src/components/silke-form-schema/fields/utils/generate-title.ts +2 -1
- package/src/components/silke-form-schema/fields/video-field.tsx +22 -4
- package/src/components/silke-form-schema/silke-form-schema.mdx +227 -160
- package/src/components/silke-form-schema/silke-form-schema.tsx +5 -0
- package/src/components/silke-form-schema/silke-schema-field.tsx +23 -6
- package/src/components/silke-form-schema/silke-schema-fields.tsx +3 -1
- package/src/components/silke-gradient-picker/silke-gradient-picker.mdx +1 -1
- package/src/components/silke-icon/silke-icon.mdx +3 -6
- package/src/components/silke-icon/silke-icon.scss +2 -0
- package/src/components/silke-icon-picker/silke-icon-picker.tsx +5 -5
- package/src/components/silke-iframe-portal/silke-iframe-portal.mdx +6 -15
- package/src/components/silke-image/silke-image.mdx +28 -0
- package/src/components/silke-image/silke-image.scss +1 -0
- package/src/components/silke-link/silke-link.mdx +62 -39
- package/src/components/silke-link/silke-link.scss +3 -2
- package/src/components/silke-list/silke-list.mdx +12 -10
- package/src/components/silke-list-card/silke-list-card.mdx +7 -11
- package/src/components/silke-loader/silke-loader.mdx +1 -1
- package/src/components/silke-loader/silke-loader.tsx +1 -4
- package/src/components/silke-modal/silke-modal.mdx +1 -5
- package/src/components/silke-modal/silke-modal.scss +0 -2
- package/src/components/silke-modal/silke-modal.tsx +3 -1
- package/src/components/silke-navigation-link/silke-navigation-link.mdx +21 -22
- package/src/components/silke-navigation-link/silke-navigation-link.scss +2 -2
- package/src/components/silke-notification/silke-notification.mdx +35 -67
- package/src/components/silke-notification/silke-notification.tsx +2 -1
- package/src/components/silke-object-field/silke-object-field.mdx +3 -10
- package/src/components/silke-object-field/silke-object-field.tsx +2 -2
- package/src/components/silke-overflow-menu/silke-overflow-menu.mdx +2 -2
- package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +2 -1
- package/src/components/silke-popover/silke-popover.mdx +14 -22
- package/src/components/silke-popover/silke-popover.tsx +21 -15
- package/src/components/silke-progress-indicator/silke-progress-indicator.mdx +33 -36
- package/src/components/silke-radio-button/silke-radio-button-group.tsx +1 -1
- package/src/components/silke-radio-button/silke-radio-button.mdx +1 -7
- package/src/components/silke-radio-button/silke-radio-button.scss +1 -0
- package/src/components/silke-search-field/silke-search-field.mdx +4 -12
- package/src/components/silke-select-field/silke-select-field.mdx +10 -10
- package/src/components/silke-slider/silke-slider.mdx +59 -22
- package/src/components/silke-slider/silke-slider.tsx +23 -10
- package/src/components/silke-sortable-list/silke-nested-sortable-item.tsx +3 -3
- package/src/components/silke-sortable-list/silke-nested-sortable-utils.ts +1 -0
- package/src/components/silke-sortable-list/silke-sortable-item-wrapper.tsx +4 -1
- package/src/components/silke-sortable-list/silke-sortable-list.mdx +54 -58
- package/src/components/silke-sortable-list/silke-sortable-list.scss +2 -2
- package/src/components/silke-sortable-list/silke-sortable-list.tsx +3 -0
- package/src/components/silke-table/silke-table.mdx +75 -75
- package/src/components/silke-table/silke-table.scss +27 -13
- package/src/components/silke-table/silke-table.tsx +13 -3
- package/src/components/silke-table/table-row.tsx +6 -1
- package/src/components/silke-table/table-types.ts +1 -1
- package/src/components/silke-tabs/silke-tabs.mdx +2 -2
- package/src/components/silke-tag/silke-tag.mdx +38 -79
- package/src/components/silke-tag/silke-tag.scss +12 -5
- package/src/components/silke-tag/silke-tag.tsx +1 -0
- package/src/components/silke-text/silke-text.mdx +50 -48
- package/src/components/silke-text/silke-text.scss +4 -2
- package/src/components/silke-text/silke-title.scss +29 -15
- package/src/components/silke-text-field/silke-text-field-outline.tsx +9 -1
- package/src/components/silke-text-field/silke-text-field.mdx +67 -71
- package/src/components/silke-text-field/silke-text-field.scss +4 -3
- package/src/components/silke-text-field/silke-text-field.tsx +16 -16
- package/src/components/silke-text-field/text-field-context.tsx +7 -2
- package/src/components/silke-tile/index.ts +0 -1
- package/src/components/silke-tile/silke-tile.mdx +6 -63
- package/src/components/silke-tile/silke-tile.tsx +4 -4
- package/src/components/silke-toggle/silke-toggle.mdx +5 -29
- package/src/components/silke-toggle/silke-toggle.scss +3 -2
- package/src/components/silke-toolbar/silke-toolbar.mdx +6 -6
- package/src/components/silke-tooltip/silke-definition-tooltip.tsx +3 -0
- package/src/components/silke-tooltip/silke-icon-tooltip.tsx +5 -2
- package/src/components/silke-tooltip/silke-tooltip.mdx +16 -34
- package/src/components/silke-tooltip/silke-tooltip.scss +3 -2
- package/src/components/silke-tooltip/silke-tooltip.tsx +15 -4
- package/src/components/silke-upload-field/silke-upload-field.tsx +1 -0
- package/src/components/silke-variables-wrapper/silke-variables-wrapper-form.tsx +30 -50
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.mdx +56 -15
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.scss +0 -2
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.tsx +107 -44
- package/src/docs/data/flux/store.ts +0 -1
- package/src/hooks/drag-and-drop/use-drop.tsx +1 -1
- package/src/hooks/hooks.mdx +3 -3
- package/src/icons.tsx +104 -4
- package/src/index.mdx +30 -31
- package/src/playground.mdx +58 -47
- package/src/silke-theme-provider.tsx +1 -0
- package/src/styles/core.scss +10 -14
- package/dist/silke/src/components/silke-steps/index.d.ts +0 -1
- package/dist/silke/src/components/silke-steps/silke-steps.d.ts +0 -12
- package/dist/silke/src/components/silke-tile/silke-tile-select.d.ts +0 -26
- package/src/components/silke-steps/index.ts +0 -1
- package/src/components/silke-steps/silke-steps.mdx +0 -60
- package/src/components/silke-steps/silke-steps.scss +0 -14
- package/src/components/silke-steps/silke-steps.tsx +0 -53
- package/src/components/silke-tile/silke-tile-select.tsx +0 -100
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
```js
|
|
2
2
|
<SilkeBox column gap>
|
|
3
|
-
{[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<SilkeBox gap key={color}>
|
|
14
|
-
<SilkeTag color={color} label={color} />
|
|
15
|
-
<SilkeTag color={color} label={ipsum.name()} onRemove={() => {}} />
|
|
16
|
-
<SilkeTag color={color} label={ipsum.name(10)} onRemove={() => {}} />
|
|
17
|
-
<SilkeTag color={color} label="Disabled" disabled />
|
|
18
|
-
</SilkeBox>
|
|
19
|
-
))}
|
|
3
|
+
{['sand', 'yellow', 'green', 'red', 'gray', 'blue', 'brandYellow', 'dark', 'purple'].map(
|
|
4
|
+
(color) => (
|
|
5
|
+
<SilkeBox gap key={color}>
|
|
6
|
+
<SilkeTag color={color} label={color} />
|
|
7
|
+
<SilkeTag color={color} label={ipsum.name()} onRemove={() => {}} />
|
|
8
|
+
<SilkeTag color={color} label={ipsum.name(10)} onRemove={() => {}} />
|
|
9
|
+
<SilkeTag color={color} label="Disabled" disabled />
|
|
10
|
+
</SilkeBox>
|
|
11
|
+
),
|
|
12
|
+
)}
|
|
20
13
|
</SilkeBox>
|
|
21
14
|
```
|
|
22
15
|
|
|
@@ -24,20 +17,13 @@
|
|
|
24
17
|
|
|
25
18
|
```js
|
|
26
19
|
<SilkeBox gap>
|
|
27
|
-
{[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"brandYellow",
|
|
35
|
-
"dark",
|
|
36
|
-
].map((color) => (
|
|
37
|
-
<SilkeBox gap key={color} col>
|
|
38
|
-
<SilkeTag kind="outlined" color={color} label={color} outline />
|
|
39
|
-
</SilkeBox>
|
|
40
|
-
))}
|
|
20
|
+
{['sand', 'yellow', 'green', 'red', 'gray', 'blue', 'brandYellow', 'dark', 'purple'].map(
|
|
21
|
+
(color) => (
|
|
22
|
+
<SilkeBox gap key={color} col>
|
|
23
|
+
<SilkeTag kind="outlined" color={color} label={color} outline />
|
|
24
|
+
</SilkeBox>
|
|
25
|
+
),
|
|
26
|
+
)}
|
|
41
27
|
</SilkeBox>
|
|
42
28
|
```
|
|
43
29
|
|
|
@@ -45,26 +31,13 @@
|
|
|
45
31
|
|
|
46
32
|
```js
|
|
47
33
|
<SilkeBox gap>
|
|
48
|
-
{[
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"brandYellow",
|
|
56
|
-
"dark",
|
|
57
|
-
].map((color) => (
|
|
58
|
-
<SilkeBox gap key={color} col>
|
|
59
|
-
<SilkeTag
|
|
60
|
-
kind="secondary"
|
|
61
|
-
color={color}
|
|
62
|
-
label={color}
|
|
63
|
-
outline
|
|
64
|
-
icon="react"
|
|
65
|
-
/>
|
|
66
|
-
</SilkeBox>
|
|
67
|
-
))}
|
|
34
|
+
{['sand', 'yellow', 'green', 'red', 'gray', 'blue', 'brandYellow', 'dark', 'purple'].map(
|
|
35
|
+
(color) => (
|
|
36
|
+
<SilkeBox gap key={color} col>
|
|
37
|
+
<SilkeTag kind="secondary" color={color} label={color} outline icon="react" />
|
|
38
|
+
</SilkeBox>
|
|
39
|
+
),
|
|
40
|
+
)}
|
|
68
41
|
<SilkeTag kind="secondary" label="Emoji" outline icon="😎" />
|
|
69
42
|
</SilkeBox>
|
|
70
43
|
```
|
|
@@ -95,20 +68,13 @@
|
|
|
95
68
|
|
|
96
69
|
```js
|
|
97
70
|
<SilkeBox gap>
|
|
98
|
-
{[
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"brandYellow",
|
|
106
|
-
"dark",
|
|
107
|
-
].map((color) => (
|
|
108
|
-
<SilkeBox gap key={color} col>
|
|
109
|
-
<SilkeTag color={color} label={color} icon="react" />
|
|
110
|
-
</SilkeBox>
|
|
111
|
-
))}
|
|
71
|
+
{['sand', 'yellow', 'green', 'red', 'gray', 'blue', 'brandYellow', 'dark', 'purple'].map(
|
|
72
|
+
(color) => (
|
|
73
|
+
<SilkeBox gap key={color} col>
|
|
74
|
+
<SilkeTag color={color} label={color} icon="react" />
|
|
75
|
+
</SilkeBox>
|
|
76
|
+
),
|
|
77
|
+
)}
|
|
112
78
|
</SilkeBox>
|
|
113
79
|
```
|
|
114
80
|
|
|
@@ -116,20 +82,13 @@
|
|
|
116
82
|
|
|
117
83
|
```js
|
|
118
84
|
<SilkeBox gap>
|
|
119
|
-
{[
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"brandYellow",
|
|
127
|
-
"dark",
|
|
128
|
-
].map((color) => (
|
|
129
|
-
<SilkeBox gap key={color} col>
|
|
130
|
-
<SilkeTag color={color} icon="react" />
|
|
131
|
-
</SilkeBox>
|
|
132
|
-
))}
|
|
85
|
+
{['sand', 'yellow', 'green', 'red', 'gray', 'blue', 'brandYellow', 'dark', 'purple'].map(
|
|
86
|
+
(color) => (
|
|
87
|
+
<SilkeBox gap key={color} col>
|
|
88
|
+
<SilkeTag color={color} icon="react" />
|
|
89
|
+
</SilkeBox>
|
|
90
|
+
),
|
|
91
|
+
)}
|
|
133
92
|
<SilkeBox gap col>
|
|
134
93
|
<SilkeTag kind="secondary" color="green" icon="react" />
|
|
135
94
|
</SilkeBox>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--tag-icon-color: currentColor;
|
|
5
5
|
--tag-button-background: transparent;
|
|
6
6
|
--tag-height: 24px;
|
|
7
|
+
--tag-opacity: 1;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.gray {
|
|
@@ -48,6 +49,13 @@
|
|
|
48
49
|
--tag-button-background: var(--color-accent-20);
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
.purple {
|
|
53
|
+
--tag-background: var(--color-support-quaternary-40-rgb);
|
|
54
|
+
--tag-outline: var(--color-support-quaternary-40-rgb);
|
|
55
|
+
--tag-color: var(--color-neutral-0);
|
|
56
|
+
--tag-button-background: var(--color-support-quaternary-20);
|
|
57
|
+
}
|
|
58
|
+
|
|
51
59
|
.brandYellow {
|
|
52
60
|
--tag-background: var(--color-brand-primary-40-rgb);
|
|
53
61
|
--tag-outline: var(--color-brand-primary-40-rgb);
|
|
@@ -56,18 +64,18 @@
|
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
.dark {
|
|
59
|
-
--tag-background:
|
|
67
|
+
--tag-background: var(--color-neutral-0-rgb);
|
|
68
|
+
--tag-opacity: 0.64;
|
|
60
69
|
--tag-outline: var(--color-neutral-20-rgb);
|
|
61
70
|
--tag-color: var(--color-neutral-100);
|
|
62
71
|
--tag-button-background: var(--color-neutral-20);
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
.tag {
|
|
66
|
-
background-color:
|
|
75
|
+
background-color: rgba(var(--tag-background), var(--tag-opacity));
|
|
67
76
|
height: var(--tag-height);
|
|
68
77
|
max-height: var(--tag-height);
|
|
69
78
|
min-width: var(--tag-height);
|
|
70
|
-
max-width: 150px;
|
|
71
79
|
font-size: 12px;
|
|
72
80
|
border-radius: calc(var(--tag-height) / 2);
|
|
73
81
|
color: var(--tag-color);
|
|
@@ -77,7 +85,6 @@
|
|
|
77
85
|
--tag-color: var(--color-neutral-100);
|
|
78
86
|
background-color: rgb(var(--color-neutral-20-rgb), 0.64);
|
|
79
87
|
border-radius: var(--border-radius-tiny);
|
|
80
|
-
backdrop-filter: blur(8px);
|
|
81
88
|
|
|
82
89
|
&.gray{
|
|
83
90
|
--tag-icon-color: var(--color-neutral-80);
|
|
@@ -91,7 +98,7 @@
|
|
|
91
98
|
&.outlined {
|
|
92
99
|
--tag-color: var(--color-neutral-100);
|
|
93
100
|
border: 1px solid rgb(var(--tag-outline));
|
|
94
|
-
background-color:
|
|
101
|
+
background-color: rgba(var(--tag-background), 0.24);
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
&.selectable {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</SilkeBox>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
## Brand font (
|
|
23
|
+
## Brand font (Roboto Flex - Different font variation settings)
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
26
|
<SilkeBox gap="s" column>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
## Titles
|
|
40
40
|
|
|
41
|
-
Titles use
|
|
41
|
+
Titles use alternative Roboto Flex font-family.
|
|
42
42
|
|
|
43
43
|
```js
|
|
44
44
|
<SilkeBox gap="s" column>
|
|
@@ -65,12 +65,14 @@ Titles use Aeonik as font-family.
|
|
|
65
65
|
Titles can also be created with these shorthands. Tag prop specifies HTML tag.
|
|
66
66
|
|
|
67
67
|
```js
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
<
|
|
68
|
+
<>
|
|
69
|
+
<SilkeTitleXlarge>The quick brown fox jumps</SilkeTitleXlarge>
|
|
70
|
+
<SilkeTitleLarge>The quick brown fox jumps</SilkeTitleLarge>
|
|
71
|
+
<SilkeTitleXlarge tag="h5">The quick brown fox jumps, h5 tag</SilkeTitleXlarge>
|
|
72
|
+
<SilkeTitleLarge tag="h3">The quick brown fox jumps, h3 tag</SilkeTitleLarge>
|
|
73
|
+
<SilkeTitleMedium tag="h1">The quick brown fox jumps, h1 tag</SilkeTitleMedium>
|
|
74
|
+
<SilkeTitleSmall tag="h4">The quick brown fox jumps, h4 tag</SilkeTitleSmall>
|
|
75
|
+
</>
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
## Text color
|
|
@@ -116,27 +118,27 @@ const [weight, setWeight] = React.useState(null);
|
|
|
116
118
|
<SilkeBox gap column>
|
|
117
119
|
<SilkeBox gap>
|
|
118
120
|
<SilkeBox>
|
|
119
|
-
{[null,
|
|
121
|
+
{[null, 'primary', 'error'].map((c) => (
|
|
120
122
|
<SilkeButton
|
|
121
|
-
label={c ||
|
|
122
|
-
kind={color === c ?
|
|
123
|
+
label={c || 'default'}
|
|
124
|
+
kind={color === c ? 'primary' : 'secondary'}
|
|
123
125
|
onClick={() => setColor(c)}
|
|
124
126
|
/>
|
|
125
127
|
))}
|
|
126
128
|
</SilkeBox>
|
|
127
129
|
<SilkeBox>
|
|
128
|
-
{[null,
|
|
130
|
+
{[null, 'light', 'strong'].map((c) => (
|
|
129
131
|
<SilkeButton
|
|
130
|
-
label={c ||
|
|
131
|
-
kind={color === c ?
|
|
132
|
+
label={c || 'default'}
|
|
133
|
+
kind={color === c ? 'primary' : 'secondary'}
|
|
132
134
|
onClick={() => setColor(c)}
|
|
133
135
|
/>
|
|
134
136
|
))}
|
|
135
137
|
</SilkeBox>
|
|
136
138
|
</SilkeBox>
|
|
137
|
-
{[
|
|
139
|
+
{['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'small'].map((kind) => (
|
|
138
140
|
<SilkeText key={kind} kind={kind} color={color} weight={weight}>
|
|
139
|
-
{kind} Weight:{weight ||
|
|
141
|
+
{kind} Weight: {weight || 'default'} Color: {color || 'default'}
|
|
140
142
|
</SilkeText>
|
|
141
143
|
))}
|
|
142
144
|
</SilkeBox>;
|
|
@@ -149,38 +151,38 @@ Not sure what to do here but made, currently silke will apply to the real blocks
|
|
|
149
151
|
TODO: Review the margin rules for text blocks
|
|
150
152
|
|
|
151
153
|
```js
|
|
152
|
-
|
|
153
|
-
<
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
<p>
|
|
160
|
-
<
|
|
161
|
-
</
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
</
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<
|
|
173
|
-
blockquote - A quote about something
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<ul>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<ol>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
154
|
+
<>
|
|
155
|
+
<h1>H1 - The quick brown fox jumps</h1>
|
|
156
|
+
<h2>H2 - The quick brown fox jumps</h2>
|
|
157
|
+
<h3>H3 - The quick brown fox jumps</h3>
|
|
158
|
+
<h4>H4 - The quick brown fox jumps</h4>
|
|
159
|
+
<h5>H5 - The quick brown fox jumps</h5>
|
|
160
|
+
|
|
161
|
+
<p>p - The quick brown fox jumps</p>
|
|
162
|
+
<p>
|
|
163
|
+
<small>Small - The quick brown fox jumps</small>
|
|
164
|
+
</p>
|
|
165
|
+
<p>
|
|
166
|
+
<a>A - Not visited link</a> <a href="#">A - Visited link</a>
|
|
167
|
+
</p>
|
|
168
|
+
<p>
|
|
169
|
+
hr - Horizontal rule before
|
|
170
|
+
<hr />
|
|
171
|
+
hr - Horizontal rule after
|
|
172
|
+
</p>
|
|
173
|
+
|
|
174
|
+
<pre>pre - {'<pre>hello world</pre>'}</pre>
|
|
175
|
+
<blockquote>blockquote - A quote about something</blockquote>
|
|
176
|
+
|
|
177
|
+
<ul>
|
|
178
|
+
<li>ul-li - Unordered item 1</li>
|
|
179
|
+
<li>ul-li - Unordered item 2</li>
|
|
180
|
+
</ul>
|
|
181
|
+
<ol>
|
|
182
|
+
<li>ol-li - Ordered item 1</li>
|
|
183
|
+
<li>ol-li - Ordered item 2</li>
|
|
184
|
+
</ol>
|
|
185
|
+
</>
|
|
184
186
|
```
|
|
185
187
|
|
|
186
188
|
### Black and white, white and black, big and small
|
|
@@ -7,7 +7,7 @@ $weights: "strong" 600, "light" 200;
|
|
|
7
7
|
.text {
|
|
8
8
|
--font-size: 14px;
|
|
9
9
|
--letter-spacing: 0;
|
|
10
|
-
--line-height:
|
|
10
|
+
--line-height: 20px;
|
|
11
11
|
--scale: 1;
|
|
12
12
|
|
|
13
13
|
margin: 0;
|
|
@@ -16,11 +16,12 @@ $weights: "strong" 600, "light" 200;
|
|
|
16
16
|
font-style: normal;
|
|
17
17
|
line-height: var(--line-height);
|
|
18
18
|
letter-spacing: var(--letter-spacing);
|
|
19
|
+
font-optical-sizing: auto;
|
|
19
20
|
|
|
20
21
|
&.base {
|
|
21
22
|
--font-size: 14px;
|
|
22
23
|
--letter-spacing: 0;
|
|
23
|
-
--line-height:
|
|
24
|
+
--line-height: 20px;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
&.micro {
|
|
@@ -42,6 +43,7 @@ $weights: "strong" 600, "light" 200;
|
|
|
42
43
|
|
|
43
44
|
&.brandFont {
|
|
44
45
|
font-family: $font-family-brand;
|
|
46
|
+
font-variation-settings: var(--font-variation-settings-brand);
|
|
45
47
|
--scale: #{math.div(15, 14)};
|
|
46
48
|
}
|
|
47
49
|
}
|
|
@@ -1,40 +1,54 @@
|
|
|
1
|
+
:root{
|
|
2
|
+
--silke-title-xxs: 14px;
|
|
3
|
+
--silke-title-xs: 16px;
|
|
4
|
+
--silke-title-s: 24px;
|
|
5
|
+
--silke-title-m: 30px;
|
|
6
|
+
--silke-title-l: 36px;
|
|
7
|
+
--silke-title-xl: 59px;
|
|
8
|
+
|
|
9
|
+
--silke-title-xxs-line-height: 19px;
|
|
10
|
+
--silke-title-xs-line-height: 24px;
|
|
11
|
+
--silke-title-s-line-height: 30px;
|
|
12
|
+
--silke-title-m-line-height: 36px;
|
|
13
|
+
--silke-title-l-line-height: 44px;
|
|
14
|
+
--silke-title-xl-line-height: 64px;
|
|
15
|
+
}
|
|
1
16
|
|
|
2
17
|
.title{
|
|
3
18
|
&.xl {
|
|
4
19
|
|
|
5
|
-
font-size:
|
|
6
|
-
line-height:
|
|
20
|
+
font-size: var(--silke-title-xl);
|
|
21
|
+
line-height: var(--silke-title-xl-line-height);
|
|
7
22
|
}
|
|
8
23
|
|
|
9
24
|
|
|
10
25
|
&.l {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
line-height: 48px;
|
|
26
|
+
font-size: var(--silke-title-l);
|
|
27
|
+
line-height: var(--silke-title-l-line-height);
|
|
14
28
|
}
|
|
15
29
|
|
|
16
30
|
&.m {
|
|
17
31
|
|
|
18
|
-
font-size:
|
|
19
|
-
line-height:
|
|
32
|
+
font-size: var(--silke-title-m);
|
|
33
|
+
line-height: var(--silke-title-m-line-height);
|
|
20
34
|
}
|
|
21
35
|
|
|
22
36
|
&.s {
|
|
23
37
|
|
|
24
|
-
font-size:
|
|
25
|
-
line-height:
|
|
38
|
+
font-size: var(--silke-title-s);
|
|
39
|
+
line-height: var(--silke-title-s-line-height);
|
|
26
40
|
}
|
|
27
41
|
|
|
28
42
|
&.xs {
|
|
29
|
-
font-size:
|
|
30
|
-
line-height:
|
|
31
|
-
letter-spacing:
|
|
43
|
+
font-size: var(--silke-title-xs);
|
|
44
|
+
line-height: var(--silke-title-xs-line-height);
|
|
45
|
+
letter-spacing: var(--silke-title-xs-letter-spacing);
|
|
32
46
|
}
|
|
33
47
|
|
|
34
48
|
&.xxs {
|
|
35
|
-
font-size:
|
|
36
|
-
line-height:
|
|
37
|
-
letter-spacing: -
|
|
49
|
+
font-size: var(--silke-title-xxs);
|
|
50
|
+
line-height: var(--silke-title-xxs-line-height);
|
|
51
|
+
letter-spacing: var(--silke-title-xxs-letter-spacing);
|
|
38
52
|
}
|
|
39
53
|
|
|
40
54
|
}
|
|
@@ -17,6 +17,8 @@ const inputSizeMap: Record<BoxSize, InputSize> = {
|
|
|
17
17
|
l: 'large',
|
|
18
18
|
xl: 'large',
|
|
19
19
|
xxl: 'large',
|
|
20
|
+
'256': 'large',
|
|
21
|
+
'512': 'large',
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
export const getInputSize = (boxSize: BoxSize | undefined): InputSize =>
|
|
@@ -26,11 +28,12 @@ export type SilkeTextFieldOutlineProps = {
|
|
|
26
28
|
error?: string;
|
|
27
29
|
className?: string;
|
|
28
30
|
label?: React.ReactNode;
|
|
31
|
+
labelAlign?: BoxProps['hAlign'];
|
|
29
32
|
// Makes text field flex
|
|
30
33
|
flex?: boolean;
|
|
31
34
|
size?: BoxSize;
|
|
32
35
|
kind?: 'default' | 'ghost' | 'zombie';
|
|
33
|
-
width?: number;
|
|
36
|
+
width?: number | string;
|
|
34
37
|
/** Flex gap added to the container with the children */
|
|
35
38
|
gap?: BoxSpace;
|
|
36
39
|
/** Horizontal padding added to the container with the children */
|
|
@@ -53,6 +56,7 @@ export type SilkeTextFieldOutlineProps = {
|
|
|
53
56
|
labelUsingAria?: boolean;
|
|
54
57
|
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
55
58
|
onMouseDown?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
59
|
+
onContextMenu?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
56
60
|
disabled?: boolean;
|
|
57
61
|
tooltip?: string;
|
|
58
62
|
};
|
|
@@ -80,8 +84,10 @@ export const SilkeTextFieldOutline = React.forwardRef<HTMLDivElement, SilkeTextF
|
|
|
80
84
|
flex,
|
|
81
85
|
onClick,
|
|
82
86
|
onMouseDown,
|
|
87
|
+
onContextMenu,
|
|
83
88
|
disabled,
|
|
84
89
|
tooltip,
|
|
90
|
+
labelAlign,
|
|
85
91
|
}: SilkeTextFieldOutlineProps,
|
|
86
92
|
ref,
|
|
87
93
|
) => {
|
|
@@ -106,6 +112,7 @@ export const SilkeTextFieldOutline = React.forwardRef<HTMLDivElement, SilkeTextF
|
|
|
106
112
|
const labelComponent = label && (
|
|
107
113
|
<SilkeBox
|
|
108
114
|
vAlign="center"
|
|
115
|
+
hAlign={labelAlign}
|
|
109
116
|
flex={inline !== 'label-left'}
|
|
110
117
|
width={inline === 'label-left' ? 'xxl' : undefined}
|
|
111
118
|
>
|
|
@@ -131,6 +138,7 @@ export const SilkeTextFieldOutline = React.forwardRef<HTMLDivElement, SilkeTextF
|
|
|
131
138
|
column
|
|
132
139
|
className={styles.wrapper}
|
|
133
140
|
style={width ? { minWidth: width, maxWidth: width, width } : flex ? { flex: 1 } : undefined}
|
|
141
|
+
onContextMenu={onContextMenu}
|
|
134
142
|
>
|
|
135
143
|
<SilkeBox
|
|
136
144
|
data-size={`data-input-${mappedSize}`}
|