Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json",
"changelog": ["@cultureamp/changelog-github", { "repo": "cultureamp/kaizen-design-system" }],
"access": "public",
"baseBranch": "origin/main",
"baseBranch": "origin/kaio-v1",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/changeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'main'
- 'kaio-v1'

jobs:
version:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- 'main'
- 'kaio-v1'

# When Changesets opens a PR it does not trigger GitHub actions,
# because its token does not have permission to. This is a hack
Expand All @@ -14,12 +15,13 @@ on:
- auto_merge_enabled
branches:
- main # the target branch of the PR
- kaio-v1
paths:
- '**/CHANGELOG.md' # only changesets releases touch changelogs

jobs:
verify-build:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- main
- 'kaio-v1'

# When Changesets opens a PR it does not trigger GitHub actions,
# because its token does not have permission to. This is a hack
Expand All @@ -14,12 +15,13 @@ on:
- auto_merge_enabled
branches:
- main # the target branch of the PR
- 'kaio-v1'
paths:
- '**/CHANGELOG.md' # only changesets releases touch changelogs

jobs:
typescript:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -28,7 +30,7 @@ jobs:
- run: pnpm lint:ts

eslint:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -37,7 +39,7 @@ jobs:
- run: pnpm lint:eslint

prettier:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -46,7 +48,7 @@ jobs:
- run: pnpm lint:format

stylelint:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-stories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches-ignore:
- main
- 'kaio-v1'

# When Changesets opens a PR it does not trigger GitHub actions,
# because its token does not have permission to. This is a hack
Expand All @@ -17,6 +18,7 @@ on:
- auto_merge_enabled
branches:
- main # the target branch of the PR
- 'kaio-v1'
paths:
- '**/CHANGELOG.md' # only changesets releases touch changelogs

Expand All @@ -25,7 +27,7 @@ env:

jobs:
build-test-storybook:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches-ignore:
- main
- 'kaio-v1'

# When Changesets opens a PR it does not trigger GitHub actions,
# because its token does not have permission to. This is a hack
Expand All @@ -14,12 +15,13 @@ on:
- auto_merge_enabled
branches:
- main # the target branch of the PR
- 'kaio-v1'
paths:
- '**/CHANGELOG.md' # only changesets releases touch changelogs

jobs:
unit-tests:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
name: 'vitest'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -30,7 +32,7 @@ jobs:
run: pnpm test -- --shard=1/3

unit-tests-2:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
name: 'vitest'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -41,7 +43,7 @@ jobs:
run: pnpm test -- --shard=2/3

unit-tests-3:
if: github.head_ref != 'changeset-release/main'
if: github.head_ref != 'changeset-release/main' || github.head_ref != 'changeset-release/kaio-v1'
name: 'vitest'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
18 changes: 18 additions & 0 deletions docs/components/V1Notice/V1Notice.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import { Unstyled } from '@storybook/blocks'
import { InlineNotification } from '~components/Notification'

export const V1Notice = (): JSX.Element => (
<Unstyled>
<InlineNotification
persistent
variant="warning"
title="You're looking at the documentation for kaizen/components v1"
>
This is the documentation for <code>kaizen/components@1.80.*</code>. This version is no longer
supported outside of critical bug fixes. Refer to the Migration Guide for{' '}
<code>kaizen/components@2.0.0</code> or visit the latest documentation{' '}
<a href="https://cultureamp.design">here</a>.
</InlineNotification>
</Unstyled>
)
1 change: 1 addition & 0 deletions docs/components/V1Notice/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './V1Notice'
1 change: 1 addition & 0 deletions docs/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export * from './RenameNotice'
export * from './ResourceLinks'
export * from './SbReleaseNotification'
export * from './AlphaNotice'
export * from './V1Notice'
3 changes: 3 additions & 0 deletions docs/pages/app-starter.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { Meta, Unstyled } from '@storybook/blocks'
import { InlineNotification } from '~components/Notification'
import { LinkTo } from '../components/LinkTo'
import { V1Notice } from '../components/V1Notice'

<Meta title="Guides/App starter" />

<V1Notice />

# App starter

This guide is all about how to introduce the Kaizen Design System to your app.
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/upcoming-releases.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Meta, Markdown } from '@storybook/blocks'
import { V1Notice } from '../components/V1Notice'

<Meta title="Releases/Upcoming major releases" />

<V1Notice />

# Upcoming major releases

## `@kaizen/components@v2`
Expand Down
5 changes: 4 additions & 1 deletion docs/pages/welcome.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Meta } from '@storybook/blocks'
import { V1Notice } from '../components/V1Notice'

<Meta title="Introduction/Welcome" />

# Welcome to the Kaizen Component Library
<V1Notice />

# Welcome to the Kaizen Component Library V1

Kaizen aims to provide standard components which enable teams to build UI as efficiently as possibe while maintaining a high level of quality, accessibility and consistency with thle overall platform.

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
},
"overrides": {
"@storybook/icons": "1.4.0"
},
"patchedDependencies": {
"rollup-plugin-postcss@4.0.2": "patches/rollup-plugin-postcss@4.0.2.patch"
}
}
}
6 changes: 6 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 1.81.2

### Patch Changes

- [#6116](https://github.com/cultureamp/kaizen-design-system/pull/6116) [`577a350`](https://github.com/cultureamp/kaizen-design-system/commit/577a350c3cf2cbf87089a0b4fb070815852ee435) - CSS ordering fix - Patch rollup-plugin-postcss to handle multi inputs correctly

## 1.81.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kaizen/components",
"version": "1.81.1",
"version": "1.81.2",
"description": "Kaizen component library",
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
"homepage": "https://cultureamp.design",
Expand Down
66 changes: 66 additions & 0 deletions patches/rollup-plugin-postcss@4.0.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/dist/index.js b/dist/index.js
index 8ca4cf35ac17b3874f116a5620c6816854311099..6d1e83ad379c9bb18351f36ca4e61d0642bdf4a2 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -765,13 +765,19 @@ function inferOption(option, defaultValue) {
* Recursively get the correct import order from rollup
* We only process a file once
*
- * @param {string} id
+ * @param {Array<string>} ids
* @param {Function} getModuleInfo
* @param {Set<string>} seen
*/


-function getRecursiveImportOrder(id, getModuleInfo, seen = new Set()) {
+function getRecursiveImportOrder(ids, getModuleInfo, seen = new Set()) {
+ return ids.flatMap(id => {
+ return getRecursiveImportOrderForModule(id, getModuleInfo, seen);
+ });
+}
+
+function getRecursiveImportOrderForModule(id, getModuleInfo, seen = new Set()) {
if (seen.has(id)) {
return [];
}
@@ -779,7 +785,7 @@ function getRecursiveImportOrder(id, getModuleInfo, seen = new Set()) {
seen.add(id);
const result = [id];
getModuleInfo(id).importedIds.forEach(importFile => {
- result.push(...getRecursiveImportOrder(importFile, getModuleInfo, seen));
+ result.push(...getRecursiveImportOrderForModule(importFile, getModuleInfo, seen));
});
return result;
}
@@ -917,6 +923,7 @@ var index = ((options = {}) => {

const dir = options_.dir || path__default['default'].dirname(options_.file);
const file = options_.file || path__default['default'].join(options_.dir, Object.keys(bundle).find(fileName => bundle[fileName].isEntry));
+ const entryFiles = options_.file ? [options_.file] : Object.keys(bundle).filter(fileName => bundle[fileName].isEntry).map(fileName => path__default['default'].join(options_.dir, fileName));

const getExtracted = () => {
let fileName = `${path__default['default'].basename(file, path__default['default'].extname(file))}.css`;
@@ -927,12 +934,16 @@ var index = ((options = {}) => {

const concat = new Concat__default['default'](true, fileName, '\n');
const entries = [...extracted.values()];
- const _bundle$normalizePath = bundle[normalizePath(path__default['default'].relative(dir, file))],
- modules = _bundle$normalizePath.modules,
- facadeModuleId = _bundle$normalizePath.facadeModuleId;
-
- if (modules) {
- const moduleIds = getRecursiveImportOrder(facadeModuleId, _this2.getModuleInfo);
+ const facadeModuleIds = entryFiles.map(entryFile => {
+ const _bundle$normalizePath = bundle[normalizePath(path__default['default'].relative(dir, entryFile))],
+ modules = _bundle$normalizePath.modules,
+ facadeModuleId = _bundle$normalizePath.facadeModuleId;
+ if (modules) return facadeModuleId;
+ return false;
+ }).filter(n => n);
+
+ if (facadeModuleIds.length > 0) {
+ const moduleIds = getRecursiveImportOrder(facadeModuleIds, _this2.getModuleInfo);
entries.sort((a, b) => moduleIds.indexOf(a.id) - moduleIds.indexOf(b.id));
}

Loading
Loading