-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/1614-Replace-cursor-pointer-with-default
- Loading branch information
Showing
49 changed files
with
592 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"sit-onyx": minor | ||
--- | ||
|
||
Implement OnyxForm which allows setting of disabled state for all child form elements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sit-onyx/storybook-utils": minor | ||
--- | ||
|
||
New createSymbolArgTypeEnhancer which adds description text to symbols used as default props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# demo-app | ||
|
||
## 1.0.0-beta.48 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [5d8349c] | ||
- [email protected] | ||
|
||
## 1.0.0-beta.47 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# playground | ||
|
||
## 1.0.0-beta.48 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [5d8349c] | ||
- [email protected] | ||
|
||
## 1.0.0-beta.47 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# @sit-onyx/chartjs-plugin | ||
|
||
## 1.0.0-beta.48 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [5d8349c] | ||
- [email protected] | ||
|
||
## 1.0.0-beta.47 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# @sit-onyx/nuxt | ||
|
||
## 1.0.0-beta.49 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies [5d8349c] | ||
- [email protected] | ||
|
||
## 1.0.0-beta.48 | ||
|
||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { createSymbolArgTypeEnhancer } from "@sit-onyx/storybook-utils"; | ||
|
||
export const enhanceFormInjectedSymbol = createSymbolArgTypeEnhancer( | ||
"FORM_INJECTED_SYMBOL", | ||
"If no value (or `undefined`) is provided, `FORM_INJECTED_SYMBOL` is the internal default value for this prop.\n" + | ||
"In that case the props value will be derived from it's parent form (if it exists).\n", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,9 @@ | ||
import { walkTree } from "@sit-onyx/storybook-utils"; | ||
import type { | ||
ArgTypesEnhancer, | ||
InputType, | ||
SBType, | ||
StrictInputType, | ||
} from "storybook/internal/types"; | ||
|
||
const SB_TYPE_CONTROL_MAP: Partial<Record<SBType["name"], InputType["control"]>> = { | ||
boolean: { type: "boolean" }, | ||
string: { type: "text" }, | ||
number: { type: "number" }, | ||
}; | ||
|
||
const getManagedParent = (inputType?: StrictInputType) => { | ||
if (!inputType?.type || inputType.table?.defaultValue?.summary !== "MANAGED_SYMBOL") { | ||
return undefined; | ||
} | ||
|
||
return walkTree(inputType.type, (elem, parent) => | ||
elem.name === "symbol" || (elem.name === "other" && elem.value === "unique symbol") | ||
? parent | ||
: undefined, | ||
); | ||
}; | ||
|
||
export const enhanceManagedSymbol: ArgTypesEnhancer = (context) => { | ||
Object.values(context.argTypes) | ||
.map((argType) => { | ||
const parent = getManagedParent(argType); | ||
return { argType, parent }; | ||
}) | ||
.filter(({ parent }) => parent) | ||
.forEach(({ argType, parent }) => { | ||
const firstAvailableControl = walkTree( | ||
parent || argType.type!, | ||
(sb) => SB_TYPE_CONTROL_MAP[sb.name], | ||
); | ||
|
||
if (firstAvailableControl && argType.table?.defaultValue) { | ||
argType.control = firstAvailableControl; | ||
argType.table.defaultValue.detail = | ||
"If no value (or `undefined`) is passed, `MANAGED_SYMBOL` is the internal default value for this prop.\n" + | ||
"It signals the component that the prop is managed and it's state tracked internally.\n" + | ||
"So in that case no prop binding or `v-model` is necessary.\n" + | ||
"Updates for the prop will still be emitted.\n"; | ||
} | ||
}); | ||
|
||
return context.argTypes; | ||
}; | ||
import { createSymbolArgTypeEnhancer } from "@sit-onyx/storybook-utils"; | ||
|
||
export const enhanceManagedSymbol = createSymbolArgTypeEnhancer( | ||
"MANAGED_SYMBOL", | ||
"If no value (or `undefined`) is passed, `MANAGED_SYMBOL` is the internal default value for this prop.\n" + | ||
"It signals the component that the prop is managed and it's state tracked internally.\n" + | ||
"So in that case no prop binding or `v-model` is necessary.\n" + | ||
"Updates for the prop will still be emitted.\n", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.